Compare commits
894 Commits
v0.172.4-p
...
fix-git-ht
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c2dffc792 | ||
|
|
e4e758db3a | ||
|
|
fc52b43159 | ||
|
|
b445e4ce24 | ||
|
|
508b581215 | ||
|
|
c9aba6c10a | ||
|
|
5740fec9d5 | ||
|
|
22220ed32e | ||
|
|
7440833ff1 | ||
|
|
bb3aef15eb | ||
|
|
ece1818301 | ||
|
|
604eb91a6c | ||
|
|
472dde509f | ||
|
|
212c8f4c31 | ||
|
|
6092918be8 | ||
|
|
a5f96909cb | ||
|
|
b15aa5e018 | ||
|
|
62fb555e18 | ||
|
|
c0ecf8684e | ||
|
|
df7beb4217 | ||
|
|
6f30d5da71 | ||
|
|
b8387c6077 | ||
|
|
c05ce882e9 | ||
|
|
eaf3949614 | ||
|
|
c47305dd7b | ||
|
|
482a45feac | ||
|
|
7ec3702b47 | ||
|
|
91862ddc9f | ||
|
|
eb4fad52df | ||
|
|
541a5c01a4 | ||
|
|
82f793144e | ||
|
|
6eb2ffe77a | ||
|
|
c5632f8c31 | ||
|
|
6856e869fc | ||
|
|
cc3b5c729e | ||
|
|
4e60ebab5e | ||
|
|
e8ef36edcc | ||
|
|
2e98bc17cb | ||
|
|
5c400dac8d | ||
|
|
635b80ed51 | ||
|
|
73ab5abee1 | ||
|
|
1f52aab7c7 | ||
|
|
1732cdb90a | ||
|
|
0625006a9e | ||
|
|
0b96690446 | ||
|
|
bc22690620 | ||
|
|
4eb82c0731 | ||
|
|
fa91379119 | ||
|
|
da2320fb40 | ||
|
|
7bc31a69c3 | ||
|
|
1e4752972f | ||
|
|
91148a72a3 | ||
|
|
878b50c991 | ||
|
|
e7df5ce61c | ||
|
|
da22f21dec | ||
|
|
3505a17452 | ||
|
|
81badd1fe6 | ||
|
|
6dacc751fc | ||
|
|
a0d1555470 | ||
|
|
8ba7b349a5 | ||
|
|
11838cf89e | ||
|
|
84ded96cb2 | ||
|
|
afc61b9527 | ||
|
|
672a472a23 | ||
|
|
9822d9673c | ||
|
|
f0dec2f576 | ||
|
|
9f7c65df44 | ||
|
|
372e485ba8 | ||
|
|
b8fb416892 | ||
|
|
6a1c104522 | ||
|
|
b06da7f7fd | ||
|
|
f80035e0ff | ||
|
|
7664c1cef5 | ||
|
|
967792119b | ||
|
|
be1ac78e11 | ||
|
|
b5a1ae6526 | ||
|
|
d2b49de0e4 | ||
|
|
d694458659 | ||
|
|
7a34dd9888 | ||
|
|
add7ae8052 | ||
|
|
c53020ceaf | ||
|
|
eeac1a9287 | ||
|
|
e83ebd1fab | ||
|
|
afb0fd609b | ||
|
|
b2a685f00a | ||
|
|
089ea5da50 | ||
|
|
b6e8db244c | ||
|
|
6267ab0396 | ||
|
|
d105f04be5 | ||
|
|
5edded5c02 | ||
|
|
78da39e19b | ||
|
|
d82a132477 | ||
|
|
f11357db7c | ||
|
|
6d17546b1a | ||
|
|
60a96ab799 | ||
|
|
1f80f58104 | ||
|
|
bab65011b4 | ||
|
|
c0b6d86c41 | ||
|
|
39728cfc59 | ||
|
|
ebccef1aa4 | ||
|
|
33754f8eac | ||
|
|
dd1ff9b998 | ||
|
|
7f214ed25a | ||
|
|
08539b32d0 | ||
|
|
88baf171c3 | ||
|
|
2f34af7811 | ||
|
|
2978be95d7 | ||
|
|
30568e6dd1 | ||
|
|
a5698a430d | ||
|
|
57659b5552 | ||
|
|
3db18ff053 | ||
|
|
198f56c763 | ||
|
|
d68d858a10 | ||
|
|
7f166298db | ||
|
|
0066071a89 | ||
|
|
e5b6194914 | ||
|
|
23f61d5954 | ||
|
|
0559e1f348 | ||
|
|
014d9dfce1 | ||
|
|
a0aea6ef62 | ||
|
|
278620df33 | ||
|
|
75dbe189bd | ||
|
|
3d7ba7c1c0 | ||
|
|
eebee4ab18 | ||
|
|
3a3621f2d8 | ||
|
|
524e813d20 | ||
|
|
b12b8340de | ||
|
|
7075bd700f | ||
|
|
21fc3c07b6 | ||
|
|
c90f87898a | ||
|
|
796e87ecbc | ||
|
|
3a041cac72 | ||
|
|
86283f4e3d | ||
|
|
8e1003ef59 | ||
|
|
8e891c16f8 | ||
|
|
cea06bc0ce | ||
|
|
45146b6f30 | ||
|
|
bcbb19e06e | ||
|
|
3f168e85c2 | ||
|
|
20440f83e9 | ||
|
|
2d63f7628f | ||
|
|
52f73e0c2d | ||
|
|
980e1b533f | ||
|
|
2ea332421c | ||
|
|
4edecfed3e | ||
|
|
113c471bb0 | ||
|
|
10fef92eea | ||
|
|
3ee4edc404 | ||
|
|
eda233344c | ||
|
|
17a483cb03 | ||
|
|
7b277d2efd | ||
|
|
63cfcc26fb | ||
|
|
53a5145dc8 | ||
|
|
def342e35c | ||
|
|
bbb8d63de0 | ||
|
|
e5b97a5e48 | ||
|
|
e06666759a | ||
|
|
a78f3cfea2 | ||
|
|
0acd556106 | ||
|
|
2f7a62780a | ||
|
|
f1e6b144e8 | ||
|
|
10a4760f90 | ||
|
|
cdd07fdf29 | ||
|
|
8a3fb890b0 | ||
|
|
30af8d0a81 | ||
|
|
ceb7fc2cb2 | ||
|
|
d8694510b5 | ||
|
|
ec7ce41324 | ||
|
|
b2921bd3fd | ||
|
|
64756fa96f | ||
|
|
ff6844300e | ||
|
|
b1b6401ce7 | ||
|
|
07ba7c8c44 | ||
|
|
6516249302 | ||
|
|
fc8218d728 | ||
|
|
a8d56877ee | ||
|
|
dd0de3cfa9 | ||
|
|
198c36811e | ||
|
|
133704a419 | ||
|
|
d1302a7a08 | ||
|
|
2b28b5969f | ||
|
|
bc941bfc97 | ||
|
|
72a9429ef6 | ||
|
|
f020291039 | ||
|
|
4b3a2a33a8 | ||
|
|
1f257f4704 | ||
|
|
f517050548 | ||
|
|
535ba75bc7 | ||
|
|
ee280b0d05 | ||
|
|
a43793493a | ||
|
|
3b3c379852 | ||
|
|
147f407b7a | ||
|
|
822f42e8fe | ||
|
|
7e097d529a | ||
|
|
65f76e6f4d | ||
|
|
918cba4cce | ||
|
|
4067ae4b37 | ||
|
|
084a0233b6 | ||
|
|
04732b23fb | ||
|
|
abc027558a | ||
|
|
4d106a4b0b | ||
|
|
ec4d9ec111 | ||
|
|
10053e2566 | ||
|
|
7a55da58d9 | ||
|
|
5043eaedc4 | ||
|
|
328e4d6278 | ||
|
|
83513bab59 | ||
|
|
b9ca240242 | ||
|
|
5d751cd407 | ||
|
|
ef53f7af22 | ||
|
|
4118f42d61 | ||
|
|
ec56755f9e | ||
|
|
aba89ba12a | ||
|
|
7ff40091d8 | ||
|
|
dabc35b257 | ||
|
|
8f40bcc86c | ||
|
|
3e75a661dd | ||
|
|
a9e753fc07 | ||
|
|
2d6592dcaa | ||
|
|
59a153b2e1 | ||
|
|
10a6cd00e7 | ||
|
|
f6f6980463 | ||
|
|
2e302b1a7c | ||
|
|
17323ed7b2 | ||
|
|
3759e0bf55 | ||
|
|
144d8a1db6 | ||
|
|
7deceb62dc | ||
|
|
a97a2ebf35 | ||
|
|
5e4bdbbcde | ||
|
|
d0a0303428 | ||
|
|
a4ade37a56 | ||
|
|
1fb4620a90 | ||
|
|
3c4903c6bf | ||
|
|
ad4163b9be | ||
|
|
2f416aebbe | ||
|
|
5397ca23a1 | ||
|
|
c9235ff916 | ||
|
|
dff47a8436 | ||
|
|
d45aaa1745 | ||
|
|
5e1dd91ee5 | ||
|
|
4871d3c9e7 | ||
|
|
6b9397c380 | ||
|
|
c31c638006 | ||
|
|
ee1a559827 | ||
|
|
30850fe3bd | ||
|
|
ec00fb97fd | ||
|
|
5dd351551d | ||
|
|
5ae93ce68d | ||
|
|
74c581b9f4 | ||
|
|
3a222f0666 | ||
|
|
300ed6bb4a | ||
|
|
3c8dbaf06b | ||
|
|
4151b5b12b | ||
|
|
274e70e81d | ||
|
|
0eea8c3e60 | ||
|
|
191a1d7b10 | ||
|
|
2581f8be92 | ||
|
|
a1223e0646 | ||
|
|
a8610fbd13 | ||
|
|
3116850688 | ||
|
|
21bb7242ea | ||
|
|
31aad858f8 | ||
|
|
c18be3ecd0 | ||
|
|
f609abb48c | ||
|
|
78a8002415 | ||
|
|
f2b7d8a9c9 | ||
|
|
1d513dd32b | ||
|
|
b84aec0fae | ||
|
|
d4392aaf2d | ||
|
|
7f3e2e4aba | ||
|
|
43f2e4c476 | ||
|
|
48541fb05a | ||
|
|
f973b260c5 | ||
|
|
5c40326174 | ||
|
|
c043adf764 | ||
|
|
c309ceb52b | ||
|
|
b8df91aa25 | ||
|
|
1429363218 | ||
|
|
528da6eb26 | ||
|
|
6b06f39fa8 | ||
|
|
cc46a1fe30 | ||
|
|
0c0201c79f | ||
|
|
d0f7dede79 | ||
|
|
e3836712d6 | ||
|
|
0fdad0c0d6 | ||
|
|
1087e05da4 | ||
|
|
121aba7106 | ||
|
|
b8ed6e8f4d | ||
|
|
3a77e5c8c6 | ||
|
|
8102051e27 | ||
|
|
347bfad8b6 | ||
|
|
d10430b860 | ||
|
|
d0899e6af5 | ||
|
|
365dcc5ac7 | ||
|
|
af6cdd87cd | ||
|
|
40425093df | ||
|
|
ffc7558a1d | ||
|
|
78b43ba745 | ||
|
|
836661503f | ||
|
|
8e17b34eff | ||
|
|
c9bd44f983 | ||
|
|
5f6d049751 | ||
|
|
ea40c1d9b3 | ||
|
|
2d1a028de5 | ||
|
|
c34b14ae7d | ||
|
|
d17c6b392e | ||
|
|
1ce8a51712 | ||
|
|
6a9b1f0dc4 | ||
|
|
d1af7b1322 | ||
|
|
f28080a85c | ||
|
|
b6fd06d63c | ||
|
|
ddec72ecbe | ||
|
|
119bd896b0 | ||
|
|
686978d7c5 | ||
|
|
486e106205 | ||
|
|
086f002f44 | ||
|
|
c0c48d30db | ||
|
|
f8770fee10 | ||
|
|
044be72038 | ||
|
|
8b98b5c82f | ||
|
|
d034687475 | ||
|
|
d4b2e88ab8 | ||
|
|
fb19db00ca | ||
|
|
094430e5a2 | ||
|
|
d4414efd6f | ||
|
|
2274e88299 | ||
|
|
48417866cc | ||
|
|
1fa105eaa5 | ||
|
|
043c4ed296 | ||
|
|
e57b9e5f83 | ||
|
|
13da468e22 | ||
|
|
1678e3cbf1 | ||
|
|
ebbc6a9752 | ||
|
|
bb600acaa1 | ||
|
|
372aaecdb4 | ||
|
|
7a6b652ebc | ||
|
|
2627a5fdbe | ||
|
|
a6006afdd7 | ||
|
|
92f128ebb0 | ||
|
|
98ea659af6 | ||
|
|
d0816ef2e2 | ||
|
|
6885b28c22 | ||
|
|
48f87a8d9a | ||
|
|
bff1548b48 | ||
|
|
60a44359e4 | ||
|
|
b1872e3afd | ||
|
|
f606b0641e | ||
|
|
e5d8bd27da | ||
|
|
529c65276e | ||
|
|
737b177ab5 | ||
|
|
c10ac31866 | ||
|
|
1e255e41cc | ||
|
|
8a7565e04b | ||
|
|
8e7cad7848 | ||
|
|
76f501af71 | ||
|
|
9ef0501853 | ||
|
|
80458ffb96 | ||
|
|
b34037876e | ||
|
|
295e486113 | ||
|
|
00bb9a4e92 | ||
|
|
b4fc127e49 | ||
|
|
0e38d2d4f1 | ||
|
|
813d870a03 | ||
|
|
8942e657aa | ||
|
|
06726a28d3 | ||
|
|
93efb57c75 | ||
|
|
a8de6af641 | ||
|
|
12aa270b9a | ||
|
|
888dc0b344 | ||
|
|
bb53ad9862 | ||
|
|
62a11b047d | ||
|
|
e068c7b4b4 | ||
|
|
a99696b95f | ||
|
|
dc11a61ff8 | ||
|
|
5eadeb67b0 | ||
|
|
aa4c438f83 | ||
|
|
f2bc3d3738 | ||
|
|
f833a01a7e | ||
|
|
3e9722685b | ||
|
|
1e1b637b50 | ||
|
|
69477dfd8c | ||
|
|
cd108cc5f6 | ||
|
|
478bccadd6 | ||
|
|
08e9080ec9 | ||
|
|
e45b5cadc0 | ||
|
|
510260a10e | ||
|
|
aca31cfb8d | ||
|
|
b5d85b638a | ||
|
|
91c99baaf2 | ||
|
|
3b5dad8a9d | ||
|
|
bcba0b92ed | ||
|
|
8b088b3985 | ||
|
|
58491807a4 | ||
|
|
ba2c1821af | ||
|
|
c7df2d787b | ||
|
|
2400fb4d9e | ||
|
|
74d1a652f6 | ||
|
|
bd41be2caf | ||
|
|
4ff1173047 | ||
|
|
394bb8f4e6 | ||
|
|
56f13ddc50 | ||
|
|
79e3faffb2 | ||
|
|
e0fc767c11 | ||
|
|
14289b5a6e | ||
|
|
1b38b9f61d | ||
|
|
bf21d9183e | ||
|
|
e60123bbdc | ||
|
|
f2776099ab | ||
|
|
a01d2dd798 | ||
|
|
88fe54ea02 | ||
|
|
64b2a499fa | ||
|
|
5825413eb8 | ||
|
|
86b8852e97 | ||
|
|
1fd099bb38 | ||
|
|
082347c5c2 | ||
|
|
2377f53444 | ||
|
|
df02745a1f | ||
|
|
e6749b5955 | ||
|
|
5f6311171f | ||
|
|
58b0a6c4af | ||
|
|
216a5e2998 | ||
|
|
f9432518e5 | ||
|
|
be83074243 | ||
|
|
bd105a5fc7 | ||
|
|
c049df2a2e | ||
|
|
3040ef416a | ||
|
|
e37acdeeb8 | ||
|
|
1d26a27afa | ||
|
|
294dea10e8 | ||
|
|
fc85ca0101 | ||
|
|
de020af6ef | ||
|
|
610158b2f0 | ||
|
|
20460239a0 | ||
|
|
7ee492746d | ||
|
|
5c5caf1ffe | ||
|
|
39c9b1f170 | ||
|
|
4aae0e2f6c | ||
|
|
744579ede9 | ||
|
|
592e8fbffc | ||
|
|
a618830aea | ||
|
|
8d839fca06 | ||
|
|
79ee01eb14 | ||
|
|
3b91de8003 | ||
|
|
2f734cbd5e | ||
|
|
5ac82161fa | ||
|
|
e133d3b31e | ||
|
|
9094f53211 | ||
|
|
5d26ce14d7 | ||
|
|
28c667a3c7 | ||
|
|
c38deb1430 | ||
|
|
8af54c589b | ||
|
|
8b85d26981 | ||
|
|
8c202b3b09 | ||
|
|
a6a8d79d86 | ||
|
|
74e8164cd7 | ||
|
|
16ffddf48d | ||
|
|
2f741c8686 | ||
|
|
8c780ba287 | ||
|
|
de0d9d678e | ||
|
|
2db5eed840 | ||
|
|
cf176dab20 | ||
|
|
c3afeda80b | ||
|
|
d57f5937d4 | ||
|
|
fc7bf7bcb9 | ||
|
|
5d634245a2 | ||
|
|
21a1541a70 | ||
|
|
71867096c8 | ||
|
|
3d68dba696 | ||
|
|
f0cd71e43c | ||
|
|
a13c2baa7f | ||
|
|
7ba1492f0a | ||
|
|
0a681225b6 | ||
|
|
277fb54632 | ||
|
|
0e42a69490 | ||
|
|
b014afa938 | ||
|
|
df8adc8b11 | ||
|
|
522b8d662c | ||
|
|
5dc3c237eb | ||
|
|
c771ca49e1 | ||
|
|
ab4a6f1c79 | ||
|
|
316b97d6e3 | ||
|
|
eea6b526dc | ||
|
|
ea8da43c6b | ||
|
|
cc97f4131b | ||
|
|
ba7d2ba8c7 | ||
|
|
553cc2cca5 | ||
|
|
3f95d79fc5 | ||
|
|
51092c4e31 | ||
|
|
2b7d3726b4 | ||
|
|
1ce6e8d0e3 | ||
|
|
eb389a5132 | ||
|
|
e148815e04 | ||
|
|
fc86e7cd51 | ||
|
|
754560876b | ||
|
|
65934ae181 | ||
|
|
498bb518ff | ||
|
|
2e7a89c5e3 | ||
|
|
f5fd3d98ad | ||
|
|
9a9fdce253 | ||
|
|
cc931a8fcc | ||
|
|
148547ecd1 | ||
|
|
5293f5724c | ||
|
|
73b32a20e2 | ||
|
|
7da913c801 | ||
|
|
a2592a3a37 | ||
|
|
636253d2dc | ||
|
|
e851abd2ec | ||
|
|
b3814ce4e3 | ||
|
|
2d71733490 | ||
|
|
aab3e0495d | ||
|
|
12163c9b45 | ||
|
|
477cec0ef1 | ||
|
|
0a146793ea | ||
|
|
7378ab9ba5 | ||
|
|
759ea0ec48 | ||
|
|
7c00eec08b | ||
|
|
eaab7da2d8 | ||
|
|
14d9788ba3 | ||
|
|
b395beaf93 | ||
|
|
6e7416eb00 | ||
|
|
bbea3a2184 | ||
|
|
7950368bc2 | ||
|
|
7fe6943d89 | ||
|
|
8fa85c41a1 | ||
|
|
7b45901d96 | ||
|
|
22e2b8e832 | ||
|
|
5778e1e6f0 | ||
|
|
c61f2dff47 | ||
|
|
04d65cb3cd | ||
|
|
6a40a400bd | ||
|
|
c8c4ec21f3 | ||
|
|
64ae5093af | ||
|
|
7f4957cf20 | ||
|
|
8c349057e5 | ||
|
|
a1d4bd94c9 | ||
|
|
9e178f128d | ||
|
|
236f51cddd | ||
|
|
37785a54d5 | ||
|
|
2e7bb11b7d | ||
|
|
cf9661a56b | ||
|
|
c5fe5f1139 | ||
|
|
8f75fe25e5 | ||
|
|
a9de9e3cb4 | ||
|
|
4c881b6a12 | ||
|
|
c89ad65782 | ||
|
|
3d9f70946c | ||
|
|
7fe331f83d | ||
|
|
c1f162abc6 | ||
|
|
929c5e76b4 | ||
|
|
dab9c41799 | ||
|
|
1f288f7327 | ||
|
|
89e051d650 | ||
|
|
62bb3398ed | ||
|
|
0af048a7cf | ||
|
|
973cb916f3 | ||
|
|
63c0150cc2 | ||
|
|
78a5cf0257 | ||
|
|
43afa68dab | ||
|
|
0fd2203665 | ||
|
|
72e1947025 | ||
|
|
d9909c691d | ||
|
|
4f7200527c | ||
|
|
de8d4d00ce | ||
|
|
69d415c8d0 | ||
|
|
d292b7c96d | ||
|
|
ca4378cbaa | ||
|
|
d42322ab06 | ||
|
|
3f0288e52a | ||
|
|
d15a61a1aa | ||
|
|
e72f7b4e22 | ||
|
|
d0c4c664b0 | ||
|
|
994bea0003 | ||
|
|
6f7f0f30e2 | ||
|
|
1a133ab9d8 | ||
|
|
cf74d653bd | ||
|
|
8f1ff189cc | ||
|
|
56cfc60875 | ||
|
|
6ee447ee58 | ||
|
|
f42177a912 | ||
|
|
072d2b061a | ||
|
|
065fdcb86b | ||
|
|
e84d77e879 | ||
|
|
f1693e6129 | ||
|
|
4207b194e3 | ||
|
|
fe6d180a1a | ||
|
|
0294b19694 | ||
|
|
b1055878c7 | ||
|
|
3582fc4636 | ||
|
|
ca4e8043d4 | ||
|
|
d9183c7669 | ||
|
|
7bddb390ca | ||
|
|
146b9c232c | ||
|
|
be26acccca | ||
|
|
4be89ea60f | ||
|
|
e17e838c07 | ||
|
|
ed5656813c | ||
|
|
c4bcff1e87 | ||
|
|
07f1b612cf | ||
|
|
9e5bc81f1c | ||
|
|
7148092e12 | ||
|
|
ead5a836a1 | ||
|
|
3be8066415 | ||
|
|
f6e396837c | ||
|
|
fd7fa87939 | ||
|
|
a7a14e59bf | ||
|
|
8ff8dbdb2b | ||
|
|
44c6a54f95 | ||
|
|
f0565b4e2e | ||
|
|
a6e15dda4b | ||
|
|
144487bf1a | ||
|
|
2d57e43e34 | ||
|
|
c484374b2f | ||
|
|
8114d17cba | ||
|
|
c7cd5b019b | ||
|
|
07929229ae | ||
|
|
00c2a30059 | ||
|
|
a1544f47ad | ||
|
|
4f65cfa93d | ||
|
|
b6b06cf6d8 | ||
|
|
f700268029 | ||
|
|
92c21a2814 | ||
|
|
1f9d02607b | ||
|
|
6534e0bafd | ||
|
|
5ffacb9ca5 | ||
|
|
864c1ff00c | ||
|
|
35ef269233 | ||
|
|
d97adfc540 | ||
|
|
a42e040660 | ||
|
|
8646d37c0c | ||
|
|
d83c316e6d | ||
|
|
c5913899d9 | ||
|
|
e689c8c01b | ||
|
|
888a2df3f0 | ||
|
|
d6d0d7d3e4 | ||
|
|
a1ed1a00b3 | ||
|
|
a190f42ccc | ||
|
|
59bba2a98c | ||
|
|
5315d38cf4 | ||
|
|
337b9e62d2 | ||
|
|
73c487c222 | ||
|
|
ffcad71bfa | ||
|
|
3ab48b31a1 | ||
|
|
00971fbe41 | ||
|
|
9c132fece5 | ||
|
|
ad46c5b567 | ||
|
|
c28c767b40 | ||
|
|
e1bb9570df | ||
|
|
09967ac3d0 | ||
|
|
13089d7ec6 | ||
|
|
c24f22cd14 | ||
|
|
8fc5d227a4 | ||
|
|
01bcbf3b0d | ||
|
|
592642fbfc | ||
|
|
35886e38e5 | ||
|
|
8ed8b4d2ec | ||
|
|
b4d8b1be3f | ||
|
|
d459cd517e | ||
|
|
69e6910c9c | ||
|
|
f08b1d78ec | ||
|
|
1f2205d75c | ||
|
|
53fcd7cc92 | ||
|
|
88ff44f2e8 | ||
|
|
b96f62f4c9 | ||
|
|
b1b2e812b1 | ||
|
|
00b1964940 | ||
|
|
a6f83c283c | ||
|
|
97cda3f410 | ||
|
|
7cbcca2881 | ||
|
|
10792ee0ad | ||
|
|
c61f12dd22 | ||
|
|
1cdfbe2d5f | ||
|
|
fa0261e3ad | ||
|
|
5931af810e | ||
|
|
8b3d315e40 | ||
|
|
10b6bc2508 | ||
|
|
4270f89956 | ||
|
|
0a70627f00 | ||
|
|
5d1c56829a | ||
|
|
0671be215f | ||
|
|
3374514f82 | ||
|
|
4e5b11a0a7 | ||
|
|
d81a4ec7ec | ||
|
|
980ce5fbf2 | ||
|
|
1dbca5d9a0 | ||
|
|
e1919b4121 | ||
|
|
c0dd7e8367 | ||
|
|
b7244af093 | ||
|
|
ca01a8b9cb | ||
|
|
9114ca973c | ||
|
|
e506efa9bf | ||
|
|
f0239c0a89 | ||
|
|
b710945949 | ||
|
|
59738f88c2 | ||
|
|
2f5abe2b5a | ||
|
|
44a7614a74 | ||
|
|
9369b72475 | ||
|
|
971a91ced7 | ||
|
|
6d81ad1e0b | ||
|
|
70b1e0eec0 | ||
|
|
ffe503d77c | ||
|
|
5a25751521 | ||
|
|
aaf432fcd2 | ||
|
|
e1a6d9a485 | ||
|
|
37db1dcd48 | ||
|
|
17a7495332 | ||
|
|
6b29616c95 | ||
|
|
868e3f75b2 | ||
|
|
da4bad3a55 | ||
|
|
630d0add19 | ||
|
|
0a89d1a479 | ||
|
|
992125bec2 | ||
|
|
74c4dbd237 | ||
|
|
c252b5db16 | ||
|
|
f5e8048fcb | ||
|
|
88b5f069fb | ||
|
|
fef567bb49 | ||
|
|
5a955e208c | ||
|
|
0963401a8d | ||
|
|
22b7042b9e | ||
|
|
7c1132ed88 | ||
|
|
f366b97899 | ||
|
|
aa3da35e8e | ||
|
|
b13498a5dd | ||
|
|
b02baea9d2 | ||
|
|
d6a2a0b04a | ||
|
|
58db66ef44 | ||
|
|
6f0f9d631e | ||
|
|
5704b50fb1 | ||
|
|
871f98bc4d | ||
|
|
69bb0a0597 | ||
|
|
cfe0932c0a | ||
|
|
7da60995cc | ||
|
|
ee422dea6e | ||
|
|
f8c436fe7f | ||
|
|
b5d4b17f60 | ||
|
|
3e68f7fde4 | ||
|
|
e768eb0a34 | ||
|
|
667396c44b | ||
|
|
c64b26110c | ||
|
|
8c7096f7a6 | ||
|
|
27d1c689cf | ||
|
|
4ab4e87266 | ||
|
|
4f98157e64 | ||
|
|
9b031d747f | ||
|
|
aea36f0eff | ||
|
|
cae712e740 | ||
|
|
bce9a9a6f4 | ||
|
|
c50cb90d6f | ||
|
|
a0269aba77 | ||
|
|
88b485f5cc | ||
|
|
28536498c9 | ||
|
|
cc2ebb96a6 | ||
|
|
d400bdea76 | ||
|
|
71f2cbe798 | ||
|
|
6659aea13b | ||
|
|
386cfacb25 | ||
|
|
e5c3273486 | ||
|
|
556b0eb4f1 | ||
|
|
93f8ccaaee | ||
|
|
29e559d60c | ||
|
|
9a22ef2fd5 | ||
|
|
66e0898425 | ||
|
|
cf4539ec79 | ||
|
|
8bce896395 | ||
|
|
ea66a54cf8 | ||
|
|
225f0c4d12 | ||
|
|
daf09fa532 | ||
|
|
8742c18107 | ||
|
|
66d0cdfd91 | ||
|
|
e17f307189 | ||
|
|
3d3ac2c470 | ||
|
|
0919f10037 | ||
|
|
2442c49048 | ||
|
|
4c29e1ff07 | ||
|
|
b6e680ea3d | ||
|
|
dfd11c3d3b | ||
|
|
28b80455f9 | ||
|
|
13b7be12bd | ||
|
|
e2d6d4bcb2 | ||
|
|
1ec91a8738 | ||
|
|
11e095b56a | ||
|
|
45708d2680 | ||
|
|
27a413a5e3 | ||
|
|
a47a7fb6a9 | ||
|
|
4f63423d56 | ||
|
|
a8741dc310 | ||
|
|
a864168c27 | ||
|
|
6b48a6e690 | ||
|
|
f45d58f01a | ||
|
|
8edcaec1bf | ||
|
|
eb820ab800 | ||
|
|
08c834ced0 | ||
|
|
52aed4849a | ||
|
|
f14ef40a13 | ||
|
|
1d3e9b22b0 | ||
|
|
1301c41cea | ||
|
|
1dd2bbe2ba | ||
|
|
4885ace107 | ||
|
|
691de6b4b3 | ||
|
|
422d57e8a2 | ||
|
|
aa42e206b3 | ||
|
|
4a65315f3b | ||
|
|
f4f51c198c | ||
|
|
f7d2b5300c | ||
|
|
2f82374926 | ||
|
|
af461f8165 | ||
|
|
f6824e3eaa | ||
|
|
5bd7eaa173 | ||
|
|
39d45bcbc1 | ||
|
|
d0152f9eb4 | ||
|
|
a3c7dc3321 | ||
|
|
66e2028313 | ||
|
|
52a3013d73 | ||
|
|
17872260e6 | ||
|
|
9a6b9e3124 | ||
|
|
93c7b54caa | ||
|
|
4d9659adc4 | ||
|
|
3af37ddf6d | ||
|
|
df16ef209c | ||
|
|
1e96663e20 | ||
|
|
de3702bedc | ||
|
|
d04800c329 | ||
|
|
e42b6e6905 | ||
|
|
0c94bdc8e4 | ||
|
|
027fe1b4b5 | ||
|
|
990bdde5e8 | ||
|
|
af6548c745 | ||
|
|
6f467281e0 | ||
|
|
be4c3cfbd2 | ||
|
|
0ad2aeb2e9 | ||
|
|
f2b3f3a9ab | ||
|
|
e1af35aa15 | ||
|
|
cb15753694 | ||
|
|
5914ccdc51 | ||
|
|
8be73bf187 | ||
|
|
35fbe1ef3d | ||
|
|
517e519bdc | ||
|
|
ff43b6875b | ||
|
|
4c8b5ea4f7 | ||
|
|
f29b33ec85 | ||
|
|
e5bc0486b5 | ||
|
|
b6e54ae2f1 | ||
|
|
9c3482083b | ||
|
|
c28a4204ee | ||
|
|
4892286465 | ||
|
|
419780d702 | ||
|
|
7bf4fd6c46 | ||
|
|
2c950cf7f5 | ||
|
|
87b0f62041 | ||
|
|
9d6c0e57a0 | ||
|
|
399e2c1ed3 | ||
|
|
7adf9cb1a0 | ||
|
|
e23e03592b | ||
|
|
4ab372d6b5 | ||
|
|
d2828e8722 | ||
|
|
d1b8fedc9c | ||
|
|
429dbf7129 | ||
|
|
9e4555797d | ||
|
|
48dba9a9d9 | ||
|
|
51f07e3382 | ||
|
|
5e210c083f | ||
|
|
5e449c84fe | ||
|
|
41de83fe1f | ||
|
|
e721dac367 | ||
|
|
1bc54c2c20 | ||
|
|
e662e819fe | ||
|
|
b62812c49e | ||
|
|
154cffb9d5 | ||
|
|
a6c0388ce9 | ||
|
|
0434b4b9ae | ||
|
|
53f4ad8ad4 | ||
|
|
303cce0cbc | ||
|
|
19383036d5 | ||
|
|
ff72c6358e | ||
|
|
508c08bb86 | ||
|
|
e970690cfa | ||
|
|
e584586cb0 | ||
|
|
73c7f8aa8f | ||
|
|
ade3e45a36 | ||
|
|
974b9eec85 | ||
|
|
943d46c465 | ||
|
|
bd21334013 | ||
|
|
ee0d2a8d94 | ||
|
|
4cef772364 | ||
|
|
a62ce45126 | ||
|
|
b9e0aae49f | ||
|
|
31fa414422 | ||
|
|
706f7be5e7 | ||
|
|
baac01cea4 | ||
|
|
f8dddf0a5c | ||
|
|
a03b7624f1 | ||
|
|
8603a908c1 | ||
|
|
e5943975f9 | ||
|
|
8442e2b9d8 |
31
.github/ISSUE_TEMPLATE/1_bug_report.yml
vendored
@@ -5,21 +5,44 @@ type: "Bug"
|
|||||||
body:
|
body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Describe the bug / provide steps to reproduce it
|
label: Summary
|
||||||
description: A one line summary, and detailed reproduction steps
|
description: Describe the bug with a one line summary, and provide detailed reproduction steps
|
||||||
value: |
|
value: |
|
||||||
Summary:
|
<!-- Please insert a one line summary of the issue below -->
|
||||||
|
|
||||||
|
SUMMARY_SENTENCE_HERE
|
||||||
|
|
||||||
|
<!-- Be verbose: Include all steps necessary to reproduce from a clean Zed installation. -->
|
||||||
|
<!-- Code snippets are better than images, a repository link that reproduces the issue is ideal. -->
|
||||||
|
|
||||||
<!-- Include all steps necessary to reproduce from a clean Zed installation. Be verbose -->
|
|
||||||
Steps to trigger the problem:
|
Steps to trigger the problem:
|
||||||
1.
|
1.
|
||||||
2.
|
2.
|
||||||
3.
|
3.
|
||||||
|
4.
|
||||||
|
|
||||||
Actual Behavior:
|
Actual Behavior:
|
||||||
|
|
||||||
Expected Behavior:
|
Expected Behavior:
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Is there anything additional necessary to reproduce this issue?
|
||||||
|
- settings.json, keymap.json, .editorconfig etc?
|
||||||
|
- Does it happen intermittently or only with specific projects / file types?
|
||||||
|
- Have you found a workaround?
|
||||||
|
|
||||||
|
Did you check your Zed.log to see if there is any relevant details there?
|
||||||
|
- When including large items (videos, screenshots, logs, configs) please wrap with:
|
||||||
|
|
||||||
|
<details><summary>See inside for XXXXYYY</summary>
|
||||||
|
|
||||||
|
```shell
|
||||||
|
code
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
-->
|
||||||
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
|||||||
6
.github/ISSUE_TEMPLATE/2_crash_report.yml
vendored
@@ -4,10 +4,10 @@ type: "Crash"
|
|||||||
body:
|
body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Describe the bug / provide steps to reproduce it
|
label: Summary
|
||||||
description: A one line summary, and detailed reproduction steps
|
description: Describe the bug with a one line summary, and provide detailed reproduction steps
|
||||||
value: |
|
value: |
|
||||||
Summary:
|
<!-- Please insert a one line summary of the issue below -->
|
||||||
|
|
||||||
<!-- Include all steps necessary to reproduce from a clean Zed installation. Be verbose -->
|
<!-- Include all steps necessary to reproduce from a clean Zed installation. Be verbose -->
|
||||||
Steps to trigger the problem:
|
Steps to trigger the problem:
|
||||||
|
|||||||
2
.github/actions/run_tests/action.yml
vendored
@@ -10,7 +10,7 @@ runs:
|
|||||||
cargo install cargo-nextest --locked
|
cargo install cargo-nextest --locked
|
||||||
|
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version: "18"
|
||||||
|
|
||||||
|
|||||||
26
.github/actions/run_tests_windows/action.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: "Run tests on Windows"
|
||||||
|
description: "Runs the tests on Windows"
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
working-directory:
|
||||||
|
description: "The working directory"
|
||||||
|
required: true
|
||||||
|
default: "."
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Install Rust
|
||||||
|
shell: pwsh
|
||||||
|
working-directory: ${{ inputs.working-directory }}
|
||||||
|
run: cargo install cargo-nextest --locked
|
||||||
|
|
||||||
|
- name: Install Node
|
||||||
|
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
||||||
|
with:
|
||||||
|
node-version: "18"
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
shell: pwsh
|
||||||
|
working-directory: ${{ inputs.working-directory }}
|
||||||
|
run: cargo nextest run --workspace --no-fail-fast
|
||||||
63
.github/workflows/ci.yml
vendored
@@ -109,8 +109,16 @@ jobs:
|
|||||||
- name: cargo clippy
|
- name: cargo clippy
|
||||||
run: ./script/clippy
|
run: ./script/clippy
|
||||||
|
|
||||||
|
- name: Install cargo-machete
|
||||||
|
uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386 # v2
|
||||||
|
with:
|
||||||
|
command: install
|
||||||
|
args: cargo-machete@0.7.0
|
||||||
|
|
||||||
- name: Check unused dependencies
|
- name: Check unused dependencies
|
||||||
uses: bnjbvr/cargo-machete@main
|
uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386 # v2
|
||||||
|
with:
|
||||||
|
command: machete
|
||||||
|
|
||||||
- name: Check licenses
|
- name: Check licenses
|
||||||
run: |
|
run: |
|
||||||
@@ -135,6 +143,7 @@ jobs:
|
|||||||
cargo check -p gpui --features "macos-blade"
|
cargo check -p gpui --features "macos-blade"
|
||||||
cargo check -p workspace
|
cargo check -p workspace
|
||||||
cargo build -p remote_server
|
cargo build -p remote_server
|
||||||
|
cargo check -p gpui --examples
|
||||||
script/check-rust-livekit-macos
|
script/check-rust-livekit-macos
|
||||||
|
|
||||||
# Since the macOS runners are stateful, so we need to remove the config file to prevent potential bug.
|
# Since the macOS runners are stateful, so we need to remove the config file to prevent potential bug.
|
||||||
@@ -181,6 +190,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cargo build -p zed
|
cargo build -p zed
|
||||||
cargo check -p workspace
|
cargo check -p workspace
|
||||||
|
cargo check -p gpui --examples
|
||||||
|
|
||||||
# Even the Linux runner is not stateful, in theory there is no need to do this cleanup.
|
# Even the Linux runner is not stateful, in theory there is no need to do this cleanup.
|
||||||
# But, to avoid potential issues in the future if we choose to use a stateful Linux runner and forget to add code
|
# But, to avoid potential issues in the future if we choose to use a stateful Linux runner and forget to add code
|
||||||
@@ -226,43 +236,63 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
run: rm -rf ./../.cargo
|
run: rm -rf ./../.cargo
|
||||||
|
|
||||||
# todo(windows): Actually run the tests
|
|
||||||
windows_tests:
|
windows_tests:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
name: (Windows) Run Clippy and tests
|
name: (Windows) Run Clippy and tests
|
||||||
if: github.repository_owner == 'zed-industries'
|
if: github.repository_owner == 'zed-industries'
|
||||||
runs-on: hosted-windows-1
|
runs-on: hosted-windows-2
|
||||||
steps:
|
steps:
|
||||||
# more info here:- https://github.com/rust-lang/cargo/issues/13020
|
# more info here:- https://github.com/rust-lang/cargo/issues/13020
|
||||||
- name: Enable longer pathnames for git
|
- name: Enable longer pathnames for git
|
||||||
run: git config --system core.longpaths true
|
run: git config --system core.longpaths true
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||||
with:
|
with:
|
||||||
clean: false
|
clean: false
|
||||||
|
|
||||||
|
- name: Create Dev Drive using ReFS
|
||||||
|
run: ./script/setup-dev-driver.ps1
|
||||||
|
|
||||||
|
# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
|
||||||
|
- name: Copy Git Repo to Dev Drive
|
||||||
|
run: |
|
||||||
|
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.ZED_WORKSPACE }}" -Recurse
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
|
uses: swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
workspaces: ${{ env.ZED_WORKSPACE }}
|
||||||
cache-provider: "github"
|
cache-provider: "github"
|
||||||
|
|
||||||
- name: Configure CI
|
- name: Configure CI
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ./../.cargo
|
mkdir -p ${{ env.CARGO_HOME }} -ErrorAction Ignore
|
||||||
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
|
cp ./.cargo/ci-config.toml ${{ env.CARGO_HOME }}/config.toml
|
||||||
|
|
||||||
- name: cargo clippy
|
- name: cargo clippy
|
||||||
# Windows can't run shell scripts, so we need to use `cargo xtask`.
|
working-directory: ${{ env.ZED_WORKSPACE }}
|
||||||
run: cargo xtask clippy
|
run: ./script/clippy.ps1
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
uses: ./.github/actions/run_tests_windows
|
||||||
|
with:
|
||||||
|
working-directory: ${{ env.ZED_WORKSPACE }}
|
||||||
|
|
||||||
- name: Build Zed
|
- name: Build Zed
|
||||||
|
working-directory: ${{ env.ZED_WORKSPACE }}
|
||||||
run: cargo build
|
run: cargo build
|
||||||
|
|
||||||
|
- name: Check dev drive space
|
||||||
|
working-directory: ${{ env.ZED_WORKSPACE }}
|
||||||
|
# `setup-dev-driver.ps1` creates a 100GB drive, with CI taking up ~45GB of the drive.
|
||||||
|
run: ./script/exit-ci-if-dev-drive-is-full.ps1 95
|
||||||
|
|
||||||
# Since the Windows runners are stateful, so we need to remove the config file to prevent potential bug.
|
# Since the Windows runners are stateful, so we need to remove the config file to prevent potential bug.
|
||||||
- name: Clean CI config file
|
- name: Clean CI config file
|
||||||
if: always()
|
if: always()
|
||||||
run: Remove-Item -Path "./../.cargo" -Recurse -Force
|
run: Remove-Item -Path "${{ env.CARGO_HOME }}/config.toml" -Force
|
||||||
|
|
||||||
bundle-mac:
|
bundle-mac:
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
@@ -275,15 +305,16 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||||
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
|
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
|
||||||
APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
|
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
|
||||||
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
|
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
|
||||||
|
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
|
||||||
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
|
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
|
||||||
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
|
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
|
||||||
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
|
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
|
||||||
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
|
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version: "18"
|
||||||
|
|
||||||
@@ -327,14 +358,14 @@ jobs:
|
|||||||
mv target/x86_64-apple-darwin/release/Zed.dmg target/x86_64-apple-darwin/release/Zed-x86_64.dmg
|
mv target/x86_64-apple-darwin/release/Zed.dmg target/x86_64-apple-darwin/release/Zed-x86_64.dmg
|
||||||
|
|
||||||
- name: Upload app bundle (aarch64) to workflow run if main branch or specific label
|
- name: Upload app bundle (aarch64) to workflow run if main branch or specific label
|
||||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
|
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
||||||
with:
|
with:
|
||||||
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg
|
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg
|
||||||
path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
|
path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
|
||||||
|
|
||||||
- name: Upload app bundle (x86_64) to workflow run if main branch or specific label
|
- name: Upload app bundle (x86_64) to workflow run if main branch or specific label
|
||||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
|
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
||||||
with:
|
with:
|
||||||
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.dmg
|
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.dmg
|
||||||
@@ -385,7 +416,7 @@ jobs:
|
|||||||
run: script/bundle-linux
|
run: script/bundle-linux
|
||||||
|
|
||||||
- name: Upload Linux bundle to workflow run if main branch or specific label
|
- name: Upload Linux bundle to workflow run if main branch or specific label
|
||||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
|
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
||||||
with:
|
with:
|
||||||
name: zed-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
|
name: zed-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
|
||||||
@@ -433,7 +464,7 @@ jobs:
|
|||||||
run: script/bundle-linux
|
run: script/bundle-linux
|
||||||
|
|
||||||
- name: Upload Linux bundle to workflow run if main branch or specific label
|
- name: Upload Linux bundle to workflow run if main branch or specific label
|
||||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
|
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
|
||||||
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
||||||
with:
|
with:
|
||||||
name: zed-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
|
name: zed-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
|
||||||
@@ -459,6 +490,6 @@ jobs:
|
|||||||
- bundle
|
- bundle
|
||||||
steps:
|
steps:
|
||||||
- name: gh release
|
- name: gh release
|
||||||
run: gh release edit $GITHUB_REF_NAME --draft=false
|
run: gh release edit $GITHUB_REF_NAME --draft=true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -29,8 +29,7 @@ jobs:
|
|||||||
maxLength: 2000
|
maxLength: 2000
|
||||||
truncationSymbol: "..."
|
truncationSymbol: "..."
|
||||||
- name: Discord Webhook Action
|
- name: Discord Webhook Action
|
||||||
uses: tsickert/discord-webhook@86dc739f3f165f16dadc5666051c367efa1692f4 # v6.0.0
|
uses: tsickert/discord-webhook@c840d45a03a323fbc3f7507ac7769dbd91bfb164 # v5.3.0
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
content: ${{ steps.get-content.outputs.string }}
|
content: ${{ steps.get-content.outputs.string }}
|
||||||
flags: 4 # suppress embeds - https://discord.com/developers/docs/resources/message#message-object-message-flags
|
|
||||||
|
|||||||
25
.github/workflows/community_update_all_top_ranking_issues.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Update All Top Ranking Issues
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 */12 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_top_ranking_issues:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.repository == 'zed-industries/zed'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||||
|
- name: Set up uv
|
||||||
|
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
|
||||||
|
with:
|
||||||
|
version: "latest"
|
||||||
|
enable-cache: true
|
||||||
|
cache-dependency-glob: "script/update_top_ranking_issues/pyproject.toml"
|
||||||
|
- name: Install Python 3.13
|
||||||
|
run: uv python install 3.13
|
||||||
|
- name: Install dependencies
|
||||||
|
run: uv sync --project script/update_top_ranking_issues -p 3.13
|
||||||
|
- name: Run script
|
||||||
|
run: uv run --project script/update_top_ranking_issues script/update_top_ranking_issues/main.py --github-token ${{ secrets.GITHUB_TOKEN }} --issue-reference-number 5393
|
||||||
25
.github/workflows/community_update_weekly_top_ranking_issues.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Update Weekly Top Ranking Issues
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 15 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_top_ranking_issues:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.repository == 'zed-industries/zed'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||||
|
- name: Set up uv
|
||||||
|
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
|
||||||
|
with:
|
||||||
|
version: "latest"
|
||||||
|
enable-cache: true
|
||||||
|
cache-dependency-glob: "script/update_top_ranking_issues/pyproject.toml"
|
||||||
|
- name: Install Python 3.13
|
||||||
|
run: uv python install 3.13
|
||||||
|
- name: Install dependencies
|
||||||
|
run: uv sync --project script/update_top_ranking_issues -p 3.13
|
||||||
|
- name: Run script
|
||||||
|
run: uv run --project script/update_top_ranking_issues script/update_top_ranking_issues/main.py --github-token ${{ secrets.GITHUB_TOKEN }} --issue-reference-number 6952 --query-day-interval 7
|
||||||
2
.github/workflows/danger.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
version: 9
|
version: 9
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|||||||
15
.github/workflows/deploy_cloudflare.yml
vendored
@@ -37,29 +37,36 @@ jobs:
|
|||||||
mdbook build ./docs --dest-dir=../target/deploy/docs/
|
mdbook build ./docs --dest-dir=../target/deploy/docs/
|
||||||
|
|
||||||
- name: Deploy Docs
|
- name: Deploy Docs
|
||||||
uses: cloudflare/wrangler-action@7a5f8bbdfeedcde38e6777a50fe685f89259d4ca # v3
|
uses: cloudflare/wrangler-action@392082e81ffbcb9ebdde27400634aa004b35ea37 # v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: pages deploy target/deploy --project-name=docs
|
command: pages deploy target/deploy --project-name=docs
|
||||||
|
|
||||||
- name: Deploy Install
|
- name: Deploy Install
|
||||||
uses: cloudflare/wrangler-action@7a5f8bbdfeedcde38e6777a50fe685f89259d4ca # v3
|
uses: cloudflare/wrangler-action@392082e81ffbcb9ebdde27400634aa004b35ea37 # v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: r2 object put -f script/install.sh zed-open-source-website-assets/install.sh
|
command: r2 object put -f script/install.sh zed-open-source-website-assets/install.sh
|
||||||
|
|
||||||
- name: Deploy Docs Workers
|
- name: Deploy Docs Workers
|
||||||
uses: cloudflare/wrangler-action@7a5f8bbdfeedcde38e6777a50fe685f89259d4ca # v3
|
uses: cloudflare/wrangler-action@392082e81ffbcb9ebdde27400634aa004b35ea37 # v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: deploy .cloudflare/docs-proxy/src/worker.js
|
command: deploy .cloudflare/docs-proxy/src/worker.js
|
||||||
|
|
||||||
- name: Deploy Install Workers
|
- name: Deploy Install Workers
|
||||||
uses: cloudflare/wrangler-action@7a5f8bbdfeedcde38e6777a50fe685f89259d4ca # v3
|
uses: cloudflare/wrangler-action@392082e81ffbcb9ebdde27400634aa004b35ea37 # v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: deploy .cloudflare/docs-proxy/src/worker.js
|
command: deploy .cloudflare/docs-proxy/src/worker.js
|
||||||
|
|
||||||
|
- name: Preserve Wrangler logs
|
||||||
|
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: wrangler_logs
|
||||||
|
path: /home/runner/.config/.wrangler/logs/
|
||||||
|
|||||||
6
.github/workflows/docs.yml
vendored
@@ -24,11 +24,13 @@ jobs:
|
|||||||
- name: Prettier Check on /docs
|
- name: Prettier Check on /docs
|
||||||
working-directory: ./docs
|
working-directory: ./docs
|
||||||
run: |
|
run: |
|
||||||
pnpm dlx prettier . --check || {
|
pnpm dlx prettier@${PRETTIER_VERSION} . --check || {
|
||||||
echo "To fix, run from the root of the zed repo:"
|
echo "To fix, run from the root of the zed repo:"
|
||||||
echo " cd docs && pnpm dlx prettier . --write && cd .."
|
echo " cd docs && pnpm dlx prettier@${PRETTIER_VERSION} . --write && cd .."
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
env:
|
||||||
|
PRETTIER_VERSION: 3.5.0
|
||||||
|
|
||||||
- name: Check for Typos with Typos-CLI
|
- name: Check for Typos with Typos-CLI
|
||||||
uses: crate-ci/typos@8e6a4285bcbde632c5d79900a7779746e8b7ea3f # v1.24.6
|
uses: crate-ci/typos@8e6a4285bcbde632c5d79900a7779746e8b7ea3f # v1.24.6
|
||||||
|
|||||||
33
.github/workflows/issue_response.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: Issue Response
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 12 * * 2"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
issue-response:
|
||||||
|
if: github.repository_owner == 'zed-industries'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
cache: "pnpm"
|
||||||
|
cache-dependency-path: "script/issue_response/pnpm-lock.yaml"
|
||||||
|
|
||||||
|
- run: pnpm install --dir script/issue_response
|
||||||
|
|
||||||
|
- name: Run Issue Response
|
||||||
|
run: pnpm run --dir script/issue_response start
|
||||||
|
env:
|
||||||
|
ISSUE_RESPONSE_GITHUB_TOKEN: ${{ secrets.ISSUE_RESPONSE_GITHUB_TOKEN }}
|
||||||
|
SLACK_ISSUE_RESPONSE_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_RESPONSE_WEBHOOK_URL }}
|
||||||
2
.github/workflows/randomized_tests.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
- buildjet-16vcpu-ubuntu-2204
|
- buildjet-16vcpu-ubuntu-2204
|
||||||
steps:
|
steps:
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version: "18"
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/release_nightly.yml
vendored
@@ -62,15 +62,16 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||||
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
|
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
|
||||||
APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
|
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
|
||||||
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
|
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
|
||||||
|
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
|
||||||
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
|
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
|
||||||
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
|
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
|
||||||
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
|
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
|
||||||
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
|
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version: "18"
|
||||||
|
|
||||||
|
|||||||
47
.gitignore
vendored
@@ -1,35 +1,36 @@
|
|||||||
/.direnv
|
**/*.db
|
||||||
.envrc
|
|
||||||
.idea
|
|
||||||
**/target
|
|
||||||
**/cargo-target
|
**/cargo-target
|
||||||
/zed.xcworkspace
|
**/target
|
||||||
.DS_Store
|
|
||||||
/plugins/bin
|
|
||||||
/script/node_modules
|
|
||||||
/crates/theme/schemas/theme.json
|
|
||||||
/crates/collab/seed.json
|
|
||||||
/crates/zed/resources/flatpak/flatpak-cargo-sources.json
|
|
||||||
/dev.zed.Zed*.json
|
|
||||||
/assets/*licenses.*
|
|
||||||
**/venv
|
**/venv
|
||||||
.build
|
|
||||||
*.wasm
|
*.wasm
|
||||||
Packages
|
|
||||||
*.xcodeproj
|
*.xcodeproj
|
||||||
xcuserdata/
|
.DS_Store
|
||||||
DerivedData/
|
.blob_store
|
||||||
|
.build
|
||||||
|
.envrc
|
||||||
|
.flatpak-builder
|
||||||
|
.idea
|
||||||
|
.netrc
|
||||||
|
.pytest_cache
|
||||||
|
.swiftpm
|
||||||
.swiftpm/config/registries.json
|
.swiftpm/config/registries.json
|
||||||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
|
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
|
||||||
.netrc
|
|
||||||
.swiftpm
|
|
||||||
**/*.db
|
|
||||||
.pytest_cache
|
|
||||||
.venv
|
.venv
|
||||||
.blob_store
|
|
||||||
.vscode
|
.vscode
|
||||||
.wrangler
|
.wrangler
|
||||||
.flatpak-builder
|
/.direnv
|
||||||
|
/assets/*licenses.*
|
||||||
|
/crates/collab/seed.json
|
||||||
|
/crates/theme/schemas/theme.json
|
||||||
|
/crates/zed/resources/flatpak/flatpak-cargo-sources.json
|
||||||
|
/dev.zed.Zed*.json
|
||||||
|
/plugins/bin
|
||||||
|
/script/node_modules
|
||||||
|
/snap
|
||||||
|
/zed.xcworkspace
|
||||||
|
DerivedData/
|
||||||
|
Packages
|
||||||
|
xcuserdata/
|
||||||
|
|
||||||
# Don't commit any secrets to the repo.
|
# Don't commit any secrets to the repo.
|
||||||
.env.secret.toml
|
.env.secret.toml
|
||||||
|
|||||||
4
.mailmap
@@ -21,6 +21,8 @@ Andrei Zvonimir Crnković <andrei@0x7f.dev>
|
|||||||
Andrei Zvonimir Crnković <andrei@0x7f.dev> <andreicek@0x7f.dev>
|
Andrei Zvonimir Crnković <andrei@0x7f.dev> <andreicek@0x7f.dev>
|
||||||
Antonio Scandurra <me@as-cii.com>
|
Antonio Scandurra <me@as-cii.com>
|
||||||
Antonio Scandurra <me@as-cii.com> <antonio@zed.dev>
|
Antonio Scandurra <me@as-cii.com> <antonio@zed.dev>
|
||||||
|
Ben Kunkle <ben@zed.dev>
|
||||||
|
Ben Kunkle <ben@zed.dev> <ben.kunkle@gmail.com>
|
||||||
Bennet Bo Fenner <bennet@zed.dev>
|
Bennet Bo Fenner <bennet@zed.dev>
|
||||||
Bennet Bo Fenner <bennet@zed.dev> <53836821+bennetbo@users.noreply.github.com>
|
Bennet Bo Fenner <bennet@zed.dev> <53836821+bennetbo@users.noreply.github.com>
|
||||||
Bennet Bo Fenner <bennet@zed.dev> <bennetbo@gmx.de>
|
Bennet Bo Fenner <bennet@zed.dev> <bennetbo@gmx.de>
|
||||||
@@ -112,6 +114,8 @@ Sebastijan Kelnerič <sebastijan.kelneric@sebba.dev> <sebastijan.kelneric@vichav
|
|||||||
Sergey Onufrienko <sergey@onufrienko.com>
|
Sergey Onufrienko <sergey@onufrienko.com>
|
||||||
Shish <webmaster@shishnet.org>
|
Shish <webmaster@shishnet.org>
|
||||||
Shish <webmaster@shishnet.org> <shish@shishnet.org>
|
Shish <webmaster@shishnet.org> <shish@shishnet.org>
|
||||||
|
Smit Barmase <0xtimsb@gmail.com>
|
||||||
|
Smit Barmase <0xtimsb@gmail.com> <smit@zed.dev>
|
||||||
Thorben Kröger <dev@thorben.net>
|
Thorben Kröger <dev@thorben.net>
|
||||||
Thorben Kröger <dev@thorben.net> <thorben.kroeger@hexagon.com>
|
Thorben Kröger <dev@thorben.net> <thorben.kroeger@hexagon.com>
|
||||||
Thorsten Ball <thorsten@zed.dev>
|
Thorsten Ball <thorsten@zed.dev>
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
},
|
},
|
||||||
"JSON": {
|
"JSON": {
|
||||||
"tab_size": 2,
|
"tab_size": 2,
|
||||||
"preferred_line_length": 100,
|
"preferred_line_length": 120,
|
||||||
"formatter": "prettier"
|
"formatter": "prettier"
|
||||||
},
|
},
|
||||||
"JSONC": {
|
"JSONC": {
|
||||||
"tab_size": 2,
|
"tab_size": 2,
|
||||||
"preferred_line_length": 100,
|
"preferred_line_length": 120,
|
||||||
"formatter": "prettier"
|
"formatter": "prettier"
|
||||||
},
|
},
|
||||||
"JavaScript": {
|
"JavaScript": {
|
||||||
|
|||||||
@@ -37,6 +37,16 @@ We plan to set aside time each week to pair program with contributors on promisi
|
|||||||
- Pair with us and watch us code to learn the codebase
|
- Pair with us and watch us code to learn the codebase
|
||||||
- Low effort PRs, such as those that just re-arrange syntax, won't be merged without a compelling justification
|
- Low effort PRs, such as those that just re-arrange syntax, won't be merged without a compelling justification
|
||||||
|
|
||||||
|
## File icons
|
||||||
|
|
||||||
|
Zed's default icon theme consists of icons that are hand-designed to fit together in a cohesive manner.
|
||||||
|
|
||||||
|
We do not accept PRs for file icons that are just an off-the-shelf SVG taken from somewhere else.
|
||||||
|
|
||||||
|
### Adding new icons to the Zed icon theme
|
||||||
|
|
||||||
|
If you would like to add a new icon to the Zed icon theme, [open a Discussion](https://github.com/zed-industries/zed/discussions/new?category=ux-and-design) and we can work with you on getting an icon designed and added to Zed.
|
||||||
|
|
||||||
## Bird's-eye view of Zed
|
## Bird's-eye view of Zed
|
||||||
|
|
||||||
Zed is made up of several smaller crates - let's go over those you're most likely to interact with:
|
Zed is made up of several smaller crates - let's go over those you're most likely to interact with:
|
||||||
@@ -52,3 +62,9 @@ Zed is made up of several smaller crates - let's go over those you're most likel
|
|||||||
- [`rpc`](/crates/rpc) defines messages to be exchanged with collaboration server.
|
- [`rpc`](/crates/rpc) defines messages to be exchanged with collaboration server.
|
||||||
- [`theme`](/crates/theme) defines the theme system and provides a default theme.
|
- [`theme`](/crates/theme) defines the theme system and provides a default theme.
|
||||||
- [`ui`](/crates/ui) is a collection of UI components and common patterns used throughout Zed.
|
- [`ui`](/crates/ui) is a collection of UI components and common patterns used throughout Zed.
|
||||||
|
- [`cli`](/crates/cli) is the CLI crate which invokes the Zed binary.
|
||||||
|
- [`zed`](/crates/zed) is where all things come together, and the `main` entry point for Zed.
|
||||||
|
|
||||||
|
## Packaging Zed
|
||||||
|
|
||||||
|
Check our [notes for packaging Zed](https://zed.dev/docs/development/linux#notes-for-packaging-zed).
|
||||||
|
|||||||
1969
Cargo.lock
generated
107
Cargo.toml
@@ -2,7 +2,6 @@
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"crates/activity_indicator",
|
"crates/activity_indicator",
|
||||||
"crates/zed_predict_tos",
|
|
||||||
"crates/anthropic",
|
"crates/anthropic",
|
||||||
"crates/assets",
|
"crates/assets",
|
||||||
"crates/assistant",
|
"crates/assistant",
|
||||||
@@ -16,7 +15,10 @@ members = [
|
|||||||
"crates/audio",
|
"crates/audio",
|
||||||
"crates/auto_update",
|
"crates/auto_update",
|
||||||
"crates/auto_update_ui",
|
"crates/auto_update_ui",
|
||||||
|
"crates/aws_http_client",
|
||||||
|
"crates/bedrock",
|
||||||
"crates/breadcrumbs",
|
"crates/breadcrumbs",
|
||||||
|
"crates/buffer_diff",
|
||||||
"crates/call",
|
"crates/call",
|
||||||
"crates/channel",
|
"crates/channel",
|
||||||
"crates/cli",
|
"crates/cli",
|
||||||
@@ -27,12 +29,15 @@ members = [
|
|||||||
"crates/collections",
|
"crates/collections",
|
||||||
"crates/command_palette",
|
"crates/command_palette",
|
||||||
"crates/command_palette_hooks",
|
"crates/command_palette_hooks",
|
||||||
|
"crates/component",
|
||||||
|
"crates/component_preview",
|
||||||
"crates/context_server",
|
"crates/context_server",
|
||||||
"crates/context_server_settings",
|
"crates/context_server_settings",
|
||||||
"crates/copilot",
|
"crates/copilot",
|
||||||
|
"crates/credentials_provider",
|
||||||
"crates/db",
|
"crates/db",
|
||||||
"crates/diagnostics",
|
|
||||||
"crates/deepseek",
|
"crates/deepseek",
|
||||||
|
"crates/diagnostics",
|
||||||
"crates/docs_preprocessor",
|
"crates/docs_preprocessor",
|
||||||
"crates/editor",
|
"crates/editor",
|
||||||
"crates/evals",
|
"crates/evals",
|
||||||
@@ -45,16 +50,17 @@ members = [
|
|||||||
"crates/feedback",
|
"crates/feedback",
|
||||||
"crates/file_finder",
|
"crates/file_finder",
|
||||||
"crates/file_icons",
|
"crates/file_icons",
|
||||||
"crates/fireworks",
|
|
||||||
"crates/fs",
|
"crates/fs",
|
||||||
"crates/fsevent",
|
"crates/fsevent",
|
||||||
"crates/fuzzy",
|
"crates/fuzzy",
|
||||||
"crates/git",
|
"crates/git",
|
||||||
"crates/git_hosting_providers",
|
"crates/git_hosting_providers",
|
||||||
|
"crates/git_ui",
|
||||||
"crates/go_to_line",
|
"crates/go_to_line",
|
||||||
"crates/google_ai",
|
"crates/google_ai",
|
||||||
"crates/gpui",
|
"crates/gpui",
|
||||||
"crates/gpui_macros",
|
"crates/gpui_macros",
|
||||||
|
"crates/gpui_tokio",
|
||||||
"crates/html_to_markdown",
|
"crates/html_to_markdown",
|
||||||
"crates/http_client",
|
"crates/http_client",
|
||||||
"crates/image_viewer",
|
"crates/image_viewer",
|
||||||
@@ -71,15 +77,17 @@ members = [
|
|||||||
"crates/language_selector",
|
"crates/language_selector",
|
||||||
"crates/language_tools",
|
"crates/language_tools",
|
||||||
"crates/languages",
|
"crates/languages",
|
||||||
|
"crates/livekit_api",
|
||||||
"crates/livekit_client",
|
"crates/livekit_client",
|
||||||
"crates/livekit_client_macos",
|
"crates/livekit_client_macos",
|
||||||
"crates/livekit_server",
|
|
||||||
"crates/lmstudio",
|
"crates/lmstudio",
|
||||||
"crates/lsp",
|
"crates/lsp",
|
||||||
"crates/markdown",
|
"crates/markdown",
|
||||||
"crates/markdown_preview",
|
"crates/markdown_preview",
|
||||||
"crates/media",
|
"crates/media",
|
||||||
"crates/menu",
|
"crates/menu",
|
||||||
|
"crates/migrator",
|
||||||
|
"crates/mistral",
|
||||||
"crates/multi_buffer",
|
"crates/multi_buffer",
|
||||||
"crates/node_runtime",
|
"crates/node_runtime",
|
||||||
"crates/notifications",
|
"crates/notifications",
|
||||||
@@ -87,6 +95,7 @@ members = [
|
|||||||
"crates/open_ai",
|
"crates/open_ai",
|
||||||
"crates/outline",
|
"crates/outline",
|
||||||
"crates/outline_panel",
|
"crates/outline_panel",
|
||||||
|
"crates/panel",
|
||||||
"crates/paths",
|
"crates/paths",
|
||||||
"crates/picker",
|
"crates/picker",
|
||||||
"crates/prettier",
|
"crates/prettier",
|
||||||
@@ -106,6 +115,7 @@ members = [
|
|||||||
"crates/rich_text",
|
"crates/rich_text",
|
||||||
"crates/rope",
|
"crates/rope",
|
||||||
"crates/rpc",
|
"crates/rpc",
|
||||||
|
"crates/schema_generator",
|
||||||
"crates/search",
|
"crates/search",
|
||||||
"crates/semantic_index",
|
"crates/semantic_index",
|
||||||
"crates/semantic_version",
|
"crates/semantic_version",
|
||||||
@@ -141,9 +151,8 @@ members = [
|
|||||||
"crates/ui",
|
"crates/ui",
|
||||||
"crates/ui_input",
|
"crates/ui_input",
|
||||||
"crates/ui_macros",
|
"crates/ui_macros",
|
||||||
"crates/reqwest_client",
|
|
||||||
"crates/util",
|
"crates/util",
|
||||||
"crates/vcs_menu",
|
"crates/util_macros",
|
||||||
"crates/vim",
|
"crates/vim",
|
||||||
"crates/vim_mode_setting",
|
"crates/vim_mode_setting",
|
||||||
"crates/welcome",
|
"crates/welcome",
|
||||||
@@ -152,7 +161,6 @@ members = [
|
|||||||
"crates/zed",
|
"crates/zed",
|
||||||
"crates/zed_actions",
|
"crates/zed_actions",
|
||||||
"crates/zeta",
|
"crates/zeta",
|
||||||
"crates/git_ui",
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Extensions
|
# Extensions
|
||||||
@@ -167,9 +175,7 @@ members = [
|
|||||||
"extensions/haskell",
|
"extensions/haskell",
|
||||||
"extensions/html",
|
"extensions/html",
|
||||||
"extensions/lua",
|
"extensions/lua",
|
||||||
"extensions/php",
|
|
||||||
"extensions/perplexity",
|
"extensions/perplexity",
|
||||||
"extensions/prisma",
|
|
||||||
"extensions/proto",
|
"extensions/proto",
|
||||||
"extensions/purescript",
|
"extensions/purescript",
|
||||||
"extensions/ruff",
|
"extensions/ruff",
|
||||||
@@ -201,7 +207,6 @@ edition = "2021"
|
|||||||
|
|
||||||
activity_indicator = { path = "crates/activity_indicator" }
|
activity_indicator = { path = "crates/activity_indicator" }
|
||||||
ai = { path = "crates/ai" }
|
ai = { path = "crates/ai" }
|
||||||
zed_predict_tos = { path = "crates/zed_predict_tos" }
|
|
||||||
anthropic = { path = "crates/anthropic" }
|
anthropic = { path = "crates/anthropic" }
|
||||||
assets = { path = "crates/assets" }
|
assets = { path = "crates/assets" }
|
||||||
assistant = { path = "crates/assistant" }
|
assistant = { path = "crates/assistant" }
|
||||||
@@ -215,6 +220,8 @@ assistant_tools = { path = "crates/assistant_tools" }
|
|||||||
audio = { path = "crates/audio" }
|
audio = { path = "crates/audio" }
|
||||||
auto_update = { path = "crates/auto_update" }
|
auto_update = { path = "crates/auto_update" }
|
||||||
auto_update_ui = { path = "crates/auto_update_ui" }
|
auto_update_ui = { path = "crates/auto_update_ui" }
|
||||||
|
aws_http_client = { path = "crates/aws_http_client" }
|
||||||
|
bedrock = { path = "crates/bedrock" }
|
||||||
breadcrumbs = { path = "crates/breadcrumbs" }
|
breadcrumbs = { path = "crates/breadcrumbs" }
|
||||||
call = { path = "crates/call" }
|
call = { path = "crates/call" }
|
||||||
channel = { path = "crates/channel" }
|
channel = { path = "crates/channel" }
|
||||||
@@ -226,12 +233,16 @@ collab_ui = { path = "crates/collab_ui" }
|
|||||||
collections = { path = "crates/collections" }
|
collections = { path = "crates/collections" }
|
||||||
command_palette = { path = "crates/command_palette" }
|
command_palette = { path = "crates/command_palette" }
|
||||||
command_palette_hooks = { path = "crates/command_palette_hooks" }
|
command_palette_hooks = { path = "crates/command_palette_hooks" }
|
||||||
|
component = { path = "crates/component" }
|
||||||
|
component_preview = { path = "crates/component_preview" }
|
||||||
context_server = { path = "crates/context_server" }
|
context_server = { path = "crates/context_server" }
|
||||||
context_server_settings = { path = "crates/context_server_settings" }
|
context_server_settings = { path = "crates/context_server_settings" }
|
||||||
copilot = { path = "crates/copilot" }
|
copilot = { path = "crates/copilot" }
|
||||||
|
credentials_provider = { path = "crates/credentials_provider" }
|
||||||
db = { path = "crates/db" }
|
db = { path = "crates/db" }
|
||||||
deepseek = { path = "crates/deepseek" }
|
deepseek = { path = "crates/deepseek" }
|
||||||
diagnostics = { path = "crates/diagnostics" }
|
diagnostics = { path = "crates/diagnostics" }
|
||||||
|
buffer_diff = { path = "crates/buffer_diff" }
|
||||||
editor = { path = "crates/editor" }
|
editor = { path = "crates/editor" }
|
||||||
extension = { path = "crates/extension" }
|
extension = { path = "crates/extension" }
|
||||||
extension_host = { path = "crates/extension_host" }
|
extension_host = { path = "crates/extension_host" }
|
||||||
@@ -240,19 +251,19 @@ feature_flags = { path = "crates/feature_flags" }
|
|||||||
feedback = { path = "crates/feedback" }
|
feedback = { path = "crates/feedback" }
|
||||||
file_finder = { path = "crates/file_finder" }
|
file_finder = { path = "crates/file_finder" }
|
||||||
file_icons = { path = "crates/file_icons" }
|
file_icons = { path = "crates/file_icons" }
|
||||||
fireworks = { path = "crates/fireworks" }
|
|
||||||
fs = { path = "crates/fs" }
|
fs = { path = "crates/fs" }
|
||||||
fsevent = { path = "crates/fsevent" }
|
fsevent = { path = "crates/fsevent" }
|
||||||
fuzzy = { path = "crates/fuzzy" }
|
fuzzy = { path = "crates/fuzzy" }
|
||||||
git = { path = "crates/git" }
|
git = { path = "crates/git" }
|
||||||
git_ui = { path = "crates/git_ui" }
|
|
||||||
git_hosting_providers = { path = "crates/git_hosting_providers" }
|
git_hosting_providers = { path = "crates/git_hosting_providers" }
|
||||||
|
git_ui = { path = "crates/git_ui" }
|
||||||
go_to_line = { path = "crates/go_to_line" }
|
go_to_line = { path = "crates/go_to_line" }
|
||||||
google_ai = { path = "crates/google_ai" }
|
google_ai = { path = "crates/google_ai" }
|
||||||
gpui = { path = "crates/gpui", default-features = false, features = [
|
gpui = { path = "crates/gpui", default-features = false, features = [
|
||||||
"http_client",
|
"http_client",
|
||||||
] }
|
] }
|
||||||
gpui_macros = { path = "crates/gpui_macros" }
|
gpui_macros = { path = "crates/gpui_macros" }
|
||||||
|
gpui_tokio = { path = "crates/gpui_tokio" }
|
||||||
html_to_markdown = { path = "crates/html_to_markdown" }
|
html_to_markdown = { path = "crates/html_to_markdown" }
|
||||||
http_client = { path = "crates/http_client" }
|
http_client = { path = "crates/http_client" }
|
||||||
image_viewer = { path = "crates/image_viewer" }
|
image_viewer = { path = "crates/image_viewer" }
|
||||||
@@ -269,15 +280,17 @@ language_models = { path = "crates/language_models" }
|
|||||||
language_selector = { path = "crates/language_selector" }
|
language_selector = { path = "crates/language_selector" }
|
||||||
language_tools = { path = "crates/language_tools" }
|
language_tools = { path = "crates/language_tools" }
|
||||||
languages = { path = "crates/languages" }
|
languages = { path = "crates/languages" }
|
||||||
|
livekit_api = { path = "crates/livekit_api" }
|
||||||
livekit_client = { path = "crates/livekit_client" }
|
livekit_client = { path = "crates/livekit_client" }
|
||||||
livekit_client_macos = { path = "crates/livekit_client_macos" }
|
livekit_client_macos = { path = "crates/livekit_client_macos" }
|
||||||
livekit_server = { path = "crates/livekit_server" }
|
|
||||||
lmstudio = { path = "crates/lmstudio" }
|
lmstudio = { path = "crates/lmstudio" }
|
||||||
lsp = { path = "crates/lsp" }
|
lsp = { path = "crates/lsp" }
|
||||||
markdown = { path = "crates/markdown" }
|
markdown = { path = "crates/markdown" }
|
||||||
markdown_preview = { path = "crates/markdown_preview" }
|
markdown_preview = { path = "crates/markdown_preview" }
|
||||||
media = { path = "crates/media" }
|
media = { path = "crates/media" }
|
||||||
menu = { path = "crates/menu" }
|
menu = { path = "crates/menu" }
|
||||||
|
migrator = { path = "crates/migrator" }
|
||||||
|
mistral = { path = "crates/mistral" }
|
||||||
multi_buffer = { path = "crates/multi_buffer" }
|
multi_buffer = { path = "crates/multi_buffer" }
|
||||||
node_runtime = { path = "crates/node_runtime" }
|
node_runtime = { path = "crates/node_runtime" }
|
||||||
notifications = { path = "crates/notifications" }
|
notifications = { path = "crates/notifications" }
|
||||||
@@ -286,6 +299,7 @@ open_ai = { path = "crates/open_ai" }
|
|||||||
outline = { path = "crates/outline" }
|
outline = { path = "crates/outline" }
|
||||||
outline_panel = { path = "crates/outline_panel" }
|
outline_panel = { path = "crates/outline_panel" }
|
||||||
paths = { path = "crates/paths" }
|
paths = { path = "crates/paths" }
|
||||||
|
panel = { path = "crates/panel" }
|
||||||
picker = { path = "crates/picker" }
|
picker = { path = "crates/picker" }
|
||||||
plugin = { path = "crates/plugin" }
|
plugin = { path = "crates/plugin" }
|
||||||
plugin_macros = { path = "crates/plugin_macros" }
|
plugin_macros = { path = "crates/plugin_macros" }
|
||||||
@@ -341,7 +355,7 @@ ui = { path = "crates/ui" }
|
|||||||
ui_input = { path = "crates/ui_input" }
|
ui_input = { path = "crates/ui_input" }
|
||||||
ui_macros = { path = "crates/ui_macros" }
|
ui_macros = { path = "crates/ui_macros" }
|
||||||
util = { path = "crates/util" }
|
util = { path = "crates/util" }
|
||||||
vcs_menu = { path = "crates/vcs_menu" }
|
util_macros = { path = "crates/util_macros" }
|
||||||
vim = { path = "crates/vim" }
|
vim = { path = "crates/vim" }
|
||||||
vim_mode_setting = { path = "crates/vim_mode_setting" }
|
vim_mode_setting = { path = "crates/vim_mode_setting" }
|
||||||
welcome = { path = "crates/welcome" }
|
welcome = { path = "crates/welcome" }
|
||||||
@@ -356,12 +370,11 @@ zeta = { path = "crates/zeta" }
|
|||||||
#
|
#
|
||||||
|
|
||||||
aho-corasick = "1.1"
|
aho-corasick = "1.1"
|
||||||
# TODO(#18342): Update to version 0.25 from crates.io when it is released.
|
alacritty_terminal = { git = "https://github.com/zed-industries/alacritty.git", rev = "03c2907b44b4189aac5fdeaea331f5aab5c7072e" }
|
||||||
alacritty_terminal = { git = "https://github.com/alacritty/alacritty.git", rev = "5e78d20c709cb1ab8d44ca7a8702cc26d779227c" }
|
|
||||||
any_vec = "0.14"
|
any_vec = "0.14"
|
||||||
anyhow = "1.0.86"
|
anyhow = "1.0.86"
|
||||||
arrayvec = { version = "0.7.4", features = ["serde"] }
|
arrayvec = { version = "0.7.4", features = ["serde"] }
|
||||||
ashpd = { version = "0.10", default-features = false, features = ["async-std"]}
|
ashpd = { version = "0.11", default-features = false, features = ["async-std"] }
|
||||||
async-compat = "0.2.1"
|
async-compat = "0.2.1"
|
||||||
async-compression = { version = "0.4", features = ["gzip", "futures-io"] }
|
async-compression = { version = "0.4", features = ["gzip", "futures-io"] }
|
||||||
async-dispatcher = "0.1"
|
async-dispatcher = "0.1"
|
||||||
@@ -373,11 +386,17 @@ async-trait = "0.1"
|
|||||||
async-tungstenite = "0.28"
|
async-tungstenite = "0.28"
|
||||||
async-watch = "0.3.1"
|
async-watch = "0.3.1"
|
||||||
async_zip = { version = "0.0.17", features = ["deflate", "deflate64"] }
|
async_zip = { version = "0.0.17", features = ["deflate", "deflate64"] }
|
||||||
|
aws-config = { version = "1.5.16", features = ["behavior-version-latest"] }
|
||||||
|
aws-credential-types = { version = "1.2.1", features = ["hardcoded-credentials"] }
|
||||||
|
aws-sdk-bedrockruntime = { version = "1.73.0", features = ["behavior-version-latest"] }
|
||||||
|
aws-smithy-runtime-api = { version = "1.7.3", features = ["http-1x", "client"] }
|
||||||
|
aws-smithy-types = { version = "1.2.13", features = ["http-body-1-x"] }
|
||||||
base64 = "0.22"
|
base64 = "0.22"
|
||||||
bitflags = "2.6.0"
|
bitflags = "2.6.0"
|
||||||
blade-graphics = { git = "https://github.com/kvark/blade", rev = "091a8401033847bb9b6ace3fcf70448d069621c5" }
|
blade-graphics = { git = "https://github.com/kvark/blade", rev = "b16f5c7bd873c7126f48c82c39e7ae64602ae74f" }
|
||||||
blade-macros = { git = "https://github.com/kvark/blade", rev = "091a8401033847bb9b6ace3fcf70448d069621c5" }
|
blade-macros = { git = "https://github.com/kvark/blade", rev = "b16f5c7bd873c7126f48c82c39e7ae64602ae74f" }
|
||||||
blade-util = { git = "https://github.com/kvark/blade", rev = "091a8401033847bb9b6ace3fcf70448d069621c5" }
|
blade-util = { git = "https://github.com/kvark/blade", rev = "b16f5c7bd873c7126f48c82c39e7ae64602ae74f" }
|
||||||
|
naga = { version = "23.1.0", features = ["wgsl-in"] }
|
||||||
blake3 = "1.5.3"
|
blake3 = "1.5.3"
|
||||||
bytes = "1.0"
|
bytes = "1.0"
|
||||||
cargo_metadata = "0.19"
|
cargo_metadata = "0.19"
|
||||||
@@ -386,10 +405,10 @@ chrono = { version = "0.4", features = ["serde"] }
|
|||||||
clap = { version = "4.4", features = ["derive"] }
|
clap = { version = "4.4", features = ["derive"] }
|
||||||
cocoa = "0.26"
|
cocoa = "0.26"
|
||||||
cocoa-foundation = "0.2.0"
|
cocoa-foundation = "0.2.0"
|
||||||
convert_case = "0.7.0"
|
convert_case = "0.8.0"
|
||||||
core-foundation = "0.9.3"
|
core-foundation = "0.9.3"
|
||||||
core-foundation-sys = "0.8.6"
|
core-foundation-sys = "0.8.6"
|
||||||
ctor = "0.2.6"
|
ctor = "0.4.0"
|
||||||
dashmap = "6.0"
|
dashmap = "6.0"
|
||||||
derive_more = "0.99.17"
|
derive_more = "0.99.17"
|
||||||
dirs = "4.0"
|
dirs = "4.0"
|
||||||
@@ -413,8 +432,10 @@ hyper = "0.14"
|
|||||||
http = "1.1"
|
http = "1.1"
|
||||||
ignore = "0.4.22"
|
ignore = "0.4.22"
|
||||||
image = "0.25.1"
|
image = "0.25.1"
|
||||||
|
imara-diff = "0.1.8"
|
||||||
indexmap = { version = "2.7.0", features = ["serde"] }
|
indexmap = { version = "2.7.0", features = ["serde"] }
|
||||||
indoc = "2"
|
indoc = "2"
|
||||||
|
inventory = "0.3.19"
|
||||||
itertools = "0.14.0"
|
itertools = "0.14.0"
|
||||||
jsonwebtoken = "9.3"
|
jsonwebtoken = "9.3"
|
||||||
jupyter-protocol = { version = "0.6.0" }
|
jupyter-protocol = { version = "0.6.0" }
|
||||||
@@ -422,7 +443,12 @@ jupyter-websocket-client = { version = "0.9.0" }
|
|||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
libsqlite3-sys = { version = "0.30.1", features = ["bundled"] }
|
libsqlite3-sys = { version = "0.30.1", features = ["bundled"] }
|
||||||
linkify = "0.10.0"
|
linkify = "0.10.0"
|
||||||
livekit = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev="060964da10574cd9bf06463a53bf6e0769c5c45e", features = ["dispatcher", "services-dispatcher", "rustls-tls-native-roots"], default-features = false }
|
linkme = "0.3.31"
|
||||||
|
livekit = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev = "811ceae29fabee455f110c56cd66b3f49a7e5003", features = [
|
||||||
|
"dispatcher",
|
||||||
|
"services-dispatcher",
|
||||||
|
"rustls-tls-native-roots",
|
||||||
|
], default-features = false }
|
||||||
log = { version = "0.4.16", features = ["kv_unstable_serde", "serde"] }
|
log = { version = "0.4.16", features = ["kv_unstable_serde", "serde"] }
|
||||||
markup5ever_rcdom = "0.3.0"
|
markup5ever_rcdom = "0.3.0"
|
||||||
nanoid = "0.4"
|
nanoid = "0.4"
|
||||||
@@ -442,11 +468,13 @@ pet-poetry = { git = "https://github.com/microsoft/python-environment-tools.git"
|
|||||||
pet-reporter = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "1abe5cec5ebfbe97ca71746a4cfc7fe89bddf8e0" }
|
pet-reporter = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "1abe5cec5ebfbe97ca71746a4cfc7fe89bddf8e0" }
|
||||||
postage = { version = "0.5", features = ["futures-traits"] }
|
postage = { version = "0.5", features = ["futures-traits"] }
|
||||||
pretty_assertions = { version = "1.3.0", features = ["unstable"] }
|
pretty_assertions = { version = "1.3.0", features = ["unstable"] }
|
||||||
|
proc-macro2 = "1.0.93"
|
||||||
profiling = "1"
|
profiling = "1"
|
||||||
prost = "0.9"
|
prost = "0.9"
|
||||||
prost-build = "0.9"
|
prost-build = "0.9"
|
||||||
prost-types = "0.9"
|
prost-types = "0.9"
|
||||||
pulldown-cmark = { version = "0.12.0", default-features = false }
|
pulldown-cmark = { version = "0.12.0", default-features = false }
|
||||||
|
quote = "1.0.9"
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
rayon = "1.8"
|
rayon = "1.8"
|
||||||
regex = "1.5"
|
regex = "1.5"
|
||||||
@@ -466,8 +494,8 @@ runtimelib = { version = "0.25.0", default-features = false, features = [
|
|||||||
rustc-demangle = "0.1.23"
|
rustc-demangle = "0.1.23"
|
||||||
rust-embed = { version = "8.4", features = ["include-exclude"] }
|
rust-embed = { version = "8.4", features = ["include-exclude"] }
|
||||||
rustc-hash = "2.1.0"
|
rustc-hash = "2.1.0"
|
||||||
rustls = "0.21.12"
|
rustls = { version = "0.23.22" }
|
||||||
rustls-native-certs = "0.8.0"
|
rustls-platform-verifier = "0.5.0"
|
||||||
schemars = { version = "0.8", features = ["impl_json_schema", "indexmap2"] }
|
schemars = { version = "0.8", features = ["impl_json_schema", "indexmap2"] }
|
||||||
semver = "1.0"
|
semver = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
@@ -482,14 +510,15 @@ sha2 = "0.10"
|
|||||||
shellexpand = "2.1.0"
|
shellexpand = "2.1.0"
|
||||||
shlex = "1.3.0"
|
shlex = "1.3.0"
|
||||||
signal-hook = "0.3.17"
|
signal-hook = "0.3.17"
|
||||||
similar = "1.3"
|
|
||||||
simplelog = "0.12.2"
|
simplelog = "0.12.2"
|
||||||
smallvec = { version = "1.6", features = ["union"] }
|
smallvec = { version = "1.6", features = ["union"] }
|
||||||
smol = "2.0"
|
smol = "2.0"
|
||||||
sqlformat = "0.2"
|
sqlformat = "0.2"
|
||||||
|
streaming-iterator = "0.1"
|
||||||
strsim = "0.11"
|
strsim = "0.11"
|
||||||
strum = { version = "0.26.0", features = ["derive"] }
|
strum = { version = "0.26.0", features = ["derive"] }
|
||||||
subtle = "2.5.0"
|
subtle = "2.5.0"
|
||||||
|
syn = { version = "1.0.72", features = ["full", "extra-traits"] }
|
||||||
sys-locale = "0.3.1"
|
sys-locale = "0.3.1"
|
||||||
sysinfo = "0.31.0"
|
sysinfo = "0.31.0"
|
||||||
take-until = "0.2.0"
|
take-until = "0.2.0"
|
||||||
@@ -507,46 +536,48 @@ tiny_http = "0.8"
|
|||||||
toml = "0.8"
|
toml = "0.8"
|
||||||
tokio = { version = "1" }
|
tokio = { version = "1" }
|
||||||
tower-http = "0.4.4"
|
tower-http = "0.4.4"
|
||||||
tree-sitter = { version = "0.23", features = ["wasm"] }
|
tree-sitter = { version = "0.25.2", features = ["wasm"] }
|
||||||
tree-sitter-bash = "0.23"
|
tree-sitter-bash = "0.23"
|
||||||
tree-sitter-c = "0.23"
|
tree-sitter-c = "0.23"
|
||||||
tree-sitter-cpp = "0.23"
|
tree-sitter-cpp = "0.23"
|
||||||
tree-sitter-css = "0.23"
|
tree-sitter-css = "0.23"
|
||||||
tree-sitter-elixir = "0.3"
|
tree-sitter-elixir = "0.3"
|
||||||
tree-sitter-embedded-template = "0.23.0"
|
tree-sitter-embedded-template = "0.23.0"
|
||||||
|
tree-sitter-gitcommit = { git = "https://github.com/zed-industries/tree-sitter-git-commit", rev = "88309716a69dd13ab83443721ba6e0b491d37ee9" }
|
||||||
tree-sitter-go = "0.23"
|
tree-sitter-go = "0.23"
|
||||||
tree-sitter-go-mod = { git = "https://github.com/camdencheek/tree-sitter-go-mod", rev = "6efb59652d30e0e9cd5f3b3a669afd6f1a926d3c", package = "tree-sitter-gomod" }
|
tree-sitter-go-mod = { git = "https://github.com/camdencheek/tree-sitter-go-mod", rev = "6efb59652d30e0e9cd5f3b3a669afd6f1a926d3c", package = "tree-sitter-gomod" }
|
||||||
tree-sitter-gowork = { git = "https://github.com/zed-industries/tree-sitter-go-work", rev = "acb0617bf7f4fda02c6217676cc64acb89536dc7" }
|
tree-sitter-gowork = { git = "https://github.com/zed-industries/tree-sitter-go-work", rev = "acb0617bf7f4fda02c6217676cc64acb89536dc7" }
|
||||||
tree-sitter-heex = { git = "https://github.com/zed-industries/tree-sitter-heex", rev = "1dd45142fbb05562e35b2040c6129c9bca346592" }
|
tree-sitter-heex = { git = "https://github.com/zed-industries/tree-sitter-heex", rev = "1dd45142fbb05562e35b2040c6129c9bca346592" }
|
||||||
tree-sitter-diff = "0.1.0"
|
tree-sitter-diff = "0.1.0"
|
||||||
tree-sitter-html = "0.20"
|
tree-sitter-html = "0.23"
|
||||||
tree-sitter-jsdoc = "0.23"
|
tree-sitter-jsdoc = "0.23"
|
||||||
tree-sitter-json = "0.24"
|
tree-sitter-json = "0.24"
|
||||||
tree-sitter-md = { git = "https://github.com/tree-sitter-grammars/tree-sitter-markdown", rev = "9a23c1a96c0513d8fc6520972beedd419a973539" }
|
tree-sitter-md = { git = "https://github.com/tree-sitter-grammars/tree-sitter-markdown", rev = "9a23c1a96c0513d8fc6520972beedd419a973539" }
|
||||||
tree-sitter-python = "0.23"
|
tree-sitter-python = "0.23"
|
||||||
tree-sitter-regex = "0.23"
|
tree-sitter-regex = "0.24"
|
||||||
tree-sitter-ruby = "0.23"
|
tree-sitter-ruby = "0.23"
|
||||||
tree-sitter-rust = "0.23"
|
tree-sitter-rust = "0.23"
|
||||||
tree-sitter-typescript = "0.23"
|
tree-sitter-typescript = "0.23"
|
||||||
tree-sitter-yaml = { git = "https://github.com/zed-industries/tree-sitter-yaml", rev = "baff0b51c64ef6a1fb1f8390f3ad6015b83ec13a" }
|
tree-sitter-yaml = { git = "https://github.com/zed-industries/tree-sitter-yaml", rev = "baff0b51c64ef6a1fb1f8390f3ad6015b83ec13a" }
|
||||||
unicase = "2.6"
|
unicase = "2.6"
|
||||||
unindent = "0.1.7"
|
unindent = "0.2.0"
|
||||||
unicode-segmentation = "1.10"
|
unicode-segmentation = "1.10"
|
||||||
unicode-script = "0.5.7"
|
unicode-script = "0.5.7"
|
||||||
url = "2.2"
|
url = "2.2"
|
||||||
uuid = { version = "1.1.2", features = ["v4", "v5", "v7", "serde"] }
|
uuid = { version = "1.1.2", features = ["v4", "v5", "v7", "serde"] }
|
||||||
wasmparser = "0.215"
|
wasmparser = "0.221"
|
||||||
wasm-encoder = "0.215"
|
wasm-encoder = "0.221"
|
||||||
wasmtime = { version = "24", default-features = false, features = [
|
wasmtime = { version = "29", default-features = false, features = [
|
||||||
"async",
|
"async",
|
||||||
"demangle",
|
"demangle",
|
||||||
"runtime",
|
"runtime",
|
||||||
"cranelift",
|
"cranelift",
|
||||||
"component-model",
|
"component-model",
|
||||||
] }
|
] }
|
||||||
wasmtime-wasi = "24"
|
wasmtime-wasi = "29"
|
||||||
which = "6.0.0"
|
which = "6.0.0"
|
||||||
wit-component = "0.201"
|
wit-component = "0.221"
|
||||||
|
zed_llm_client = "0.4"
|
||||||
zstd = "0.11"
|
zstd = "0.11"
|
||||||
metal = "0.31"
|
metal = "0.31"
|
||||||
|
|
||||||
@@ -587,6 +618,7 @@ features = [
|
|||||||
"Win32_Storage_FileSystem",
|
"Win32_Storage_FileSystem",
|
||||||
"Win32_System_Com",
|
"Win32_System_Com",
|
||||||
"Win32_System_Com_StructuredStorage",
|
"Win32_System_Com_StructuredStorage",
|
||||||
|
"Win32_System_Console",
|
||||||
"Win32_System_DataExchange",
|
"Win32_System_DataExchange",
|
||||||
"Win32_System_LibraryLoader",
|
"Win32_System_LibraryLoader",
|
||||||
"Win32_System_Memory",
|
"Win32_System_Memory",
|
||||||
@@ -607,6 +639,7 @@ features = [
|
|||||||
# TODO livekit https://github.com/RustAudio/cpal/pull/891
|
# TODO livekit https://github.com/RustAudio/cpal/pull/891
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
cpal = { git = "https://github.com/zed-industries/cpal", rev = "fd8bc2fd39f1f5fdee5a0690656caff9a26d9d50" }
|
cpal = { git = "https://github.com/zed-industries/cpal", rev = "fd8bc2fd39f1f5fdee5a0690656caff9a26d9d50" }
|
||||||
|
real-async-tls = { git = "https://github.com/zed-industries/async-tls", rev = "1e759a4b5e370f87dc15e40756ac4f8815b61d9d", package = "async-tls" }
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
split-debuginfo = "unpacked"
|
split-debuginfo = "unpacked"
|
||||||
@@ -660,7 +693,6 @@ telemetry_events = { codegen-units = 1 }
|
|||||||
theme_selector = { codegen-units = 1 }
|
theme_selector = { codegen-units = 1 }
|
||||||
time_format = { codegen-units = 1 }
|
time_format = { codegen-units = 1 }
|
||||||
ui_input = { codegen-units = 1 }
|
ui_input = { codegen-units = 1 }
|
||||||
vcs_menu = { codegen-units = 1 }
|
|
||||||
zed_actions = { codegen-units = 1 }
|
zed_actions = { codegen-units = 1 }
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
@@ -677,6 +709,9 @@ debug = "full"
|
|||||||
lto = false
|
lto = false
|
||||||
codegen-units = 16
|
codegen-units = 16
|
||||||
|
|
||||||
|
[workspace.lints.rust]
|
||||||
|
unexpected_cfgs = { level = "allow" }
|
||||||
|
|
||||||
[workspace.lints.clippy]
|
[workspace.lints.clippy]
|
||||||
dbg_macro = "deny"
|
dbg_macro = "deny"
|
||||||
todo = "deny"
|
todo = "deny"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2022 - 2024 Zed Industries, Inc.
|
Copyright 2022 - 2025 Zed Industries, Inc.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2022 - 2024 Zed Industries, Inc.
|
Copyright 2022 - 2025 Zed Industries, Inc.
|
||||||
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
4
assets/icons/ai_bedrock.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="283.6413 127.3453 56 55.9999" width="16px" height="16px">
|
||||||
|
<path d="M 808.592 158.131 C 807.489 158.131 806.592 157.234 806.592 156.131 C 806.592 155.028 807.489 154.131 808.592 154.131 C 809.695 154.131 810.592 155.028 810.592 156.131 C 810.592 157.234 809.695 158.131 808.592 158.131 Z M 776.705 185.039 L 773.457 183.145 L 780.122 178.979 L 779.062 177.283 L 771.505 182.006 L 765.592 178.557 L 765.592 169.666 L 771.147 165.963 L 770.037 164.299 L 764.551 167.956 L 758.592 164.551 L 758.592 159.711 L 765.088 155.999 L 764.096 154.263 L 758.592 157.408 L 758.592 153.711 L 764.592 150.283 L 770.592 153.711 L 770.592 157.565 L 766.077 160.274 L 767.107 161.988 L 771.592 159.297 L 776.077 161.988 L 777.107 160.274 L 772.592 157.565 L 772.592 153.666 L 778.147 149.963 C 778.425 149.777 778.592 149.465 778.592 149.131 L 778.592 142.131 L 776.592 142.131 L 776.592 148.596 L 771.551 151.956 L 765.592 148.551 L 765.592 139.705 L 770.592 136.789 L 770.592 145.131 L 772.592 145.131 L 772.592 135.622 L 776.705 133.223 L 784.592 135.852 L 784.592 164.565 L 770.077 173.274 L 771.107 174.988 L 784.592 166.897 L 784.592 182.41 L 776.705 185.039 Z M 806.592 169.131 C 806.592 170.234 805.695 171.131 804.592 171.131 C 803.489 171.131 802.592 170.234 802.592 169.131 C 802.592 168.028 803.489 167.131 804.592 167.131 C 805.695 167.131 806.592 168.028 806.592 169.131 Z M 796.592 179.131 C 796.592 180.234 795.695 181.131 794.592 181.131 C 793.489 181.131 792.592 180.234 792.592 179.131 C 792.592 178.028 793.489 177.131 794.592 177.131 C 795.695 177.131 796.592 178.028 796.592 179.131 Z M 795.592 139.131 C 795.592 138.028 796.489 137.131 797.592 137.131 C 798.695 137.131 799.592 138.028 799.592 139.131 C 799.592 140.234 798.695 141.131 797.592 141.131 C 796.489 141.131 795.592 140.234 795.592 139.131 Z M 808.592 152.131 C 806.733 152.131 805.181 153.411 804.734 155.131 L 786.592 155.131 L 786.592 150.131 L 797.592 150.131 C 798.145 150.131 798.592 149.683 798.592 149.131 L 798.592 142.989 C 800.312 142.542 801.592 140.989 801.592 139.131 C 801.592 136.925 799.798 135.131 797.592 135.131 C 795.386 135.131 793.592 136.925 793.592 139.131 C 793.592 140.989 794.872 142.542 796.592 142.989 L 796.592 148.131 L 786.592 148.131 L 786.592 135.131 C 786.592 134.7 786.317 134.319 785.908 134.182 L 776.908 131.182 C 776.634 131.092 776.336 131.122 776.088 131.267 L 764.088 138.267 C 763.78 138.446 763.592 138.776 763.592 139.131 L 763.592 148.551 L 757.096 152.263 C 756.784 152.441 756.592 152.772 756.592 153.131 L 756.592 165.131 C 756.592 165.49 756.784 165.821 757.096 165.999 L 763.592 169.711 L 763.592 179.131 C 763.592 179.486 763.78 179.816 764.088 179.995 L 776.088 186.995 C 776.242 187.085 776.417 187.131 776.592 187.131 C 776.698 187.131 776.805 187.114 776.908 187.08 L 785.908 184.08 C 786.317 183.943 786.592 183.562 786.592 183.131 L 786.592 171.131 L 793.592 171.131 L 793.592 175.273 C 791.872 175.72 790.592 177.273 790.592 179.131 C 790.592 181.337 792.386 183.131 794.592 183.131 C 796.798 183.131 798.592 181.337 798.592 179.131 C 798.592 177.273 797.312 175.72 795.592 175.273 L 795.592 170.131 C 795.592 169.579 795.145 169.131 794.592 169.131 L 786.592 169.131 L 786.592 164.131 L 799.092 164.131 L 801.23 166.981 C 800.831 167.603 800.592 168.338 800.592 169.131 C 800.592 171.337 802.386 173.131 804.592 173.131 C 806.798 173.131 808.592 171.337 808.592 169.131 C 808.592 166.925 806.798 165.131 804.592 165.131 C 803.908 165.131 803.274 165.319 802.711 165.623 L 800.392 162.531 C 800.203 162.279 799.906 162.131 799.592 162.131 L 786.592 162.131 L 786.592 157.131 L 804.734 157.131 C 805.181 158.851 806.733 160.131 808.592 160.131 C 810.798 160.131 812.592 158.337 812.592 156.131 C 812.592 153.925 810.798 152.131 808.592 152.131 Z" fill-rule="evenodd" fill-opacity="1" style="" id="object-0" transform="matrix(1, 0, 0, 1, -472.9506530761719, -3.7858259677886963)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.9 KiB |
1
assets/icons/ai_mistral.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><g><path d="M15 6v4h-2V6h2zm4-4v4h-2V2h2zM3 2H1h2zM1 2h2v20H1V2zm8 12h2v4H9v-4zm8 0h2v8h-2v-8z"></path><path d="M19 2h4v4h-4V2zM3 2h4v4H3V2z" opacity=".4"></path><path d="M15 10V6h8v4h-8zM3 10V6h8v4H3z" opacity=".5"></path><path d="M3 14v-4h20v4z" opacity=".6"></path><path d="M11 14h4v4h-4v-4zm8 0h4v4h-4v-4zM3 14h4v4H3v-4z" opacity=".7"></path><path d="M19 18h4v4h-4v-4zM3 18h4v4H3v-4z" opacity=".8"></path></g></svg>
|
||||||
|
After Width: | Height: | Size: 598 B |
1
assets/icons/circle.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="7.25" cy="7.25" r="3" fill="currentColor"></circle></svg>
|
||||||
|
After Width: | Height: | Size: 165 B |
@@ -1,214 +0,0 @@
|
|||||||
{
|
|
||||||
"stems": {
|
|
||||||
"Dockerfile": "docker",
|
|
||||||
"Podfile": "ruby",
|
|
||||||
"Procfile": "heroku"
|
|
||||||
},
|
|
||||||
"suffixes": {
|
|
||||||
"Emakefile": "erlang",
|
|
||||||
"aac": "audio",
|
|
||||||
"accdb": "storage",
|
|
||||||
"app.src": "erlang",
|
|
||||||
"astro": "astro",
|
|
||||||
"avi": "video",
|
|
||||||
"avif": "image",
|
|
||||||
"bak": "backup",
|
|
||||||
"bash": "terminal",
|
|
||||||
"bash_aliases": "terminal",
|
|
||||||
"bash_logout": "terminal",
|
|
||||||
"bash_profile": "terminal",
|
|
||||||
"bashrc": "terminal",
|
|
||||||
"bmp": "image",
|
|
||||||
"c": "c",
|
|
||||||
"c++": "cpp",
|
|
||||||
"cc": "cpp",
|
|
||||||
"cjs": "javascript",
|
|
||||||
"coffee": "coffeescript",
|
|
||||||
"conf": "settings",
|
|
||||||
"cpp": "cpp",
|
|
||||||
"css": "css",
|
|
||||||
"csv": "storage",
|
|
||||||
"cxx": "cpp",
|
|
||||||
"cts": "typescript",
|
|
||||||
"dart": "dart",
|
|
||||||
"dat": "storage",
|
|
||||||
"db": "storage",
|
|
||||||
"dbf": "storage",
|
|
||||||
"diff": "diff",
|
|
||||||
"dll": "storage",
|
|
||||||
"doc": "document",
|
|
||||||
"docx": "document",
|
|
||||||
"eex": "elixir",
|
|
||||||
"elm": "elm",
|
|
||||||
"erl": "erlang",
|
|
||||||
"escript": "erlang",
|
|
||||||
"eslintrc": "eslint",
|
|
||||||
"eslintrc.js": "eslint",
|
|
||||||
"eslintrc.json": "eslint",
|
|
||||||
"ex": "elixir",
|
|
||||||
"exs": "elixir",
|
|
||||||
"fish": "terminal",
|
|
||||||
"flac": "audio",
|
|
||||||
"fmp": "storage",
|
|
||||||
"fp7": "storage",
|
|
||||||
"frm": "storage",
|
|
||||||
"fs": "fsharp",
|
|
||||||
"gdb": "storage",
|
|
||||||
"gif": "image",
|
|
||||||
"gitattributes": "vcs",
|
|
||||||
"gitignore": "vcs",
|
|
||||||
"gitkeep": "vcs",
|
|
||||||
"gitmodules": "vcs",
|
|
||||||
"TAG_EDITMSG": "vcs",
|
|
||||||
"MERGE_MSG": "vcs",
|
|
||||||
"COMMIT_EDITMSG": "vcs",
|
|
||||||
"NOTES_EDITMSG": "vcs",
|
|
||||||
"EDIT_DESCRIPTION": "vcs",
|
|
||||||
"gleam": "gleam",
|
|
||||||
"go": "go",
|
|
||||||
"gql": "graphql",
|
|
||||||
"graphql": "graphql",
|
|
||||||
"graphqls": "graphql",
|
|
||||||
"h": "c",
|
|
||||||
"handlebars": "code",
|
|
||||||
"hbs": "template",
|
|
||||||
"hcl": "hcl",
|
|
||||||
"heex": "elixir",
|
|
||||||
"heic": "image",
|
|
||||||
"heif": "image",
|
|
||||||
"hh": "cpp",
|
|
||||||
"hpp": "cpp",
|
|
||||||
"hrl": "erlang",
|
|
||||||
"hs": "haskell",
|
|
||||||
"htm": "template",
|
|
||||||
"html": "template",
|
|
||||||
"hxx": "cpp",
|
|
||||||
"ib": "storage",
|
|
||||||
"ico": "image",
|
|
||||||
"ini": "settings",
|
|
||||||
"inl": "cpp",
|
|
||||||
"j2k": "image",
|
|
||||||
"java": "java",
|
|
||||||
"jfif": "image",
|
|
||||||
"jl": "julia",
|
|
||||||
"jp2": "image",
|
|
||||||
"jpeg": "image",
|
|
||||||
"jpg": "image",
|
|
||||||
"js": "javascript",
|
|
||||||
"json": "storage",
|
|
||||||
"jsonc": "storage",
|
|
||||||
"jsx": "react",
|
|
||||||
"jxl": "image",
|
|
||||||
"kt": "kotlin",
|
|
||||||
"ldf": "storage",
|
|
||||||
"lock": "lock",
|
|
||||||
"lockb": "bun",
|
|
||||||
"log": "log",
|
|
||||||
"lua": "lua",
|
|
||||||
"m4a": "audio",
|
|
||||||
"m4v": "video",
|
|
||||||
"markdown": "document",
|
|
||||||
"md": "document",
|
|
||||||
"mdb": "storage",
|
|
||||||
"mdf": "storage",
|
|
||||||
"mdx": "document",
|
|
||||||
"metadata": "code",
|
|
||||||
"metal": "metal",
|
|
||||||
"mjs": "javascript",
|
|
||||||
"mka": "audio",
|
|
||||||
"mkv": "video",
|
|
||||||
"ml": "ocaml",
|
|
||||||
"mli": "ocaml",
|
|
||||||
"mod": "go",
|
|
||||||
"mov": "video",
|
|
||||||
"mp3": "audio",
|
|
||||||
"mp4": "video",
|
|
||||||
"mts": "typescript",
|
|
||||||
"myd": "storage",
|
|
||||||
"myi": "storage",
|
|
||||||
"nim": "nim",
|
|
||||||
"nix": "nix",
|
|
||||||
"nu": "terminal",
|
|
||||||
"odp": "document",
|
|
||||||
"ods": "document",
|
|
||||||
"odt": "document",
|
|
||||||
"ogg": "audio",
|
|
||||||
"opus": "audio",
|
|
||||||
"otf": "font",
|
|
||||||
"pcss": "css",
|
|
||||||
"pdb": "storage",
|
|
||||||
"pdf": "document",
|
|
||||||
"php": "php",
|
|
||||||
"plist": "template",
|
|
||||||
"png": "image",
|
|
||||||
"postcss": "css",
|
|
||||||
"ppt": "document",
|
|
||||||
"pptx": "document",
|
|
||||||
"prettierignore": "prettier",
|
|
||||||
"prettierrc": "prettier",
|
|
||||||
"prisma": "prisma",
|
|
||||||
"profile": "terminal",
|
|
||||||
"ps1": "terminal",
|
|
||||||
"psd": "image",
|
|
||||||
"py": "python",
|
|
||||||
"qoi": "image",
|
|
||||||
"r": "r",
|
|
||||||
"rb": "ruby",
|
|
||||||
"rebar.config": "erlang",
|
|
||||||
"rkt": "code",
|
|
||||||
"roc": "roc",
|
|
||||||
"rs": "rust",
|
|
||||||
"rtf": "document",
|
|
||||||
"sass": "sass",
|
|
||||||
"sav": "storage",
|
|
||||||
"sc": "scala",
|
|
||||||
"scala": "scala",
|
|
||||||
"scm": "code",
|
|
||||||
"scss": "sass",
|
|
||||||
"sdf": "storage",
|
|
||||||
"sh": "terminal",
|
|
||||||
"sql": "storage",
|
|
||||||
"sqlite": "storage",
|
|
||||||
"svelte": "template",
|
|
||||||
"svg": "image",
|
|
||||||
"swift": "swift",
|
|
||||||
"tcl": "tcl",
|
|
||||||
"tf": "terraform",
|
|
||||||
"tfvars": "terraform",
|
|
||||||
"tiff": "image",
|
|
||||||
"toml": "toml",
|
|
||||||
"ts": "typescript",
|
|
||||||
"tsv": "storage",
|
|
||||||
"tsx": "react",
|
|
||||||
"ttf": "font",
|
|
||||||
"txt": "document",
|
|
||||||
"v": "v",
|
|
||||||
"vsh": "v",
|
|
||||||
"vv": "v",
|
|
||||||
"vue": "vue",
|
|
||||||
"wav": "audio",
|
|
||||||
"webm": "video",
|
|
||||||
"webp": "image",
|
|
||||||
"wma": "audio",
|
|
||||||
"wmv": "video",
|
|
||||||
"woff": "font",
|
|
||||||
"woff2": "font",
|
|
||||||
"work": "go",
|
|
||||||
"wv": "audio",
|
|
||||||
"xls": "document",
|
|
||||||
"xlsx": "document",
|
|
||||||
"xml": "template",
|
|
||||||
"xrl": "erlang",
|
|
||||||
"yaml": "settings",
|
|
||||||
"yml": "settings",
|
|
||||||
"yrl": "erlang",
|
|
||||||
"zig": "zig",
|
|
||||||
"zlogin": "terminal",
|
|
||||||
"zsh": "terminal",
|
|
||||||
"zsh_aliases": "terminal",
|
|
||||||
"zsh_histfile": "terminal",
|
|
||||||
"zsh_profile": "terminal",
|
|
||||||
"zshenv": "terminal",
|
|
||||||
"zshrc": "terminal"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
6
assets/icons/lock_outlined.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M5 5C5 3.89543 5.89543 3 7 3H9C10.1046 3 11 3.89543 11 5V6H5V5Z" stroke="black" stroke-width="1.5"/>
|
||||||
|
<path d="M8 9V11" stroke="black" stroke-width="1.5" stroke-linecap="round"/>
|
||||||
|
<circle cx="8" cy="9" r="1" fill="black"/>
|
||||||
|
<rect x="3.75" y="5.75" width="8.5" height="7.5" rx="1.25" stroke="black" stroke-width="1.5" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 452 B |
@@ -1,5 +1,5 @@
|
|||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M7 8.9V11C5.34478 11 4.65522 11 3 11V10.4L7 5.6V5H3V7.1" stroke="black" stroke-width="1.5"/>
|
|
||||||
<path d="M12 5L14 8L12 11" stroke="black" stroke-width="1.5"/>
|
<path d="M12 5L14 8L12 11" stroke="black" stroke-width="1.5"/>
|
||||||
<path d="M10 6.5L11 8L10 9.5" stroke="black" stroke-width="1.5"/>
|
<path d="M10 6.5L11 8L10 9.5" stroke="black" stroke-width="1.5"/>
|
||||||
|
<path d="M7.5 8.9V11C5.43097 11 4.56903 11 2.5 11V10.4L7.5 5.6V5H2.5V7.1" stroke="black" stroke-width="1.5"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 342 B |
19
assets/icons/zed_predict_bg.svg
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<svg width="550" height="128" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<pattern id="tilePattern" width="23" height="23" patternUnits="userSpaceOnUse">
|
||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12 5L14 8L12 11" stroke="black" stroke-width="1.5"/>
|
||||||
|
<path d="M10 6.5L11 8L10 9.5" stroke="black" stroke-width="1.5"/>
|
||||||
|
<path d="M7.5 8.9V11C5.43097 11 4.56903 11 2.5 11V10.4L7.5 5.6V5H2.5V7.1" stroke="black" stroke-width="1.5"/>
|
||||||
|
</svg>
|
||||||
|
</pattern>
|
||||||
|
<linearGradient id="fade" y2="1" x2="0">
|
||||||
|
<stop offset="0" stop-color="white" stop-opacity=".24"/>
|
||||||
|
<stop offset="1" stop-color="white" stop-opacity="0"/>
|
||||||
|
</linearGradient>
|
||||||
|
<mask id="fadeMask" maskContentUnits="objectBoundingBox">
|
||||||
|
<rect width="1" height="1" fill="url(#fade)"/>
|
||||||
|
</mask>
|
||||||
|
</defs>
|
||||||
|
<rect width="100%" height="100%" fill="url(#tilePattern)" mask="url(#fadeMask)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 971 B |
6
assets/icons/zed_predict_disabled.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path opacity="0.6" fill-rule="evenodd" clip-rule="evenodd" d="M6.75 9.31247L8.25 10.5576V11.75H1.75V10.0803L4.49751 7.44273L5.65909 8.40693L3.73923 10.25H6.75V9.31247ZM8.25 5.85739V4.25H6.31358L8.25 5.85739ZM1.75 5.16209V7.1H3.25V6.4072L1.75 5.16209Z" fill="black"/>
|
||||||
|
<path opacity="0.6" fill-rule="evenodd" clip-rule="evenodd" d="M10.9624 9.40853L11.9014 8L10.6241 6.08397L9.37598 6.91603L10.0986 8L9.80184 8.44518L10.9624 9.40853Z" fill="black"/>
|
||||||
|
<path opacity="0.6" fill-rule="evenodd" clip-rule="evenodd" d="M12.8936 11.0116L14.9014 8L12.6241 4.58397L11.376 5.41603L13.0986 8L11.7331 10.0483L12.8936 11.0116Z" fill="black"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.1225 13.809C14.0341 13.9146 13.877 13.9289 13.7711 13.8409L1.19311 3.40021C1.08659 3.31178 1.07221 3.15362 1.16104 3.04743L1.87752 2.19101C1.96588 2.0854 2.123 2.07112 2.22895 2.15906L14.8069 12.5998C14.9134 12.6882 14.9278 12.8464 14.839 12.9526L14.1225 13.809Z" fill="black"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
5
assets/icons/zed_predict_down.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M15 9.33333L14.5 9.66667L12.5 11L10.5 9.66667L10 9.33333" stroke="black" stroke-width="1.5"/>
|
||||||
|
<path d="M12.5 11V4.5" stroke="black" stroke-width="1.5"/>
|
||||||
|
<path d="M7.5 8.9V11C5.43097 11 4.56903 11 2.5 11V10.4L7.5 5.6V5H2.5V7.1" stroke="black" stroke-width="1.5"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 375 B |
5
assets/icons/zed_predict_up.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M10 6.66667L10.5 6.33333L12.5 5L14.5 6.33333L15 6.66667" stroke="black" stroke-width="1.5"/>
|
||||||
|
<path d="M12.5 11V5" stroke="black" stroke-width="1.5"/>
|
||||||
|
<path d="M7.5 8.9V11C5.43097 11 4.56903 11 2.5 11V10.4L7.5 5.6V5H2.5V7.1" stroke="black" stroke-width="1.5"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 372 B |
@@ -24,15 +24,15 @@
|
|||||||
"shift-escape": "workspace::ToggleZoom",
|
"shift-escape": "workspace::ToggleZoom",
|
||||||
"open": "workspace::Open",
|
"open": "workspace::Open",
|
||||||
"ctrl-o": "workspace::Open",
|
"ctrl-o": "workspace::Open",
|
||||||
"ctrl-=": "zed::IncreaseBufferFontSize",
|
"ctrl-=": ["zed::IncreaseBufferFontSize", { "persist": false }],
|
||||||
"ctrl-+": "zed::IncreaseBufferFontSize",
|
"ctrl-+": ["zed::IncreaseBufferFontSize", { "persist": false }],
|
||||||
"ctrl--": "zed::DecreaseBufferFontSize",
|
"ctrl--": ["zed::DecreaseBufferFontSize", { "persist": false }],
|
||||||
"ctrl-0": "zed::ResetBufferFontSize",
|
"ctrl-0": ["zed::ResetBufferFontSize", { "persist": false }],
|
||||||
"ctrl-,": "zed::OpenSettings",
|
"ctrl-,": "zed::OpenSettings",
|
||||||
"ctrl-q": "zed::Quit",
|
"ctrl-q": "zed::Quit",
|
||||||
"f11": "zed::ToggleFullScreen",
|
"f11": "zed::ToggleFullScreen",
|
||||||
"ctrl-alt-z": "zeta::RateCompletions",
|
"ctrl-alt-z": "edit_prediction::RateCompletions",
|
||||||
"ctrl-shift-i": "inline_completion::ToggleMenu"
|
"ctrl-shift-i": "edit_prediction::ToggleMenu"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -84,12 +84,12 @@
|
|||||||
"pageup": "editor::MovePageUp",
|
"pageup": "editor::MovePageUp",
|
||||||
"alt-pageup": "editor::PageUp",
|
"alt-pageup": "editor::PageUp",
|
||||||
"shift-pageup": "editor::SelectPageUp",
|
"shift-pageup": "editor::SelectPageUp",
|
||||||
"home": "editor::MoveToBeginningOfLine",
|
"home": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
|
||||||
"down": "editor::MoveDown",
|
"down": "editor::MoveDown",
|
||||||
"pagedown": "editor::MovePageDown",
|
"pagedown": "editor::MovePageDown",
|
||||||
"alt-pagedown": "editor::PageDown",
|
"alt-pagedown": "editor::PageDown",
|
||||||
"shift-pagedown": "editor::SelectPageDown",
|
"shift-pagedown": "editor::SelectPageDown",
|
||||||
"end": "editor::MoveToEndOfLine",
|
"end": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": true }],
|
||||||
"left": "editor::MoveLeft",
|
"left": "editor::MoveLeft",
|
||||||
"right": "editor::MoveRight",
|
"right": "editor::MoveRight",
|
||||||
"ctrl-left": "editor::MoveToPreviousWordStart",
|
"ctrl-left": "editor::MoveToPreviousWordStart",
|
||||||
@@ -107,22 +107,23 @@
|
|||||||
"ctrl-a": "editor::SelectAll",
|
"ctrl-a": "editor::SelectAll",
|
||||||
"ctrl-l": "editor::SelectLine",
|
"ctrl-l": "editor::SelectLine",
|
||||||
"ctrl-shift-i": "editor::Format",
|
"ctrl-shift-i": "editor::Format",
|
||||||
// "cmd-shift-left": ["editor::SelectToBeginningOfLine", {"stop_at_soft_wraps": true }],
|
// "cmd-shift-left": ["editor::SelectToBeginningOfLine", {"stop_at_soft_wraps": true, "stop_at_indent": true }],
|
||||||
// "ctrl-shift-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }],
|
// "ctrl-shift-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
|
||||||
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }],
|
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
|
||||||
// "cmd-shift-right": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
// "cmd-shift-right": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
||||||
// "ctrl-shift-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
// "ctrl-shift-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
||||||
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
||||||
// "alt-v": ["editor::MovePageUp", { "center_cursor": true }],
|
// "alt-v": ["editor::MovePageUp", { "center_cursor": true }],
|
||||||
"ctrl-alt-space": "editor::ShowCharacterPalette",
|
"ctrl-alt-space": "editor::ShowCharacterPalette",
|
||||||
"ctrl-;": "editor::ToggleLineNumbers",
|
"ctrl-;": "editor::ToggleLineNumbers",
|
||||||
"ctrl-k ctrl-r": "editor::RevertSelectedHunks",
|
"ctrl-k ctrl-r": "git::Restore",
|
||||||
"ctrl-'": "editor::ToggleSelectedDiffHunks",
|
"ctrl-'": "editor::ToggleSelectedDiffHunks",
|
||||||
"ctrl-\"": "editor::ExpandAllHunkDiffs",
|
"ctrl-\"": "editor::ExpandAllDiffHunks",
|
||||||
"ctrl-i": "editor::ShowSignatureHelp",
|
"ctrl-i": "editor::ShowSignatureHelp",
|
||||||
"alt-g b": "editor::ToggleGitBlame",
|
"alt-g b": "editor::ToggleGitBlame",
|
||||||
"menu": "editor::OpenContextMenu",
|
"menu": "editor::OpenContextMenu",
|
||||||
"shift-f10": "editor::OpenContextMenu"
|
"shift-f10": "editor::OpenContextMenu",
|
||||||
|
"ctrl-shift-e": "editor::ToggleEditPrediction"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -136,7 +137,7 @@
|
|||||||
"ctrl-k z": "editor::ToggleSoftWrap",
|
"ctrl-k z": "editor::ToggleSoftWrap",
|
||||||
"find": "buffer_search::Deploy",
|
"find": "buffer_search::Deploy",
|
||||||
"ctrl-f": "buffer_search::Deploy",
|
"ctrl-f": "buffer_search::Deploy",
|
||||||
"ctrl-h": ["buffer_search::Deploy", { "replace_enabled": true }],
|
"ctrl-h": "buffer_search::DeployReplace",
|
||||||
// "cmd-e": ["buffer_search::Deploy", { "focus": false }],
|
// "cmd-e": ["buffer_search::Deploy", { "focus": false }],
|
||||||
"ctrl->": "assistant::QuoteSelection",
|
"ctrl->": "assistant::QuoteSelection",
|
||||||
"ctrl-<": "assistant::InsertIntoEditor",
|
"ctrl-<": "assistant::InsertIntoEditor",
|
||||||
@@ -145,17 +146,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "Editor && mode == full && inline_completion",
|
"context": "Editor && mode == full && edit_prediction",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"alt-]": "editor::NextInlineCompletion",
|
"alt-]": "editor::NextEditPrediction",
|
||||||
"alt-[": "editor::PreviousInlineCompletion",
|
"alt-[": "editor::PreviousEditPrediction",
|
||||||
"alt-right": "editor::AcceptPartialInlineCompletion"
|
"alt-right": "editor::AcceptPartialEditPrediction"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "Editor && !inline_completion",
|
"context": "Editor && !edit_prediction",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"alt-\\": "editor::ShowInlineCompletion"
|
"alt-\\": "editor::ShowEditPrediction"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -183,8 +184,9 @@
|
|||||||
"ctrl-alt-/": "assistant::ToggleModelSelector",
|
"ctrl-alt-/": "assistant::ToggleModelSelector",
|
||||||
"ctrl-k h": "assistant::DeployHistory",
|
"ctrl-k h": "assistant::DeployHistory",
|
||||||
"ctrl-k l": "assistant::DeployPromptLibrary",
|
"ctrl-k l": "assistant::DeployPromptLibrary",
|
||||||
"new": "assistant::NewContext",
|
"new": "assistant::NewChat",
|
||||||
"ctrl-n": "assistant::NewContext"
|
"ctrl-t": "assistant::NewChat",
|
||||||
|
"ctrl-n": "assistant::NewChat"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -203,8 +205,8 @@
|
|||||||
"enter": "search::SelectNextMatch",
|
"enter": "search::SelectNextMatch",
|
||||||
"shift-enter": "search::SelectPrevMatch",
|
"shift-enter": "search::SelectPrevMatch",
|
||||||
"alt-enter": "search::SelectAllMatches",
|
"alt-enter": "search::SelectAllMatches",
|
||||||
"ctrl-f": "search::FocusSearch",
|
|
||||||
"find": "search::FocusSearch",
|
"find": "search::FocusSearch",
|
||||||
|
"ctrl-f": "search::FocusSearch",
|
||||||
"ctrl-h": "search::ToggleReplace",
|
"ctrl-h": "search::ToggleReplace",
|
||||||
"ctrl-l": "search::ToggleSelection"
|
"ctrl-l": "search::ToggleSelection"
|
||||||
}
|
}
|
||||||
@@ -274,8 +276,8 @@
|
|||||||
"ctrl-pagedown": "pane::ActivateNextItem",
|
"ctrl-pagedown": "pane::ActivateNextItem",
|
||||||
"ctrl-shift-pageup": "pane::SwapItemLeft",
|
"ctrl-shift-pageup": "pane::SwapItemLeft",
|
||||||
"ctrl-shift-pagedown": "pane::SwapItemRight",
|
"ctrl-shift-pagedown": "pane::SwapItemRight",
|
||||||
"ctrl-f4": "pane::CloseActiveItem",
|
"ctrl-f4": ["pane::CloseActiveItem", { "close_pinned": false }],
|
||||||
"ctrl-w": "pane::CloseActiveItem",
|
"ctrl-w": ["pane::CloseActiveItem", { "close_pinned": false }],
|
||||||
"alt-ctrl-t": ["pane::CloseInactiveItems", { "close_pinned": false }],
|
"alt-ctrl-t": ["pane::CloseInactiveItems", { "close_pinned": false }],
|
||||||
"alt-ctrl-shift-w": "workspace::CloseInactiveTabsAndPanes",
|
"alt-ctrl-shift-w": "workspace::CloseInactiveTabsAndPanes",
|
||||||
"ctrl-k e": ["pane::CloseItemsToTheLeft", { "close_pinned": false }],
|
"ctrl-k e": ["pane::CloseItemsToTheLeft", { "close_pinned": false }],
|
||||||
@@ -290,15 +292,15 @@
|
|||||||
"f3": "search::SelectNextMatch",
|
"f3": "search::SelectNextMatch",
|
||||||
"ctrl-alt-shift-g": "search::SelectPrevMatch",
|
"ctrl-alt-shift-g": "search::SelectPrevMatch",
|
||||||
"shift-f3": "search::SelectPrevMatch",
|
"shift-f3": "search::SelectPrevMatch",
|
||||||
"ctrl-shift-f": "project_search::ToggleFocus",
|
|
||||||
"shift-find": "project_search::ToggleFocus",
|
"shift-find": "project_search::ToggleFocus",
|
||||||
|
"ctrl-shift-f": "project_search::ToggleFocus",
|
||||||
"ctrl-alt-shift-h": "search::ToggleReplace",
|
"ctrl-alt-shift-h": "search::ToggleReplace",
|
||||||
"ctrl-alt-shift-l": "search::ToggleSelection",
|
"ctrl-alt-shift-l": "search::ToggleSelection",
|
||||||
"alt-enter": "search::SelectAllMatches",
|
"alt-enter": "search::SelectAllMatches",
|
||||||
"alt-c": "search::ToggleCaseSensitive",
|
"alt-c": "search::ToggleCaseSensitive",
|
||||||
"alt-w": "search::ToggleWholeWord",
|
"alt-w": "search::ToggleWholeWord",
|
||||||
"alt-ctrl-f": "project_search::ToggleFilters",
|
|
||||||
"alt-find": "project_search::ToggleFilters",
|
"alt-find": "project_search::ToggleFilters",
|
||||||
|
"alt-ctrl-f": "project_search::ToggleFilters",
|
||||||
"ctrl-alt-shift-r": "search::ToggleRegex",
|
"ctrl-alt-shift-r": "search::ToggleRegex",
|
||||||
"ctrl-alt-shift-x": "search::ToggleRegex",
|
"ctrl-alt-shift-x": "search::ToggleRegex",
|
||||||
"alt-r": "search::ToggleRegex",
|
"alt-r": "search::ToggleRegex",
|
||||||
@@ -342,21 +344,21 @@
|
|||||||
"alt-ctrl-f12": "editor::GoToTypeDefinitionSplit",
|
"alt-ctrl-f12": "editor::GoToTypeDefinitionSplit",
|
||||||
"alt-shift-f12": "editor::FindAllReferences",
|
"alt-shift-f12": "editor::FindAllReferences",
|
||||||
"ctrl-m": "editor::MoveToEnclosingBracket",
|
"ctrl-m": "editor::MoveToEnclosingBracket",
|
||||||
"ctrl-shift-\\": "editor::MoveToEnclosingBracket",
|
"ctrl-|": "editor::MoveToEnclosingBracket",
|
||||||
"ctrl-shift-[": "editor::Fold",
|
"ctrl-{": "editor::Fold",
|
||||||
"ctrl-shift-]": "editor::UnfoldLines",
|
"ctrl-}": "editor::UnfoldLines",
|
||||||
"ctrl-k ctrl-l": "editor::ToggleFold",
|
"ctrl-k ctrl-l": "editor::ToggleFold",
|
||||||
"ctrl-k ctrl-[": "editor::FoldRecursive",
|
"ctrl-k ctrl-[": "editor::FoldRecursive",
|
||||||
"ctrl-k ctrl-]": "editor::UnfoldRecursive",
|
"ctrl-k ctrl-]": "editor::UnfoldRecursive",
|
||||||
"ctrl-k ctrl-1": ["editor::FoldAtLevel", { "level": 1 }],
|
"ctrl-k ctrl-1": ["editor::FoldAtLevel", 1],
|
||||||
"ctrl-k ctrl-2": ["editor::FoldAtLevel", { "level": 2 }],
|
"ctrl-k ctrl-2": ["editor::FoldAtLevel", 2],
|
||||||
"ctrl-k ctrl-3": ["editor::FoldAtLevel", { "level": 3 }],
|
"ctrl-k ctrl-3": ["editor::FoldAtLevel", 3],
|
||||||
"ctrl-k ctrl-4": ["editor::FoldAtLevel", { "level": 4 }],
|
"ctrl-k ctrl-4": ["editor::FoldAtLevel", 4],
|
||||||
"ctrl-k ctrl-5": ["editor::FoldAtLevel", { "level": 5 }],
|
"ctrl-k ctrl-5": ["editor::FoldAtLevel", 5],
|
||||||
"ctrl-k ctrl-6": ["editor::FoldAtLevel", { "level": 6 }],
|
"ctrl-k ctrl-6": ["editor::FoldAtLevel", 6],
|
||||||
"ctrl-k ctrl-7": ["editor::FoldAtLevel", { "level": 7 }],
|
"ctrl-k ctrl-7": ["editor::FoldAtLevel", 7],
|
||||||
"ctrl-k ctrl-8": ["editor::FoldAtLevel", { "level": 8 }],
|
"ctrl-k ctrl-8": ["editor::FoldAtLevel", 8],
|
||||||
"ctrl-k ctrl-9": ["editor::FoldAtLevel", { "level": 9 }],
|
"ctrl-k ctrl-9": ["editor::FoldAtLevel", 9],
|
||||||
"ctrl-k ctrl-0": "editor::FoldAll",
|
"ctrl-k ctrl-0": "editor::FoldAll",
|
||||||
"ctrl-k ctrl-j": "editor::UnfoldAll",
|
"ctrl-k ctrl-j": "editor::UnfoldAll",
|
||||||
"ctrl-space": "editor::ShowCompletions",
|
"ctrl-space": "editor::ShowCompletions",
|
||||||
@@ -366,7 +368,12 @@
|
|||||||
"ctrl-\\": "pane::SplitRight",
|
"ctrl-\\": "pane::SplitRight",
|
||||||
"ctrl-k v": "markdown::OpenPreviewToTheSide",
|
"ctrl-k v": "markdown::OpenPreviewToTheSide",
|
||||||
"ctrl-shift-v": "markdown::OpenPreview",
|
"ctrl-shift-v": "markdown::OpenPreview",
|
||||||
"ctrl-alt-shift-c": "editor::DisplayCursorNames"
|
"ctrl-alt-shift-c": "editor::DisplayCursorNames",
|
||||||
|
"ctrl-alt-y": "git::ToggleStaged",
|
||||||
|
"alt-y": "git::StageAndNext",
|
||||||
|
"alt-shift-y": "git::UnstageAndNext",
|
||||||
|
"alt-.": "editor::GoToHunk",
|
||||||
|
"alt-,": "editor::GoToPrevHunk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -432,14 +439,14 @@
|
|||||||
"ctrl-alt-s": "workspace::SaveAll",
|
"ctrl-alt-s": "workspace::SaveAll",
|
||||||
"ctrl-k m": "language_selector::Toggle",
|
"ctrl-k m": "language_selector::Toggle",
|
||||||
"escape": "workspace::Unfollow",
|
"escape": "workspace::Unfollow",
|
||||||
"ctrl-k ctrl-left": ["workspace::ActivatePaneInDirection", "Left"],
|
"ctrl-k ctrl-left": "workspace::ActivatePaneLeft",
|
||||||
"ctrl-k ctrl-right": ["workspace::ActivatePaneInDirection", "Right"],
|
"ctrl-k ctrl-right": "workspace::ActivatePaneRight",
|
||||||
"ctrl-k ctrl-up": ["workspace::ActivatePaneInDirection", "Up"],
|
"ctrl-k ctrl-up": "workspace::ActivatePaneUp",
|
||||||
"ctrl-k ctrl-down": ["workspace::ActivatePaneInDirection", "Down"],
|
"ctrl-k ctrl-down": "workspace::ActivatePaneDown",
|
||||||
"ctrl-k shift-left": ["workspace::SwapPaneInDirection", "Left"],
|
"ctrl-k shift-left": "workspace::SwapPaneLeft",
|
||||||
"ctrl-k shift-right": ["workspace::SwapPaneInDirection", "Right"],
|
"ctrl-k shift-right": "workspace::SwapPaneRight",
|
||||||
"ctrl-k shift-up": ["workspace::SwapPaneInDirection", "Up"],
|
"ctrl-k shift-up": "workspace::SwapPaneUp",
|
||||||
"ctrl-k shift-down": ["workspace::SwapPaneInDirection", "Down"],
|
"ctrl-k shift-down": "workspace::SwapPaneDown",
|
||||||
"ctrl-shift-x": "zed::Extensions",
|
"ctrl-shift-x": "zed::Extensions",
|
||||||
"ctrl-shift-r": "task::Rerun",
|
"ctrl-shift-r": "task::Rerun",
|
||||||
"ctrl-alt-r": "task::Rerun",
|
"ctrl-alt-r": "task::Rerun",
|
||||||
@@ -453,8 +460,8 @@
|
|||||||
{
|
{
|
||||||
"context": "ApplicationMenu",
|
"context": "ApplicationMenu",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"left": ["app_menu::NavigateApplicationMenuInDirection", "Left"],
|
"left": "app_menu::ActivateMenuLeft",
|
||||||
"right": ["app_menu::NavigateApplicationMenuInDirection", "Right"]
|
"right": "app_menu::ActivateMenuRight"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Bindings from Sublime Text
|
// Bindings from Sublime Text
|
||||||
@@ -496,17 +503,28 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "Editor && showing_completions",
|
"context": "Editor && showing_completions",
|
||||||
"use_key_equivalents": true,
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"enter": "editor::ConfirmCompletion",
|
"enter": "editor::ConfirmCompletion",
|
||||||
"tab": "editor::ComposeCompletion"
|
"tab": "editor::ComposeCompletion"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// Bindings for accepting edit predictions
|
||||||
|
//
|
||||||
|
// alt-l is provided as an alternative to tab/alt-tab. and will be displayed in the UI. This is
|
||||||
|
// because alt-tab may not be available, as it is often used for window switching.
|
||||||
{
|
{
|
||||||
"context": "Editor && inline_completion && !showing_completions",
|
"context": "Editor && edit_prediction",
|
||||||
"use_key_equivalents": true,
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"tab": "editor::AcceptInlineCompletion"
|
"alt-tab": "editor::AcceptEditPrediction",
|
||||||
|
"alt-l": "editor::AcceptEditPrediction",
|
||||||
|
"tab": "editor::AcceptEditPrediction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Editor && edit_prediction_conflict",
|
||||||
|
"bindings": {
|
||||||
|
"alt-tab": "editor::AcceptEditPrediction",
|
||||||
|
"alt-l": "editor::AcceptEditPrediction"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -530,8 +548,7 @@
|
|||||||
{
|
{
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"ctrl-alt-shift-f": "workspace::FollowNextCollaborator",
|
"ctrl-alt-shift-f": "workspace::FollowNextCollaborator",
|
||||||
"ctrl-alt-i": "zed::DebugElements",
|
"ctrl-alt-i": "zed::DebugElements"
|
||||||
"ctrl-:": "editor::ToggleInlayHints"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -549,7 +566,8 @@
|
|||||||
"ctrl-shift-e": "pane::RevealInProjectPanel",
|
"ctrl-shift-e": "pane::RevealInProjectPanel",
|
||||||
"ctrl-f8": "editor::GoToHunk",
|
"ctrl-f8": "editor::GoToHunk",
|
||||||
"ctrl-shift-f8": "editor::GoToPrevHunk",
|
"ctrl-shift-f8": "editor::GoToPrevHunk",
|
||||||
"ctrl-enter": "assistant::InlineAssist"
|
"ctrl-enter": "assistant::InlineAssist",
|
||||||
|
"ctrl-:": "editor::ToggleInlayHints"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -575,6 +593,7 @@
|
|||||||
"save": "workspace::Save",
|
"save": "workspace::Save",
|
||||||
"ctrl->": "assistant::QuoteSelection",
|
"ctrl->": "assistant::QuoteSelection",
|
||||||
"ctrl-<": "assistant::InsertIntoEditor",
|
"ctrl-<": "assistant::InsertIntoEditor",
|
||||||
|
"ctrl-alt-/": "assistant::ToggleModelSelector",
|
||||||
"shift-enter": "assistant::Split",
|
"shift-enter": "assistant::Split",
|
||||||
"ctrl-r": "assistant::CycleMessageRole",
|
"ctrl-r": "assistant::CycleMessageRole",
|
||||||
"enter": "assistant::ConfirmCommand",
|
"enter": "assistant::ConfirmCommand",
|
||||||
@@ -587,7 +606,7 @@
|
|||||||
"ctrl-n": "assistant2::NewThread",
|
"ctrl-n": "assistant2::NewThread",
|
||||||
"new": "assistant2::NewThread",
|
"new": "assistant2::NewThread",
|
||||||
"ctrl-shift-h": "assistant2::OpenHistory",
|
"ctrl-shift-h": "assistant2::OpenHistory",
|
||||||
"ctrl-alt-/": "assistant2::ToggleModelSelector",
|
"ctrl-alt-/": "assistant::ToggleModelSelector",
|
||||||
"ctrl-shift-a": "assistant2::ToggleContextPicker",
|
"ctrl-shift-a": "assistant2::ToggleContextPicker",
|
||||||
"ctrl-e": "assistant2::ChatMode",
|
"ctrl-e": "assistant2::ChatMode",
|
||||||
"ctrl-alt-e": "assistant2::RemoveAllContext"
|
"ctrl-alt-e": "assistant2::RemoveAllContext"
|
||||||
@@ -595,14 +614,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "MessageEditor > Editor",
|
"context": "MessageEditor > Editor",
|
||||||
"use_key_equivalents": true,
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"enter": "assistant2::Chat"
|
"enter": "assistant2::Chat"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "ContextStrip",
|
"context": "ContextStrip",
|
||||||
"use_key_equivalents": true,
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"up": "assistant2::FocusUp",
|
"up": "assistant2::FocusUp",
|
||||||
"right": "assistant2::FocusRight",
|
"right": "assistant2::FocusRight",
|
||||||
@@ -640,8 +657,8 @@
|
|||||||
"right": "outline_panel::ExpandSelectedEntry",
|
"right": "outline_panel::ExpandSelectedEntry",
|
||||||
"alt-copy": "outline_panel::CopyPath",
|
"alt-copy": "outline_panel::CopyPath",
|
||||||
"ctrl-alt-c": "outline_panel::CopyPath",
|
"ctrl-alt-c": "outline_panel::CopyPath",
|
||||||
"alt-shift-copy": "outline_panel::CopyRelativePath",
|
"alt-shift-copy": "workspace::CopyRelativePath",
|
||||||
"alt-ctrl-shift-c": "outline_panel::CopyRelativePath",
|
"alt-ctrl-shift-c": "workspace::CopyRelativePath",
|
||||||
"alt-ctrl-r": "outline_panel::RevealInFileManager",
|
"alt-ctrl-r": "outline_panel::RevealInFileManager",
|
||||||
"space": "outline_panel::Open",
|
"space": "outline_panel::Open",
|
||||||
"shift-down": "menu::SelectNext",
|
"shift-down": "menu::SelectNext",
|
||||||
@@ -669,8 +686,8 @@
|
|||||||
"ctrl-v": "project_panel::Paste",
|
"ctrl-v": "project_panel::Paste",
|
||||||
"alt-copy": "project_panel::CopyPath",
|
"alt-copy": "project_panel::CopyPath",
|
||||||
"ctrl-alt-c": "project_panel::CopyPath",
|
"ctrl-alt-c": "project_panel::CopyPath",
|
||||||
"alt-shift-copy": "project_panel::CopyRelativePath",
|
"alt-shift-copy": "workspace::CopyRelativePath",
|
||||||
"alt-ctrl-shift-c": "project_panel::CopyRelativePath",
|
"alt-ctrl-shift-c": "workspace::CopyRelativePath",
|
||||||
"enter": "project_panel::Rename",
|
"enter": "project_panel::Rename",
|
||||||
"f2": "project_panel::Rename",
|
"f2": "project_panel::Rename",
|
||||||
"backspace": ["project_panel::Trash", { "skip_prompt": false }],
|
"backspace": ["project_panel::Trash", { "skip_prompt": false }],
|
||||||
@@ -680,8 +697,8 @@
|
|||||||
"ctrl-delete": ["project_panel::Delete", { "skip_prompt": false }],
|
"ctrl-delete": ["project_panel::Delete", { "skip_prompt": false }],
|
||||||
"alt-ctrl-r": "project_panel::RevealInFileManager",
|
"alt-ctrl-r": "project_panel::RevealInFileManager",
|
||||||
"ctrl-shift-enter": "project_panel::OpenWithSystem",
|
"ctrl-shift-enter": "project_panel::OpenWithSystem",
|
||||||
"ctrl-shift-f": "project_panel::NewSearchInDirectory",
|
|
||||||
"shift-find": "project_panel::NewSearchInDirectory",
|
"shift-find": "project_panel::NewSearchInDirectory",
|
||||||
|
"ctrl-shift-f": "project_panel::NewSearchInDirectory",
|
||||||
"shift-down": "menu::SelectNext",
|
"shift-down": "menu::SelectNext",
|
||||||
"shift-up": "menu::SelectPrev",
|
"shift-up": "menu::SelectPrev",
|
||||||
"escape": "menu::Cancel"
|
"escape": "menu::Cancel"
|
||||||
@@ -693,32 +710,51 @@
|
|||||||
"space": "project_panel::Open"
|
"space": "project_panel::Open"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"context": "GitPanel && !CommitEditor",
|
|
||||||
"use_key_equivalents": true,
|
|
||||||
"bindings": {
|
|
||||||
"escape": "git_panel::Close"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"context": "GitPanel && ChangesList",
|
"context": "GitPanel && ChangesList",
|
||||||
"use_key_equivalents": true,
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"up": "menu::SelectPrev",
|
"up": "menu::SelectPrev",
|
||||||
"down": "menu::SelectNext",
|
"down": "menu::SelectNext",
|
||||||
"enter": "menu::Confirm",
|
"enter": "menu::Confirm",
|
||||||
"space": "git::ToggleStaged",
|
"space": "git::ToggleStaged",
|
||||||
"ctrl-space": "git::StageAll",
|
"ctrl-space": "git::StageAll",
|
||||||
"ctrl-shift-space": "git::UnstageAll"
|
"ctrl-shift-space": "git::UnstageAll",
|
||||||
|
"tab": "git_panel::FocusEditor",
|
||||||
|
"shift-tab": "git_panel::FocusEditor",
|
||||||
|
"escape": "git_panel::ToggleFocus",
|
||||||
|
"ctrl-enter": "git::Commit",
|
||||||
|
"alt-enter": "menu::SecondaryConfirm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "GitPanel && CommitEditor > Editor",
|
"context": "GitCommit > Editor",
|
||||||
"use_key_equivalents": true,
|
"bindings": {
|
||||||
|
"enter": "editor::Newline",
|
||||||
|
"ctrl-enter": "git::Commit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "GitDiff > Editor",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-enter": "git::Commit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "GitPanel > Editor",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"escape": "git_panel::FocusChanges",
|
"escape": "git_panel::FocusChanges",
|
||||||
"ctrl-enter": "git::CommitChanges",
|
"tab": "git_panel::FocusChanges",
|
||||||
"ctrl-shift-enter": "git::CommitAllChanges"
|
"shift-tab": "git_panel::FocusChanges",
|
||||||
|
"ctrl-enter": "git::Commit",
|
||||||
|
"alt-up": "git_panel::FocusChanges"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "GitCommit > Editor",
|
||||||
|
"use_key_equivalents": true,
|
||||||
|
"bindings": {
|
||||||
|
"enter": "editor::Newline",
|
||||||
|
"ctrl-enter": "git::Commit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -754,13 +790,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "FileFinder",
|
"context": "FileFinder || (FileFinder > Picker > Editor) || (FileFinder > Picker > menu)",
|
||||||
"bindings": {
|
|
||||||
"ctrl": "file_finder::ToggleMenu"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "FileFinder && !menu_open",
|
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"ctrl-shift-p": "file_finder::SelectPrev",
|
"ctrl-shift-p": "file_finder::SelectPrev",
|
||||||
"ctrl-j": "pane::SplitDown",
|
"ctrl-j": "pane::SplitDown",
|
||||||
@@ -769,15 +799,6 @@
|
|||||||
"ctrl-l": "pane::SplitRight"
|
"ctrl-l": "pane::SplitRight"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"context": "FileFinder && menu_open",
|
|
||||||
"bindings": {
|
|
||||||
"j": "pane::SplitDown",
|
|
||||||
"k": "pane::SplitUp",
|
|
||||||
"h": "pane::SplitLeft",
|
|
||||||
"l": "pane::SplitRight"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"context": "TabSwitcher",
|
"context": "TabSwitcher",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
@@ -798,6 +819,8 @@
|
|||||||
"shift-insert": "terminal::Paste",
|
"shift-insert": "terminal::Paste",
|
||||||
"ctrl-shift-v": "terminal::Paste",
|
"ctrl-shift-v": "terminal::Paste",
|
||||||
"ctrl-enter": "assistant::InlineAssist",
|
"ctrl-enter": "assistant::InlineAssist",
|
||||||
|
"alt-b": ["terminal::SendText", "\u001bb"],
|
||||||
|
"alt-f": ["terminal::SendText", "\u001bf"],
|
||||||
// Overrides for conflicting keybindings
|
// Overrides for conflicting keybindings
|
||||||
"ctrl-w": ["terminal::SendKeystroke", "ctrl-w"],
|
"ctrl-w": ["terminal::SendKeystroke", "ctrl-w"],
|
||||||
"ctrl-shift-a": "editor::SelectAll",
|
"ctrl-shift-a": "editor::SelectAll",
|
||||||
@@ -812,6 +835,7 @@
|
|||||||
"pagedown": ["terminal::SendKeystroke", "pagedown"],
|
"pagedown": ["terminal::SendKeystroke", "pagedown"],
|
||||||
"escape": ["terminal::SendKeystroke", "escape"],
|
"escape": ["terminal::SendKeystroke", "escape"],
|
||||||
"enter": ["terminal::SendKeystroke", "enter"],
|
"enter": ["terminal::SendKeystroke", "enter"],
|
||||||
|
"ctrl-b": ["terminal::SendKeystroke", "ctrl-b"],
|
||||||
"ctrl-c": ["terminal::SendKeystroke", "ctrl-c"],
|
"ctrl-c": ["terminal::SendKeystroke", "ctrl-c"],
|
||||||
"shift-pageup": "terminal::ScrollPageUp",
|
"shift-pageup": "terminal::ScrollPageUp",
|
||||||
"shift-pagedown": "terminal::ScrollPageDown",
|
"shift-pagedown": "terminal::ScrollPageDown",
|
||||||
@@ -821,5 +845,11 @@
|
|||||||
"shift-end": "terminal::ScrollToBottom",
|
"shift-end": "terminal::ScrollToBottom",
|
||||||
"ctrl-shift-space": "terminal::ToggleViMode"
|
"ctrl-shift-space": "terminal::ToggleViMode"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "ZedPredictModal",
|
||||||
|
"bindings": {
|
||||||
|
"escape": "menu::Cancel"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -28,10 +28,10 @@
|
|||||||
"cmd-shift-w": "workspace::CloseWindow",
|
"cmd-shift-w": "workspace::CloseWindow",
|
||||||
"shift-escape": "workspace::ToggleZoom",
|
"shift-escape": "workspace::ToggleZoom",
|
||||||
"cmd-o": "workspace::Open",
|
"cmd-o": "workspace::Open",
|
||||||
"cmd-=": "zed::IncreaseBufferFontSize",
|
"cmd-=": ["zed::IncreaseBufferFontSize", { "persist": false }],
|
||||||
"cmd-+": "zed::IncreaseBufferFontSize",
|
"cmd-+": ["zed::IncreaseBufferFontSize", { "persist": false }],
|
||||||
"cmd--": "zed::DecreaseBufferFontSize",
|
"cmd--": ["zed::DecreaseBufferFontSize", { "persist": false }],
|
||||||
"cmd-0": "zed::ResetBufferFontSize",
|
"cmd-0": ["zed::ResetBufferFontSize", { "persist": false }],
|
||||||
"cmd-,": "zed::OpenSettings",
|
"cmd-,": "zed::OpenSettings",
|
||||||
"cmd-q": "zed::Quit",
|
"cmd-q": "zed::Quit",
|
||||||
"cmd-h": "zed::Hide",
|
"cmd-h": "zed::Hide",
|
||||||
@@ -39,8 +39,8 @@
|
|||||||
"cmd-m": "zed::Minimize",
|
"cmd-m": "zed::Minimize",
|
||||||
"fn-f": "zed::ToggleFullScreen",
|
"fn-f": "zed::ToggleFullScreen",
|
||||||
"ctrl-cmd-f": "zed::ToggleFullScreen",
|
"ctrl-cmd-f": "zed::ToggleFullScreen",
|
||||||
"ctrl-shift-z": "zeta::RateCompletions",
|
"ctrl-cmd-z": "edit_prediction::RateCompletions",
|
||||||
"ctrl-shift-i": "inline_completion::ToggleMenu"
|
"ctrl-cmd-i": "edit_prediction::ToggleMenu"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -91,14 +91,16 @@
|
|||||||
"ctrl-l": "editor::ScrollCursorCenter",
|
"ctrl-l": "editor::ScrollCursorCenter",
|
||||||
"alt-left": "editor::MoveToPreviousWordStart",
|
"alt-left": "editor::MoveToPreviousWordStart",
|
||||||
"alt-right": "editor::MoveToNextWordEnd",
|
"alt-right": "editor::MoveToNextWordEnd",
|
||||||
"cmd-left": "editor::MoveToBeginningOfLine",
|
"cmd-left": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
|
||||||
"ctrl-a": "editor::MoveToBeginningOfLine",
|
"ctrl-a": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }],
|
||||||
"home": "editor::MoveToBeginningOfLine",
|
"home": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
|
||||||
"cmd-right": "editor::MoveToEndOfLine",
|
"cmd-right": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": true }],
|
||||||
"ctrl-e": "editor::MoveToEndOfLine",
|
"ctrl-e": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }],
|
||||||
"end": "editor::MoveToEndOfLine",
|
"end": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": true }],
|
||||||
"cmd-up": "editor::MoveToBeginning",
|
"cmd-up": "editor::MoveToStartOfExcerpt",
|
||||||
"cmd-down": "editor::MoveToEnd",
|
"cmd-down": "editor::MoveToEndOfExcerpt",
|
||||||
|
"cmd-home": "editor::MoveToBeginning", // Typed via `cmd-fn-left`
|
||||||
|
"cmd-end": "editor::MoveToEnd", // Typed via `cmd-fn-right`
|
||||||
"shift-up": "editor::SelectUp",
|
"shift-up": "editor::SelectUp",
|
||||||
"ctrl-shift-p": "editor::SelectUp",
|
"ctrl-shift-p": "editor::SelectUp",
|
||||||
"shift-down": "editor::SelectDown",
|
"shift-down": "editor::SelectDown",
|
||||||
@@ -111,14 +113,14 @@
|
|||||||
"alt-shift-right": "editor::SelectToNextWordEnd", // cursorWordRightSelect
|
"alt-shift-right": "editor::SelectToNextWordEnd", // cursorWordRightSelect
|
||||||
"ctrl-shift-up": "editor::SelectToStartOfParagraph",
|
"ctrl-shift-up": "editor::SelectToStartOfParagraph",
|
||||||
"ctrl-shift-down": "editor::SelectToEndOfParagraph",
|
"ctrl-shift-down": "editor::SelectToEndOfParagraph",
|
||||||
"cmd-shift-up": "editor::SelectToBeginning",
|
"cmd-shift-up": "editor::SelectToStartOfExcerpt",
|
||||||
"cmd-shift-down": "editor::SelectToEnd",
|
"cmd-shift-down": "editor::SelectToEndOfExcerpt",
|
||||||
"cmd-a": "editor::SelectAll",
|
"cmd-a": "editor::SelectAll",
|
||||||
"cmd-l": "editor::SelectLine",
|
"cmd-l": "editor::SelectLine",
|
||||||
"cmd-shift-i": "editor::Format",
|
"cmd-shift-i": "editor::Format",
|
||||||
"cmd-shift-left": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }],
|
"cmd-shift-left": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
|
||||||
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }],
|
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
|
||||||
"ctrl-shift-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }],
|
"ctrl-shift-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
|
||||||
"cmd-shift-right": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
"cmd-shift-right": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
||||||
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
||||||
"ctrl-shift-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
"ctrl-shift-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
|
||||||
@@ -126,13 +128,17 @@
|
|||||||
"ctrl-shift-v": ["editor::MovePageUp", { "center_cursor": true }],
|
"ctrl-shift-v": ["editor::MovePageUp", { "center_cursor": true }],
|
||||||
"ctrl-cmd-space": "editor::ShowCharacterPalette",
|
"ctrl-cmd-space": "editor::ShowCharacterPalette",
|
||||||
"cmd-;": "editor::ToggleLineNumbers",
|
"cmd-;": "editor::ToggleLineNumbers",
|
||||||
"cmd-alt-z": "editor::RevertSelectedHunks",
|
"cmd-alt-z": "git::Restore",
|
||||||
|
"cmd-alt-y": "git::ToggleStaged",
|
||||||
|
"cmd-y": "git::StageAndNext",
|
||||||
|
"cmd-shift-y": "git::UnstageAndNext",
|
||||||
"cmd-'": "editor::ToggleSelectedDiffHunks",
|
"cmd-'": "editor::ToggleSelectedDiffHunks",
|
||||||
"cmd-\"": "editor::ExpandAllHunkDiffs",
|
"cmd-\"": "editor::ExpandAllDiffHunks",
|
||||||
"cmd-alt-g b": "editor::ToggleGitBlame",
|
"cmd-alt-g b": "editor::ToggleGitBlame",
|
||||||
"cmd-i": "editor::ShowSignatureHelp",
|
"cmd-i": "editor::ShowSignatureHelp",
|
||||||
"ctrl-f12": "editor::GoToDeclaration",
|
"ctrl-f12": "editor::GoToDeclaration",
|
||||||
"alt-ctrl-f12": "editor::GoToDeclarationSplit"
|
"alt-ctrl-f12": "editor::GoToDeclarationSplit",
|
||||||
|
"ctrl-cmd-e": "editor::ToggleEditPrediction"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -145,7 +151,7 @@
|
|||||||
"cmd-shift-enter": "editor::NewlineAbove",
|
"cmd-shift-enter": "editor::NewlineAbove",
|
||||||
"cmd-k z": "editor::ToggleSoftWrap",
|
"cmd-k z": "editor::ToggleSoftWrap",
|
||||||
"cmd-f": "buffer_search::Deploy",
|
"cmd-f": "buffer_search::Deploy",
|
||||||
"cmd-alt-f": ["buffer_search::Deploy", { "replace_enabled": true }],
|
"cmd-alt-f": "buffer_search::DeployReplace",
|
||||||
"cmd-alt-l": ["buffer_search::Deploy", { "selection_search_enabled": true }],
|
"cmd-alt-l": ["buffer_search::Deploy", { "selection_search_enabled": true }],
|
||||||
"cmd-e": ["buffer_search::Deploy", { "focus": false }],
|
"cmd-e": ["buffer_search::Deploy", { "focus": false }],
|
||||||
"cmd->": "assistant::QuoteSelection",
|
"cmd->": "assistant::QuoteSelection",
|
||||||
@@ -155,19 +161,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "Editor && mode == full && inline_completion",
|
"context": "Editor && mode == full && edit_prediction",
|
||||||
"use_key_equivalents": true,
|
"use_key_equivalents": true,
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"alt-tab": "editor::NextInlineCompletion",
|
"alt-tab": "editor::NextEditPrediction",
|
||||||
"alt-shift-tab": "editor::PreviousInlineCompletion",
|
"alt-shift-tab": "editor::PreviousEditPrediction",
|
||||||
"ctrl-cmd-right": "editor::AcceptPartialInlineCompletion"
|
"ctrl-cmd-right": "editor::AcceptPartialEditPrediction"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "Editor && !inline_completion",
|
"context": "Editor && !edit_prediction",
|
||||||
"use_key_equivalents": true,
|
"use_key_equivalents": true,
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"alt-tab": "editor::ShowInlineCompletion"
|
"alt-tab": "editor::ShowEditPrediction"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -205,7 +211,8 @@
|
|||||||
"cmd-alt-/": "assistant::ToggleModelSelector",
|
"cmd-alt-/": "assistant::ToggleModelSelector",
|
||||||
"cmd-k h": "assistant::DeployHistory",
|
"cmd-k h": "assistant::DeployHistory",
|
||||||
"cmd-k l": "assistant::DeployPromptLibrary",
|
"cmd-k l": "assistant::DeployPromptLibrary",
|
||||||
"cmd-n": "assistant::NewContext"
|
"cmd-t": "assistant::NewChat",
|
||||||
|
"cmd-n": "assistant::NewChat"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -217,6 +224,7 @@
|
|||||||
"cmd-s": "workspace::Save",
|
"cmd-s": "workspace::Save",
|
||||||
"cmd->": "assistant::QuoteSelection",
|
"cmd->": "assistant::QuoteSelection",
|
||||||
"cmd-<": "assistant::InsertIntoEditor",
|
"cmd-<": "assistant::InsertIntoEditor",
|
||||||
|
"cmd-alt-/": "assistant::ToggleModelSelector",
|
||||||
"shift-enter": "assistant::Split",
|
"shift-enter": "assistant::Split",
|
||||||
"ctrl-r": "assistant::CycleMessageRole",
|
"ctrl-r": "assistant::CycleMessageRole",
|
||||||
"enter": "assistant::ConfirmCommand",
|
"enter": "assistant::ConfirmCommand",
|
||||||
@@ -230,7 +238,7 @@
|
|||||||
"cmd-n": "assistant2::NewThread",
|
"cmd-n": "assistant2::NewThread",
|
||||||
"cmd-alt-p": "assistant2::NewPromptEditor",
|
"cmd-alt-p": "assistant2::NewPromptEditor",
|
||||||
"cmd-shift-h": "assistant2::OpenHistory",
|
"cmd-shift-h": "assistant2::OpenHistory",
|
||||||
"cmd-alt-/": "assistant2::ToggleModelSelector",
|
"cmd-alt-/": "assistant::ToggleModelSelector",
|
||||||
"cmd-shift-a": "assistant2::ToggleContextPicker",
|
"cmd-shift-a": "assistant2::ToggleContextPicker",
|
||||||
"cmd-e": "assistant2::ChatMode",
|
"cmd-e": "assistant2::ChatMode",
|
||||||
"cmd-alt-e": "assistant2::RemoveAllContext"
|
"cmd-alt-e": "assistant2::RemoveAllContext"
|
||||||
@@ -281,7 +289,8 @@
|
|||||||
"alt-enter": "search::SelectAllMatches",
|
"alt-enter": "search::SelectAllMatches",
|
||||||
"cmd-f": "search::FocusSearch",
|
"cmd-f": "search::FocusSearch",
|
||||||
"cmd-alt-f": "search::ToggleReplace",
|
"cmd-alt-f": "search::ToggleReplace",
|
||||||
"cmd-alt-l": "search::ToggleSelection"
|
"cmd-alt-l": "search::ToggleSelection",
|
||||||
|
"cmd-shift-o": "outline::Toggle"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -349,7 +358,7 @@
|
|||||||
"cmd-}": "pane::ActivateNextItem",
|
"cmd-}": "pane::ActivateNextItem",
|
||||||
"ctrl-shift-pageup": "pane::SwapItemLeft",
|
"ctrl-shift-pageup": "pane::SwapItemLeft",
|
||||||
"ctrl-shift-pagedown": "pane::SwapItemRight",
|
"ctrl-shift-pagedown": "pane::SwapItemRight",
|
||||||
"cmd-w": "pane::CloseActiveItem",
|
"cmd-w": ["pane::CloseActiveItem", { "close_pinned": false }],
|
||||||
"alt-cmd-t": ["pane::CloseInactiveItems", { "close_pinned": false }],
|
"alt-cmd-t": ["pane::CloseInactiveItems", { "close_pinned": false }],
|
||||||
"ctrl-alt-cmd-w": "workspace::CloseInactiveTabsAndPanes",
|
"ctrl-alt-cmd-w": "workspace::CloseInactiveTabsAndPanes",
|
||||||
"cmd-k e": ["pane::CloseItemsToTheLeft", { "close_pinned": false }],
|
"cmd-k e": ["pane::CloseItemsToTheLeft", { "close_pinned": false }],
|
||||||
@@ -413,15 +422,15 @@
|
|||||||
"cmd-k cmd-l": "editor::ToggleFold",
|
"cmd-k cmd-l": "editor::ToggleFold",
|
||||||
"cmd-k cmd-[": "editor::FoldRecursive",
|
"cmd-k cmd-[": "editor::FoldRecursive",
|
||||||
"cmd-k cmd-]": "editor::UnfoldRecursive",
|
"cmd-k cmd-]": "editor::UnfoldRecursive",
|
||||||
"cmd-k cmd-1": ["editor::FoldAtLevel", { "level": 1 }],
|
"cmd-k cmd-1": ["editor::FoldAtLevel", 1],
|
||||||
"cmd-k cmd-2": ["editor::FoldAtLevel", { "level": 2 }],
|
"cmd-k cmd-2": ["editor::FoldAtLevel", 2],
|
||||||
"cmd-k cmd-3": ["editor::FoldAtLevel", { "level": 3 }],
|
"cmd-k cmd-3": ["editor::FoldAtLevel", 3],
|
||||||
"cmd-k cmd-4": ["editor::FoldAtLevel", { "level": 4 }],
|
"cmd-k cmd-4": ["editor::FoldAtLevel", 4],
|
||||||
"cmd-k cmd-5": ["editor::FoldAtLevel", { "level": 5 }],
|
"cmd-k cmd-5": ["editor::FoldAtLevel", 5],
|
||||||
"cmd-k cmd-6": ["editor::FoldAtLevel", { "level": 6 }],
|
"cmd-k cmd-6": ["editor::FoldAtLevel", 6],
|
||||||
"cmd-k cmd-7": ["editor::FoldAtLevel", { "level": 7 }],
|
"cmd-k cmd-7": ["editor::FoldAtLevel", 7],
|
||||||
"cmd-k cmd-8": ["editor::FoldAtLevel", { "level": 8 }],
|
"cmd-k cmd-8": ["editor::FoldAtLevel", 8],
|
||||||
"cmd-k cmd-9": ["editor::FoldAtLevel", { "level": 9 }],
|
"cmd-k cmd-9": ["editor::FoldAtLevel", 9],
|
||||||
"cmd-k cmd-0": "editor::FoldAll",
|
"cmd-k cmd-0": "editor::FoldAll",
|
||||||
"cmd-k cmd-j": "editor::UnfoldAll",
|
"cmd-k cmd-j": "editor::UnfoldAll",
|
||||||
// Using `ctrl-space` in Zed requires disabling the macOS global shortcut.
|
// Using `ctrl-space` in Zed requires disabling the macOS global shortcut.
|
||||||
@@ -459,7 +468,7 @@
|
|||||||
"ctrl-9": ["pane::ActivateItem", 8],
|
"ctrl-9": ["pane::ActivateItem", 8],
|
||||||
"ctrl-0": "pane::ActivateLastItem",
|
"ctrl-0": "pane::ActivateLastItem",
|
||||||
"ctrl--": "pane::GoBack",
|
"ctrl--": "pane::GoBack",
|
||||||
"ctrl-shift--": "pane::GoForward",
|
"ctrl-_": "pane::GoForward",
|
||||||
"cmd-shift-f": "pane::DeploySearch"
|
"cmd-shift-f": "pane::DeploySearch"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -509,14 +518,14 @@
|
|||||||
"cmd-alt-s": "workspace::SaveAll",
|
"cmd-alt-s": "workspace::SaveAll",
|
||||||
"cmd-k m": "language_selector::Toggle",
|
"cmd-k m": "language_selector::Toggle",
|
||||||
"escape": "workspace::Unfollow",
|
"escape": "workspace::Unfollow",
|
||||||
"cmd-k cmd-left": ["workspace::ActivatePaneInDirection", "Left"],
|
"cmd-k cmd-left": "workspace::ActivatePaneLeft",
|
||||||
"cmd-k cmd-right": ["workspace::ActivatePaneInDirection", "Right"],
|
"cmd-k cmd-right": "workspace::ActivatePaneRight",
|
||||||
"cmd-k cmd-up": ["workspace::ActivatePaneInDirection", "Up"],
|
"cmd-k cmd-up": "workspace::ActivatePaneUp",
|
||||||
"cmd-k cmd-down": ["workspace::ActivatePaneInDirection", "Down"],
|
"cmd-k cmd-down": "workspace::ActivatePaneDown",
|
||||||
"cmd-k shift-left": ["workspace::SwapPaneInDirection", "Left"],
|
"cmd-k shift-left": "workspace::SwapPaneLeft",
|
||||||
"cmd-k shift-right": ["workspace::SwapPaneInDirection", "Right"],
|
"cmd-k shift-right": "workspace::SwapPaneRight",
|
||||||
"cmd-k shift-up": ["workspace::SwapPaneInDirection", "Up"],
|
"cmd-k shift-up": "workspace::SwapPaneUp",
|
||||||
"cmd-k shift-down": ["workspace::SwapPaneInDirection", "Down"],
|
"cmd-k shift-down": "workspace::SwapPaneDown",
|
||||||
"cmd-shift-x": "zed::Extensions"
|
"cmd-shift-x": "zed::Extensions"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -580,10 +589,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "Editor && inline_completion && !showing_completions",
|
"context": "Editor && edit_prediction",
|
||||||
|
"bindings": {
|
||||||
|
"alt-tab": "editor::AcceptEditPrediction",
|
||||||
|
"tab": "editor::AcceptEditPrediction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Editor && edit_prediction_conflict",
|
||||||
"use_key_equivalents": true,
|
"use_key_equivalents": true,
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"tab": "editor::AcceptInlineCompletion"
|
"alt-tab": "editor::AcceptEditPrediction"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -612,8 +628,7 @@
|
|||||||
"ctrl-alt-cmd-f": "workspace::FollowNextCollaborator",
|
"ctrl-alt-cmd-f": "workspace::FollowNextCollaborator",
|
||||||
// TODO: Move this to a dock open action
|
// TODO: Move this to a dock open action
|
||||||
"cmd-shift-c": "collab_panel::ToggleFocus",
|
"cmd-shift-c": "collab_panel::ToggleFocus",
|
||||||
"cmd-alt-i": "zed::DebugElements",
|
"cmd-alt-i": "zed::DebugElements"
|
||||||
"ctrl-:": "editor::ToggleInlayHints"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -626,7 +641,8 @@
|
|||||||
"cmd-shift-e": "pane::RevealInProjectPanel",
|
"cmd-shift-e": "pane::RevealInProjectPanel",
|
||||||
"cmd-f8": "editor::GoToHunk",
|
"cmd-f8": "editor::GoToHunk",
|
||||||
"cmd-shift-f8": "editor::GoToPrevHunk",
|
"cmd-shift-f8": "editor::GoToPrevHunk",
|
||||||
"ctrl-enter": "assistant::InlineAssist"
|
"ctrl-enter": "assistant::InlineAssist",
|
||||||
|
"ctrl-:": "editor::ToggleInlayHints"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -642,7 +658,7 @@
|
|||||||
"use_key_equivalents": true,
|
"use_key_equivalents": true,
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"cmd-shift-a": "assistant2::ToggleContextPicker",
|
"cmd-shift-a": "assistant2::ToggleContextPicker",
|
||||||
"cmd-alt-/": "assistant2::ToggleModelSelector",
|
"cmd-alt-/": "assistant::ToggleModelSelector",
|
||||||
"cmd-alt-e": "assistant2::RemoveAllContext",
|
"cmd-alt-e": "assistant2::RemoveAllContext",
|
||||||
"ctrl-[": "assistant::CyclePreviousInlineAssist",
|
"ctrl-[": "assistant::CyclePreviousInlineAssist",
|
||||||
"ctrl-]": "assistant::CycleNextInlineAssist"
|
"ctrl-]": "assistant::CycleNextInlineAssist"
|
||||||
@@ -662,8 +678,8 @@
|
|||||||
"escape": "menu::Cancel",
|
"escape": "menu::Cancel",
|
||||||
"left": "outline_panel::CollapseSelectedEntry",
|
"left": "outline_panel::CollapseSelectedEntry",
|
||||||
"right": "outline_panel::ExpandSelectedEntry",
|
"right": "outline_panel::ExpandSelectedEntry",
|
||||||
"cmd-alt-c": "outline_panel::CopyPath",
|
"cmd-alt-c": "workspace::CopyPath",
|
||||||
"alt-cmd-shift-c": "outline_panel::CopyRelativePath",
|
"alt-cmd-shift-c": "workspace::CopyRelativePath",
|
||||||
"alt-cmd-r": "outline_panel::RevealInFileManager",
|
"alt-cmd-r": "outline_panel::RevealInFileManager",
|
||||||
"space": "outline_panel::Open",
|
"space": "outline_panel::Open",
|
||||||
"shift-down": "menu::SelectNext",
|
"shift-down": "menu::SelectNext",
|
||||||
@@ -684,8 +700,8 @@
|
|||||||
"cmd-x": "project_panel::Cut",
|
"cmd-x": "project_panel::Cut",
|
||||||
"cmd-c": "project_panel::Copy",
|
"cmd-c": "project_panel::Copy",
|
||||||
"cmd-v": "project_panel::Paste",
|
"cmd-v": "project_panel::Paste",
|
||||||
"cmd-alt-c": "project_panel::CopyPath",
|
"cmd-alt-c": "workspace::CopyPath",
|
||||||
"alt-cmd-shift-c": "project_panel::CopyRelativePath",
|
"alt-cmd-shift-c": "workspace::CopyRelativePath",
|
||||||
"enter": "project_panel::Rename",
|
"enter": "project_panel::Rename",
|
||||||
"f2": "project_panel::Rename",
|
"f2": "project_panel::Rename",
|
||||||
"backspace": ["project_panel::Trash", { "skip_prompt": false }],
|
"backspace": ["project_panel::Trash", { "skip_prompt": false }],
|
||||||
@@ -708,13 +724,6 @@
|
|||||||
"space": "project_panel::Open"
|
"space": "project_panel::Open"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"context": "GitPanel && !CommitEditor",
|
|
||||||
"use_key_equivalents": true,
|
|
||||||
"bindings": {
|
|
||||||
"escape": "git_panel::Close"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"context": "GitPanel && ChangesList",
|
"context": "GitPanel && ChangesList",
|
||||||
"use_key_equivalents": true,
|
"use_key_equivalents": true,
|
||||||
@@ -727,17 +736,37 @@
|
|||||||
"space": "git::ToggleStaged",
|
"space": "git::ToggleStaged",
|
||||||
"cmd-shift-space": "git::StageAll",
|
"cmd-shift-space": "git::StageAll",
|
||||||
"ctrl-shift-space": "git::UnstageAll",
|
"ctrl-shift-space": "git::UnstageAll",
|
||||||
"alt-down": "git_panel::FocusEditor"
|
"alt-down": "git_panel::FocusEditor",
|
||||||
|
"tab": "git_panel::FocusEditor",
|
||||||
|
"shift-tab": "git_panel::FocusEditor",
|
||||||
|
"escape": "git_panel::ToggleFocus",
|
||||||
|
"cmd-enter": "git::Commit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "GitPanel && CommitEditor > Editor",
|
"context": "GitDiff > Editor",
|
||||||
"use_key_equivalents": true,
|
"use_key_equivalents": true,
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"alt-up": "git_panel::FocusChanges",
|
"cmd-enter": "git::Commit"
|
||||||
"escape": "git_panel::FocusChanges",
|
}
|
||||||
"cmd-enter": "git::CommitChanges",
|
},
|
||||||
"cmd-alt-enter": "git::CommitAllChanges"
|
{
|
||||||
|
"context": "GitPanel > Editor",
|
||||||
|
"use_key_equivalents": true,
|
||||||
|
"bindings": {
|
||||||
|
"enter": "editor::Newline",
|
||||||
|
"cmd-enter": "git::Commit",
|
||||||
|
"tab": "git_panel::FocusChanges",
|
||||||
|
"shift-tab": "git_panel::FocusChanges",
|
||||||
|
"alt-up": "git_panel::FocusChanges"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "GitCommit > Editor",
|
||||||
|
"use_key_equivalents": true,
|
||||||
|
"bindings": {
|
||||||
|
"enter": "editor::Newline",
|
||||||
|
"cmd-enter": "git::Commit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -779,14 +808,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "FileFinder",
|
"context": "FileFinder || (FileFinder > Picker > Editor) || (FileFinder > Picker > menu)",
|
||||||
"use_key_equivalents": true,
|
|
||||||
"bindings": {
|
|
||||||
"cmd": "file_finder::ToggleMenu"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "FileFinder && !menu_open",
|
|
||||||
"use_key_equivalents": true,
|
"use_key_equivalents": true,
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"cmd-shift-p": "file_finder::SelectPrev",
|
"cmd-shift-p": "file_finder::SelectPrev",
|
||||||
@@ -796,16 +818,6 @@
|
|||||||
"cmd-l": "pane::SplitRight"
|
"cmd-l": "pane::SplitRight"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"context": "FileFinder && menu_open",
|
|
||||||
"use_key_equivalents": true,
|
|
||||||
"bindings": {
|
|
||||||
"j": "pane::SplitDown",
|
|
||||||
"k": "pane::SplitUp",
|
|
||||||
"h": "pane::SplitLeft",
|
|
||||||
"l": "pane::SplitRight"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"context": "TabSwitcher",
|
"context": "TabSwitcher",
|
||||||
"use_key_equivalents": true,
|
"use_key_equivalents": true,
|
||||||
@@ -827,6 +839,7 @@
|
|||||||
"cmd-k": "terminal::Clear",
|
"cmd-k": "terminal::Clear",
|
||||||
"cmd-n": "workspace::NewTerminal",
|
"cmd-n": "workspace::NewTerminal",
|
||||||
"ctrl-enter": "assistant::InlineAssist",
|
"ctrl-enter": "assistant::InlineAssist",
|
||||||
|
"ctrl-_": null, // emacs undo
|
||||||
// Some nice conveniences
|
// Some nice conveniences
|
||||||
"cmd-backspace": ["terminal::SendText", "\u0015"],
|
"cmd-backspace": ["terminal::SendText", "\u0015"],
|
||||||
"cmd-right": ["terminal::SendText", "\u0005"],
|
"cmd-right": ["terminal::SendText", "\u0005"],
|
||||||
@@ -834,6 +847,8 @@
|
|||||||
// Terminal.app compatibility
|
// Terminal.app compatibility
|
||||||
"alt-left": ["terminal::SendText", "\u001bb"],
|
"alt-left": ["terminal::SendText", "\u001bb"],
|
||||||
"alt-right": ["terminal::SendText", "\u001bf"],
|
"alt-right": ["terminal::SendText", "\u001bf"],
|
||||||
|
"alt-b": ["terminal::SendText", "\u001bb"],
|
||||||
|
"alt-f": ["terminal::SendText", "\u001bf"],
|
||||||
// There are conflicting bindings for these keys in the global context.
|
// There are conflicting bindings for these keys in the global context.
|
||||||
// these bindings override them, remove at your own risk:
|
// these bindings override them, remove at your own risk:
|
||||||
"up": ["terminal::SendKeystroke", "up"],
|
"up": ["terminal::SendKeystroke", "up"],
|
||||||
@@ -881,7 +896,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "ZedPredictTos",
|
"context": "ZedPredictModal",
|
||||||
"use_key_equivalents": true,
|
"use_key_equivalents": true,
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"escape": "menu::Cancel"
|
"escape": "menu::Cancel"
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
"ctrl-e": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
|
"ctrl-e": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
|
||||||
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }], // move-beginning-of-line
|
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }], // move-beginning-of-line
|
||||||
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
|
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
|
||||||
|
"alt-m": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }], // back-to-indentation
|
||||||
"alt-f": "editor::MoveToNextSubwordEnd", // forward-word
|
"alt-f": "editor::MoveToNextSubwordEnd", // forward-word
|
||||||
"alt-b": "editor::MoveToPreviousSubwordStart", // backward-word
|
"alt-b": "editor::MoveToPreviousSubwordStart", // backward-word
|
||||||
"alt-u": "editor::ConvertToUpperCase", // upcase-word
|
"alt-u": "editor::ConvertToUpperCase", // upcase-word
|
||||||
@@ -48,6 +49,8 @@
|
|||||||
"ctrl-_": "editor::Undo", // undo
|
"ctrl-_": "editor::Undo", // undo
|
||||||
"ctrl-/": "editor::Undo", // undo
|
"ctrl-/": "editor::Undo", // undo
|
||||||
"ctrl-x u": "editor::Undo", // undo
|
"ctrl-x u": "editor::Undo", // undo
|
||||||
|
"alt-{": "editor::MoveToStartOfParagraph", // backward-paragraph
|
||||||
|
"alt-}": "editor::MoveToEndOfParagraph", // forward-paragraph
|
||||||
"ctrl-v": "editor::MovePageDown", // scroll-up
|
"ctrl-v": "editor::MovePageDown", // scroll-up
|
||||||
"alt-v": "editor::MovePageUp", // scroll-down
|
"alt-v": "editor::MovePageUp", // scroll-down
|
||||||
"ctrl-x [": "editor::MoveToBeginning", // beginning-of-buffer
|
"ctrl-x [": "editor::MoveToBeginning", // beginning-of-buffer
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
{
|
{
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"ctrl-alt-s": "zed::OpenSettings",
|
"ctrl-alt-s": "zed::OpenSettings",
|
||||||
"ctrl-shift-[": "pane::ActivatePrevItem",
|
"ctrl-{": "pane::ActivatePrevItem",
|
||||||
"ctrl-shift-]": "pane::ActivateNextItem"
|
"ctrl-}": "pane::ActivateNextItem"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "Editor",
|
"context": "Editor",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"ctrl->": "zed::IncreaseBufferFontSize",
|
"ctrl->": ["zed::IncreaseBufferFontSize", { "persist": true }],
|
||||||
"ctrl-<": "zed::DecreaseBufferFontSize",
|
"ctrl-<": ["zed::DecreaseBufferFontSize", { "persist": true }],
|
||||||
"ctrl-shift-j": "editor::JoinLines",
|
"ctrl-shift-j": "editor::JoinLines",
|
||||||
"ctrl-d": "editor::DuplicateSelection",
|
"ctrl-d": "editor::DuplicateSelection",
|
||||||
"ctrl-y": "editor::DeleteLine",
|
"ctrl-y": "editor::DeleteLine",
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
"shift-f2": "editor::GoToPrevDiagnostic",
|
"shift-f2": "editor::GoToPrevDiagnostic",
|
||||||
"ctrl-alt-shift-down": "editor::GoToHunk",
|
"ctrl-alt-shift-down": "editor::GoToHunk",
|
||||||
"ctrl-alt-shift-up": "editor::GoToPrevHunk",
|
"ctrl-alt-shift-up": "editor::GoToPrevHunk",
|
||||||
"ctrl-alt-z": "editor::RevertSelectedHunks",
|
"ctrl-alt-z": "git::Restore",
|
||||||
"ctrl-home": "editor::MoveToBeginning",
|
"ctrl-home": "editor::MoveToBeginning",
|
||||||
"ctrl-end": "editor::MoveToEnd",
|
"ctrl-end": "editor::MoveToEnd",
|
||||||
"ctrl-shift-home": "editor::SelectToBeginning",
|
"ctrl-shift-home": "editor::SelectToBeginning",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"ctrl-shift-[": "pane::ActivatePrevItem",
|
"ctrl-{": "pane::ActivatePrevItem",
|
||||||
"ctrl-shift-]": "pane::ActivateNextItem",
|
"ctrl-}": "pane::ActivateNextItem",
|
||||||
"ctrl-pageup": "pane::ActivatePrevItem",
|
"ctrl-pageup": "pane::ActivatePrevItem",
|
||||||
"ctrl-pagedown": "pane::ActivateNextItem",
|
"ctrl-pagedown": "pane::ActivateNextItem",
|
||||||
"ctrl-1": ["workspace::ActivatePane", 0],
|
"ctrl-1": ["workspace::ActivatePane", 0],
|
||||||
@@ -14,15 +14,15 @@
|
|||||||
"ctrl-7": ["workspace::ActivatePane", 6],
|
"ctrl-7": ["workspace::ActivatePane", 6],
|
||||||
"ctrl-8": ["workspace::ActivatePane", 7],
|
"ctrl-8": ["workspace::ActivatePane", 7],
|
||||||
"ctrl-9": ["workspace::ActivatePane", 8],
|
"ctrl-9": ["workspace::ActivatePane", 8],
|
||||||
"ctrl-shift-1": ["workspace::MoveItemToPane", { "destination": 0, "focus": true }],
|
"ctrl-!": ["workspace::MoveItemToPane", { "destination": 0, "focus": true }],
|
||||||
"ctrl-shift-2": ["workspace::MoveItemToPane", { "destination": 1 }],
|
"ctrl-@": ["workspace::MoveItemToPane", { "destination": 1 }],
|
||||||
"ctrl-shift-3": ["workspace::MoveItemToPane", { "destination": 2 }],
|
"ctrl-#": ["workspace::MoveItemToPane", { "destination": 2 }],
|
||||||
"ctrl-shift-4": ["workspace::MoveItemToPane", { "destination": 3 }],
|
"ctrl-$": ["workspace::MoveItemToPane", { "destination": 3 }],
|
||||||
"ctrl-shift-5": ["workspace::MoveItemToPane", { "destination": 4 }],
|
"ctrl-%": ["workspace::MoveItemToPane", { "destination": 4 }],
|
||||||
"ctrl-shift-6": ["workspace::MoveItemToPane", { "destination": 5 }],
|
"ctrl-^": ["workspace::MoveItemToPane", { "destination": 5 }],
|
||||||
"ctrl-shift-7": ["workspace::MoveItemToPane", { "destination": 6 }],
|
"ctrl-&": ["workspace::MoveItemToPane", { "destination": 6 }],
|
||||||
"ctrl-shift-8": ["workspace::MoveItemToPane", { "destination": 7 }],
|
"ctrl-*": ["workspace::MoveItemToPane", { "destination": 7 }],
|
||||||
"ctrl-shift-9": ["workspace::MoveItemToPane", { "destination": 8 }]
|
"ctrl-(": ["workspace::MoveItemToPane", { "destination": 8 }]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
"ctrl-e": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
|
"ctrl-e": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
|
||||||
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }], // move-beginning-of-line
|
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }], // move-beginning-of-line
|
||||||
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
|
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
|
||||||
|
"alt-m": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }], // back-to-indentation
|
||||||
"alt-f": "editor::MoveToNextSubwordEnd", // forward-word
|
"alt-f": "editor::MoveToNextSubwordEnd", // forward-word
|
||||||
"alt-b": "editor::MoveToPreviousSubwordStart", // backward-word
|
"alt-b": "editor::MoveToPreviousSubwordStart", // backward-word
|
||||||
"alt-u": "editor::ConvertToUpperCase", // upcase-word
|
"alt-u": "editor::ConvertToUpperCase", // upcase-word
|
||||||
@@ -48,6 +49,8 @@
|
|||||||
"ctrl-_": "editor::Undo", // undo
|
"ctrl-_": "editor::Undo", // undo
|
||||||
"ctrl-/": "editor::Undo", // undo
|
"ctrl-/": "editor::Undo", // undo
|
||||||
"ctrl-x u": "editor::Undo", // undo
|
"ctrl-x u": "editor::Undo", // undo
|
||||||
|
"alt-{": "editor::MoveToStartOfParagraph", // backward-paragraph
|
||||||
|
"alt-}": "editor::MoveToEndOfParagraph", // forward-paragraph
|
||||||
"ctrl-v": "editor::MovePageDown", // scroll-up
|
"ctrl-v": "editor::MovePageDown", // scroll-up
|
||||||
"alt-v": "editor::MovePageUp", // scroll-down
|
"alt-v": "editor::MovePageUp", // scroll-down
|
||||||
"ctrl-x [": "editor::MoveToBeginning", // beginning-of-buffer
|
"ctrl-x [": "editor::MoveToBeginning", // beginning-of-buffer
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"cmd-shift-[": "pane::ActivatePrevItem",
|
"cmd-{": "pane::ActivatePrevItem",
|
||||||
"cmd-shift-]": "pane::ActivateNextItem"
|
"cmd-}": "pane::ActivateNextItem"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "Editor",
|
"context": "Editor",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"ctrl->": "zed::IncreaseBufferFontSize",
|
"ctrl->": ["zed::IncreaseBufferFontSize", { "persist": true }],
|
||||||
"ctrl-<": "zed::DecreaseBufferFontSize",
|
"ctrl-<": ["zed::DecreaseBufferFontSize", { "persist": true }],
|
||||||
"ctrl-shift-j": "editor::JoinLines",
|
"ctrl-shift-j": "editor::JoinLines",
|
||||||
"cmd-d": "editor::DuplicateSelection",
|
"cmd-d": "editor::DuplicateSelection",
|
||||||
"cmd-backspace": "editor::DeleteLine",
|
"cmd-backspace": "editor::DeleteLine",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"cmd-shift-[": "pane::ActivatePrevItem",
|
"cmd-{": "pane::ActivatePrevItem",
|
||||||
"cmd-shift-]": "pane::ActivateNextItem",
|
"cmd-}": "pane::ActivateNextItem",
|
||||||
"ctrl-pageup": "pane::ActivatePrevItem",
|
"ctrl-pageup": "pane::ActivatePrevItem",
|
||||||
"ctrl-pagedown": "pane::ActivateNextItem",
|
"ctrl-pagedown": "pane::ActivateNextItem",
|
||||||
"ctrl-1": ["workspace::ActivatePane", 0],
|
"ctrl-1": ["workspace::ActivatePane", 0],
|
||||||
@@ -14,15 +14,15 @@
|
|||||||
"ctrl-7": ["workspace::ActivatePane", 6],
|
"ctrl-7": ["workspace::ActivatePane", 6],
|
||||||
"ctrl-8": ["workspace::ActivatePane", 7],
|
"ctrl-8": ["workspace::ActivatePane", 7],
|
||||||
"ctrl-9": ["workspace::ActivatePane", 8],
|
"ctrl-9": ["workspace::ActivatePane", 8],
|
||||||
"ctrl-shift-1": ["workspace::MoveItemToPane", { "destination": 0, "focus": true }],
|
"ctrl-!": ["workspace::MoveItemToPane", { "destination": 0, "focus": true }],
|
||||||
"ctrl-shift-2": ["workspace::MoveItemToPane", { "destination": 1 }],
|
"ctrl-@": ["workspace::MoveItemToPane", { "destination": 1 }],
|
||||||
"ctrl-shift-3": ["workspace::MoveItemToPane", { "destination": 2 }],
|
"ctrl-#": ["workspace::MoveItemToPane", { "destination": 2 }],
|
||||||
"ctrl-shift-4": ["workspace::MoveItemToPane", { "destination": 3 }],
|
"ctrl-$": ["workspace::MoveItemToPane", { "destination": 3 }],
|
||||||
"ctrl-shift-5": ["workspace::MoveItemToPane", { "destination": 4 }],
|
"ctrl-%": ["workspace::MoveItemToPane", { "destination": 4 }],
|
||||||
"ctrl-shift-6": ["workspace::MoveItemToPane", { "destination": 5 }],
|
"ctrl-^": ["workspace::MoveItemToPane", { "destination": 5 }],
|
||||||
"ctrl-shift-7": ["workspace::MoveItemToPane", { "destination": 6 }],
|
"ctrl-&": ["workspace::MoveItemToPane", { "destination": 6 }],
|
||||||
"ctrl-shift-8": ["workspace::MoveItemToPane", { "destination": 7 }],
|
"ctrl-*": ["workspace::MoveItemToPane", { "destination": 7 }],
|
||||||
"ctrl-shift-9": ["workspace::MoveItemToPane", { "destination": 8 }]
|
"ctrl-(": ["workspace::MoveItemToPane", { "destination": 8 }]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
{
|
{
|
||||||
"context": "VimControl && !menu",
|
"context": "VimControl && !menu",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"i": ["vim::PushOperator", { "Object": { "around": false } }],
|
"i": ["vim::PushObject", { "around": false }],
|
||||||
"a": ["vim::PushOperator", { "Object": { "around": true } }],
|
"a": ["vim::PushObject", { "around": true }],
|
||||||
"left": "vim::Left",
|
"left": "vim::Left",
|
||||||
"h": "vim::Left",
|
"h": "vim::Left",
|
||||||
"backspace": "vim::Backspace",
|
"backspace": "vim::Backspace",
|
||||||
@@ -37,9 +37,9 @@
|
|||||||
"[ [": "vim::PreviousSectionStart",
|
"[ [": "vim::PreviousSectionStart",
|
||||||
"[ ]": "vim::PreviousSectionEnd",
|
"[ ]": "vim::PreviousSectionEnd",
|
||||||
"] m": "vim::NextMethodStart",
|
"] m": "vim::NextMethodStart",
|
||||||
"] M": "vim::NextMethodEnd",
|
"] shift-m": "vim::NextMethodEnd",
|
||||||
"[ m": "vim::PreviousMethodStart",
|
"[ m": "vim::PreviousMethodStart",
|
||||||
"[ M": "vim::PreviousMethodEnd",
|
"[ shift-m": "vim::PreviousMethodEnd",
|
||||||
"[ *": "vim::PreviousComment",
|
"[ *": "vim::PreviousComment",
|
||||||
"[ /": "vim::PreviousComment",
|
"[ /": "vim::PreviousComment",
|
||||||
"] *": "vim::NextComment",
|
"] *": "vim::NextComment",
|
||||||
@@ -54,10 +54,10 @@
|
|||||||
// "b": "vim::PreviousSubwordStart",
|
// "b": "vim::PreviousSubwordStart",
|
||||||
// "e": "vim::NextSubwordEnd",
|
// "e": "vim::NextSubwordEnd",
|
||||||
// "g e": "vim::PreviousSubwordEnd",
|
// "g e": "vim::PreviousSubwordEnd",
|
||||||
"shift-w": ["vim::NextWordStart", { "ignorePunctuation": true }],
|
"shift-w": ["vim::NextWordStart", { "ignore_punctuation": true }],
|
||||||
"shift-e": ["vim::NextWordEnd", { "ignorePunctuation": true }],
|
"shift-e": ["vim::NextWordEnd", { "ignore_punctuation": true }],
|
||||||
"shift-b": ["vim::PreviousWordStart", { "ignorePunctuation": true }],
|
"shift-b": ["vim::PreviousWordStart", { "ignore_punctuation": true }],
|
||||||
"g shift-e": ["vim::PreviousWordEnd", { "ignorePunctuation": true }],
|
"g shift-e": ["vim::PreviousWordEnd", { "ignore_punctuation": true }],
|
||||||
"/": "vim::Search",
|
"/": "vim::Search",
|
||||||
"g /": "pane::DeploySearch",
|
"g /": "pane::DeploySearch",
|
||||||
"?": ["vim::Search", { "backwards": true }],
|
"?": ["vim::Search", { "backwards": true }],
|
||||||
@@ -70,20 +70,20 @@
|
|||||||
"[ {": ["vim::UnmatchedBackward", { "char": "{" }],
|
"[ {": ["vim::UnmatchedBackward", { "char": "{" }],
|
||||||
"] )": ["vim::UnmatchedForward", { "char": ")" }],
|
"] )": ["vim::UnmatchedForward", { "char": ")" }],
|
||||||
"[ (": ["vim::UnmatchedBackward", { "char": "(" }],
|
"[ (": ["vim::UnmatchedBackward", { "char": "(" }],
|
||||||
"f": ["vim::PushOperator", { "FindForward": { "before": false } }],
|
"f": ["vim::PushFindForward", { "before": false }],
|
||||||
"t": ["vim::PushOperator", { "FindForward": { "before": true } }],
|
"t": ["vim::PushFindForward", { "before": true }],
|
||||||
"shift-f": ["vim::PushOperator", { "FindBackward": { "after": false } }],
|
"shift-f": ["vim::PushFindBackward", { "after": false }],
|
||||||
"shift-t": ["vim::PushOperator", { "FindBackward": { "after": true } }],
|
"shift-t": ["vim::PushFindBackward", { "after": true }],
|
||||||
"m": ["vim::PushOperator", "Mark"],
|
"m": "vim::PushMark",
|
||||||
"'": ["vim::PushOperator", { "Jump": { "line": true } }],
|
"'": ["vim::PushJump", { "line": true }],
|
||||||
"`": ["vim::PushOperator", { "Jump": { "line": false } }],
|
"`": ["vim::PushJump", { "line": false }],
|
||||||
";": "vim::RepeatFind",
|
";": "vim::RepeatFind",
|
||||||
",": "vim::RepeatFindReversed",
|
",": "vim::RepeatFindReversed",
|
||||||
"ctrl-o": "pane::GoBack",
|
"ctrl-o": "pane::GoBack",
|
||||||
"ctrl-i": "pane::GoForward",
|
"ctrl-i": "pane::GoForward",
|
||||||
"ctrl-]": "editor::GoToDefinition",
|
"ctrl-]": "editor::GoToDefinition",
|
||||||
"escape": ["vim::SwitchMode", "Normal"],
|
"escape": "vim::SwitchToNormalMode",
|
||||||
"ctrl-[": ["vim::SwitchMode", "Normal"],
|
"ctrl-[": "vim::SwitchToNormalMode",
|
||||||
"v": "vim::ToggleVisual",
|
"v": "vim::ToggleVisual",
|
||||||
"shift-v": "vim::ToggleVisualLine",
|
"shift-v": "vim::ToggleVisualLine",
|
||||||
"ctrl-g": "vim::ShowLocation",
|
"ctrl-g": "vim::ShowLocation",
|
||||||
@@ -102,6 +102,7 @@
|
|||||||
"ctrl-e": "vim::LineDown",
|
"ctrl-e": "vim::LineDown",
|
||||||
"ctrl-y": "vim::LineUp",
|
"ctrl-y": "vim::LineUp",
|
||||||
// "g" commands
|
// "g" commands
|
||||||
|
"g r": "vim::PushReplaceWithRegister",
|
||||||
"g g": "vim::StartOfDocument",
|
"g g": "vim::StartOfDocument",
|
||||||
"g h": "editor::Hover",
|
"g h": "editor::Hover",
|
||||||
"g t": "pane::ActivateNextItem",
|
"g t": "pane::ActivateNextItem",
|
||||||
@@ -124,17 +125,17 @@
|
|||||||
"g .": "editor::ToggleCodeActions", // zed specific
|
"g .": "editor::ToggleCodeActions", // zed specific
|
||||||
"g shift-a": "editor::FindAllReferences", // zed specific
|
"g shift-a": "editor::FindAllReferences", // zed specific
|
||||||
"g space": "editor::OpenExcerpts", // zed specific
|
"g space": "editor::OpenExcerpts", // zed specific
|
||||||
"g *": ["vim::MoveToNext", { "partialWord": true }],
|
"g *": ["vim::MoveToNext", { "partial_word": true }],
|
||||||
"g #": ["vim::MoveToPrev", { "partialWord": true }],
|
"g #": ["vim::MoveToPrev", { "partial_word": true }],
|
||||||
"g j": ["vim::Down", { "displayLines": true }],
|
"g j": ["vim::Down", { "display_lines": true }],
|
||||||
"g down": ["vim::Down", { "displayLines": true }],
|
"g down": ["vim::Down", { "display_lines": true }],
|
||||||
"g k": ["vim::Up", { "displayLines": true }],
|
"g k": ["vim::Up", { "display_lines": true }],
|
||||||
"g up": ["vim::Up", { "displayLines": true }],
|
"g up": ["vim::Up", { "display_lines": true }],
|
||||||
"g $": ["vim::EndOfLine", { "displayLines": true }],
|
"g $": ["vim::EndOfLine", { "display_lines": true }],
|
||||||
"g end": ["vim::EndOfLine", { "displayLines": true }],
|
"g end": ["vim::EndOfLine", { "display_lines": true }],
|
||||||
"g 0": ["vim::StartOfLine", { "displayLines": true }],
|
"g 0": ["vim::StartOfLine", { "display_lines": true }],
|
||||||
"g home": ["vim::StartOfLine", { "displayLines": true }],
|
"g home": ["vim::StartOfLine", { "display_lines": true }],
|
||||||
"g ^": ["vim::FirstNonWhitespace", { "displayLines": true }],
|
"g ^": ["vim::FirstNonWhitespace", { "display_lines": true }],
|
||||||
"g v": "vim::RestoreVisualSelection",
|
"g v": "vim::RestoreVisualSelection",
|
||||||
"g ]": "editor::GoToDiagnostic",
|
"g ]": "editor::GoToDiagnostic",
|
||||||
"g [": "editor::GoToPrevDiagnostic",
|
"g [": "editor::GoToPrevDiagnostic",
|
||||||
@@ -146,7 +147,7 @@
|
|||||||
"shift-l": "vim::WindowBottom",
|
"shift-l": "vim::WindowBottom",
|
||||||
"q": "vim::ToggleRecord",
|
"q": "vim::ToggleRecord",
|
||||||
"shift-q": "vim::ReplayLastRecording",
|
"shift-q": "vim::ReplayLastRecording",
|
||||||
"@": ["vim::PushOperator", "ReplayRegister"],
|
"@": "vim::PushReplayRegister",
|
||||||
// z commands
|
// z commands
|
||||||
"z enter": ["workspace::SendKeystrokes", "z t ^"],
|
"z enter": ["workspace::SendKeystrokes", "z t ^"],
|
||||||
"z -": ["workspace::SendKeystrokes", "z b ^"],
|
"z -": ["workspace::SendKeystrokes", "z b ^"],
|
||||||
@@ -165,8 +166,8 @@
|
|||||||
"z f": "editor::FoldSelectedRanges",
|
"z f": "editor::FoldSelectedRanges",
|
||||||
"z shift-m": "editor::FoldAll",
|
"z shift-m": "editor::FoldAll",
|
||||||
"z shift-r": "editor::UnfoldAll",
|
"z shift-r": "editor::UnfoldAll",
|
||||||
"shift-z shift-q": ["pane::CloseActiveItem", { "saveIntent": "skip" }],
|
"shift-z shift-q": ["pane::CloseActiveItem", { "save_intent": "skip" }],
|
||||||
"shift-z shift-z": ["pane::CloseActiveItem", { "saveIntent": "saveAll" }],
|
"shift-z shift-z": ["pane::CloseActiveItem", { "save_intent": "save_all" }],
|
||||||
// Count support
|
// Count support
|
||||||
"1": ["vim::Number", 1],
|
"1": ["vim::Number", 1],
|
||||||
"2": ["vim::Number", 2],
|
"2": ["vim::Number", 2],
|
||||||
@@ -193,13 +194,13 @@
|
|||||||
"escape": "editor::Cancel",
|
"escape": "editor::Cancel",
|
||||||
":": "command_palette::Toggle",
|
":": "command_palette::Toggle",
|
||||||
".": "vim::Repeat",
|
".": "vim::Repeat",
|
||||||
"c": ["vim::PushOperator", "Change"],
|
"c": "vim::PushChange",
|
||||||
"shift-c": "vim::ChangeToEndOfLine",
|
"shift-c": "vim::ChangeToEndOfLine",
|
||||||
"d": ["vim::PushOperator", "Delete"],
|
"d": "vim::PushDelete",
|
||||||
"shift-d": "vim::DeleteToEndOfLine",
|
"shift-d": "vim::DeleteToEndOfLine",
|
||||||
"shift-j": "vim::JoinLines",
|
"shift-j": "vim::JoinLines",
|
||||||
"g shift-j": "vim::JoinLinesNoWhitespace",
|
"g shift-j": "vim::JoinLinesNoWhitespace",
|
||||||
"y": ["vim::PushOperator", "Yank"],
|
"y": "vim::PushYank",
|
||||||
"shift-y": "vim::YankLine",
|
"shift-y": "vim::YankLine",
|
||||||
"i": "vim::InsertBefore",
|
"i": "vim::InsertBefore",
|
||||||
"shift-i": "vim::InsertFirstNonWhitespace",
|
"shift-i": "vim::InsertFirstNonWhitespace",
|
||||||
@@ -216,19 +217,19 @@
|
|||||||
"shift-p": ["vim::Paste", { "before": true }],
|
"shift-p": ["vim::Paste", { "before": true }],
|
||||||
"u": "vim::Undo",
|
"u": "vim::Undo",
|
||||||
"ctrl-r": "vim::Redo",
|
"ctrl-r": "vim::Redo",
|
||||||
"r": ["vim::PushOperator", "Replace"],
|
"r": "vim::PushReplace",
|
||||||
"s": "vim::Substitute",
|
"s": "vim::Substitute",
|
||||||
"shift-s": "vim::SubstituteLine",
|
"shift-s": "vim::SubstituteLine",
|
||||||
">": ["vim::PushOperator", "Indent"],
|
">": "vim::PushIndent",
|
||||||
"<": ["vim::PushOperator", "Outdent"],
|
"<": "vim::PushOutdent",
|
||||||
"=": ["vim::PushOperator", "AutoIndent"],
|
"=": "vim::PushAutoIndent",
|
||||||
"!": ["vim::PushOperator", "ShellCommand"],
|
"!": "vim::PushShellCommand",
|
||||||
"g u": ["vim::PushOperator", "Lowercase"],
|
"g u": "vim::PushLowercase",
|
||||||
"g shift-u": ["vim::PushOperator", "Uppercase"],
|
"g shift-u": "vim::PushUppercase",
|
||||||
"g ~": ["vim::PushOperator", "OppositeCase"],
|
"g ~": "vim::PushOppositeCase",
|
||||||
"\"": ["vim::PushOperator", "Register"],
|
"\"": "vim::PushRegister",
|
||||||
"g w": ["vim::PushOperator", "Rewrap"],
|
"g w": "vim::PushRewrap",
|
||||||
"g q": ["vim::PushOperator", "Rewrap"],
|
"g q": "vim::PushRewrap",
|
||||||
"ctrl-pagedown": "pane::ActivateNextItem",
|
"ctrl-pagedown": "pane::ActivateNextItem",
|
||||||
"ctrl-pageup": "pane::ActivatePrevItem",
|
"ctrl-pageup": "pane::ActivatePrevItem",
|
||||||
"insert": "vim::InsertBefore",
|
"insert": "vim::InsertBefore",
|
||||||
@@ -239,7 +240,7 @@
|
|||||||
"[ d": "editor::GoToPrevDiagnostic",
|
"[ d": "editor::GoToPrevDiagnostic",
|
||||||
"] c": "editor::GoToHunk",
|
"] c": "editor::GoToHunk",
|
||||||
"[ c": "editor::GoToPrevHunk",
|
"[ c": "editor::GoToPrevHunk",
|
||||||
"g c": ["vim::PushOperator", "ToggleComments"]
|
"g c": "vim::PushToggleComments"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -264,14 +265,14 @@
|
|||||||
"y": "vim::VisualYank",
|
"y": "vim::VisualYank",
|
||||||
"shift-y": "vim::VisualYankLine",
|
"shift-y": "vim::VisualYankLine",
|
||||||
"p": "vim::Paste",
|
"p": "vim::Paste",
|
||||||
"shift-p": ["vim::Paste", { "preserveClipboard": true }],
|
"shift-p": ["vim::Paste", { "preserve_clipboard": true }],
|
||||||
"c": "vim::Substitute",
|
"c": "vim::Substitute",
|
||||||
"s": "vim::Substitute",
|
"s": "vim::Substitute",
|
||||||
"shift-r": "vim::SubstituteLine",
|
"shift-r": "vim::SubstituteLine",
|
||||||
"shift-s": "vim::SubstituteLine",
|
"shift-s": "vim::SubstituteLine",
|
||||||
"~": "vim::ChangeCase",
|
"~": "vim::ChangeCase",
|
||||||
"*": ["vim::MoveToNext", { "partialWord": true }],
|
"*": ["vim::MoveToNext", { "partial_word": true }],
|
||||||
"#": ["vim::MoveToPrev", { "partialWord": true }],
|
"#": ["vim::MoveToPrev", { "partial_word": true }],
|
||||||
"ctrl-a": "vim::Increment",
|
"ctrl-a": "vim::Increment",
|
||||||
"ctrl-x": "vim::Decrement",
|
"ctrl-x": "vim::Decrement",
|
||||||
"g ctrl-a": ["vim::Increment", { "step": true }],
|
"g ctrl-a": ["vim::Increment", { "step": true }],
|
||||||
@@ -282,19 +283,20 @@
|
|||||||
"g shift-a": "vim::VisualInsertEndOfLine",
|
"g shift-a": "vim::VisualInsertEndOfLine",
|
||||||
"shift-j": "vim::JoinLines",
|
"shift-j": "vim::JoinLines",
|
||||||
"g shift-j": "vim::JoinLinesNoWhitespace",
|
"g shift-j": "vim::JoinLinesNoWhitespace",
|
||||||
"r": ["vim::PushOperator", "Replace"],
|
"r": "vim::PushReplace",
|
||||||
"ctrl-c": ["vim::SwitchMode", "Normal"],
|
"ctrl-c": "vim::SwitchToNormalMode",
|
||||||
"ctrl-[": ["vim::SwitchMode", "Normal"],
|
"ctrl-[": "vim::SwitchToNormalMode",
|
||||||
"escape": ["vim::SwitchMode", "Normal"],
|
"escape": "vim::SwitchToNormalMode",
|
||||||
">": "vim::Indent",
|
">": "vim::Indent",
|
||||||
"<": "vim::Outdent",
|
"<": "vim::Outdent",
|
||||||
"=": "vim::AutoIndent",
|
"=": "vim::AutoIndent",
|
||||||
"!": "vim::ShellCommand",
|
"!": "vim::ShellCommand",
|
||||||
"i": ["vim::PushOperator", { "Object": { "around": false } }],
|
"i": ["vim::PushObject", { "around": false }],
|
||||||
"a": ["vim::PushOperator", { "Object": { "around": true } }],
|
"a": ["vim::PushObject", { "around": true }],
|
||||||
|
"g r": ["vim::Paste", { "preserve_clipboard": true }],
|
||||||
"g c": "vim::ToggleComments",
|
"g c": "vim::ToggleComments",
|
||||||
"g q": "vim::Rewrap",
|
"g q": "vim::Rewrap",
|
||||||
"\"": ["vim::PushOperator", "Register"],
|
"\"": "vim::PushRegister",
|
||||||
// tree-sitter related commands
|
// tree-sitter related commands
|
||||||
"[ x": "editor::SelectLargerSyntaxNode",
|
"[ x": "editor::SelectLargerSyntaxNode",
|
||||||
"] x": "editor::SelectSmallerSyntaxNode"
|
"] x": "editor::SelectSmallerSyntaxNode"
|
||||||
@@ -309,19 +311,19 @@
|
|||||||
"ctrl-x": null,
|
"ctrl-x": null,
|
||||||
"ctrl-x ctrl-o": "editor::ShowCompletions",
|
"ctrl-x ctrl-o": "editor::ShowCompletions",
|
||||||
"ctrl-x ctrl-a": "assistant::InlineAssist", // zed specific
|
"ctrl-x ctrl-a": "assistant::InlineAssist", // zed specific
|
||||||
"ctrl-x ctrl-c": "editor::ShowInlineCompletion", // zed specific
|
"ctrl-x ctrl-c": "editor::ShowEditPrediction", // zed specific
|
||||||
"ctrl-x ctrl-l": "editor::ToggleCodeActions", // zed specific
|
"ctrl-x ctrl-l": "editor::ToggleCodeActions", // zed specific
|
||||||
"ctrl-x ctrl-z": "editor::Cancel",
|
"ctrl-x ctrl-z": "editor::Cancel",
|
||||||
"ctrl-w": "editor::DeleteToPreviousWordStart",
|
"ctrl-w": "editor::DeleteToPreviousWordStart",
|
||||||
"ctrl-u": "editor::DeleteToBeginningOfLine",
|
"ctrl-u": "editor::DeleteToBeginningOfLine",
|
||||||
"ctrl-t": "vim::Indent",
|
"ctrl-t": "vim::Indent",
|
||||||
"ctrl-d": "vim::Outdent",
|
"ctrl-d": "vim::Outdent",
|
||||||
"ctrl-k": ["vim::PushOperator", { "Digraph": {} }],
|
"ctrl-k": ["vim::PushDigraph", {}],
|
||||||
"ctrl-v": ["vim::PushOperator", { "Literal": {} }],
|
"ctrl-v": ["vim::PushLiteral", {}],
|
||||||
"ctrl-shift-v": "editor::Paste", // note: this is *very* similar to ctrl-v in vim, but ctrl-shift-v on linux is the typical shortcut for paste when ctrl-v is already in use.
|
"ctrl-shift-v": "editor::Paste", // note: this is *very* similar to ctrl-v in vim, but ctrl-shift-v on linux is the typical shortcut for paste when ctrl-v is already in use.
|
||||||
"ctrl-q": ["vim::PushOperator", { "Literal": {} }],
|
"ctrl-q": ["vim::PushLiteral", {}],
|
||||||
"ctrl-shift-q": ["vim::PushOperator", { "Literal": {} }],
|
"ctrl-shift-q": ["vim::PushLiteral", {}],
|
||||||
"ctrl-r": ["vim::PushOperator", "Register"],
|
"ctrl-r": "vim::PushRegister",
|
||||||
"insert": "vim::ToggleReplace",
|
"insert": "vim::ToggleReplace",
|
||||||
"ctrl-o": "vim::TemporaryNormal"
|
"ctrl-o": "vim::TemporaryNormal"
|
||||||
}
|
}
|
||||||
@@ -356,11 +358,11 @@
|
|||||||
"ctrl-c": "vim::NormalBefore",
|
"ctrl-c": "vim::NormalBefore",
|
||||||
"ctrl-[": "vim::NormalBefore",
|
"ctrl-[": "vim::NormalBefore",
|
||||||
"escape": "vim::NormalBefore",
|
"escape": "vim::NormalBefore",
|
||||||
"ctrl-k": ["vim::PushOperator", { "Digraph": {} }],
|
"ctrl-k": ["vim::PushDigraph", {}],
|
||||||
"ctrl-v": ["vim::PushOperator", { "Literal": {} }],
|
"ctrl-v": ["vim::PushLiteral", {}],
|
||||||
"ctrl-shift-v": "editor::Paste", // note: this is *very* similar to ctrl-v in vim, but ctrl-shift-v on linux is the typical shortcut for paste when ctrl-v is already in use.
|
"ctrl-shift-v": "editor::Paste", // note: this is *very* similar to ctrl-v in vim, but ctrl-shift-v on linux is the typical shortcut for paste when ctrl-v is already in use.
|
||||||
"ctrl-q": ["vim::PushOperator", { "Literal": {} }],
|
"ctrl-q": ["vim::PushLiteral", {}],
|
||||||
"ctrl-shift-q": ["vim::PushOperator", { "Literal": {} }],
|
"ctrl-shift-q": ["vim::PushLiteral", {}],
|
||||||
"backspace": "vim::UndoReplace",
|
"backspace": "vim::UndoReplace",
|
||||||
"tab": "vim::Tab",
|
"tab": "vim::Tab",
|
||||||
"enter": "vim::Enter",
|
"enter": "vim::Enter",
|
||||||
@@ -375,9 +377,15 @@
|
|||||||
"ctrl-c": "vim::ClearOperators",
|
"ctrl-c": "vim::ClearOperators",
|
||||||
"ctrl-[": "vim::ClearOperators",
|
"ctrl-[": "vim::ClearOperators",
|
||||||
"escape": "vim::ClearOperators",
|
"escape": "vim::ClearOperators",
|
||||||
"ctrl-k": ["vim::PushOperator", { "Digraph": {} }],
|
"ctrl-k": ["vim::PushDigraph", {}],
|
||||||
"ctrl-v": ["vim::PushOperator", { "Literal": {} }],
|
"ctrl-v": ["vim::PushLiteral", {}],
|
||||||
"ctrl-q": ["vim::PushOperator", { "Literal": {} }]
|
"ctrl-q": ["vim::PushLiteral", {}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Editor && vim_mode == waiting && (vim_operator == ys || vim_operator == cs)",
|
||||||
|
"bindings": {
|
||||||
|
"escape": "vim::SwitchToNormalMode"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -393,10 +401,10 @@
|
|||||||
"context": "vim_operator == a || vim_operator == i || vim_operator == cs",
|
"context": "vim_operator == a || vim_operator == i || vim_operator == cs",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"w": "vim::Word",
|
"w": "vim::Word",
|
||||||
"shift-w": ["vim::Word", { "ignorePunctuation": true }],
|
"shift-w": ["vim::Word", { "ignore_punctuation": true }],
|
||||||
// Subword TextObject
|
// Subword TextObject
|
||||||
// "w": "vim::Subword",
|
// "w": "vim::Subword",
|
||||||
// "shift-w": ["vim::Subword", { "ignorePunctuation": true }],
|
// "shift-w": ["vim::Subword", { "ignore_punctuation": true }],
|
||||||
"t": "vim::Tag",
|
"t": "vim::Tag",
|
||||||
"s": "vim::Sentence",
|
"s": "vim::Sentence",
|
||||||
"p": "vim::Paragraph",
|
"p": "vim::Paragraph",
|
||||||
@@ -419,26 +427,28 @@
|
|||||||
">": "vim::AngleBrackets",
|
">": "vim::AngleBrackets",
|
||||||
"a": "vim::Argument",
|
"a": "vim::Argument",
|
||||||
"i": "vim::IndentObj",
|
"i": "vim::IndentObj",
|
||||||
"shift-i": ["vim::IndentObj", { "includeBelow": true }],
|
"shift-i": ["vim::IndentObj", { "include_below": true }],
|
||||||
"f": "vim::Method",
|
"f": "vim::Method",
|
||||||
"c": "vim::Class"
|
"c": "vim::Class",
|
||||||
|
"e": "vim::EntireFile"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "vim_operator == c",
|
"context": "vim_operator == c",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"c": "vim::CurrentLine",
|
"c": "vim::CurrentLine",
|
||||||
|
"x": "vim::Exchange",
|
||||||
"d": "editor::Rename", // zed specific
|
"d": "editor::Rename", // zed specific
|
||||||
"s": ["vim::PushOperator", { "ChangeSurrounds": {} }]
|
"s": ["vim::PushChangeSurrounds", {}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "vim_operator == d",
|
"context": "vim_operator == d",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"d": "vim::CurrentLine",
|
"d": "vim::CurrentLine",
|
||||||
"s": ["vim::PushOperator", "DeleteSurrounds"],
|
"s": "vim::PushDeleteSurrounds",
|
||||||
"o": "editor::ToggleSelectedDiffHunks", // "d o"
|
"o": "editor::ToggleSelectedDiffHunks", // "d o"
|
||||||
"p": "editor::RevertSelectedHunks" // "d p"
|
"p": "git::Restore" // "d p"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -475,7 +485,7 @@
|
|||||||
"context": "vim_operator == y",
|
"context": "vim_operator == y",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"y": "vim::CurrentLine",
|
"y": "vim::CurrentLine",
|
||||||
"s": ["vim::PushOperator", { "AddSurrounds": {} }]
|
"s": ["vim::PushAddSurrounds", {}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -514,6 +524,19 @@
|
|||||||
"c": "vim::CurrentLine"
|
"c": "vim::CurrentLine"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"context": "vim_operator == gr",
|
||||||
|
"bindings": {
|
||||||
|
"r": "vim::CurrentLine"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "vim_operator == cx",
|
||||||
|
"bindings": {
|
||||||
|
"x": "vim::CurrentLine",
|
||||||
|
"c": "vim::ClearExchange"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"context": "vim_mode == literal",
|
"context": "vim_mode == literal",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
@@ -565,34 +588,34 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView",
|
"context": "GitPanel || ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
// window related commands (ctrl-w X)
|
// window related commands (ctrl-w X)
|
||||||
"ctrl-w": null,
|
"ctrl-w": null,
|
||||||
"ctrl-w left": ["workspace::ActivatePaneInDirection", "Left"],
|
"ctrl-w left": "workspace::ActivatePaneLeft",
|
||||||
"ctrl-w right": ["workspace::ActivatePaneInDirection", "Right"],
|
"ctrl-w right": "workspace::ActivatePaneRight",
|
||||||
"ctrl-w up": ["workspace::ActivatePaneInDirection", "Up"],
|
"ctrl-w up": "workspace::ActivatePaneUp",
|
||||||
"ctrl-w down": ["workspace::ActivatePaneInDirection", "Down"],
|
"ctrl-w down": "workspace::ActivatePaneDown",
|
||||||
"ctrl-w ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
|
"ctrl-w ctrl-h": "workspace::ActivatePaneLeft",
|
||||||
"ctrl-w ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
|
"ctrl-w ctrl-l": "workspace::ActivatePaneRight",
|
||||||
"ctrl-w ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
|
"ctrl-w ctrl-k": "workspace::ActivatePaneUp",
|
||||||
"ctrl-w ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
|
"ctrl-w ctrl-j": "workspace::ActivatePaneDown",
|
||||||
"ctrl-w h": ["workspace::ActivatePaneInDirection", "Left"],
|
"ctrl-w h": "workspace::ActivatePaneLeft",
|
||||||
"ctrl-w l": ["workspace::ActivatePaneInDirection", "Right"],
|
"ctrl-w l": "workspace::ActivatePaneRight",
|
||||||
"ctrl-w k": ["workspace::ActivatePaneInDirection", "Up"],
|
"ctrl-w k": "workspace::ActivatePaneUp",
|
||||||
"ctrl-w j": ["workspace::ActivatePaneInDirection", "Down"],
|
"ctrl-w j": "workspace::ActivatePaneDown",
|
||||||
"ctrl-w shift-left": ["workspace::SwapPaneInDirection", "Left"],
|
"ctrl-w shift-left": "workspace::SwapPaneLeft",
|
||||||
"ctrl-w shift-right": ["workspace::SwapPaneInDirection", "Right"],
|
"ctrl-w shift-right": "workspace::SwapPaneRight",
|
||||||
"ctrl-w shift-up": ["workspace::SwapPaneInDirection", "Up"],
|
"ctrl-w shift-up": "workspace::SwapPaneUp",
|
||||||
"ctrl-w shift-down": ["workspace::SwapPaneInDirection", "Down"],
|
"ctrl-w shift-down": "workspace::SwapPaneDown",
|
||||||
"ctrl-w shift-h": ["workspace::SwapPaneInDirection", "Left"],
|
"ctrl-w shift-h": "workspace::SwapPaneLeft",
|
||||||
"ctrl-w shift-l": ["workspace::SwapPaneInDirection", "Right"],
|
"ctrl-w shift-l": "workspace::SwapPaneRight",
|
||||||
"ctrl-w shift-k": ["workspace::SwapPaneInDirection", "Up"],
|
"ctrl-w shift-k": "workspace::SwapPaneUp",
|
||||||
"ctrl-w shift-j": ["workspace::SwapPaneInDirection", "Down"],
|
"ctrl-w shift-j": "workspace::SwapPaneDown",
|
||||||
"ctrl-w >": ["vim::ResizePane", "Widen"],
|
"ctrl-w >": "vim::ResizePaneRight",
|
||||||
"ctrl-w <": ["vim::ResizePane", "Narrow"],
|
"ctrl-w <": "vim::ResizePaneLeft",
|
||||||
"ctrl-w -": ["vim::ResizePane", "Shorten"],
|
"ctrl-w -": "vim::ResizePaneDown",
|
||||||
"ctrl-w +": ["vim::ResizePane", "Lengthen"],
|
"ctrl-w +": "vim::ResizePaneUp",
|
||||||
"ctrl-w _": "vim::MaximizePane",
|
"ctrl-w _": "vim::MaximizePane",
|
||||||
"ctrl-w =": "vim::ResetPaneSizes",
|
"ctrl-w =": "vim::ResetPaneSizes",
|
||||||
"ctrl-w g t": "pane::ActivateNextItem",
|
"ctrl-w g t": "pane::ActivateNextItem",
|
||||||
@@ -610,10 +633,12 @@
|
|||||||
"ctrl-w shift-s": "pane::SplitHorizontal",
|
"ctrl-w shift-s": "pane::SplitHorizontal",
|
||||||
"ctrl-w ctrl-s": "pane::SplitHorizontal",
|
"ctrl-w ctrl-s": "pane::SplitHorizontal",
|
||||||
"ctrl-w s": "pane::SplitHorizontal",
|
"ctrl-w s": "pane::SplitHorizontal",
|
||||||
"ctrl-w ctrl-c": "pane::CloseAllItems",
|
"ctrl-w ctrl-c": "pane::CloseActiveItem",
|
||||||
"ctrl-w c": "pane::CloseAllItems",
|
"ctrl-w c": "pane::CloseActiveItem",
|
||||||
"ctrl-w ctrl-q": "pane::CloseAllItems",
|
"ctrl-w ctrl-q": "pane::CloseActiveItem",
|
||||||
"ctrl-w q": "pane::CloseAllItems",
|
"ctrl-w q": "pane::CloseActiveItem",
|
||||||
|
"ctrl-w ctrl-a": "pane::CloseAllItems",
|
||||||
|
"ctrl-w a": "pane::CloseAllItems",
|
||||||
"ctrl-w ctrl-o": "workspace::CloseInactiveTabsAndPanes",
|
"ctrl-w ctrl-o": "workspace::CloseInactiveTabsAndPanes",
|
||||||
"ctrl-w o": "workspace::CloseInactiveTabsAndPanes",
|
"ctrl-w o": "workspace::CloseInactiveTabsAndPanes",
|
||||||
"ctrl-w ctrl-n": "workspace::NewFileSplitHorizontal",
|
"ctrl-w ctrl-n": "workspace::NewFileSplitHorizontal",
|
||||||
@@ -621,7 +646,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "EmptyPane || SharedScreen || MarkdownPreview || KeyContextView || Welcome",
|
"context": "ChangesList || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView || Welcome",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
":": "command_palette::Toggle",
|
":": "command_palette::Toggle",
|
||||||
"g /": "pane::DeploySearch"
|
"g /": "pane::DeploySearch"
|
||||||
@@ -684,5 +709,22 @@
|
|||||||
"shift-x": "git::StageAll",
|
"shift-x": "git::StageAll",
|
||||||
"shift-u": "git::UnstageAll"
|
"shift-u": "git::UnstageAll"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Editor && edit_prediction",
|
||||||
|
"bindings": {
|
||||||
|
// This is identical to the binding in the base keymap, but the vim bindings above to
|
||||||
|
// "vim::Tab" shadow it, so it needs to be bound again.
|
||||||
|
"tab": "editor::AcceptEditPrediction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "os != macos && Editor && edit_prediction_conflict",
|
||||||
|
"bindings": {
|
||||||
|
// alt-l is provided as an alternative to tab/alt-tab. and will be displayed in the UI. This
|
||||||
|
// is because alt-tab may not be available, as it is often used for window switching on Linux
|
||||||
|
// and Windows.
|
||||||
|
"alt-l": "editor::AcceptEditPrediction"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -10,8 +10,9 @@
|
|||||||
"light": "One Light",
|
"light": "One Light",
|
||||||
"dark": "One Dark"
|
"dark": "One Dark"
|
||||||
},
|
},
|
||||||
|
"icon_theme": "Zed (Default)",
|
||||||
// The name of a base set of key bindings to use.
|
// The name of a base set of key bindings to use.
|
||||||
// This setting can take four values, each named after another
|
// This setting can take six values, each named after another
|
||||||
// text editor:
|
// text editor:
|
||||||
//
|
//
|
||||||
// 1. "VSCode"
|
// 1. "VSCode"
|
||||||
@@ -23,8 +24,8 @@
|
|||||||
"base_keymap": "VSCode",
|
"base_keymap": "VSCode",
|
||||||
// Features that can be globally enabled or disabled
|
// Features that can be globally enabled or disabled
|
||||||
"features": {
|
"features": {
|
||||||
// Which inline completion provider to use.
|
// Which edit prediction provider to use.
|
||||||
"inline_completion_provider": "copilot"
|
"edit_prediction_provider": "copilot"
|
||||||
},
|
},
|
||||||
// The name of a font to use for rendering text in the editor
|
// The name of a font to use for rendering text in the editor
|
||||||
"buffer_font_family": "Zed Plex Mono",
|
"buffer_font_family": "Zed Plex Mono",
|
||||||
@@ -92,6 +93,13 @@
|
|||||||
// workspace when the centered layout is used.
|
// workspace when the centered layout is used.
|
||||||
"right_padding": 0.2
|
"right_padding": 0.2
|
||||||
},
|
},
|
||||||
|
// All settings related to the image viewer.
|
||||||
|
"image_viewer": {
|
||||||
|
// The unit for image file sizes.
|
||||||
|
// By default we're setting it to binary.
|
||||||
|
// The second option is decimal.
|
||||||
|
"unit": "binary"
|
||||||
|
},
|
||||||
// The key to use for adding multiple cursors
|
// The key to use for adding multiple cursors
|
||||||
// Currently "alt" or "cmd_or_ctrl" (also aliased as
|
// Currently "alt" or "cmd_or_ctrl" (also aliased as
|
||||||
// "cmd" and "ctrl") are supported.
|
// "cmd" and "ctrl") are supported.
|
||||||
@@ -118,6 +126,13 @@
|
|||||||
// 3. Never close the window
|
// 3. Never close the window
|
||||||
// "when_closing_with_no_tabs": "keep_window_open",
|
// "when_closing_with_no_tabs": "keep_window_open",
|
||||||
"when_closing_with_no_tabs": "platform_default",
|
"when_closing_with_no_tabs": "platform_default",
|
||||||
|
// What to do when the last window is closed.
|
||||||
|
// May take 2 values:
|
||||||
|
// 1. Use the current platform's convention
|
||||||
|
// "on_last_window_closed": "platform_default"
|
||||||
|
// 2. Always quit the application
|
||||||
|
// "on_last_window_closed": "quit_app",
|
||||||
|
"on_last_window_closed": "platform_default",
|
||||||
// Whether to use the system provided dialogs for Open and Save As.
|
// Whether to use the system provided dialogs for Open and Save As.
|
||||||
// When set to false, Zed will use the built-in keyboard-first pickers.
|
// When set to false, Zed will use the built-in keyboard-first pickers.
|
||||||
"use_system_path_prompts": true,
|
"use_system_path_prompts": true,
|
||||||
@@ -146,6 +161,10 @@
|
|||||||
// 4. Highlight the full line (default):
|
// 4. Highlight the full line (default):
|
||||||
// "all"
|
// "all"
|
||||||
"current_line_highlight": "all",
|
"current_line_highlight": "all",
|
||||||
|
// Whether to highlight all occurrences of the selected text in an editor.
|
||||||
|
"selection_highlight": true,
|
||||||
|
// The debounce delay before querying highlights based on the selected text.
|
||||||
|
"selection_highlight_debounce": 50,
|
||||||
// The debounce delay before querying highlights from the language
|
// The debounce delay before querying highlights from the language
|
||||||
// server based on the current cursor location.
|
// server based on the current cursor location.
|
||||||
"lsp_highlight_debounce": 75,
|
"lsp_highlight_debounce": 75,
|
||||||
@@ -157,12 +176,9 @@
|
|||||||
"show_completion_documentation": true,
|
"show_completion_documentation": true,
|
||||||
// Show method signatures in the editor, when inside parentheses.
|
// Show method signatures in the editor, when inside parentheses.
|
||||||
"auto_signature_help": false,
|
"auto_signature_help": false,
|
||||||
/// Whether to show the signature help after completion or a bracket pair inserted.
|
// Whether to show the signature help after completion or a bracket pair inserted.
|
||||||
/// If `auto_signature_help` is enabled, this setting will be treated as enabled also.
|
// If `auto_signature_help` is enabled, this setting will be treated as enabled also.
|
||||||
"show_signature_help_after_edits": false,
|
"show_signature_help_after_edits": false,
|
||||||
/// Whether to show the inline completions next to the completions provided by a language server.
|
|
||||||
/// Only has an effect if inline completion provider supports it.
|
|
||||||
"show_inline_completions_in_menu": true,
|
|
||||||
// Whether to show wrap guides (vertical rulers) in the editor.
|
// Whether to show wrap guides (vertical rulers) in the editor.
|
||||||
// Setting this to true will show a guide at the 'preferred_line_length' value
|
// Setting this to true will show a guide at the 'preferred_line_length' value
|
||||||
// if 'soft_wrap' is set to 'preferred_line_length', and will show any
|
// if 'soft_wrap' is set to 'preferred_line_length', and will show any
|
||||||
@@ -195,15 +211,32 @@
|
|||||||
// Otherwise(when `true`), the closing characters are always skipped over and auto-removed
|
// Otherwise(when `true`), the closing characters are always skipped over and auto-removed
|
||||||
// no matter how they were inserted.
|
// no matter how they were inserted.
|
||||||
"always_treat_brackets_as_autoclosed": false,
|
"always_treat_brackets_as_autoclosed": false,
|
||||||
// Controls whether inline completions are shown immediately (true)
|
// Controls where the `editor::Rewrap` action is allowed in the current language scope.
|
||||||
// or manually by triggering `editor::ShowInlineCompletion` (false).
|
//
|
||||||
"show_inline_completions": true,
|
|
||||||
// Controls whether inline completions are shown in a given language scope.
|
|
||||||
// Example: ["string", "comment"]
|
|
||||||
"inline_completions_disabled_in": [],
|
|
||||||
// Whether to show tabs and spaces in the editor.
|
|
||||||
// This setting can take three values:
|
// This setting can take three values:
|
||||||
//
|
//
|
||||||
|
// 1. Only allow rewrapping in comments:
|
||||||
|
// "in_comments"
|
||||||
|
// 2. Only allow rewrapping in the current selection(s):
|
||||||
|
// "in_selections"
|
||||||
|
// 3. Allow rewrapping anywhere:
|
||||||
|
// "anywhere"
|
||||||
|
//
|
||||||
|
// When using values other than `in_comments`, it is possible for the rewrapping to produce code
|
||||||
|
// that is syntactically invalid. Keep this in mind when selecting which behavior you would like
|
||||||
|
// to use.
|
||||||
|
//
|
||||||
|
// Note: This setting has no effect in Vim mode, as rewrap is already allowed everywhere.
|
||||||
|
"allow_rewrap": "in_comments",
|
||||||
|
// Controls whether edit predictions are shown immediately (true)
|
||||||
|
// or manually by triggering `editor::ShowEditPrediction` (false).
|
||||||
|
"show_edit_predictions": true,
|
||||||
|
// Controls whether edit predictions are shown in a given language scope.
|
||||||
|
// Example: ["string", "comment"]
|
||||||
|
"edit_predictions_disabled_in": [],
|
||||||
|
// Whether to show tabs and spaces in the editor.
|
||||||
|
// This setting can take four values:
|
||||||
|
//
|
||||||
// 1. Draw tabs and spaces only for the selected text (default):
|
// 1. Draw tabs and spaces only for the selected text (default):
|
||||||
// "selection"
|
// "selection"
|
||||||
// 2. Do not draw any tabs or spaces:
|
// 2. Do not draw any tabs or spaces:
|
||||||
@@ -254,6 +287,8 @@
|
|||||||
"git_diff": true,
|
"git_diff": true,
|
||||||
// Whether to show buffer search results in the scrollbar.
|
// Whether to show buffer search results in the scrollbar.
|
||||||
"search_results": true,
|
"search_results": true,
|
||||||
|
// Whether to show selected text occurrences in the scrollbar.
|
||||||
|
"selected_text": true,
|
||||||
// Whether to show selected symbol occurrences in the scrollbar.
|
// Whether to show selected symbol occurrences in the scrollbar.
|
||||||
"selected_symbol": true,
|
"selected_symbol": true,
|
||||||
// Which diagnostic indicators to show in the scrollbar:
|
// Which diagnostic indicators to show in the scrollbar:
|
||||||
@@ -263,11 +298,11 @@
|
|||||||
// - "information": show only errors, warnings, and information
|
// - "information": show only errors, warnings, and information
|
||||||
// - "all" or true: show all diagnostics
|
// - "all" or true: show all diagnostics
|
||||||
"diagnostics": "all",
|
"diagnostics": "all",
|
||||||
/// Forcefully enable or disable the scrollbar for each axis
|
// Forcefully enable or disable the scrollbar for each axis
|
||||||
"axes": {
|
"axes": {
|
||||||
/// When false, forcefully disables the horizontal scrollbar. Otherwise, obey other settings.
|
// When false, forcefully disables the horizontal scrollbar. Otherwise, obey other settings.
|
||||||
"horizontal": true,
|
"horizontal": true,
|
||||||
/// When false, forcefully disables the vertical scrollbar. Otherwise, obey other settings.
|
// When false, forcefully disables the vertical scrollbar. Otherwise, obey other settings.
|
||||||
"vertical": true
|
"vertical": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -293,24 +328,24 @@
|
|||||||
"folds": true
|
"folds": true
|
||||||
},
|
},
|
||||||
"indent_guides": {
|
"indent_guides": {
|
||||||
/// Whether to show indent guides in the editor.
|
// Whether to show indent guides in the editor.
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
/// The width of the indent guides in pixels, between 1 and 10.
|
// The width of the indent guides in pixels, between 1 and 10.
|
||||||
"line_width": 1,
|
"line_width": 1,
|
||||||
/// The width of the active indent guide in pixels, between 1 and 10.
|
// The width of the active indent guide in pixels, between 1 and 10.
|
||||||
"active_line_width": 1,
|
"active_line_width": 1,
|
||||||
/// Determines how indent guides are colored.
|
// Determines how indent guides are colored.
|
||||||
/// This setting can take the following three values:
|
// This setting can take the following three values:
|
||||||
///
|
///
|
||||||
/// 1. "disabled"
|
// 1. "disabled"
|
||||||
/// 2. "fixed"
|
// 2. "fixed"
|
||||||
/// 3. "indent_aware"
|
// 3. "indent_aware"
|
||||||
"coloring": "fixed",
|
"coloring": "fixed",
|
||||||
/// Determines how indent guide backgrounds are colored.
|
// Determines how indent guide backgrounds are colored.
|
||||||
/// This setting can take the following two values:
|
// This setting can take the following two values:
|
||||||
///
|
///
|
||||||
/// 1. "disabled"
|
// 1. "disabled"
|
||||||
/// 2. "indent_aware"
|
// 2. "indent_aware"
|
||||||
"background_coloring": "disabled"
|
"background_coloring": "disabled"
|
||||||
},
|
},
|
||||||
// Whether the editor will scroll beyond the last line.
|
// Whether the editor will scroll beyond the last line.
|
||||||
@@ -344,6 +379,9 @@
|
|||||||
// 3. Never populate the search query
|
// 3. Never populate the search query
|
||||||
// "never"
|
// "never"
|
||||||
"seed_search_query_from_cursor": "always",
|
"seed_search_query_from_cursor": "always",
|
||||||
|
// When enabled, automatically adjusts search case sensitivity based on your query.
|
||||||
|
// If your search query contains any uppercase letters, the search becomes case-sensitive;
|
||||||
|
// if it contains only lowercase letters, the search becomes case-insensitive.
|
||||||
"use_smartcase_search": false,
|
"use_smartcase_search": false,
|
||||||
// Inlay hint related settings
|
// Inlay hint related settings
|
||||||
"inlay_hints": {
|
"inlay_hints": {
|
||||||
@@ -363,7 +401,16 @@
|
|||||||
"edit_debounce_ms": 700,
|
"edit_debounce_ms": 700,
|
||||||
// Time to wait after scrolling the buffer, before requesting the hints,
|
// Time to wait after scrolling the buffer, before requesting the hints,
|
||||||
// set to 0 to disable debouncing.
|
// set to 0 to disable debouncing.
|
||||||
"scroll_debounce_ms": 50
|
"scroll_debounce_ms": 50,
|
||||||
|
/// A set of modifiers which, when pressed, will toggle the visibility of inlay hints.
|
||||||
|
/// If the set if empty or not all the modifiers specified are pressed, inlay hints will not be toggled.
|
||||||
|
"toggle_on_modifiers_press": {
|
||||||
|
"control": false,
|
||||||
|
"shift": false,
|
||||||
|
"alt": false,
|
||||||
|
"platform": false,
|
||||||
|
"function": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"project_panel": {
|
"project_panel": {
|
||||||
// Whether to show the project panel button in the status bar
|
// Whether to show the project panel button in the status bar
|
||||||
@@ -389,32 +436,32 @@
|
|||||||
// Whether to fold directories automatically and show compact folders
|
// Whether to fold directories automatically and show compact folders
|
||||||
// (e.g. "a/b/c" ) when a directory has only one subdirectory inside.
|
// (e.g. "a/b/c" ) when a directory has only one subdirectory inside.
|
||||||
"auto_fold_dirs": true,
|
"auto_fold_dirs": true,
|
||||||
/// Scrollbar-related settings
|
// Scrollbar-related settings
|
||||||
"scrollbar": {
|
"scrollbar": {
|
||||||
/// When to show the scrollbar in the project panel.
|
// When to show the scrollbar in the project panel.
|
||||||
/// This setting can take four values:
|
// This setting can take five values:
|
||||||
///
|
///
|
||||||
/// 1. null (default): Inherit editor settings
|
// 1. null (default): Inherit editor settings
|
||||||
/// 2. Show the scrollbar if there's important information or
|
// 2. Show the scrollbar if there's important information or
|
||||||
/// follow the system's configured behavior (default):
|
// follow the system's configured behavior (default):
|
||||||
/// "auto"
|
// "auto"
|
||||||
/// 3. Match the system's configured behavior:
|
// 3. Match the system's configured behavior:
|
||||||
/// "system"
|
// "system"
|
||||||
/// 4. Always show the scrollbar:
|
// 4. Always show the scrollbar:
|
||||||
/// "always"
|
// "always"
|
||||||
/// 5. Never show the scrollbar:
|
// 5. Never show the scrollbar:
|
||||||
/// "never"
|
// "never"
|
||||||
"show": null
|
"show": null
|
||||||
},
|
},
|
||||||
/// Which files containing diagnostic errors/warnings to mark in the project panel.
|
// Which files containing diagnostic errors/warnings to mark in the project panel.
|
||||||
/// This setting can take the following three values:
|
// This setting can take the following three values:
|
||||||
///
|
///
|
||||||
/// 1. Do not mark any files:
|
// 1. Do not mark any files:
|
||||||
/// "off"
|
// "off"
|
||||||
/// 2. Only mark files with errors:
|
// 2. Only mark files with errors:
|
||||||
/// "errors"
|
// "errors"
|
||||||
/// 3. Mark files with errors and warnings:
|
// 3. Mark files with errors and warnings:
|
||||||
/// "all"
|
// "all"
|
||||||
"show_diagnostics": "all",
|
"show_diagnostics": "all",
|
||||||
// Settings related to indent guides in the project panel.
|
// Settings related to indent guides in the project panel.
|
||||||
"indent_guides": {
|
"indent_guides": {
|
||||||
@@ -447,8 +494,8 @@
|
|||||||
// when a corresponding outline entry becomes active.
|
// when a corresponding outline entry becomes active.
|
||||||
// Gitignored entries are never auto revealed.
|
// Gitignored entries are never auto revealed.
|
||||||
"auto_reveal_entries": true,
|
"auto_reveal_entries": true,
|
||||||
/// Whether to fold directories automatically
|
// Whether to fold directories automatically
|
||||||
/// when a directory has only one directory inside.
|
// when a directory has only one directory inside.
|
||||||
"auto_fold_dirs": true,
|
"auto_fold_dirs": true,
|
||||||
// Settings related to indent guides in the outline panel.
|
// Settings related to indent guides in the outline panel.
|
||||||
"indent_guides": {
|
"indent_guides": {
|
||||||
@@ -461,21 +508,21 @@
|
|||||||
// "never"
|
// "never"
|
||||||
"show": "always"
|
"show": "always"
|
||||||
},
|
},
|
||||||
/// Scrollbar-related settings
|
// Scrollbar-related settings
|
||||||
"scrollbar": {
|
"scrollbar": {
|
||||||
/// When to show the scrollbar in the project panel.
|
// When to show the scrollbar in the project panel.
|
||||||
/// This setting can take four values:
|
// This setting can take five values:
|
||||||
///
|
///
|
||||||
/// 1. null (default): Inherit editor settings
|
// 1. null (default): Inherit editor settings
|
||||||
/// 2. Show the scrollbar if there's important information or
|
// 2. Show the scrollbar if there's important information or
|
||||||
/// follow the system's configured behavior (default):
|
// follow the system's configured behavior (default):
|
||||||
/// "auto"
|
// "auto"
|
||||||
/// 3. Match the system's configured behavior:
|
// 3. Match the system's configured behavior:
|
||||||
/// "system"
|
// "system"
|
||||||
/// 4. Always show the scrollbar:
|
// 4. Always show the scrollbar:
|
||||||
/// "always"
|
// "always"
|
||||||
/// 5. Never show the scrollbar:
|
// 5. Never show the scrollbar:
|
||||||
/// "never"
|
// "never"
|
||||||
"show": null
|
"show": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -546,7 +593,7 @@
|
|||||||
// The provider to use.
|
// The provider to use.
|
||||||
"provider": "zed.dev",
|
"provider": "zed.dev",
|
||||||
// The model to use.
|
// The model to use.
|
||||||
"model": "claude-3-5-sonnet"
|
"model": "claude-3-5-sonnet-latest"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// The settings for slash commands.
|
// The settings for slash commands.
|
||||||
@@ -593,7 +640,7 @@
|
|||||||
"show": true,
|
"show": true,
|
||||||
// Whether or not to show the navigation history buttons.
|
// Whether or not to show the navigation history buttons.
|
||||||
"show_nav_history_buttons": true,
|
"show_nav_history_buttons": true,
|
||||||
/// Whether or not to show the tab bar buttons.
|
// Whether or not to show the tab bar buttons.
|
||||||
"show_tab_bar_buttons": true
|
"show_tab_bar_buttons": true
|
||||||
},
|
},
|
||||||
// Settings related to the editor's tabs
|
// Settings related to the editor's tabs
|
||||||
@@ -615,16 +662,16 @@
|
|||||||
// 3. Activate the left neighbour tab if present
|
// 3. Activate the left neighbour tab if present
|
||||||
// "left_neighbour"
|
// "left_neighbour"
|
||||||
"activate_on_close": "history",
|
"activate_on_close": "history",
|
||||||
/// Which files containing diagnostic errors/warnings to mark in the tabs.
|
// Which files containing diagnostic errors/warnings to mark in the tabs.
|
||||||
/// Diagnostics are only shown when file icons are also active.
|
// Diagnostics are only shown when file icons are also active.
|
||||||
/// This setting only works when can take the following three values:
|
// This setting only works when can take the following three values:
|
||||||
///
|
///
|
||||||
/// 1. Do not mark any files:
|
// 1. Do not mark any files:
|
||||||
/// "off"
|
// "off"
|
||||||
/// 2. Only mark files with errors:
|
// 2. Only mark files with errors:
|
||||||
/// "errors"
|
// "errors"
|
||||||
/// 3. Mark files with errors and warnings:
|
// 3. Mark files with errors and warnings:
|
||||||
/// "all"
|
// "all"
|
||||||
"show_diagnostics": "off"
|
"show_diagnostics": "off"
|
||||||
},
|
},
|
||||||
// Settings related to preview tabs.
|
// Settings related to preview tabs.
|
||||||
@@ -647,15 +694,15 @@
|
|||||||
// There are 5 possible width values:
|
// There are 5 possible width values:
|
||||||
//
|
//
|
||||||
// 1. Small: This value is essentially a fixed width.
|
// 1. Small: This value is essentially a fixed width.
|
||||||
// "modal_width": "small"
|
// "modal_max_width": "small"
|
||||||
// 2. Medium:
|
// 2. Medium:
|
||||||
// "modal_width": "medium"
|
// "modal_max_width": "medium"
|
||||||
// 3. Large:
|
// 3. Large:
|
||||||
// "modal_width": "large"
|
// "modal_max_width": "large"
|
||||||
// 4. Extra Large:
|
// 4. Extra Large:
|
||||||
// "modal_width": "xlarge"
|
// "modal_max_width": "xlarge"
|
||||||
// 5. Fullscreen: This value removes any horizontal padding, as it consumes the whole viewport width.
|
// 5. Fullscreen: This value removes any horizontal padding, as it consumes the whole viewport width.
|
||||||
// "modal_width": "full"
|
// "modal_max_width": "full"
|
||||||
//
|
//
|
||||||
// Default: small
|
// Default: small
|
||||||
"modal_max_width": "small"
|
"modal_max_width": "small"
|
||||||
@@ -723,11 +770,28 @@
|
|||||||
// Diagnostics configuration.
|
// Diagnostics configuration.
|
||||||
"diagnostics": {
|
"diagnostics": {
|
||||||
// Whether to show warnings or not by default.
|
// Whether to show warnings or not by default.
|
||||||
"include_warnings": true
|
"include_warnings": true,
|
||||||
|
// Settings for inline diagnostics
|
||||||
|
"inline": {
|
||||||
|
// Whether to show diagnostics inline or not
|
||||||
|
"enabled": false,
|
||||||
|
// The delay in milliseconds to show inline diagnostics after the
|
||||||
|
// last diagnostic update.
|
||||||
|
"update_debounce_ms": 150,
|
||||||
|
// The amount of padding between the end of the source line and the start
|
||||||
|
// of the inline diagnostic in units of em widths.
|
||||||
|
"padding": 4,
|
||||||
|
// The minimum column to display inline diagnostics. This setting can be
|
||||||
|
// used to horizontally align inline diagnostics at some column. Lines
|
||||||
|
// longer than this value will still push diagnostics further to the right.
|
||||||
|
"min_column": 0,
|
||||||
|
// The minimum severity of the diagnostics to show inline.
|
||||||
|
// Shows all diagnostics when not specified.
|
||||||
|
"max_severity": null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// Add files or globs of files that will be excluded by Zed entirely:
|
// Files or globs of files that will be excluded by Zed entirely. They will be skipped during file
|
||||||
// they will be skipped during FS scan(s), file tree and file search
|
// scans, file searches, and not be displayed in the project file tree. Takes precedence over `file_scan_inclusions`.
|
||||||
// will lack the corresponding file entries. Overrides `file_scan_inclusions`.
|
|
||||||
"file_scan_exclusions": [
|
"file_scan_exclusions": [
|
||||||
"**/.git",
|
"**/.git",
|
||||||
"**/.svn",
|
"**/.svn",
|
||||||
@@ -739,10 +803,10 @@
|
|||||||
"**/.classpath",
|
"**/.classpath",
|
||||||
"**/.settings"
|
"**/.settings"
|
||||||
],
|
],
|
||||||
// Add files or globs of files that will be included by Zed, even when
|
// Files or globs of files that will be included by Zed, even when ignored by git. This is useful
|
||||||
// ignored by git. This is useful for files that are not tracked by git,
|
// for files that are not tracked by git, but are still important to your project. Note that globs
|
||||||
// but are still important to your project. Note that globs that are
|
// that are overly broad can slow down Zed's file scanning. `file_scan_exclusions` takes
|
||||||
// overly broad can slow down Zed's file scanning. Overridden by `file_scan_exclusions`.
|
// precedence over these inclusions.
|
||||||
"file_scan_inclusions": [".env*"],
|
"file_scan_inclusions": [".env*"],
|
||||||
// Git gutter behavior configuration.
|
// Git gutter behavior configuration.
|
||||||
"git": {
|
"git": {
|
||||||
@@ -773,9 +837,31 @@
|
|||||||
// 2. Load direnv configuration through the shell hook, works for POSIX shells and fish.
|
// 2. Load direnv configuration through the shell hook, works for POSIX shells and fish.
|
||||||
// "load_direnv": "shell_hook"
|
// "load_direnv": "shell_hook"
|
||||||
"load_direnv": "direct",
|
"load_direnv": "direct",
|
||||||
"inline_completions": {
|
"edit_predictions": {
|
||||||
// A list of globs representing files that inline completions should be disabled for.
|
// A list of globs representing files that edit predictions should be disabled for.
|
||||||
"disabled_globs": [".env"]
|
// There's a sensible default list of globs already included.
|
||||||
|
// Any addition to this list will be merged with the default list.
|
||||||
|
// Globs are matched relative to the worktree root,
|
||||||
|
// except when starting with a slash (/) or equivalent in Windows.
|
||||||
|
"disabled_globs": [
|
||||||
|
"**/.env*",
|
||||||
|
"**/*.pem",
|
||||||
|
"**/*.key",
|
||||||
|
"**/*.cert",
|
||||||
|
"**/*.crt",
|
||||||
|
"**/.dev.vars",
|
||||||
|
"**/secrets.yml"
|
||||||
|
],
|
||||||
|
// When to show edit predictions previews in buffer.
|
||||||
|
// This setting takes two possible values:
|
||||||
|
// 1. Display predictions inline when there are no language server completions available.
|
||||||
|
// "mode": "eager"
|
||||||
|
// 2. Display predictions inline only when holding a modifier key (alt by default).
|
||||||
|
// "mode": "subtle"
|
||||||
|
"mode": "eager",
|
||||||
|
// Whether edit predictions are enabled in the assistant panel.
|
||||||
|
// This setting has no effect if globally disabled.
|
||||||
|
"enabled_in_assistant": true
|
||||||
},
|
},
|
||||||
// Settings specific to journaling
|
// Settings specific to journaling
|
||||||
"journal": {
|
"journal": {
|
||||||
@@ -911,21 +997,21 @@
|
|||||||
// Example: `echo -e "\e]2;New Title\007";`
|
// Example: `echo -e "\e]2;New Title\007";`
|
||||||
"breadcrumbs": true
|
"breadcrumbs": true
|
||||||
},
|
},
|
||||||
/// Scrollbar-related settings
|
// Scrollbar-related settings
|
||||||
"scrollbar": {
|
"scrollbar": {
|
||||||
/// When to show the scrollbar in the terminal.
|
// When to show the scrollbar in the terminal.
|
||||||
/// This setting can take four values:
|
// This setting can take five values:
|
||||||
///
|
///
|
||||||
/// 1. null (default): Inherit editor settings
|
// 1. null (default): Inherit editor settings
|
||||||
/// 2. Show the scrollbar if there's important information or
|
// 2. Show the scrollbar if there's important information or
|
||||||
/// follow the system's configured behavior (default):
|
// follow the system's configured behavior (default):
|
||||||
/// "auto"
|
// "auto"
|
||||||
/// 3. Match the system's configured behavior:
|
// 3. Match the system's configured behavior:
|
||||||
/// "system"
|
// "system"
|
||||||
/// 4. Always show the scrollbar:
|
// 4. Always show the scrollbar:
|
||||||
/// "always"
|
// "always"
|
||||||
/// 5. Never show the scrollbar:
|
// 5. Never show the scrollbar:
|
||||||
/// "never"
|
// "never"
|
||||||
"show": null
|
"show": null
|
||||||
}
|
}
|
||||||
// Set the terminal's font size. If this option is not included,
|
// Set the terminal's font size. If this option is not included,
|
||||||
@@ -944,7 +1030,7 @@
|
|||||||
// "max_scroll_history_lines": 10000,
|
// "max_scroll_history_lines": 10000,
|
||||||
},
|
},
|
||||||
"code_actions_on_format": {},
|
"code_actions_on_format": {},
|
||||||
/// Settings related to running tasks.
|
// Settings related to running tasks.
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"variables": {}
|
"variables": {}
|
||||||
},
|
},
|
||||||
@@ -965,20 +1051,20 @@
|
|||||||
"JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
|
"JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
|
||||||
"Shell Script": [".env.*"]
|
"Shell Script": [".env.*"]
|
||||||
},
|
},
|
||||||
/// By default use a recent system version of node, or install our own.
|
// By default use a recent system version of node, or install our own.
|
||||||
/// You can override this to use a version of node that is not in $PATH with:
|
// You can override this to use a version of node that is not in $PATH with:
|
||||||
/// {
|
// {
|
||||||
/// "node": {
|
// "node": {
|
||||||
/// "path": "/path/to/node"
|
// "path": "/path/to/node"
|
||||||
/// "npm_path": "/path/to/npm" (defaults to node_path/../npm)
|
// "npm_path": "/path/to/npm" (defaults to node_path/../npm)
|
||||||
/// }
|
// }
|
||||||
/// }
|
// }
|
||||||
/// or to ensure Zed always downloads and installs an isolated version of node:
|
// or to ensure Zed always downloads and installs an isolated version of node:
|
||||||
/// {
|
// {
|
||||||
/// "node": {
|
// "node": {
|
||||||
/// "ignore_system_version": true,
|
// "ignore_system_version": true,
|
||||||
/// }
|
// }
|
||||||
/// NOTE: changing this setting currently requires restarting Zed.
|
// NOTE: changing this setting currently requires restarting Zed.
|
||||||
"node": {},
|
"node": {},
|
||||||
// The extensions that Zed should automatically install on startup.
|
// The extensions that Zed should automatically install on startup.
|
||||||
//
|
//
|
||||||
@@ -1024,6 +1110,7 @@
|
|||||||
"tab_size": 2
|
"tab_size": 2
|
||||||
},
|
},
|
||||||
"Diff": {
|
"Diff": {
|
||||||
|
"show_edit_predictions": false,
|
||||||
"remove_trailing_whitespace_on_save": false,
|
"remove_trailing_whitespace_on_save": false,
|
||||||
"ensure_final_newline_on_save": false
|
"ensure_final_newline_on_save": false
|
||||||
},
|
},
|
||||||
@@ -1033,6 +1120,9 @@
|
|||||||
"Erlang": {
|
"Erlang": {
|
||||||
"language_servers": ["erlang-ls", "!elp", "..."]
|
"language_servers": ["erlang-ls", "!elp", "..."]
|
||||||
},
|
},
|
||||||
|
"Git Commit": {
|
||||||
|
"allow_rewrap": "anywhere"
|
||||||
|
},
|
||||||
"Go": {
|
"Go": {
|
||||||
"code_actions_on_format": {
|
"code_actions_on_format": {
|
||||||
"source.organizeImports": true
|
"source.organizeImports": true
|
||||||
@@ -1076,6 +1166,7 @@
|
|||||||
"Markdown": {
|
"Markdown": {
|
||||||
"format_on_save": "off",
|
"format_on_save": "off",
|
||||||
"use_on_type_format": false,
|
"use_on_type_format": false,
|
||||||
|
"allow_rewrap": "anywhere",
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"allowed": true
|
"allowed": true
|
||||||
}
|
}
|
||||||
@@ -1088,6 +1179,9 @@
|
|||||||
"parser": "php"
|
"parser": "php"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Plain Text": {
|
||||||
|
"allow_rewrap": "anywhere"
|
||||||
|
},
|
||||||
"Ruby": {
|
"Ruby": {
|
||||||
"language_servers": ["solargraph", "!ruby-lsp", "!rubocop", "..."]
|
"language_servers": ["solargraph", "!ruby-lsp", "!rubocop", "..."]
|
||||||
},
|
},
|
||||||
@@ -1171,6 +1265,9 @@
|
|||||||
},
|
},
|
||||||
"deepseek": {
|
"deepseek": {
|
||||||
"api_url": "https://api.deepseek.com"
|
"api_url": "https://api.deepseek.com"
|
||||||
|
},
|
||||||
|
"mistral": {
|
||||||
|
"api_url": "https://api.mistral.ai/v1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Zed's Prettier integration settings.
|
// Zed's Prettier integration settings.
|
||||||
@@ -1216,6 +1313,7 @@
|
|||||||
},
|
},
|
||||||
// Vim settings
|
// Vim settings
|
||||||
"vim": {
|
"vim": {
|
||||||
|
"default_mode": "normal",
|
||||||
"toggle_relative_line_numbers": false,
|
"toggle_relative_line_numbers": false,
|
||||||
"use_system_clipboard": "always",
|
"use_system_clipboard": "always",
|
||||||
"use_multiline_find": false,
|
"use_multiline_find": false,
|
||||||
|
|||||||
@@ -1,549 +1,3 @@
|
|||||||
## [Andromeda](https://github.com/EliverLara/Andromeda)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2017 <eliverlara@gmail.com>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Cave Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Cave Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Dune Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Dune Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Estuary Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Estuary Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Forest Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Forest Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Heath Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Heath Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Lakeside Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Lakeside Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Plateau Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Plateau Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Savanna Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Savanna Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Seaside Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Seaside Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Sulphurpool Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Atelier Sulphurpool Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Ayu Dark](https://github.com/dempfi/ayu)
|
## [Ayu Dark](https://github.com/dempfi/ayu)
|
||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
@@ -827,187 +281,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Rosé Pine](https://github.com/edunfelt/base16-rose-pine-scheme)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2021 Emilia Dunfelt
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Rosé Pine Dawn](https://github.com/edunfelt/base16-rose-pine-scheme)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2021 Emilia Dunfelt
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Rosé Pine Moon](https://github.com/edunfelt/base16-rose-pine-scheme)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2021 Emilia Dunfelt
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Sandcastle](https://github.com/gessig/base16-sandcastle-scheme)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2019 George Essig
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Solarized Dark](https://github.com/altercation/solarized)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2011 Ethan Schoonover
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Solarized Light](https://github.com/altercation/solarized)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2011 Ethan Schoonover
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
## [Summercamp](https://github.com/zoefiri/base16-sc)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2019 Zoe FiriH
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
********************************************************************************
|
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2017 <eliverlara@gmail.com>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -1,378 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://zed.dev/schema/themes/v0.2.0.json",
|
|
||||||
"name": "Andromeda",
|
|
||||||
"author": "Zed Industries",
|
|
||||||
"themes": [
|
|
||||||
{
|
|
||||||
"name": "Andromeda",
|
|
||||||
"appearance": "dark",
|
|
||||||
"style": {
|
|
||||||
"border": "#2b2f38ff",
|
|
||||||
"border.variant": "#252931ff",
|
|
||||||
"border.focused": "#183934ff",
|
|
||||||
"border.selected": "#183934ff",
|
|
||||||
"border.transparent": "#00000000",
|
|
||||||
"border.disabled": "#292d37ff",
|
|
||||||
"elevated_surface.background": "#21242bff",
|
|
||||||
"surface.background": "#21242bff",
|
|
||||||
"background": "#262933ff",
|
|
||||||
"element.background": "#21242bff",
|
|
||||||
"element.hover": "#252931ff",
|
|
||||||
"element.active": "#2a2f39ff",
|
|
||||||
"element.selected": "#2a2f39ff",
|
|
||||||
"element.disabled": "#21242bff",
|
|
||||||
"drop_target.background": "#aca8ae80",
|
|
||||||
"ghost_element.background": "#00000000",
|
|
||||||
"ghost_element.hover": "#252931ff",
|
|
||||||
"ghost_element.active": "#2a2f39ff",
|
|
||||||
"ghost_element.selected": "#2a2f39ff",
|
|
||||||
"ghost_element.disabled": "#21242bff",
|
|
||||||
"text": "#f7f7f8ff",
|
|
||||||
"text.muted": "#aca8aeff",
|
|
||||||
"text.placeholder": "#6b6b73ff",
|
|
||||||
"text.disabled": "#6b6b73ff",
|
|
||||||
"text.accent": "#10a793ff",
|
|
||||||
"icon": "#f7f7f8ff",
|
|
||||||
"icon.muted": "#aca8aeff",
|
|
||||||
"icon.disabled": "#6b6b73ff",
|
|
||||||
"icon.placeholder": "#aca8aeff",
|
|
||||||
"icon.accent": "#10a793ff",
|
|
||||||
"status_bar.background": "#262933ff",
|
|
||||||
"title_bar.background": "#262933ff",
|
|
||||||
"title_bar.inactive_background": "#21242bff",
|
|
||||||
"toolbar.background": "#1e2025ff",
|
|
||||||
"tab_bar.background": "#21242bff",
|
|
||||||
"tab.inactive_background": "#21242bff",
|
|
||||||
"tab.active_background": "#1e2025ff",
|
|
||||||
"search.match_background": "#11a79366",
|
|
||||||
"panel.background": "#21242bff",
|
|
||||||
"panel.focused_border": "#10a793ff",
|
|
||||||
"pane.focused_border": null,
|
|
||||||
"scrollbar.thumb.background": "#f7f7f84c",
|
|
||||||
"scrollbar.thumb.hover_background": "#252931ff",
|
|
||||||
"scrollbar.thumb.border": "#252931ff",
|
|
||||||
"scrollbar.track.background": "#00000000",
|
|
||||||
"scrollbar.track.border": "#21232aff",
|
|
||||||
"editor.foreground": "#f7f7f8ff",
|
|
||||||
"editor.background": "#1e2025ff",
|
|
||||||
"editor.gutter.background": "#1e2025ff",
|
|
||||||
"editor.subheader.background": "#21242bff",
|
|
||||||
"editor.active_line.background": "#21242bbf",
|
|
||||||
"editor.highlighted_line.background": "#21242bff",
|
|
||||||
"editor.line_number": "#565960",
|
|
||||||
"editor.active_line_number": "#f8f8f9",
|
|
||||||
"editor.hover_line_number": "#cbcdd0",
|
|
||||||
"editor.invisible": "#64646dff",
|
|
||||||
"editor.wrap_guide": "#f7f7f80d",
|
|
||||||
"editor.active_wrap_guide": "#f7f7f81a",
|
|
||||||
"editor.document_highlight.read_background": "#10a7931a",
|
|
||||||
"editor.document_highlight.write_background": "#64646d66",
|
|
||||||
"terminal.background": "#1e2025ff",
|
|
||||||
"terminal.foreground": "#f7f7f8ff",
|
|
||||||
"terminal.bright_foreground": "#f7f7f8ff",
|
|
||||||
"terminal.dim_foreground": "#1e2025ff",
|
|
||||||
"terminal.ansi.black": "#1e2025ff",
|
|
||||||
"terminal.ansi.bright_black": "#40434cff",
|
|
||||||
"terminal.ansi.dim_black": "#f7f7f8ff",
|
|
||||||
"terminal.ansi.red": "#f82871ff",
|
|
||||||
"terminal.ansi.bright_red": "#8e0f3aff",
|
|
||||||
"terminal.ansi.dim_red": "#ffa3b5ff",
|
|
||||||
"terminal.ansi.green": "#96df71ff",
|
|
||||||
"terminal.ansi.bright_green": "#457c38ff",
|
|
||||||
"terminal.ansi.dim_green": "#cef0b9ff",
|
|
||||||
"terminal.ansi.yellow": "#fee56cff",
|
|
||||||
"terminal.ansi.bright_yellow": "#958334ff",
|
|
||||||
"terminal.ansi.dim_yellow": "#fef1b7ff",
|
|
||||||
"terminal.ansi.blue": "#10a793ff",
|
|
||||||
"terminal.ansi.bright_blue": "#1a5148ff",
|
|
||||||
"terminal.ansi.dim_blue": "#9cd4c7ff",
|
|
||||||
"terminal.ansi.magenta": "#c74cecff",
|
|
||||||
"terminal.ansi.bright_magenta": "#682681ff",
|
|
||||||
"terminal.ansi.dim_magenta": "#e7abf7ff",
|
|
||||||
"terminal.ansi.cyan": "#08e7c5ff",
|
|
||||||
"terminal.ansi.bright_cyan": "#008169ff",
|
|
||||||
"terminal.ansi.dim_cyan": "#a9f4e1ff",
|
|
||||||
"terminal.ansi.white": "#f7f7f8ff",
|
|
||||||
"terminal.ansi.bright_white": "#f7f7f8ff",
|
|
||||||
"terminal.ansi.dim_white": "#87858cff",
|
|
||||||
"link_text.hover": "#10a793ff",
|
|
||||||
"conflict": "#fee56cff",
|
|
||||||
"conflict.background": "#5c5014ff",
|
|
||||||
"conflict.border": "#796b26ff",
|
|
||||||
"created": "#96df71ff",
|
|
||||||
"created.background": "#184618ff",
|
|
||||||
"created.border": "#306129ff",
|
|
||||||
"deleted": "#f82871ff",
|
|
||||||
"deleted.background": "#54051bff",
|
|
||||||
"deleted.border": "#72092aff",
|
|
||||||
"error": "#f82871ff",
|
|
||||||
"error.background": "#54051bff",
|
|
||||||
"error.border": "#72092aff",
|
|
||||||
"hidden": "#6b6b73ff",
|
|
||||||
"hidden.background": "#262933ff",
|
|
||||||
"hidden.border": "#292d37ff",
|
|
||||||
"hint": "#618399ff",
|
|
||||||
"hint.background": "#12231fff",
|
|
||||||
"hint.border": "#183934ff",
|
|
||||||
"ignored": "#6b6b73ff",
|
|
||||||
"ignored.background": "#262933ff",
|
|
||||||
"ignored.border": "#2b2f38ff",
|
|
||||||
"info": "#10a793ff",
|
|
||||||
"info.background": "#12231fff",
|
|
||||||
"info.border": "#183934ff",
|
|
||||||
"modified": "#fee56cff",
|
|
||||||
"modified.background": "#5c5014ff",
|
|
||||||
"modified.border": "#796b26ff",
|
|
||||||
"predictive": "#315f70ff",
|
|
||||||
"predictive.background": "#184618ff",
|
|
||||||
"predictive.border": "#306129ff",
|
|
||||||
"renamed": "#10a793ff",
|
|
||||||
"renamed.background": "#12231fff",
|
|
||||||
"renamed.border": "#183934ff",
|
|
||||||
"success": "#96df71ff",
|
|
||||||
"success.background": "#184618ff",
|
|
||||||
"success.border": "#306129ff",
|
|
||||||
"unreachable": "#aca8aeff",
|
|
||||||
"unreachable.background": "#262933ff",
|
|
||||||
"unreachable.border": "#2b2f38ff",
|
|
||||||
"warning": "#fee56cff",
|
|
||||||
"warning.background": "#5c5014ff",
|
|
||||||
"warning.border": "#796b26ff",
|
|
||||||
"players": [
|
|
||||||
{
|
|
||||||
"cursor": "#10a793ff",
|
|
||||||
"background": "#10a793ff",
|
|
||||||
"selection": "#10a7933d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#c74cecff",
|
|
||||||
"background": "#c74cecff",
|
|
||||||
"selection": "#c74cec3d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#f29c14ff",
|
|
||||||
"background": "#f29c14ff",
|
|
||||||
"selection": "#f29c143d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#893ea6ff",
|
|
||||||
"background": "#893ea6ff",
|
|
||||||
"selection": "#893ea63d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#08e7c5ff",
|
|
||||||
"background": "#08e7c5ff",
|
|
||||||
"selection": "#08e7c53d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#f82871ff",
|
|
||||||
"background": "#f82871ff",
|
|
||||||
"selection": "#f828713d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#fee56cff",
|
|
||||||
"background": "#fee56cff",
|
|
||||||
"selection": "#fee56c3d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#96df71ff",
|
|
||||||
"background": "#96df71ff",
|
|
||||||
"selection": "#96df713d"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"syntax": {
|
|
||||||
"attribute": {
|
|
||||||
"color": "#10a793ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"boolean": {
|
|
||||||
"color": "#96df71ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"comment": {
|
|
||||||
"color": "#afabb1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"comment.doc": {
|
|
||||||
"color": "#afabb1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"constant": {
|
|
||||||
"color": "#96df71ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"constructor": {
|
|
||||||
"color": "#10a793ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"embedded": {
|
|
||||||
"color": "#f7f7f8ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"emphasis": {
|
|
||||||
"color": "#10a793ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"emphasis.strong": {
|
|
||||||
"color": "#10a793ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"enum": {
|
|
||||||
"color": "#f29c14ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"function": {
|
|
||||||
"color": "#fee56cff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"hint": {
|
|
||||||
"color": "#618399ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"keyword": {
|
|
||||||
"color": "#10a793ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"label": {
|
|
||||||
"color": "#10a793ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"link_text": {
|
|
||||||
"color": "#f29c14ff",
|
|
||||||
"font_style": "italic",
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"link_uri": {
|
|
||||||
"color": "#96df71ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"number": {
|
|
||||||
"color": "#96df71ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"operator": {
|
|
||||||
"color": "#f29c14ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"predictive": {
|
|
||||||
"color": "#315f70ff",
|
|
||||||
"font_style": "italic",
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"preproc": {
|
|
||||||
"color": "#f7f7f8ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"primary": {
|
|
||||||
"color": "#f7f7f8ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"property": {
|
|
||||||
"color": "#10a793ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation": {
|
|
||||||
"color": "#d8d5dbff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.bracket": {
|
|
||||||
"color": "#d8d5dbff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.delimiter": {
|
|
||||||
"color": "#d8d5dbff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.list_marker": {
|
|
||||||
"color": "#d8d5dbff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.special": {
|
|
||||||
"color": "#d8d5dbff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string": {
|
|
||||||
"color": "#f29c14ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.escape": {
|
|
||||||
"color": "#afabb1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.regex": {
|
|
||||||
"color": "#f29c14ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.special": {
|
|
||||||
"color": "#f29c14ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.special.symbol": {
|
|
||||||
"color": "#f29c14ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"tag": {
|
|
||||||
"color": "#10a793ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"text.literal": {
|
|
||||||
"color": "#f29c14ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"title": {
|
|
||||||
"color": "#f7f7f8ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"color": "#08e7c5ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"variable": {
|
|
||||||
"color": "#f7f7f8ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"variant": {
|
|
||||||
"color": "#10a793ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -105,6 +105,9 @@
|
|||||||
"terminal.ansi.bright_white": "#fbf1c7ff",
|
"terminal.ansi.bright_white": "#fbf1c7ff",
|
||||||
"terminal.ansi.dim_white": "#b0a189ff",
|
"terminal.ansi.dim_white": "#b0a189ff",
|
||||||
"link_text.hover": "#83a598ff",
|
"link_text.hover": "#83a598ff",
|
||||||
|
"version_control_added": "#b7bb26ff",
|
||||||
|
"version_control_modified": "#f9bd2fff",
|
||||||
|
"version_control_deleted": "#fb4a35ff",
|
||||||
"conflict": "#f9bd2fff",
|
"conflict": "#f9bd2fff",
|
||||||
"conflict.background": "#572e10ff",
|
"conflict.background": "#572e10ff",
|
||||||
"conflict.border": "#754916ff",
|
"conflict.border": "#754916ff",
|
||||||
@@ -376,7 +379,7 @@
|
|||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
"variable": {
|
"variable": {
|
||||||
"color": "#83a598ff",
|
"color": "#ebdbb2ff",
|
||||||
"font_style": null,
|
"font_style": null,
|
||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
@@ -490,6 +493,9 @@
|
|||||||
"terminal.ansi.bright_white": "#fbf1c7ff",
|
"terminal.ansi.bright_white": "#fbf1c7ff",
|
||||||
"terminal.ansi.dim_white": "#b0a189ff",
|
"terminal.ansi.dim_white": "#b0a189ff",
|
||||||
"link_text.hover": "#83a598ff",
|
"link_text.hover": "#83a598ff",
|
||||||
|
"version_control_added": "#b7bb26ff",
|
||||||
|
"version_control_modified": "#f9bd2fff",
|
||||||
|
"version_control_deleted": "#fb4a35ff",
|
||||||
"conflict": "#f9bd2fff",
|
"conflict": "#f9bd2fff",
|
||||||
"conflict.background": "#572e10ff",
|
"conflict.background": "#572e10ff",
|
||||||
"conflict.border": "#754916ff",
|
"conflict.border": "#754916ff",
|
||||||
@@ -761,7 +767,7 @@
|
|||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
"variable": {
|
"variable": {
|
||||||
"color": "#83a598ff",
|
"color": "#ebdbb2ff",
|
||||||
"font_style": null,
|
"font_style": null,
|
||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
@@ -875,6 +881,9 @@
|
|||||||
"terminal.ansi.bright_white": "#fbf1c7ff",
|
"terminal.ansi.bright_white": "#fbf1c7ff",
|
||||||
"terminal.ansi.dim_white": "#b0a189ff",
|
"terminal.ansi.dim_white": "#b0a189ff",
|
||||||
"link_text.hover": "#83a598ff",
|
"link_text.hover": "#83a598ff",
|
||||||
|
"version_control_added": "#b7bb26ff",
|
||||||
|
"version_control_modified": "#f9bd2fff",
|
||||||
|
"version_control_deleted": "#fb4a35ff",
|
||||||
"conflict": "#f9bd2fff",
|
"conflict": "#f9bd2fff",
|
||||||
"conflict.background": "#572e10ff",
|
"conflict.background": "#572e10ff",
|
||||||
"conflict.border": "#754916ff",
|
"conflict.border": "#754916ff",
|
||||||
@@ -1146,7 +1155,7 @@
|
|||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
"variable": {
|
"variable": {
|
||||||
"color": "#83a598ff",
|
"color": "#ebdbb2ff",
|
||||||
"font_style": null,
|
"font_style": null,
|
||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
@@ -1260,6 +1269,9 @@
|
|||||||
"terminal.ansi.bright_white": "#282828ff",
|
"terminal.ansi.bright_white": "#282828ff",
|
||||||
"terminal.ansi.dim_white": "#73675eff",
|
"terminal.ansi.dim_white": "#73675eff",
|
||||||
"link_text.hover": "#0b6678ff",
|
"link_text.hover": "#0b6678ff",
|
||||||
|
"version_control_added": "#797410ff",
|
||||||
|
"version_control_modified": "#b57615ff",
|
||||||
|
"version_control_deleted": "#9d0308ff",
|
||||||
"conflict": "#b57615ff",
|
"conflict": "#b57615ff",
|
||||||
"conflict.background": "#f5e2d0ff",
|
"conflict.background": "#f5e2d0ff",
|
||||||
"conflict.border": "#ebccabff",
|
"conflict.border": "#ebccabff",
|
||||||
@@ -1531,7 +1543,7 @@
|
|||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
"variable": {
|
"variable": {
|
||||||
"color": "#066578ff",
|
"color": "#282828ff",
|
||||||
"font_style": null,
|
"font_style": null,
|
||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
@@ -1645,6 +1657,9 @@
|
|||||||
"terminal.ansi.bright_white": "#282828ff",
|
"terminal.ansi.bright_white": "#282828ff",
|
||||||
"terminal.ansi.dim_white": "#73675eff",
|
"terminal.ansi.dim_white": "#73675eff",
|
||||||
"link_text.hover": "#0b6678ff",
|
"link_text.hover": "#0b6678ff",
|
||||||
|
"version_control_added": "#797410ff",
|
||||||
|
"version_control_modified": "#b57615ff",
|
||||||
|
"version_control_deleted": "#9d0308ff",
|
||||||
"conflict": "#b57615ff",
|
"conflict": "#b57615ff",
|
||||||
"conflict.background": "#f5e2d0ff",
|
"conflict.background": "#f5e2d0ff",
|
||||||
"conflict.border": "#ebccabff",
|
"conflict.border": "#ebccabff",
|
||||||
@@ -1916,7 +1931,7 @@
|
|||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
"variable": {
|
"variable": {
|
||||||
"color": "#066578ff",
|
"color": "#282828ff",
|
||||||
"font_style": null,
|
"font_style": null,
|
||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
@@ -2030,6 +2045,9 @@
|
|||||||
"terminal.ansi.bright_white": "#282828ff",
|
"terminal.ansi.bright_white": "#282828ff",
|
||||||
"terminal.ansi.dim_white": "#73675eff",
|
"terminal.ansi.dim_white": "#73675eff",
|
||||||
"link_text.hover": "#0b6678ff",
|
"link_text.hover": "#0b6678ff",
|
||||||
|
"version_control_added": "#797410ff",
|
||||||
|
"version_control_modified": "#b57615ff",
|
||||||
|
"version_control_deleted": "#9d0308ff",
|
||||||
"conflict": "#b57615ff",
|
"conflict": "#b57615ff",
|
||||||
"conflict.background": "#f5e2d0ff",
|
"conflict.background": "#f5e2d0ff",
|
||||||
"conflict.border": "#ebccabff",
|
"conflict.border": "#ebccabff",
|
||||||
@@ -2301,7 +2319,7 @@
|
|||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
"variable": {
|
"variable": {
|
||||||
"color": "#066578ff",
|
"color": "#282828ff",
|
||||||
"font_style": null,
|
"font_style": null,
|
||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
"terminal.ansi.bright_green": "#4d6140ff",
|
"terminal.ansi.bright_green": "#4d6140ff",
|
||||||
"terminal.ansi.dim_green": "#d1e0bfff",
|
"terminal.ansi.dim_green": "#d1e0bfff",
|
||||||
"terminal.ansi.yellow": "#dec184ff",
|
"terminal.ansi.yellow": "#dec184ff",
|
||||||
"terminal.ansi.bright_yellow": "#786441ff",
|
"terminal.ansi.bright_yellow": "#e5c07bff",
|
||||||
"terminal.ansi.dim_yellow": "#f1dfc1ff",
|
"terminal.ansi.dim_yellow": "#f1dfc1ff",
|
||||||
"terminal.ansi.blue": "#74ade8ff",
|
"terminal.ansi.blue": "#74ade8ff",
|
||||||
"terminal.ansi.bright_blue": "#385378ff",
|
"terminal.ansi.bright_blue": "#385378ff",
|
||||||
@@ -96,6 +96,9 @@
|
|||||||
"terminal.ansi.bright_white": "#dce0e5ff",
|
"terminal.ansi.bright_white": "#dce0e5ff",
|
||||||
"terminal.ansi.dim_white": "#575d65ff",
|
"terminal.ansi.dim_white": "#575d65ff",
|
||||||
"link_text.hover": "#74ade8ff",
|
"link_text.hover": "#74ade8ff",
|
||||||
|
"version_control_added": "#a7c088ff",
|
||||||
|
"version_control_modified": "#dec184ff",
|
||||||
|
"version_control_deleted": "#d07277ff",
|
||||||
"conflict": "#dec184ff",
|
"conflict": "#dec184ff",
|
||||||
"conflict.background": "#dec1841a",
|
"conflict.background": "#dec1841a",
|
||||||
"conflict.border": "#5d4c2fff",
|
"conflict.border": "#5d4c2fff",
|
||||||
@@ -362,7 +365,7 @@
|
|||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
"variable": {
|
"variable": {
|
||||||
"color": "#dce0e5ff",
|
"color": "#acb2beff",
|
||||||
"font_style": null,
|
"font_style": null,
|
||||||
"font_weight": null
|
"font_weight": null
|
||||||
},
|
},
|
||||||
@@ -441,7 +444,7 @@
|
|||||||
"editor.invisible": "#a3a3a4ff",
|
"editor.invisible": "#a3a3a4ff",
|
||||||
"editor.wrap_guide": "#383a410d",
|
"editor.wrap_guide": "#383a410d",
|
||||||
"editor.active_wrap_guide": "#383a411a",
|
"editor.active_wrap_guide": "#383a411a",
|
||||||
"editor.document_highlight.read_background": "#5c78e21a",
|
"editor.document_highlight.read_background": "#5c78e225",
|
||||||
"editor.document_highlight.write_background": "#a3a3a466",
|
"editor.document_highlight.write_background": "#a3a3a466",
|
||||||
"terminal.background": "#fafafaff",
|
"terminal.background": "#fafafaff",
|
||||||
"terminal.foreground": "#242529ff",
|
"terminal.foreground": "#242529ff",
|
||||||
@@ -457,7 +460,7 @@
|
|||||||
"terminal.ansi.bright_green": "#b2cfa9ff",
|
"terminal.ansi.bright_green": "#b2cfa9ff",
|
||||||
"terminal.ansi.dim_green": "#354d2eff",
|
"terminal.ansi.dim_green": "#354d2eff",
|
||||||
"terminal.ansi.yellow": "#dec184ff",
|
"terminal.ansi.yellow": "#dec184ff",
|
||||||
"terminal.ansi.bright_yellow": "#f1dfc1ff",
|
"terminal.ansi.bright_yellow": "#826221ff",
|
||||||
"terminal.ansi.dim_yellow": "#786441ff",
|
"terminal.ansi.dim_yellow": "#786441ff",
|
||||||
"terminal.ansi.blue": "#5c78e2ff",
|
"terminal.ansi.blue": "#5c78e2ff",
|
||||||
"terminal.ansi.bright_blue": "#b5baf2ff",
|
"terminal.ansi.bright_blue": "#b5baf2ff",
|
||||||
@@ -472,6 +475,9 @@
|
|||||||
"terminal.ansi.bright_white": "#242529ff",
|
"terminal.ansi.bright_white": "#242529ff",
|
||||||
"terminal.ansi.dim_white": "#97979aff",
|
"terminal.ansi.dim_white": "#97979aff",
|
||||||
"link_text.hover": "#5c78e2ff",
|
"link_text.hover": "#5c78e2ff",
|
||||||
|
"version_control_added": "#669f59ff",
|
||||||
|
"version_control_modified": "#a48819ff",
|
||||||
|
"version_control_deleted": "#d36151ff",
|
||||||
"conflict": "#a48819ff",
|
"conflict": "#a48819ff",
|
||||||
"conflict.background": "#faf2e6ff",
|
"conflict.background": "#faf2e6ff",
|
||||||
"conflict.border": "#f4e7d1ff",
|
"conflict.border": "#f4e7d1ff",
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2021 Emilia Dunfelt
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2019 George Essig
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -1,378 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://zed.dev/schema/themes/v0.2.0.json",
|
|
||||||
"name": "Sandcastle",
|
|
||||||
"author": "Zed Industries",
|
|
||||||
"themes": [
|
|
||||||
{
|
|
||||||
"name": "Sandcastle",
|
|
||||||
"appearance": "dark",
|
|
||||||
"style": {
|
|
||||||
"border": "#3d4350ff",
|
|
||||||
"border.variant": "#313741ff",
|
|
||||||
"border.focused": "#223131ff",
|
|
||||||
"border.selected": "#223131ff",
|
|
||||||
"border.transparent": "#00000000",
|
|
||||||
"border.disabled": "#393f4aff",
|
|
||||||
"elevated_surface.background": "#2b3038ff",
|
|
||||||
"surface.background": "#2b3038ff",
|
|
||||||
"background": "#333944ff",
|
|
||||||
"element.background": "#2b3038ff",
|
|
||||||
"element.hover": "#313741ff",
|
|
||||||
"element.active": "#3d4350ff",
|
|
||||||
"element.selected": "#3d4350ff",
|
|
||||||
"element.disabled": "#2b3038ff",
|
|
||||||
"drop_target.background": "#a6978280",
|
|
||||||
"ghost_element.background": "#00000000",
|
|
||||||
"ghost_element.hover": "#313741ff",
|
|
||||||
"ghost_element.active": "#3d4350ff",
|
|
||||||
"ghost_element.selected": "#3d4350ff",
|
|
||||||
"ghost_element.disabled": "#2b3038ff",
|
|
||||||
"text": "#fdf4c1ff",
|
|
||||||
"text.muted": "#a69782ff",
|
|
||||||
"text.placeholder": "#827568ff",
|
|
||||||
"text.disabled": "#827568ff",
|
|
||||||
"text.accent": "#518b8bff",
|
|
||||||
"icon": "#fdf4c1ff",
|
|
||||||
"icon.muted": "#a69782ff",
|
|
||||||
"icon.disabled": "#827568ff",
|
|
||||||
"icon.placeholder": "#a69782ff",
|
|
||||||
"icon.accent": "#518b8bff",
|
|
||||||
"status_bar.background": "#333944ff",
|
|
||||||
"title_bar.background": "#333944ff",
|
|
||||||
"title_bar.inactive_background": "#2b3038ff",
|
|
||||||
"toolbar.background": "#282c33ff",
|
|
||||||
"tab_bar.background": "#2b3038ff",
|
|
||||||
"tab.inactive_background": "#2b3038ff",
|
|
||||||
"tab.active_background": "#282c33ff",
|
|
||||||
"search.match_background": "#528b8b66",
|
|
||||||
"panel.background": "#2b3038ff",
|
|
||||||
"panel.focused_border": "#518b8bff",
|
|
||||||
"pane.focused_border": null,
|
|
||||||
"scrollbar.thumb.background": "#fdf4c14c",
|
|
||||||
"scrollbar.thumb.hover_background": "#313741ff",
|
|
||||||
"scrollbar.thumb.border": "#313741ff",
|
|
||||||
"scrollbar.track.background": "#00000000",
|
|
||||||
"scrollbar.track.border": "#2a2f38ff",
|
|
||||||
"editor.foreground": "#fdf4c1ff",
|
|
||||||
"editor.background": "#282c33ff",
|
|
||||||
"editor.gutter.background": "#282c33ff",
|
|
||||||
"editor.subheader.background": "#2b3038ff",
|
|
||||||
"editor.active_line.background": "#2b3038bf",
|
|
||||||
"editor.highlighted_line.background": "#2b3038ff",
|
|
||||||
"editor.line_number": "#6b6b61",
|
|
||||||
"editor.active_line_number": "#dbdbd7",
|
|
||||||
"editor.hover_line_number": "#b6b6af",
|
|
||||||
"editor.invisible": "#7c6f64ff",
|
|
||||||
"editor.wrap_guide": "#fdf4c10d",
|
|
||||||
"editor.active_wrap_guide": "#fdf4c11a",
|
|
||||||
"editor.document_highlight.read_background": "#518b8b1a",
|
|
||||||
"editor.document_highlight.write_background": "#7c6f6466",
|
|
||||||
"terminal.background": "#282c33ff",
|
|
||||||
"terminal.foreground": "#fdf4c1ff",
|
|
||||||
"terminal.bright_foreground": "#fdf4c1ff",
|
|
||||||
"terminal.dim_foreground": "#282c33ff",
|
|
||||||
"terminal.ansi.black": "#282c33ff",
|
|
||||||
"terminal.ansi.bright_black": "#5e5753ff",
|
|
||||||
"terminal.ansi.dim_black": "#fdf4c1ff",
|
|
||||||
"terminal.ansi.red": "#b3627aff",
|
|
||||||
"terminal.ansi.bright_red": "#57333dff",
|
|
||||||
"terminal.ansi.dim_red": "#dcb0bbff",
|
|
||||||
"terminal.ansi.green": "#83a598ff",
|
|
||||||
"terminal.ansi.bright_green": "#414f4aff",
|
|
||||||
"terminal.ansi.dim_green": "#c0d2cbff",
|
|
||||||
"terminal.ansi.yellow": "#a07d3aff",
|
|
||||||
"terminal.ansi.bright_yellow": "#4e3f22ff",
|
|
||||||
"terminal.ansi.dim_yellow": "#d3bd9aff",
|
|
||||||
"terminal.ansi.blue": "#518b8bff",
|
|
||||||
"terminal.ansi.bright_blue": "#2c4444ff",
|
|
||||||
"terminal.ansi.dim_blue": "#a8c4c4ff",
|
|
||||||
"terminal.ansi.magenta": "#a87222ff",
|
|
||||||
"terminal.ansi.bright_magenta": "#523918ff",
|
|
||||||
"terminal.ansi.dim_magenta": "#dab78eff",
|
|
||||||
"terminal.ansi.cyan": "#83a598ff",
|
|
||||||
"terminal.ansi.bright_cyan": "#414f4aff",
|
|
||||||
"terminal.ansi.dim_cyan": "#c0d2cbff",
|
|
||||||
"terminal.ansi.white": "#fdf4c1ff",
|
|
||||||
"terminal.ansi.bright_white": "#fdf4c1ff",
|
|
||||||
"terminal.ansi.dim_white": "#958776ff",
|
|
||||||
"link_text.hover": "#518b8bff",
|
|
||||||
"conflict": "#a07d3aff",
|
|
||||||
"conflict.background": "#231d12ff",
|
|
||||||
"conflict.border": "#392e19ff",
|
|
||||||
"created": "#83a598ff",
|
|
||||||
"created.background": "#1e2321ff",
|
|
||||||
"created.border": "#303a36ff",
|
|
||||||
"deleted": "#b3627aff",
|
|
||||||
"deleted.background": "#26191cff",
|
|
||||||
"deleted.border": "#3e272dff",
|
|
||||||
"error": "#b3627aff",
|
|
||||||
"error.background": "#26191cff",
|
|
||||||
"error.border": "#3e272dff",
|
|
||||||
"hidden": "#827568ff",
|
|
||||||
"hidden.background": "#333944ff",
|
|
||||||
"hidden.border": "#393f4aff",
|
|
||||||
"hint": "#727d68ff",
|
|
||||||
"hint.background": "#171e1eff",
|
|
||||||
"hint.border": "#223131ff",
|
|
||||||
"ignored": "#827568ff",
|
|
||||||
"ignored.background": "#333944ff",
|
|
||||||
"ignored.border": "#3d4350ff",
|
|
||||||
"info": "#518b8bff",
|
|
||||||
"info.background": "#171e1eff",
|
|
||||||
"info.border": "#223131ff",
|
|
||||||
"modified": "#a07d3aff",
|
|
||||||
"modified.background": "#231d12ff",
|
|
||||||
"modified.border": "#392e19ff",
|
|
||||||
"predictive": "#5c6152ff",
|
|
||||||
"predictive.background": "#1e2321ff",
|
|
||||||
"predictive.border": "#303a36ff",
|
|
||||||
"renamed": "#518b8bff",
|
|
||||||
"renamed.background": "#171e1eff",
|
|
||||||
"renamed.border": "#223131ff",
|
|
||||||
"success": "#83a598ff",
|
|
||||||
"success.background": "#1e2321ff",
|
|
||||||
"success.border": "#303a36ff",
|
|
||||||
"unreachable": "#a69782ff",
|
|
||||||
"unreachable.background": "#333944ff",
|
|
||||||
"unreachable.border": "#3d4350ff",
|
|
||||||
"warning": "#a07d3aff",
|
|
||||||
"warning.background": "#231d12ff",
|
|
||||||
"warning.border": "#392e19ff",
|
|
||||||
"players": [
|
|
||||||
{
|
|
||||||
"cursor": "#518b8bff",
|
|
||||||
"background": "#518b8bff",
|
|
||||||
"selection": "#518b8b3d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#a87222ff",
|
|
||||||
"background": "#a87222ff",
|
|
||||||
"selection": "#a872223d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#a07d3aff",
|
|
||||||
"background": "#a07d3aff",
|
|
||||||
"selection": "#a07d3a3d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#d75f5fff",
|
|
||||||
"background": "#d75f5fff",
|
|
||||||
"selection": "#d75f5f3d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#83a598ff",
|
|
||||||
"background": "#83a598ff",
|
|
||||||
"selection": "#83a5983d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#b3627aff",
|
|
||||||
"background": "#b3627aff",
|
|
||||||
"selection": "#b3627a3d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#a07d3aff",
|
|
||||||
"background": "#a07d3aff",
|
|
||||||
"selection": "#a07d3a3d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#83a598ff",
|
|
||||||
"background": "#83a598ff",
|
|
||||||
"selection": "#83a5983d"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"syntax": {
|
|
||||||
"attribute": {
|
|
||||||
"color": "#518b8bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"boolean": {
|
|
||||||
"color": "#83a598ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"comment": {
|
|
||||||
"color": "#a89984ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"comment.doc": {
|
|
||||||
"color": "#a89984ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"constant": {
|
|
||||||
"color": "#83a598ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"constructor": {
|
|
||||||
"color": "#518b8bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"embedded": {
|
|
||||||
"color": "#fdf4c1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"emphasis": {
|
|
||||||
"color": "#518b8bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"emphasis.strong": {
|
|
||||||
"color": "#518b8bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"enum": {
|
|
||||||
"color": "#a07d3aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"function": {
|
|
||||||
"color": "#a07d3aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"hint": {
|
|
||||||
"color": "#727d68ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"keyword": {
|
|
||||||
"color": "#518b8bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"label": {
|
|
||||||
"color": "#518b8bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"link_text": {
|
|
||||||
"color": "#a07d3aff",
|
|
||||||
"font_style": "italic",
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"link_uri": {
|
|
||||||
"color": "#83a598ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"number": {
|
|
||||||
"color": "#83a598ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"operator": {
|
|
||||||
"color": "#a07d3aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"predictive": {
|
|
||||||
"color": "#5c6152ff",
|
|
||||||
"font_style": "italic",
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"preproc": {
|
|
||||||
"color": "#fdf4c1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"primary": {
|
|
||||||
"color": "#fdf4c1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"property": {
|
|
||||||
"color": "#518b8bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation": {
|
|
||||||
"color": "#d5c5a1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.bracket": {
|
|
||||||
"color": "#d5c5a1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.delimiter": {
|
|
||||||
"color": "#d5c5a1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.list_marker": {
|
|
||||||
"color": "#d5c5a1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.special": {
|
|
||||||
"color": "#d5c5a1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string": {
|
|
||||||
"color": "#a07d3aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.escape": {
|
|
||||||
"color": "#a89984ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.regex": {
|
|
||||||
"color": "#a07d3aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.special": {
|
|
||||||
"color": "#a07d3aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.special.symbol": {
|
|
||||||
"color": "#a07d3aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"tag": {
|
|
||||||
"color": "#518b8bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"text.literal": {
|
|
||||||
"color": "#a07d3aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"title": {
|
|
||||||
"color": "#fdf4c1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"color": "#83a598ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"variable": {
|
|
||||||
"color": "#fdf4c1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"variant": {
|
|
||||||
"color": "#518b8bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2011 Ethan Schoonover
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -1,749 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://zed.dev/schema/themes/v0.2.0.json",
|
|
||||||
"name": "Solarized",
|
|
||||||
"author": "Zed Industries",
|
|
||||||
"themes": [
|
|
||||||
{
|
|
||||||
"name": "Solarized Dark",
|
|
||||||
"appearance": "dark",
|
|
||||||
"style": {
|
|
||||||
"border": "#2b4e58ff",
|
|
||||||
"border.variant": "#053541ff",
|
|
||||||
"border.focused": "#1b3149ff",
|
|
||||||
"border.selected": "#1b3149ff",
|
|
||||||
"border.transparent": "#00000000",
|
|
||||||
"border.disabled": "#19424dff",
|
|
||||||
"elevated_surface.background": "#04313bff",
|
|
||||||
"surface.background": "#04313bff",
|
|
||||||
"background": "#073743ff",
|
|
||||||
"element.background": "#04313bff",
|
|
||||||
"element.hover": "#053541ff",
|
|
||||||
"element.active": "#294d58ff",
|
|
||||||
"element.selected": "#294d58ff",
|
|
||||||
"element.disabled": "#04313bff",
|
|
||||||
"drop_target.background": "#93a1a180",
|
|
||||||
"ghost_element.background": "#00000000",
|
|
||||||
"ghost_element.hover": "#053541ff",
|
|
||||||
"ghost_element.active": "#294d58ff",
|
|
||||||
"ghost_element.selected": "#294d58ff",
|
|
||||||
"ghost_element.disabled": "#04313bff",
|
|
||||||
"text": "#fdf6e3ff",
|
|
||||||
"text.muted": "#93a1a1ff",
|
|
||||||
"text.placeholder": "#6f8389ff",
|
|
||||||
"text.disabled": "#6f8389ff",
|
|
||||||
"text.accent": "#278ad1ff",
|
|
||||||
"icon": "#fdf6e3ff",
|
|
||||||
"icon.muted": "#93a1a1ff",
|
|
||||||
"icon.disabled": "#6f8389ff",
|
|
||||||
"icon.placeholder": "#93a1a1ff",
|
|
||||||
"icon.accent": "#278ad1ff",
|
|
||||||
"status_bar.background": "#073743ff",
|
|
||||||
"title_bar.background": "#073743ff",
|
|
||||||
"title_bar.inactive_background": "#04313bff",
|
|
||||||
"toolbar.background": "#002a35ff",
|
|
||||||
"tab_bar.background": "#04313bff",
|
|
||||||
"tab.inactive_background": "#04313bff",
|
|
||||||
"tab.active_background": "#002a35ff",
|
|
||||||
"search.match_background": "#288bd166",
|
|
||||||
"panel.background": "#04313bff",
|
|
||||||
"panel.focused_border": "#278ad1ff",
|
|
||||||
"pane.focused_border": null,
|
|
||||||
"scrollbar.thumb.background": "#fdf6e34c",
|
|
||||||
"scrollbar.thumb.hover_background": "#053541ff",
|
|
||||||
"scrollbar.thumb.border": "#053541ff",
|
|
||||||
"scrollbar.track.background": "#00000000",
|
|
||||||
"scrollbar.track.border": "#022f3bff",
|
|
||||||
"editor.foreground": "#fdf6e3ff",
|
|
||||||
"editor.background": "#002a35ff",
|
|
||||||
"editor.gutter.background": "#002a35ff",
|
|
||||||
"editor.subheader.background": "#04313bff",
|
|
||||||
"editor.active_line.background": "#04313bbf",
|
|
||||||
"editor.highlighted_line.background": "#04313bff",
|
|
||||||
"editor.line_number": "#5a6d6f",
|
|
||||||
"editor.active_line_number": "#e3e8e8",
|
|
||||||
"editor.hover_line_number": "#abb9ba",
|
|
||||||
"editor.invisible": "#6c8287ff",
|
|
||||||
"editor.wrap_guide": "#fdf6e30d",
|
|
||||||
"editor.active_wrap_guide": "#fdf6e31a",
|
|
||||||
"editor.document_highlight.read_background": "#278ad11a",
|
|
||||||
"editor.document_highlight.write_background": "#6c828766",
|
|
||||||
"terminal.background": "#002a35ff",
|
|
||||||
"terminal.foreground": "#fdf6e3ff",
|
|
||||||
"terminal.bright_foreground": "#fdf6e3ff",
|
|
||||||
"terminal.dim_foreground": "#002a35ff",
|
|
||||||
"terminal.ansi.black": "#002a35ff",
|
|
||||||
"terminal.ansi.bright_black": "#5c7279ff",
|
|
||||||
"terminal.ansi.dim_black": "#fdf6e3ff",
|
|
||||||
"terminal.ansi.red": "#dc3330ff",
|
|
||||||
"terminal.ansi.bright_red": "#7d181cff",
|
|
||||||
"terminal.ansi.dim_red": "#faa091ff",
|
|
||||||
"terminal.ansi.green": "#849903ff",
|
|
||||||
"terminal.ansi.bright_green": "#434a10ff",
|
|
||||||
"terminal.ansi.dim_green": "#c6cb8bff",
|
|
||||||
"terminal.ansi.yellow": "#b58902ff",
|
|
||||||
"terminal.ansi.bright_yellow": "#5d430fff",
|
|
||||||
"terminal.ansi.dim_yellow": "#e0c189ff",
|
|
||||||
"terminal.ansi.blue": "#278ad1ff",
|
|
||||||
"terminal.ansi.bright_blue": "#214365ff",
|
|
||||||
"terminal.ansi.dim_blue": "#a5c3e9ff",
|
|
||||||
"terminal.ansi.magenta": "#d33781ff",
|
|
||||||
"terminal.ansi.bright_magenta": "#6f1f3fff",
|
|
||||||
"terminal.ansi.dim_magenta": "#f0a2beff",
|
|
||||||
"terminal.ansi.cyan": "#2ba198ff",
|
|
||||||
"terminal.ansi.bright_cyan": "#204e4aff",
|
|
||||||
"terminal.ansi.dim_cyan": "#9fd0cbff",
|
|
||||||
"terminal.ansi.white": "#fdf6e3ff",
|
|
||||||
"terminal.ansi.bright_white": "#fdf6e3ff",
|
|
||||||
"terminal.ansi.dim_white": "#7b8e91ff",
|
|
||||||
"link_text.hover": "#278ad1ff",
|
|
||||||
"conflict": "#b58902ff",
|
|
||||||
"conflict.background": "#2e1d0cff",
|
|
||||||
"conflict.border": "#47300fff",
|
|
||||||
"created": "#849903ff",
|
|
||||||
"created.background": "#1e210cff",
|
|
||||||
"created.border": "#313510ff",
|
|
||||||
"deleted": "#dc3330ff",
|
|
||||||
"deleted.background": "#4a080eff",
|
|
||||||
"deleted.border": "#641015ff",
|
|
||||||
"error": "#dc3330ff",
|
|
||||||
"error.background": "#4a080eff",
|
|
||||||
"error.border": "#641015ff",
|
|
||||||
"hidden": "#6f8389ff",
|
|
||||||
"hidden.background": "#073743ff",
|
|
||||||
"hidden.border": "#19424dff",
|
|
||||||
"hint": "#4f8297ff",
|
|
||||||
"hint.background": "#141f2cff",
|
|
||||||
"hint.border": "#1b3149ff",
|
|
||||||
"ignored": "#6f8389ff",
|
|
||||||
"ignored.background": "#073743ff",
|
|
||||||
"ignored.border": "#2b4e58ff",
|
|
||||||
"info": "#278ad1ff",
|
|
||||||
"info.background": "#141f2cff",
|
|
||||||
"info.border": "#1b3149ff",
|
|
||||||
"modified": "#b58902ff",
|
|
||||||
"modified.background": "#2e1d0cff",
|
|
||||||
"modified.border": "#47300fff",
|
|
||||||
"predictive": "#3f718bff",
|
|
||||||
"predictive.background": "#1e210cff",
|
|
||||||
"predictive.border": "#313510ff",
|
|
||||||
"renamed": "#278ad1ff",
|
|
||||||
"renamed.background": "#141f2cff",
|
|
||||||
"renamed.border": "#1b3149ff",
|
|
||||||
"success": "#849903ff",
|
|
||||||
"success.background": "#1e210cff",
|
|
||||||
"success.border": "#313510ff",
|
|
||||||
"unreachable": "#93a1a1ff",
|
|
||||||
"unreachable.background": "#073743ff",
|
|
||||||
"unreachable.border": "#2b4e58ff",
|
|
||||||
"warning": "#b58902ff",
|
|
||||||
"warning.background": "#2e1d0cff",
|
|
||||||
"warning.border": "#47300fff",
|
|
||||||
"players": [
|
|
||||||
{
|
|
||||||
"cursor": "#278ad1ff",
|
|
||||||
"background": "#278ad1ff",
|
|
||||||
"selection": "#278ad13d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#d33781ff",
|
|
||||||
"background": "#d33781ff",
|
|
||||||
"selection": "#d337813d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#cb4b16ff",
|
|
||||||
"background": "#cb4b16ff",
|
|
||||||
"selection": "#cb4b163d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#6c71c4ff",
|
|
||||||
"background": "#6c71c4ff",
|
|
||||||
"selection": "#6c71c43d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#2ba198ff",
|
|
||||||
"background": "#2ba198ff",
|
|
||||||
"selection": "#2ba1983d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#dc3330ff",
|
|
||||||
"background": "#dc3330ff",
|
|
||||||
"selection": "#dc33303d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#b58902ff",
|
|
||||||
"background": "#b58902ff",
|
|
||||||
"selection": "#b589023d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#849903ff",
|
|
||||||
"background": "#849903ff",
|
|
||||||
"selection": "#8499033d"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"syntax": {
|
|
||||||
"attribute": {
|
|
||||||
"color": "#278ad1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"boolean": {
|
|
||||||
"color": "#849903ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"comment": {
|
|
||||||
"color": "#99a5a4ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"comment.doc": {
|
|
||||||
"color": "#99a5a4ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"constant": {
|
|
||||||
"color": "#849903ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"constructor": {
|
|
||||||
"color": "#278ad1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"embedded": {
|
|
||||||
"color": "#fdf6e3ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"emphasis": {
|
|
||||||
"color": "#278ad1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"emphasis.strong": {
|
|
||||||
"color": "#278ad1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"enum": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"function": {
|
|
||||||
"color": "#b58902ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"hint": {
|
|
||||||
"color": "#4f8297ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"keyword": {
|
|
||||||
"color": "#278ad1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"label": {
|
|
||||||
"color": "#278ad1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"link_text": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": "italic",
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"link_uri": {
|
|
||||||
"color": "#849903ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"number": {
|
|
||||||
"color": "#849903ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"operator": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"predictive": {
|
|
||||||
"color": "#3f718bff",
|
|
||||||
"font_style": "italic",
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"preproc": {
|
|
||||||
"color": "#fdf6e3ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"primary": {
|
|
||||||
"color": "#fdf6e3ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"property": {
|
|
||||||
"color": "#278ad1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation": {
|
|
||||||
"color": "#efe9d6ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.bracket": {
|
|
||||||
"color": "#efe9d6ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.delimiter": {
|
|
||||||
"color": "#efe9d6ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.list_marker": {
|
|
||||||
"color": "#efe9d6ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.special": {
|
|
||||||
"color": "#efe9d6ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.escape": {
|
|
||||||
"color": "#99a5a4ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.regex": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.special": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.special.symbol": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"tag": {
|
|
||||||
"color": "#278ad1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"text.literal": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"title": {
|
|
||||||
"color": "#fdf6e3ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"color": "#2ba198ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"variable": {
|
|
||||||
"color": "#fdf6e3ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"variant": {
|
|
||||||
"color": "#278ad1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Solarized Light",
|
|
||||||
"appearance": "light",
|
|
||||||
"style": {
|
|
||||||
"border": "#9faaa8ff",
|
|
||||||
"border.variant": "#dcdacbff",
|
|
||||||
"border.focused": "#bfd3efff",
|
|
||||||
"border.selected": "#bfd3efff",
|
|
||||||
"border.transparent": "#00000000",
|
|
||||||
"border.disabled": "#b6bcb5ff",
|
|
||||||
"elevated_surface.background": "#f3eddaff",
|
|
||||||
"surface.background": "#f3eddaff",
|
|
||||||
"background": "#cfd0c4ff",
|
|
||||||
"element.background": "#f3eddaff",
|
|
||||||
"element.hover": "#dcdacbff",
|
|
||||||
"element.active": "#a2aca9ff",
|
|
||||||
"element.selected": "#a2aca9ff",
|
|
||||||
"element.disabled": "#f3eddaff",
|
|
||||||
"drop_target.background": "#34555e80",
|
|
||||||
"ghost_element.background": "#00000000",
|
|
||||||
"ghost_element.hover": "#dcdacbff",
|
|
||||||
"ghost_element.active": "#a2aca9ff",
|
|
||||||
"ghost_element.selected": "#a2aca9ff",
|
|
||||||
"ghost_element.disabled": "#f3eddaff",
|
|
||||||
"text": "#002a35ff",
|
|
||||||
"text.muted": "#34555eff",
|
|
||||||
"text.placeholder": "#6a7f86ff",
|
|
||||||
"text.disabled": "#6a7f86ff",
|
|
||||||
"text.accent": "#288bd1ff",
|
|
||||||
"icon": "#002a35ff",
|
|
||||||
"icon.muted": "#34555eff",
|
|
||||||
"icon.disabled": "#6a7f86ff",
|
|
||||||
"icon.placeholder": "#34555eff",
|
|
||||||
"icon.accent": "#288bd1ff",
|
|
||||||
"status_bar.background": "#cfd0c4ff",
|
|
||||||
"title_bar.background": "#cfd0c4ff",
|
|
||||||
"title_bar.inactive_background": "#f3eddaff",
|
|
||||||
"toolbar.background": "#fdf6e3ff",
|
|
||||||
"tab_bar.background": "#f3eddaff",
|
|
||||||
"tab.inactive_background": "#f3eddaff",
|
|
||||||
"tab.active_background": "#fdf6e3ff",
|
|
||||||
"search.match_background": "#298bd166",
|
|
||||||
"panel.background": "#f3eddaff",
|
|
||||||
"panel.focused_border": "#288bd1ff",
|
|
||||||
"pane.focused_border": null,
|
|
||||||
"scrollbar.thumb.background": "#002a354c",
|
|
||||||
"scrollbar.thumb.hover_background": "#dcdacbff",
|
|
||||||
"scrollbar.thumb.border": "#dcdacbff",
|
|
||||||
"scrollbar.track.background": "#00000000",
|
|
||||||
"scrollbar.track.border": "#f5eedbff",
|
|
||||||
"editor.foreground": "#002a35ff",
|
|
||||||
"editor.background": "#fdf6e3ff",
|
|
||||||
"editor.gutter.background": "#fdf6e3ff",
|
|
||||||
"editor.subheader.background": "#f3eddaff",
|
|
||||||
"editor.active_line.background": "#f3eddabf",
|
|
||||||
"editor.highlighted_line.background": "#f3eddaff",
|
|
||||||
"editor.line_number": "#a8ad9f",
|
|
||||||
"editor.active_line_number": "#272923",
|
|
||||||
"editor.hover_line_number": "#42453b",
|
|
||||||
"editor.invisible": "#6c8287ff",
|
|
||||||
"editor.wrap_guide": "#002a350d",
|
|
||||||
"editor.active_wrap_guide": "#002a351a",
|
|
||||||
"editor.document_highlight.read_background": "#288bd11a",
|
|
||||||
"editor.document_highlight.write_background": "#6c828766",
|
|
||||||
"terminal.background": "#fdf6e3ff",
|
|
||||||
"terminal.foreground": "#002a35ff",
|
|
||||||
"terminal.bright_foreground": "#002a35ff",
|
|
||||||
"terminal.dim_foreground": "#fdf6e3ff",
|
|
||||||
"terminal.ansi.black": "#fdf6e3ff",
|
|
||||||
"terminal.ansi.bright_black": "#7b8e91ff",
|
|
||||||
"terminal.ansi.dim_black": "#002a35ff",
|
|
||||||
"terminal.ansi.red": "#dc3330ff",
|
|
||||||
"terminal.ansi.bright_red": "#faa091ff",
|
|
||||||
"terminal.ansi.dim_red": "#7d181cff",
|
|
||||||
"terminal.ansi.green": "#849903ff",
|
|
||||||
"terminal.ansi.bright_green": "#c6cb8bff",
|
|
||||||
"terminal.ansi.dim_green": "#434a10ff",
|
|
||||||
"terminal.ansi.yellow": "#b58903ff",
|
|
||||||
"terminal.ansi.bright_yellow": "#e0c189ff",
|
|
||||||
"terminal.ansi.dim_yellow": "#5d430fff",
|
|
||||||
"terminal.ansi.blue": "#288bd1ff",
|
|
||||||
"terminal.ansi.bright_blue": "#a5c3e9ff",
|
|
||||||
"terminal.ansi.dim_blue": "#214365ff",
|
|
||||||
"terminal.ansi.magenta": "#d33781ff",
|
|
||||||
"terminal.ansi.bright_magenta": "#f0a2beff",
|
|
||||||
"terminal.ansi.dim_magenta": "#6f1f3fff",
|
|
||||||
"terminal.ansi.cyan": "#2ba198ff",
|
|
||||||
"terminal.ansi.bright_cyan": "#9fd0cbff",
|
|
||||||
"terminal.ansi.dim_cyan": "#204e4aff",
|
|
||||||
"terminal.ansi.white": "#002a35ff",
|
|
||||||
"terminal.ansi.bright_white": "#002a35ff",
|
|
||||||
"terminal.ansi.dim_white": "#5c7279ff",
|
|
||||||
"link_text.hover": "#288bd1ff",
|
|
||||||
"conflict": "#b58903ff",
|
|
||||||
"conflict.background": "#f5e6d0ff",
|
|
||||||
"conflict.border": "#ebd3aaff",
|
|
||||||
"created": "#849903ff",
|
|
||||||
"created.background": "#e9ead0ff",
|
|
||||||
"created.border": "#d6d9abff",
|
|
||||||
"deleted": "#dc3330ff",
|
|
||||||
"deleted.background": "#ffd9d2ff",
|
|
||||||
"deleted.border": "#ffbbafff",
|
|
||||||
"error": "#dc3330ff",
|
|
||||||
"error.background": "#ffd9d2ff",
|
|
||||||
"error.border": "#ffbbafff",
|
|
||||||
"hidden": "#6a7f86ff",
|
|
||||||
"hidden.background": "#cfd0c4ff",
|
|
||||||
"hidden.border": "#b6bcb5ff",
|
|
||||||
"hint": "#5789a3ff",
|
|
||||||
"hint.background": "#dbe6f6ff",
|
|
||||||
"hint.border": "#bfd3efff",
|
|
||||||
"ignored": "#6a7f86ff",
|
|
||||||
"ignored.background": "#cfd0c4ff",
|
|
||||||
"ignored.border": "#9faaa8ff",
|
|
||||||
"info": "#288bd1ff",
|
|
||||||
"info.background": "#dbe6f6ff",
|
|
||||||
"info.border": "#bfd3efff",
|
|
||||||
"modified": "#b58903ff",
|
|
||||||
"modified.background": "#f5e6d0ff",
|
|
||||||
"modified.border": "#ebd3aaff",
|
|
||||||
"predictive": "#679aafff",
|
|
||||||
"predictive.background": "#e9ead0ff",
|
|
||||||
"predictive.border": "#d6d9abff",
|
|
||||||
"renamed": "#288bd1ff",
|
|
||||||
"renamed.background": "#dbe6f6ff",
|
|
||||||
"renamed.border": "#bfd3efff",
|
|
||||||
"success": "#849903ff",
|
|
||||||
"success.background": "#e9ead0ff",
|
|
||||||
"success.border": "#d6d9abff",
|
|
||||||
"unreachable": "#34555eff",
|
|
||||||
"unreachable.background": "#cfd0c4ff",
|
|
||||||
"unreachable.border": "#9faaa8ff",
|
|
||||||
"warning": "#b58903ff",
|
|
||||||
"warning.background": "#f5e6d0ff",
|
|
||||||
"warning.border": "#ebd3aaff",
|
|
||||||
"players": [
|
|
||||||
{
|
|
||||||
"cursor": "#288bd1ff",
|
|
||||||
"background": "#288bd1ff",
|
|
||||||
"selection": "#288bd13d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#d33781ff",
|
|
||||||
"background": "#d33781ff",
|
|
||||||
"selection": "#d337813d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#cb4b16ff",
|
|
||||||
"background": "#cb4b16ff",
|
|
||||||
"selection": "#cb4b173d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#6c71c3ff",
|
|
||||||
"background": "#6c71c3ff",
|
|
||||||
"selection": "#6c71c33d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#2ba198ff",
|
|
||||||
"background": "#2ba198ff",
|
|
||||||
"selection": "#2ba1983d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#dc3330ff",
|
|
||||||
"background": "#dc3330ff",
|
|
||||||
"selection": "#dc33303d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#b58903ff",
|
|
||||||
"background": "#b58903ff",
|
|
||||||
"selection": "#b589033d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#849903ff",
|
|
||||||
"background": "#849903ff",
|
|
||||||
"selection": "#8499033d"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"syntax": {
|
|
||||||
"attribute": {
|
|
||||||
"color": "#288bd1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"boolean": {
|
|
||||||
"color": "#849903ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"comment": {
|
|
||||||
"color": "#30525bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"comment.doc": {
|
|
||||||
"color": "#30525bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"constant": {
|
|
||||||
"color": "#849903ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"constructor": {
|
|
||||||
"color": "#288bd1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"embedded": {
|
|
||||||
"color": "#002a35ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"emphasis": {
|
|
||||||
"color": "#288bd1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"emphasis.strong": {
|
|
||||||
"color": "#288bd1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"enum": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"function": {
|
|
||||||
"color": "#b58903ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"hint": {
|
|
||||||
"color": "#5789a3ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"keyword": {
|
|
||||||
"color": "#288bd1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"label": {
|
|
||||||
"color": "#288bd1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"link_text": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": "italic",
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"link_uri": {
|
|
||||||
"color": "#849903ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"number": {
|
|
||||||
"color": "#849903ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"operator": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"predictive": {
|
|
||||||
"color": "#679aafff",
|
|
||||||
"font_style": "italic",
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"preproc": {
|
|
||||||
"color": "#002a35ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"primary": {
|
|
||||||
"color": "#002a35ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"property": {
|
|
||||||
"color": "#288bd1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation": {
|
|
||||||
"color": "#04333eff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.bracket": {
|
|
||||||
"color": "#04333eff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.delimiter": {
|
|
||||||
"color": "#04333eff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.list_marker": {
|
|
||||||
"color": "#04333eff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.special": {
|
|
||||||
"color": "#04333eff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.escape": {
|
|
||||||
"color": "#30525bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.regex": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.special": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.special.symbol": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"tag": {
|
|
||||||
"color": "#288bd1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"text.literal": {
|
|
||||||
"color": "#cb4b16ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"title": {
|
|
||||||
"color": "#002a35ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"color": "#2ba198ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"variable": {
|
|
||||||
"color": "#002a35ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"variant": {
|
|
||||||
"color": "#288bd1ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2019 Zoe FiriH
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -1,378 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://zed.dev/schema/themes/v0.2.0.json",
|
|
||||||
"name": "Summercamp",
|
|
||||||
"author": "Zed Industries",
|
|
||||||
"themes": [
|
|
||||||
{
|
|
||||||
"name": "Summercamp",
|
|
||||||
"appearance": "dark",
|
|
||||||
"style": {
|
|
||||||
"border": "#302c21ff",
|
|
||||||
"border.variant": "#29251bff",
|
|
||||||
"border.focused": "#193760ff",
|
|
||||||
"border.selected": "#193760ff",
|
|
||||||
"border.transparent": "#00000000",
|
|
||||||
"border.disabled": "#2e2a1fff",
|
|
||||||
"elevated_surface.background": "#231f16ff",
|
|
||||||
"surface.background": "#231f16ff",
|
|
||||||
"background": "#2a261cff",
|
|
||||||
"element.background": "#231f16ff",
|
|
||||||
"element.hover": "#29251bff",
|
|
||||||
"element.active": "#2f2b20ff",
|
|
||||||
"element.selected": "#2f2b20ff",
|
|
||||||
"element.disabled": "#231f16ff",
|
|
||||||
"drop_target.background": "#736e5580",
|
|
||||||
"ghost_element.background": "#00000000",
|
|
||||||
"ghost_element.hover": "#29251bff",
|
|
||||||
"ghost_element.active": "#2f2b20ff",
|
|
||||||
"ghost_element.selected": "#2f2b20ff",
|
|
||||||
"ghost_element.disabled": "#231f16ff",
|
|
||||||
"text": "#f8f5deff",
|
|
||||||
"text.muted": "#736e55ff",
|
|
||||||
"text.placeholder": "#4c4735ff",
|
|
||||||
"text.disabled": "#4c4735ff",
|
|
||||||
"text.accent": "#499befff",
|
|
||||||
"icon": "#f8f5deff",
|
|
||||||
"icon.muted": "#736e55ff",
|
|
||||||
"icon.disabled": "#4c4735ff",
|
|
||||||
"icon.placeholder": "#736e55ff",
|
|
||||||
"icon.accent": "#499befff",
|
|
||||||
"status_bar.background": "#2a261cff",
|
|
||||||
"title_bar.background": "#2a261cff",
|
|
||||||
"title_bar.inactive_background": "#231f16ff",
|
|
||||||
"toolbar.background": "#1b1810ff",
|
|
||||||
"tab_bar.background": "#231f16ff",
|
|
||||||
"tab.inactive_background": "#231f16ff",
|
|
||||||
"tab.active_background": "#1b1810ff",
|
|
||||||
"search.match_background": "#499bef66",
|
|
||||||
"panel.background": "#231f16ff",
|
|
||||||
"panel.focused_border": "#499befff",
|
|
||||||
"pane.focused_border": null,
|
|
||||||
"scrollbar.thumb.background": "#f8f5de4c",
|
|
||||||
"scrollbar.thumb.hover_background": "#29251bff",
|
|
||||||
"scrollbar.thumb.border": "#29251bff",
|
|
||||||
"scrollbar.track.background": "#00000000",
|
|
||||||
"scrollbar.track.border": "#221e15ff",
|
|
||||||
"editor.foreground": "#f8f5deff",
|
|
||||||
"editor.background": "#1b1810ff",
|
|
||||||
"editor.gutter.background": "#1b1810ff",
|
|
||||||
"editor.subheader.background": "#231f16ff",
|
|
||||||
"editor.active_line.background": "#231f16bf",
|
|
||||||
"editor.highlighted_line.background": "#231f16ff",
|
|
||||||
"editor.line_number": "#676559",
|
|
||||||
"editor.active_line_number": "#e3e2de",
|
|
||||||
"editor.hover_line_number": "#b8b6ad",
|
|
||||||
"editor.invisible": "#494433ff",
|
|
||||||
"editor.wrap_guide": "#f8f5de0d",
|
|
||||||
"editor.active_wrap_guide": "#f8f5de1a",
|
|
||||||
"editor.document_highlight.read_background": "#499bef1a",
|
|
||||||
"editor.document_highlight.write_background": "#49443366",
|
|
||||||
"terminal.background": "#1b1810ff",
|
|
||||||
"terminal.foreground": "#f8f5deff",
|
|
||||||
"terminal.bright_foreground": "#f8f5deff",
|
|
||||||
"terminal.dim_foreground": "#1b1810ff",
|
|
||||||
"terminal.ansi.black": "#1b1810ff",
|
|
||||||
"terminal.ansi.bright_black": "#3a3527ff",
|
|
||||||
"terminal.ansi.dim_black": "#f8f5deff",
|
|
||||||
"terminal.ansi.red": "#e35041ff",
|
|
||||||
"terminal.ansi.bright_red": "#7f2724ff",
|
|
||||||
"terminal.ansi.dim_red": "#faaa9bff",
|
|
||||||
"terminal.ansi.green": "#5dea5aff",
|
|
||||||
"terminal.ansi.bright_green": "#28842cff",
|
|
||||||
"terminal.ansi.dim_green": "#b9f7aeff",
|
|
||||||
"terminal.ansi.yellow": "#f1fe28ff",
|
|
||||||
"terminal.ansi.bright_yellow": "#8c9a0fff",
|
|
||||||
"terminal.ansi.dim_yellow": "#ffffa2ff",
|
|
||||||
"terminal.ansi.blue": "#499befff",
|
|
||||||
"terminal.ansi.bright_blue": "#234b7fff",
|
|
||||||
"terminal.ansi.dim_blue": "#b1ccf8ff",
|
|
||||||
"terminal.ansi.magenta": "#f59be6ff",
|
|
||||||
"terminal.ansi.bright_magenta": "#88487eff",
|
|
||||||
"terminal.ansi.dim_magenta": "#fccef3ff",
|
|
||||||
"terminal.ansi.cyan": "#5aeabbff",
|
|
||||||
"terminal.ansi.bright_cyan": "#288461ff",
|
|
||||||
"terminal.ansi.dim_cyan": "#b7f6ddff",
|
|
||||||
"terminal.ansi.white": "#f8f5deff",
|
|
||||||
"terminal.ansi.bright_white": "#f8f5deff",
|
|
||||||
"terminal.ansi.dim_white": "#57533fff",
|
|
||||||
"link_text.hover": "#499befff",
|
|
||||||
"conflict": "#f1fe28ff",
|
|
||||||
"conflict.background": "#546205ff",
|
|
||||||
"conflict.border": "#717f0aff",
|
|
||||||
"created": "#5dea5aff",
|
|
||||||
"created.background": "#094d12ff",
|
|
||||||
"created.border": "#1a6a20ff",
|
|
||||||
"deleted": "#e35041ff",
|
|
||||||
"deleted.background": "#490f12ff",
|
|
||||||
"deleted.border": "#651c1cff",
|
|
||||||
"error": "#e35041ff",
|
|
||||||
"error.background": "#490f12ff",
|
|
||||||
"error.border": "#651c1cff",
|
|
||||||
"hidden": "#4c4735ff",
|
|
||||||
"hidden.background": "#2a261cff",
|
|
||||||
"hidden.border": "#2e2a1fff",
|
|
||||||
"hint": "#246e61ff",
|
|
||||||
"hint.background": "#0e2242ff",
|
|
||||||
"hint.border": "#193760ff",
|
|
||||||
"ignored": "#4c4735ff",
|
|
||||||
"ignored.background": "#2a261cff",
|
|
||||||
"ignored.border": "#302c21ff",
|
|
||||||
"info": "#499befff",
|
|
||||||
"info.background": "#0e2242ff",
|
|
||||||
"info.border": "#193760ff",
|
|
||||||
"modified": "#f1fe28ff",
|
|
||||||
"modified.background": "#546205ff",
|
|
||||||
"modified.border": "#717f0aff",
|
|
||||||
"predictive": "#78434aff",
|
|
||||||
"predictive.background": "#094d12ff",
|
|
||||||
"predictive.border": "#1a6a20ff",
|
|
||||||
"renamed": "#499befff",
|
|
||||||
"renamed.background": "#0e2242ff",
|
|
||||||
"renamed.border": "#193760ff",
|
|
||||||
"success": "#5dea5aff",
|
|
||||||
"success.background": "#094d12ff",
|
|
||||||
"success.border": "#1a6a20ff",
|
|
||||||
"unreachable": "#736e55ff",
|
|
||||||
"unreachable.background": "#2a261cff",
|
|
||||||
"unreachable.border": "#302c21ff",
|
|
||||||
"warning": "#f1fe28ff",
|
|
||||||
"warning.background": "#546205ff",
|
|
||||||
"warning.border": "#717f0aff",
|
|
||||||
"players": [
|
|
||||||
{
|
|
||||||
"cursor": "#499befff",
|
|
||||||
"background": "#499befff",
|
|
||||||
"selection": "#499bef3d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#f59be6ff",
|
|
||||||
"background": "#f59be6ff",
|
|
||||||
"selection": "#f59be63d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#faa11cff",
|
|
||||||
"background": "#faa11cff",
|
|
||||||
"selection": "#faa11c3d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#fe8080ff",
|
|
||||||
"background": "#fe8080ff",
|
|
||||||
"selection": "#fe80803d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#5aeabbff",
|
|
||||||
"background": "#5aeabbff",
|
|
||||||
"selection": "#5aeabb3d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#e35041ff",
|
|
||||||
"background": "#e35041ff",
|
|
||||||
"selection": "#e350413d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#f1fe28ff",
|
|
||||||
"background": "#f1fe28ff",
|
|
||||||
"selection": "#f1fe283d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cursor": "#5dea5aff",
|
|
||||||
"background": "#5dea5aff",
|
|
||||||
"selection": "#5dea5a3d"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"syntax": {
|
|
||||||
"attribute": {
|
|
||||||
"color": "#499befff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"boolean": {
|
|
||||||
"color": "#5dea5aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"comment": {
|
|
||||||
"color": "#777159ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"comment.doc": {
|
|
||||||
"color": "#777159ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"constant": {
|
|
||||||
"color": "#5dea5aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"constructor": {
|
|
||||||
"color": "#499befff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"embedded": {
|
|
||||||
"color": "#f8f5deff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"emphasis": {
|
|
||||||
"color": "#499befff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"emphasis.strong": {
|
|
||||||
"color": "#499befff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"enum": {
|
|
||||||
"color": "#faa11cff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"function": {
|
|
||||||
"color": "#f1fe28ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"hint": {
|
|
||||||
"color": "#246e61ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"keyword": {
|
|
||||||
"color": "#499befff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"label": {
|
|
||||||
"color": "#499befff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"link_text": {
|
|
||||||
"color": "#faa11cff",
|
|
||||||
"font_style": "italic",
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"link_uri": {
|
|
||||||
"color": "#5dea5aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"number": {
|
|
||||||
"color": "#5dea5aff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"operator": {
|
|
||||||
"color": "#faa11cff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"predictive": {
|
|
||||||
"color": "#78434aff",
|
|
||||||
"font_style": "italic",
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"preproc": {
|
|
||||||
"color": "#f8f5deff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"primary": {
|
|
||||||
"color": "#f8f5deff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"property": {
|
|
||||||
"color": "#499befff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation": {
|
|
||||||
"color": "#bfbb9bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.bracket": {
|
|
||||||
"color": "#bfbb9bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.delimiter": {
|
|
||||||
"color": "#bfbb9bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.list_marker": {
|
|
||||||
"color": "#bfbb9bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"punctuation.special": {
|
|
||||||
"color": "#bfbb9bff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string": {
|
|
||||||
"color": "#faa11cff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.escape": {
|
|
||||||
"color": "#777159ff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.regex": {
|
|
||||||
"color": "#faa11cff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.special": {
|
|
||||||
"color": "#faa11cff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"string.special.symbol": {
|
|
||||||
"color": "#faa11cff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"tag": {
|
|
||||||
"color": "#499befff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"text.literal": {
|
|
||||||
"color": "#faa11cff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"title": {
|
|
||||||
"color": "#f8f5deff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": 700
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"color": "#5aeabbff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"variable": {
|
|
||||||
"color": "#f8f5deff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
},
|
|
||||||
"variant": {
|
|
||||||
"color": "#499befff",
|
|
||||||
"font_style": null,
|
|
||||||
"font_weight": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ name = "anthropic"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
publish.workspace = true
|
publish.workspace = true
|
||||||
license = "AGPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../../LICENSE-AGPL
|
|
||||||
@@ -30,6 +30,8 @@ pub enum Model {
|
|||||||
#[default]
|
#[default]
|
||||||
#[serde(rename = "claude-3-5-sonnet", alias = "claude-3-5-sonnet-latest")]
|
#[serde(rename = "claude-3-5-sonnet", alias = "claude-3-5-sonnet-latest")]
|
||||||
Claude3_5Sonnet,
|
Claude3_5Sonnet,
|
||||||
|
#[serde(rename = "claude-3-7-sonnet", alias = "claude-3-7-sonnet-latest")]
|
||||||
|
Claude3_7Sonnet,
|
||||||
#[serde(rename = "claude-3-5-haiku", alias = "claude-3-5-haiku-latest")]
|
#[serde(rename = "claude-3-5-haiku", alias = "claude-3-5-haiku-latest")]
|
||||||
Claude3_5Haiku,
|
Claude3_5Haiku,
|
||||||
#[serde(rename = "claude-3-opus", alias = "claude-3-opus-latest")]
|
#[serde(rename = "claude-3-opus", alias = "claude-3-opus-latest")]
|
||||||
@@ -59,6 +61,8 @@ impl Model {
|
|||||||
pub fn from_id(id: &str) -> Result<Self> {
|
pub fn from_id(id: &str) -> Result<Self> {
|
||||||
if id.starts_with("claude-3-5-sonnet") {
|
if id.starts_with("claude-3-5-sonnet") {
|
||||||
Ok(Self::Claude3_5Sonnet)
|
Ok(Self::Claude3_5Sonnet)
|
||||||
|
} else if id.starts_with("claude-3-7-sonnet") {
|
||||||
|
Ok(Self::Claude3_7Sonnet)
|
||||||
} else if id.starts_with("claude-3-5-haiku") {
|
} else if id.starts_with("claude-3-5-haiku") {
|
||||||
Ok(Self::Claude3_5Haiku)
|
Ok(Self::Claude3_5Haiku)
|
||||||
} else if id.starts_with("claude-3-opus") {
|
} else if id.starts_with("claude-3-opus") {
|
||||||
@@ -75,6 +79,7 @@ impl Model {
|
|||||||
pub fn id(&self) -> &str {
|
pub fn id(&self) -> &str {
|
||||||
match self {
|
match self {
|
||||||
Model::Claude3_5Sonnet => "claude-3-5-sonnet-latest",
|
Model::Claude3_5Sonnet => "claude-3-5-sonnet-latest",
|
||||||
|
Model::Claude3_7Sonnet => "claude-3-7-sonnet-latest",
|
||||||
Model::Claude3_5Haiku => "claude-3-5-haiku-latest",
|
Model::Claude3_5Haiku => "claude-3-5-haiku-latest",
|
||||||
Model::Claude3Opus => "claude-3-opus-latest",
|
Model::Claude3Opus => "claude-3-opus-latest",
|
||||||
Model::Claude3Sonnet => "claude-3-sonnet-20240229",
|
Model::Claude3Sonnet => "claude-3-sonnet-20240229",
|
||||||
@@ -85,6 +90,7 @@ impl Model {
|
|||||||
|
|
||||||
pub fn display_name(&self) -> &str {
|
pub fn display_name(&self) -> &str {
|
||||||
match self {
|
match self {
|
||||||
|
Self::Claude3_7Sonnet => "Claude 3.7 Sonnet",
|
||||||
Self::Claude3_5Sonnet => "Claude 3.5 Sonnet",
|
Self::Claude3_5Sonnet => "Claude 3.5 Sonnet",
|
||||||
Self::Claude3_5Haiku => "Claude 3.5 Haiku",
|
Self::Claude3_5Haiku => "Claude 3.5 Haiku",
|
||||||
Self::Claude3Opus => "Claude 3 Opus",
|
Self::Claude3Opus => "Claude 3 Opus",
|
||||||
@@ -98,13 +104,14 @@ impl Model {
|
|||||||
|
|
||||||
pub fn cache_configuration(&self) -> Option<AnthropicModelCacheConfiguration> {
|
pub fn cache_configuration(&self) -> Option<AnthropicModelCacheConfiguration> {
|
||||||
match self {
|
match self {
|
||||||
Self::Claude3_5Sonnet | Self::Claude3_5Haiku | Self::Claude3Haiku => {
|
Self::Claude3_5Sonnet
|
||||||
Some(AnthropicModelCacheConfiguration {
|
| Self::Claude3_5Haiku
|
||||||
min_total_token: 2_048,
|
| Self::Claude3_7Sonnet
|
||||||
should_speculate: true,
|
| Self::Claude3Haiku => Some(AnthropicModelCacheConfiguration {
|
||||||
max_cache_anchors: 4,
|
min_total_token: 2_048,
|
||||||
})
|
should_speculate: true,
|
||||||
}
|
max_cache_anchors: 4,
|
||||||
|
}),
|
||||||
Self::Custom {
|
Self::Custom {
|
||||||
cache_configuration,
|
cache_configuration,
|
||||||
..
|
..
|
||||||
@@ -117,6 +124,7 @@ impl Model {
|
|||||||
match self {
|
match self {
|
||||||
Self::Claude3_5Sonnet
|
Self::Claude3_5Sonnet
|
||||||
| Self::Claude3_5Haiku
|
| Self::Claude3_5Haiku
|
||||||
|
| Self::Claude3_7Sonnet
|
||||||
| Self::Claude3Opus
|
| Self::Claude3Opus
|
||||||
| Self::Claude3Sonnet
|
| Self::Claude3Sonnet
|
||||||
| Self::Claude3Haiku => 200_000,
|
| Self::Claude3Haiku => 200_000,
|
||||||
@@ -127,7 +135,7 @@ impl Model {
|
|||||||
pub fn max_output_tokens(&self) -> u32 {
|
pub fn max_output_tokens(&self) -> u32 {
|
||||||
match self {
|
match self {
|
||||||
Self::Claude3Opus | Self::Claude3Sonnet | Self::Claude3Haiku => 4_096,
|
Self::Claude3Opus | Self::Claude3Sonnet | Self::Claude3Haiku => 4_096,
|
||||||
Self::Claude3_5Sonnet | Self::Claude3_5Haiku => 8_192,
|
Self::Claude3_5Sonnet | Self::Claude3_7Sonnet | Self::Claude3_5Haiku => 8_192,
|
||||||
Self::Custom {
|
Self::Custom {
|
||||||
max_output_tokens, ..
|
max_output_tokens, ..
|
||||||
} => max_output_tokens.unwrap_or(4_096),
|
} => max_output_tokens.unwrap_or(4_096),
|
||||||
@@ -137,6 +145,7 @@ impl Model {
|
|||||||
pub fn default_temperature(&self) -> f32 {
|
pub fn default_temperature(&self) -> f32 {
|
||||||
match self {
|
match self {
|
||||||
Self::Claude3_5Sonnet
|
Self::Claude3_5Sonnet
|
||||||
|
| Self::Claude3_7Sonnet
|
||||||
| Self::Claude3_5Haiku
|
| Self::Claude3_5Haiku
|
||||||
| Self::Claude3Opus
|
| Self::Claude3Opus
|
||||||
| Self::Claude3Sonnet
|
| Self::Claude3Sonnet
|
||||||
@@ -250,7 +259,7 @@ pub async fn stream_completion(
|
|||||||
.map(|output| output.0)
|
.map(|output| output.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// https://docs.anthropic.com/en/api/rate-limits#response-headers
|
/// <https://docs.anthropic.com/en/api/rate-limits#response-headers>
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct RateLimitInfo {
|
pub struct RateLimitInfo {
|
||||||
pub requests_limit: usize,
|
pub requests_limit: usize,
|
||||||
@@ -626,7 +635,7 @@ pub struct ApiError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// An Anthropic API error code.
|
/// An Anthropic API error code.
|
||||||
/// https://docs.anthropic.com/en/api/errors#http-errors
|
/// <https://docs.anthropic.com/en/api/errors#http-errors>
|
||||||
#[derive(Debug, PartialEq, Eq, Clone, Copy, EnumString)]
|
#[derive(Debug, PartialEq, Eq, Clone, Copy, EnumString)]
|
||||||
#[strum(serialize_all = "snake_case")]
|
#[strum(serialize_all = "snake_case")]
|
||||||
pub enum ApiErrorCode {
|
pub enum ApiErrorCode {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use std::sync::LazyLock;
|
|||||||
|
|
||||||
/// Returns whether the given country code is supported by Anthropic.
|
/// Returns whether the given country code is supported by Anthropic.
|
||||||
///
|
///
|
||||||
/// https://www.anthropic.com/supported-countries
|
/// <https://www.anthropic.com/supported-countries>
|
||||||
pub fn is_supported_country(country_code: &str) -> bool {
|
pub fn is_supported_country(country_code: &str) -> bool {
|
||||||
SUPPORTED_COUNTRIES.contains(&country_code)
|
SUPPORTED_COUNTRIES.contains(&country_code)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ indoc.workspace = true
|
|||||||
language.workspace = true
|
language.workspace = true
|
||||||
language_model.workspace = true
|
language_model.workspace = true
|
||||||
language_model_selector.workspace = true
|
language_model_selector.workspace = true
|
||||||
language_models.workspace = true
|
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
lsp.workspace = true
|
lsp.workspace = true
|
||||||
menu.workspace = true
|
menu.workspace = true
|
||||||
@@ -59,7 +58,6 @@ search.workspace = true
|
|||||||
semantic_index.workspace = true
|
semantic_index.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
settings.workspace = true
|
settings.workspace = true
|
||||||
similar.workspace = true
|
|
||||||
smol.workspace = true
|
smol.workspace = true
|
||||||
streaming_diff.workspace = true
|
streaming_diff.workspace = true
|
||||||
telemetry.workspace = true
|
telemetry.workspace = true
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ actions!(
|
|||||||
[
|
[
|
||||||
InsertActivePrompt,
|
InsertActivePrompt,
|
||||||
DeployHistory,
|
DeployHistory,
|
||||||
NewContext,
|
NewChat,
|
||||||
CycleNextInlineAssist,
|
CycleNextInlineAssist,
|
||||||
CyclePreviousInlineAssist
|
CyclePreviousInlineAssist
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
use crate::assistant_configuration::{ConfigurationView, ConfigurationViewEvent};
|
use crate::assistant_configuration::{ConfigurationView, ConfigurationViewEvent};
|
||||||
use crate::{
|
use crate::{
|
||||||
terminal_inline_assistant::TerminalInlineAssistant, DeployHistory, InlineAssistant, NewContext,
|
terminal_inline_assistant::TerminalInlineAssistant, DeployHistory, InlineAssistant, NewChat,
|
||||||
};
|
};
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use assistant_context_editor::{
|
use assistant_context_editor::{
|
||||||
make_lsp_adapter_delegate, AssistantContext, AssistantPanelDelegate, ContextEditor,
|
make_lsp_adapter_delegate, AssistantContext, AssistantPanelDelegate, ContextEditor,
|
||||||
ContextEditorToolbarItem, ContextEditorToolbarItemEvent, ContextHistory, ContextId,
|
ContextEditorToolbarItem, ContextEditorToolbarItemEvent, ContextHistory, ContextId,
|
||||||
ContextStore, ContextStoreEvent, InsertDraggedFiles, SlashCommandCompletionProvider,
|
ContextStore, ContextStoreEvent, InsertDraggedFiles, SlashCommandCompletionProvider,
|
||||||
ToggleModelSelector, DEFAULT_TAB_TITLE,
|
DEFAULT_TAB_TITLE,
|
||||||
};
|
};
|
||||||
use assistant_settings::{AssistantDockPosition, AssistantSettings};
|
use assistant_settings::{AssistantDockPosition, AssistantSettings};
|
||||||
use assistant_slash_command::SlashCommandWorkingSet;
|
use assistant_slash_command::SlashCommandWorkingSet;
|
||||||
use assistant_tool::ToolWorkingSet;
|
|
||||||
use client::{proto, Client, Status};
|
use client::{proto, Client, Status};
|
||||||
use editor::{Editor, EditorEvent};
|
use editor::{Editor, EditorEvent};
|
||||||
use fs::Fs;
|
use fs::Fs;
|
||||||
@@ -21,8 +20,9 @@ use gpui::{
|
|||||||
Subscription, Task, UpdateGlobal, WeakEntity,
|
Subscription, Task, UpdateGlobal, WeakEntity,
|
||||||
};
|
};
|
||||||
use language::LanguageRegistry;
|
use language::LanguageRegistry;
|
||||||
use language_model::{LanguageModelProviderId, LanguageModelRegistry, ZED_CLOUD_PROVIDER_ID};
|
use language_model::{
|
||||||
use language_model_selector::LanguageModelSelector;
|
AuthenticateError, LanguageModelProviderId, LanguageModelRegistry, ZED_CLOUD_PROVIDER_ID,
|
||||||
|
};
|
||||||
use project::Project;
|
use project::Project;
|
||||||
use prompt_library::{open_prompt_library, PromptBuilder, PromptLibrary};
|
use prompt_library::{open_prompt_library, PromptBuilder, PromptLibrary};
|
||||||
use search::{buffer_search::DivRegistrar, BufferSearchBar};
|
use search::{buffer_search::DivRegistrar, BufferSearchBar};
|
||||||
@@ -30,7 +30,7 @@ use settings::{update_settings_file, Settings};
|
|||||||
use smol::stream::StreamExt;
|
use smol::stream::StreamExt;
|
||||||
use std::{ops::ControlFlow, path::PathBuf, sync::Arc};
|
use std::{ops::ControlFlow, path::PathBuf, sync::Arc};
|
||||||
use terminal_view::{terminal_panel::TerminalPanel, TerminalView};
|
use terminal_view::{terminal_panel::TerminalPanel, TerminalView};
|
||||||
use ui::{prelude::*, ContextMenu, PopoverMenu, PopoverMenuHandle, Tooltip};
|
use ui::{prelude::*, ContextMenu, PopoverMenu, Tooltip};
|
||||||
use util::{maybe, ResultExt};
|
use util::{maybe, ResultExt};
|
||||||
use workspace::DraggedTab;
|
use workspace::DraggedTab;
|
||||||
use workspace::{
|
use workspace::{
|
||||||
@@ -78,7 +78,6 @@ pub struct AssistantPanel {
|
|||||||
languages: Arc<LanguageRegistry>,
|
languages: Arc<LanguageRegistry>,
|
||||||
fs: Arc<dyn Fs>,
|
fs: Arc<dyn Fs>,
|
||||||
subscriptions: Vec<Subscription>,
|
subscriptions: Vec<Subscription>,
|
||||||
model_selector_menu_handle: PopoverMenuHandle<LanguageModelSelector>,
|
|
||||||
model_summary_editor: Entity<Editor>,
|
model_summary_editor: Entity<Editor>,
|
||||||
authenticate_provider_task: Option<(LanguageModelProviderId, Task<()>)>,
|
authenticate_provider_task: Option<(LanguageModelProviderId, Task<()>)>,
|
||||||
configuration_subscription: Option<Subscription>,
|
configuration_subscription: Option<Subscription>,
|
||||||
@@ -100,11 +99,10 @@ impl AssistantPanel {
|
|||||||
) -> Task<Result<Entity<Self>>> {
|
) -> Task<Result<Entity<Self>>> {
|
||||||
cx.spawn(|mut cx| async move {
|
cx.spawn(|mut cx| async move {
|
||||||
let slash_commands = Arc::new(SlashCommandWorkingSet::default());
|
let slash_commands = Arc::new(SlashCommandWorkingSet::default());
|
||||||
let tools = Arc::new(ToolWorkingSet::default());
|
|
||||||
let context_store = workspace
|
let context_store = workspace
|
||||||
.update(&mut cx, |workspace, cx| {
|
.update(&mut cx, |workspace, cx| {
|
||||||
let project = workspace.project().clone();
|
let project = workspace.project().clone();
|
||||||
ContextStore::new(project, prompt_builder.clone(), slash_commands, tools, cx)
|
ContextStore::new(project, prompt_builder.clone(), slash_commands, cx)
|
||||||
})?
|
})?
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
@@ -121,17 +119,9 @@ impl AssistantPanel {
|
|||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let model_selector_menu_handle = PopoverMenuHandle::default();
|
|
||||||
let model_summary_editor = cx.new(|cx| Editor::single_line(window, cx));
|
let model_summary_editor = cx.new(|cx| Editor::single_line(window, cx));
|
||||||
let context_editor_toolbar = cx.new(|cx| {
|
let context_editor_toolbar =
|
||||||
ContextEditorToolbarItem::new(
|
cx.new(|_| ContextEditorToolbarItem::new(model_summary_editor.clone()));
|
||||||
workspace,
|
|
||||||
model_selector_menu_handle.clone(),
|
|
||||||
model_summary_editor.clone(),
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
let pane = cx.new(|cx| {
|
let pane = cx.new(|cx| {
|
||||||
let mut pane = Pane::new(
|
let mut pane = Pane::new(
|
||||||
@@ -139,7 +129,7 @@ impl AssistantPanel {
|
|||||||
workspace.project().clone(),
|
workspace.project().clone(),
|
||||||
Default::default(),
|
Default::default(),
|
||||||
None,
|
None,
|
||||||
NewContext.boxed_clone(),
|
NewChat.boxed_clone(),
|
||||||
window,
|
window,
|
||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
@@ -238,12 +228,12 @@ impl AssistantPanel {
|
|||||||
IconButton::new("new-chat", IconName::Plus)
|
IconButton::new("new-chat", IconName::Plus)
|
||||||
.icon_size(IconSize::Small)
|
.icon_size(IconSize::Small)
|
||||||
.on_click(cx.listener(|_, _, window, cx| {
|
.on_click(cx.listener(|_, _, window, cx| {
|
||||||
window.dispatch_action(NewContext.boxed_clone(), cx)
|
window.dispatch_action(NewChat.boxed_clone(), cx)
|
||||||
}))
|
}))
|
||||||
.tooltip(move |window, cx| {
|
.tooltip(move |window, cx| {
|
||||||
Tooltip::for_action_in(
|
Tooltip::for_action_in(
|
||||||
"New Chat",
|
"New Chat",
|
||||||
&NewContext,
|
&NewChat,
|
||||||
&focus_handle,
|
&focus_handle,
|
||||||
window,
|
window,
|
||||||
cx,
|
cx,
|
||||||
@@ -252,10 +242,10 @@ impl AssistantPanel {
|
|||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
PopoverMenu::new("assistant-panel-popover-menu")
|
PopoverMenu::new("assistant-panel-popover-menu")
|
||||||
.trigger(
|
.trigger_with_tooltip(
|
||||||
IconButton::new("menu", IconName::EllipsisVertical)
|
IconButton::new("menu", IconName::EllipsisVertical)
|
||||||
.icon_size(IconSize::Small)
|
.icon_size(IconSize::Small),
|
||||||
.tooltip(Tooltip::text("Toggle Assistant Menu")),
|
Tooltip::text("Toggle Assistant Menu"),
|
||||||
)
|
)
|
||||||
.menu(move |window, cx| {
|
.menu(move |window, cx| {
|
||||||
let zoom_label = if _pane.read(cx).is_zoomed() {
|
let zoom_label = if _pane.read(cx).is_zoomed() {
|
||||||
@@ -266,7 +256,7 @@ impl AssistantPanel {
|
|||||||
let focus_handle = _pane.focus_handle(cx);
|
let focus_handle = _pane.focus_handle(cx);
|
||||||
Some(ContextMenu::build(window, cx, move |menu, _, _| {
|
Some(ContextMenu::build(window, cx, move |menu, _, _| {
|
||||||
menu.context(focus_handle.clone())
|
menu.context(focus_handle.clone())
|
||||||
.action("New Chat", Box::new(NewContext))
|
.action("New Chat", Box::new(NewChat))
|
||||||
.action("History", Box::new(DeployHistory))
|
.action("History", Box::new(DeployHistory))
|
||||||
.action("Prompt Library", Box::new(DeployPromptLibrary))
|
.action("Prompt Library", Box::new(DeployPromptLibrary))
|
||||||
.action("Configure", Box::new(ShowConfiguration))
|
.action("Configure", Box::new(ShowConfiguration))
|
||||||
@@ -281,7 +271,17 @@ impl AssistantPanel {
|
|||||||
});
|
});
|
||||||
pane.toolbar().update(cx, |toolbar, cx| {
|
pane.toolbar().update(cx, |toolbar, cx| {
|
||||||
toolbar.add_item(context_editor_toolbar.clone(), window, cx);
|
toolbar.add_item(context_editor_toolbar.clone(), window, cx);
|
||||||
toolbar.add_item(cx.new(|cx| BufferSearchBar::new(window, cx)), window, cx)
|
toolbar.add_item(
|
||||||
|
cx.new(|cx| {
|
||||||
|
BufferSearchBar::new(
|
||||||
|
Some(workspace.project().read(cx).languages().clone()),
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
)
|
||||||
|
}),
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
)
|
||||||
});
|
});
|
||||||
pane
|
pane
|
||||||
});
|
});
|
||||||
@@ -323,7 +323,6 @@ impl AssistantPanel {
|
|||||||
languages: workspace.app_state().languages.clone(),
|
languages: workspace.app_state().languages.clone(),
|
||||||
fs: workspace.app_state().fs.clone(),
|
fs: workspace.app_state().fs.clone(),
|
||||||
subscriptions,
|
subscriptions,
|
||||||
model_selector_menu_handle,
|
|
||||||
model_summary_editor,
|
model_summary_editor,
|
||||||
authenticate_provider_task: None,
|
authenticate_provider_task: None,
|
||||||
configuration_subscription: None,
|
configuration_subscription: None,
|
||||||
@@ -761,7 +760,7 @@ impl AssistantPanel {
|
|||||||
|
|
||||||
pub fn create_new_context(
|
pub fn create_new_context(
|
||||||
workspace: &mut Workspace,
|
workspace: &mut Workspace,
|
||||||
_: &NewContext,
|
_: &NewChat,
|
||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
cx: &mut Context<Workspace>,
|
cx: &mut Context<Workspace>,
|
||||||
) {
|
) {
|
||||||
@@ -979,7 +978,7 @@ impl AssistantPanel {
|
|||||||
.active_provider()
|
.active_provider()
|
||||||
.map_or(true, |p| p.id() != provider.id())
|
.map_or(true, |p| p.id() != provider.id())
|
||||||
{
|
{
|
||||||
if let Some(model) = provider.provided_models(cx).first().cloned() {
|
if let Some(model) = provider.default_model(cx) {
|
||||||
update_settings_file::<AssistantSettings>(
|
update_settings_file::<AssistantSettings>(
|
||||||
this.fs.clone(),
|
this.fs.clone(),
|
||||||
cx,
|
cx,
|
||||||
@@ -1046,15 +1045,6 @@ impl AssistantPanel {
|
|||||||
.detach_and_log_err(cx);
|
.detach_and_log_err(cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn toggle_model_selector(
|
|
||||||
&mut self,
|
|
||||||
_: &ToggleModelSelector,
|
|
||||||
window: &mut Window,
|
|
||||||
cx: &mut Context<Self>,
|
|
||||||
) {
|
|
||||||
self.model_selector_menu_handle.toggle(window, cx);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) fn active_context_editor(&self, cx: &App) -> Option<Entity<ContextEditor>> {
|
pub(crate) fn active_context_editor(&self, cx: &App) -> Option<Entity<ContextEditor>> {
|
||||||
self.pane
|
self.pane
|
||||||
.read(cx)
|
.read(cx)
|
||||||
@@ -1168,7 +1158,10 @@ impl AssistantPanel {
|
|||||||
.map_or(false, |provider| provider.is_authenticated(cx))
|
.map_or(false, |provider| provider.is_authenticated(cx))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn authenticate(&mut self, cx: &mut Context<Self>) -> Option<Task<Result<()>>> {
|
fn authenticate(
|
||||||
|
&mut self,
|
||||||
|
cx: &mut Context<Self>,
|
||||||
|
) -> Option<Task<Result<(), AuthenticateError>>> {
|
||||||
LanguageModelRegistry::read_global(cx)
|
LanguageModelRegistry::read_global(cx)
|
||||||
.active_provider()
|
.active_provider()
|
||||||
.map_or(None, |provider| Some(provider.authenticate(cx)))
|
.map_or(None, |provider| Some(provider.authenticate(cx)))
|
||||||
@@ -1213,7 +1206,7 @@ impl Render for AssistantPanel {
|
|||||||
v_flex()
|
v_flex()
|
||||||
.key_context("AssistantPanel")
|
.key_context("AssistantPanel")
|
||||||
.size_full()
|
.size_full()
|
||||||
.on_action(cx.listener(|this, _: &NewContext, window, cx| {
|
.on_action(cx.listener(|this, _: &NewChat, window, cx| {
|
||||||
this.new_context(window, cx);
|
this.new_context(window, cx);
|
||||||
}))
|
}))
|
||||||
.on_action(cx.listener(|this, _: &ShowConfiguration, window, cx| {
|
.on_action(cx.listener(|this, _: &ShowConfiguration, window, cx| {
|
||||||
@@ -1221,7 +1214,6 @@ impl Render for AssistantPanel {
|
|||||||
}))
|
}))
|
||||||
.on_action(cx.listener(AssistantPanel::deploy_history))
|
.on_action(cx.listener(AssistantPanel::deploy_history))
|
||||||
.on_action(cx.listener(AssistantPanel::deploy_prompt_library))
|
.on_action(cx.listener(AssistantPanel::deploy_prompt_library))
|
||||||
.on_action(cx.listener(AssistantPanel::toggle_model_selector))
|
|
||||||
.child(registrar.size_full().child(self.pane.clone()))
|
.child(registrar.size_full().child(self.pane.clone()))
|
||||||
.into_any_element()
|
.into_any_element()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,13 +30,12 @@ use gpui::{
|
|||||||
EventEmitter, FocusHandle, Focusable, FontWeight, Global, HighlightStyle, Subscription, Task,
|
EventEmitter, FocusHandle, Focusable, FontWeight, Global, HighlightStyle, Subscription, Task,
|
||||||
TextStyle, UpdateGlobal, WeakEntity, Window,
|
TextStyle, UpdateGlobal, WeakEntity, Window,
|
||||||
};
|
};
|
||||||
use language::{Buffer, IndentKind, Point, Selection, TransactionId};
|
use language::{line_diff, Buffer, IndentKind, Point, Selection, TransactionId};
|
||||||
use language_model::{
|
use language_model::{
|
||||||
LanguageModel, LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage,
|
report_assistant_event, LanguageModel, LanguageModelRegistry, LanguageModelRequest,
|
||||||
LanguageModelTextStream, Role,
|
LanguageModelRequestMessage, LanguageModelTextStream, Role,
|
||||||
};
|
};
|
||||||
use language_model_selector::{LanguageModelSelector, LanguageModelSelectorPopoverMenu};
|
use language_model_selector::{InlineLanguageModelSelector, LanguageModelSelector};
|
||||||
use language_models::report_assistant_event;
|
|
||||||
use multi_buffer::MultiBufferRow;
|
use multi_buffer::MultiBufferRow;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use project::{CodeAction, ProjectTransaction};
|
use project::{CodeAction, ProjectTransaction};
|
||||||
@@ -1255,7 +1254,7 @@ impl InlineAssistant {
|
|||||||
editor.scroll_manager.set_forbid_vertical_scroll(true);
|
editor.scroll_manager.set_forbid_vertical_scroll(true);
|
||||||
editor.set_show_scrollbars(false, cx);
|
editor.set_show_scrollbars(false, cx);
|
||||||
editor.set_read_only(true);
|
editor.set_read_only(true);
|
||||||
editor.set_show_inline_completions(Some(false), window, cx);
|
editor.set_show_edit_predictions(Some(false), window, cx);
|
||||||
editor.highlight_rows::<DeletedLines>(
|
editor.highlight_rows::<DeletedLines>(
|
||||||
Anchor::min()..Anchor::max(),
|
Anchor::min()..Anchor::max(),
|
||||||
cx.theme().status().deleted_background,
|
cx.theme().status().deleted_background,
|
||||||
@@ -1590,28 +1589,10 @@ impl Render for PromptEditor {
|
|||||||
.w(gutter_dimensions.full_width() + (gutter_dimensions.margin / 2.0))
|
.w(gutter_dimensions.full_width() + (gutter_dimensions.margin / 2.0))
|
||||||
.justify_center()
|
.justify_center()
|
||||||
.gap_2()
|
.gap_2()
|
||||||
.child(LanguageModelSelectorPopoverMenu::new(
|
.child(
|
||||||
self.language_model_selector.clone(),
|
InlineLanguageModelSelector::new(self.language_model_selector.clone())
|
||||||
IconButton::new("context", IconName::SettingsAlt)
|
.render(window, cx),
|
||||||
.shape(IconButtonShape::Square)
|
)
|
||||||
.icon_size(IconSize::Small)
|
|
||||||
.icon_color(Color::Muted)
|
|
||||||
.tooltip(move |window, cx| {
|
|
||||||
Tooltip::with_meta(
|
|
||||||
format!(
|
|
||||||
"Using {}",
|
|
||||||
LanguageModelRegistry::read_global(cx)
|
|
||||||
.active_model()
|
|
||||||
.map(|model| model.name().0)
|
|
||||||
.unwrap_or_else(|| "No model selected".into()),
|
|
||||||
),
|
|
||||||
None,
|
|
||||||
"Change Model",
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
}),
|
|
||||||
))
|
|
||||||
.map(|el| {
|
.map(|el| {
|
||||||
let CodegenStatus::Error(error) = self.codegen.read(cx).status(cx) else {
|
let CodegenStatus::Error(error) = self.codegen.read(cx).status(cx) else {
|
||||||
return el;
|
return el;
|
||||||
@@ -1704,7 +1685,7 @@ impl PromptEditor {
|
|||||||
// always show the cursor (even when it isn't focused) because
|
// always show the cursor (even when it isn't focused) because
|
||||||
// typing in one will make what you typed appear in all of them.
|
// typing in one will make what you typed appear in all of them.
|
||||||
editor.set_show_cursor_when_unfocused(true, cx);
|
editor.set_show_cursor_when_unfocused(true, cx);
|
||||||
editor.set_placeholder_text(Self::placeholder_text(codegen.read(cx), window), cx);
|
editor.set_placeholder_text(Self::placeholder_text(codegen.read(cx), window, cx), cx);
|
||||||
editor
|
editor
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1783,7 +1764,10 @@ impl PromptEditor {
|
|||||||
self.editor = cx.new(|cx| {
|
self.editor = cx.new(|cx| {
|
||||||
let mut editor = Editor::auto_height(Self::MAX_LINES as usize, window, cx);
|
let mut editor = Editor::auto_height(Self::MAX_LINES as usize, window, cx);
|
||||||
editor.set_soft_wrap_mode(language::language_settings::SoftWrap::EditorWidth, cx);
|
editor.set_soft_wrap_mode(language::language_settings::SoftWrap::EditorWidth, cx);
|
||||||
editor.set_placeholder_text(Self::placeholder_text(self.codegen.read(cx), window), cx);
|
editor.set_placeholder_text(
|
||||||
|
Self::placeholder_text(self.codegen.read(cx), window, cx),
|
||||||
|
cx,
|
||||||
|
);
|
||||||
editor.set_placeholder_text("Add a prompt…", cx);
|
editor.set_placeholder_text("Add a prompt…", cx);
|
||||||
editor.set_text(prompt, window, cx);
|
editor.set_text(prompt, window, cx);
|
||||||
if focus {
|
if focus {
|
||||||
@@ -1794,8 +1778,8 @@ impl PromptEditor {
|
|||||||
self.subscribe_to_editor(window, cx);
|
self.subscribe_to_editor(window, cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn placeholder_text(codegen: &Codegen, window: &Window) -> String {
|
fn placeholder_text(codegen: &Codegen, window: &Window, cx: &App) -> String {
|
||||||
let context_keybinding = text_for_action(&zed_actions::assistant::ToggleFocus, window)
|
let context_keybinding = text_for_action(&zed_actions::assistant::ToggleFocus, window, cx)
|
||||||
.map(|keybinding| format!(" • {keybinding} for context"))
|
.map(|keybinding| format!(" • {keybinding} for context"))
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
@@ -2084,12 +2068,13 @@ impl PromptEditor {
|
|||||||
.tooltip({
|
.tooltip({
|
||||||
let focus_handle = self.editor.focus_handle(cx);
|
let focus_handle = self.editor.focus_handle(cx);
|
||||||
move |window, cx| {
|
move |window, cx| {
|
||||||
cx.new(|_| {
|
cx.new(|cx| {
|
||||||
let mut tooltip = Tooltip::new("Previous Alternative").key_binding(
|
let mut tooltip = Tooltip::new("Previous Alternative").key_binding(
|
||||||
KeyBinding::for_action_in(
|
KeyBinding::for_action_in(
|
||||||
&CyclePreviousInlineAssist,
|
&CyclePreviousInlineAssist,
|
||||||
&focus_handle,
|
&focus_handle,
|
||||||
window,
|
window,
|
||||||
|
cx,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if !disabled && current_index != 0 {
|
if !disabled && current_index != 0 {
|
||||||
@@ -2126,12 +2111,13 @@ impl PromptEditor {
|
|||||||
.tooltip({
|
.tooltip({
|
||||||
let focus_handle = self.editor.focus_handle(cx);
|
let focus_handle = self.editor.focus_handle(cx);
|
||||||
move |window, cx| {
|
move |window, cx| {
|
||||||
cx.new(|_| {
|
cx.new(|cx| {
|
||||||
let mut tooltip = Tooltip::new("Next Alternative").key_binding(
|
let mut tooltip = Tooltip::new("Next Alternative").key_binding(
|
||||||
KeyBinding::for_action_in(
|
KeyBinding::for_action_in(
|
||||||
&CycleNextInlineAssist,
|
&CycleNextInlineAssist,
|
||||||
&focus_handle,
|
&focus_handle,
|
||||||
window,
|
window,
|
||||||
|
cx,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if !disabled && current_index != total_models - 1 {
|
if !disabled && current_index != total_models - 1 {
|
||||||
@@ -2221,7 +2207,7 @@ impl PromptEditor {
|
|||||||
},
|
},
|
||||||
font_family: settings.buffer_font.family.clone(),
|
font_family: settings.buffer_font.family.clone(),
|
||||||
font_fallbacks: settings.buffer_font.fallbacks.clone(),
|
font_fallbacks: settings.buffer_font.fallbacks.clone(),
|
||||||
font_size: settings.buffer_font_size.into(),
|
font_size: settings.buffer_font_size(cx).into(),
|
||||||
font_weight: settings.buffer_font.weight,
|
font_weight: settings.buffer_font.weight,
|
||||||
line_height: relative(settings.buffer_line_height.value()),
|
line_height: relative(settings.buffer_line_height.value()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -3010,7 +2996,7 @@ impl CodegenAlternative {
|
|||||||
let executor = cx.background_executor().clone();
|
let executor = cx.background_executor().clone();
|
||||||
let message_id = message_id.clone();
|
let message_id = message_id.clone();
|
||||||
let line_based_stream_diff: Task<anyhow::Result<()>> =
|
let line_based_stream_diff: Task<anyhow::Result<()>> =
|
||||||
cx.background_executor().spawn(async move {
|
cx.background_spawn(async move {
|
||||||
let mut response_latency = None;
|
let mut response_latency = None;
|
||||||
let request_start = Instant::now();
|
let request_start = Instant::now();
|
||||||
let diff = async {
|
let diff = async {
|
||||||
@@ -3324,8 +3310,7 @@ impl CodegenAlternative {
|
|||||||
|
|
||||||
cx.spawn(|codegen, mut cx| async move {
|
cx.spawn(|codegen, mut cx| async move {
|
||||||
let (deleted_row_ranges, inserted_row_ranges) = cx
|
let (deleted_row_ranges, inserted_row_ranges) = cx
|
||||||
.background_executor()
|
.background_spawn(async move {
|
||||||
.spawn(async move {
|
|
||||||
let old_text = old_snapshot
|
let old_text = old_snapshot
|
||||||
.text_for_range(
|
.text_for_range(
|
||||||
Point::new(old_range.start.row, 0)
|
Point::new(old_range.start.row, 0)
|
||||||
@@ -3345,52 +3330,29 @@ impl CodegenAlternative {
|
|||||||
)
|
)
|
||||||
.collect::<String>();
|
.collect::<String>();
|
||||||
|
|
||||||
let mut old_row = old_range.start.row;
|
let old_start_row = old_range.start.row;
|
||||||
let mut new_row = new_range.start.row;
|
let new_start_row = new_range.start.row;
|
||||||
let batch_diff =
|
|
||||||
similar::TextDiff::from_lines(old_text.as_str(), new_text.as_str());
|
|
||||||
|
|
||||||
let mut deleted_row_ranges: Vec<(Anchor, RangeInclusive<u32>)> = Vec::new();
|
let mut deleted_row_ranges: Vec<(Anchor, RangeInclusive<u32>)> = Vec::new();
|
||||||
let mut inserted_row_ranges = Vec::new();
|
let mut inserted_row_ranges = Vec::new();
|
||||||
for change in batch_diff.iter_all_changes() {
|
for (old_rows, new_rows) in line_diff(&old_text, &new_text) {
|
||||||
let line_count = change.value().lines().count() as u32;
|
let old_rows = old_start_row + old_rows.start..old_start_row + old_rows.end;
|
||||||
match change.tag() {
|
let new_rows = new_start_row + new_rows.start..new_start_row + new_rows.end;
|
||||||
similar::ChangeTag::Equal => {
|
if !old_rows.is_empty() {
|
||||||
old_row += line_count;
|
deleted_row_ranges.push((
|
||||||
new_row += line_count;
|
new_snapshot.anchor_before(Point::new(new_rows.start, 0)),
|
||||||
}
|
old_rows.start..=old_rows.end - 1,
|
||||||
similar::ChangeTag::Delete => {
|
));
|
||||||
let old_end_row = old_row + line_count - 1;
|
}
|
||||||
let new_row = new_snapshot.anchor_before(Point::new(new_row, 0));
|
if !new_rows.is_empty() {
|
||||||
|
let start = new_snapshot.anchor_before(Point::new(new_rows.start, 0));
|
||||||
if let Some((_, last_deleted_row_range)) =
|
let new_end_row = new_rows.end - 1;
|
||||||
deleted_row_ranges.last_mut()
|
let end = new_snapshot.anchor_before(Point::new(
|
||||||
{
|
new_end_row,
|
||||||
if *last_deleted_row_range.end() + 1 == old_row {
|
new_snapshot.line_len(MultiBufferRow(new_end_row)),
|
||||||
*last_deleted_row_range =
|
));
|
||||||
*last_deleted_row_range.start()..=old_end_row;
|
inserted_row_ranges.push(start..end);
|
||||||
} else {
|
|
||||||
deleted_row_ranges.push((new_row, old_row..=old_end_row));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
deleted_row_ranges.push((new_row, old_row..=old_end_row));
|
|
||||||
}
|
|
||||||
|
|
||||||
old_row += line_count;
|
|
||||||
}
|
|
||||||
similar::ChangeTag::Insert => {
|
|
||||||
let new_end_row = new_row + line_count - 1;
|
|
||||||
let start = new_snapshot.anchor_before(Point::new(new_row, 0));
|
|
||||||
let end = new_snapshot.anchor_before(Point::new(
|
|
||||||
new_end_row,
|
|
||||||
new_snapshot.line_len(MultiBufferRow(new_end_row)),
|
|
||||||
));
|
|
||||||
inserted_row_ranges.push(start..end);
|
|
||||||
new_row += line_count;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(deleted_row_ranges, inserted_row_ranges)
|
(deleted_row_ranges, inserted_row_ranges)
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ use gpui::{
|
|||||||
};
|
};
|
||||||
use language::Buffer;
|
use language::Buffer;
|
||||||
use language_model::{
|
use language_model::{
|
||||||
LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage, Role,
|
report_assistant_event, LanguageModelRegistry, LanguageModelRequest,
|
||||||
|
LanguageModelRequestMessage, Role,
|
||||||
};
|
};
|
||||||
use language_model_selector::{LanguageModelSelector, LanguageModelSelectorPopoverMenu};
|
use language_model_selector::{InlineLanguageModelSelector, LanguageModelSelector};
|
||||||
use language_models::report_assistant_event;
|
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_library::PromptBuilder;
|
||||||
use settings::{update_settings_file, Settings};
|
use settings::{update_settings_file, Settings};
|
||||||
use std::{
|
use std::{
|
||||||
@@ -506,7 +506,7 @@ struct PromptEditor {
|
|||||||
impl EventEmitter<PromptEditorEvent> for PromptEditor {}
|
impl EventEmitter<PromptEditorEvent> for PromptEditor {}
|
||||||
|
|
||||||
impl Render for PromptEditor {
|
impl Render for PromptEditor {
|
||||||
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||||
let status = &self.codegen.read(cx).status;
|
let status = &self.codegen.read(cx).status;
|
||||||
let buttons = match status {
|
let buttons = match status {
|
||||||
CodegenStatus::Idle => {
|
CodegenStatus::Idle => {
|
||||||
@@ -641,28 +641,10 @@ impl Render for PromptEditor {
|
|||||||
.w_12()
|
.w_12()
|
||||||
.justify_center()
|
.justify_center()
|
||||||
.gap_2()
|
.gap_2()
|
||||||
.child(LanguageModelSelectorPopoverMenu::new(
|
.child(
|
||||||
self.language_model_selector.clone(),
|
InlineLanguageModelSelector::new(self.language_model_selector.clone())
|
||||||
IconButton::new("context", IconName::SettingsAlt)
|
.render(window, cx),
|
||||||
.shape(IconButtonShape::Square)
|
)
|
||||||
.icon_size(IconSize::Small)
|
|
||||||
.icon_color(Color::Muted)
|
|
||||||
.tooltip(move |window, cx| {
|
|
||||||
Tooltip::with_meta(
|
|
||||||
format!(
|
|
||||||
"Using {}",
|
|
||||||
LanguageModelRegistry::read_global(cx)
|
|
||||||
.active_model()
|
|
||||||
.map(|model| model.name().0)
|
|
||||||
.unwrap_or_else(|| "No model selected".into()),
|
|
||||||
),
|
|
||||||
None,
|
|
||||||
"Change Model",
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
}),
|
|
||||||
))
|
|
||||||
.children(
|
.children(
|
||||||
if let CodegenStatus::Error(error) = &self.codegen.read(cx).status {
|
if let CodegenStatus::Error(error) = &self.codegen.read(cx).status {
|
||||||
let error_message = SharedString::from(error.to_string());
|
let error_message = SharedString::from(error.to_string());
|
||||||
@@ -725,7 +707,7 @@ impl PromptEditor {
|
|||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
editor.set_soft_wrap_mode(language::language_settings::SoftWrap::EditorWidth, cx);
|
editor.set_soft_wrap_mode(language::language_settings::SoftWrap::EditorWidth, cx);
|
||||||
editor.set_placeholder_text(Self::placeholder_text(window), cx);
|
editor.set_placeholder_text(Self::placeholder_text(window, cx), cx);
|
||||||
editor
|
editor
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -774,8 +756,8 @@ impl PromptEditor {
|
|||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
|
||||||
fn placeholder_text(window: &Window) -> String {
|
fn placeholder_text(window: &Window, cx: &App) -> String {
|
||||||
let context_keybinding = text_for_action(&zed_actions::assistant::ToggleFocus, window)
|
let context_keybinding = text_for_action(&zed_actions::assistant::ToggleFocus, window, cx)
|
||||||
.map(|keybinding| format!(" • {keybinding} for context"))
|
.map(|keybinding| format!(" • {keybinding} for context"))
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
@@ -1048,7 +1030,7 @@ impl PromptEditor {
|
|||||||
},
|
},
|
||||||
font_family: settings.buffer_font.family.clone(),
|
font_family: settings.buffer_font.family.clone(),
|
||||||
font_fallbacks: settings.buffer_font.fallbacks.clone(),
|
font_fallbacks: settings.buffer_font.fallbacks.clone(),
|
||||||
font_size: settings.buffer_font_size.into(),
|
font_size: settings.buffer_font_size(cx).into(),
|
||||||
font_weight: settings.buffer_font.weight,
|
font_weight: settings.buffer_font.weight,
|
||||||
line_height: relative(settings.buffer_line_height.value()),
|
line_height: relative(settings.buffer_line_height.value()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -1072,7 +1054,10 @@ pub enum CodegenEvent {
|
|||||||
|
|
||||||
impl EventEmitter<CodegenEvent> for Codegen {}
|
impl EventEmitter<CodegenEvent> for Codegen {}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
const CLEAR_INPUT: &str = "\x15";
|
const CLEAR_INPUT: &str = "\x15";
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
const CLEAR_INPUT: &str = "\x03";
|
||||||
const CARRIAGE_RETURN: &str = "\x0d";
|
const CARRIAGE_RETURN: &str = "\x0d";
|
||||||
|
|
||||||
struct TerminalTransaction {
|
struct TerminalTransaction {
|
||||||
@@ -1150,7 +1135,7 @@ impl Codegen {
|
|||||||
|
|
||||||
let (mut hunks_tx, mut hunks_rx) = mpsc::channel(1);
|
let (mut hunks_tx, mut hunks_rx) = mpsc::channel(1);
|
||||||
|
|
||||||
let task = cx.background_executor().spawn({
|
let task = cx.background_spawn({
|
||||||
let message_id = message_id.clone();
|
let message_id = message_id.clone();
|
||||||
let executor = cx.background_executor().clone();
|
let executor = cx.background_executor().clone();
|
||||||
async move {
|
async move {
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ itertools.workspace = true
|
|||||||
language.workspace = true
|
language.workspace = true
|
||||||
language_model.workspace = true
|
language_model.workspace = true
|
||||||
language_model_selector.workspace = true
|
language_model_selector.workspace = true
|
||||||
language_models.workspace = true
|
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
lsp.workspace = true
|
lsp.workspace = true
|
||||||
markdown.workspace = true
|
markdown.workspace = true
|
||||||
@@ -62,7 +61,6 @@ rope.workspace = true
|
|||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
settings.workspace = true
|
settings.workspace = true
|
||||||
similar.workspace = true
|
|
||||||
smol.workspace = true
|
smol.workspace = true
|
||||||
streaming_diff.workspace = true
|
streaming_diff.workspace = true
|
||||||
telemetry_events.workspace = true
|
telemetry_events.workspace = true
|
||||||
@@ -75,9 +73,15 @@ time_format.workspace = true
|
|||||||
ui.workspace = true
|
ui.workspace = true
|
||||||
util.workspace = true
|
util.workspace = true
|
||||||
uuid.workspace = true
|
uuid.workspace = true
|
||||||
|
vim_mode_setting.workspace = true
|
||||||
workspace.workspace = true
|
workspace.workspace = true
|
||||||
zed_actions.workspace = true
|
zed_actions.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
editor = { workspace = true, features = ["test-support"] }
|
||||||
|
gpui = { workspace = true, "features" = ["test-support"] }
|
||||||
|
language = { workspace = true, "features" = ["test-support"] }
|
||||||
|
language_model = { workspace = true, "features" = ["test-support"] }
|
||||||
|
project = { workspace = true, features = ["test-support"] }
|
||||||
rand.workspace = true
|
rand.workspace = true
|
||||||
indoc.workspace = true
|
indoc.workspace = true
|
||||||
|
|||||||
@@ -8,15 +8,16 @@ use gpui::{
|
|||||||
UnderlineStyle, WeakEntity,
|
UnderlineStyle, WeakEntity,
|
||||||
};
|
};
|
||||||
use language::LanguageRegistry;
|
use language::LanguageRegistry;
|
||||||
use language_model::Role;
|
use language_model::{LanguageModelRegistry, LanguageModelToolUseId, Role};
|
||||||
use markdown::{Markdown, MarkdownStyle};
|
use markdown::{Markdown, MarkdownStyle};
|
||||||
use settings::Settings as _;
|
use settings::Settings as _;
|
||||||
use theme::ThemeSettings;
|
use theme::ThemeSettings;
|
||||||
use ui::prelude::*;
|
use ui::{prelude::*, Disclosure};
|
||||||
use workspace::Workspace;
|
use workspace::Workspace;
|
||||||
|
|
||||||
use crate::thread::{MessageId, Thread, ThreadError, ThreadEvent};
|
use crate::thread::{MessageId, RequestKind, Thread, ThreadError, ThreadEvent};
|
||||||
use crate::thread_store::ThreadStore;
|
use crate::thread_store::ThreadStore;
|
||||||
|
use crate::tool_use::{ToolUse, ToolUseStatus};
|
||||||
use crate::ui::ContextPill;
|
use crate::ui::ContextPill;
|
||||||
|
|
||||||
pub struct ActiveThread {
|
pub struct ActiveThread {
|
||||||
@@ -28,6 +29,7 @@ pub struct ActiveThread {
|
|||||||
messages: Vec<MessageId>,
|
messages: Vec<MessageId>,
|
||||||
list_state: ListState,
|
list_state: ListState,
|
||||||
rendered_messages_by_id: HashMap<MessageId, Entity<Markdown>>,
|
rendered_messages_by_id: HashMap<MessageId, Entity<Markdown>>,
|
||||||
|
expanded_tool_uses: HashMap<LanguageModelToolUseId, bool>,
|
||||||
last_error: Option<ThreadError>,
|
last_error: Option<ThreadError>,
|
||||||
_subscriptions: Vec<Subscription>,
|
_subscriptions: Vec<Subscription>,
|
||||||
}
|
}
|
||||||
@@ -55,6 +57,7 @@ impl ActiveThread {
|
|||||||
thread: thread.clone(),
|
thread: thread.clone(),
|
||||||
messages: Vec::new(),
|
messages: Vec::new(),
|
||||||
rendered_messages_by_id: HashMap::default(),
|
rendered_messages_by_id: HashMap::default(),
|
||||||
|
expanded_tool_uses: HashMap::default(),
|
||||||
list_state: ListState::new(0, ListAlignment::Bottom, px(1024.), {
|
list_state: ListState::new(0, ListAlignment::Bottom, px(1024.), {
|
||||||
let this = cx.entity().downgrade();
|
let this = cx.entity().downgrade();
|
||||||
move |ix, _: &mut Window, cx: &mut App| {
|
move |ix, _: &mut Window, cx: &mut App| {
|
||||||
@@ -179,11 +182,10 @@ impl ActiveThread {
|
|||||||
|
|
||||||
let markdown = cx.new(|cx| {
|
let markdown = cx.new(|cx| {
|
||||||
Markdown::new(
|
Markdown::new(
|
||||||
text,
|
text.into(),
|
||||||
markdown_style,
|
markdown_style,
|
||||||
Some(self.language_registry.clone()),
|
Some(self.language_registry.clone()),
|
||||||
None,
|
None,
|
||||||
window,
|
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
@@ -215,7 +217,7 @@ impl ActiveThread {
|
|||||||
ThreadEvent::StreamedAssistantText(message_id, text) => {
|
ThreadEvent::StreamedAssistantText(message_id, text) => {
|
||||||
if let Some(markdown) = self.rendered_messages_by_id.get_mut(&message_id) {
|
if let Some(markdown) = self.rendered_messages_by_id.get_mut(&message_id) {
|
||||||
markdown.update(cx, |markdown, cx| {
|
markdown.update(cx, |markdown, cx| {
|
||||||
markdown.append(text, window, cx);
|
markdown.append(text, cx);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -252,17 +254,29 @@ impl ActiveThread {
|
|||||||
let task = tool.run(tool_use.input, self.workspace.clone(), window, cx);
|
let task = tool.run(tool_use.input, self.workspace.clone(), window, cx);
|
||||||
|
|
||||||
self.thread.update(cx, |thread, cx| {
|
self.thread.update(cx, |thread, cx| {
|
||||||
thread.insert_tool_output(
|
thread.insert_tool_output(tool_use.id.clone(), task, cx);
|
||||||
tool_use.assistant_message_id,
|
});
|
||||||
tool_use.id.clone(),
|
}
|
||||||
task,
|
}
|
||||||
cx,
|
}
|
||||||
);
|
ThreadEvent::ToolFinished { .. } => {
|
||||||
|
let all_tools_finished = self
|
||||||
|
.thread
|
||||||
|
.read(cx)
|
||||||
|
.pending_tool_uses()
|
||||||
|
.into_iter()
|
||||||
|
.all(|tool_use| tool_use.status.is_error());
|
||||||
|
if all_tools_finished {
|
||||||
|
let model_registry = LanguageModelRegistry::read_global(cx);
|
||||||
|
if let Some(model) = model_registry.active_model() {
|
||||||
|
self.thread.update(cx, |thread, cx| {
|
||||||
|
// Insert an empty user message to contain the tool results.
|
||||||
|
thread.insert_user_message("", Vec::new(), cx);
|
||||||
|
thread.send_to_model(model, RequestKind::Chat, true, cx);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ThreadEvent::ToolFinished { .. } => {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,8 +291,17 @@ impl ActiveThread {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let context = self.thread.read(cx).context_for_message(message_id);
|
let context = self.thread.read(cx).context_for_message(message_id);
|
||||||
|
let tool_uses = self.thread.read(cx).tool_uses_for_message(message_id);
|
||||||
let colors = cx.theme().colors();
|
let colors = cx.theme().colors();
|
||||||
|
|
||||||
|
// Don't render user messages that are just there for returning tool results.
|
||||||
|
if message.role == Role::User
|
||||||
|
&& message.text.is_empty()
|
||||||
|
&& self.thread.read(cx).message_has_tool_results(message_id)
|
||||||
|
{
|
||||||
|
return Empty.into_any();
|
||||||
|
}
|
||||||
|
|
||||||
let message_content = v_flex()
|
let message_content = v_flex()
|
||||||
.child(div().p_2p5().text_ui(cx).child(markdown.clone()))
|
.child(div().p_2p5().text_ui(cx).child(markdown.clone()))
|
||||||
.when_some(context, |parent, context| {
|
.when_some(context, |parent, context| {
|
||||||
@@ -333,7 +356,22 @@ impl ActiveThread {
|
|||||||
)
|
)
|
||||||
.child(message_content),
|
.child(message_content),
|
||||||
),
|
),
|
||||||
Role::Assistant => div().id(("message-container", ix)).child(message_content),
|
Role::Assistant => div()
|
||||||
|
.id(("message-container", ix))
|
||||||
|
.child(message_content)
|
||||||
|
.map(|parent| {
|
||||||
|
if tool_uses.is_empty() {
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
parent.child(
|
||||||
|
v_flex().children(
|
||||||
|
tool_uses
|
||||||
|
.into_iter()
|
||||||
|
.map(|tool_use| self.render_tool_use(tool_use, cx)),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}),
|
||||||
Role::System => div().id(("message-container", ix)).py_1().px_2().child(
|
Role::System => div().id(("message-container", ix)).py_1().px_2().child(
|
||||||
v_flex()
|
v_flex()
|
||||||
.bg(colors.editor_background)
|
.bg(colors.editor_background)
|
||||||
@@ -344,6 +382,102 @@ impl ActiveThread {
|
|||||||
|
|
||||||
styled_message.into_any()
|
styled_message.into_any()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn render_tool_use(&self, tool_use: ToolUse, cx: &mut Context<Self>) -> impl IntoElement {
|
||||||
|
let is_open = self
|
||||||
|
.expanded_tool_uses
|
||||||
|
.get(&tool_use.id)
|
||||||
|
.copied()
|
||||||
|
.unwrap_or_default();
|
||||||
|
|
||||||
|
div().px_2p5().child(
|
||||||
|
v_flex()
|
||||||
|
.gap_1()
|
||||||
|
.rounded_lg()
|
||||||
|
.border_1()
|
||||||
|
.border_color(cx.theme().colors().border)
|
||||||
|
.child(
|
||||||
|
h_flex()
|
||||||
|
.justify_between()
|
||||||
|
.py_0p5()
|
||||||
|
.pl_1()
|
||||||
|
.pr_2()
|
||||||
|
.bg(cx.theme().colors().editor_foreground.opacity(0.02))
|
||||||
|
.when(is_open, |element| element.border_b_1().rounded_t(px(6.)))
|
||||||
|
.when(!is_open, |element| element.rounded(px(6.)))
|
||||||
|
.border_color(cx.theme().colors().border)
|
||||||
|
.child(
|
||||||
|
h_flex()
|
||||||
|
.gap_1()
|
||||||
|
.child(Disclosure::new("tool-use-disclosure", is_open).on_click(
|
||||||
|
cx.listener({
|
||||||
|
let tool_use_id = tool_use.id.clone();
|
||||||
|
move |this, _event, _window, _cx| {
|
||||||
|
let is_open = this
|
||||||
|
.expanded_tool_uses
|
||||||
|
.entry(tool_use_id.clone())
|
||||||
|
.or_insert(false);
|
||||||
|
|
||||||
|
*is_open = !*is_open;
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
))
|
||||||
|
.child(Label::new(tool_use.name)),
|
||||||
|
)
|
||||||
|
.child(
|
||||||
|
Label::new(match tool_use.status {
|
||||||
|
ToolUseStatus::Pending => "Pending",
|
||||||
|
ToolUseStatus::Running => "Running",
|
||||||
|
ToolUseStatus::Finished(_) => "Finished",
|
||||||
|
ToolUseStatus::Error(_) => "Error",
|
||||||
|
})
|
||||||
|
.size(LabelSize::XSmall)
|
||||||
|
.buffer_font(cx),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.map(|parent| {
|
||||||
|
if !is_open {
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
parent.child(
|
||||||
|
v_flex()
|
||||||
|
.child(
|
||||||
|
v_flex()
|
||||||
|
.gap_0p5()
|
||||||
|
.py_1()
|
||||||
|
.px_2p5()
|
||||||
|
.border_b_1()
|
||||||
|
.border_color(cx.theme().colors().border)
|
||||||
|
.child(Label::new("Input:"))
|
||||||
|
.child(Label::new(
|
||||||
|
serde_json::to_string_pretty(&tool_use.input)
|
||||||
|
.unwrap_or_default(),
|
||||||
|
)),
|
||||||
|
)
|
||||||
|
.map(|parent| match tool_use.status {
|
||||||
|
ToolUseStatus::Finished(output) => parent.child(
|
||||||
|
v_flex()
|
||||||
|
.gap_0p5()
|
||||||
|
.py_1()
|
||||||
|
.px_2p5()
|
||||||
|
.child(Label::new("Result:"))
|
||||||
|
.child(Label::new(output)),
|
||||||
|
),
|
||||||
|
ToolUseStatus::Error(err) => parent.child(
|
||||||
|
v_flex()
|
||||||
|
.gap_0p5()
|
||||||
|
.py_1()
|
||||||
|
.px_2p5()
|
||||||
|
.child(Label::new("Error:"))
|
||||||
|
.child(Label::new(err)),
|
||||||
|
),
|
||||||
|
ToolUseStatus::Pending | ToolUseStatus::Running => parent,
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Render for ActiveThread {
|
impl Render for ActiveThread {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ mod context;
|
|||||||
mod context_picker;
|
mod context_picker;
|
||||||
mod context_store;
|
mod context_store;
|
||||||
mod context_strip;
|
mod context_strip;
|
||||||
|
mod history_store;
|
||||||
mod inline_assistant;
|
mod inline_assistant;
|
||||||
mod inline_prompt_editor;
|
mod inline_prompt_editor;
|
||||||
mod message_editor;
|
mod message_editor;
|
||||||
@@ -15,6 +16,7 @@ mod terminal_inline_assistant;
|
|||||||
mod thread;
|
mod thread;
|
||||||
mod thread_history;
|
mod thread_history;
|
||||||
mod thread_store;
|
mod thread_store;
|
||||||
|
mod tool_use;
|
||||||
mod ui;
|
mod ui;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
@@ -37,10 +39,8 @@ actions!(
|
|||||||
NewThread,
|
NewThread,
|
||||||
NewPromptEditor,
|
NewPromptEditor,
|
||||||
ToggleContextPicker,
|
ToggleContextPicker,
|
||||||
ToggleModelSelector,
|
|
||||||
RemoveAllContext,
|
RemoveAllContext,
|
||||||
OpenHistory,
|
OpenHistory,
|
||||||
OpenPromptEditorHistory,
|
|
||||||
OpenConfiguration,
|
OpenConfiguration,
|
||||||
RemoveSelectedThread,
|
RemoveSelectedThread,
|
||||||
Chat,
|
Chat,
|
||||||
@@ -66,6 +66,7 @@ pub fn init(
|
|||||||
cx: &mut App,
|
cx: &mut App,
|
||||||
) {
|
) {
|
||||||
AssistantSettings::register(cx);
|
AssistantSettings::register(cx);
|
||||||
|
thread_store::init(cx);
|
||||||
assistant_panel::init(cx);
|
assistant_panel::init(cx);
|
||||||
|
|
||||||
inline_assistant::init(
|
inline_assistant::init(
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use collections::HashMap;
|
use collections::HashMap;
|
||||||
use gpui::{AnyView, App, EventEmitter, FocusHandle, Focusable, Subscription};
|
use gpui::{Action, AnyView, App, EventEmitter, FocusHandle, Focusable, Subscription};
|
||||||
use language_model::{LanguageModelProvider, LanguageModelProviderId, LanguageModelRegistry};
|
use language_model::{LanguageModelProvider, LanguageModelProviderId, LanguageModelRegistry};
|
||||||
use ui::{prelude::*, ElevationIndex};
|
use ui::{prelude::*, Divider, DividerColor, ElevationIndex};
|
||||||
use zed_actions::assistant::DeployPromptLibrary;
|
use zed_actions::assistant::DeployPromptLibrary;
|
||||||
|
|
||||||
pub struct AssistantConfiguration {
|
pub struct AssistantConfiguration {
|
||||||
@@ -91,38 +91,47 @@ impl AssistantConfiguration {
|
|||||||
.cloned();
|
.cloned();
|
||||||
|
|
||||||
v_flex()
|
v_flex()
|
||||||
.gap_2()
|
.gap_1p5()
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.justify_between()
|
.justify_between()
|
||||||
.child(Headline::new(provider_name.clone()).size(HeadlineSize::Small))
|
.child(
|
||||||
|
h_flex()
|
||||||
|
.gap_2()
|
||||||
|
.child(
|
||||||
|
Icon::new(provider.icon())
|
||||||
|
.size(IconSize::Small)
|
||||||
|
.color(Color::Muted),
|
||||||
|
)
|
||||||
|
.child(Label::new(provider_name.clone())),
|
||||||
|
)
|
||||||
.when(provider.is_authenticated(cx), |parent| {
|
.when(provider.is_authenticated(cx), |parent| {
|
||||||
parent.child(
|
parent.child(
|
||||||
h_flex().justify_end().child(
|
Button::new(
|
||||||
Button::new(
|
SharedString::from(format!("new-thread-{provider_id}")),
|
||||||
SharedString::from(format!("new-thread-{provider_id}")),
|
"Start New Thread",
|
||||||
"Open New Thread",
|
)
|
||||||
)
|
.icon_position(IconPosition::Start)
|
||||||
.icon_position(IconPosition::Start)
|
.icon(IconName::Plus)
|
||||||
.icon(IconName::Plus)
|
.icon_size(IconSize::Small)
|
||||||
.style(ButtonStyle::Filled)
|
.style(ButtonStyle::Filled)
|
||||||
.layer(ElevationIndex::ModalSurface)
|
.layer(ElevationIndex::ModalSurface)
|
||||||
.on_click(cx.listener({
|
.label_size(LabelSize::Small)
|
||||||
let provider = provider.clone();
|
.on_click(cx.listener({
|
||||||
move |_this, _event, _window, cx| {
|
let provider = provider.clone();
|
||||||
cx.emit(AssistantConfigurationEvent::NewThread(
|
move |_this, _event, _window, cx| {
|
||||||
provider.clone(),
|
cx.emit(AssistantConfigurationEvent::NewThread(
|
||||||
))
|
provider.clone(),
|
||||||
}
|
))
|
||||||
})),
|
}
|
||||||
),
|
})),
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
div()
|
div()
|
||||||
.p(DynamicSpacing::Base08.rems(cx))
|
.p(DynamicSpacing::Base08.rems(cx))
|
||||||
.bg(cx.theme().colors().surface_background)
|
.bg(cx.theme().colors().editor_background)
|
||||||
.border_1()
|
.border_1()
|
||||||
.border_color(cx.theme().colors().border_variant)
|
.border_color(cx.theme().colors().border_variant)
|
||||||
.rounded_md()
|
.rounded_md()
|
||||||
@@ -143,26 +152,51 @@ impl Render for AssistantConfiguration {
|
|||||||
v_flex()
|
v_flex()
|
||||||
.id("assistant-configuration")
|
.id("assistant-configuration")
|
||||||
.track_focus(&self.focus_handle(cx))
|
.track_focus(&self.focus_handle(cx))
|
||||||
.bg(cx.theme().colors().editor_background)
|
.bg(cx.theme().colors().panel_background)
|
||||||
.size_full()
|
.size_full()
|
||||||
.overflow_y_scroll()
|
.overflow_y_scroll()
|
||||||
.child(
|
.child(
|
||||||
h_flex().p(DynamicSpacing::Base16.rems(cx)).child(
|
v_flex()
|
||||||
Button::new("open-prompt-library", "Open Prompt Library")
|
.p(DynamicSpacing::Base16.rems(cx))
|
||||||
.style(ButtonStyle::Filled)
|
.gap_2()
|
||||||
.full_width()
|
.child(
|
||||||
.icon(IconName::Book)
|
v_flex()
|
||||||
.icon_size(IconSize::Small)
|
.gap_0p5()
|
||||||
.icon_position(IconPosition::Start)
|
.child(Headline::new("Prompt Library").size(HeadlineSize::Small))
|
||||||
.on_click(|_event, _window, cx| cx.dispatch_action(&DeployPromptLibrary)),
|
.child(
|
||||||
),
|
Label::new("Create reusable prompts and tag which ones you want sent in every LLM interaction.")
|
||||||
|
.color(Color::Muted),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.child(
|
||||||
|
Button::new("open-prompt-library", "Open Prompt Library")
|
||||||
|
.style(ButtonStyle::Filled)
|
||||||
|
.layer(ElevationIndex::ModalSurface)
|
||||||
|
.full_width()
|
||||||
|
.icon(IconName::Book)
|
||||||
|
.icon_size(IconSize::Small)
|
||||||
|
.icon_position(IconPosition::Start)
|
||||||
|
.on_click(|_event, window, cx| {
|
||||||
|
window.dispatch_action(DeployPromptLibrary.boxed_clone(), cx)
|
||||||
|
}),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
.child(Divider::horizontal().color(DividerColor::Border))
|
||||||
.child(
|
.child(
|
||||||
v_flex()
|
v_flex()
|
||||||
.p(DynamicSpacing::Base16.rems(cx))
|
.p(DynamicSpacing::Base16.rems(cx))
|
||||||
.mt_1()
|
.mt_1()
|
||||||
.gap_6()
|
.gap_6()
|
||||||
.flex_1()
|
.flex_1()
|
||||||
|
.child(
|
||||||
|
v_flex()
|
||||||
|
.gap_0p5()
|
||||||
|
.child(Headline::new("LLM Providers").size(HeadlineSize::Small))
|
||||||
|
.child(
|
||||||
|
Label::new("Add at least one provider to use AI-powered features.")
|
||||||
|
.color(Color::Muted),
|
||||||
|
),
|
||||||
|
)
|
||||||
.children(
|
.children(
|
||||||
providers
|
providers
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|||||||
@@ -1,24 +1,19 @@
|
|||||||
use assistant_settings::AssistantSettings;
|
use assistant_settings::AssistantSettings;
|
||||||
use fs::Fs;
|
use fs::Fs;
|
||||||
use gpui::{Entity, FocusHandle, SharedString};
|
use gpui::{Entity, FocusHandle};
|
||||||
use language_model::LanguageModelRegistry;
|
use language_model_selector::{AssistantLanguageModelSelector, LanguageModelSelector};
|
||||||
use language_model_selector::{LanguageModelSelector, LanguageModelSelectorPopoverMenu};
|
|
||||||
use settings::update_settings_file;
|
use settings::update_settings_file;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use ui::{prelude::*, ButtonLike, PopoverMenuHandle, Tooltip};
|
use ui::prelude::*;
|
||||||
|
|
||||||
use crate::ToggleModelSelector;
|
|
||||||
|
|
||||||
pub struct AssistantModelSelector {
|
pub struct AssistantModelSelector {
|
||||||
selector: Entity<LanguageModelSelector>,
|
pub selector: Entity<LanguageModelSelector>,
|
||||||
menu_handle: PopoverMenuHandle<LanguageModelSelector>,
|
|
||||||
focus_handle: FocusHandle,
|
focus_handle: FocusHandle,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AssistantModelSelector {
|
impl AssistantModelSelector {
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
fs: Arc<dyn Fs>,
|
fs: Arc<dyn Fs>,
|
||||||
menu_handle: PopoverMenuHandle<LanguageModelSelector>,
|
|
||||||
focus_handle: FocusHandle,
|
focus_handle: FocusHandle,
|
||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
cx: &mut App,
|
cx: &mut App,
|
||||||
@@ -38,53 +33,14 @@ impl AssistantModelSelector {
|
|||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
menu_handle,
|
|
||||||
focus_handle,
|
focus_handle,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Render for AssistantModelSelector {
|
impl Render for AssistantModelSelector {
|
||||||
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||||
let active_model = LanguageModelRegistry::read_global(cx).active_model();
|
AssistantLanguageModelSelector::new(self.focus_handle.clone(), self.selector.clone())
|
||||||
let focus_handle = self.focus_handle.clone();
|
.render(window, cx)
|
||||||
let model_name = match active_model {
|
|
||||||
Some(model) => model.name().0,
|
|
||||||
_ => SharedString::from("No model selected"),
|
|
||||||
};
|
|
||||||
|
|
||||||
LanguageModelSelectorPopoverMenu::new(
|
|
||||||
self.selector.clone(),
|
|
||||||
ButtonLike::new("active-model")
|
|
||||||
.style(ButtonStyle::Subtle)
|
|
||||||
.child(
|
|
||||||
h_flex()
|
|
||||||
.gap_0p5()
|
|
||||||
.child(
|
|
||||||
div().max_w_32().child(
|
|
||||||
Label::new(model_name)
|
|
||||||
.size(LabelSize::Small)
|
|
||||||
.color(Color::Muted)
|
|
||||||
.text_ellipsis()
|
|
||||||
.into_any_element(),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.child(
|
|
||||||
Icon::new(IconName::ChevronDown)
|
|
||||||
.color(Color::Muted)
|
|
||||||
.size(IconSize::XSmall),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.tooltip(move |window, cx| {
|
|
||||||
Tooltip::for_action_in(
|
|
||||||
"Change Model",
|
|
||||||
&ToggleModelSelector,
|
|
||||||
&focus_handle,
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
.with_handle(self.menu_handle.clone())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ use std::sync::Arc;
|
|||||||
|
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use assistant_context_editor::{
|
use assistant_context_editor::{
|
||||||
make_lsp_adapter_delegate, AssistantPanelDelegate, ConfigurationError, ContextEditor,
|
make_lsp_adapter_delegate, render_remaining_tokens, AssistantPanelDelegate, ConfigurationError,
|
||||||
ContextHistory, SlashCommandCompletionProvider,
|
ContextEditor, SlashCommandCompletionProvider,
|
||||||
};
|
};
|
||||||
use assistant_settings::{AssistantDockPosition, AssistantSettings};
|
use assistant_settings::{AssistantDockPosition, AssistantSettings};
|
||||||
use assistant_slash_command::SlashCommandWorkingSet;
|
use assistant_slash_command::SlashCommandWorkingSet;
|
||||||
@@ -14,7 +14,7 @@ use client::zed_urls;
|
|||||||
use editor::Editor;
|
use editor::Editor;
|
||||||
use fs::Fs;
|
use fs::Fs;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
prelude::*, px, svg, Action, AnyElement, App, AsyncWindowContext, Corner, Entity, EventEmitter,
|
prelude::*, Action, AnyElement, App, AsyncWindowContext, Corner, Entity, EventEmitter,
|
||||||
FocusHandle, Focusable, FontWeight, Pixels, Subscription, Task, UpdateGlobal, WeakEntity,
|
FocusHandle, Focusable, FontWeight, Pixels, Subscription, Task, UpdateGlobal, WeakEntity,
|
||||||
};
|
};
|
||||||
use language::LanguageRegistry;
|
use language::LanguageRegistry;
|
||||||
@@ -31,14 +31,12 @@ use zed_actions::assistant::{DeployPromptLibrary, ToggleFocus};
|
|||||||
|
|
||||||
use crate::active_thread::ActiveThread;
|
use crate::active_thread::ActiveThread;
|
||||||
use crate::assistant_configuration::{AssistantConfiguration, AssistantConfigurationEvent};
|
use crate::assistant_configuration::{AssistantConfiguration, AssistantConfigurationEvent};
|
||||||
|
use crate::history_store::{HistoryEntry, HistoryStore};
|
||||||
use crate::message_editor::MessageEditor;
|
use crate::message_editor::MessageEditor;
|
||||||
use crate::thread::{Thread, ThreadError, ThreadId};
|
use crate::thread::{Thread, ThreadError, ThreadId};
|
||||||
use crate::thread_history::{PastThread, ThreadHistory};
|
use crate::thread_history::{PastContext, PastThread, ThreadHistory};
|
||||||
use crate::thread_store::ThreadStore;
|
use crate::thread_store::ThreadStore;
|
||||||
use crate::{
|
use crate::{InlineAssistant, NewPromptEditor, NewThread, OpenConfiguration, OpenHistory};
|
||||||
InlineAssistant, NewPromptEditor, NewThread, OpenConfiguration, OpenHistory,
|
|
||||||
OpenPromptEditorHistory,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub fn init(cx: &mut App) {
|
pub fn init(cx: &mut App) {
|
||||||
cx.observe_new(
|
cx.observe_new(
|
||||||
@@ -62,12 +60,6 @@ pub fn init(cx: &mut App) {
|
|||||||
panel.update(cx, |panel, cx| panel.new_prompt_editor(window, cx));
|
panel.update(cx, |panel, cx| panel.new_prompt_editor(window, cx));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.register_action(|workspace, _: &OpenPromptEditorHistory, window, cx| {
|
|
||||||
if let Some(panel) = workspace.panel::<AssistantPanel>(cx) {
|
|
||||||
workspace.focus_panel::<AssistantPanel>(window, cx);
|
|
||||||
panel.update(cx, |panel, cx| panel.open_prompt_editor_history(window, cx));
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.register_action(|workspace, _: &OpenConfiguration, window, cx| {
|
.register_action(|workspace, _: &OpenConfiguration, window, cx| {
|
||||||
if let Some(panel) = workspace.panel::<AssistantPanel>(cx) {
|
if let Some(panel) = workspace.panel::<AssistantPanel>(cx) {
|
||||||
workspace.focus_panel::<AssistantPanel>(window, cx);
|
workspace.focus_panel::<AssistantPanel>(window, cx);
|
||||||
@@ -83,7 +75,6 @@ enum ActiveView {
|
|||||||
Thread,
|
Thread,
|
||||||
PromptEditor,
|
PromptEditor,
|
||||||
History,
|
History,
|
||||||
PromptEditorHistory,
|
|
||||||
Configuration,
|
Configuration,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,15 +88,14 @@ pub struct AssistantPanel {
|
|||||||
message_editor: Entity<MessageEditor>,
|
message_editor: Entity<MessageEditor>,
|
||||||
context_store: Entity<assistant_context_editor::ContextStore>,
|
context_store: Entity<assistant_context_editor::ContextStore>,
|
||||||
context_editor: Option<Entity<ContextEditor>>,
|
context_editor: Option<Entity<ContextEditor>>,
|
||||||
context_history: Option<Entity<ContextHistory>>,
|
|
||||||
configuration: Option<Entity<AssistantConfiguration>>,
|
configuration: Option<Entity<AssistantConfiguration>>,
|
||||||
configuration_subscription: Option<Subscription>,
|
configuration_subscription: Option<Subscription>,
|
||||||
tools: Arc<ToolWorkingSet>,
|
tools: Arc<ToolWorkingSet>,
|
||||||
local_timezone: UtcOffset,
|
local_timezone: UtcOffset,
|
||||||
active_view: ActiveView,
|
active_view: ActiveView,
|
||||||
|
history_store: Entity<HistoryStore>,
|
||||||
history: Entity<ThreadHistory>,
|
history: Entity<ThreadHistory>,
|
||||||
new_item_context_menu_handle: PopoverMenuHandle<ContextMenu>,
|
new_item_context_menu_handle: PopoverMenuHandle<ContextMenu>,
|
||||||
open_history_context_menu_handle: PopoverMenuHandle<ContextMenu>,
|
|
||||||
width: Option<Pixels>,
|
width: Option<Pixels>,
|
||||||
height: Option<Pixels>,
|
height: Option<Pixels>,
|
||||||
}
|
}
|
||||||
@@ -134,7 +124,6 @@ impl AssistantPanel {
|
|||||||
project,
|
project,
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
slash_commands,
|
slash_commands,
|
||||||
tools.clone(),
|
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
})?
|
})?
|
||||||
@@ -174,6 +163,9 @@ impl AssistantPanel {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let history_store =
|
||||||
|
cx.new(|cx| HistoryStore::new(thread_store.clone(), context_store.clone(), cx));
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
active_view: ActiveView::Thread,
|
active_view: ActiveView::Thread,
|
||||||
workspace: workspace.clone(),
|
workspace: workspace.clone(),
|
||||||
@@ -195,7 +187,6 @@ impl AssistantPanel {
|
|||||||
message_editor,
|
message_editor,
|
||||||
context_store,
|
context_store,
|
||||||
context_editor: None,
|
context_editor: None,
|
||||||
context_history: None,
|
|
||||||
configuration: None,
|
configuration: None,
|
||||||
configuration_subscription: None,
|
configuration_subscription: None,
|
||||||
tools,
|
tools,
|
||||||
@@ -203,9 +194,9 @@ impl AssistantPanel {
|
|||||||
chrono::Local::now().offset().local_minus_utc(),
|
chrono::Local::now().offset().local_minus_utc(),
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
history: cx.new(|cx| ThreadHistory::new(weak_self, thread_store, cx)),
|
history_store: history_store.clone(),
|
||||||
|
history: cx.new(|cx| ThreadHistory::new(weak_self, history_store, cx)),
|
||||||
new_item_context_menu_handle: PopoverMenuHandle::default(),
|
new_item_context_menu_handle: PopoverMenuHandle::default(),
|
||||||
open_history_context_menu_handle: PopoverMenuHandle::default(),
|
|
||||||
width: None,
|
width: None,
|
||||||
height: None,
|
height: None,
|
||||||
}
|
}
|
||||||
@@ -324,31 +315,15 @@ impl AssistantPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn open_history(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
fn open_history(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||||
|
self.thread_store
|
||||||
|
.update(cx, |thread_store, cx| thread_store.reload(cx))
|
||||||
|
.detach_and_log_err(cx);
|
||||||
self.active_view = ActiveView::History;
|
self.active_view = ActiveView::History;
|
||||||
self.history.focus_handle(cx).focus(window);
|
self.history.focus_handle(cx).focus(window);
|
||||||
cx.notify();
|
cx.notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn open_prompt_editor_history(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
pub(crate) fn open_saved_prompt_editor(
|
||||||
self.active_view = ActiveView::PromptEditorHistory;
|
|
||||||
self.context_history = Some(cx.new(|cx| {
|
|
||||||
ContextHistory::new(
|
|
||||||
self.project.clone(),
|
|
||||||
self.context_store.clone(),
|
|
||||||
self.workspace.clone(),
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
}));
|
|
||||||
|
|
||||||
if let Some(context_history) = self.context_history.as_ref() {
|
|
||||||
context_history.focus_handle(cx).focus(window);
|
|
||||||
}
|
|
||||||
|
|
||||||
cx.notify();
|
|
||||||
}
|
|
||||||
|
|
||||||
fn open_saved_prompt_editor(
|
|
||||||
&mut self,
|
&mut self,
|
||||||
path: PathBuf,
|
path: PathBuf,
|
||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
@@ -443,7 +418,7 @@ impl AssistantPanel {
|
|||||||
|
|
||||||
fn handle_assistant_configuration_event(
|
fn handle_assistant_configuration_event(
|
||||||
&mut self,
|
&mut self,
|
||||||
_model: &Entity<AssistantConfiguration>,
|
_entity: &Entity<AssistantConfiguration>,
|
||||||
event: &AssistantConfigurationEvent,
|
event: &AssistantConfigurationEvent,
|
||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
@@ -456,7 +431,7 @@ impl AssistantPanel {
|
|||||||
active_provider.id() != provider.id()
|
active_provider.id() != provider.id()
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
if let Some(model) = provider.provided_models(cx).first().cloned() {
|
if let Some(model) = provider.default_model(cx) {
|
||||||
update_settings_file::<AssistantSettings>(
|
update_settings_file::<AssistantSettings>(
|
||||||
self.fs.clone(),
|
self.fs.clone(),
|
||||||
cx,
|
cx,
|
||||||
@@ -479,6 +454,16 @@ impl AssistantPanel {
|
|||||||
.update(cx, |this, cx| this.delete_thread(thread_id, cx))
|
.update(cx, |this, cx| this.delete_thread(thread_id, cx))
|
||||||
.detach_and_log_err(cx);
|
.detach_and_log_err(cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) fn active_context_editor(&self) -> Option<Entity<ContextEditor>> {
|
||||||
|
self.context_editor.clone()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) fn delete_context(&mut self, path: PathBuf, cx: &mut Context<Self>) {
|
||||||
|
self.context_store
|
||||||
|
.update(cx, |this, cx| this.delete_local_context(path, cx))
|
||||||
|
.detach_and_log_err(cx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Focusable for AssistantPanel {
|
impl Focusable for AssistantPanel {
|
||||||
@@ -493,13 +478,6 @@ impl Focusable for AssistantPanel {
|
|||||||
cx.focus_handle()
|
cx.focus_handle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ActiveView::PromptEditorHistory => {
|
|
||||||
if let Some(context_history) = self.context_history.as_ref() {
|
|
||||||
context_history.focus_handle(cx)
|
|
||||||
} else {
|
|
||||||
cx.focus_handle()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ActiveView::Configuration => {
|
ActiveView::Configuration => {
|
||||||
if let Some(configuration) = self.configuration.as_ref() {
|
if let Some(configuration) = self.configuration.as_ref() {
|
||||||
configuration.focus_handle(cx)
|
configuration.focus_handle(cx)
|
||||||
@@ -612,21 +590,12 @@ impl AssistantPanel {
|
|||||||
SharedString::from(context_editor.read(cx).title(cx).to_string())
|
SharedString::from(context_editor.read(cx).title(cx).to_string())
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| SharedString::from("Loading Summary…")),
|
.unwrap_or_else(|| SharedString::from("Loading Summary…")),
|
||||||
ActiveView::History | ActiveView::PromptEditorHistory => "History".into(),
|
ActiveView::History => "History".into(),
|
||||||
ActiveView::Configuration => "Configuration".into(),
|
ActiveView::Configuration => "Assistant Settings".into(),
|
||||||
};
|
|
||||||
|
|
||||||
let sub_title = match self.active_view {
|
|
||||||
ActiveView::Thread => None,
|
|
||||||
ActiveView::PromptEditor => None,
|
|
||||||
ActiveView::History => Some("Thread"),
|
|
||||||
ActiveView::PromptEditorHistory => Some("Prompt Editor"),
|
|
||||||
ActiveView::Configuration => None,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
h_flex()
|
h_flex()
|
||||||
.id("assistant-toolbar")
|
.id("assistant-toolbar")
|
||||||
.px(DynamicSpacing::Base08.rems(cx))
|
|
||||||
.h(Tab::container_height(cx))
|
.h(Tab::container_height(cx))
|
||||||
.flex_none()
|
.flex_none()
|
||||||
.justify_between()
|
.justify_between()
|
||||||
@@ -635,75 +604,85 @@ impl AssistantPanel {
|
|||||||
.border_b_1()
|
.border_b_1()
|
||||||
.border_color(cx.theme().colors().border)
|
.border_color(cx.theme().colors().border)
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
div()
|
||||||
.child(Label::new(title))
|
.id("title")
|
||||||
.when(sub_title.is_some(), |this| {
|
.overflow_x_scroll()
|
||||||
this.child(
|
.px(DynamicSpacing::Base08.rems(cx))
|
||||||
h_flex()
|
.child(Label::new(title).text_ellipsis()),
|
||||||
.pl_1p5()
|
|
||||||
.gap_1p5()
|
|
||||||
.child(
|
|
||||||
Label::new("/")
|
|
||||||
.size(LabelSize::Small)
|
|
||||||
.color(Color::Disabled)
|
|
||||||
.alpha(0.5),
|
|
||||||
)
|
|
||||||
.child(Label::new(sub_title.unwrap())),
|
|
||||||
)
|
|
||||||
}),
|
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.h_full()
|
.h_full()
|
||||||
.pl_1p5()
|
.pl_2()
|
||||||
.border_l_1()
|
.gap_2()
|
||||||
.border_color(cx.theme().colors().border)
|
.bg(cx.theme().colors().tab_bar_background)
|
||||||
.gap(DynamicSpacing::Base02.rems(cx))
|
.children(if matches!(self.active_view, ActiveView::PromptEditor) {
|
||||||
|
self.context_editor
|
||||||
|
.as_ref()
|
||||||
|
.and_then(|editor| render_remaining_tokens(editor, cx))
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
})
|
||||||
.child(
|
.child(
|
||||||
PopoverMenu::new("assistant-toolbar-new-popover-menu")
|
h_flex()
|
||||||
.trigger(
|
.h_full()
|
||||||
IconButton::new("new", IconName::Plus)
|
.px(DynamicSpacing::Base08.rems(cx))
|
||||||
.icon_size(IconSize::Small)
|
.border_l_1()
|
||||||
.style(ButtonStyle::Subtle)
|
.border_color(cx.theme().colors().border)
|
||||||
.tooltip(Tooltip::text("New…")),
|
.gap(DynamicSpacing::Base02.rems(cx))
|
||||||
|
.child(
|
||||||
|
PopoverMenu::new("assistant-toolbar-new-popover-menu")
|
||||||
|
.trigger_with_tooltip(
|
||||||
|
IconButton::new("new", IconName::Plus)
|
||||||
|
.icon_size(IconSize::Small)
|
||||||
|
.style(ButtonStyle::Subtle),
|
||||||
|
Tooltip::text("New…"),
|
||||||
|
)
|
||||||
|
.anchor(Corner::TopRight)
|
||||||
|
.with_handle(self.new_item_context_menu_handle.clone())
|
||||||
|
.menu(move |window, cx| {
|
||||||
|
Some(ContextMenu::build(
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
|menu, _window, _cx| {
|
||||||
|
menu.action("New Thread", NewThread.boxed_clone())
|
||||||
|
.action(
|
||||||
|
"New Prompt Editor",
|
||||||
|
NewPromptEditor.boxed_clone(),
|
||||||
|
)
|
||||||
|
},
|
||||||
|
))
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
.anchor(Corner::TopRight)
|
.child(
|
||||||
.with_handle(self.new_item_context_menu_handle.clone())
|
|
||||||
.menu(move |window, cx| {
|
|
||||||
Some(ContextMenu::build(window, cx, |menu, _window, _cx| {
|
|
||||||
menu.action("New Thread", NewThread.boxed_clone())
|
|
||||||
.action("New Prompt Editor", NewPromptEditor.boxed_clone())
|
|
||||||
}))
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
.child(
|
|
||||||
PopoverMenu::new("assistant-toolbar-history-popover-menu")
|
|
||||||
.trigger(
|
|
||||||
IconButton::new("open-history", IconName::HistoryRerun)
|
IconButton::new("open-history", IconName::HistoryRerun)
|
||||||
.icon_size(IconSize::Small)
|
.icon_size(IconSize::Small)
|
||||||
.style(ButtonStyle::Subtle)
|
.style(ButtonStyle::Subtle)
|
||||||
.tooltip(Tooltip::text("History…")),
|
.tooltip({
|
||||||
|
let focus_handle = self.focus_handle(cx);
|
||||||
|
move |window, cx| {
|
||||||
|
Tooltip::for_action_in(
|
||||||
|
"History",
|
||||||
|
&OpenHistory,
|
||||||
|
&focus_handle,
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.on_click(move |_event, window, cx| {
|
||||||
|
window.dispatch_action(OpenHistory.boxed_clone(), cx);
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
.anchor(Corner::TopRight)
|
.child(
|
||||||
.with_handle(self.open_history_context_menu_handle.clone())
|
IconButton::new("configure-assistant", IconName::Settings)
|
||||||
.menu(move |window, cx| {
|
.icon_size(IconSize::Small)
|
||||||
Some(ContextMenu::build(window, cx, |menu, _window, _cx| {
|
.style(ButtonStyle::Subtle)
|
||||||
menu.action("Thread History", OpenHistory.boxed_clone())
|
.tooltip(Tooltip::text("Assistant Settings"))
|
||||||
.action(
|
.on_click(move |_event, window, cx| {
|
||||||
"Prompt Editor History",
|
window.dispatch_action(OpenConfiguration.boxed_clone(), cx);
|
||||||
OpenPromptEditorHistory.boxed_clone(),
|
}),
|
||||||
)
|
),
|
||||||
}))
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
.child(
|
|
||||||
IconButton::new("configure-assistant", IconName::Settings)
|
|
||||||
.icon_size(IconSize::Small)
|
|
||||||
.style(ButtonStyle::Subtle)
|
|
||||||
.tooltip(Tooltip::text("Configure Assistant"))
|
|
||||||
.on_click(move |_event, window, cx| {
|
|
||||||
window.dispatch_action(OpenConfiguration.boxed_clone(), cx);
|
|
||||||
}),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -743,14 +722,13 @@ impl AssistantPanel {
|
|||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) -> impl IntoElement {
|
) -> impl IntoElement {
|
||||||
let recent_threads = self
|
let recent_history = self
|
||||||
.thread_store
|
.history_store
|
||||||
.update(cx, |this, _cx| this.recent_threads(3));
|
.update(cx, |this, cx| this.recent_entries(6, cx));
|
||||||
|
|
||||||
let create_welcome_heading = || {
|
let create_welcome_heading = || {
|
||||||
h_flex()
|
h_flex()
|
||||||
.w_full()
|
.w_full()
|
||||||
.justify_center()
|
|
||||||
.child(Headline::new("Welcome to the Assistant Panel").size(HeadlineSize::Small))
|
.child(Headline::new("Welcome to the Assistant Panel").size(HeadlineSize::Small))
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -758,35 +736,27 @@ impl AssistantPanel {
|
|||||||
let no_error = configuration_error.is_none();
|
let no_error = configuration_error.is_none();
|
||||||
|
|
||||||
v_flex()
|
v_flex()
|
||||||
.gap_2()
|
.p_1p5()
|
||||||
.child(
|
.size_full()
|
||||||
v_flex().w_full().child(
|
.justify_end()
|
||||||
svg()
|
.gap_1()
|
||||||
.path("icons/logo_96.svg")
|
|
||||||
.text_color(cx.theme().colors().text)
|
|
||||||
.w(px(40.))
|
|
||||||
.h(px(40.))
|
|
||||||
.mx_auto()
|
|
||||||
.mb_4(),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.map(|parent| {
|
.map(|parent| {
|
||||||
match configuration_error {
|
match configuration_error {
|
||||||
Some(ConfigurationError::ProviderNotAuthenticated) | Some(ConfigurationError::NoProvider) => {
|
Some(ConfigurationError::ProviderNotAuthenticated)
|
||||||
|
| Some(ConfigurationError::NoProvider) => {
|
||||||
parent.child(
|
parent.child(
|
||||||
v_flex()
|
v_flex()
|
||||||
|
.px_1p5()
|
||||||
.gap_0p5()
|
.gap_0p5()
|
||||||
.child(create_welcome_heading())
|
.child(create_welcome_heading())
|
||||||
.child(
|
.child(
|
||||||
h_flex().mb_2().w_full().justify_center().child(
|
Label::new(
|
||||||
Label::new(
|
"To start using the assistant, configure at least one LLM provider.",
|
||||||
"To start using the assistant, configure at least one LLM provider.",
|
)
|
||||||
)
|
.color(Color::Muted),
|
||||||
.color(Color::Muted),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
h_flex().w_full().justify_center().child(
|
h_flex().mt_1().w_full().child(
|
||||||
Button::new("open-configuration", "Configure a Provider")
|
Button::new("open-configuration", "Configure a Provider")
|
||||||
.size(ButtonSize::Compact)
|
.size(ButtonSize::Compact)
|
||||||
.icon(Some(IconName::Sliders))
|
.icon(Some(IconName::Sliders))
|
||||||
@@ -799,63 +769,66 @@ impl AssistantPanel {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Some(ConfigurationError::ProviderPendingTermsAcceptance(provider)) => {
|
Some(ConfigurationError::ProviderPendingTermsAcceptance(provider)) => parent
|
||||||
parent.child(
|
.child(v_flex().px_1p5().gap_0p5().child(create_welcome_heading()).children(
|
||||||
v_flex()
|
provider.render_accept_terms(
|
||||||
.gap_0p5()
|
LanguageModelProviderTosView::ThreadEmptyState,
|
||||||
.child(create_welcome_heading())
|
cx,
|
||||||
.children(provider.render_accept_terms(
|
),
|
||||||
LanguageModelProviderTosView::ThreadEmptyState,
|
)),
|
||||||
cx,
|
|
||||||
)),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
None => parent,
|
None => parent,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.when(
|
.when(recent_history.is_empty() && no_error, |parent| {
|
||||||
recent_threads.is_empty() && no_error,
|
parent.child(v_flex().gap_0p5().child(create_welcome_heading()).child(
|
||||||
|parent| {
|
Label::new("Start typing to chat with your codebase").color(Color::Muted),
|
||||||
parent.child(
|
))
|
||||||
v_flex().gap_0p5().child(create_welcome_heading()).child(
|
})
|
||||||
h_flex().w_full().justify_center().child(
|
.when(!recent_history.is_empty(), |parent| {
|
||||||
Label::new("Start typing to chat with your codebase")
|
|
||||||
.color(Color::Muted),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.when(!recent_threads.is_empty(), |parent| {
|
|
||||||
parent
|
parent
|
||||||
.child(
|
.child(
|
||||||
h_flex().w_full().justify_center().child(
|
h_flex()
|
||||||
Label::new("Recent Threads:")
|
.pl_1p5()
|
||||||
.size(LabelSize::Small)
|
.pb_1()
|
||||||
.color(Color::Muted),
|
.w_full()
|
||||||
),
|
.justify_between()
|
||||||
|
.border_b_1()
|
||||||
|
.border_color(cx.theme().colors().border_variant)
|
||||||
|
.child(
|
||||||
|
Label::new("Past Interactions")
|
||||||
|
.size(LabelSize::Small)
|
||||||
|
.color(Color::Muted),
|
||||||
|
)
|
||||||
|
.child(
|
||||||
|
Button::new("view-history", "View All")
|
||||||
|
.style(ButtonStyle::Subtle)
|
||||||
|
.label_size(LabelSize::Small)
|
||||||
|
.key_binding(KeyBinding::for_action_in(
|
||||||
|
&OpenHistory,
|
||||||
|
&self.focus_handle(cx),
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
))
|
||||||
|
.on_click(move |_event, window, cx| {
|
||||||
|
window.dispatch_action(OpenHistory.boxed_clone(), cx);
|
||||||
|
}),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.child(v_flex().mx_auto().w_4_5().gap_2().children(
|
.child(v_flex().gap_1().children(
|
||||||
recent_threads.into_iter().map(|thread| {
|
recent_history.into_iter().map(|entry| {
|
||||||
// TODO: keyboard navigation
|
// TODO: Add keyboard navigation.
|
||||||
PastThread::new(thread, cx.entity().downgrade(), false)
|
match entry {
|
||||||
|
HistoryEntry::Thread(thread) => {
|
||||||
|
PastThread::new(thread, cx.entity().downgrade(), false)
|
||||||
|
.into_any_element()
|
||||||
|
}
|
||||||
|
HistoryEntry::Context(context) => {
|
||||||
|
PastContext::new(context, cx.entity().downgrade(), false)
|
||||||
|
.into_any_element()
|
||||||
|
}
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
))
|
))
|
||||||
.child(
|
|
||||||
h_flex().w_full().justify_center().child(
|
|
||||||
Button::new("view-all-past-threads", "View All Past Threads")
|
|
||||||
.style(ButtonStyle::Subtle)
|
|
||||||
.label_size(LabelSize::Small)
|
|
||||||
.key_binding(KeyBinding::for_action_in(
|
|
||||||
&OpenHistory,
|
|
||||||
&self.focus_handle(cx),
|
|
||||||
window,
|
|
||||||
))
|
|
||||||
.on_click(move |_event, window, cx| {
|
|
||||||
window.dispatch_action(OpenHistory.boxed_clone(), cx);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1048,7 +1021,6 @@ impl Render for AssistantPanel {
|
|||||||
.children(self.render_last_error(cx)),
|
.children(self.render_last_error(cx)),
|
||||||
ActiveView::History => parent.child(self.history.clone()),
|
ActiveView::History => parent.child(self.history.clone()),
|
||||||
ActiveView::PromptEditor => parent.children(self.context_editor.clone()),
|
ActiveView::PromptEditor => parent.children(self.context_editor.clone()),
|
||||||
ActiveView::PromptEditorHistory => parent.children(self.context_history.clone()),
|
|
||||||
ActiveView::Configuration => parent.children(self.configuration.clone()),
|
ActiveView::Configuration => parent.children(self.configuration.clone()),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,11 @@ use collections::HashSet;
|
|||||||
use editor::{Anchor, AnchorRangeExt, MultiBuffer, MultiBufferSnapshot, ToOffset as _, ToPoint};
|
use editor::{Anchor, AnchorRangeExt, MultiBuffer, MultiBufferSnapshot, ToOffset as _, ToPoint};
|
||||||
use futures::{channel::mpsc, future::LocalBoxFuture, join, SinkExt, Stream, StreamExt};
|
use futures::{channel::mpsc, future::LocalBoxFuture, join, SinkExt, Stream, StreamExt};
|
||||||
use gpui::{App, AppContext as _, Context, Entity, EventEmitter, Subscription, Task};
|
use gpui::{App, AppContext as _, Context, Entity, EventEmitter, Subscription, Task};
|
||||||
use language::{Buffer, IndentKind, Point, TransactionId};
|
use language::{line_diff, Buffer, IndentKind, Point, TransactionId};
|
||||||
use language_model::{
|
use language_model::{
|
||||||
LanguageModel, LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage,
|
report_assistant_event, LanguageModel, LanguageModelRegistry, LanguageModelRequest,
|
||||||
LanguageModelTextStream, Role,
|
LanguageModelRequestMessage, LanguageModelTextStream, Role,
|
||||||
};
|
};
|
||||||
use language_models::report_assistant_event;
|
|
||||||
use multi_buffer::MultiBufferRow;
|
use multi_buffer::MultiBufferRow;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_library::PromptBuilder;
|
||||||
@@ -493,7 +492,7 @@ impl CodegenAlternative {
|
|||||||
let executor = cx.background_executor().clone();
|
let executor = cx.background_executor().clone();
|
||||||
let message_id = message_id.clone();
|
let message_id = message_id.clone();
|
||||||
let line_based_stream_diff: Task<anyhow::Result<()>> =
|
let line_based_stream_diff: Task<anyhow::Result<()>> =
|
||||||
cx.background_executor().spawn(async move {
|
cx.background_spawn(async move {
|
||||||
let mut response_latency = None;
|
let mut response_latency = None;
|
||||||
let request_start = Instant::now();
|
let request_start = Instant::now();
|
||||||
let diff = async {
|
let diff = async {
|
||||||
@@ -807,8 +806,7 @@ impl CodegenAlternative {
|
|||||||
|
|
||||||
cx.spawn(|codegen, mut cx| async move {
|
cx.spawn(|codegen, mut cx| async move {
|
||||||
let (deleted_row_ranges, inserted_row_ranges) = cx
|
let (deleted_row_ranges, inserted_row_ranges) = cx
|
||||||
.background_executor()
|
.background_spawn(async move {
|
||||||
.spawn(async move {
|
|
||||||
let old_text = old_snapshot
|
let old_text = old_snapshot
|
||||||
.text_for_range(
|
.text_for_range(
|
||||||
Point::new(old_range.start.row, 0)
|
Point::new(old_range.start.row, 0)
|
||||||
@@ -828,52 +826,29 @@ impl CodegenAlternative {
|
|||||||
)
|
)
|
||||||
.collect::<String>();
|
.collect::<String>();
|
||||||
|
|
||||||
let mut old_row = old_range.start.row;
|
let old_start_row = old_range.start.row;
|
||||||
let mut new_row = new_range.start.row;
|
let new_start_row = new_range.start.row;
|
||||||
let batch_diff =
|
|
||||||
similar::TextDiff::from_lines(old_text.as_str(), new_text.as_str());
|
|
||||||
|
|
||||||
let mut deleted_row_ranges: Vec<(Anchor, RangeInclusive<u32>)> = Vec::new();
|
let mut deleted_row_ranges: Vec<(Anchor, RangeInclusive<u32>)> = Vec::new();
|
||||||
let mut inserted_row_ranges = Vec::new();
|
let mut inserted_row_ranges = Vec::new();
|
||||||
for change in batch_diff.iter_all_changes() {
|
for (old_rows, new_rows) in line_diff(&old_text, &new_text) {
|
||||||
let line_count = change.value().lines().count() as u32;
|
let old_rows = old_start_row + old_rows.start..old_start_row + old_rows.end;
|
||||||
match change.tag() {
|
let new_rows = new_start_row + new_rows.start..new_start_row + new_rows.end;
|
||||||
similar::ChangeTag::Equal => {
|
if !old_rows.is_empty() {
|
||||||
old_row += line_count;
|
deleted_row_ranges.push((
|
||||||
new_row += line_count;
|
new_snapshot.anchor_before(Point::new(new_rows.start, 0)),
|
||||||
}
|
old_rows.start..=old_rows.end - 1,
|
||||||
similar::ChangeTag::Delete => {
|
));
|
||||||
let old_end_row = old_row + line_count - 1;
|
}
|
||||||
let new_row = new_snapshot.anchor_before(Point::new(new_row, 0));
|
if !new_rows.is_empty() {
|
||||||
|
let start = new_snapshot.anchor_before(Point::new(new_rows.start, 0));
|
||||||
if let Some((_, last_deleted_row_range)) =
|
let new_end_row = new_rows.end - 1;
|
||||||
deleted_row_ranges.last_mut()
|
let end = new_snapshot.anchor_before(Point::new(
|
||||||
{
|
new_end_row,
|
||||||
if *last_deleted_row_range.end() + 1 == old_row {
|
new_snapshot.line_len(MultiBufferRow(new_end_row)),
|
||||||
*last_deleted_row_range =
|
));
|
||||||
*last_deleted_row_range.start()..=old_end_row;
|
inserted_row_ranges.push(start..end);
|
||||||
} else {
|
|
||||||
deleted_row_ranges.push((new_row, old_row..=old_end_row));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
deleted_row_ranges.push((new_row, old_row..=old_end_row));
|
|
||||||
}
|
|
||||||
|
|
||||||
old_row += line_count;
|
|
||||||
}
|
|
||||||
similar::ChangeTag::Insert => {
|
|
||||||
let new_end_row = new_row + line_count - 1;
|
|
||||||
let start = new_snapshot.anchor_before(Point::new(new_row, 0));
|
|
||||||
let end = new_snapshot.anchor_before(Point::new(
|
|
||||||
new_end_row,
|
|
||||||
new_snapshot.line_len(MultiBufferRow(new_end_row)),
|
|
||||||
));
|
|
||||||
inserted_row_ranges.push(start..end);
|
|
||||||
new_row += line_count;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(deleted_row_ranges, inserted_row_ranges)
|
(deleted_row_ranges, inserted_row_ranges)
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|||||||
@@ -208,8 +208,7 @@ impl PickerDelegate for FetchContextPickerDelegate {
|
|||||||
let confirm_behavior = self.confirm_behavior;
|
let confirm_behavior = self.confirm_behavior;
|
||||||
cx.spawn_in(window, |this, mut cx| async move {
|
cx.spawn_in(window, |this, mut cx| async move {
|
||||||
let text = cx
|
let text = cx
|
||||||
.background_executor()
|
.background_spawn(Self::build_message(http_client, url.clone()))
|
||||||
.spawn(Self::build_message(http_client, url.clone()))
|
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
this.update_in(&mut cx, |this, window, cx| {
|
this.update_in(&mut cx, |this, window, cx| {
|
||||||
|
|||||||
@@ -7,19 +7,19 @@ use std::sync::Arc;
|
|||||||
use editor::actions::FoldAt;
|
use editor::actions::FoldAt;
|
||||||
use editor::display_map::{Crease, FoldId};
|
use editor::display_map::{Crease, FoldId};
|
||||||
use editor::scroll::Autoscroll;
|
use editor::scroll::Autoscroll;
|
||||||
use editor::{Anchor, Editor, FoldPlaceholder, ToPoint};
|
use editor::{Anchor, AnchorRangeExt, Editor, FoldPlaceholder, ToPoint};
|
||||||
use file_icons::FileIcons;
|
use file_icons::FileIcons;
|
||||||
use fuzzy::PathMatch;
|
use fuzzy::PathMatch;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
AnyElement, App, DismissEvent, Empty, Entity, FocusHandle, Focusable, Stateful, Task,
|
AnyElement, App, AppContext, DismissEvent, Empty, Entity, FocusHandle, Focusable, Stateful,
|
||||||
WeakEntity,
|
Task, WeakEntity,
|
||||||
};
|
};
|
||||||
use multi_buffer::{MultiBufferPoint, MultiBufferRow};
|
use multi_buffer::{MultiBufferPoint, MultiBufferRow};
|
||||||
use picker::{Picker, PickerDelegate};
|
use picker::{Picker, PickerDelegate};
|
||||||
use project::{PathMatchCandidateSet, ProjectPath, WorktreeId};
|
use project::{PathMatchCandidateSet, ProjectPath, WorktreeId};
|
||||||
use rope::Point;
|
use rope::Point;
|
||||||
use text::SelectionGoal;
|
use text::SelectionGoal;
|
||||||
use ui::{prelude::*, ButtonLike, Disclosure, ElevationIndex, ListItem, Tooltip};
|
use ui::{prelude::*, ButtonLike, Disclosure, ListItem, TintColor, Tooltip};
|
||||||
use util::ResultExt as _;
|
use util::ResultExt as _;
|
||||||
use workspace::{notifications::NotifyResultExt, Workspace};
|
use workspace::{notifications::NotifyResultExt, Workspace};
|
||||||
|
|
||||||
@@ -238,11 +238,11 @@ impl PickerDelegate for FileContextPickerDelegate {
|
|||||||
path: mat.path.clone(),
|
path: mat.path.clone(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let Some(editor) = self.editor.upgrade() else {
|
let Some(editor_entity) = self.editor.upgrade() else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
editor.update(cx, |editor, cx| {
|
editor_entity.update(cx, |editor, cx| {
|
||||||
editor.transact(window, cx, |editor, window, cx| {
|
editor.transact(window, cx, |editor, window, cx| {
|
||||||
// Move empty selections left by 1 column to select the `@`s, so they get overwritten when we insert.
|
// Move empty selections left by 1 column to select the `@`s, so they get overwritten when we insert.
|
||||||
{
|
{
|
||||||
@@ -288,8 +288,15 @@ impl PickerDelegate for FileContextPickerDelegate {
|
|||||||
|
|
||||||
editor.insert("\n", window, cx); // Needed to end the fold
|
editor.insert("\n", window, cx); // Needed to end the fold
|
||||||
|
|
||||||
|
let file_icon = FileIcons::get_icon(&Path::new(&full_path), cx)
|
||||||
|
.unwrap_or_else(|| SharedString::new(""));
|
||||||
|
|
||||||
let placeholder = FoldPlaceholder {
|
let placeholder = FoldPlaceholder {
|
||||||
render: render_fold_icon_button(IconName::File, file_name.into()),
|
render: render_fold_icon_button(
|
||||||
|
file_icon,
|
||||||
|
file_name.into(),
|
||||||
|
editor_entity.downgrade(),
|
||||||
|
),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -459,15 +466,66 @@ pub fn render_file_context_entry(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn render_fold_icon_button(
|
fn render_fold_icon_button(
|
||||||
icon: IconName,
|
icon: SharedString,
|
||||||
label: SharedString,
|
label: SharedString,
|
||||||
) -> Arc<dyn Send + Sync + Fn(FoldId, Range<Anchor>, &mut Window, &mut App) -> AnyElement> {
|
editor: WeakEntity<Editor>,
|
||||||
Arc::new(move |fold_id, _fold_range, _window, _cx| {
|
) -> Arc<dyn Send + Sync + Fn(FoldId, Range<Anchor>, &mut App) -> AnyElement> {
|
||||||
|
Arc::new(move |fold_id, fold_range, cx| {
|
||||||
|
let is_in_text_selection = editor.upgrade().is_some_and(|editor| {
|
||||||
|
editor.update(cx, |editor, cx| {
|
||||||
|
let snapshot = editor
|
||||||
|
.buffer()
|
||||||
|
.update(cx, |multi_buffer, cx| multi_buffer.snapshot(cx));
|
||||||
|
|
||||||
|
let is_in_pending_selection = || {
|
||||||
|
editor
|
||||||
|
.selections
|
||||||
|
.pending
|
||||||
|
.as_ref()
|
||||||
|
.is_some_and(|pending_selection| {
|
||||||
|
pending_selection
|
||||||
|
.selection
|
||||||
|
.range()
|
||||||
|
.includes(&fold_range, &snapshot)
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
let mut is_in_complete_selection = || {
|
||||||
|
editor
|
||||||
|
.selections
|
||||||
|
.disjoint_in_range::<usize>(fold_range.clone(), cx)
|
||||||
|
.into_iter()
|
||||||
|
.any(|selection| {
|
||||||
|
// This is needed to cover a corner case, if we just check for an existing
|
||||||
|
// selection in the fold range, having a cursor at the start of the fold
|
||||||
|
// marks it as selected. Non-empty selections don't cause this.
|
||||||
|
let length = selection.end - selection.start;
|
||||||
|
length > 0
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
is_in_pending_selection() || is_in_complete_selection()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
ButtonLike::new(fold_id)
|
ButtonLike::new(fold_id)
|
||||||
.style(ButtonStyle::Filled)
|
.style(ButtonStyle::Filled)
|
||||||
.layer(ElevationIndex::ElevatedSurface)
|
.selected_style(ButtonStyle::Tinted(TintColor::Accent))
|
||||||
.child(Icon::new(icon))
|
.toggle_state(is_in_text_selection)
|
||||||
.child(Label::new(label.clone()).single_line())
|
.child(
|
||||||
|
h_flex()
|
||||||
|
.gap_1()
|
||||||
|
.child(
|
||||||
|
Icon::from_path(icon.clone())
|
||||||
|
.size(IconSize::Small)
|
||||||
|
.color(Color::Muted),
|
||||||
|
)
|
||||||
|
.child(
|
||||||
|
Label::new(label.clone())
|
||||||
|
.size(LabelSize::Small)
|
||||||
|
.single_line(),
|
||||||
|
),
|
||||||
|
)
|
||||||
.into_any_element()
|
.into_any_element()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ impl PickerDelegate for ThreadContextPickerDelegate {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let executor = cx.background_executor().clone();
|
let executor = cx.background_executor().clone();
|
||||||
let search_task = cx.background_executor().spawn(async move {
|
let search_task = cx.background_spawn(async move {
|
||||||
if query.is_empty() {
|
if query.is_empty() {
|
||||||
threads
|
threads
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use std::sync::Arc;
|
|||||||
use anyhow::{anyhow, bail, Result};
|
use anyhow::{anyhow, bail, Result};
|
||||||
use collections::{BTreeMap, HashMap, HashSet};
|
use collections::{BTreeMap, HashMap, HashSet};
|
||||||
use futures::{self, future, Future, FutureExt};
|
use futures::{self, future, Future, FutureExt};
|
||||||
use gpui::{App, AsyncApp, Context, Entity, SharedString, Task, WeakEntity};
|
use gpui::{App, AppContext as _, AsyncApp, Context, Entity, SharedString, Task, WeakEntity};
|
||||||
use language::Buffer;
|
use language::Buffer;
|
||||||
use project::{ProjectPath, Worktree};
|
use project::{ProjectPath, Worktree};
|
||||||
use rope::Rope;
|
use rope::Rope;
|
||||||
@@ -79,8 +79,8 @@ impl ContextStore {
|
|||||||
project.open_buffer(project_path.clone(), cx)
|
project.open_buffer(project_path.clone(), cx)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let buffer_model = open_buffer_task.await?;
|
let buffer_entity = open_buffer_task.await?;
|
||||||
let buffer_id = this.update(&mut cx, |_, cx| buffer_model.read(cx).remote_id())?;
|
let buffer_id = this.update(&mut cx, |_, cx| buffer_entity.read(cx).remote_id())?;
|
||||||
|
|
||||||
let already_included = this.update(&mut cx, |this, _cx| {
|
let already_included = this.update(&mut cx, |this, _cx| {
|
||||||
match this.will_include_buffer(buffer_id, &project_path.path) {
|
match this.will_include_buffer(buffer_id, &project_path.path) {
|
||||||
@@ -98,10 +98,10 @@ impl ContextStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let (buffer_info, text_task) = this.update(&mut cx, |_, cx| {
|
let (buffer_info, text_task) = this.update(&mut cx, |_, cx| {
|
||||||
let buffer = buffer_model.read(cx);
|
let buffer = buffer_entity.read(cx);
|
||||||
collect_buffer_info_and_text(
|
collect_buffer_info_and_text(
|
||||||
project_path.path.clone(),
|
project_path.path.clone(),
|
||||||
buffer_model,
|
buffer_entity,
|
||||||
buffer,
|
buffer,
|
||||||
cx.to_async(),
|
cx.to_async(),
|
||||||
)
|
)
|
||||||
@@ -119,18 +119,18 @@ impl ContextStore {
|
|||||||
|
|
||||||
pub fn add_file_from_buffer(
|
pub fn add_file_from_buffer(
|
||||||
&mut self,
|
&mut self,
|
||||||
buffer_model: Entity<Buffer>,
|
buffer_entity: Entity<Buffer>,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) -> Task<Result<()>> {
|
) -> Task<Result<()>> {
|
||||||
cx.spawn(|this, mut cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
let (buffer_info, text_task) = this.update(&mut cx, |_, cx| {
|
let (buffer_info, text_task) = this.update(&mut cx, |_, cx| {
|
||||||
let buffer = buffer_model.read(cx);
|
let buffer = buffer_entity.read(cx);
|
||||||
let Some(file) = buffer.file() else {
|
let Some(file) = buffer.file() else {
|
||||||
return Err(anyhow!("Buffer has no path."));
|
return Err(anyhow!("Buffer has no path."));
|
||||||
};
|
};
|
||||||
Ok(collect_buffer_info_and_text(
|
Ok(collect_buffer_info_and_text(
|
||||||
file.path().clone(),
|
file.path().clone(),
|
||||||
buffer_model,
|
buffer_entity,
|
||||||
buffer,
|
buffer,
|
||||||
cx.to_async(),
|
cx.to_async(),
|
||||||
))
|
))
|
||||||
@@ -207,11 +207,11 @@ impl ContextStore {
|
|||||||
let mut buffer_infos = Vec::new();
|
let mut buffer_infos = Vec::new();
|
||||||
let mut text_tasks = Vec::new();
|
let mut text_tasks = Vec::new();
|
||||||
this.update(&mut cx, |_, cx| {
|
this.update(&mut cx, |_, cx| {
|
||||||
for (path, buffer_model) in files.into_iter().zip(buffers) {
|
for (path, buffer_entity) in files.into_iter().zip(buffers) {
|
||||||
let buffer_model = buffer_model?;
|
let buffer_entity = buffer_entity?;
|
||||||
let buffer = buffer_model.read(cx);
|
let buffer = buffer_entity.read(cx);
|
||||||
let (buffer_info, text_task) =
|
let (buffer_info, text_task) =
|
||||||
collect_buffer_info_and_text(path, buffer_model, buffer, cx.to_async());
|
collect_buffer_info_and_text(path, buffer_entity, buffer, cx.to_async());
|
||||||
buffer_infos.push(buffer_info);
|
buffer_infos.push(buffer_info);
|
||||||
text_tasks.push(text_task);
|
text_tasks.push(text_task);
|
||||||
}
|
}
|
||||||
@@ -429,7 +429,7 @@ pub enum FileInclusion {
|
|||||||
|
|
||||||
// ContextBuffer without text.
|
// ContextBuffer without text.
|
||||||
struct BufferInfo {
|
struct BufferInfo {
|
||||||
buffer_model: Entity<Buffer>,
|
buffer_entity: Entity<Buffer>,
|
||||||
id: BufferId,
|
id: BufferId,
|
||||||
version: clock::Global,
|
version: clock::Global,
|
||||||
}
|
}
|
||||||
@@ -437,7 +437,7 @@ struct BufferInfo {
|
|||||||
fn make_context_buffer(info: BufferInfo, text: SharedString) -> ContextBuffer {
|
fn make_context_buffer(info: BufferInfo, text: SharedString) -> ContextBuffer {
|
||||||
ContextBuffer {
|
ContextBuffer {
|
||||||
id: info.id,
|
id: info.id,
|
||||||
buffer: info.buffer_model,
|
buffer: info.buffer_entity,
|
||||||
version: info.version,
|
version: info.version,
|
||||||
text,
|
text,
|
||||||
}
|
}
|
||||||
@@ -445,20 +445,18 @@ fn make_context_buffer(info: BufferInfo, text: SharedString) -> ContextBuffer {
|
|||||||
|
|
||||||
fn collect_buffer_info_and_text(
|
fn collect_buffer_info_and_text(
|
||||||
path: Arc<Path>,
|
path: Arc<Path>,
|
||||||
buffer_model: Entity<Buffer>,
|
buffer_entity: Entity<Buffer>,
|
||||||
buffer: &Buffer,
|
buffer: &Buffer,
|
||||||
cx: AsyncApp,
|
cx: AsyncApp,
|
||||||
) -> (BufferInfo, Task<SharedString>) {
|
) -> (BufferInfo, Task<SharedString>) {
|
||||||
let buffer_info = BufferInfo {
|
let buffer_info = BufferInfo {
|
||||||
id: buffer.remote_id(),
|
id: buffer.remote_id(),
|
||||||
buffer_model,
|
buffer_entity,
|
||||||
version: buffer.version(),
|
version: buffer.version(),
|
||||||
};
|
};
|
||||||
// Important to collect version at the same time as content so that staleness logic is correct.
|
// Important to collect version at the same time as content so that staleness logic is correct.
|
||||||
let content = buffer.as_rope().clone();
|
let content = buffer.as_rope().clone();
|
||||||
let text_task = cx
|
let text_task = cx.background_spawn(async move { to_fenced_codeblock(&path, content) });
|
||||||
.background_executor()
|
|
||||||
.spawn(async move { to_fenced_codeblock(&path, content) });
|
|
||||||
(buffer_info, text_task)
|
(buffer_info, text_task)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,8 +92,8 @@ impl ContextStrip {
|
|||||||
let active_item = workspace.read(cx).active_item(cx)?;
|
let active_item = workspace.read(cx).active_item(cx)?;
|
||||||
|
|
||||||
let editor = active_item.to_any().downcast::<Editor>().ok()?.read(cx);
|
let editor = active_item.to_any().downcast::<Editor>().ok()?.read(cx);
|
||||||
let active_buffer_model = editor.buffer().read(cx).as_singleton()?;
|
let active_buffer_entity = editor.buffer().read(cx).as_singleton()?;
|
||||||
let active_buffer = active_buffer_model.read(cx);
|
let active_buffer = active_buffer_entity.read(cx);
|
||||||
|
|
||||||
let path = active_buffer.file()?.path();
|
let path = active_buffer.file()?.path();
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ impl ContextStrip {
|
|||||||
|
|
||||||
Some(SuggestedContext::File {
|
Some(SuggestedContext::File {
|
||||||
name,
|
name,
|
||||||
buffer: active_buffer_model.downgrade(),
|
buffer: active_buffer_entity.downgrade(),
|
||||||
icon_path,
|
icon_path,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -393,9 +393,9 @@ impl Render for ContextStrip {
|
|||||||
.on_action(cx.listener(Self::remove_focused_context))
|
.on_action(cx.listener(Self::remove_focused_context))
|
||||||
.on_action(cx.listener(Self::accept_suggested_context))
|
.on_action(cx.listener(Self::accept_suggested_context))
|
||||||
.on_children_prepainted({
|
.on_children_prepainted({
|
||||||
let model = cx.entity().downgrade();
|
let entity = cx.entity().downgrade();
|
||||||
move |children_bounds, _window, cx| {
|
move |children_bounds, _window, cx| {
|
||||||
model
|
entity
|
||||||
.update(cx, |this, _| {
|
.update(cx, |this, _| {
|
||||||
this.children_bounds = Some(children_bounds);
|
this.children_bounds = Some(children_bounds);
|
||||||
})
|
})
|
||||||
@@ -411,22 +411,22 @@ impl Render for ContextStrip {
|
|||||||
|
|
||||||
Some(context_picker.clone())
|
Some(context_picker.clone())
|
||||||
})
|
})
|
||||||
.trigger(
|
.trigger_with_tooltip(
|
||||||
IconButton::new("add-context", IconName::Plus)
|
IconButton::new("add-context", IconName::Plus)
|
||||||
.icon_size(IconSize::Small)
|
.icon_size(IconSize::Small)
|
||||||
.style(ui::ButtonStyle::Filled)
|
.style(ui::ButtonStyle::Filled),
|
||||||
.tooltip({
|
{
|
||||||
let focus_handle = focus_handle.clone();
|
let focus_handle = focus_handle.clone();
|
||||||
move |window, cx| {
|
move |window, cx| {
|
||||||
Tooltip::for_action_in(
|
Tooltip::for_action_in(
|
||||||
"Add Context",
|
"Add Context",
|
||||||
&ToggleContextPicker,
|
&ToggleContextPicker,
|
||||||
&focus_handle,
|
&focus_handle,
|
||||||
window,
|
window,
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}),
|
},
|
||||||
)
|
)
|
||||||
.attach(gpui::Corner::TopLeft)
|
.attach(gpui::Corner::TopLeft)
|
||||||
.anchor(gpui::Corner::BottomLeft)
|
.anchor(gpui::Corner::BottomLeft)
|
||||||
@@ -453,6 +453,7 @@ impl Render for ContextStrip {
|
|||||||
&ToggleContextPicker,
|
&ToggleContextPicker,
|
||||||
&focus_handle,
|
&focus_handle,
|
||||||
window,
|
window,
|
||||||
|
cx,
|
||||||
)
|
)
|
||||||
.map(|binding| binding.into_any_element()),
|
.map(|binding| binding.into_any_element()),
|
||||||
),
|
),
|
||||||
|
|||||||
61
crates/assistant2/src/history_store.rs
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
use assistant_context_editor::SavedContextMetadata;
|
||||||
|
use chrono::{DateTime, Utc};
|
||||||
|
use gpui::{prelude::*, Entity};
|
||||||
|
|
||||||
|
use crate::thread_store::{SavedThreadMetadata, ThreadStore};
|
||||||
|
|
||||||
|
pub enum HistoryEntry {
|
||||||
|
Thread(SavedThreadMetadata),
|
||||||
|
Context(SavedContextMetadata),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HistoryEntry {
|
||||||
|
pub fn updated_at(&self) -> DateTime<Utc> {
|
||||||
|
match self {
|
||||||
|
HistoryEntry::Thread(thread) => thread.updated_at,
|
||||||
|
HistoryEntry::Context(context) => context.mtime.to_utc(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct HistoryStore {
|
||||||
|
thread_store: Entity<ThreadStore>,
|
||||||
|
context_store: Entity<assistant_context_editor::ContextStore>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HistoryStore {
|
||||||
|
pub fn new(
|
||||||
|
thread_store: Entity<ThreadStore>,
|
||||||
|
context_store: Entity<assistant_context_editor::ContextStore>,
|
||||||
|
_cx: &mut Context<Self>,
|
||||||
|
) -> Self {
|
||||||
|
Self {
|
||||||
|
thread_store,
|
||||||
|
context_store,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the number of history entries.
|
||||||
|
pub fn entry_count(&self, cx: &mut Context<Self>) -> usize {
|
||||||
|
self.entries(cx).len()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn entries(&self, cx: &mut Context<Self>) -> Vec<HistoryEntry> {
|
||||||
|
let mut history_entries = Vec::new();
|
||||||
|
|
||||||
|
for thread in self.thread_store.update(cx, |this, _cx| this.threads()) {
|
||||||
|
history_entries.push(HistoryEntry::Thread(thread));
|
||||||
|
}
|
||||||
|
|
||||||
|
for context in self.context_store.update(cx, |this, _cx| this.contexts()) {
|
||||||
|
history_entries.push(HistoryEntry::Context(context));
|
||||||
|
}
|
||||||
|
|
||||||
|
history_entries.sort_unstable_by_key(|entry| std::cmp::Reverse(entry.updated_at()));
|
||||||
|
history_entries
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn recent_entries(&self, limit: usize, cx: &mut Context<Self>) -> Vec<HistoryEntry> {
|
||||||
|
self.entries(cx).into_iter().take(limit).collect()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,8 +24,7 @@ use gpui::{
|
|||||||
UpdateGlobal, WeakEntity, Window,
|
UpdateGlobal, WeakEntity, Window,
|
||||||
};
|
};
|
||||||
use language::{Buffer, Point, Selection, TransactionId};
|
use language::{Buffer, Point, Selection, TransactionId};
|
||||||
use language_model::LanguageModelRegistry;
|
use language_model::{report_assistant_event, LanguageModelRegistry};
|
||||||
use language_models::report_assistant_event;
|
|
||||||
use multi_buffer::MultiBufferRow;
|
use multi_buffer::MultiBufferRow;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use project::{CodeAction, ProjectTransaction};
|
use project::{CodeAction, ProjectTransaction};
|
||||||
@@ -228,8 +227,12 @@ impl InlineAssistant {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let Some(inline_assist_target) = Self::resolve_inline_assist_target(workspace, window, cx)
|
let Some(inline_assist_target) = Self::resolve_inline_assist_target(
|
||||||
else {
|
workspace,
|
||||||
|
workspace.panel::<AssistantPanel>(cx),
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
) else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1345,7 +1348,7 @@ impl InlineAssistant {
|
|||||||
editor.scroll_manager.set_forbid_vertical_scroll(true);
|
editor.scroll_manager.set_forbid_vertical_scroll(true);
|
||||||
editor.set_show_scrollbars(false, cx);
|
editor.set_show_scrollbars(false, cx);
|
||||||
editor.set_read_only(true);
|
editor.set_read_only(true);
|
||||||
editor.set_show_inline_completions(Some(false), window, cx);
|
editor.set_show_edit_predictions(Some(false), window, cx);
|
||||||
editor.highlight_rows::<DeletedLines>(
|
editor.highlight_rows::<DeletedLines>(
|
||||||
Anchor::min()..Anchor::max(),
|
Anchor::min()..Anchor::max(),
|
||||||
cx.theme().status().deleted_background,
|
cx.theme().status().deleted_background,
|
||||||
@@ -1384,6 +1387,7 @@ impl InlineAssistant {
|
|||||||
|
|
||||||
fn resolve_inline_assist_target(
|
fn resolve_inline_assist_target(
|
||||||
workspace: &mut Workspace,
|
workspace: &mut Workspace,
|
||||||
|
assistant_panel: Option<Entity<AssistantPanel>>,
|
||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
cx: &mut App,
|
cx: &mut App,
|
||||||
) -> Option<InlineAssistTarget> {
|
) -> Option<InlineAssistTarget> {
|
||||||
@@ -1403,7 +1407,20 @@ impl InlineAssistant {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(workspace_editor) = workspace
|
let context_editor = assistant_panel
|
||||||
|
.and_then(|panel| panel.read(cx).active_context_editor())
|
||||||
|
.and_then(|editor| {
|
||||||
|
let editor = &editor.read(cx).editor().clone();
|
||||||
|
if editor.read(cx).is_focused(window) {
|
||||||
|
Some(editor.clone())
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if let Some(context_editor) = context_editor {
|
||||||
|
Some(InlineAssistTarget::Editor(context_editor))
|
||||||
|
} else if let Some(workspace_editor) = workspace
|
||||||
.active_item(cx)
|
.active_item(cx)
|
||||||
.and_then(|item| item.act_as::<Editor>(cx))
|
.and_then(|item| item.act_as::<Editor>(cx))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use crate::context_strip::{ContextStrip, ContextStripEvent, SuggestContextKind};
|
|||||||
use crate::terminal_codegen::TerminalCodegen;
|
use crate::terminal_codegen::TerminalCodegen;
|
||||||
use crate::thread_store::ThreadStore;
|
use crate::thread_store::ThreadStore;
|
||||||
use crate::{CycleNextInlineAssist, CyclePreviousInlineAssist};
|
use crate::{CycleNextInlineAssist, CyclePreviousInlineAssist};
|
||||||
use crate::{RemoveAllContext, ToggleContextPicker, ToggleModelSelector};
|
use crate::{RemoveAllContext, ToggleContextPicker};
|
||||||
use client::ErrorExt;
|
use client::ErrorExt;
|
||||||
use collections::VecDeque;
|
use collections::VecDeque;
|
||||||
use editor::{
|
use editor::{
|
||||||
@@ -20,7 +20,6 @@ use gpui::{
|
|||||||
EventEmitter, FocusHandle, Focusable, FontWeight, Subscription, TextStyle, WeakEntity, Window,
|
EventEmitter, FocusHandle, Focusable, FontWeight, Subscription, TextStyle, WeakEntity, Window,
|
||||||
};
|
};
|
||||||
use language_model::{LanguageModel, LanguageModelRegistry};
|
use language_model::{LanguageModel, LanguageModelRegistry};
|
||||||
use language_model_selector::LanguageModelSelector;
|
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
@@ -40,7 +39,6 @@ pub struct PromptEditor<T> {
|
|||||||
context_strip: Entity<ContextStrip>,
|
context_strip: Entity<ContextStrip>,
|
||||||
context_picker_menu_handle: PopoverMenuHandle<ContextPicker>,
|
context_picker_menu_handle: PopoverMenuHandle<ContextPicker>,
|
||||||
model_selector: Entity<AssistantModelSelector>,
|
model_selector: Entity<AssistantModelSelector>,
|
||||||
model_selector_menu_handle: PopoverMenuHandle<LanguageModelSelector>,
|
|
||||||
edited_since_done: bool,
|
edited_since_done: bool,
|
||||||
prompt_history: VecDeque<String>,
|
prompt_history: VecDeque<String>,
|
||||||
prompt_history_ix: Option<usize>,
|
prompt_history_ix: Option<usize>,
|
||||||
@@ -56,7 +54,7 @@ impl<T: 'static> EventEmitter<PromptEditorEvent> for PromptEditor<T> {}
|
|||||||
|
|
||||||
impl<T: 'static> Render for PromptEditor<T> {
|
impl<T: 'static> Render for PromptEditor<T> {
|
||||||
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||||
let ui_font_size = ThemeSettings::get_global(cx).ui_font_size;
|
let ui_font_size = ThemeSettings::get_global(cx).ui_font_size(cx);
|
||||||
let mut buttons = Vec::new();
|
let mut buttons = Vec::new();
|
||||||
|
|
||||||
let left_gutter_width = match &self.mode {
|
let left_gutter_width = match &self.mode {
|
||||||
@@ -104,7 +102,12 @@ impl<T: 'static> Render for PromptEditor<T> {
|
|||||||
.items_start()
|
.items_start()
|
||||||
.cursor(CursorStyle::Arrow)
|
.cursor(CursorStyle::Arrow)
|
||||||
.on_action(cx.listener(Self::toggle_context_picker))
|
.on_action(cx.listener(Self::toggle_context_picker))
|
||||||
.on_action(cx.listener(Self::toggle_model_selector))
|
.on_action(cx.listener(|this, action, window, cx| {
|
||||||
|
let selector = this.model_selector.read(cx).selector.clone();
|
||||||
|
selector.update(cx, |selector, cx| {
|
||||||
|
selector.toggle_model_selector(action, window, cx);
|
||||||
|
})
|
||||||
|
}))
|
||||||
.on_action(cx.listener(Self::confirm))
|
.on_action(cx.listener(Self::confirm))
|
||||||
.on_action(cx.listener(Self::cancel))
|
.on_action(cx.listener(Self::cancel))
|
||||||
.on_action(cx.listener(Self::move_up))
|
.on_action(cx.listener(Self::move_up))
|
||||||
@@ -271,7 +274,7 @@ impl<T: 'static> PromptEditor<T> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let assistant_panel_keybinding =
|
let assistant_panel_keybinding =
|
||||||
ui::text_for_action(&zed_actions::assistant::ToggleFocus, window)
|
ui::text_for_action(&zed_actions::assistant::ToggleFocus, window, cx)
|
||||||
.map(|keybinding| format!("{keybinding} to chat ― "))
|
.map(|keybinding| format!("{keybinding} to chat ― "))
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
@@ -347,15 +350,6 @@ impl<T: 'static> PromptEditor<T> {
|
|||||||
self.context_picker_menu_handle.toggle(window, cx);
|
self.context_picker_menu_handle.toggle(window, cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn toggle_model_selector(
|
|
||||||
&mut self,
|
|
||||||
_: &ToggleModelSelector,
|
|
||||||
window: &mut Window,
|
|
||||||
cx: &mut Context<Self>,
|
|
||||||
) {
|
|
||||||
self.model_selector_menu_handle.toggle(window, cx);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn remove_all_context(
|
pub fn remove_all_context(
|
||||||
&mut self,
|
&mut self,
|
||||||
_: &RemoveAllContext,
|
_: &RemoveAllContext,
|
||||||
@@ -618,12 +612,13 @@ impl<T: 'static> PromptEditor<T> {
|
|||||||
.tooltip({
|
.tooltip({
|
||||||
let focus_handle = self.editor.focus_handle(cx);
|
let focus_handle = self.editor.focus_handle(cx);
|
||||||
move |window, cx| {
|
move |window, cx| {
|
||||||
cx.new(|_| {
|
cx.new(|cx| {
|
||||||
let mut tooltip = Tooltip::new("Previous Alternative").key_binding(
|
let mut tooltip = Tooltip::new("Previous Alternative").key_binding(
|
||||||
KeyBinding::for_action_in(
|
KeyBinding::for_action_in(
|
||||||
&CyclePreviousInlineAssist,
|
&CyclePreviousInlineAssist,
|
||||||
&focus_handle,
|
&focus_handle,
|
||||||
window,
|
window,
|
||||||
|
cx,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if !disabled && current_index != 0 {
|
if !disabled && current_index != 0 {
|
||||||
@@ -659,12 +654,13 @@ impl<T: 'static> PromptEditor<T> {
|
|||||||
.tooltip({
|
.tooltip({
|
||||||
let focus_handle = self.editor.focus_handle(cx);
|
let focus_handle = self.editor.focus_handle(cx);
|
||||||
move |window, cx| {
|
move |window, cx| {
|
||||||
cx.new(|_| {
|
cx.new(|cx| {
|
||||||
let mut tooltip = Tooltip::new("Next Alternative").key_binding(
|
let mut tooltip = Tooltip::new("Next Alternative").key_binding(
|
||||||
KeyBinding::for_action_in(
|
KeyBinding::for_action_in(
|
||||||
&CycleNextInlineAssist,
|
&CycleNextInlineAssist,
|
||||||
&focus_handle,
|
&focus_handle,
|
||||||
window,
|
window,
|
||||||
|
cx,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if !disabled && current_index != total_models - 1 {
|
if !disabled && current_index != total_models - 1 {
|
||||||
@@ -862,7 +858,6 @@ impl PromptEditor<BufferCodegen> {
|
|||||||
editor
|
editor
|
||||||
});
|
});
|
||||||
let context_picker_menu_handle = PopoverMenuHandle::default();
|
let context_picker_menu_handle = PopoverMenuHandle::default();
|
||||||
let model_selector_menu_handle = PopoverMenuHandle::default();
|
|
||||||
|
|
||||||
let context_strip = cx.new(|cx| {
|
let context_strip = cx.new(|cx| {
|
||||||
ContextStrip::new(
|
ContextStrip::new(
|
||||||
@@ -886,15 +881,8 @@ impl PromptEditor<BufferCodegen> {
|
|||||||
context_strip,
|
context_strip,
|
||||||
context_picker_menu_handle,
|
context_picker_menu_handle,
|
||||||
model_selector: cx.new(|cx| {
|
model_selector: cx.new(|cx| {
|
||||||
AssistantModelSelector::new(
|
AssistantModelSelector::new(fs, prompt_editor.focus_handle(cx), window, cx)
|
||||||
fs,
|
|
||||||
model_selector_menu_handle.clone(),
|
|
||||||
prompt_editor.focus_handle(cx),
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
}),
|
}),
|
||||||
model_selector_menu_handle,
|
|
||||||
edited_since_done: false,
|
edited_since_done: false,
|
||||||
prompt_history,
|
prompt_history,
|
||||||
prompt_history_ix: None,
|
prompt_history_ix: None,
|
||||||
@@ -1018,7 +1006,6 @@ impl PromptEditor<TerminalCodegen> {
|
|||||||
editor
|
editor
|
||||||
});
|
});
|
||||||
let context_picker_menu_handle = PopoverMenuHandle::default();
|
let context_picker_menu_handle = PopoverMenuHandle::default();
|
||||||
let model_selector_menu_handle = PopoverMenuHandle::default();
|
|
||||||
|
|
||||||
let context_strip = cx.new(|cx| {
|
let context_strip = cx.new(|cx| {
|
||||||
ContextStrip::new(
|
ContextStrip::new(
|
||||||
@@ -1042,15 +1029,8 @@ impl PromptEditor<TerminalCodegen> {
|
|||||||
context_strip,
|
context_strip,
|
||||||
context_picker_menu_handle,
|
context_picker_menu_handle,
|
||||||
model_selector: cx.new(|cx| {
|
model_selector: cx.new(|cx| {
|
||||||
AssistantModelSelector::new(
|
AssistantModelSelector::new(fs, prompt_editor.focus_handle(cx), window, cx)
|
||||||
fs,
|
|
||||||
model_selector_menu_handle.clone(),
|
|
||||||
prompt_editor.focus_handle(cx),
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
}),
|
}),
|
||||||
model_selector_menu_handle,
|
|
||||||
edited_since_done: false,
|
edited_since_done: false,
|
||||||
prompt_history,
|
prompt_history,
|
||||||
prompt_history_ix: None,
|
prompt_history_ix: None,
|
||||||
|
|||||||
@@ -7,15 +7,17 @@ use gpui::{
|
|||||||
pulsating_between, Animation, AnimationExt, App, DismissEvent, Entity, Focusable, Subscription,
|
pulsating_between, Animation, AnimationExt, App, DismissEvent, Entity, Focusable, Subscription,
|
||||||
TextStyle, WeakEntity,
|
TextStyle, WeakEntity,
|
||||||
};
|
};
|
||||||
use language_model::{LanguageModelRegistry, LanguageModelRequestTool};
|
use language_model::LanguageModelRegistry;
|
||||||
use language_model_selector::LanguageModelSelector;
|
|
||||||
use rope::Point;
|
use rope::Point;
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
use text::Bias;
|
||||||
use theme::ThemeSettings;
|
use theme::ThemeSettings;
|
||||||
use ui::{
|
use ui::{
|
||||||
prelude::*, ButtonLike, KeyBinding, PopoverMenu, PopoverMenuHandle, Switch, TintColor, Tooltip,
|
prelude::*, ButtonLike, KeyBinding, PlatformStyle, PopoverMenu, PopoverMenuHandle, Switch,
|
||||||
|
TintColor, Tooltip,
|
||||||
};
|
};
|
||||||
|
use vim_mode_setting::VimModeSetting;
|
||||||
use workspace::Workspace;
|
use workspace::Workspace;
|
||||||
|
|
||||||
use crate::assistant_model_selector::AssistantModelSelector;
|
use crate::assistant_model_selector::AssistantModelSelector;
|
||||||
@@ -24,7 +26,7 @@ use crate::context_store::{refresh_context_store_text, ContextStore};
|
|||||||
use crate::context_strip::{ContextStrip, ContextStripEvent, SuggestContextKind};
|
use crate::context_strip::{ContextStrip, ContextStripEvent, SuggestContextKind};
|
||||||
use crate::thread::{RequestKind, Thread};
|
use crate::thread::{RequestKind, Thread};
|
||||||
use crate::thread_store::ThreadStore;
|
use crate::thread_store::ThreadStore;
|
||||||
use crate::{Chat, ChatMode, RemoveAllContext, ToggleContextPicker, ToggleModelSelector};
|
use crate::{Chat, ChatMode, RemoveAllContext, ToggleContextPicker};
|
||||||
|
|
||||||
pub struct MessageEditor {
|
pub struct MessageEditor {
|
||||||
thread: Entity<Thread>,
|
thread: Entity<Thread>,
|
||||||
@@ -35,7 +37,6 @@ pub struct MessageEditor {
|
|||||||
inline_context_picker: Entity<ContextPicker>,
|
inline_context_picker: Entity<ContextPicker>,
|
||||||
inline_context_picker_menu_handle: PopoverMenuHandle<ContextPicker>,
|
inline_context_picker_menu_handle: PopoverMenuHandle<ContextPicker>,
|
||||||
model_selector: Entity<AssistantModelSelector>,
|
model_selector: Entity<AssistantModelSelector>,
|
||||||
model_selector_menu_handle: PopoverMenuHandle<LanguageModelSelector>,
|
|
||||||
use_tools: bool,
|
use_tools: bool,
|
||||||
_subscriptions: Vec<Subscription>,
|
_subscriptions: Vec<Subscription>,
|
||||||
}
|
}
|
||||||
@@ -52,7 +53,6 @@ impl MessageEditor {
|
|||||||
let context_store = cx.new(|_cx| ContextStore::new(workspace.clone()));
|
let context_store = cx.new(|_cx| ContextStore::new(workspace.clone()));
|
||||||
let context_picker_menu_handle = PopoverMenuHandle::default();
|
let context_picker_menu_handle = PopoverMenuHandle::default();
|
||||||
let inline_context_picker_menu_handle = PopoverMenuHandle::default();
|
let inline_context_picker_menu_handle = PopoverMenuHandle::default();
|
||||||
let model_selector_menu_handle = PopoverMenuHandle::default();
|
|
||||||
|
|
||||||
let editor = cx.new(|cx| {
|
let editor = cx.new(|cx| {
|
||||||
let mut editor = Editor::auto_height(10, window, cx);
|
let mut editor = Editor::auto_height(10, window, cx);
|
||||||
@@ -105,30 +105,13 @@ impl MessageEditor {
|
|||||||
context_picker_menu_handle,
|
context_picker_menu_handle,
|
||||||
inline_context_picker,
|
inline_context_picker,
|
||||||
inline_context_picker_menu_handle,
|
inline_context_picker_menu_handle,
|
||||||
model_selector: cx.new(|cx| {
|
model_selector: cx
|
||||||
AssistantModelSelector::new(
|
.new(|cx| AssistantModelSelector::new(fs, editor.focus_handle(cx), window, cx)),
|
||||||
fs,
|
|
||||||
model_selector_menu_handle.clone(),
|
|
||||||
editor.focus_handle(cx),
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
}),
|
|
||||||
model_selector_menu_handle,
|
|
||||||
use_tools: false,
|
use_tools: false,
|
||||||
_subscriptions: subscriptions,
|
_subscriptions: subscriptions,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn toggle_model_selector(
|
|
||||||
&mut self,
|
|
||||||
_: &ToggleModelSelector,
|
|
||||||
window: &mut Window,
|
|
||||||
cx: &mut Context<Self>,
|
|
||||||
) {
|
|
||||||
self.model_selector_menu_handle.toggle(window, cx)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn toggle_chat_mode(&mut self, _: &ChatMode, _window: &mut Window, cx: &mut Context<Self>) {
|
fn toggle_chat_mode(&mut self, _: &ChatMode, _window: &mut Window, cx: &mut Context<Self>) {
|
||||||
self.use_tools = !self.use_tools;
|
self.use_tools = !self.use_tools;
|
||||||
cx.notify();
|
cx.notify();
|
||||||
@@ -204,22 +187,7 @@ impl MessageEditor {
|
|||||||
.update(&mut cx, |thread, cx| {
|
.update(&mut cx, |thread, cx| {
|
||||||
let context = context_store.read(cx).snapshot(cx).collect::<Vec<_>>();
|
let context = context_store.read(cx).snapshot(cx).collect::<Vec<_>>();
|
||||||
thread.insert_user_message(user_message, context, cx);
|
thread.insert_user_message(user_message, context, cx);
|
||||||
let mut request = thread.to_completion_request(request_kind, cx);
|
thread.send_to_model(model, request_kind, use_tools, cx);
|
||||||
|
|
||||||
if use_tools {
|
|
||||||
request.tools = thread
|
|
||||||
.tools()
|
|
||||||
.tools(cx)
|
|
||||||
.into_iter()
|
|
||||||
.map(|tool| LanguageModelRequestTool {
|
|
||||||
name: tool.name(),
|
|
||||||
description: tool.description(),
|
|
||||||
input_schema: tool.input_schema(),
|
|
||||||
})
|
|
||||||
.collect();
|
|
||||||
}
|
|
||||||
|
|
||||||
thread.stream_completion(request, model, cx)
|
|
||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
})
|
})
|
||||||
@@ -239,7 +207,10 @@ impl MessageEditor {
|
|||||||
let snapshot = editor.buffer().read(cx).snapshot(cx);
|
let snapshot = editor.buffer().read(cx).snapshot(cx);
|
||||||
let newest_cursor = editor.selections.newest::<Point>(cx).head();
|
let newest_cursor = editor.selections.newest::<Point>(cx).head();
|
||||||
if newest_cursor.column > 0 {
|
if newest_cursor.column > 0 {
|
||||||
let behind_cursor = Point::new(newest_cursor.row, newest_cursor.column - 1);
|
let behind_cursor = snapshot.clip_point(
|
||||||
|
Point::new(newest_cursor.row, newest_cursor.column - 1),
|
||||||
|
Bias::Left,
|
||||||
|
);
|
||||||
let char_behind_cursor = snapshot.chars_at(behind_cursor).next();
|
let char_behind_cursor = snapshot.chars_at(behind_cursor).next();
|
||||||
if char_behind_cursor == Some('@') {
|
if char_behind_cursor == Some('@') {
|
||||||
self.inline_context_picker_menu_handle.show(window, cx);
|
self.inline_context_picker_menu_handle.show(window, cx);
|
||||||
@@ -305,7 +276,6 @@ impl Render for MessageEditor {
|
|||||||
let inline_context_picker = self.inline_context_picker.clone();
|
let inline_context_picker = self.inline_context_picker.clone();
|
||||||
let bg_color = cx.theme().colors().editor_background;
|
let bg_color = cx.theme().colors().editor_background;
|
||||||
let is_streaming_completion = self.thread.read(cx).is_streaming();
|
let is_streaming_completion = self.thread.read(cx).is_streaming();
|
||||||
let button_width = px(64.);
|
|
||||||
let is_model_selected = self.is_model_selected(cx);
|
let is_model_selected = self.is_model_selected(cx);
|
||||||
let is_editor_empty = self.is_editor_empty(cx);
|
let is_editor_empty = self.is_editor_empty(cx);
|
||||||
let submit_label_color = if is_editor_empty {
|
let submit_label_color = if is_editor_empty {
|
||||||
@@ -314,10 +284,25 @@ impl Render for MessageEditor {
|
|||||||
Color::Default
|
Color::Default
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let vim_mode_enabled = VimModeSetting::get_global(cx).0;
|
||||||
|
let platform = PlatformStyle::platform();
|
||||||
|
let linux = platform == PlatformStyle::Linux;
|
||||||
|
let windows = platform == PlatformStyle::Windows;
|
||||||
|
let button_width = if linux || windows || vim_mode_enabled {
|
||||||
|
px(92.)
|
||||||
|
} else {
|
||||||
|
px(64.)
|
||||||
|
};
|
||||||
|
|
||||||
v_flex()
|
v_flex()
|
||||||
.key_context("MessageEditor")
|
.key_context("MessageEditor")
|
||||||
.on_action(cx.listener(Self::chat))
|
.on_action(cx.listener(Self::chat))
|
||||||
.on_action(cx.listener(Self::toggle_model_selector))
|
.on_action(cx.listener(|this, action, window, cx| {
|
||||||
|
let selector = this.model_selector.read(cx).selector.clone();
|
||||||
|
selector.update(cx, |this, cx| {
|
||||||
|
this.toggle_model_selector(action, window, cx);
|
||||||
|
})
|
||||||
|
}))
|
||||||
.on_action(cx.listener(Self::toggle_context_picker))
|
.on_action(cx.listener(Self::toggle_context_picker))
|
||||||
.on_action(cx.listener(Self::remove_all_context))
|
.on_action(cx.listener(Self::remove_all_context))
|
||||||
.on_action(cx.listener(Self::move_up))
|
.on_action(cx.listener(Self::move_up))
|
||||||
@@ -329,7 +314,7 @@ impl Render for MessageEditor {
|
|||||||
.child(self.context_strip.clone())
|
.child(self.context_strip.clone())
|
||||||
.child(
|
.child(
|
||||||
v_flex()
|
v_flex()
|
||||||
.gap_4()
|
.gap_5()
|
||||||
.child({
|
.child({
|
||||||
let settings = ThemeSettings::get_global(cx);
|
let settings = ThemeSettings::get_global(cx);
|
||||||
let text_style = TextStyle {
|
let text_style = TextStyle {
|
||||||
@@ -365,11 +350,7 @@ impl Render for MessageEditor {
|
|||||||
.anchor(gpui::Corner::BottomLeft)
|
.anchor(gpui::Corner::BottomLeft)
|
||||||
.offset(gpui::Point {
|
.offset(gpui::Point {
|
||||||
x: px(0.0),
|
x: px(0.0),
|
||||||
y: px(-ThemeSettings::clamp_font_size(
|
y: (-ThemeSettings::get_global(cx).ui_font_size(cx) * 2) - px(4.0),
|
||||||
ThemeSettings::get_global(cx).ui_font_size,
|
|
||||||
)
|
|
||||||
.0 * 2.0)
|
|
||||||
- px(4.0),
|
|
||||||
})
|
})
|
||||||
.with_handle(self.inline_context_picker_menu_handle.clone()),
|
.with_handle(self.inline_context_picker_menu_handle.clone()),
|
||||||
)
|
)
|
||||||
@@ -390,6 +371,7 @@ impl Render for MessageEditor {
|
|||||||
&ChatMode,
|
&ChatMode,
|
||||||
&focus_handle,
|
&focus_handle,
|
||||||
window,
|
window,
|
||||||
|
cx,
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
.child(h_flex().gap_1().child(self.model_selector.clone()).child(
|
.child(h_flex().gap_1().child(self.model_selector.clone()).child(
|
||||||
@@ -419,6 +401,7 @@ impl Render for MessageEditor {
|
|||||||
&editor::actions::Cancel,
|
&editor::actions::Cancel,
|
||||||
&focus_handle,
|
&focus_handle,
|
||||||
window,
|
window,
|
||||||
|
cx,
|
||||||
)
|
)
|
||||||
.map(|binding| binding.into_any_element()),
|
.map(|binding| binding.into_any_element()),
|
||||||
),
|
),
|
||||||
@@ -449,6 +432,7 @@ impl Render for MessageEditor {
|
|||||||
&Chat,
|
&Chat,
|
||||||
&focus_handle,
|
&focus_handle,
|
||||||
window,
|
window,
|
||||||
|
cx,
|
||||||
)
|
)
|
||||||
.map(|binding| binding.into_any_element()),
|
.map(|binding| binding.into_any_element()),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
use crate::inline_prompt_editor::CodegenStatus;
|
use crate::inline_prompt_editor::CodegenStatus;
|
||||||
use client::telemetry::Telemetry;
|
use client::telemetry::Telemetry;
|
||||||
use futures::{channel::mpsc, SinkExt, StreamExt};
|
use futures::{channel::mpsc, SinkExt, StreamExt};
|
||||||
use gpui::{App, Context, Entity, EventEmitter, Task};
|
use gpui::{App, AppContext as _, Context, Entity, EventEmitter, Task};
|
||||||
use language_model::{LanguageModelRegistry, LanguageModelRequest};
|
use language_model::{report_assistant_event, LanguageModelRegistry, LanguageModelRequest};
|
||||||
use language_models::report_assistant_event;
|
|
||||||
use std::{sync::Arc, time::Instant};
|
use std::{sync::Arc, time::Instant};
|
||||||
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
||||||
use terminal::Terminal;
|
use terminal::Terminal;
|
||||||
@@ -53,7 +52,7 @@ impl TerminalCodegen {
|
|||||||
|
|
||||||
let (mut hunks_tx, mut hunks_rx) = mpsc::channel(1);
|
let (mut hunks_tx, mut hunks_rx) = mpsc::channel(1);
|
||||||
|
|
||||||
let task = cx.background_executor().spawn({
|
let task = cx.background_spawn({
|
||||||
let message_id = message_id.clone();
|
let message_id = message_id.clone();
|
||||||
let executor = cx.background_executor().clone();
|
let executor = cx.background_executor().clone();
|
||||||
async move {
|
async move {
|
||||||
@@ -156,7 +155,10 @@ pub enum CodegenEvent {
|
|||||||
Finished,
|
Finished,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
pub const CLEAR_INPUT: &str = "\x15";
|
pub const CLEAR_INPUT: &str = "\x15";
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
pub const CLEAR_INPUT: &str = "\x03";
|
||||||
const CARRIAGE_RETURN: &str = "\x0d";
|
const CARRIAGE_RETURN: &str = "\x0d";
|
||||||
|
|
||||||
struct TerminalTransaction {
|
struct TerminalTransaction {
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ use fs::Fs;
|
|||||||
use gpui::{App, Entity, Focusable, Global, Subscription, UpdateGlobal, WeakEntity};
|
use gpui::{App, Entity, Focusable, Global, Subscription, UpdateGlobal, WeakEntity};
|
||||||
use language::Buffer;
|
use language::Buffer;
|
||||||
use language_model::{
|
use language_model::{
|
||||||
LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage, Role,
|
report_assistant_event, LanguageModelRegistry, LanguageModelRequest,
|
||||||
|
LanguageModelRequestMessage, Role,
|
||||||
};
|
};
|
||||||
use language_models::report_assistant_event;
|
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_library::PromptBuilder;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
||||||
|
|||||||
@@ -4,25 +4,26 @@ use anyhow::Result;
|
|||||||
use assistant_tool::ToolWorkingSet;
|
use assistant_tool::ToolWorkingSet;
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use collections::{BTreeMap, HashMap, HashSet};
|
use collections::{BTreeMap, HashMap, HashSet};
|
||||||
use futures::future::Shared;
|
use futures::StreamExt as _;
|
||||||
use futures::{FutureExt as _, StreamExt as _};
|
|
||||||
use gpui::{App, Context, EventEmitter, SharedString, Task};
|
use gpui::{App, Context, EventEmitter, SharedString, Task};
|
||||||
use language_model::{
|
use language_model::{
|
||||||
LanguageModel, LanguageModelCompletionEvent, LanguageModelRegistry, LanguageModelRequest,
|
LanguageModel, LanguageModelCompletionEvent, LanguageModelRegistry, LanguageModelRequest,
|
||||||
LanguageModelRequestMessage, LanguageModelToolResult, LanguageModelToolUse,
|
LanguageModelRequestMessage, LanguageModelRequestTool, LanguageModelToolUseId,
|
||||||
LanguageModelToolUseId, MessageContent, Role, StopReason,
|
MaxMonthlySpendReachedError, MessageContent, PaymentRequiredError, Role, StopReason,
|
||||||
};
|
};
|
||||||
use language_models::provider::cloud::{MaxMonthlySpendReachedError, PaymentRequiredError};
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use util::{post_inc, TryFutureExt as _};
|
use util::{post_inc, TryFutureExt as _};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
use crate::context::{attach_context_to_message, ContextId, ContextSnapshot};
|
use crate::context::{attach_context_to_message, ContextId, ContextSnapshot};
|
||||||
use crate::thread_store::SavedThread;
|
use crate::thread_store::SavedThread;
|
||||||
|
use crate::tool_use::{PendingToolUse, ToolUse, ToolUseState};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub enum RequestKind {
|
pub enum RequestKind {
|
||||||
Chat,
|
Chat,
|
||||||
|
/// Used when summarizing a thread.
|
||||||
|
Summarize,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Serialize, Deserialize)]
|
||||||
@@ -41,7 +42,7 @@ impl std::fmt::Display for ThreadId {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Serialize, Deserialize)]
|
||||||
pub struct MessageId(usize);
|
pub struct MessageId(pub(crate) usize);
|
||||||
|
|
||||||
impl MessageId {
|
impl MessageId {
|
||||||
fn post_inc(&mut self) -> Self {
|
fn post_inc(&mut self) -> Self {
|
||||||
@@ -70,9 +71,7 @@ pub struct Thread {
|
|||||||
completion_count: usize,
|
completion_count: usize,
|
||||||
pending_completions: Vec<PendingCompletion>,
|
pending_completions: Vec<PendingCompletion>,
|
||||||
tools: Arc<ToolWorkingSet>,
|
tools: Arc<ToolWorkingSet>,
|
||||||
tool_uses_by_message: HashMap<MessageId, Vec<LanguageModelToolUse>>,
|
tool_use: ToolUseState,
|
||||||
tool_results_by_message: HashMap<MessageId, Vec<LanguageModelToolResult>>,
|
|
||||||
pending_tool_uses_by_id: HashMap<LanguageModelToolUseId, PendingToolUse>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Thread {
|
impl Thread {
|
||||||
@@ -89,9 +88,7 @@ impl Thread {
|
|||||||
completion_count: 0,
|
completion_count: 0,
|
||||||
pending_completions: Vec::new(),
|
pending_completions: Vec::new(),
|
||||||
tools,
|
tools,
|
||||||
tool_uses_by_message: HashMap::default(),
|
tool_use: ToolUseState::default(),
|
||||||
tool_results_by_message: HashMap::default(),
|
|
||||||
pending_tool_uses_by_id: HashMap::default(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,9 +120,7 @@ impl Thread {
|
|||||||
completion_count: 0,
|
completion_count: 0,
|
||||||
pending_completions: Vec::new(),
|
pending_completions: Vec::new(),
|
||||||
tools,
|
tools,
|
||||||
tool_uses_by_message: HashMap::default(),
|
tool_use: ToolUseState::default(),
|
||||||
tool_results_by_message: HashMap::default(),
|
|
||||||
pending_tool_uses_by_id: HashMap::default(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +182,15 @@ impl Thread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn pending_tool_uses(&self) -> Vec<&PendingToolUse> {
|
pub fn pending_tool_uses(&self) -> Vec<&PendingToolUse> {
|
||||||
self.pending_tool_uses_by_id.values().collect()
|
self.tool_use.pending_tool_uses()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn tool_uses_for_message(&self, id: MessageId) -> Vec<ToolUse> {
|
||||||
|
self.tool_use.tool_uses_for_message(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn message_has_tool_results(&self, message_id: MessageId) -> bool {
|
||||||
|
self.tool_use.message_has_tool_results(message_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn insert_user_message(
|
pub fn insert_user_message(
|
||||||
@@ -241,9 +244,34 @@ impl Thread {
|
|||||||
text
|
text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn send_to_model(
|
||||||
|
&mut self,
|
||||||
|
model: Arc<dyn LanguageModel>,
|
||||||
|
request_kind: RequestKind,
|
||||||
|
use_tools: bool,
|
||||||
|
cx: &mut Context<Self>,
|
||||||
|
) {
|
||||||
|
let mut request = self.to_completion_request(request_kind, cx);
|
||||||
|
|
||||||
|
if use_tools {
|
||||||
|
request.tools = self
|
||||||
|
.tools()
|
||||||
|
.tools(cx)
|
||||||
|
.into_iter()
|
||||||
|
.map(|tool| LanguageModelRequestTool {
|
||||||
|
name: tool.name(),
|
||||||
|
description: tool.description(),
|
||||||
|
input_schema: tool.input_schema(),
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
}
|
||||||
|
|
||||||
|
self.stream_completion(request, model, cx);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn to_completion_request(
|
pub fn to_completion_request(
|
||||||
&self,
|
&self,
|
||||||
_request_kind: RequestKind,
|
request_kind: RequestKind,
|
||||||
_cx: &App,
|
_cx: &App,
|
||||||
) -> LanguageModelRequest {
|
) -> LanguageModelRequest {
|
||||||
let mut request = LanguageModelRequest {
|
let mut request = LanguageModelRequest {
|
||||||
@@ -265,12 +293,13 @@ impl Thread {
|
|||||||
content: Vec::new(),
|
content: Vec::new(),
|
||||||
cache: false,
|
cache: false,
|
||||||
};
|
};
|
||||||
|
match request_kind {
|
||||||
if let Some(tool_results) = self.tool_results_by_message.get(&message.id) {
|
RequestKind::Chat => {
|
||||||
for tool_result in tool_results {
|
self.tool_use
|
||||||
request_message
|
.attach_tool_results(message.id, &mut request_message);
|
||||||
.content
|
}
|
||||||
.push(MessageContent::ToolResult(tool_result.clone()));
|
RequestKind::Summarize => {
|
||||||
|
// We don't care about tool use during summarization.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,11 +309,13 @@ impl Thread {
|
|||||||
.push(MessageContent::Text(message.text.clone()));
|
.push(MessageContent::Text(message.text.clone()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(tool_uses) = self.tool_uses_by_message.get(&message.id) {
|
match request_kind {
|
||||||
for tool_use in tool_uses {
|
RequestKind::Chat => {
|
||||||
request_message
|
self.tool_use
|
||||||
.content
|
.attach_tool_uses(message.id, &mut request_message);
|
||||||
.push(MessageContent::ToolUse(tool_use.clone()));
|
}
|
||||||
|
RequestKind::Summarize => {
|
||||||
|
// We don't care about tool use during summarization.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,21 +391,8 @@ impl Thread {
|
|||||||
.rfind(|message| message.role == Role::Assistant)
|
.rfind(|message| message.role == Role::Assistant)
|
||||||
{
|
{
|
||||||
thread
|
thread
|
||||||
.tool_uses_by_message
|
.tool_use
|
||||||
.entry(last_assistant_message.id)
|
.request_tool_use(last_assistant_message.id, tool_use);
|
||||||
.or_default()
|
|
||||||
.push(tool_use.clone());
|
|
||||||
|
|
||||||
thread.pending_tool_uses_by_id.insert(
|
|
||||||
tool_use.id.clone(),
|
|
||||||
PendingToolUse {
|
|
||||||
assistant_message_id: last_assistant_message.id,
|
|
||||||
id: tool_use.id,
|
|
||||||
name: tool_use.name,
|
|
||||||
input: tool_use.input,
|
|
||||||
status: PendingToolUseStatus::Idle,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -451,7 +469,7 @@ impl Thread {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut request = self.to_completion_request(RequestKind::Chat, cx);
|
let mut request = self.to_completion_request(RequestKind::Summarize, cx);
|
||||||
request.messages.push(LanguageModelRequestMessage {
|
request.messages.push(LanguageModelRequestMessage {
|
||||||
role: Role::User,
|
role: Role::User,
|
||||||
content: vec![
|
content: vec![
|
||||||
@@ -494,7 +512,6 @@ impl Thread {
|
|||||||
|
|
||||||
pub fn insert_tool_output(
|
pub fn insert_tool_output(
|
||||||
&mut self,
|
&mut self,
|
||||||
assistant_message_id: MessageId,
|
|
||||||
tool_use_id: LanguageModelToolUseId,
|
tool_use_id: LanguageModelToolUseId,
|
||||||
output: Task<Result<String>>,
|
output: Task<Result<String>>,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
@@ -505,50 +522,18 @@ impl Thread {
|
|||||||
let output = output.await;
|
let output = output.await;
|
||||||
thread
|
thread
|
||||||
.update(&mut cx, |thread, cx| {
|
.update(&mut cx, |thread, cx| {
|
||||||
// The tool use was requested by an Assistant message,
|
thread
|
||||||
// so we want to attach the tool results to the next
|
.tool_use
|
||||||
// user message.
|
.insert_tool_output(tool_use_id.clone(), output);
|
||||||
let next_user_message = MessageId(assistant_message_id.0 + 1);
|
|
||||||
|
|
||||||
let tool_results = thread
|
cx.emit(ThreadEvent::ToolFinished { tool_use_id });
|
||||||
.tool_results_by_message
|
|
||||||
.entry(next_user_message)
|
|
||||||
.or_default();
|
|
||||||
|
|
||||||
match output {
|
|
||||||
Ok(output) => {
|
|
||||||
tool_results.push(LanguageModelToolResult {
|
|
||||||
tool_use_id: tool_use_id.to_string(),
|
|
||||||
content: output,
|
|
||||||
is_error: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
cx.emit(ThreadEvent::ToolFinished { tool_use_id });
|
|
||||||
}
|
|
||||||
Err(err) => {
|
|
||||||
tool_results.push(LanguageModelToolResult {
|
|
||||||
tool_use_id: tool_use_id.to_string(),
|
|
||||||
content: err.to_string(),
|
|
||||||
is_error: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
if let Some(tool_use) =
|
|
||||||
thread.pending_tool_uses_by_id.get_mut(&tool_use_id)
|
|
||||||
{
|
|
||||||
tool_use.status = PendingToolUseStatus::Error(err.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if let Some(tool_use) = self.pending_tool_uses_by_id.get_mut(&tool_use_id) {
|
self.tool_use
|
||||||
tool_use.status = PendingToolUseStatus::Running {
|
.run_pending_tool(tool_use_id, insert_output_task);
|
||||||
_task: insert_output_task.shared(),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Cancels the last pending completion, if there are any pending.
|
/// Cancels the last pending completion, if there are any pending.
|
||||||
@@ -590,26 +575,3 @@ struct PendingCompletion {
|
|||||||
id: usize,
|
id: usize,
|
||||||
_task: Task<()>,
|
_task: Task<()>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
|
||||||
pub struct PendingToolUse {
|
|
||||||
pub id: LanguageModelToolUseId,
|
|
||||||
/// The ID of the Assistant message in which the tool use was requested.
|
|
||||||
pub assistant_message_id: MessageId,
|
|
||||||
pub name: String,
|
|
||||||
pub input: serde_json::Value,
|
|
||||||
pub status: PendingToolUseStatus,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
|
||||||
pub enum PendingToolUseStatus {
|
|
||||||
Idle,
|
|
||||||
Running { _task: Shared<Task<()>> },
|
|
||||||
Error(#[allow(unused)] String),
|
|
||||||
}
|
|
||||||
|
|
||||||
impl PendingToolUseStatus {
|
|
||||||
pub fn is_idle(&self) -> bool {
|
|
||||||
matches!(self, PendingToolUseStatus::Idle)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
use assistant_context_editor::SavedContextMetadata;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
uniform_list, App, Entity, FocusHandle, Focusable, ScrollStrategy, UniformListScrollHandle,
|
uniform_list, App, Entity, FocusHandle, Focusable, ScrollStrategy, UniformListScrollHandle,
|
||||||
WeakEntity,
|
WeakEntity,
|
||||||
@@ -5,13 +6,14 @@ use gpui::{
|
|||||||
use time::{OffsetDateTime, UtcOffset};
|
use time::{OffsetDateTime, UtcOffset};
|
||||||
use ui::{prelude::*, IconButtonShape, ListItem, ListItemSpacing, Tooltip};
|
use ui::{prelude::*, IconButtonShape, ListItem, ListItemSpacing, Tooltip};
|
||||||
|
|
||||||
use crate::thread_store::{SavedThreadMetadata, ThreadStore};
|
use crate::history_store::{HistoryEntry, HistoryStore};
|
||||||
|
use crate::thread_store::SavedThreadMetadata;
|
||||||
use crate::{AssistantPanel, RemoveSelectedThread};
|
use crate::{AssistantPanel, RemoveSelectedThread};
|
||||||
|
|
||||||
pub struct ThreadHistory {
|
pub struct ThreadHistory {
|
||||||
focus_handle: FocusHandle,
|
focus_handle: FocusHandle,
|
||||||
assistant_panel: WeakEntity<AssistantPanel>,
|
assistant_panel: WeakEntity<AssistantPanel>,
|
||||||
thread_store: Entity<ThreadStore>,
|
history_store: Entity<HistoryStore>,
|
||||||
scroll_handle: UniformListScrollHandle,
|
scroll_handle: UniformListScrollHandle,
|
||||||
selected_index: usize,
|
selected_index: usize,
|
||||||
}
|
}
|
||||||
@@ -19,14 +21,13 @@ pub struct ThreadHistory {
|
|||||||
impl ThreadHistory {
|
impl ThreadHistory {
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
assistant_panel: WeakEntity<AssistantPanel>,
|
assistant_panel: WeakEntity<AssistantPanel>,
|
||||||
thread_store: Entity<ThreadStore>,
|
history_store: Entity<HistoryStore>,
|
||||||
|
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
focus_handle: cx.focus_handle(),
|
focus_handle: cx.focus_handle(),
|
||||||
assistant_panel,
|
assistant_panel,
|
||||||
thread_store,
|
history_store,
|
||||||
scroll_handle: UniformListScrollHandle::default(),
|
scroll_handle: UniformListScrollHandle::default(),
|
||||||
selected_index: 0,
|
selected_index: 0,
|
||||||
}
|
}
|
||||||
@@ -38,7 +39,9 @@ impl ThreadHistory {
|
|||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) {
|
) {
|
||||||
let count = self.thread_store.read(cx).thread_count();
|
let count = self
|
||||||
|
.history_store
|
||||||
|
.update(cx, |this, cx| this.entry_count(cx));
|
||||||
if count > 0 {
|
if count > 0 {
|
||||||
if self.selected_index == 0 {
|
if self.selected_index == 0 {
|
||||||
self.set_selected_index(count - 1, window, cx);
|
self.set_selected_index(count - 1, window, cx);
|
||||||
@@ -54,7 +57,9 @@ impl ThreadHistory {
|
|||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) {
|
) {
|
||||||
let count = self.thread_store.read(cx).thread_count();
|
let count = self
|
||||||
|
.history_store
|
||||||
|
.update(cx, |this, cx| this.entry_count(cx));
|
||||||
if count > 0 {
|
if count > 0 {
|
||||||
if self.selected_index == count - 1 {
|
if self.selected_index == count - 1 {
|
||||||
self.set_selected_index(0, window, cx);
|
self.set_selected_index(0, window, cx);
|
||||||
@@ -65,14 +70,18 @@ impl ThreadHistory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn select_first(&mut self, _: &menu::SelectFirst, window: &mut Window, cx: &mut Context<Self>) {
|
fn select_first(&mut self, _: &menu::SelectFirst, window: &mut Window, cx: &mut Context<Self>) {
|
||||||
let count = self.thread_store.read(cx).thread_count();
|
let count = self
|
||||||
|
.history_store
|
||||||
|
.update(cx, |this, cx| this.entry_count(cx));
|
||||||
if count > 0 {
|
if count > 0 {
|
||||||
self.set_selected_index(0, window, cx);
|
self.set_selected_index(0, window, cx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn select_last(&mut self, _: &menu::SelectLast, window: &mut Window, cx: &mut Context<Self>) {
|
fn select_last(&mut self, _: &menu::SelectLast, window: &mut Window, cx: &mut Context<Self>) {
|
||||||
let count = self.thread_store.read(cx).thread_count();
|
let count = self
|
||||||
|
.history_store
|
||||||
|
.update(cx, |this, cx| this.entry_count(cx));
|
||||||
if count > 0 {
|
if count > 0 {
|
||||||
self.set_selected_index(count - 1, window, cx);
|
self.set_selected_index(count - 1, window, cx);
|
||||||
}
|
}
|
||||||
@@ -86,12 +95,23 @@ impl ThreadHistory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn confirm(&mut self, _: &menu::Confirm, window: &mut Window, cx: &mut Context<Self>) {
|
fn confirm(&mut self, _: &menu::Confirm, window: &mut Window, cx: &mut Context<Self>) {
|
||||||
let threads = self.thread_store.update(cx, |this, _cx| this.threads());
|
let entries = self.history_store.update(cx, |this, cx| this.entries(cx));
|
||||||
|
|
||||||
if let Some(thread) = threads.get(self.selected_index) {
|
if let Some(entry) = entries.get(self.selected_index) {
|
||||||
self.assistant_panel
|
match entry {
|
||||||
.update(cx, move |this, cx| this.open_thread(&thread.id, window, cx))
|
HistoryEntry::Thread(thread) => {
|
||||||
.ok();
|
self.assistant_panel
|
||||||
|
.update(cx, move |this, cx| this.open_thread(&thread.id, window, cx))
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
HistoryEntry::Context(context) => {
|
||||||
|
self.assistant_panel
|
||||||
|
.update(cx, move |this, cx| {
|
||||||
|
this.open_saved_prompt_editor(context.path.clone(), window, cx)
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cx.notify();
|
cx.notify();
|
||||||
}
|
}
|
||||||
@@ -103,14 +123,25 @@ impl ThreadHistory {
|
|||||||
_window: &mut Window,
|
_window: &mut Window,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) {
|
) {
|
||||||
let threads = self.thread_store.update(cx, |this, _cx| this.threads());
|
let entries = self.history_store.update(cx, |this, cx| this.entries(cx));
|
||||||
|
|
||||||
if let Some(thread) = threads.get(self.selected_index) {
|
if let Some(entry) = entries.get(self.selected_index) {
|
||||||
self.assistant_panel
|
match entry {
|
||||||
.update(cx, |this, cx| {
|
HistoryEntry::Thread(thread) => {
|
||||||
this.delete_thread(&thread.id, cx);
|
self.assistant_panel
|
||||||
})
|
.update(cx, |this, cx| {
|
||||||
.ok();
|
this.delete_thread(&thread.id, cx);
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
HistoryEntry::Context(context) => {
|
||||||
|
self.assistant_panel
|
||||||
|
.update(cx, |this, cx| {
|
||||||
|
this.delete_context(context.path.clone(), cx);
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cx.notify();
|
cx.notify();
|
||||||
}
|
}
|
||||||
@@ -125,7 +156,7 @@ impl Focusable for ThreadHistory {
|
|||||||
|
|
||||||
impl Render for ThreadHistory {
|
impl Render for ThreadHistory {
|
||||||
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||||
let threads = self.thread_store.update(cx, |this, _cx| this.threads());
|
let history_entries = self.history_store.update(cx, |this, cx| this.entries(cx));
|
||||||
let selected_index = self.selected_index;
|
let selected_index = self.selected_index;
|
||||||
|
|
||||||
v_flex()
|
v_flex()
|
||||||
@@ -142,7 +173,7 @@ impl Render for ThreadHistory {
|
|||||||
.on_action(cx.listener(Self::confirm))
|
.on_action(cx.listener(Self::confirm))
|
||||||
.on_action(cx.listener(Self::remove_selected_thread))
|
.on_action(cx.listener(Self::remove_selected_thread))
|
||||||
.map(|history| {
|
.map(|history| {
|
||||||
if threads.is_empty() {
|
if history_entries.is_empty() {
|
||||||
history
|
history
|
||||||
.justify_center()
|
.justify_center()
|
||||||
.child(
|
.child(
|
||||||
@@ -156,17 +187,26 @@ impl Render for ThreadHistory {
|
|||||||
uniform_list(
|
uniform_list(
|
||||||
cx.entity().clone(),
|
cx.entity().clone(),
|
||||||
"thread-history",
|
"thread-history",
|
||||||
threads.len(),
|
history_entries.len(),
|
||||||
move |history, range, _window, _cx| {
|
move |history, range, _window, _cx| {
|
||||||
threads[range]
|
history_entries[range]
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|(index, thread)| {
|
.map(|(index, entry)| {
|
||||||
h_flex().w_full().pb_1().child(PastThread::new(
|
h_flex().w_full().pb_1().child(match entry {
|
||||||
thread.clone(),
|
HistoryEntry::Thread(thread) => PastThread::new(
|
||||||
history.assistant_panel.clone(),
|
thread.clone(),
|
||||||
selected_index == index,
|
history.assistant_panel.clone(),
|
||||||
))
|
selected_index == index,
|
||||||
|
)
|
||||||
|
.into_any_element(),
|
||||||
|
HistoryEntry::Context(context) => PastContext::new(
|
||||||
|
context.clone(),
|
||||||
|
history.assistant_panel.clone(),
|
||||||
|
selected_index == index,
|
||||||
|
)
|
||||||
|
.into_any_element(),
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
},
|
},
|
||||||
@@ -214,18 +254,28 @@ impl RenderOnce for PastThread {
|
|||||||
);
|
);
|
||||||
|
|
||||||
ListItem::new(SharedString::from(self.thread.id.to_string()))
|
ListItem::new(SharedString::from(self.thread.id.to_string()))
|
||||||
.outlined()
|
.rounded()
|
||||||
.toggle_state(self.selected)
|
.toggle_state(self.selected)
|
||||||
.start_slot(
|
|
||||||
Icon::new(IconName::MessageCircle)
|
|
||||||
.size(IconSize::Small)
|
|
||||||
.color(Color::Muted),
|
|
||||||
)
|
|
||||||
.spacing(ListItemSpacing::Sparse)
|
.spacing(ListItemSpacing::Sparse)
|
||||||
.child(Label::new(summary).size(LabelSize::Small).text_ellipsis())
|
.start_slot(
|
||||||
|
div()
|
||||||
|
.max_w_4_5()
|
||||||
|
.child(Label::new(summary).size(LabelSize::Small).text_ellipsis()),
|
||||||
|
)
|
||||||
.end_slot(
|
.end_slot(
|
||||||
h_flex()
|
h_flex()
|
||||||
.gap_1p5()
|
.gap_1p5()
|
||||||
|
.child(
|
||||||
|
Label::new("Thread")
|
||||||
|
.color(Color::Muted)
|
||||||
|
.size(LabelSize::XSmall),
|
||||||
|
)
|
||||||
|
.child(
|
||||||
|
div()
|
||||||
|
.size(px(3.))
|
||||||
|
.rounded_full()
|
||||||
|
.bg(cx.theme().colors().text_disabled),
|
||||||
|
)
|
||||||
.child(
|
.child(
|
||||||
Label::new(thread_timestamp)
|
Label::new(thread_timestamp)
|
||||||
.color(Color::Muted)
|
.color(Color::Muted)
|
||||||
@@ -262,3 +312,100 @@ impl RenderOnce for PastThread {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(IntoElement)]
|
||||||
|
pub struct PastContext {
|
||||||
|
context: SavedContextMetadata,
|
||||||
|
assistant_panel: WeakEntity<AssistantPanel>,
|
||||||
|
selected: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PastContext {
|
||||||
|
pub fn new(
|
||||||
|
context: SavedContextMetadata,
|
||||||
|
assistant_panel: WeakEntity<AssistantPanel>,
|
||||||
|
selected: bool,
|
||||||
|
) -> Self {
|
||||||
|
Self {
|
||||||
|
context,
|
||||||
|
assistant_panel,
|
||||||
|
selected,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RenderOnce for PastContext {
|
||||||
|
fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||||
|
let summary = self.context.title;
|
||||||
|
|
||||||
|
let context_timestamp = time_format::format_localized_timestamp(
|
||||||
|
OffsetDateTime::from_unix_timestamp(self.context.mtime.timestamp()).unwrap(),
|
||||||
|
OffsetDateTime::now_utc(),
|
||||||
|
self.assistant_panel
|
||||||
|
.update(cx, |this, _cx| this.local_timezone())
|
||||||
|
.unwrap_or(UtcOffset::UTC),
|
||||||
|
time_format::TimestampFormat::EnhancedAbsolute,
|
||||||
|
);
|
||||||
|
|
||||||
|
ListItem::new(SharedString::from(
|
||||||
|
self.context.path.to_string_lossy().to_string(),
|
||||||
|
))
|
||||||
|
.rounded()
|
||||||
|
.toggle_state(self.selected)
|
||||||
|
.spacing(ListItemSpacing::Sparse)
|
||||||
|
.start_slot(
|
||||||
|
div()
|
||||||
|
.max_w_4_5()
|
||||||
|
.child(Label::new(summary).size(LabelSize::Small).text_ellipsis()),
|
||||||
|
)
|
||||||
|
.end_slot(
|
||||||
|
h_flex()
|
||||||
|
.gap_1p5()
|
||||||
|
.child(
|
||||||
|
Label::new("Prompt Editor")
|
||||||
|
.color(Color::Muted)
|
||||||
|
.size(LabelSize::XSmall),
|
||||||
|
)
|
||||||
|
.child(
|
||||||
|
div()
|
||||||
|
.size(px(3.))
|
||||||
|
.rounded_full()
|
||||||
|
.bg(cx.theme().colors().text_disabled),
|
||||||
|
)
|
||||||
|
.child(
|
||||||
|
Label::new(context_timestamp)
|
||||||
|
.color(Color::Muted)
|
||||||
|
.size(LabelSize::XSmall),
|
||||||
|
)
|
||||||
|
.child(
|
||||||
|
IconButton::new("delete", IconName::TrashAlt)
|
||||||
|
.shape(IconButtonShape::Square)
|
||||||
|
.icon_size(IconSize::XSmall)
|
||||||
|
.tooltip(Tooltip::text("Delete Prompt Editor"))
|
||||||
|
.on_click({
|
||||||
|
let assistant_panel = self.assistant_panel.clone();
|
||||||
|
let path = self.context.path.clone();
|
||||||
|
move |_event, _window, cx| {
|
||||||
|
assistant_panel
|
||||||
|
.update(cx, |this, cx| {
|
||||||
|
this.delete_context(path.clone(), cx);
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.on_click({
|
||||||
|
let assistant_panel = self.assistant_panel.clone();
|
||||||
|
let path = self.context.path.clone();
|
||||||
|
move |_event, window, cx| {
|
||||||
|
assistant_panel
|
||||||
|
.update(cx, |this, cx| {
|
||||||
|
this.open_saved_prompt_editor(path.clone(), window, cx)
|
||||||
|
.detach_and_log_err(cx);
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ use context_server::manager::ContextServerManager;
|
|||||||
use context_server::{ContextServerFactoryRegistry, ContextServerTool};
|
use context_server::{ContextServerFactoryRegistry, ContextServerTool};
|
||||||
use futures::future::{self, BoxFuture, Shared};
|
use futures::future::{self, BoxFuture, Shared};
|
||||||
use futures::FutureExt as _;
|
use futures::FutureExt as _;
|
||||||
use gpui::{prelude::*, App, BackgroundExecutor, Context, Entity, SharedString, Task};
|
use gpui::{
|
||||||
|
prelude::*, App, BackgroundExecutor, Context, Entity, Global, ReadGlobal, SharedString, Task,
|
||||||
|
};
|
||||||
use heed::types::SerdeBincode;
|
use heed::types::SerdeBincode;
|
||||||
use heed::Database;
|
use heed::Database;
|
||||||
use language_model::Role;
|
use language_model::Role;
|
||||||
@@ -19,6 +21,10 @@ use util::ResultExt as _;
|
|||||||
|
|
||||||
use crate::thread::{MessageId, Thread, ThreadId};
|
use crate::thread::{MessageId, Thread, ThreadId};
|
||||||
|
|
||||||
|
pub fn init(cx: &mut App) {
|
||||||
|
ThreadsDatabase::init(cx);
|
||||||
|
}
|
||||||
|
|
||||||
pub struct ThreadStore {
|
pub struct ThreadStore {
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
project: Entity<Project>,
|
project: Entity<Project>,
|
||||||
@@ -26,7 +32,6 @@ pub struct ThreadStore {
|
|||||||
context_server_manager: Entity<ContextServerManager>,
|
context_server_manager: Entity<ContextServerManager>,
|
||||||
context_server_tool_ids: HashMap<Arc<str>, Vec<ToolId>>,
|
context_server_tool_ids: HashMap<Arc<str>, Vec<ToolId>>,
|
||||||
threads: Vec<SavedThreadMetadata>,
|
threads: Vec<SavedThreadMetadata>,
|
||||||
database_future: Shared<BoxFuture<'static, Result<Arc<ThreadsDatabase>, Arc<anyhow::Error>>>>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ThreadStore {
|
impl ThreadStore {
|
||||||
@@ -41,24 +46,12 @@ impl ThreadStore {
|
|||||||
ContextServerManager::new(context_server_factory_registry, project.clone(), cx)
|
ContextServerManager::new(context_server_factory_registry, project.clone(), cx)
|
||||||
});
|
});
|
||||||
|
|
||||||
let executor = cx.background_executor().clone();
|
|
||||||
let database_future = executor
|
|
||||||
.spawn({
|
|
||||||
let executor = executor.clone();
|
|
||||||
let database_path = paths::support_dir().join("threads/threads-db.0.mdb");
|
|
||||||
async move { ThreadsDatabase::new(database_path, executor) }
|
|
||||||
})
|
|
||||||
.then(|result| future::ready(result.map(Arc::new).map_err(Arc::new)))
|
|
||||||
.boxed()
|
|
||||||
.shared();
|
|
||||||
|
|
||||||
let this = Self {
|
let this = Self {
|
||||||
project,
|
project,
|
||||||
tools,
|
tools,
|
||||||
context_server_manager,
|
context_server_manager,
|
||||||
context_server_tool_ids: HashMap::default(),
|
context_server_tool_ids: HashMap::default(),
|
||||||
threads: Vec::new(),
|
threads: Vec::new(),
|
||||||
database_future,
|
|
||||||
};
|
};
|
||||||
this.register_context_server_handlers(cx);
|
this.register_context_server_handlers(cx);
|
||||||
this.reload(cx).detach_and_log_err(cx);
|
this.reload(cx).detach_and_log_err(cx);
|
||||||
@@ -94,7 +87,7 @@ impl ThreadStore {
|
|||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) -> Task<Result<Entity<Thread>>> {
|
) -> Task<Result<Entity<Thread>>> {
|
||||||
let id = id.clone();
|
let id = id.clone();
|
||||||
let database_future = self.database_future.clone();
|
let database_future = ThreadsDatabase::global_future(cx);
|
||||||
cx.spawn(|this, mut cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
let database = database_future.await.map_err(|err| anyhow!(err))?;
|
let database = database_future.await.map_err(|err| anyhow!(err))?;
|
||||||
let thread = database
|
let thread = database
|
||||||
@@ -127,7 +120,7 @@ impl ThreadStore {
|
|||||||
(id, thread)
|
(id, thread)
|
||||||
});
|
});
|
||||||
|
|
||||||
let database_future = self.database_future.clone();
|
let database_future = ThreadsDatabase::global_future(cx);
|
||||||
cx.spawn(|this, mut cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
let database = database_future.await.map_err(|err| anyhow!(err))?;
|
let database = database_future.await.map_err(|err| anyhow!(err))?;
|
||||||
database.save_thread(metadata, thread).await?;
|
database.save_thread(metadata, thread).await?;
|
||||||
@@ -138,7 +131,7 @@ impl ThreadStore {
|
|||||||
|
|
||||||
pub fn delete_thread(&mut self, id: &ThreadId, cx: &mut Context<Self>) -> Task<Result<()>> {
|
pub fn delete_thread(&mut self, id: &ThreadId, cx: &mut Context<Self>) -> Task<Result<()>> {
|
||||||
let id = id.clone();
|
let id = id.clone();
|
||||||
let database_future = self.database_future.clone();
|
let database_future = ThreadsDatabase::global_future(cx);
|
||||||
cx.spawn(|this, mut cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
let database = database_future.await.map_err(|err| anyhow!(err))?;
|
let database = database_future.await.map_err(|err| anyhow!(err))?;
|
||||||
database.delete_thread(id.clone()).await?;
|
database.delete_thread(id.clone()).await?;
|
||||||
@@ -149,8 +142,8 @@ impl ThreadStore {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn reload(&self, cx: &mut Context<Self>) -> Task<Result<()>> {
|
pub fn reload(&self, cx: &mut Context<Self>) -> Task<Result<()>> {
|
||||||
let database_future = self.database_future.clone();
|
let database_future = ThreadsDatabase::global_future(cx);
|
||||||
cx.spawn(|this, mut cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
let threads = database_future
|
let threads = database_future
|
||||||
.await
|
.await
|
||||||
@@ -253,13 +246,40 @@ pub struct SavedMessage {
|
|||||||
pub text: String,
|
pub text: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ThreadsDatabase {
|
struct GlobalThreadsDatabase(
|
||||||
|
Shared<BoxFuture<'static, Result<Arc<ThreadsDatabase>, Arc<anyhow::Error>>>>,
|
||||||
|
);
|
||||||
|
|
||||||
|
impl Global for GlobalThreadsDatabase {}
|
||||||
|
|
||||||
|
pub(crate) struct ThreadsDatabase {
|
||||||
executor: BackgroundExecutor,
|
executor: BackgroundExecutor,
|
||||||
env: heed::Env,
|
env: heed::Env,
|
||||||
threads: Database<SerdeBincode<ThreadId>, SerdeBincode<SavedThread>>,
|
threads: Database<SerdeBincode<ThreadId>, SerdeBincode<SavedThread>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ThreadsDatabase {
|
impl ThreadsDatabase {
|
||||||
|
fn global_future(
|
||||||
|
cx: &mut App,
|
||||||
|
) -> Shared<BoxFuture<'static, Result<Arc<ThreadsDatabase>, Arc<anyhow::Error>>>> {
|
||||||
|
GlobalThreadsDatabase::global(cx).0.clone()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn init(cx: &mut App) {
|
||||||
|
let executor = cx.background_executor().clone();
|
||||||
|
let database_future = executor
|
||||||
|
.spawn({
|
||||||
|
let executor = executor.clone();
|
||||||
|
let database_path = paths::support_dir().join("threads/threads-db.0.mdb");
|
||||||
|
async move { ThreadsDatabase::new(database_path, executor) }
|
||||||
|
})
|
||||||
|
.then(|result| future::ready(result.map(Arc::new).map_err(Arc::new)))
|
||||||
|
.boxed()
|
||||||
|
.shared();
|
||||||
|
|
||||||
|
cx.set_global(GlobalThreadsDatabase(database_future));
|
||||||
|
}
|
||||||
|
|
||||||
pub fn new(path: PathBuf, executor: BackgroundExecutor) -> Result<Self> {
|
pub fn new(path: PathBuf, executor: BackgroundExecutor) -> Result<Self> {
|
||||||
std::fs::create_dir_all(&path)?;
|
std::fs::create_dir_all(&path)?;
|
||||||
|
|
||||||
|
|||||||
221
crates/assistant2/src/tool_use.rs
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use anyhow::Result;
|
||||||
|
use collections::HashMap;
|
||||||
|
use futures::future::Shared;
|
||||||
|
use futures::FutureExt as _;
|
||||||
|
use gpui::{SharedString, Task};
|
||||||
|
use language_model::{
|
||||||
|
LanguageModelRequestMessage, LanguageModelToolResult, LanguageModelToolUse,
|
||||||
|
LanguageModelToolUseId, MessageContent,
|
||||||
|
};
|
||||||
|
|
||||||
|
use crate::thread::MessageId;
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct ToolUse {
|
||||||
|
pub id: LanguageModelToolUseId,
|
||||||
|
pub name: SharedString,
|
||||||
|
pub status: ToolUseStatus,
|
||||||
|
pub input: serde_json::Value,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub enum ToolUseStatus {
|
||||||
|
Pending,
|
||||||
|
Running,
|
||||||
|
Finished(SharedString),
|
||||||
|
Error(SharedString),
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
pub struct ToolUseState {
|
||||||
|
tool_uses_by_assistant_message: HashMap<MessageId, Vec<LanguageModelToolUse>>,
|
||||||
|
tool_uses_by_user_message: HashMap<MessageId, Vec<LanguageModelToolUseId>>,
|
||||||
|
tool_results: HashMap<LanguageModelToolUseId, LanguageModelToolResult>,
|
||||||
|
pending_tool_uses_by_id: HashMap<LanguageModelToolUseId, PendingToolUse>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToolUseState {
|
||||||
|
pub fn pending_tool_uses(&self) -> Vec<&PendingToolUse> {
|
||||||
|
self.pending_tool_uses_by_id.values().collect()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn tool_uses_for_message(&self, id: MessageId) -> Vec<ToolUse> {
|
||||||
|
let Some(tool_uses_for_message) = &self.tool_uses_by_assistant_message.get(&id) else {
|
||||||
|
return Vec::new();
|
||||||
|
};
|
||||||
|
|
||||||
|
let mut tool_uses = Vec::new();
|
||||||
|
|
||||||
|
for tool_use in tool_uses_for_message.iter() {
|
||||||
|
let tool_result = self.tool_results.get(&tool_use.id);
|
||||||
|
|
||||||
|
let status = (|| {
|
||||||
|
if let Some(tool_result) = tool_result {
|
||||||
|
return if tool_result.is_error {
|
||||||
|
ToolUseStatus::Error(tool_result.content.clone().into())
|
||||||
|
} else {
|
||||||
|
ToolUseStatus::Finished(tool_result.content.clone().into())
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if let Some(pending_tool_use) = self.pending_tool_uses_by_id.get(&tool_use.id) {
|
||||||
|
return match pending_tool_use.status {
|
||||||
|
PendingToolUseStatus::Idle => ToolUseStatus::Pending,
|
||||||
|
PendingToolUseStatus::Running { .. } => ToolUseStatus::Running,
|
||||||
|
PendingToolUseStatus::Error(ref err) => {
|
||||||
|
ToolUseStatus::Error(err.clone().into())
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolUseStatus::Pending
|
||||||
|
})();
|
||||||
|
|
||||||
|
tool_uses.push(ToolUse {
|
||||||
|
id: tool_use.id.clone(),
|
||||||
|
name: tool_use.name.clone().into(),
|
||||||
|
input: tool_use.input.clone(),
|
||||||
|
status,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
tool_uses
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn message_has_tool_results(&self, message_id: MessageId) -> bool {
|
||||||
|
self.tool_uses_by_user_message
|
||||||
|
.get(&message_id)
|
||||||
|
.map_or(false, |results| !results.is_empty())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn request_tool_use(
|
||||||
|
&mut self,
|
||||||
|
assistant_message_id: MessageId,
|
||||||
|
tool_use: LanguageModelToolUse,
|
||||||
|
) {
|
||||||
|
self.tool_uses_by_assistant_message
|
||||||
|
.entry(assistant_message_id)
|
||||||
|
.or_default()
|
||||||
|
.push(tool_use.clone());
|
||||||
|
|
||||||
|
// The tool use is being requested by the Assistant, so we want to
|
||||||
|
// attach the tool results to the next user message.
|
||||||
|
let next_user_message_id = MessageId(assistant_message_id.0 + 1);
|
||||||
|
self.tool_uses_by_user_message
|
||||||
|
.entry(next_user_message_id)
|
||||||
|
.or_default()
|
||||||
|
.push(tool_use.id.clone());
|
||||||
|
|
||||||
|
self.pending_tool_uses_by_id.insert(
|
||||||
|
tool_use.id.clone(),
|
||||||
|
PendingToolUse {
|
||||||
|
assistant_message_id,
|
||||||
|
id: tool_use.id,
|
||||||
|
name: tool_use.name,
|
||||||
|
input: tool_use.input,
|
||||||
|
status: PendingToolUseStatus::Idle,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn run_pending_tool(&mut self, tool_use_id: LanguageModelToolUseId, task: Task<()>) {
|
||||||
|
if let Some(tool_use) = self.pending_tool_uses_by_id.get_mut(&tool_use_id) {
|
||||||
|
tool_use.status = PendingToolUseStatus::Running {
|
||||||
|
_task: task.shared(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn insert_tool_output(
|
||||||
|
&mut self,
|
||||||
|
tool_use_id: LanguageModelToolUseId,
|
||||||
|
output: Result<String>,
|
||||||
|
) {
|
||||||
|
match output {
|
||||||
|
Ok(output) => {
|
||||||
|
self.tool_results.insert(
|
||||||
|
tool_use_id.clone(),
|
||||||
|
LanguageModelToolResult {
|
||||||
|
tool_use_id: tool_use_id.clone(),
|
||||||
|
content: output.into(),
|
||||||
|
is_error: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
self.pending_tool_uses_by_id.remove(&tool_use_id);
|
||||||
|
}
|
||||||
|
Err(err) => {
|
||||||
|
self.tool_results.insert(
|
||||||
|
tool_use_id.clone(),
|
||||||
|
LanguageModelToolResult {
|
||||||
|
tool_use_id: tool_use_id.clone(),
|
||||||
|
content: err.to_string().into(),
|
||||||
|
is_error: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
if let Some(tool_use) = self.pending_tool_uses_by_id.get_mut(&tool_use_id) {
|
||||||
|
tool_use.status = PendingToolUseStatus::Error(err.to_string().into());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn attach_tool_uses(
|
||||||
|
&self,
|
||||||
|
message_id: MessageId,
|
||||||
|
request_message: &mut LanguageModelRequestMessage,
|
||||||
|
) {
|
||||||
|
if let Some(tool_uses) = self.tool_uses_by_assistant_message.get(&message_id) {
|
||||||
|
for tool_use in tool_uses {
|
||||||
|
request_message
|
||||||
|
.content
|
||||||
|
.push(MessageContent::ToolUse(tool_use.clone()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn attach_tool_results(
|
||||||
|
&self,
|
||||||
|
message_id: MessageId,
|
||||||
|
request_message: &mut LanguageModelRequestMessage,
|
||||||
|
) {
|
||||||
|
if let Some(tool_uses) = self.tool_uses_by_user_message.get(&message_id) {
|
||||||
|
for tool_use_id in tool_uses {
|
||||||
|
if let Some(tool_result) = self.tool_results.get(tool_use_id) {
|
||||||
|
request_message
|
||||||
|
.content
|
||||||
|
.push(MessageContent::ToolResult(tool_result.clone()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct PendingToolUse {
|
||||||
|
pub id: LanguageModelToolUseId,
|
||||||
|
/// The ID of the Assistant message in which the tool use was requested.
|
||||||
|
pub assistant_message_id: MessageId,
|
||||||
|
pub name: Arc<str>,
|
||||||
|
pub input: serde_json::Value,
|
||||||
|
pub status: PendingToolUseStatus,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub enum PendingToolUseStatus {
|
||||||
|
Idle,
|
||||||
|
Running { _task: Shared<Task<()>> },
|
||||||
|
Error(#[allow(unused)] Arc<str>),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PendingToolUseStatus {
|
||||||
|
pub fn is_idle(&self) -> bool {
|
||||||
|
matches!(self, PendingToolUseStatus::Idle)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn is_error(&self) -> bool {
|
||||||
|
matches!(self, PendingToolUseStatus::Error(_))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,14 +16,12 @@ anyhow.workspace = true
|
|||||||
assistant_settings.workspace = true
|
assistant_settings.workspace = true
|
||||||
assistant_slash_command.workspace = true
|
assistant_slash_command.workspace = true
|
||||||
assistant_slash_commands.workspace = true
|
assistant_slash_commands.workspace = true
|
||||||
assistant_tool.workspace = true
|
|
||||||
chrono.workspace = true
|
chrono.workspace = true
|
||||||
client.workspace = true
|
client.workspace = true
|
||||||
clock.workspace = true
|
clock.workspace = true
|
||||||
collections.workspace = true
|
collections.workspace = true
|
||||||
context_server.workspace = true
|
context_server.workspace = true
|
||||||
editor.workspace = true
|
editor.workspace = true
|
||||||
feature_flags.workspace = true
|
|
||||||
fs.workspace = true
|
fs.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
fuzzy.workspace = true
|
fuzzy.workspace = true
|
||||||
@@ -32,7 +30,6 @@ indexed_docs.workspace = true
|
|||||||
language.workspace = true
|
language.workspace = true
|
||||||
language_model.workspace = true
|
language_model.workspace = true
|
||||||
language_model_selector.workspace = true
|
language_model_selector.workspace = true
|
||||||
language_models.workspace = true
|
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
multi_buffer.workspace = true
|
multi_buffer.workspace = true
|
||||||
open_ai.workspace = true
|
open_ai.workspace = true
|
||||||
|
|||||||
@@ -8,11 +8,9 @@ use assistant_slash_command::{
|
|||||||
SlashCommandResult, SlashCommandWorkingSet,
|
SlashCommandResult, SlashCommandWorkingSet,
|
||||||
};
|
};
|
||||||
use assistant_slash_commands::FileCommandMetadata;
|
use assistant_slash_commands::FileCommandMetadata;
|
||||||
use assistant_tool::ToolWorkingSet;
|
|
||||||
use client::{self, proto, telemetry::Telemetry};
|
use client::{self, proto, telemetry::Telemetry};
|
||||||
use clock::ReplicaId;
|
use clock::ReplicaId;
|
||||||
use collections::{HashMap, HashSet};
|
use collections::{HashMap, HashSet};
|
||||||
use feature_flags::{FeatureFlagAppExt, ToolUseFeatureFlag};
|
|
||||||
use fs::{Fs, RemoveOptions};
|
use fs::{Fs, RemoveOptions};
|
||||||
use futures::{future::Shared, FutureExt, StreamExt};
|
use futures::{future::Shared, FutureExt, StreamExt};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
@@ -21,14 +19,10 @@ use gpui::{
|
|||||||
};
|
};
|
||||||
use language::{AnchorRangeExt, Bias, Buffer, LanguageRegistry, OffsetRangeExt, Point, ToOffset};
|
use language::{AnchorRangeExt, Bias, Buffer, LanguageRegistry, OffsetRangeExt, Point, ToOffset};
|
||||||
use language_model::{
|
use language_model::{
|
||||||
LanguageModel, LanguageModelCacheConfiguration, LanguageModelCompletionEvent,
|
report_assistant_event, LanguageModel, LanguageModelCacheConfiguration,
|
||||||
LanguageModelImage, LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage,
|
LanguageModelCompletionEvent, LanguageModelImage, LanguageModelRegistry, LanguageModelRequest,
|
||||||
LanguageModelRequestTool, LanguageModelToolResult, LanguageModelToolUse,
|
LanguageModelRequestMessage, LanguageModelToolUseId, MaxMonthlySpendReachedError,
|
||||||
LanguageModelToolUseId, MessageContent, Role, StopReason,
|
MessageContent, PaymentRequiredError, Role, StopReason,
|
||||||
};
|
|
||||||
use language_models::{
|
|
||||||
provider::cloud::{MaxMonthlySpendReachedError, PaymentRequiredError},
|
|
||||||
report_assistant_event,
|
|
||||||
};
|
};
|
||||||
use open_ai::Model as OpenAiModel;
|
use open_ai::Model as OpenAiModel;
|
||||||
use paths::contexts_dir;
|
use paths::contexts_dir;
|
||||||
@@ -438,11 +432,6 @@ pub enum ContextEvent {
|
|||||||
SlashCommandOutputSectionAdded {
|
SlashCommandOutputSectionAdded {
|
||||||
section: SlashCommandOutputSection<language::Anchor>,
|
section: SlashCommandOutputSection<language::Anchor>,
|
||||||
},
|
},
|
||||||
UsePendingTools,
|
|
||||||
ToolFinished {
|
|
||||||
tool_use_id: LanguageModelToolUseId,
|
|
||||||
output_range: Range<language::Anchor>,
|
|
||||||
},
|
|
||||||
Operation(ContextOperation),
|
Operation(ContextOperation),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -528,21 +517,12 @@ pub enum Content {
|
|||||||
render_image: Arc<RenderImage>,
|
render_image: Arc<RenderImage>,
|
||||||
image: Shared<Task<Option<LanguageModelImage>>>,
|
image: Shared<Task<Option<LanguageModelImage>>>,
|
||||||
},
|
},
|
||||||
ToolUse {
|
|
||||||
range: Range<language::Anchor>,
|
|
||||||
tool_use: LanguageModelToolUse,
|
|
||||||
},
|
|
||||||
ToolResult {
|
|
||||||
range: Range<language::Anchor>,
|
|
||||||
tool_use_id: LanguageModelToolUseId,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Content {
|
impl Content {
|
||||||
fn range(&self) -> Range<language::Anchor> {
|
fn range(&self) -> Range<language::Anchor> {
|
||||||
match self {
|
match self {
|
||||||
Self::Image { anchor, .. } => *anchor..*anchor,
|
Self::Image { anchor, .. } => *anchor..*anchor,
|
||||||
Self::ToolUse { range, .. } | Self::ToolResult { range, .. } => range.clone(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -599,9 +579,7 @@ pub struct AssistantContext {
|
|||||||
invoked_slash_commands: HashMap<InvokedSlashCommandId, InvokedSlashCommand>,
|
invoked_slash_commands: HashMap<InvokedSlashCommandId, InvokedSlashCommand>,
|
||||||
edits_since_last_parse: language::Subscription,
|
edits_since_last_parse: language::Subscription,
|
||||||
slash_commands: Arc<SlashCommandWorkingSet>,
|
slash_commands: Arc<SlashCommandWorkingSet>,
|
||||||
tools: Arc<ToolWorkingSet>,
|
|
||||||
slash_command_output_sections: Vec<SlashCommandOutputSection<language::Anchor>>,
|
slash_command_output_sections: Vec<SlashCommandOutputSection<language::Anchor>>,
|
||||||
pending_tool_uses_by_id: HashMap<LanguageModelToolUseId, PendingToolUse>,
|
|
||||||
message_anchors: Vec<MessageAnchor>,
|
message_anchors: Vec<MessageAnchor>,
|
||||||
contents: Vec<Content>,
|
contents: Vec<Content>,
|
||||||
messages_metadata: HashMap<MessageId, MessageMetadata>,
|
messages_metadata: HashMap<MessageId, MessageMetadata>,
|
||||||
@@ -654,7 +632,6 @@ impl AssistantContext {
|
|||||||
telemetry: Option<Arc<Telemetry>>,
|
telemetry: Option<Arc<Telemetry>>,
|
||||||
prompt_builder: Arc<PromptBuilder>,
|
prompt_builder: Arc<PromptBuilder>,
|
||||||
slash_commands: Arc<SlashCommandWorkingSet>,
|
slash_commands: Arc<SlashCommandWorkingSet>,
|
||||||
tools: Arc<ToolWorkingSet>,
|
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self::new(
|
Self::new(
|
||||||
@@ -664,7 +641,6 @@ impl AssistantContext {
|
|||||||
language_registry,
|
language_registry,
|
||||||
prompt_builder,
|
prompt_builder,
|
||||||
slash_commands,
|
slash_commands,
|
||||||
tools,
|
|
||||||
project,
|
project,
|
||||||
telemetry,
|
telemetry,
|
||||||
cx,
|
cx,
|
||||||
@@ -679,7 +655,6 @@ impl AssistantContext {
|
|||||||
language_registry: Arc<LanguageRegistry>,
|
language_registry: Arc<LanguageRegistry>,
|
||||||
prompt_builder: Arc<PromptBuilder>,
|
prompt_builder: Arc<PromptBuilder>,
|
||||||
slash_commands: Arc<SlashCommandWorkingSet>,
|
slash_commands: Arc<SlashCommandWorkingSet>,
|
||||||
tools: Arc<ToolWorkingSet>,
|
|
||||||
project: Option<Entity<Project>>,
|
project: Option<Entity<Project>>,
|
||||||
telemetry: Option<Arc<Telemetry>>,
|
telemetry: Option<Arc<Telemetry>>,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
@@ -707,7 +682,6 @@ impl AssistantContext {
|
|||||||
messages_metadata: Default::default(),
|
messages_metadata: Default::default(),
|
||||||
parsed_slash_commands: Vec::new(),
|
parsed_slash_commands: Vec::new(),
|
||||||
invoked_slash_commands: HashMap::default(),
|
invoked_slash_commands: HashMap::default(),
|
||||||
pending_tool_uses_by_id: HashMap::default(),
|
|
||||||
slash_command_output_sections: Vec::new(),
|
slash_command_output_sections: Vec::new(),
|
||||||
edits_since_last_parse: edits_since_last_slash_command_parse,
|
edits_since_last_parse: edits_since_last_slash_command_parse,
|
||||||
summary: None,
|
summary: None,
|
||||||
@@ -725,7 +699,6 @@ impl AssistantContext {
|
|||||||
project,
|
project,
|
||||||
language_registry,
|
language_registry,
|
||||||
slash_commands,
|
slash_commands,
|
||||||
tools,
|
|
||||||
patches: Vec::new(),
|
patches: Vec::new(),
|
||||||
xml_tags: Vec::new(),
|
xml_tags: Vec::new(),
|
||||||
prompt_builder,
|
prompt_builder,
|
||||||
@@ -802,7 +775,6 @@ impl AssistantContext {
|
|||||||
language_registry: Arc<LanguageRegistry>,
|
language_registry: Arc<LanguageRegistry>,
|
||||||
prompt_builder: Arc<PromptBuilder>,
|
prompt_builder: Arc<PromptBuilder>,
|
||||||
slash_commands: Arc<SlashCommandWorkingSet>,
|
slash_commands: Arc<SlashCommandWorkingSet>,
|
||||||
tools: Arc<ToolWorkingSet>,
|
|
||||||
project: Option<Entity<Project>>,
|
project: Option<Entity<Project>>,
|
||||||
telemetry: Option<Arc<Telemetry>>,
|
telemetry: Option<Arc<Telemetry>>,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
@@ -815,7 +787,6 @@ impl AssistantContext {
|
|||||||
language_registry,
|
language_registry,
|
||||||
prompt_builder,
|
prompt_builder,
|
||||||
slash_commands,
|
slash_commands,
|
||||||
tools,
|
|
||||||
project,
|
project,
|
||||||
telemetry,
|
telemetry,
|
||||||
cx,
|
cx,
|
||||||
@@ -848,10 +819,6 @@ impl AssistantContext {
|
|||||||
&self.slash_commands
|
&self.slash_commands
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn tools(&self) -> &Arc<ToolWorkingSet> {
|
|
||||||
&self.tools
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn set_capability(&mut self, capability: language::Capability, cx: &mut Context<Self>) {
|
pub fn set_capability(&mut self, capability: language::Capability, cx: &mut Context<Self>) {
|
||||||
self.buffer
|
self.buffer
|
||||||
.update(cx, |buffer, cx| buffer.set_capability(capability, cx));
|
.update(cx, |buffer, cx| buffer.set_capability(capability, cx));
|
||||||
@@ -881,7 +848,7 @@ impl AssistantContext {
|
|||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
context_ops.extend(self.pending_ops.iter().cloned());
|
context_ops.extend(self.pending_ops.iter().cloned());
|
||||||
|
|
||||||
cx.background_executor().spawn(async move {
|
cx.background_spawn(async move {
|
||||||
let buffer_ops = buffer_ops.await;
|
let buffer_ops = buffer_ops.await;
|
||||||
context_ops.sort_unstable_by_key(|op| op.timestamp());
|
context_ops.sort_unstable_by_key(|op| op.timestamp());
|
||||||
buffer_ops
|
buffer_ops
|
||||||
@@ -1177,14 +1144,6 @@ impl AssistantContext {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn pending_tool_uses(&self) -> Vec<&PendingToolUse> {
|
|
||||||
self.pending_tool_uses_by_id.values().collect()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_tool_use_by_id(&self, id: &LanguageModelToolUseId) -> Option<&PendingToolUse> {
|
|
||||||
self.pending_tool_uses_by_id.get(id)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_language(&mut self, cx: &mut Context<Self>) {
|
fn set_language(&mut self, cx: &mut Context<Self>) {
|
||||||
let markdown = self.language_registry.language_for_name("Markdown");
|
let markdown = self.language_registry.language_for_name("Markdown");
|
||||||
cx.spawn(|this, mut cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
@@ -1230,11 +1189,14 @@ impl AssistantContext {
|
|||||||
let Some(model) = LanguageModelRegistry::read_global(cx).active_model() else {
|
let Some(model) = LanguageModelRegistry::read_global(cx).active_model() else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
let debounce = self.token_count.is_some();
|
||||||
self.pending_token_count = cx.spawn(|this, mut cx| {
|
self.pending_token_count = cx.spawn(|this, mut cx| {
|
||||||
async move {
|
async move {
|
||||||
cx.background_executor()
|
if debounce {
|
||||||
.timer(Duration::from_millis(200))
|
cx.background_executor()
|
||||||
.await;
|
.timer(Duration::from_millis(200))
|
||||||
|
.await;
|
||||||
|
}
|
||||||
|
|
||||||
let token_count = cx.update(|cx| model.count_tokens(request, cx))?.await?;
|
let token_count = cx.update(|cx| model.count_tokens(request, cx))?.await?;
|
||||||
this.update(&mut cx, |this, cx| {
|
this.update(&mut cx, |this, cx| {
|
||||||
@@ -2206,68 +2168,6 @@ impl AssistantContext {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn insert_tool_output(
|
|
||||||
&mut self,
|
|
||||||
tool_use_id: LanguageModelToolUseId,
|
|
||||||
output: Task<Result<String>>,
|
|
||||||
cx: &mut Context<Self>,
|
|
||||||
) {
|
|
||||||
let insert_output_task = cx.spawn(|this, mut cx| {
|
|
||||||
let tool_use_id = tool_use_id.clone();
|
|
||||||
async move {
|
|
||||||
let output = output.await;
|
|
||||||
this.update(&mut cx, |this, cx| match output {
|
|
||||||
Ok(mut output) => {
|
|
||||||
const NEWLINE: char = '\n';
|
|
||||||
|
|
||||||
if !output.ends_with(NEWLINE) {
|
|
||||||
output.push(NEWLINE);
|
|
||||||
}
|
|
||||||
|
|
||||||
let anchor_range = this.buffer.update(cx, |buffer, cx| {
|
|
||||||
let insert_start = buffer.len().to_offset(buffer);
|
|
||||||
let insert_end = insert_start;
|
|
||||||
|
|
||||||
let start = insert_start;
|
|
||||||
let end = start + output.len() - NEWLINE.len_utf8();
|
|
||||||
|
|
||||||
buffer.edit([(insert_start..insert_end, output)], None, cx);
|
|
||||||
|
|
||||||
let output_range = buffer.anchor_after(start)..buffer.anchor_after(end);
|
|
||||||
|
|
||||||
output_range
|
|
||||||
});
|
|
||||||
|
|
||||||
this.insert_content(
|
|
||||||
Content::ToolResult {
|
|
||||||
range: anchor_range.clone(),
|
|
||||||
tool_use_id: tool_use_id.clone(),
|
|
||||||
},
|
|
||||||
cx,
|
|
||||||
);
|
|
||||||
|
|
||||||
cx.emit(ContextEvent::ToolFinished {
|
|
||||||
tool_use_id,
|
|
||||||
output_range: anchor_range,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Err(err) => {
|
|
||||||
if let Some(tool_use) = this.pending_tool_uses_by_id.get_mut(&tool_use_id) {
|
|
||||||
tool_use.status = PendingToolUseStatus::Error(err.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.ok();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if let Some(tool_use) = self.pending_tool_uses_by_id.get_mut(&tool_use_id) {
|
|
||||||
tool_use.status = PendingToolUseStatus::Running {
|
|
||||||
_task: insert_output_task.shared(),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn completion_provider_changed(&mut self, cx: &mut Context<Self>) {
|
pub fn completion_provider_changed(&mut self, cx: &mut Context<Self>) {
|
||||||
self.count_remaining_tokens(cx);
|
self.count_remaining_tokens(cx);
|
||||||
}
|
}
|
||||||
@@ -2298,23 +2198,7 @@ impl AssistantContext {
|
|||||||
// Compute which messages to cache, including the last one.
|
// Compute which messages to cache, including the last one.
|
||||||
self.mark_cache_anchors(&model.cache_configuration(), false, cx);
|
self.mark_cache_anchors(&model.cache_configuration(), false, cx);
|
||||||
|
|
||||||
let mut request = self.to_completion_request(request_type, cx);
|
let request = self.to_completion_request(request_type, cx);
|
||||||
|
|
||||||
// Don't attach tools for now; we'll be removing tool use from
|
|
||||||
// Assistant1 shortly.
|
|
||||||
#[allow(clippy::overly_complex_bool_expr)]
|
|
||||||
if false && cx.has_flag::<ToolUseFeatureFlag>() {
|
|
||||||
request.tools = self
|
|
||||||
.tools
|
|
||||||
.tools(cx)
|
|
||||||
.into_iter()
|
|
||||||
.map(|tool| LanguageModelRequestTool {
|
|
||||||
name: tool.name(),
|
|
||||||
description: tool.description(),
|
|
||||||
input_schema: tool.input_schema(),
|
|
||||||
})
|
|
||||||
.collect();
|
|
||||||
}
|
|
||||||
|
|
||||||
let assistant_message = self
|
let assistant_message = self
|
||||||
.insert_message_after(last_message_id, Role::Assistant, MessageStatus::Pending, cx)
|
.insert_message_after(last_message_id, Role::Assistant, MessageStatus::Pending, cx)
|
||||||
@@ -2371,44 +2255,7 @@ impl AssistantContext {
|
|||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
LanguageModelCompletionEvent::ToolUse(tool_use) => {
|
LanguageModelCompletionEvent::ToolUse(_) => {}
|
||||||
const NEWLINE: char = '\n';
|
|
||||||
|
|
||||||
let mut text = String::new();
|
|
||||||
text.push(NEWLINE);
|
|
||||||
text.push_str(
|
|
||||||
&serde_json::to_string_pretty(&tool_use)
|
|
||||||
.expect("failed to serialize tool use to JSON"),
|
|
||||||
);
|
|
||||||
text.push(NEWLINE);
|
|
||||||
let text_len = text.len();
|
|
||||||
|
|
||||||
buffer.edit(
|
|
||||||
[(
|
|
||||||
message_old_end_offset..message_old_end_offset,
|
|
||||||
text,
|
|
||||||
)],
|
|
||||||
None,
|
|
||||||
cx,
|
|
||||||
);
|
|
||||||
|
|
||||||
let start_ix = message_old_end_offset + NEWLINE.len_utf8();
|
|
||||||
let end_ix =
|
|
||||||
message_old_end_offset + text_len - NEWLINE.len_utf8();
|
|
||||||
let source_range = buffer.anchor_after(start_ix)
|
|
||||||
..buffer.anchor_after(end_ix);
|
|
||||||
|
|
||||||
this.pending_tool_uses_by_id.insert(
|
|
||||||
tool_use.id.clone(),
|
|
||||||
PendingToolUse {
|
|
||||||
id: tool_use.id,
|
|
||||||
name: tool_use.name,
|
|
||||||
input: tool_use.input,
|
|
||||||
status: PendingToolUseStatus::Idle,
|
|
||||||
source_range,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -2491,9 +2338,7 @@ impl AssistantContext {
|
|||||||
|
|
||||||
if let Ok(stop_reason) = result {
|
if let Ok(stop_reason) = result {
|
||||||
match stop_reason {
|
match stop_reason {
|
||||||
StopReason::ToolUse => {
|
StopReason::ToolUse => {}
|
||||||
cx.emit(ContextEvent::UsePendingTools);
|
|
||||||
}
|
|
||||||
StopReason::EndTurn => {}
|
StopReason::EndTurn => {}
|
||||||
StopReason::MaxTokens => {}
|
StopReason::MaxTokens => {}
|
||||||
}
|
}
|
||||||
@@ -2572,23 +2417,6 @@ impl AssistantContext {
|
|||||||
.push(language_model::MessageContent::Image(image));
|
.push(language_model::MessageContent::Image(image));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Content::ToolUse { tool_use, .. } => {
|
|
||||||
request_message
|
|
||||||
.content
|
|
||||||
.push(language_model::MessageContent::ToolUse(tool_use.clone()));
|
|
||||||
}
|
|
||||||
Content::ToolResult { tool_use_id, .. } => {
|
|
||||||
request_message.content.push(
|
|
||||||
language_model::MessageContent::ToolResult(
|
|
||||||
LanguageModelToolResult {
|
|
||||||
tool_use_id: tool_use_id.to_string(),
|
|
||||||
is_error: false,
|
|
||||||
content: collect_text_content(buffer, range.clone())
|
|
||||||
.unwrap_or_default(),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
offset = range.end;
|
offset = range.end;
|
||||||
@@ -3535,7 +3363,7 @@ impl SavedContextV0_1_0 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct SavedContextMetadata {
|
pub struct SavedContextMetadata {
|
||||||
pub title: String,
|
pub title: String,
|
||||||
pub path: PathBuf,
|
pub path: PathBuf,
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ use assistant_slash_command::{
|
|||||||
SlashCommandOutputSection, SlashCommandRegistry, SlashCommandResult, SlashCommandWorkingSet,
|
SlashCommandOutputSection, SlashCommandRegistry, SlashCommandResult, SlashCommandWorkingSet,
|
||||||
};
|
};
|
||||||
use assistant_slash_commands::FileSlashCommand;
|
use assistant_slash_commands::FileSlashCommand;
|
||||||
use assistant_tool::ToolWorkingSet;
|
|
||||||
use collections::{HashMap, HashSet};
|
use collections::{HashMap, HashSet};
|
||||||
use fs::FakeFs;
|
use fs::FakeFs;
|
||||||
use futures::{
|
use futures::{
|
||||||
@@ -56,7 +55,6 @@ fn test_inserting_and_removing_messages(cx: &mut App) {
|
|||||||
None,
|
None,
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
Arc::new(SlashCommandWorkingSet::default()),
|
Arc::new(SlashCommandWorkingSet::default()),
|
||||||
Arc::new(ToolWorkingSet::default()),
|
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
@@ -197,7 +195,6 @@ fn test_message_splitting(cx: &mut App) {
|
|||||||
None,
|
None,
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
Arc::new(SlashCommandWorkingSet::default()),
|
Arc::new(SlashCommandWorkingSet::default()),
|
||||||
Arc::new(ToolWorkingSet::default()),
|
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
@@ -300,7 +297,6 @@ fn test_messages_for_offsets(cx: &mut App) {
|
|||||||
None,
|
None,
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
Arc::new(SlashCommandWorkingSet::default()),
|
Arc::new(SlashCommandWorkingSet::default()),
|
||||||
Arc::new(ToolWorkingSet::default()),
|
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
@@ -414,7 +410,6 @@ async fn test_slash_commands(cx: &mut TestAppContext) {
|
|||||||
None,
|
None,
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
Arc::new(SlashCommandWorkingSet::default()),
|
Arc::new(SlashCommandWorkingSet::default()),
|
||||||
Arc::new(ToolWorkingSet::default()),
|
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
@@ -704,7 +699,6 @@ async fn test_workflow_step_parsing(cx: &mut TestAppContext) {
|
|||||||
None,
|
None,
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
Arc::new(SlashCommandWorkingSet::default()),
|
Arc::new(SlashCommandWorkingSet::default()),
|
||||||
Arc::new(ToolWorkingSet::default()),
|
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
@@ -969,7 +963,6 @@ async fn test_workflow_step_parsing(cx: &mut TestAppContext) {
|
|||||||
registry.clone(),
|
registry.clone(),
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
Arc::new(SlashCommandWorkingSet::default()),
|
Arc::new(SlashCommandWorkingSet::default()),
|
||||||
Arc::new(ToolWorkingSet::default()),
|
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
cx,
|
cx,
|
||||||
@@ -1088,7 +1081,6 @@ async fn test_serialization(cx: &mut TestAppContext) {
|
|||||||
None,
|
None,
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
Arc::new(SlashCommandWorkingSet::default()),
|
Arc::new(SlashCommandWorkingSet::default()),
|
||||||
Arc::new(ToolWorkingSet::default()),
|
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
@@ -1132,7 +1124,6 @@ async fn test_serialization(cx: &mut TestAppContext) {
|
|||||||
registry.clone(),
|
registry.clone(),
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
Arc::new(SlashCommandWorkingSet::default()),
|
Arc::new(SlashCommandWorkingSet::default()),
|
||||||
Arc::new(ToolWorkingSet::default()),
|
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
cx,
|
cx,
|
||||||
@@ -1191,7 +1182,6 @@ async fn test_random_context_collaboration(cx: &mut TestAppContext, mut rng: Std
|
|||||||
registry.clone(),
|
registry.clone(),
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
Arc::new(SlashCommandWorkingSet::default()),
|
Arc::new(SlashCommandWorkingSet::default()),
|
||||||
Arc::new(ToolWorkingSet::default()),
|
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
cx,
|
cx,
|
||||||
@@ -1451,7 +1441,6 @@ fn test_mark_cache_anchors(cx: &mut App) {
|
|||||||
None,
|
None,
|
||||||
prompt_builder.clone(),
|
prompt_builder.clone(),
|
||||||
Arc::new(SlashCommandWorkingSet::default()),
|
Arc::new(SlashCommandWorkingSet::default()),
|
||||||
Arc::new(ToolWorkingSet::default()),
|
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ use assistant_slash_commands::{
|
|||||||
selections_creases, DefaultSlashCommand, DocsSlashCommand, DocsSlashCommandArgs,
|
selections_creases, DefaultSlashCommand, DocsSlashCommand, DocsSlashCommandArgs,
|
||||||
FileSlashCommand,
|
FileSlashCommand,
|
||||||
};
|
};
|
||||||
use assistant_tool::ToolWorkingSet;
|
|
||||||
use client::{proto, zed_urls};
|
use client::{proto, zed_urls};
|
||||||
use collections::{hash_map, BTreeSet, HashMap, HashSet};
|
use collections::{hash_map, BTreeSet, HashMap, HashSet};
|
||||||
use editor::{
|
use editor::{
|
||||||
@@ -30,19 +29,22 @@ use gpui::{
|
|||||||
WeakEntity,
|
WeakEntity,
|
||||||
};
|
};
|
||||||
use indexed_docs::IndexedDocsStore;
|
use indexed_docs::IndexedDocsStore;
|
||||||
use language::{language_settings::SoftWrap, BufferSnapshot, LspAdapterDelegate, ToOffset};
|
use language::{
|
||||||
|
language_settings::{all_language_settings, SoftWrap},
|
||||||
|
BufferSnapshot, LspAdapterDelegate, ToOffset,
|
||||||
|
};
|
||||||
use language_model::{
|
use language_model::{
|
||||||
LanguageModelImage, LanguageModelProvider, LanguageModelProviderTosView, LanguageModelRegistry,
|
LanguageModelImage, LanguageModelProvider, LanguageModelProviderTosView, LanguageModelRegistry,
|
||||||
LanguageModelToolUse, Role,
|
Role,
|
||||||
};
|
};
|
||||||
use language_model_selector::{LanguageModelSelector, LanguageModelSelectorPopoverMenu};
|
use language_model_selector::{AssistantLanguageModelSelector, LanguageModelSelector};
|
||||||
use multi_buffer::MultiBufferRow;
|
use multi_buffer::MultiBufferRow;
|
||||||
use picker::Picker;
|
use picker::Picker;
|
||||||
use project::lsp_store::LocalLspAdapterDelegate;
|
use project::lsp_store::LocalLspAdapterDelegate;
|
||||||
use project::{Project, Worktree};
|
use project::{Project, Worktree};
|
||||||
use rope::Point;
|
use rope::Point;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use settings::{update_settings_file, Settings};
|
use settings::{update_settings_file, Settings, SettingsStore};
|
||||||
use std::{any::TypeId, borrow::Cow, cmp, ops::Range, path::PathBuf, sync::Arc, time::Duration};
|
use std::{any::TypeId, borrow::Cow, cmp, ops::Range, path::PathBuf, sync::Arc, time::Duration};
|
||||||
use text::SelectionGoal;
|
use text::SelectionGoal;
|
||||||
use ui::{
|
use ui::{
|
||||||
@@ -78,7 +80,6 @@ actions!(
|
|||||||
InsertIntoEditor,
|
InsertIntoEditor,
|
||||||
QuoteSelection,
|
QuoteSelection,
|
||||||
Split,
|
Split,
|
||||||
ToggleModelSelector,
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -171,7 +172,6 @@ pub struct ContextEditor {
|
|||||||
context: Entity<AssistantContext>,
|
context: Entity<AssistantContext>,
|
||||||
fs: Arc<dyn Fs>,
|
fs: Arc<dyn Fs>,
|
||||||
slash_commands: Arc<SlashCommandWorkingSet>,
|
slash_commands: Arc<SlashCommandWorkingSet>,
|
||||||
tools: Arc<ToolWorkingSet>,
|
|
||||||
workspace: WeakEntity<Workspace>,
|
workspace: WeakEntity<Workspace>,
|
||||||
project: Entity<Project>,
|
project: Entity<Project>,
|
||||||
lsp_adapter_delegate: Option<Arc<dyn LspAdapterDelegate>>,
|
lsp_adapter_delegate: Option<Arc<dyn LspAdapterDelegate>>,
|
||||||
@@ -182,7 +182,6 @@ pub struct ContextEditor {
|
|||||||
remote_id: Option<workspace::ViewId>,
|
remote_id: Option<workspace::ViewId>,
|
||||||
pending_slash_command_creases: HashMap<Range<language::Anchor>, CreaseId>,
|
pending_slash_command_creases: HashMap<Range<language::Anchor>, CreaseId>,
|
||||||
invoked_slash_command_creases: HashMap<InvokedSlashCommandId, CreaseId>,
|
invoked_slash_command_creases: HashMap<InvokedSlashCommandId, CreaseId>,
|
||||||
pending_tool_use_creases: HashMap<Range<language::Anchor>, CreaseId>,
|
|
||||||
_subscriptions: Vec<Subscription>,
|
_subscriptions: Vec<Subscription>,
|
||||||
patches: HashMap<Range<language::Anchor>, PatchViewState>,
|
patches: HashMap<Range<language::Anchor>, PatchViewState>,
|
||||||
active_patch: Option<Range<language::Anchor>>,
|
active_patch: Option<Range<language::Anchor>>,
|
||||||
@@ -196,6 +195,7 @@ pub struct ContextEditor {
|
|||||||
// the file is opened. In order to keep the worktree alive for the duration of the
|
// the file is opened. In order to keep the worktree alive for the duration of the
|
||||||
// context editor, we keep a reference here.
|
// context editor, we keep a reference here.
|
||||||
dragged_file_worktrees: Vec<Entity<Worktree>>,
|
dragged_file_worktrees: Vec<Entity<Worktree>>,
|
||||||
|
language_model_selector: Entity<LanguageModelSelector>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const DEFAULT_TAB_TITLE: &str = "New Chat";
|
pub const DEFAULT_TAB_TITLE: &str = "New Chat";
|
||||||
@@ -231,6 +231,13 @@ impl ContextEditor {
|
|||||||
editor.set_completion_provider(Some(Box::new(completion_provider)));
|
editor.set_completion_provider(Some(Box::new(completion_provider)));
|
||||||
editor.set_menu_inline_completions_policy(MenuInlineCompletionsPolicy::Never);
|
editor.set_menu_inline_completions_policy(MenuInlineCompletionsPolicy::Never);
|
||||||
editor.set_collaboration_hub(Box::new(project.clone()));
|
editor.set_collaboration_hub(Box::new(project.clone()));
|
||||||
|
|
||||||
|
let show_edit_predictions = all_language_settings(None, cx)
|
||||||
|
.edit_predictions
|
||||||
|
.enabled_in_assistant;
|
||||||
|
|
||||||
|
editor.set_show_edit_predictions(Some(show_edit_predictions), window, cx);
|
||||||
|
|
||||||
editor
|
editor
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -239,16 +246,30 @@ impl ContextEditor {
|
|||||||
cx.subscribe_in(&context, window, Self::handle_context_event),
|
cx.subscribe_in(&context, window, Self::handle_context_event),
|
||||||
cx.subscribe_in(&editor, window, Self::handle_editor_event),
|
cx.subscribe_in(&editor, window, Self::handle_editor_event),
|
||||||
cx.subscribe_in(&editor, window, Self::handle_editor_search_event),
|
cx.subscribe_in(&editor, window, Self::handle_editor_search_event),
|
||||||
|
cx.observe_global_in::<SettingsStore>(window, Self::settings_changed),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
let fs_clone = fs.clone();
|
||||||
|
let language_model_selector = cx.new(|cx| {
|
||||||
|
LanguageModelSelector::new(
|
||||||
|
move |model, cx| {
|
||||||
|
update_settings_file::<AssistantSettings>(
|
||||||
|
fs_clone.clone(),
|
||||||
|
cx,
|
||||||
|
move |settings, _| settings.set_model(model.clone()),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
let sections = context.read(cx).slash_command_output_sections().to_vec();
|
let sections = context.read(cx).slash_command_output_sections().to_vec();
|
||||||
let patch_ranges = context.read(cx).patch_ranges().collect::<Vec<_>>();
|
let patch_ranges = context.read(cx).patch_ranges().collect::<Vec<_>>();
|
||||||
let slash_commands = context.read(cx).slash_commands().clone();
|
let slash_commands = context.read(cx).slash_commands().clone();
|
||||||
let tools = context.read(cx).tools().clone();
|
|
||||||
let mut this = Self {
|
let mut this = Self {
|
||||||
context,
|
context,
|
||||||
slash_commands,
|
slash_commands,
|
||||||
tools,
|
|
||||||
editor,
|
editor,
|
||||||
lsp_adapter_delegate,
|
lsp_adapter_delegate,
|
||||||
blocks: Default::default(),
|
blocks: Default::default(),
|
||||||
@@ -260,7 +281,6 @@ impl ContextEditor {
|
|||||||
project,
|
project,
|
||||||
pending_slash_command_creases: HashMap::default(),
|
pending_slash_command_creases: HashMap::default(),
|
||||||
invoked_slash_command_creases: HashMap::default(),
|
invoked_slash_command_creases: HashMap::default(),
|
||||||
pending_tool_use_creases: HashMap::default(),
|
|
||||||
_subscriptions,
|
_subscriptions,
|
||||||
patches: HashMap::default(),
|
patches: HashMap::default(),
|
||||||
active_patch: None,
|
active_patch: None,
|
||||||
@@ -268,6 +288,7 @@ impl ContextEditor {
|
|||||||
show_accept_terms: false,
|
show_accept_terms: false,
|
||||||
slash_menu_handle: Default::default(),
|
slash_menu_handle: Default::default(),
|
||||||
dragged_file_worktrees: Vec::new(),
|
dragged_file_worktrees: Vec::new(),
|
||||||
|
language_model_selector,
|
||||||
};
|
};
|
||||||
this.update_message_headers(cx);
|
this.update_message_headers(cx);
|
||||||
this.update_image_blocks(cx);
|
this.update_image_blocks(cx);
|
||||||
@@ -276,6 +297,16 @@ impl ContextEditor {
|
|||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn settings_changed(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||||
|
self.editor.update(cx, |editor, cx| {
|
||||||
|
let show_edit_predictions = all_language_settings(None, cx)
|
||||||
|
.edit_predictions
|
||||||
|
.enabled_in_assistant;
|
||||||
|
|
||||||
|
editor.set_show_edit_predictions(Some(show_edit_predictions), window, cx);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
pub fn context(&self) -> &Entity<AssistantContext> {
|
pub fn context(&self) -> &Entity<AssistantContext> {
|
||||||
&self.context
|
&self.context
|
||||||
}
|
}
|
||||||
@@ -465,7 +496,7 @@ impl ContextEditor {
|
|||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) {
|
) {
|
||||||
if self.editor.read(cx).has_active_completions_menu() {
|
if self.editor.read(cx).has_visible_completions_menu() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -580,87 +611,6 @@ impl ContextEditor {
|
|||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let new_tool_uses = self
|
|
||||||
.context
|
|
||||||
.read(cx)
|
|
||||||
.pending_tool_uses()
|
|
||||||
.into_iter()
|
|
||||||
.filter(|tool_use| {
|
|
||||||
!self
|
|
||||||
.pending_tool_use_creases
|
|
||||||
.contains_key(&tool_use.source_range)
|
|
||||||
})
|
|
||||||
.cloned()
|
|
||||||
.collect::<Vec<_>>();
|
|
||||||
|
|
||||||
let buffer = editor.buffer().read(cx).snapshot(cx);
|
|
||||||
let (excerpt_id, _buffer_id, _) = buffer.as_singleton().unwrap();
|
|
||||||
let excerpt_id = *excerpt_id;
|
|
||||||
|
|
||||||
let mut buffer_rows_to_fold = BTreeSet::new();
|
|
||||||
|
|
||||||
let creases = new_tool_uses
|
|
||||||
.iter()
|
|
||||||
.map(|tool_use| {
|
|
||||||
let placeholder = FoldPlaceholder {
|
|
||||||
render: render_fold_icon_button(
|
|
||||||
cx.entity().downgrade(),
|
|
||||||
IconName::PocketKnife,
|
|
||||||
tool_use.name.clone().into(),
|
|
||||||
),
|
|
||||||
..Default::default()
|
|
||||||
};
|
|
||||||
let render_trailer =
|
|
||||||
move |_row, _unfold, _window: &mut Window, _cx: &mut App| {
|
|
||||||
Empty.into_any()
|
|
||||||
};
|
|
||||||
|
|
||||||
let start = buffer
|
|
||||||
.anchor_in_excerpt(excerpt_id, tool_use.source_range.start)
|
|
||||||
.unwrap();
|
|
||||||
let end = buffer
|
|
||||||
.anchor_in_excerpt(excerpt_id, tool_use.source_range.end)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let buffer_row = MultiBufferRow(start.to_point(&buffer).row);
|
|
||||||
buffer_rows_to_fold.insert(buffer_row);
|
|
||||||
|
|
||||||
self.context.update(cx, |context, cx| {
|
|
||||||
context.insert_content(
|
|
||||||
Content::ToolUse {
|
|
||||||
range: tool_use.source_range.clone(),
|
|
||||||
tool_use: LanguageModelToolUse {
|
|
||||||
id: tool_use.id.clone(),
|
|
||||||
name: tool_use.name.clone(),
|
|
||||||
input: tool_use.input.clone(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
cx,
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
Crease::inline(
|
|
||||||
start..end,
|
|
||||||
placeholder,
|
|
||||||
fold_toggle("tool-use"),
|
|
||||||
render_trailer,
|
|
||||||
)
|
|
||||||
})
|
|
||||||
.collect::<Vec<_>>();
|
|
||||||
|
|
||||||
let crease_ids = editor.insert_creases(creases, cx);
|
|
||||||
|
|
||||||
for buffer_row in buffer_rows_to_fold.into_iter().rev() {
|
|
||||||
editor.fold_at(&FoldAt { buffer_row }, window, cx);
|
|
||||||
}
|
|
||||||
|
|
||||||
self.pending_tool_use_creases.extend(
|
|
||||||
new_tool_uses
|
|
||||||
.iter()
|
|
||||||
.map(|tool_use| tool_use.source_range.clone())
|
|
||||||
.zip(crease_ids),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ContextEvent::PatchesUpdated { removed, updated } => {
|
ContextEvent::PatchesUpdated { removed, updated } => {
|
||||||
@@ -701,7 +651,7 @@ impl ContextEditor {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
let placeholder = FoldPlaceholder {
|
let placeholder = FoldPlaceholder {
|
||||||
render: Arc::new(move |_, _, _, _| Empty.into_any()),
|
render: Arc::new(move |_, _, _| Empty.into_any()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let render_toggle = {
|
let render_toggle = {
|
||||||
@@ -758,66 +708,6 @@ impl ContextEditor {
|
|||||||
ContextEvent::SlashCommandOutputSectionAdded { section } => {
|
ContextEvent::SlashCommandOutputSectionAdded { section } => {
|
||||||
self.insert_slash_command_output_sections([section.clone()], false, window, cx);
|
self.insert_slash_command_output_sections([section.clone()], false, window, cx);
|
||||||
}
|
}
|
||||||
ContextEvent::UsePendingTools => {
|
|
||||||
let pending_tool_uses = self
|
|
||||||
.context
|
|
||||||
.read(cx)
|
|
||||||
.pending_tool_uses()
|
|
||||||
.into_iter()
|
|
||||||
.filter(|tool_use| tool_use.status.is_idle())
|
|
||||||
.cloned()
|
|
||||||
.collect::<Vec<_>>();
|
|
||||||
|
|
||||||
for tool_use in pending_tool_uses {
|
|
||||||
if let Some(tool) = self.tools.tool(&tool_use.name, cx) {
|
|
||||||
let task = tool.run(tool_use.input, self.workspace.clone(), window, cx);
|
|
||||||
|
|
||||||
self.context.update(cx, |context, cx| {
|
|
||||||
context.insert_tool_output(tool_use.id.clone(), task, cx);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ContextEvent::ToolFinished {
|
|
||||||
tool_use_id,
|
|
||||||
output_range,
|
|
||||||
} => {
|
|
||||||
self.editor.update(cx, |editor, cx| {
|
|
||||||
let buffer = editor.buffer().read(cx).snapshot(cx);
|
|
||||||
let (excerpt_id, _buffer_id, _) = buffer.as_singleton().unwrap();
|
|
||||||
let excerpt_id = *excerpt_id;
|
|
||||||
|
|
||||||
let placeholder = FoldPlaceholder {
|
|
||||||
render: render_fold_icon_button(
|
|
||||||
cx.entity().downgrade(),
|
|
||||||
IconName::PocketKnife,
|
|
||||||
format!("Tool Result: {tool_use_id}").into(),
|
|
||||||
),
|
|
||||||
..Default::default()
|
|
||||||
};
|
|
||||||
let render_trailer =
|
|
||||||
move |_row, _unfold, _window: &mut Window, _cx: &mut App| Empty.into_any();
|
|
||||||
|
|
||||||
let start = buffer
|
|
||||||
.anchor_in_excerpt(excerpt_id, output_range.start)
|
|
||||||
.unwrap();
|
|
||||||
let end = buffer
|
|
||||||
.anchor_in_excerpt(excerpt_id, output_range.end)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let buffer_row = MultiBufferRow(start.to_point(&buffer).row);
|
|
||||||
|
|
||||||
let crease = Crease::inline(
|
|
||||||
start..end,
|
|
||||||
placeholder,
|
|
||||||
fold_toggle("tool-use"),
|
|
||||||
render_trailer,
|
|
||||||
);
|
|
||||||
|
|
||||||
editor.insert_creases([crease], cx);
|
|
||||||
editor.fold_at(&FoldAt { buffer_row }, window, cx);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
ContextEvent::Operation(_) => {}
|
ContextEvent::Operation(_) => {}
|
||||||
ContextEvent::ShowAssistError(error_message) => {
|
ContextEvent::ShowAssistError(error_message) => {
|
||||||
self.last_error = Some(AssistError::Message(error_message.clone()));
|
self.last_error = Some(AssistError::Message(error_message.clone()));
|
||||||
@@ -979,12 +869,13 @@ impl ContextEditor {
|
|||||||
let render_block: RenderBlock = Arc::new({
|
let render_block: RenderBlock = Arc::new({
|
||||||
let this = this.clone();
|
let this = this.clone();
|
||||||
let patch_range = range.clone();
|
let patch_range = range.clone();
|
||||||
move |cx: &mut BlockContext<'_, '_>| {
|
move |cx: &mut BlockContext| {
|
||||||
let max_width = cx.max_width;
|
let max_width = cx.max_width;
|
||||||
let gutter_width = cx.gutter_dimensions.full_width();
|
let gutter_width = cx.gutter_dimensions.full_width();
|
||||||
let block_id = cx.block_id;
|
let block_id = cx.block_id;
|
||||||
let selected = cx.selected;
|
let selected = cx.selected;
|
||||||
this.update_in(cx, |this, window, cx| {
|
let window = &mut cx.window;
|
||||||
|
this.update(cx.app, |this, cx| {
|
||||||
this.render_patch_block(
|
this.render_patch_block(
|
||||||
patch_range.clone(),
|
patch_range.clone(),
|
||||||
max_width,
|
max_width,
|
||||||
@@ -1213,7 +1104,7 @@ impl ContextEditor {
|
|||||||
patch: AssistantPatch,
|
patch: AssistantPatch,
|
||||||
mut cx: AsyncWindowContext,
|
mut cx: AsyncWindowContext,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let project = this.update(&mut cx, |this, _| this.project.clone())?;
|
let project = this.read_with(&cx, |this, _| this.project.clone())?;
|
||||||
let resolved_patch = patch.resolve(project.clone(), &mut cx).await;
|
let resolved_patch = patch.resolve(project.clone(), &mut cx).await;
|
||||||
|
|
||||||
let editor = cx.new_window_entity(|window, cx| {
|
let editor = cx.new_window_entity(|window, cx| {
|
||||||
@@ -1238,7 +1129,7 @@ impl ContextEditor {
|
|||||||
editor
|
editor
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
this.update_in(&mut cx, |this, window, cx| {
|
this.update(&mut cx, |this, _| {
|
||||||
if let Some(patch_state) = this.patches.get_mut(&patch.range) {
|
if let Some(patch_state) = this.patches.get_mut(&patch.range) {
|
||||||
patch_state.editor = Some(PatchEditorState {
|
patch_state.editor = Some(PatchEditorState {
|
||||||
editor: editor.downgrade(),
|
editor: editor.downgrade(),
|
||||||
@@ -1246,19 +1137,12 @@ impl ContextEditor {
|
|||||||
});
|
});
|
||||||
patch_state.update_task.take();
|
patch_state.update_task.take();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.workspace
|
|
||||||
.update(cx, |workspace, cx| {
|
|
||||||
workspace.add_item_to_active_pane(
|
|
||||||
Box::new(editor.clone()),
|
|
||||||
None,
|
|
||||||
false,
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
})
|
|
||||||
.log_err();
|
|
||||||
})?;
|
})?;
|
||||||
|
this.read_with(&cx, |this, _| this.workspace.clone())?
|
||||||
|
.update_in(&mut cx, |workspace, window, cx| {
|
||||||
|
workspace.add_item_to_active_pane(Box::new(editor.clone()), None, false, window, cx)
|
||||||
|
})
|
||||||
|
.log_err();
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -1360,8 +1244,8 @@ impl ContextEditor {
|
|||||||
.px_1()
|
.px_1()
|
||||||
.mr_0p5()
|
.mr_0p5()
|
||||||
.border_1()
|
.border_1()
|
||||||
.border_color(theme::color_alpha(colors.border_variant, 0.6))
|
.border_color(colors.border_variant.alpha(0.6))
|
||||||
.bg(theme::color_alpha(colors.element_background, 0.6))
|
.bg(colors.element_background.alpha(0.6))
|
||||||
.child("esc"),
|
.child("esc"),
|
||||||
)
|
)
|
||||||
.child("to cancel")
|
.child("to cancel")
|
||||||
@@ -1640,15 +1524,11 @@ impl ContextEditor {
|
|||||||
|
|
||||||
(!text.is_empty()).then_some((text, true))
|
(!text.is_empty()).then_some((text, true))
|
||||||
} else {
|
} else {
|
||||||
let anchor = context_editor.selections.newest_anchor();
|
let selection = context_editor.selections.newest_adjusted(cx);
|
||||||
let text = context_editor
|
let buffer = context_editor.buffer().read(cx).snapshot(cx);
|
||||||
.buffer()
|
let selected_text = buffer.text_for_range(selection.range()).collect::<String>();
|
||||||
.read(cx)
|
|
||||||
.read(cx)
|
|
||||||
.text_for_range(anchor.range())
|
|
||||||
.collect::<String>();
|
|
||||||
|
|
||||||
(!text.is_empty()).then_some((text, false))
|
(!selected_text.is_empty()).then_some((selected_text, false))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1903,23 +1783,16 @@ impl ContextEditor {
|
|||||||
&mut self,
|
&mut self,
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) -> (String, CopyMetadata, Vec<text::Selection<usize>>) {
|
) -> (String, CopyMetadata, Vec<text::Selection<usize>>) {
|
||||||
let (snapshot, selection, creases) = self.editor.update(cx, |editor, cx| {
|
let (selection, creases) = self.editor.update(cx, |editor, cx| {
|
||||||
let mut selection = editor.selections.newest::<Point>(cx);
|
let mut selection = editor.selections.newest_adjusted(cx);
|
||||||
let snapshot = editor.buffer().read(cx).snapshot(cx);
|
let snapshot = editor.buffer().read(cx).snapshot(cx);
|
||||||
|
|
||||||
let is_entire_line = selection.is_empty() || editor.selections.line_mode;
|
selection.goal = SelectionGoal::None;
|
||||||
if is_entire_line {
|
|
||||||
selection.start = Point::new(selection.start.row, 0);
|
|
||||||
selection.end =
|
|
||||||
cmp::min(snapshot.max_point(), Point::new(selection.start.row + 1, 0));
|
|
||||||
selection.goal = SelectionGoal::None;
|
|
||||||
}
|
|
||||||
|
|
||||||
let selection_start = snapshot.point_to_offset(selection.start);
|
let selection_start = snapshot.point_to_offset(selection.start);
|
||||||
|
|
||||||
(
|
(
|
||||||
snapshot.clone(),
|
selection.map(|point| snapshot.point_to_offset(point)),
|
||||||
selection.clone(),
|
|
||||||
editor.display_map.update(cx, |display_map, cx| {
|
editor.display_map.update(cx, |display_map, cx| {
|
||||||
display_map
|
display_map
|
||||||
.snapshot(cx)
|
.snapshot(cx)
|
||||||
@@ -1959,7 +1832,6 @@ impl ContextEditor {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
let selection = selection.map(|point| snapshot.point_to_offset(point));
|
|
||||||
let context = self.context.read(cx);
|
let context = self.context.read(cx);
|
||||||
|
|
||||||
let mut text = String::new();
|
let mut text = String::new();
|
||||||
@@ -2112,18 +1984,13 @@ impl ContextEditor {
|
|||||||
.context
|
.context
|
||||||
.read(cx)
|
.read(cx)
|
||||||
.contents(cx)
|
.contents(cx)
|
||||||
.filter_map(|content| {
|
.map(
|
||||||
if let Content::Image {
|
|Content::Image {
|
||||||
anchor,
|
anchor,
|
||||||
render_image,
|
render_image,
|
||||||
..
|
..
|
||||||
} = content
|
}| (anchor, render_image),
|
||||||
{
|
)
|
||||||
Some((anchor, render_image))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.filter_map(|(anchor, render_image)| {
|
.filter_map(|(anchor, render_image)| {
|
||||||
const MAX_HEIGHT_IN_LINES: u32 = 8;
|
const MAX_HEIGHT_IN_LINES: u32 = 8;
|
||||||
let anchor = buffer.anchor_in_excerpt(excerpt_id, anchor).unwrap();
|
let anchor = buffer.anchor_in_excerpt(excerpt_id, anchor).unwrap();
|
||||||
@@ -2441,7 +2308,7 @@ impl ContextEditor {
|
|||||||
},
|
},
|
||||||
))
|
))
|
||||||
.children(
|
.children(
|
||||||
KeyBinding::for_action_in(&Assist, &focus_handle, window)
|
KeyBinding::for_action_in(&Assist, &focus_handle, window, cx)
|
||||||
.map(|binding| binding.into_any_element()),
|
.map(|binding| binding.into_any_element()),
|
||||||
)
|
)
|
||||||
.on_click(move |_event, window, cx| {
|
.on_click(move |_event, window, cx| {
|
||||||
@@ -2494,7 +2361,7 @@ impl ContextEditor {
|
|||||||
.layer(ElevationIndex::ModalSurface)
|
.layer(ElevationIndex::ModalSurface)
|
||||||
.child(Label::new("Suggest Edits"))
|
.child(Label::new("Suggest Edits"))
|
||||||
.children(
|
.children(
|
||||||
KeyBinding::for_action_in(&Edit, &focus_handle, window)
|
KeyBinding::for_action_in(&Edit, &focus_handle, window, cx)
|
||||||
.map(|binding| binding.into_any_element()),
|
.map(|binding| binding.into_any_element()),
|
||||||
)
|
)
|
||||||
.on_click(move |_event, window, cx| {
|
.on_click(move |_event, window, cx| {
|
||||||
@@ -2506,12 +2373,18 @@ impl ContextEditor {
|
|||||||
slash_command_picker::SlashCommandSelector::new(
|
slash_command_picker::SlashCommandSelector::new(
|
||||||
self.slash_commands.clone(),
|
self.slash_commands.clone(),
|
||||||
cx.entity().downgrade(),
|
cx.entity().downgrade(),
|
||||||
Button::new("trigger", "Add Context")
|
IconButton::new("trigger", IconName::Plus)
|
||||||
.icon(IconName::Plus)
|
|
||||||
.icon_size(IconSize::Small)
|
.icon_size(IconSize::Small)
|
||||||
.icon_color(Color::Muted)
|
.icon_color(Color::Muted),
|
||||||
.icon_position(IconPosition::Start)
|
move |window, cx| {
|
||||||
.tooltip(Tooltip::text("Type / to insert via keyboard")),
|
Tooltip::with_meta(
|
||||||
|
"Add Context",
|
||||||
|
None,
|
||||||
|
"Type / to insert via keyboard",
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2744,8 +2617,8 @@ fn render_fold_icon_button(
|
|||||||
editor: WeakEntity<Editor>,
|
editor: WeakEntity<Editor>,
|
||||||
icon: IconName,
|
icon: IconName,
|
||||||
label: SharedString,
|
label: SharedString,
|
||||||
) -> Arc<dyn Send + Sync + Fn(FoldId, Range<Anchor>, &mut Window, &mut App) -> AnyElement> {
|
) -> Arc<dyn Send + Sync + Fn(FoldId, Range<Anchor>, &mut App) -> AnyElement> {
|
||||||
Arc::new(move |fold_id, fold_range, _window, _cx| {
|
Arc::new(move |fold_id, fold_range, _cx| {
|
||||||
let editor = editor.clone();
|
let editor = editor.clone();
|
||||||
ButtonLike::new(fold_id)
|
ButtonLike::new(fold_id)
|
||||||
.style(ButtonStyle::Filled)
|
.style(ButtonStyle::Filled)
|
||||||
@@ -2805,7 +2678,7 @@ pub fn fold_toggle(
|
|||||||
fn quote_selection_fold_placeholder(title: String, editor: WeakEntity<Editor>) -> FoldPlaceholder {
|
fn quote_selection_fold_placeholder(title: String, editor: WeakEntity<Editor>) -> FoldPlaceholder {
|
||||||
FoldPlaceholder {
|
FoldPlaceholder {
|
||||||
render: Arc::new({
|
render: Arc::new({
|
||||||
move |fold_id, fold_range, _window, _cx| {
|
move |fold_id, fold_range, _cx| {
|
||||||
let editor = editor.clone();
|
let editor = editor.clone();
|
||||||
ButtonLike::new(fold_id)
|
ButtonLike::new(fold_id)
|
||||||
.style(ButtonStyle::Filled)
|
.style(ButtonStyle::Filled)
|
||||||
@@ -2959,6 +2832,7 @@ impl Render for ContextEditor {
|
|||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let language_model_selector = self.language_model_selector.clone();
|
||||||
v_flex()
|
v_flex()
|
||||||
.key_context("ContextEditor")
|
.key_context("ContextEditor")
|
||||||
.capture_action(cx.listener(ContextEditor::cancel))
|
.capture_action(cx.listener(ContextEditor::cancel))
|
||||||
@@ -2971,6 +2845,11 @@ impl Render for ContextEditor {
|
|||||||
.on_action(cx.listener(ContextEditor::edit))
|
.on_action(cx.listener(ContextEditor::edit))
|
||||||
.on_action(cx.listener(ContextEditor::assist))
|
.on_action(cx.listener(ContextEditor::assist))
|
||||||
.on_action(cx.listener(ContextEditor::split))
|
.on_action(cx.listener(ContextEditor::split))
|
||||||
|
.on_action(move |action, window, cx| {
|
||||||
|
language_model_selector.update(cx, |this, cx| {
|
||||||
|
this.toggle_model_selector(action, window, cx);
|
||||||
|
})
|
||||||
|
})
|
||||||
.size_full()
|
.size_full()
|
||||||
.children(self.render_notice(cx))
|
.children(self.render_notice(cx))
|
||||||
.child(
|
.child(
|
||||||
@@ -3003,7 +2882,20 @@ impl Render for ContextEditor {
|
|||||||
.border_t_1()
|
.border_t_1()
|
||||||
.border_color(cx.theme().colors().border_variant)
|
.border_color(cx.theme().colors().border_variant)
|
||||||
.bg(cx.theme().colors().editor_background)
|
.bg(cx.theme().colors().editor_background)
|
||||||
.child(h_flex().gap_1().child(self.render_inject_context_menu(cx)))
|
.child(
|
||||||
|
h_flex()
|
||||||
|
.gap_1()
|
||||||
|
.child(self.render_inject_context_menu(cx))
|
||||||
|
.child(ui::Divider::vertical())
|
||||||
|
.child(div().pl_0p5().child({
|
||||||
|
let focus_handle = self.editor().focus_handle(cx).clone();
|
||||||
|
AssistantLanguageModelSelector::new(
|
||||||
|
focus_handle,
|
||||||
|
self.language_model_selector.clone(),
|
||||||
|
)
|
||||||
|
.render(window, cx)
|
||||||
|
})),
|
||||||
|
)
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.w_full()
|
.w_full()
|
||||||
@@ -3314,80 +3206,67 @@ impl FollowableItem for ContextEditor {
|
|||||||
pub struct ContextEditorToolbarItem {
|
pub struct ContextEditorToolbarItem {
|
||||||
active_context_editor: Option<WeakEntity<ContextEditor>>,
|
active_context_editor: Option<WeakEntity<ContextEditor>>,
|
||||||
model_summary_editor: Entity<Editor>,
|
model_summary_editor: Entity<Editor>,
|
||||||
language_model_selector: Entity<LanguageModelSelector>,
|
|
||||||
language_model_selector_menu_handle: PopoverMenuHandle<LanguageModelSelector>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ContextEditorToolbarItem {
|
impl ContextEditorToolbarItem {
|
||||||
pub fn new(
|
pub fn new(model_summary_editor: Entity<Editor>) -> Self {
|
||||||
workspace: &Workspace,
|
|
||||||
model_selector_menu_handle: PopoverMenuHandle<LanguageModelSelector>,
|
|
||||||
model_summary_editor: Entity<Editor>,
|
|
||||||
window: &mut Window,
|
|
||||||
cx: &mut Context<Self>,
|
|
||||||
) -> Self {
|
|
||||||
Self {
|
Self {
|
||||||
active_context_editor: None,
|
active_context_editor: None,
|
||||||
model_summary_editor,
|
model_summary_editor,
|
||||||
language_model_selector: cx.new(|cx| {
|
|
||||||
let fs = workspace.app_state().fs.clone();
|
|
||||||
LanguageModelSelector::new(
|
|
||||||
move |model, cx| {
|
|
||||||
update_settings_file::<AssistantSettings>(
|
|
||||||
fs.clone(),
|
|
||||||
cx,
|
|
||||||
move |settings, _| settings.set_model(model.clone()),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
window,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
}),
|
|
||||||
language_model_selector_menu_handle: model_selector_menu_handle,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn render_remaining_tokens(&self, cx: &mut Context<Self>) -> Option<impl IntoElement> {
|
pub fn render_remaining_tokens(
|
||||||
let context = &self
|
context_editor: &Entity<ContextEditor>,
|
||||||
.active_context_editor
|
cx: &App,
|
||||||
.as_ref()?
|
) -> Option<impl IntoElement> {
|
||||||
.upgrade()?
|
let context = &context_editor.read(cx).context;
|
||||||
.read(cx)
|
|
||||||
.context;
|
let (token_count_color, token_count, max_token_count, tooltip) = match token_state(context, cx)?
|
||||||
let (token_count_color, token_count, max_token_count) = match token_state(context, cx)? {
|
{
|
||||||
TokenState::NoTokensLeft {
|
TokenState::NoTokensLeft {
|
||||||
max_token_count,
|
max_token_count,
|
||||||
token_count,
|
token_count,
|
||||||
} => (Color::Error, token_count, max_token_count),
|
} => (
|
||||||
TokenState::HasMoreTokens {
|
Color::Error,
|
||||||
max_token_count,
|
token_count,
|
||||||
token_count,
|
max_token_count,
|
||||||
over_warn_threshold,
|
Some("Token Limit Reached"),
|
||||||
} => {
|
),
|
||||||
let color = if over_warn_threshold {
|
TokenState::HasMoreTokens {
|
||||||
Color::Warning
|
max_token_count,
|
||||||
} else {
|
token_count,
|
||||||
Color::Muted
|
over_warn_threshold,
|
||||||
};
|
} => {
|
||||||
(color, token_count, max_token_count)
|
let (color, tooltip) = if over_warn_threshold {
|
||||||
}
|
(Color::Warning, Some("Token Limit is Close to Exhaustion"))
|
||||||
};
|
} else {
|
||||||
Some(
|
(Color::Muted, None)
|
||||||
h_flex()
|
};
|
||||||
.gap_0p5()
|
(color, token_count, max_token_count, tooltip)
|
||||||
.child(
|
}
|
||||||
Label::new(humanize_token_count(token_count))
|
};
|
||||||
.size(LabelSize::Small)
|
|
||||||
.color(token_count_color),
|
Some(
|
||||||
)
|
h_flex()
|
||||||
.child(Label::new("/").size(LabelSize::Small).color(Color::Muted))
|
.id("token-count")
|
||||||
.child(
|
.gap_0p5()
|
||||||
Label::new(humanize_token_count(max_token_count))
|
.child(
|
||||||
.size(LabelSize::Small)
|
Label::new(humanize_token_count(token_count))
|
||||||
.color(Color::Muted),
|
.size(LabelSize::Small)
|
||||||
),
|
.color(token_count_color),
|
||||||
)
|
)
|
||||||
}
|
.child(Label::new("/").size(LabelSize::Small).color(Color::Muted))
|
||||||
|
.child(
|
||||||
|
Label::new(humanize_token_count(max_token_count))
|
||||||
|
.size(LabelSize::Small)
|
||||||
|
.color(Color::Muted),
|
||||||
|
)
|
||||||
|
.when_some(tooltip, |element, tooltip| {
|
||||||
|
element.tooltip(Tooltip::text(tooltip))
|
||||||
|
}),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Render for ContextEditorToolbarItem {
|
impl Render for ContextEditorToolbarItem {
|
||||||
@@ -3414,8 +3293,7 @@ impl Render for ContextEditorToolbarItem {
|
|||||||
})),
|
})),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
let active_provider = LanguageModelRegistry::read_global(cx).active_provider();
|
|
||||||
let active_model = LanguageModelRegistry::read_global(cx).active_model();
|
|
||||||
let right_side = h_flex()
|
let right_side = h_flex()
|
||||||
.gap_2()
|
.gap_2()
|
||||||
// TODO display this in a nicer way, once we have a design for it.
|
// TODO display this in a nicer way, once we have a design for it.
|
||||||
@@ -3431,57 +3309,12 @@ impl Render for ContextEditorToolbarItem {
|
|||||||
// scan_items_remaining
|
// scan_items_remaining
|
||||||
// .map(|remaining_items| format!("Files to scan: {}", remaining_items))
|
// .map(|remaining_items| format!("Files to scan: {}", remaining_items))
|
||||||
// })
|
// })
|
||||||
.child(
|
.children(
|
||||||
LanguageModelSelectorPopoverMenu::new(
|
self.active_context_editor
|
||||||
self.language_model_selector.clone(),
|
.as_ref()
|
||||||
ButtonLike::new("active-model")
|
.and_then(|editor| editor.upgrade())
|
||||||
.style(ButtonStyle::Subtle)
|
.and_then(|editor| render_remaining_tokens(&editor, cx)),
|
||||||
.child(
|
);
|
||||||
h_flex()
|
|
||||||
.w_full()
|
|
||||||
.gap_0p5()
|
|
||||||
.child(
|
|
||||||
div()
|
|
||||||
.overflow_x_hidden()
|
|
||||||
.flex_grow()
|
|
||||||
.whitespace_nowrap()
|
|
||||||
.child(match (active_provider, active_model) {
|
|
||||||
(Some(provider), Some(model)) => h_flex()
|
|
||||||
.gap_1()
|
|
||||||
.child(
|
|
||||||
Icon::new(
|
|
||||||
model
|
|
||||||
.icon()
|
|
||||||
.unwrap_or_else(|| provider.icon()),
|
|
||||||
)
|
|
||||||
.color(Color::Muted)
|
|
||||||
.size(IconSize::XSmall),
|
|
||||||
)
|
|
||||||
.child(
|
|
||||||
Label::new(model.name().0)
|
|
||||||
.size(LabelSize::Small)
|
|
||||||
.color(Color::Muted),
|
|
||||||
)
|
|
||||||
.into_any_element(),
|
|
||||||
_ => Label::new("No model selected")
|
|
||||||
.size(LabelSize::Small)
|
|
||||||
.color(Color::Muted)
|
|
||||||
.into_any_element(),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
.child(
|
|
||||||
Icon::new(IconName::ChevronDown)
|
|
||||||
.color(Color::Muted)
|
|
||||||
.size(IconSize::XSmall),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.tooltip(move |window, cx| {
|
|
||||||
Tooltip::for_action("Change Model", &ToggleModelSelector, window, cx)
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
.with_handle(self.language_model_selector_menu_handle.clone()),
|
|
||||||
)
|
|
||||||
.children(self.render_remaining_tokens(cx));
|
|
||||||
|
|
||||||
h_flex()
|
h_flex()
|
||||||
.px_0p5()
|
.px_0p5()
|
||||||
@@ -3537,7 +3370,7 @@ fn invoked_slash_command_fold_placeholder(
|
|||||||
FoldPlaceholder {
|
FoldPlaceholder {
|
||||||
constrain_width: false,
|
constrain_width: false,
|
||||||
merge_adjacent: false,
|
merge_adjacent: false,
|
||||||
render: Arc::new(move |fold_id, _, _window, cx| {
|
render: Arc::new(move |fold_id, _, cx| {
|
||||||
let Some(context) = context.upgrade() else {
|
let Some(context) = context.upgrade() else {
|
||||||
return Empty.into_any();
|
return Empty.into_any();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,13 +4,12 @@ use crate::{
|
|||||||
};
|
};
|
||||||
use anyhow::{anyhow, Context as _, Result};
|
use anyhow::{anyhow, Context as _, Result};
|
||||||
use assistant_slash_command::{SlashCommandId, SlashCommandWorkingSet};
|
use assistant_slash_command::{SlashCommandId, SlashCommandWorkingSet};
|
||||||
use assistant_tool::{ToolId, ToolWorkingSet};
|
|
||||||
use client::{proto, telemetry::Telemetry, Client, TypedEnvelope};
|
use client::{proto, telemetry::Telemetry, Client, TypedEnvelope};
|
||||||
use clock::ReplicaId;
|
use clock::ReplicaId;
|
||||||
use collections::HashMap;
|
use collections::HashMap;
|
||||||
use context_server::manager::ContextServerManager;
|
use context_server::manager::ContextServerManager;
|
||||||
use context_server::{ContextServerFactoryRegistry, ContextServerTool};
|
use context_server::ContextServerFactoryRegistry;
|
||||||
use fs::Fs;
|
use fs::{Fs, RemoveOptions};
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use fuzzy::StringMatchCandidate;
|
use fuzzy::StringMatchCandidate;
|
||||||
use gpui::{App, AppContext as _, AsyncApp, Context, Entity, EventEmitter, Task, WeakEntity};
|
use gpui::{App, AppContext as _, AsyncApp, Context, Entity, EventEmitter, Task, WeakEntity};
|
||||||
@@ -32,11 +31,11 @@ use std::{
|
|||||||
use util::{ResultExt, TryFutureExt};
|
use util::{ResultExt, TryFutureExt};
|
||||||
|
|
||||||
pub(crate) fn init(client: &AnyProtoClient) {
|
pub(crate) fn init(client: &AnyProtoClient) {
|
||||||
client.add_model_message_handler(ContextStore::handle_advertise_contexts);
|
client.add_entity_message_handler(ContextStore::handle_advertise_contexts);
|
||||||
client.add_model_request_handler(ContextStore::handle_open_context);
|
client.add_entity_request_handler(ContextStore::handle_open_context);
|
||||||
client.add_model_request_handler(ContextStore::handle_create_context);
|
client.add_entity_request_handler(ContextStore::handle_create_context);
|
||||||
client.add_model_message_handler(ContextStore::handle_update_context);
|
client.add_entity_message_handler(ContextStore::handle_update_context);
|
||||||
client.add_model_request_handler(ContextStore::handle_synchronize_contexts);
|
client.add_entity_request_handler(ContextStore::handle_synchronize_contexts);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
@@ -50,12 +49,10 @@ pub struct ContextStore {
|
|||||||
contexts_metadata: Vec<SavedContextMetadata>,
|
contexts_metadata: Vec<SavedContextMetadata>,
|
||||||
context_server_manager: Entity<ContextServerManager>,
|
context_server_manager: Entity<ContextServerManager>,
|
||||||
context_server_slash_command_ids: HashMap<Arc<str>, Vec<SlashCommandId>>,
|
context_server_slash_command_ids: HashMap<Arc<str>, Vec<SlashCommandId>>,
|
||||||
context_server_tool_ids: HashMap<Arc<str>, Vec<ToolId>>,
|
|
||||||
host_contexts: Vec<RemoteContextMetadata>,
|
host_contexts: Vec<RemoteContextMetadata>,
|
||||||
fs: Arc<dyn Fs>,
|
fs: Arc<dyn Fs>,
|
||||||
languages: Arc<LanguageRegistry>,
|
languages: Arc<LanguageRegistry>,
|
||||||
slash_commands: Arc<SlashCommandWorkingSet>,
|
slash_commands: Arc<SlashCommandWorkingSet>,
|
||||||
tools: Arc<ToolWorkingSet>,
|
|
||||||
telemetry: Arc<Telemetry>,
|
telemetry: Arc<Telemetry>,
|
||||||
_watch_updates: Task<Option<()>>,
|
_watch_updates: Task<Option<()>>,
|
||||||
client: Arc<Client>,
|
client: Arc<Client>,
|
||||||
@@ -98,7 +95,6 @@ impl ContextStore {
|
|||||||
project: Entity<Project>,
|
project: Entity<Project>,
|
||||||
prompt_builder: Arc<PromptBuilder>,
|
prompt_builder: Arc<PromptBuilder>,
|
||||||
slash_commands: Arc<SlashCommandWorkingSet>,
|
slash_commands: Arc<SlashCommandWorkingSet>,
|
||||||
tools: Arc<ToolWorkingSet>,
|
|
||||||
cx: &mut App,
|
cx: &mut App,
|
||||||
) -> Task<Result<Entity<Self>>> {
|
) -> Task<Result<Entity<Self>>> {
|
||||||
let fs = project.read(cx).fs().clone();
|
let fs = project.read(cx).fs().clone();
|
||||||
@@ -119,12 +115,10 @@ impl ContextStore {
|
|||||||
contexts_metadata: Vec::new(),
|
contexts_metadata: Vec::new(),
|
||||||
context_server_manager,
|
context_server_manager,
|
||||||
context_server_slash_command_ids: HashMap::default(),
|
context_server_slash_command_ids: HashMap::default(),
|
||||||
context_server_tool_ids: HashMap::default(),
|
|
||||||
host_contexts: Vec::new(),
|
host_contexts: Vec::new(),
|
||||||
fs,
|
fs,
|
||||||
languages,
|
languages,
|
||||||
slash_commands,
|
slash_commands,
|
||||||
tools,
|
|
||||||
telemetry,
|
telemetry,
|
||||||
_watch_updates: cx.spawn(|this, mut cx| {
|
_watch_updates: cx.spawn(|this, mut cx| {
|
||||||
async move {
|
async move {
|
||||||
@@ -150,11 +144,9 @@ impl ContextStore {
|
|||||||
this.handle_project_changed(project.clone(), cx);
|
this.handle_project_changed(project.clone(), cx);
|
||||||
this.synchronize_contexts(cx);
|
this.synchronize_contexts(cx);
|
||||||
this.register_context_server_handlers(cx);
|
this.register_context_server_handlers(cx);
|
||||||
|
this.reload(cx).detach_and_log_err(cx);
|
||||||
this
|
this
|
||||||
})?;
|
})?;
|
||||||
this.update(&mut cx, |this, cx| this.reload(cx))?
|
|
||||||
.await
|
|
||||||
.log_err();
|
|
||||||
|
|
||||||
Ok(this)
|
Ok(this)
|
||||||
})
|
})
|
||||||
@@ -273,19 +265,18 @@ impl ContextStore {
|
|||||||
local_versions.push(context.version(cx).to_proto(context_id.clone()));
|
local_versions.push(context.version(cx).to_proto(context_id.clone()));
|
||||||
let client = this.client.clone();
|
let client = this.client.clone();
|
||||||
let project_id = envelope.payload.project_id;
|
let project_id = envelope.payload.project_id;
|
||||||
cx.background_executor()
|
cx.background_spawn(async move {
|
||||||
.spawn(async move {
|
let operations = operations.await;
|
||||||
let operations = operations.await;
|
for operation in operations {
|
||||||
for operation in operations {
|
client.send(proto::UpdateContext {
|
||||||
client.send(proto::UpdateContext {
|
project_id,
|
||||||
project_id,
|
context_id: context_id.to_proto(),
|
||||||
context_id: context_id.to_proto(),
|
operation: Some(operation),
|
||||||
operation: Some(operation),
|
})?;
|
||||||
})?;
|
}
|
||||||
}
|
anyhow::Ok(())
|
||||||
anyhow::Ok(())
|
})
|
||||||
})
|
.detach_and_log_err(cx);
|
||||||
.detach_and_log_err(cx);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,7 +309,7 @@ impl ContextStore {
|
|||||||
.client
|
.client
|
||||||
.subscribe_to_entity(remote_id)
|
.subscribe_to_entity(remote_id)
|
||||||
.log_err()
|
.log_err()
|
||||||
.map(|subscription| subscription.set_model(&cx.entity(), &mut cx.to_async()));
|
.map(|subscription| subscription.set_entity(&cx.entity(), &mut cx.to_async()));
|
||||||
self.advertise_contexts(cx);
|
self.advertise_contexts(cx);
|
||||||
} else {
|
} else {
|
||||||
self.client_subscription = None;
|
self.client_subscription = None;
|
||||||
@@ -359,6 +350,12 @@ impl ContextStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn contexts(&self) -> Vec<SavedContextMetadata> {
|
||||||
|
let mut contexts = self.contexts_metadata.iter().cloned().collect::<Vec<_>>();
|
||||||
|
contexts.sort_unstable_by_key(|thread| std::cmp::Reverse(thread.mtime));
|
||||||
|
contexts
|
||||||
|
}
|
||||||
|
|
||||||
pub fn create(&mut self, cx: &mut Context<Self>) -> Entity<AssistantContext> {
|
pub fn create(&mut self, cx: &mut Context<Self>) -> Entity<AssistantContext> {
|
||||||
let context = cx.new(|cx| {
|
let context = cx.new(|cx| {
|
||||||
AssistantContext::local(
|
AssistantContext::local(
|
||||||
@@ -367,7 +364,6 @@ impl ContextStore {
|
|||||||
Some(self.telemetry.clone()),
|
Some(self.telemetry.clone()),
|
||||||
self.prompt_builder.clone(),
|
self.prompt_builder.clone(),
|
||||||
self.slash_commands.clone(),
|
self.slash_commands.clone(),
|
||||||
self.tools.clone(),
|
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
@@ -391,7 +387,6 @@ impl ContextStore {
|
|||||||
let telemetry = self.telemetry.clone();
|
let telemetry = self.telemetry.clone();
|
||||||
let prompt_builder = self.prompt_builder.clone();
|
let prompt_builder = self.prompt_builder.clone();
|
||||||
let slash_commands = self.slash_commands.clone();
|
let slash_commands = self.slash_commands.clone();
|
||||||
let tools = self.tools.clone();
|
|
||||||
let request = self.client.request(proto::CreateContext { project_id });
|
let request = self.client.request(proto::CreateContext { project_id });
|
||||||
cx.spawn(|this, mut cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
let response = request.await?;
|
let response = request.await?;
|
||||||
@@ -405,15 +400,13 @@ impl ContextStore {
|
|||||||
language_registry,
|
language_registry,
|
||||||
prompt_builder,
|
prompt_builder,
|
||||||
slash_commands,
|
slash_commands,
|
||||||
tools,
|
|
||||||
Some(project),
|
Some(project),
|
||||||
Some(telemetry),
|
Some(telemetry),
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
let operations = cx
|
let operations = cx
|
||||||
.background_executor()
|
.background_spawn(async move {
|
||||||
.spawn(async move {
|
|
||||||
context_proto
|
context_proto
|
||||||
.operations
|
.operations
|
||||||
.into_iter()
|
.into_iter()
|
||||||
@@ -447,7 +440,7 @@ impl ContextStore {
|
|||||||
let languages = self.languages.clone();
|
let languages = self.languages.clone();
|
||||||
let project = self.project.clone();
|
let project = self.project.clone();
|
||||||
let telemetry = self.telemetry.clone();
|
let telemetry = self.telemetry.clone();
|
||||||
let load = cx.background_executor().spawn({
|
let load = cx.background_spawn({
|
||||||
let path = path.clone();
|
let path = path.clone();
|
||||||
async move {
|
async move {
|
||||||
let saved_context = fs.load(&path).await?;
|
let saved_context = fs.load(&path).await?;
|
||||||
@@ -456,7 +449,6 @@ impl ContextStore {
|
|||||||
});
|
});
|
||||||
let prompt_builder = self.prompt_builder.clone();
|
let prompt_builder = self.prompt_builder.clone();
|
||||||
let slash_commands = self.slash_commands.clone();
|
let slash_commands = self.slash_commands.clone();
|
||||||
let tools = self.tools.clone();
|
|
||||||
|
|
||||||
cx.spawn(|this, mut cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
let saved_context = load.await?;
|
let saved_context = load.await?;
|
||||||
@@ -467,7 +459,6 @@ impl ContextStore {
|
|||||||
languages,
|
languages,
|
||||||
prompt_builder,
|
prompt_builder,
|
||||||
slash_commands,
|
slash_commands,
|
||||||
tools,
|
|
||||||
Some(project),
|
Some(project),
|
||||||
Some(telemetry),
|
Some(telemetry),
|
||||||
cx,
|
cx,
|
||||||
@@ -484,6 +475,38 @@ impl ContextStore {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn delete_local_context(
|
||||||
|
&mut self,
|
||||||
|
path: PathBuf,
|
||||||
|
cx: &mut Context<Self>,
|
||||||
|
) -> Task<Result<()>> {
|
||||||
|
let fs = self.fs.clone();
|
||||||
|
|
||||||
|
cx.spawn(|this, mut cx| async move {
|
||||||
|
fs.remove_file(
|
||||||
|
&path,
|
||||||
|
RemoveOptions {
|
||||||
|
recursive: false,
|
||||||
|
ignore_if_not_exists: true,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
this.update(&mut cx, |this, cx| {
|
||||||
|
this.contexts.retain(|context| {
|
||||||
|
context
|
||||||
|
.upgrade()
|
||||||
|
.and_then(|context| context.read(cx).path())
|
||||||
|
!= Some(&path)
|
||||||
|
});
|
||||||
|
this.contexts_metadata
|
||||||
|
.retain(|context| context.path != path);
|
||||||
|
})?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
fn loaded_context_for_path(&self, path: &Path, cx: &App) -> Option<Entity<AssistantContext>> {
|
fn loaded_context_for_path(&self, path: &Path, cx: &App) -> Option<Entity<AssistantContext>> {
|
||||||
self.contexts.iter().find_map(|context| {
|
self.contexts.iter().find_map(|context| {
|
||||||
let context = context.upgrade()?;
|
let context = context.upgrade()?;
|
||||||
@@ -535,7 +558,6 @@ impl ContextStore {
|
|||||||
});
|
});
|
||||||
let prompt_builder = self.prompt_builder.clone();
|
let prompt_builder = self.prompt_builder.clone();
|
||||||
let slash_commands = self.slash_commands.clone();
|
let slash_commands = self.slash_commands.clone();
|
||||||
let tools = self.tools.clone();
|
|
||||||
cx.spawn(|this, mut cx| async move {
|
cx.spawn(|this, mut cx| async move {
|
||||||
let response = request.await?;
|
let response = request.await?;
|
||||||
let context_proto = response.context.context("invalid context")?;
|
let context_proto = response.context.context("invalid context")?;
|
||||||
@@ -547,15 +569,13 @@ impl ContextStore {
|
|||||||
language_registry,
|
language_registry,
|
||||||
prompt_builder,
|
prompt_builder,
|
||||||
slash_commands,
|
slash_commands,
|
||||||
tools,
|
|
||||||
Some(project),
|
Some(project),
|
||||||
Some(telemetry),
|
Some(telemetry),
|
||||||
cx,
|
cx,
|
||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
let operations = cx
|
let operations = cx
|
||||||
.background_executor()
|
.background_spawn(async move {
|
||||||
.spawn(async move {
|
|
||||||
context_proto
|
context_proto
|
||||||
.operations
|
.operations
|
||||||
.into_iter()
|
.into_iter()
|
||||||
@@ -708,7 +728,7 @@ impl ContextStore {
|
|||||||
pub fn search(&self, query: String, cx: &App) -> Task<Vec<SavedContextMetadata>> {
|
pub fn search(&self, query: String, cx: &App) -> Task<Vec<SavedContextMetadata>> {
|
||||||
let metadata = self.contexts_metadata.clone();
|
let metadata = self.contexts_metadata.clone();
|
||||||
let executor = cx.background_executor().clone();
|
let executor = cx.background_executor().clone();
|
||||||
cx.background_executor().spawn(async move {
|
cx.background_spawn(async move {
|
||||||
if query.is_empty() {
|
if query.is_empty() {
|
||||||
metadata
|
metadata
|
||||||
} else {
|
} else {
|
||||||
@@ -816,7 +836,6 @@ impl ContextStore {
|
|||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) {
|
) {
|
||||||
let slash_command_working_set = self.slash_commands.clone();
|
let slash_command_working_set = self.slash_commands.clone();
|
||||||
let tool_working_set = self.tools.clone();
|
|
||||||
match event {
|
match event {
|
||||||
context_server::manager::Event::ServerStarted { server_id } => {
|
context_server::manager::Event::ServerStarted { server_id } => {
|
||||||
if let Some(server) = context_server_manager.read(cx).get_server(server_id) {
|
if let Some(server) = context_server_manager.read(cx).get_server(server_id) {
|
||||||
@@ -856,29 +875,6 @@ impl ContextStore {
|
|||||||
.log_err();
|
.log_err();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if protocol.capable(context_server::protocol::ServerCapability::Tools) {
|
|
||||||
if let Some(tools) = protocol.list_tools().await.log_err() {
|
|
||||||
let tool_ids = tools.tools.into_iter().map(|tool| {
|
|
||||||
log::info!("registering context server tool: {:?}", tool.name);
|
|
||||||
tool_working_set.insert(
|
|
||||||
Arc::new(ContextServerTool::new(
|
|
||||||
context_server_manager.clone(),
|
|
||||||
server.id(),
|
|
||||||
tool,
|
|
||||||
)),
|
|
||||||
)
|
|
||||||
|
|
||||||
}).collect::<Vec<_>>();
|
|
||||||
|
|
||||||
|
|
||||||
this.update(&mut cx, |this, _cx| {
|
|
||||||
this.context_server_tool_ids
|
|
||||||
.insert(server_id, tool_ids);
|
|
||||||
})
|
|
||||||
.log_err();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
@@ -890,10 +886,6 @@ impl ContextStore {
|
|||||||
{
|
{
|
||||||
slash_command_working_set.remove(&slash_command_ids);
|
slash_command_working_set.remove(&slash_command_ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(tool_ids) = self.context_server_tool_ids.remove(server_id) {
|
|
||||||
tool_working_set.remove(&tool_ids);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ use anyhow::{anyhow, Context as _, Result};
|
|||||||
use collections::HashMap;
|
use collections::HashMap;
|
||||||
use editor::ProposedChangesEditor;
|
use editor::ProposedChangesEditor;
|
||||||
use futures::{future, TryFutureExt as _};
|
use futures::{future, TryFutureExt as _};
|
||||||
use gpui::{App, AsyncApp, Entity, SharedString};
|
use gpui::{App, AppContext as _, AsyncApp, Entity, SharedString};
|
||||||
use language::{AutoindentMode, Buffer, BufferSnapshot};
|
use language::{AutoindentMode, Buffer, BufferSnapshot};
|
||||||
use project::{Project, ProjectPath};
|
use project::{Project, ProjectPath};
|
||||||
use std::{cmp, ops::Range, path::Path, sync::Arc};
|
use std::{cmp, ops::Range, path::Path, sync::Arc};
|
||||||
@@ -140,7 +140,7 @@ impl ResolvedPatch {
|
|||||||
buffer.edit(
|
buffer.edit(
|
||||||
edits,
|
edits,
|
||||||
Some(AutoindentMode::Block {
|
Some(AutoindentMode::Block {
|
||||||
original_indent_columns: Vec::new(),
|
original_start_columns: Vec::new(),
|
||||||
}),
|
}),
|
||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
@@ -258,8 +258,7 @@ impl AssistantEdit {
|
|||||||
|
|
||||||
let snapshot = buffer.update(&mut cx, |buffer, _| buffer.snapshot())?;
|
let snapshot = buffer.update(&mut cx, |buffer, _| buffer.snapshot())?;
|
||||||
let suggestion = cx
|
let suggestion = cx
|
||||||
.background_executor()
|
.background_spawn(async move { kind.resolve(&snapshot) })
|
||||||
.spawn(async move { kind.resolve(&snapshot) })
|
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
Ok((buffer, suggestion))
|
Ok((buffer, suggestion))
|
||||||
@@ -547,7 +546,7 @@ impl Eq for AssistantPatch {}
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use gpui::{App, AppContext as _};
|
use gpui::App;
|
||||||
use language::{
|
use language::{
|
||||||
language_settings::AllLanguageSettings, Language, LanguageConfig, LanguageMatcher,
|
language_settings::AllLanguageSettings, Language, LanguageConfig, LanguageMatcher,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ pub use assistant_slash_command::SlashCommand;
|
|||||||
use assistant_slash_command::{AfterCompletion, SlashCommandLine, SlashCommandWorkingSet};
|
use assistant_slash_command::{AfterCompletion, SlashCommandLine, SlashCommandWorkingSet};
|
||||||
use editor::{CompletionProvider, Editor};
|
use editor::{CompletionProvider, Editor};
|
||||||
use fuzzy::{match_strings, StringMatchCandidate};
|
use fuzzy::{match_strings, StringMatchCandidate};
|
||||||
use gpui::{App, Context, Entity, Task, WeakEntity, Window};
|
use gpui::{App, AppContext as _, Context, Entity, Task, WeakEntity, Window};
|
||||||
use language::{Anchor, Buffer, Documentation, LanguageServerId, ToPoint};
|
use language::{Anchor, Buffer, LanguageServerId, ToPoint};
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use project::CompletionIntent;
|
use project::{lsp_store::CompletionDocumentation, CompletionIntent};
|
||||||
use rope::Point;
|
use rope::Point;
|
||||||
use std::{
|
use std::{
|
||||||
cell::RefCell,
|
cell::RefCell,
|
||||||
@@ -120,7 +120,9 @@ impl SlashCommandCompletionProvider {
|
|||||||
});
|
});
|
||||||
Some(project::Completion {
|
Some(project::Completion {
|
||||||
old_range: name_range.clone(),
|
old_range: name_range.clone(),
|
||||||
documentation: Some(Documentation::SingleLine(command.description())),
|
documentation: Some(CompletionDocumentation::SingleLine(
|
||||||
|
command.description().into(),
|
||||||
|
)),
|
||||||
new_text,
|
new_text,
|
||||||
label: command.label(cx),
|
label: command.label(cx),
|
||||||
server_id: LanguageServerId(0),
|
server_id: LanguageServerId(0),
|
||||||
@@ -161,7 +163,7 @@ impl SlashCommandCompletionProvider {
|
|||||||
let editor = self.editor.clone();
|
let editor = self.editor.clone();
|
||||||
let workspace = self.workspace.clone();
|
let workspace = self.workspace.clone();
|
||||||
let arguments = arguments.to_vec();
|
let arguments = arguments.to_vec();
|
||||||
cx.background_executor().spawn(async move {
|
cx.background_spawn(async move {
|
||||||
Ok(completions
|
Ok(completions
|
||||||
.await?
|
.await?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|||||||
@@ -1,17 +1,22 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use assistant_slash_command::SlashCommandWorkingSet;
|
use assistant_slash_command::SlashCommandWorkingSet;
|
||||||
use gpui::{AnyElement, DismissEvent, SharedString, Task, WeakEntity};
|
use gpui::{AnyElement, AnyView, DismissEvent, SharedString, Task, WeakEntity};
|
||||||
use picker::{Picker, PickerDelegate, PickerEditorPosition};
|
use picker::{Picker, PickerDelegate, PickerEditorPosition};
|
||||||
use ui::{prelude::*, ListItem, ListItemSpacing, PopoverMenu, PopoverTrigger, Tooltip};
|
use ui::{prelude::*, ListItem, ListItemSpacing, PopoverMenu, PopoverTrigger, Tooltip};
|
||||||
|
|
||||||
use crate::context_editor::ContextEditor;
|
use crate::context_editor::ContextEditor;
|
||||||
|
|
||||||
#[derive(IntoElement)]
|
#[derive(IntoElement)]
|
||||||
pub(super) struct SlashCommandSelector<T: PopoverTrigger> {
|
pub(super) struct SlashCommandSelector<T, TT>
|
||||||
|
where
|
||||||
|
T: PopoverTrigger + ButtonCommon,
|
||||||
|
TT: Fn(&mut Window, &mut App) -> AnyView + 'static,
|
||||||
|
{
|
||||||
working_set: Arc<SlashCommandWorkingSet>,
|
working_set: Arc<SlashCommandWorkingSet>,
|
||||||
active_context_editor: WeakEntity<ContextEditor>,
|
active_context_editor: WeakEntity<ContextEditor>,
|
||||||
trigger: T,
|
trigger: T,
|
||||||
|
tooltip: TT,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
@@ -48,16 +53,22 @@ pub(crate) struct SlashCommandDelegate {
|
|||||||
selected_index: usize,
|
selected_index: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: PopoverTrigger> SlashCommandSelector<T> {
|
impl<T, TT> SlashCommandSelector<T, TT>
|
||||||
|
where
|
||||||
|
T: PopoverTrigger + ButtonCommon,
|
||||||
|
TT: Fn(&mut Window, &mut App) -> AnyView + 'static,
|
||||||
|
{
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
working_set: Arc<SlashCommandWorkingSet>,
|
working_set: Arc<SlashCommandWorkingSet>,
|
||||||
active_context_editor: WeakEntity<ContextEditor>,
|
active_context_editor: WeakEntity<ContextEditor>,
|
||||||
trigger: T,
|
trigger: T,
|
||||||
|
tooltip: TT,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
SlashCommandSelector {
|
SlashCommandSelector {
|
||||||
working_set,
|
working_set,
|
||||||
active_context_editor,
|
active_context_editor,
|
||||||
trigger,
|
trigger,
|
||||||
|
tooltip,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,8 +102,7 @@ impl PickerDelegate for SlashCommandDelegate {
|
|||||||
let all_commands = self.all_commands.clone();
|
let all_commands = self.all_commands.clone();
|
||||||
cx.spawn_in(window, |this, mut cx| async move {
|
cx.spawn_in(window, |this, mut cx| async move {
|
||||||
let filtered_commands = cx
|
let filtered_commands = cx
|
||||||
.background_executor()
|
.background_spawn(async move {
|
||||||
.spawn(async move {
|
|
||||||
if query.is_empty() {
|
if query.is_empty() {
|
||||||
all_commands
|
all_commands
|
||||||
} else {
|
} else {
|
||||||
@@ -241,7 +251,11 @@ impl PickerDelegate for SlashCommandDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: PopoverTrigger> RenderOnce for SlashCommandSelector<T> {
|
impl<T, TT> RenderOnce for SlashCommandSelector<T, TT>
|
||||||
|
where
|
||||||
|
T: PopoverTrigger + ButtonCommon,
|
||||||
|
TT: Fn(&mut Window, &mut App) -> AnyView + 'static,
|
||||||
|
{
|
||||||
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
|
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||||
let all_models = self
|
let all_models = self
|
||||||
.working_set
|
.working_set
|
||||||
@@ -322,7 +336,7 @@ impl<T: PopoverTrigger> RenderOnce for SlashCommandSelector<T> {
|
|||||||
.ok();
|
.ok();
|
||||||
PopoverMenu::new("model-switcher")
|
PopoverMenu::new("model-switcher")
|
||||||
.menu(move |_window, _cx| Some(picker_view.clone()))
|
.menu(move |_window, _cx| Some(picker_view.clone()))
|
||||||
.trigger(self.trigger)
|
.trigger_with_tooltip(self.trigger, self.tooltip)
|
||||||
.attach(gpui::Corner::TopLeft)
|
.attach(gpui::Corner::TopLeft)
|
||||||
.anchor(gpui::Corner::BottomLeft)
|
.anchor(gpui::Corner::BottomLeft)
|
||||||
.offset(gpui::Point {
|
.offset(gpui::Point {
|
||||||
|
|||||||
@@ -359,6 +359,7 @@ fn providers_schema(_: &mut schemars::gen::SchemaGenerator) -> schemars::schema:
|
|||||||
schemars::schema::SchemaObject {
|
schemars::schema::SchemaObject {
|
||||||
enum_values: Some(vec![
|
enum_values: Some(vec![
|
||||||
"anthropic".into(),
|
"anthropic".into(),
|
||||||
|
"bedrock".into(),
|
||||||
"google".into(),
|
"google".into(),
|
||||||
"lmstudio".into(),
|
"lmstudio".into(),
|
||||||
"ollama".into(),
|
"ollama".into(),
|
||||||
@@ -434,7 +435,7 @@ pub struct LegacyAssistantSettingsContent {
|
|||||||
pub default_open_ai_model: Option<OpenAiModel>,
|
pub default_open_ai_model: Option<OpenAiModel>,
|
||||||
/// OpenAI API base URL to use when creating new chats.
|
/// OpenAI API base URL to use when creating new chats.
|
||||||
///
|
///
|
||||||
/// Default: https://api.openai.com/v1
|
/// Default: <https://api.openai.com/v1>
|
||||||
pub openai_api_url: Option<String>,
|
pub openai_api_url: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -512,7 +513,7 @@ mod tests {
|
|||||||
AssistantSettings::get_global(cx).default_model,
|
AssistantSettings::get_global(cx).default_model,
|
||||||
LanguageModelSelection {
|
LanguageModelSelection {
|
||||||
provider: "zed.dev".into(),
|
provider: "zed.dev".into(),
|
||||||
model: "claude-3-5-sonnet".into(),
|
model: "claude-3-5-sonnet-latest".into(),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ impl SlashCommand for ExtensionSlashCommand {
|
|||||||
) -> Task<Result<Vec<ArgumentCompletion>>> {
|
) -> Task<Result<Vec<ArgumentCompletion>>> {
|
||||||
let command = self.command.clone();
|
let command = self.command.clone();
|
||||||
let arguments = arguments.to_owned();
|
let arguments = arguments.to_owned();
|
||||||
cx.background_executor().spawn(async move {
|
cx.background_spawn(async move {
|
||||||
let completions = self
|
let completions = self
|
||||||
.extension
|
.extension
|
||||||
.complete_slash_command_argument(command, arguments)
|
.complete_slash_command_argument(command, arguments)
|
||||||
@@ -135,7 +135,7 @@ impl SlashCommand for ExtensionSlashCommand {
|
|||||||
) -> Task<SlashCommandResult> {
|
) -> Task<SlashCommandResult> {
|
||||||
let command = self.command.clone();
|
let command = self.command.clone();
|
||||||
let arguments = arguments.to_owned();
|
let arguments = arguments.to_owned();
|
||||||
let output = cx.background_executor().spawn(async move {
|
let output = cx.background_spawn(async move {
|
||||||
let delegate =
|
let delegate =
|
||||||
delegate.map(|delegate| Arc::new(WorktreeDelegateAdapter(delegate.clone())) as _);
|
delegate.map(|delegate| Arc::new(WorktreeDelegateAdapter(delegate.clone())) as _);
|
||||||
let output = self
|
let output = self
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ impl SlashCommand for AutoCommand {
|
|||||||
project_index.flush_summary_backlogs(cx)
|
project_index.flush_summary_backlogs(cx)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
cx.background_executor().spawn(task).await;
|
cx.background_spawn(task).await;
|
||||||
|
|
||||||
anyhow::Ok(Vec::new())
|
anyhow::Ok(Vec::new())
|
||||||
})
|
})
|
||||||
@@ -129,7 +129,7 @@ impl SlashCommand for AutoCommand {
|
|||||||
// so you don't have to write it again.
|
// so you don't have to write it again.
|
||||||
let original_prompt = argument.to_string();
|
let original_prompt = argument.to_string();
|
||||||
|
|
||||||
cx.background_executor().spawn(async move {
|
cx.background_spawn(async move {
|
||||||
let commands = task.await?;
|
let commands = task.await?;
|
||||||
let mut prompt = String::new();
|
let mut prompt = String::new();
|
||||||
|
|
||||||
@@ -285,57 +285,56 @@ async fn commands_for_summaries(
|
|||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
cx.background_executor()
|
cx.background_spawn(async move {
|
||||||
.spawn(async move {
|
let futures = completion_streams
|
||||||
let futures = completion_streams
|
.into_iter()
|
||||||
.into_iter()
|
.enumerate()
|
||||||
.enumerate()
|
.map(|(ix, (stream, tx))| async move {
|
||||||
.map(|(ix, (stream, tx))| async move {
|
let start = std::time::Instant::now();
|
||||||
let start = std::time::Instant::now();
|
let events = stream.await?;
|
||||||
let events = stream.await?;
|
log::info!("Time taken for awaiting /await chunk stream #{ix}: {:?}", start.elapsed());
|
||||||
log::info!("Time taken for awaiting /await chunk stream #{ix}: {:?}", start.elapsed());
|
|
||||||
|
|
||||||
let completion: String = events
|
let completion: String = events
|
||||||
.filter_map(|event| async {
|
.filter_map(|event| async {
|
||||||
if let Ok(LanguageModelCompletionEvent::Text(text)) = event {
|
if let Ok(LanguageModelCompletionEvent::Text(text)) = event {
|
||||||
Some(text)
|
Some(text)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
|
||||||
})
|
|
||||||
.collect()
|
|
||||||
.await;
|
|
||||||
|
|
||||||
log::info!("Time taken for all /auto chunks to come back for #{ix}: {:?}", start.elapsed());
|
|
||||||
|
|
||||||
for line in completion.split('\n') {
|
|
||||||
if let Some(first_space) = line.find(' ') {
|
|
||||||
let command = &line[..first_space].trim();
|
|
||||||
let arg = &line[first_space..].trim();
|
|
||||||
|
|
||||||
tx.send(CommandToRun {
|
|
||||||
name: command.to_string(),
|
|
||||||
arg: arg.to_string(),
|
|
||||||
})
|
|
||||||
.await?;
|
|
||||||
} else if !line.trim().is_empty() {
|
|
||||||
// All slash-commands currently supported in context inference need a space for the argument.
|
|
||||||
log::warn!(
|
|
||||||
"Context inference returned a non-blank line that contained no spaces (meaning no argument for the slash command): {:?}",
|
|
||||||
line
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
.await;
|
||||||
|
|
||||||
|
log::info!("Time taken for all /auto chunks to come back for #{ix}: {:?}", start.elapsed());
|
||||||
|
|
||||||
|
for line in completion.split('\n') {
|
||||||
|
if let Some(first_space) = line.find(' ') {
|
||||||
|
let command = &line[..first_space].trim();
|
||||||
|
let arg = &line[first_space..].trim();
|
||||||
|
|
||||||
|
tx.send(CommandToRun {
|
||||||
|
name: command.to_string(),
|
||||||
|
arg: arg.to_string(),
|
||||||
|
})
|
||||||
|
.await?;
|
||||||
|
} else if !line.trim().is_empty() {
|
||||||
|
// All slash-commands currently supported in context inference need a space for the argument.
|
||||||
|
log::warn!(
|
||||||
|
"Context inference returned a non-blank line that contained no spaces (meaning no argument for the slash command): {:?}",
|
||||||
|
line
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
anyhow::Ok(())
|
anyhow::Ok(())
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let _ = futures::future::try_join_all(futures).await.log_err();
|
let _ = futures::future::try_join_all(futures).await.log_err();
|
||||||
|
|
||||||
let duration = all_start.elapsed();
|
let duration = all_start.elapsed();
|
||||||
eprintln!("All futures completed in {:?}", duration);
|
eprintln!("All futures completed in {:?}", duration);
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
drop(tx); // Close the channel so that rx.collect() won't hang. This is safe because all futures have completed.
|
drop(tx); // Close the channel so that rx.collect() won't hang. This is safe because all futures have completed.
|
||||||
|
|||||||