Compare commits
1086 Commits
v0.63.3.de
...
v0.69.1.de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29471b8019 | ||
|
|
cad661f0c8 | ||
|
|
261d770482 | ||
|
|
a75c9c74fd | ||
|
|
8b5bdf9a16 | ||
|
|
e35eba2d51 | ||
|
|
df8c88cef4 | ||
|
|
844e12769c | ||
|
|
b982626ac4 | ||
|
|
517b2b42a6 | ||
|
|
6778c33628 | ||
|
|
bc0b11e1ef | ||
|
|
6b0d4b9c93 | ||
|
|
7d4e4f029e | ||
|
|
1fbdb629ff | ||
|
|
a437237947 | ||
|
|
910637c549 | ||
|
|
e8974a3e69 | ||
|
|
6c98310f7f | ||
|
|
72aed0d26d | ||
|
|
e10ef8b9e0 | ||
|
|
39fa8ba831 | ||
|
|
8ee8279044 | ||
|
|
c3f85c3bb2 | ||
|
|
ad59c4cbf3 | ||
|
|
26bc981981 | ||
|
|
514c34b242 | ||
|
|
6f266c0090 | ||
|
|
baa7352ca6 | ||
|
|
fdb1c8d99a | ||
|
|
79f5dba094 | ||
|
|
2134965f16 | ||
|
|
77b7a59a27 | ||
|
|
365e7126d0 | ||
|
|
d3daf9d159 | ||
|
|
8d59a519a6 | ||
|
|
239262f360 | ||
|
|
9eb938fd6f | ||
|
|
3fcbf1a43f | ||
|
|
2b7ee271df | ||
|
|
11512c6281 | ||
|
|
b16ba547ab | ||
|
|
e5b8899b4c | ||
|
|
fee3e9e63b | ||
|
|
57a24d30b5 | ||
|
|
5a83610fb1 | ||
|
|
96086f12c6 | ||
|
|
a6ee3ce07f | ||
|
|
5f36ddd425 | ||
|
|
bec67074e0 | ||
|
|
895c92cdae | ||
|
|
7406a5bc26 | ||
|
|
ef97714404 | ||
|
|
6d6daee511 | ||
|
|
32cd1c2a65 | ||
|
|
abad920a8a | ||
|
|
e1ab49e100 | ||
|
|
df300e89a2 | ||
|
|
9a278bed21 | ||
|
|
4a7fc084ce | ||
|
|
2649e736fb | ||
|
|
42ac891e28 | ||
|
|
4dc3b9072e | ||
|
|
ae3235b099 | ||
|
|
7cc5e0d577 | ||
|
|
f6b956dc8e | ||
|
|
fcb2bacd1e | ||
|
|
a9401e921e | ||
|
|
02e7e315b2 | ||
|
|
def72a64e0 | ||
|
|
46e7672197 | ||
|
|
2f8a5ce935 | ||
|
|
730e5bd831 | ||
|
|
b7984a05af | ||
|
|
5d4af67186 | ||
|
|
370e08cf4d | ||
|
|
aaf7e3f943 | ||
|
|
fbde0936e7 | ||
|
|
af48f7bab4 | ||
|
|
61def89878 | ||
|
|
88e86cee77 | ||
|
|
acc1625406 | ||
|
|
502f448053 | ||
|
|
55b081884c | ||
|
|
fd67171908 | ||
|
|
16a53aa641 | ||
|
|
4aec676950 | ||
|
|
d8fff0e90a | ||
|
|
57ad6cc3ea | ||
|
|
2b46a8b9c9 | ||
|
|
4d1a2e8c53 | ||
|
|
58b1409bd2 | ||
|
|
a2525dbf56 | ||
|
|
36eb2a31b5 | ||
|
|
0483bfc9cb | ||
|
|
3f63a64254 | ||
|
|
16332b285f | ||
|
|
f7371f6faf | ||
|
|
92d29805f1 | ||
|
|
4a37d07acb | ||
|
|
bb4c61e9cc | ||
|
|
f4e5515c82 | ||
|
|
141a2df19c | ||
|
|
e2385b4922 | ||
|
|
9974fb50f7 | ||
|
|
c5d51d62c4 | ||
|
|
4fcbf28f91 | ||
|
|
f678b664ff | ||
|
|
4206920a7d | ||
|
|
ad2e5ead54 | ||
|
|
eb72719117 | ||
|
|
20b46afbf2 | ||
|
|
1925e4a7f4 | ||
|
|
1a12322354 | ||
|
|
73f3f4ec7e | ||
|
|
a8c42f453a | ||
|
|
79dd0c5ba6 | ||
|
|
89bc3b6b16 | ||
|
|
a997dd6c49 | ||
|
|
6aa80d2a4c | ||
|
|
f009e8fb14 | ||
|
|
a8dde17155 | ||
|
|
cbcbff341b | ||
|
|
e50992bb93 | ||
|
|
fa6c3068c0 | ||
|
|
dd9bdca572 | ||
|
|
3f7dffe47d | ||
|
|
c7fde14458 | ||
|
|
57f4186cad | ||
|
|
fa5a6021b1 | ||
|
|
42ae279b91 | ||
|
|
a74cdbfc28 | ||
|
|
a56fa567dd | ||
|
|
c9c2d5ab6f | ||
|
|
ccf460c1f7 | ||
|
|
2325f542b8 | ||
|
|
63fdf3f3f6 | ||
|
|
efa83bdf34 | ||
|
|
5705bda818 | ||
|
|
20042334ff | ||
|
|
7ae9569816 | ||
|
|
cacba526b3 | ||
|
|
50f203cc8a | ||
|
|
3efcd154f3 | ||
|
|
bdb08d7c78 | ||
|
|
f3874dd40a | ||
|
|
935c39e341 | ||
|
|
7ddcc30e8d | ||
|
|
13ff038e58 | ||
|
|
1d4918dfbf | ||
|
|
ba14ab96da | ||
|
|
054e0820b7 | ||
|
|
af3d8dd6a7 | ||
|
|
e10d06cb47 | ||
|
|
87a1469c1e | ||
|
|
2492f1635c | ||
|
|
b3305e6e19 | ||
|
|
491d3e6606 | ||
|
|
e41bf67f73 | ||
|
|
66b99c4fa0 | ||
|
|
f2f2645fe6 | ||
|
|
4c77d0509a | ||
|
|
33d77f4355 | ||
|
|
ecf8617246 | ||
|
|
bec216d72a | ||
|
|
374e8c3307 | ||
|
|
b5eff8a9dd | ||
|
|
d53002a494 | ||
|
|
04662f0875 | ||
|
|
aec92c7c17 | ||
|
|
f7a7976923 | ||
|
|
1b50d4507f | ||
|
|
045cf887df | ||
|
|
277d7c0e04 | ||
|
|
0e2c703e77 | ||
|
|
62b3f38f00 | ||
|
|
422658293d | ||
|
|
74cfd05642 | ||
|
|
80586f1de3 | ||
|
|
a933177ac0 | ||
|
|
ade2db696b | ||
|
|
cf266037ff | ||
|
|
5f14277fbf | ||
|
|
b677349ec9 | ||
|
|
7f72d2a703 | ||
|
|
779983cb85 | ||
|
|
f2d2ab51b1 | ||
|
|
0a54f8c4a7 | ||
|
|
881527ddd0 | ||
|
|
cca4f894a8 | ||
|
|
20dae33be5 | ||
|
|
fd301c519d | ||
|
|
a96d87814b | ||
|
|
2a3eefc5be | ||
|
|
c5dc10e3cd | ||
|
|
c251a93609 | ||
|
|
2df509effd | ||
|
|
53e0d670b3 | ||
|
|
ccd19d2c96 | ||
|
|
b69f084db9 | ||
|
|
9639395937 | ||
|
|
117b7afd81 | ||
|
|
009c4dc8db | ||
|
|
0fdf3fc851 | ||
|
|
ffc2d91cef | ||
|
|
99975c8ff7 | ||
|
|
d44fd6b46d | ||
|
|
bd0a1426d7 | ||
|
|
353d144039 | ||
|
|
6efdf8a7f4 | ||
|
|
623770e24b | ||
|
|
402940a215 | ||
|
|
7fea85cdcd | ||
|
|
93b3b7a184 | ||
|
|
8f2a84629a | ||
|
|
7a1c1982f0 | ||
|
|
75d8982b23 | ||
|
|
87dbb56d7e | ||
|
|
aa217a3a43 | ||
|
|
22fc961dc0 | ||
|
|
8f57186945 | ||
|
|
f8277c55a8 | ||
|
|
6163713e34 | ||
|
|
d2d5887936 | ||
|
|
2a1065efc1 | ||
|
|
6f36a97c4a | ||
|
|
eeed79009a | ||
|
|
9930057171 | ||
|
|
e14c84f2fb | ||
|
|
a664c3dd47 | ||
|
|
73205b1f8c | ||
|
|
3016d7b8f3 | ||
|
|
beb3ddaa1f | ||
|
|
8db48fb4f1 | ||
|
|
6eb3641c1d | ||
|
|
8cfd64a7be | ||
|
|
e8d9ef269b | ||
|
|
80f83da9b8 | ||
|
|
6b8e235f88 | ||
|
|
a1d558a960 | ||
|
|
071ec80e2a | ||
|
|
995541db2e | ||
|
|
9121026856 | ||
|
|
341419788e | ||
|
|
f8f69fadc4 | ||
|
|
4830d82a73 | ||
|
|
f3a228c79a | ||
|
|
4bf96aaca0 | ||
|
|
a8a026d509 | ||
|
|
e1fd506269 | ||
|
|
63e86b5673 | ||
|
|
238299c759 | ||
|
|
4e9272e31c | ||
|
|
8f92c32693 | ||
|
|
699e283890 | ||
|
|
c51afc952c | ||
|
|
8fc030ba83 | ||
|
|
b754757c94 | ||
|
|
16bb40406a | ||
|
|
290ae04988 | ||
|
|
5c6f0e4d32 | ||
|
|
14143243b1 | ||
|
|
0e2c0c78f2 | ||
|
|
2a8e1f41d0 | ||
|
|
4e1d18e206 | ||
|
|
ff5a947a16 | ||
|
|
26ddb1e479 | ||
|
|
b2ddfd21c1 | ||
|
|
efe9268bcb | ||
|
|
974e618541 | ||
|
|
d09d281a8d | ||
|
|
43f3f54063 | ||
|
|
2b303e162c | ||
|
|
3947a755b1 | ||
|
|
0b764f4cb8 | ||
|
|
a0101c14a6 | ||
|
|
a4dcde2fc2 | ||
|
|
f6f5955753 | ||
|
|
d87f9fbd79 | ||
|
|
4c2bc47bf3 | ||
|
|
0d983d504b | ||
|
|
f26ccfa3e9 | ||
|
|
1ec6ba35e0 | ||
|
|
0378ea40e7 | ||
|
|
656250dd33 | ||
|
|
b914fa6da8 | ||
|
|
db77ec43a7 | ||
|
|
1a9d4bfb1c | ||
|
|
7180cb049c | ||
|
|
7e2769d8df | ||
|
|
23faeeb5d0 | ||
|
|
1e689a69a8 | ||
|
|
19004c0bad | ||
|
|
82059bb454 | ||
|
|
3fc846471e | ||
|
|
5379d45184 | ||
|
|
65b8bf6834 | ||
|
|
107dfcac65 | ||
|
|
2a29d077ee | ||
|
|
3d7f1f39ce | ||
|
|
51c02da206 | ||
|
|
16250e1b7c | ||
|
|
3e02c5e4a8 | ||
|
|
40da942bfe | ||
|
|
44909912cd | ||
|
|
631ee98738 | ||
|
|
0b68eea44a | ||
|
|
47743e7f90 | ||
|
|
b2da3545f9 | ||
|
|
fb005dd01b | ||
|
|
5b2bd90071 | ||
|
|
25e258e26a | ||
|
|
75d24974ec | ||
|
|
981bd950da | ||
|
|
0ca1886695 | ||
|
|
bf2f9e0f7e | ||
|
|
d74f1c22ff | ||
|
|
882e09f253 | ||
|
|
ce05c0e13d | ||
|
|
45c92f0868 | ||
|
|
e952f90b4c | ||
|
|
97bf5e8d69 | ||
|
|
ee7bb71a05 | ||
|
|
791cbab6f6 | ||
|
|
e001b7fb46 | ||
|
|
d8a75bef48 | ||
|
|
cfc4b79a05 | ||
|
|
fb3e5c9aab | ||
|
|
6796d8f124 | ||
|
|
154cb463e5 | ||
|
|
e9ce04ffe9 | ||
|
|
7a3fd11b6b | ||
|
|
e885f848a6 | ||
|
|
8343f074a2 | ||
|
|
cbadfd59db | ||
|
|
5d5fed62f2 | ||
|
|
c3d6484f6c | ||
|
|
315abec49c | ||
|
|
221b382e69 | ||
|
|
5fdbfef028 | ||
|
|
2cc671df75 | ||
|
|
ddbe2853ea | ||
|
|
2ab1b4b1c2 | ||
|
|
c5adc92f8b | ||
|
|
96b6056411 | ||
|
|
1108566e99 | ||
|
|
a54a5ee80d | ||
|
|
d57bc3ff01 | ||
|
|
f02dca2dd8 | ||
|
|
ad186701d3 | ||
|
|
a04b9ea053 | ||
|
|
41e6fb961b | ||
|
|
b2b43d2bd3 | ||
|
|
90339f9741 | ||
|
|
260806053b | ||
|
|
93c9bdcec7 | ||
|
|
935832028a | ||
|
|
c08f09b06b | ||
|
|
16410cf263 | ||
|
|
c62dde4c9c | ||
|
|
3fef1babcb | ||
|
|
59af7ed3bb | ||
|
|
ee4206099a | ||
|
|
8c1d9bffcd | ||
|
|
a3a510308c | ||
|
|
97e292e251 | ||
|
|
4c5aa6a326 | ||
|
|
d1dd40590f | ||
|
|
c4764fa4d8 | ||
|
|
5dedb39048 | ||
|
|
bc759a32e3 | ||
|
|
dcc0841443 | ||
|
|
9b0388d00a | ||
|
|
99a1e42381 | ||
|
|
9b4df54432 | ||
|
|
aac0c0f037 | ||
|
|
a8f20196b2 | ||
|
|
a8bae3fb01 | ||
|
|
e8ccc030c0 | ||
|
|
aa6d9779d3 | ||
|
|
b1dbf340b8 | ||
|
|
27540d16ed | ||
|
|
2e63f62215 | ||
|
|
633ba293a3 | ||
|
|
679c960ea1 | ||
|
|
cf91101a48 | ||
|
|
344d90aea0 | ||
|
|
8b7fa6f845 | ||
|
|
2eb7f78248 | ||
|
|
9a5925b1ad | ||
|
|
60f2da370f | ||
|
|
7ee69628a3 | ||
|
|
a64f14db51 | ||
|
|
1c84fc97a1 | ||
|
|
8b371ead92 | ||
|
|
14417f70af | ||
|
|
96c6d408fb | ||
|
|
cd922e919e | ||
|
|
c56f06fbcb | ||
|
|
21dffa26b9 | ||
|
|
a131d5ad35 | ||
|
|
b5dbb1d39d | ||
|
|
bd3231d8dd | ||
|
|
4d96de3514 | ||
|
|
c9df6c11c5 | ||
|
|
56aaa08224 | ||
|
|
014aeccde6 | ||
|
|
dcfa993806 | ||
|
|
69688cffd6 | ||
|
|
769a31b7e3 | ||
|
|
78c20a8c25 | ||
|
|
bb1b3fdca1 | ||
|
|
f872b20a97 | ||
|
|
f36239712f | ||
|
|
74108dd680 | ||
|
|
16af1751a6 | ||
|
|
b0e138952e | ||
|
|
1271c037ef | ||
|
|
36b59ba617 | ||
|
|
b671db7108 | ||
|
|
9304b80b69 | ||
|
|
03c2964364 | ||
|
|
49c78f2797 | ||
|
|
1a8d112055 | ||
|
|
7b193d693f | ||
|
|
e8fa5c36c2 | ||
|
|
c9a27ba6ac | ||
|
|
a6e162c37a | ||
|
|
9c55b7a317 | ||
|
|
4ef4e8cd72 | ||
|
|
e9942737c6 | ||
|
|
5c208dba41 | ||
|
|
ba032ce60e | ||
|
|
2fe0dda8af | ||
|
|
97daff4a10 | ||
|
|
caeceb58a5 | ||
|
|
3739d48e52 | ||
|
|
858fdb02ec | ||
|
|
b0cbb071e6 | ||
|
|
f222739b0d | ||
|
|
a280f5d5b2 | ||
|
|
cef333a01c | ||
|
|
24bd016a1a | ||
|
|
3c44f824cb | ||
|
|
3ee78ef557 | ||
|
|
d9b1bcbdcc | ||
|
|
283dd0b1f1 | ||
|
|
56345ddef9 | ||
|
|
4631008f8c | ||
|
|
e2ebde75be | ||
|
|
91613fcbf7 | ||
|
|
0b279143cc | ||
|
|
ade4847c61 | ||
|
|
a3e7203331 | ||
|
|
bbabd38a48 | ||
|
|
eb996c1e42 | ||
|
|
bf0ad4cda1 | ||
|
|
c32af6536a | ||
|
|
2437f9b051 | ||
|
|
0b781174bd | ||
|
|
f448d3e2db | ||
|
|
6b4222ec48 | ||
|
|
3f770cc5c0 | ||
|
|
14902f5b9a | ||
|
|
efdeb13bf5 | ||
|
|
62558291b6 | ||
|
|
edb0120bbf | ||
|
|
0dbaec553f | ||
|
|
295040c94c | ||
|
|
c1c4193b1d | ||
|
|
d17f0a9e1f | ||
|
|
871030dadb | ||
|
|
0ee9b74c0f | ||
|
|
82929f650c | ||
|
|
37b31c46bd | ||
|
|
c682bd858a | ||
|
|
2439891ee0 | ||
|
|
23825cafe7 | ||
|
|
a8f6f1fce2 | ||
|
|
e11faadf39 | ||
|
|
2c7251f4b9 | ||
|
|
fb9f18fc9c | ||
|
|
93cd3d0d8b | ||
|
|
ed2479ea82 | ||
|
|
accde0bfd0 | ||
|
|
7b34d9e4f4 | ||
|
|
6af71951af | ||
|
|
3eed45dc3e | ||
|
|
320b059bc7 | ||
|
|
a89ce06377 | ||
|
|
e4a1d6fe89 | ||
|
|
93c625bb81 | ||
|
|
87f84fb82d | ||
|
|
ce9e76a7dc | ||
|
|
4f3f1c5e23 | ||
|
|
22076d401f | ||
|
|
79ea82f147 | ||
|
|
3785415632 | ||
|
|
35eda73ad1 | ||
|
|
c8282fc8d3 | ||
|
|
5030881934 | ||
|
|
bc1e3a7059 | ||
|
|
ba17dceb4d | ||
|
|
4e689e20e9 | ||
|
|
2f78b6f7f3 | ||
|
|
920917a47e | ||
|
|
c1a7784781 | ||
|
|
62109f4ab1 | ||
|
|
c3a9c05455 | ||
|
|
333e4aa362 | ||
|
|
59ce26f28a | ||
|
|
2ff63aaebf | ||
|
|
8cf72a4409 | ||
|
|
496b92536f | ||
|
|
ac7900ecd7 | ||
|
|
310832f111 | ||
|
|
f69dd0ef8d | ||
|
|
4b51bb2334 | ||
|
|
0d4f9f00ee | ||
|
|
4a0100271f | ||
|
|
52a467806a | ||
|
|
0fedecff58 | ||
|
|
da4cb0aa62 | ||
|
|
3b8a771909 | ||
|
|
f9bcfa14e0 | ||
|
|
11c2eab967 | ||
|
|
094d2e12a4 | ||
|
|
af195a610c | ||
|
|
f7a05cf077 | ||
|
|
d54fbd6592 | ||
|
|
41b0868165 | ||
|
|
a1f5bfb746 | ||
|
|
3ab1018c66 | ||
|
|
62e96372fa | ||
|
|
945d10f554 | ||
|
|
f44e5ae5f9 | ||
|
|
a67b665846 | ||
|
|
8fb23b414c | ||
|
|
f5100626a8 | ||
|
|
9ab46fade7 | ||
|
|
2ce01b157b | ||
|
|
f714e42e11 | ||
|
|
447b7af573 | ||
|
|
ec2b635a1a | ||
|
|
7465b4bf91 | ||
|
|
4580fac6fa | ||
|
|
8c218e9edc | ||
|
|
44ceb8f1a0 | ||
|
|
642c1c50fb | ||
|
|
4de8c25a3f | ||
|
|
565f08a8e9 | ||
|
|
a85ae206c9 | ||
|
|
9e9b5e8d46 | ||
|
|
b623141a8f | ||
|
|
631cdc37c4 | ||
|
|
8d50bc0ef1 | ||
|
|
ae395fbb8f | ||
|
|
10877a99f1 | ||
|
|
0faff91c72 | ||
|
|
00f79fecd0 | ||
|
|
203128d935 | ||
|
|
4f6e52aed0 | ||
|
|
7bc7b2e3da | ||
|
|
27f0ca3b08 | ||
|
|
2337b2bb3e | ||
|
|
48ea13e130 | ||
|
|
5c73ab26c0 | ||
|
|
947e4ce71d | ||
|
|
200295e3ee | ||
|
|
ded5fe5ec0 | ||
|
|
7dffa943fa | ||
|
|
f702f67e27 | ||
|
|
a64956406d | ||
|
|
9c8bde2cff | ||
|
|
70a282ebf1 | ||
|
|
415652d38e | ||
|
|
1a745e4fa9 | ||
|
|
973e86df27 | ||
|
|
1f2917681f | ||
|
|
28d1feacf5 | ||
|
|
cf4ef8605d | ||
|
|
4be3728273 | ||
|
|
34b8c3f47c | ||
|
|
309893fd1e | ||
|
|
705eb06e8d | ||
|
|
5cfcf255e9 | ||
|
|
b8f36c8277 | ||
|
|
73c1dc697f | ||
|
|
a9c4647461 | ||
|
|
aaeaa24153 | ||
|
|
59a7494770 | ||
|
|
b2232cda7b | ||
|
|
3ba4aca268 | ||
|
|
f45533e20b | ||
|
|
2e7c5d6cfa | ||
|
|
476acc7715 | ||
|
|
ab3b50296c | ||
|
|
60c29b2839 | ||
|
|
7972f5f4bc | ||
|
|
83a6865eb3 | ||
|
|
29a9b650ed | ||
|
|
dd48b740f9 | ||
|
|
401ce7a63d | ||
|
|
8218d085f7 | ||
|
|
abb3c936f7 | ||
|
|
0cb5aca81e | ||
|
|
554d274fff | ||
|
|
13318219db | ||
|
|
474944fe74 | ||
|
|
d1a49cd9ce | ||
|
|
139d89d817 | ||
|
|
61759f984c | ||
|
|
a73e77a819 | ||
|
|
b5f1659382 | ||
|
|
beb6722f57 | ||
|
|
a052b89152 | ||
|
|
95b391350f | ||
|
|
5773eac03f | ||
|
|
da4ace2875 | ||
|
|
e507c5b502 | ||
|
|
722c2c2668 | ||
|
|
8e7bfef9f1 | ||
|
|
1811f0d0d5 | ||
|
|
6b9d534fe2 | ||
|
|
dc4562a845 | ||
|
|
c15af63bc9 | ||
|
|
5b68c2c7d9 | ||
|
|
b70e0bd1f6 | ||
|
|
743f0f5540 | ||
|
|
e647a5b733 | ||
|
|
df1d259e42 | ||
|
|
e3efab7fbf | ||
|
|
cd79f7f4b0 | ||
|
|
5d175745bf | ||
|
|
e648bac74b | ||
|
|
e5c0ebd0a0 | ||
|
|
608a43402c | ||
|
|
75bc2dd564 | ||
|
|
bbd81c3cf7 | ||
|
|
301eb7c74d | ||
|
|
a756039f27 | ||
|
|
b4d1b71ee7 | ||
|
|
8d85a4754d | ||
|
|
a1b48049a9 | ||
|
|
6789844c1f | ||
|
|
c602a839ca | ||
|
|
01c7793e90 | ||
|
|
47b013b034 | ||
|
|
dc2047804a | ||
|
|
885e5cbd7c | ||
|
|
635a5196e8 | ||
|
|
cbd339190b | ||
|
|
266093189d | ||
|
|
62b02d4370 | ||
|
|
8546a1dc86 | ||
|
|
ae98bf237f | ||
|
|
0398deb005 | ||
|
|
3a1492977b | ||
|
|
ef40a456e8 | ||
|
|
583b78c0c1 | ||
|
|
c0988de581 | ||
|
|
34a190e29b | ||
|
|
0940598708 | ||
|
|
7e6cbb3efa | ||
|
|
7dc4e00c75 | ||
|
|
8a598eacaf | ||
|
|
8592fad9cd | ||
|
|
fa72a89d35 | ||
|
|
5e99c51d93 | ||
|
|
905976e765 | ||
|
|
3ebd47d3db | ||
|
|
bf4c7c475a | ||
|
|
bf38371971 | ||
|
|
18460f4f91 | ||
|
|
f94e3e6aba | ||
|
|
1647da2942 | ||
|
|
86e2cdb1fb | ||
|
|
764702a377 | ||
|
|
837a97ffdf | ||
|
|
217e9b96d8 | ||
|
|
524274fcf4 | ||
|
|
6d5f576b92 | ||
|
|
445f9fa7df | ||
|
|
2ff3a23606 | ||
|
|
c5ce57ea7f | ||
|
|
351b8e50f0 | ||
|
|
68be6c5742 | ||
|
|
7a34a2dfa9 | ||
|
|
49ce9e1209 | ||
|
|
c84e192324 | ||
|
|
d696673f07 | ||
|
|
2957d463c9 | ||
|
|
af48e50898 | ||
|
|
f4b964a4b8 | ||
|
|
a79ce7a151 | ||
|
|
21bb83c55a | ||
|
|
7122ceb16c | ||
|
|
f9bcfe341c | ||
|
|
13c5bfdd88 | ||
|
|
bf79c2cb99 | ||
|
|
325cdfcf57 | ||
|
|
7d14d4ade9 | ||
|
|
1b7d12194e | ||
|
|
91f238aded | ||
|
|
78ff489995 | ||
|
|
ff791439e2 | ||
|
|
3f8b2d6b99 | ||
|
|
4dcbce58ed | ||
|
|
0427deb897 | ||
|
|
f3eb3409e3 | ||
|
|
86619052ca | ||
|
|
0c59d3234e | ||
|
|
939d7ea3fb | ||
|
|
dc8761763d | ||
|
|
4894914db1 | ||
|
|
aee94a0584 | ||
|
|
c550422168 | ||
|
|
cebd9cabb3 | ||
|
|
3f16652d56 | ||
|
|
2ebf48ca71 | ||
|
|
c2f184f5bb | ||
|
|
e56651e5c0 | ||
|
|
1d09e96127 | ||
|
|
73de0ea8be | ||
|
|
757eac0579 | ||
|
|
bb78e2f57f | ||
|
|
92579243c5 | ||
|
|
8d0ba40d67 | ||
|
|
ff8c1aace9 | ||
|
|
cf74dc9b48 | ||
|
|
e63df83091 | ||
|
|
14522dbbcd | ||
|
|
91daea9e01 | ||
|
|
12b789fc4e | ||
|
|
baa13351a6 | ||
|
|
8f83204f0f | ||
|
|
80f5b60e1d | ||
|
|
54525f6696 | ||
|
|
3dc50216b5 | ||
|
|
324430a696 | ||
|
|
65d7957610 | ||
|
|
6ac4993cf2 | ||
|
|
100744a952 | ||
|
|
3a331e55dc | ||
|
|
a57f81ba5f | ||
|
|
ca0b55fbbf | ||
|
|
38a3cf98dd | ||
|
|
1234ad92e5 | ||
|
|
488edc24ce | ||
|
|
307c23631a | ||
|
|
83d2241883 | ||
|
|
f9126416e8 | ||
|
|
4e9ae16cb3 | ||
|
|
ef8bfdffa7 | ||
|
|
bfb090331f | ||
|
|
5506d0f25b | ||
|
|
6ebd2d0883 | ||
|
|
a16dcaba4e | ||
|
|
f06452c6c5 | ||
|
|
6a0a97cb41 | ||
|
|
711102b438 | ||
|
|
6d53eb0aaa | ||
|
|
0ccf04a2c5 | ||
|
|
070ce35b44 | ||
|
|
a8296e5de5 | ||
|
|
d17f25e975 | ||
|
|
23095ada85 | ||
|
|
f9ef161991 | ||
|
|
28004bae2f | ||
|
|
17aef7be7d | ||
|
|
ebba8f5110 | ||
|
|
dbd7f51f5c | ||
|
|
fbadfcfa7c | ||
|
|
2c12234604 | ||
|
|
13cb6a315c | ||
|
|
48e7376002 | ||
|
|
60d82eddee | ||
|
|
30ee89c7e9 | ||
|
|
25bcea6aec | ||
|
|
488c88da91 | ||
|
|
8fdcd92260 | ||
|
|
781a40df52 | ||
|
|
2412c81d92 | ||
|
|
a7fc0f9d2e | ||
|
|
9eab021a50 | ||
|
|
c189a52e5e | ||
|
|
6d6d763dd3 | ||
|
|
3cfbaa0ed6 | ||
|
|
e1b4571fdf | ||
|
|
08027ea9c4 | ||
|
|
d0528a00c1 | ||
|
|
7ae6a2ba9a | ||
|
|
ad0e5c4770 | ||
|
|
51b181d5fb | ||
|
|
2785b0a857 | ||
|
|
45a113ff9e | ||
|
|
cee59c2ca3 | ||
|
|
5cb9b242e2 | ||
|
|
1ed48de928 | ||
|
|
c4e4bc71ed | ||
|
|
ed0763706b | ||
|
|
1c79d517fc | ||
|
|
1a7a2f3088 | ||
|
|
4199789786 | ||
|
|
c9b0941d1f | ||
|
|
3d544136d2 | ||
|
|
8448eff1eb | ||
|
|
a3dde4599a | ||
|
|
3d7440c673 | ||
|
|
8f41006eba | ||
|
|
7d1379fe9f | ||
|
|
ced4f9f0d9 | ||
|
|
7fba332f58 | ||
|
|
8eda09533d | ||
|
|
6c42ee4edf | ||
|
|
3053595bfe | ||
|
|
6cf78d1a3f | ||
|
|
6c0ee9d917 | ||
|
|
50051dbfd5 | ||
|
|
30a8c5e12e | ||
|
|
4498549783 | ||
|
|
2ce3fedbfc | ||
|
|
8e10be665c | ||
|
|
80636cb8aa | ||
|
|
1b893da07d | ||
|
|
2f8aa3471b | ||
|
|
92a6957f0b | ||
|
|
d7248b11e5 | ||
|
|
6f4ed00105 | ||
|
|
347b299bbc | ||
|
|
614d297f22 | ||
|
|
59d0fe00c3 | ||
|
|
d6ebdff28f | ||
|
|
0ec16d0eab | ||
|
|
3906894fde | ||
|
|
a43772b21d | ||
|
|
cd81c2619b | ||
|
|
5abadc31a3 | ||
|
|
87654b698b | ||
|
|
2a1d2ef294 | ||
|
|
2a387707ef | ||
|
|
ce68062290 | ||
|
|
1b9073b085 | ||
|
|
e94961a14f | ||
|
|
d4e77b3be4 | ||
|
|
b96b36d5ea | ||
|
|
72d559a92c | ||
|
|
9a7bdcb6db | ||
|
|
2e4cf48e7e | ||
|
|
b78f8abeb4 | ||
|
|
7aa4e44317 | ||
|
|
2619b92131 | ||
|
|
28be59582f | ||
|
|
f96cc03587 | ||
|
|
cbd35b0e87 | ||
|
|
443acbe4b5 | ||
|
|
1f0d26e8c7 | ||
|
|
8302e9d0dd | ||
|
|
c797af020a | ||
|
|
1c85afa320 | ||
|
|
eb5317f8e5 | ||
|
|
8b860615b8 | ||
|
|
c15ac341e2 | ||
|
|
c2c7ee1047 | ||
|
|
72c46ccec6 | ||
|
|
dd3bfaee01 | ||
|
|
03206ad90e | ||
|
|
2e00307190 | ||
|
|
b3e29ab20e | ||
|
|
5504ac535b | ||
|
|
4b3dd7f4ea | ||
|
|
8edf9540d5 | ||
|
|
1c62ecd1b5 | ||
|
|
7cf3d9f3ce | ||
|
|
9b5a703307 | ||
|
|
370993cbed | ||
|
|
ddc538cdfa | ||
|
|
062dc43c87 | ||
|
|
7d9b986c04 | ||
|
|
bd2b9a12ed | ||
|
|
2b55707738 | ||
|
|
093540507e | ||
|
|
8f1dcfda07 | ||
|
|
16b319174b | ||
|
|
35115f5707 | ||
|
|
e9e51db9c7 | ||
|
|
ec39f018e2 | ||
|
|
59f4a3bcc7 | ||
|
|
1a8949eea3 | ||
|
|
fa85bdceed | ||
|
|
6b703244ec | ||
|
|
1a1cb0d3f1 | ||
|
|
95c9863d0a | ||
|
|
82187f6a71 | ||
|
|
75f52a1324 | ||
|
|
6e076a40a9 | ||
|
|
ded60036cb | ||
|
|
539a6cde63 | ||
|
|
3a28e74d89 | ||
|
|
c93f3faed9 | ||
|
|
1aaa3d9279 | ||
|
|
a06a9ed7d8 | ||
|
|
18a88596a6 | ||
|
|
2ac077603b | ||
|
|
3bb8b163b8 | ||
|
|
aac45097ca | ||
|
|
788956e86d | ||
|
|
e917424f5d | ||
|
|
1f6a5d04d9 | ||
|
|
dba844c7f9 | ||
|
|
09c11ef8ad | ||
|
|
ff21669bb5 | ||
|
|
a059ca2537 | ||
|
|
f4531b9434 | ||
|
|
05b350ac4b | ||
|
|
cfba315a85 | ||
|
|
12188b6684 | ||
|
|
725b2fc16f | ||
|
|
90a28e31e8 | ||
|
|
c057b00e08 | ||
|
|
b0c0104ba3 | ||
|
|
855b184e91 | ||
|
|
bc88242dc0 | ||
|
|
6357cd623f | ||
|
|
d3e7d20e30 | ||
|
|
7b568c2df3 | ||
|
|
2bff0522e8 | ||
|
|
77e180171c | ||
|
|
1e8fc97ba4 | ||
|
|
a799851832 | ||
|
|
2c81105bfc | ||
|
|
bf99ac56a0 | ||
|
|
8bfb47948a | ||
|
|
b8c41198a3 | ||
|
|
fe138ac05b | ||
|
|
bed62fdcb5 | ||
|
|
f068df0297 | ||
|
|
6a05e34d20 | ||
|
|
8b69b9c6a4 | ||
|
|
10192296fe | ||
|
|
7b98db2f7d | ||
|
|
81696c2e7a | ||
|
|
16a4f823bd | ||
|
|
39bbfc56a4 | ||
|
|
308c49b2d8 | ||
|
|
53e46a9251 | ||
|
|
6075b3dc33 | ||
|
|
860a828973 | ||
|
|
033eaa36c6 | ||
|
|
b3566f5449 | ||
|
|
f1306d3301 | ||
|
|
cc18441435 | ||
|
|
7e787d93e6 | ||
|
|
b08f444e74 | ||
|
|
09c1acdbe2 | ||
|
|
7a4a956eff | ||
|
|
aabbf5a72f | ||
|
|
5ed44bb174 | ||
|
|
92cf2cbd47 | ||
|
|
34aff6c786 | ||
|
|
11f10e586a | ||
|
|
a31feae2bd | ||
|
|
3517d58f01 | ||
|
|
9d13fadd41 | ||
|
|
c1febce528 | ||
|
|
e0aadbd961 | ||
|
|
7b9a76c5ea | ||
|
|
6133fa8384 | ||
|
|
67cc215ed3 | ||
|
|
ea4ad2ea4d | ||
|
|
847454a4f7 | ||
|
|
8cba1fdd71 | ||
|
|
e56112739c | ||
|
|
76988b746f | ||
|
|
32eb365a0b | ||
|
|
2c5feddad5 | ||
|
|
210500ff3e | ||
|
|
7c8f10e832 | ||
|
|
644da2f9e4 | ||
|
|
2a80d9c555 | ||
|
|
76f8791f3c | ||
|
|
c51a013109 | ||
|
|
88c2f95ea5 | ||
|
|
062fa7de78 | ||
|
|
d6c1a41e8d | ||
|
|
20ab5f9326 | ||
|
|
ab5a8b24a5 | ||
|
|
21a28623ca | ||
|
|
06a5fec612 | ||
|
|
46ecb8a663 | ||
|
|
3c9c6eef6e | ||
|
|
72734de376 | ||
|
|
a20ea09a6e | ||
|
|
4bd7bce232 | ||
|
|
8adf42216d | ||
|
|
5f40aaabb5 | ||
|
|
5295abbb83 | ||
|
|
201abe1524 | ||
|
|
6d26051d11 | ||
|
|
4613bf78d5 | ||
|
|
1f8fdc6f5c | ||
|
|
fedaede3b0 | ||
|
|
94ff9dc0a4 | ||
|
|
d4a88d08e4 | ||
|
|
7fc7ea6aba | ||
|
|
8801fda972 | ||
|
|
a8a3e2401b | ||
|
|
a7f59a2e2b | ||
|
|
d8e9da35d6 | ||
|
|
b57ad6929c | ||
|
|
550d274941 | ||
|
|
5a974483b9 | ||
|
|
34f34879c9 | ||
|
|
5c4b75909e | ||
|
|
41f126cad7 | ||
|
|
c26d7d23b5 | ||
|
|
4298ae00a9 | ||
|
|
47296e4294 | ||
|
|
f6daab0728 | ||
|
|
25dd9f1f35 | ||
|
|
130aedc474 | ||
|
|
e958f40bd9 | ||
|
|
ed2a2d7dc3 | ||
|
|
0890b32425 | ||
|
|
2e5981ecb3 | ||
|
|
ec00bb988c | ||
|
|
14a62586cc | ||
|
|
a8fe84acc7 | ||
|
|
144ba783a8 | ||
|
|
8d81ef811e | ||
|
|
3d8ec25a33 | ||
|
|
77f636f949 | ||
|
|
aa86f02b1a | ||
|
|
05daab24a2 | ||
|
|
0960663811 | ||
|
|
150cc56b35 | ||
|
|
7a9091fcae | ||
|
|
e6215d969d | ||
|
|
9f1b8347f5 | ||
|
|
311e1568d9 | ||
|
|
c2dadd8054 | ||
|
|
88bdfd6548 | ||
|
|
70edb62a6b | ||
|
|
6c2e0ccce5 | ||
|
|
fc6e0dfa65 | ||
|
|
54aebb7d98 | ||
|
|
378c67d51f | ||
|
|
d535035bdd | ||
|
|
43790db48e | ||
|
|
d957adf062 | ||
|
|
ff8f3eb8c2 | ||
|
|
88c54c918c | ||
|
|
1261a335f4 | ||
|
|
7587d76fd1 | ||
|
|
8e81300f37 | ||
|
|
a999020038 | ||
|
|
bc4664d62c | ||
|
|
6a1754aa6a | ||
|
|
da7bb312c2 | ||
|
|
5b7f813f81 | ||
|
|
923d9a0df2 | ||
|
|
c16224b37a | ||
|
|
01b5bdc829 | ||
|
|
5a0d66141f | ||
|
|
8e873e7450 | ||
|
|
add3fa43c6 | ||
|
|
b985a8d47a | ||
|
|
3db3150a7e | ||
|
|
17ce2a3cad | ||
|
|
e239304d89 | ||
|
|
893f3f343f | ||
|
|
5918a18dee | ||
|
|
c08dcff56d | ||
|
|
f33cd4e419 | ||
|
|
a625426a28 | ||
|
|
24e66337ff | ||
|
|
d06f1ecf19 | ||
|
|
9c6831c360 | ||
|
|
64ec0708c4 | ||
|
|
34aa1e8de0 | ||
|
|
b0f31d8296 | ||
|
|
e5fe5199a3 | ||
|
|
45e95d1d00 | ||
|
|
21876e72fe | ||
|
|
81903598a8 | ||
|
|
290500ae17 |
2
.github/workflows/docker-build-test.yml
vendored
@@ -24,6 +24,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
2
.github/workflows/docker-release.yml
vendored
@@ -12,6 +12,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
29
.github/workflows/issues.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Process GitHub Issues
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 */12 * * *' # Run every 12 hours
|
||||
workflow_dispatch: # Allow manual triggers
|
||||
|
||||
jobs:
|
||||
process-issues:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write # Required to modify issues
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install requests python-dotenv tqdm
|
||||
|
||||
- name: Run issues script
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: python scripts/issues.py --yes
|
||||
6
.github/workflows/pages.yml
vendored
@@ -36,7 +36,9 @@ jobs:
|
||||
working-directory: aider/website
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
@@ -82,4 +84,4 @@ jobs:
|
||||
|
||||
- name: Run linkchecker
|
||||
run: |
|
||||
linkchecker https://aider.chat
|
||||
linkchecker --ignore-url='.+\.(mp4|mov|avi)' https://aider.chat
|
||||
|
||||
2
.github/workflows/release.yml
vendored
@@ -12,6 +12,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
9
.github/workflows/ubuntu-tests.yml
vendored
@@ -25,12 +25,19 @@ jobs:
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libportaudio2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
@@ -38,5 +45,7 @@ jobs:
|
||||
pip install .
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
AIDER_ANALYTICS: false
|
||||
run: |
|
||||
pytest
|
||||
|
||||
4
.github/workflows/windows-tests.yml
vendored
@@ -25,6 +25,8 @@ jobs:
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
@@ -38,6 +40,8 @@ jobs:
|
||||
pip install .
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
AIDER_ANALYTICS: false
|
||||
run: |
|
||||
pytest
|
||||
|
||||
|
||||
5
.gitignore
vendored
@@ -11,4 +11,7 @@ _site
|
||||
.jekyll-cache/
|
||||
.jekyll-metadata
|
||||
aider/__version__.py
|
||||
.venv/
|
||||
aider/_version.py
|
||||
.venv/
|
||||
.#*
|
||||
.gitattributes
|
||||
|
||||
111
HISTORY.md
@@ -1,7 +1,114 @@
|
||||
|
||||
# Release history
|
||||
|
||||
### main branch
|
||||
### Aider v0.69.0
|
||||
|
||||
- [Watch files](https://aider.chat/docs/usage/watch.html) improvements:
|
||||
- Use `# ... AI?` comments to trigger aider and ask questions about your code.
|
||||
- Now watches *all* files, not just certain source files.
|
||||
- Use `# AI comments`, `// AI comments`, or `-- AI comments` to give aider instructions in any text file.
|
||||
- Full support for Gemini Flash 2.0 Exp:
|
||||
- `aider --model flash` or `aider --model gemini/gemini-2.0-flash-exp`
|
||||
- [New `--multiline` flag and `/multiline-mode` command](https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages) makes ENTER a soft newline and META-ENTER send the message, by @miradnanali.
|
||||
- `/copy-context <instructions>` now takes optional "instructions" when [copying code context to the clipboard](https://aider.chat/docs/usage/copypaste.html#copy-aiders-code-context-to-your-clipboard-paste-into-the-web-ui).
|
||||
- Improved clipboard error handling with helpful requirements install info.
|
||||
- Ask 5% of users if they want to opt-in to analytics.
|
||||
- `/voice` now lets you edit the transcribed text before sending.
|
||||
- Disabled auto-complete in Y/N prompts.
|
||||
- Aider wrote 60% of the code in this release.
|
||||
|
||||
### Aider v0.68.0
|
||||
|
||||
- [Aider works with LLM web chat UIs](https://aider.chat/docs/usage/copypaste.html).
|
||||
- New `--copy-paste` mode.
|
||||
- New `/copy-context` command.
|
||||
- [Set API keys and other environment variables for all providers from command line or yaml conf file](https://aider.chat/docs/config/aider_conf.html#storing-llm-keys).
|
||||
- New `--api-key provider=key` setting.
|
||||
- New `--set-env VAR=value` setting.
|
||||
- Added bash and zsh support to `--watch-files`.
|
||||
- Better error messages when missing dependencies for Gemini and Bedrock models.
|
||||
- Control-D now properly exits the program.
|
||||
- Don't count token costs when API provider returns a hard error.
|
||||
- Bugfix so watch files works with files that don't have tree-sitter support.
|
||||
- Bugfix so o1 models can be used as weak model.
|
||||
- Updated shell command prompt.
|
||||
- Added docstrings for all Coders.
|
||||
- Reorganized command line arguments with improved help messages and grouping.
|
||||
- Use the exact `sys.python` for self-upgrades.
|
||||
- Added experimental Gemini models.
|
||||
- Aider wrote 71% of the code in this release.
|
||||
|
||||
### Aider v0.67.0
|
||||
|
||||
- [Use aider in your IDE or editor](https://aider.chat/docs/usage/watch.html).
|
||||
- Run `aider --watch-files` and it will watch for instructions you add to your source files.
|
||||
- One-liner `# ...` or `// ...` comments that start or end with "AI" are instructions to aider.
|
||||
- When aider sees "AI!" it reads and follows all the instructions in AI comments.
|
||||
- Support for new Amazon Bedrock Nova models.
|
||||
- When `/run` or `/test` have non-zero exit codes, pre-fill "Fix that" into the next message prompt.
|
||||
- `/diff` now invokes `git diff` to use your preferred diff tool.
|
||||
- Added Ctrl-Z support for process suspension.
|
||||
- Spinner now falls back to ASCII art if fancy symbols throw unicode errors.
|
||||
- `--read` now expands `~` home dirs.
|
||||
- Enabled exception capture in analytics.
|
||||
- [Aider wrote 61% of the code in this release.](https://aider.chat/HISTORY.html)
|
||||
|
||||
### Aider v0.66.0
|
||||
|
||||
- PDF support for Sonnet and Gemini models.
|
||||
- Added `--voice-input-device` to select audio input device for voice recording, by @preynal.
|
||||
- Added `--timeout` option to configure API call timeouts.
|
||||
- Set cwd to repo root when running shell commands.
|
||||
- Added Ctrl-Up/Down keyboard shortcuts for per-message history navigation.
|
||||
- Improved error handling for failed .gitignore file operations.
|
||||
- Improved error handling for input history file permissions.
|
||||
- Improved error handling for analytics file access.
|
||||
- Removed spurious warning about disabling pretty in VSCode.
|
||||
- Removed broken support for Dart.
|
||||
- Bugfix when scraping URLs found in chat messages.
|
||||
- Better handling of __version__ import errors.
|
||||
- Improved `/drop` command to support substring matching for non-glob patterns.
|
||||
- Aider wrote 82% of the code in this release.
|
||||
|
||||
### Aider v0.65.1
|
||||
|
||||
- Bugfix to `--alias`.
|
||||
|
||||
### Aider v0.65.0
|
||||
|
||||
- Added `--alias` config to define [custom model aliases](https://aider.chat/docs/config/model-aliases.html).
|
||||
- Added `--[no-]detect-urls` flag to disable detecting and offering to scrape URLs found in the chat.
|
||||
- Ollama models now default to an 8k context window.
|
||||
- Added [RepoMap support for Dart language](https://aider.chat/docs/languages.html) by @malkoG.
|
||||
- Ask 2.5% of users if they want to opt-in to [analytics](https://aider.chat/docs/more/analytics.html).
|
||||
- Skip suggesting files that share names with files already in chat.
|
||||
- `/editor` returns and prefill the file content into the prompt, so you can use `/editor` to compose messages that start with `/commands`, etc.
|
||||
- Enhanced error handling for analytics.
|
||||
- Improved handling of UnknownEditFormat exceptions with helpful documentation links.
|
||||
- Bumped dependencies to pick up grep-ast 0.4.0 for Dart language support.
|
||||
- Aider wrote 81% of the code in this release.
|
||||
|
||||
### Aider v0.64.1
|
||||
|
||||
- Disable streaming for o1 on OpenRouter.
|
||||
|
||||
### Aider v0.64.0
|
||||
|
||||
- Added [`/editor` command](https://aider.chat/docs/usage/commands.html) to open system editor for writing prompts, by @thehunmonkgroup.
|
||||
- Full support for `gpt-4o-2024-11-20`.
|
||||
- Stream o1 models by default.
|
||||
- `/run` and suggested shell commands are less mysterious and now confirm that they "Added XX lines of output to the chat."
|
||||
- Ask 1% of users if they want to opt-in to [analytics](https://aider.chat/docs/more/analytics.html).
|
||||
- Added support for [optional multiline input tags](https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages) with matching closing tags.
|
||||
- Improved [model settings configuration](https://aider.chat/docs/config/adv-model-settings.html#global-extra-params) with support for global `extra_params` for `litellm.completion()`.
|
||||
- Architect mode now asks to add files suggested by the LLM.
|
||||
- Fixed bug in fuzzy model name matching.
|
||||
- Added Timeout exception to handle API provider timeouts.
|
||||
- Added `--show-release-notes` to control release notes display on first run of new version.
|
||||
- Save empty dict to cache file on model metadata download failure, to delay retry.
|
||||
- Improved error handling and code formatting.
|
||||
- Aider wrote 74% of the code in this release.
|
||||
|
||||
### Aider v0.63.2
|
||||
|
||||
- Fixed bug in fuzzy model name matching when litellm provider info is missing.
|
||||
- Modified model metadata file loading to allow override of resource file.
|
||||
|
||||
@@ -45,7 +45,7 @@ cog.out(open("aider/website/_includes/get-started.md").read())
|
||||
|
||||
You can get started quickly like this:
|
||||
|
||||
```
|
||||
```bash
|
||||
python -m pip install -U aider-chat
|
||||
|
||||
# Change directory into a git repo
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
from packaging import version
|
||||
|
||||
__version__ = "0.69.1.dev"
|
||||
safe_version = __version__
|
||||
|
||||
try:
|
||||
from aider.__version__ import __version__
|
||||
from aider._version import __version__
|
||||
except Exception:
|
||||
__version__ = "0.63.3.dev"
|
||||
__version__ = safe_version + "+import"
|
||||
|
||||
if type(__version__) is not str:
|
||||
__version__ = safe_version + "+type"
|
||||
else:
|
||||
try:
|
||||
if version.parse(__version__) < version.parse(safe_version):
|
||||
__version__ = safe_version + "+less"
|
||||
except Exception:
|
||||
__version__ = safe_version + "+parse"
|
||||
|
||||
__all__ = [__version__]
|
||||
|
||||
@@ -5,7 +5,7 @@ import time
|
||||
import uuid
|
||||
from pathlib import Path
|
||||
|
||||
from mixpanel import Mixpanel
|
||||
from mixpanel import MixpanelException
|
||||
from posthog import Posthog
|
||||
|
||||
from aider import __version__
|
||||
@@ -50,8 +50,14 @@ class Analytics:
|
||||
self.disable(False)
|
||||
return
|
||||
|
||||
self.mp = Mixpanel(mixpanel_project_token)
|
||||
self.ph = Posthog(project_api_key=posthog_project_api_key, host=posthog_host)
|
||||
# self.mp = Mixpanel(mixpanel_project_token)
|
||||
self.ph = Posthog(
|
||||
project_api_key=posthog_project_api_key,
|
||||
host=posthog_host,
|
||||
on_error=self.posthog_error,
|
||||
enable_exception_autocapture=True,
|
||||
super_properties=self.get_system_info(), # Add system info to all events
|
||||
)
|
||||
|
||||
def disable(self, permanently):
|
||||
self.mp = None
|
||||
@@ -62,13 +68,57 @@ class Analytics:
|
||||
self.permanently_disable = True
|
||||
self.save_data()
|
||||
|
||||
def need_to_ask(self):
|
||||
return not self.asked_opt_in and not self.permanently_disable
|
||||
def need_to_ask(self, args_analytics):
|
||||
if args_analytics is False:
|
||||
return False
|
||||
|
||||
could_ask = not self.asked_opt_in and not self.permanently_disable
|
||||
if not could_ask:
|
||||
return False
|
||||
|
||||
if args_analytics is True:
|
||||
return True
|
||||
|
||||
assert args_analytics is None, args_analytics
|
||||
|
||||
if not self.user_id:
|
||||
return False
|
||||
|
||||
PERCENT = 5
|
||||
return self.is_uuid_in_percentage(self.user_id, PERCENT)
|
||||
|
||||
def is_uuid_in_percentage(self, uuid_str, percent):
|
||||
"""Check if a UUID string falls within the first X percent of the UUID space.
|
||||
|
||||
Args:
|
||||
uuid_str: UUID string to test
|
||||
percent: Percentage threshold (0-100)
|
||||
|
||||
Returns:
|
||||
bool: True if UUID falls within the first X percent
|
||||
"""
|
||||
if not (0 <= percent <= 100):
|
||||
raise ValueError("Percentage must be between 0 and 100")
|
||||
|
||||
if not uuid_str:
|
||||
return False
|
||||
|
||||
# Convert percentage to hex threshold (1% = "04...", 10% = "1a...", etc)
|
||||
# Using first 6 hex digits
|
||||
if percent == 0:
|
||||
return False
|
||||
threshold = format(int(0xFFFFFF * percent / 100), "06x")
|
||||
return uuid_str[:6] <= threshold
|
||||
|
||||
def get_data_file_path(self):
|
||||
data_file = Path.home() / ".aider" / "analytics.json"
|
||||
data_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
return data_file
|
||||
try:
|
||||
data_file = Path.home() / ".aider" / "analytics.json"
|
||||
data_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
return data_file
|
||||
except OSError:
|
||||
# If we can't create/access the directory, just disable analytics
|
||||
self.disable(permanently=False)
|
||||
return None
|
||||
|
||||
def get_or_create_uuid(self):
|
||||
self.load_data()
|
||||
@@ -80,6 +130,9 @@ class Analytics:
|
||||
|
||||
def load_data(self):
|
||||
data_file = self.get_data_file_path()
|
||||
if not data_file:
|
||||
return
|
||||
|
||||
if data_file.exists():
|
||||
try:
|
||||
data = json.loads(data_file.read_text())
|
||||
@@ -91,14 +144,20 @@ class Analytics:
|
||||
|
||||
def save_data(self):
|
||||
data_file = self.get_data_file_path()
|
||||
if not data_file:
|
||||
return
|
||||
|
||||
data = dict(
|
||||
uuid=self.user_id,
|
||||
permanently_disable=self.permanently_disable,
|
||||
asked_opt_in=self.asked_opt_in,
|
||||
)
|
||||
|
||||
# Allow exceptions; crash if we can't record permanently_disabled=True, etc
|
||||
data_file.write_text(json.dumps(data, indent=4))
|
||||
try:
|
||||
data_file.write_text(json.dumps(data, indent=4))
|
||||
except OSError:
|
||||
# If we can't write the file, just disable analytics
|
||||
self.disable(permanently=False)
|
||||
|
||||
def get_system_info(self):
|
||||
return {
|
||||
@@ -106,6 +165,7 @@ class Analytics:
|
||||
"os_platform": platform.system(),
|
||||
"os_release": platform.release(),
|
||||
"machine": platform.machine(),
|
||||
"aider_version": __version__,
|
||||
}
|
||||
|
||||
def _redact_model_name(self, model):
|
||||
@@ -119,8 +179,15 @@ class Analytics:
|
||||
return model.name.split("/")[0] + "/REDACTED"
|
||||
return None
|
||||
|
||||
def posthog_error(self):
|
||||
"""disable posthog if we get an error"""
|
||||
print("X" * 100)
|
||||
# https://github.com/PostHog/posthog-python/blob/9e1bb8c58afaa229da24c4fb576c08bb88a75752/posthog/consumer.py#L86
|
||||
# https://github.com/Aider-AI/aider/issues/2532
|
||||
self.ph = None
|
||||
|
||||
def event(self, event_name, main_model=None, **kwargs):
|
||||
if not (self.mp or self.ph) and not self.logfile:
|
||||
if not self.mp and not self.ph and not self.logfile:
|
||||
return
|
||||
|
||||
properties = {}
|
||||
@@ -131,7 +198,6 @@ class Analytics:
|
||||
properties["editor_model"] = self._redact_model_name(main_model.editor_model)
|
||||
|
||||
properties.update(kwargs)
|
||||
properties.update(self.get_system_info()) # Add system info to all events
|
||||
|
||||
# Handle numeric values
|
||||
for key, value in properties.items():
|
||||
@@ -140,10 +206,11 @@ class Analytics:
|
||||
else:
|
||||
properties[key] = str(value)
|
||||
|
||||
properties["aider_version"] = __version__
|
||||
|
||||
if self.mp:
|
||||
self.mp.track(self.user_id, event_name, dict(properties))
|
||||
try:
|
||||
self.mp.track(self.user_id, event_name, dict(properties))
|
||||
except MixpanelException:
|
||||
self.mp = None # Disable mixpanel on connection errors
|
||||
|
||||
if self.ph:
|
||||
self.ph.capture(self.user_id, event_name, dict(properties))
|
||||
@@ -155,10 +222,9 @@ class Analytics:
|
||||
"user_id": self.user_id,
|
||||
"time": int(time.time()),
|
||||
}
|
||||
with open(self.logfile, "a") as f:
|
||||
json.dump(log_entry, f)
|
||||
f.write("\n")
|
||||
|
||||
def __del__(self):
|
||||
if self.ph:
|
||||
self.ph.shutdown()
|
||||
try:
|
||||
with open(self.logfile, "a") as f:
|
||||
json.dump(log_entry, f)
|
||||
f.write("\n")
|
||||
except OSError:
|
||||
pass # Ignore OS errors when writing to logfile
|
||||
|
||||
375
aider/args.py
@@ -28,22 +28,10 @@ def get_parser(default_config_files, git_root):
|
||||
config_file_parser_class=configargparse.YAMLConfigFileParser,
|
||||
auto_env_var_prefix="AIDER_",
|
||||
)
|
||||
group = parser.add_argument_group("Main")
|
||||
group = parser.add_argument_group("Main model")
|
||||
group.add_argument(
|
||||
"files", metavar="FILE", nargs="*", help="files to edit with an LLM (optional)"
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-api-key",
|
||||
metavar="OPENAI_API_KEY",
|
||||
env_var="OPENAI_API_KEY",
|
||||
help="Specify the OpenAI API key",
|
||||
)
|
||||
group.add_argument(
|
||||
"--anthropic-api-key",
|
||||
metavar="ANTHROPIC_API_KEY",
|
||||
env_var="ANTHROPIC_API_KEY",
|
||||
help="Specify the Anthropic API key",
|
||||
)
|
||||
group.add_argument(
|
||||
"--model",
|
||||
metavar="MODEL",
|
||||
@@ -83,7 +71,7 @@ def get_parser(default_config_files, git_root):
|
||||
const=gpt_4_model,
|
||||
help=f"Use {gpt_4_model} model for the main chat",
|
||||
)
|
||||
gpt_4o_model = "gpt-4o-2024-08-06"
|
||||
gpt_4o_model = "gpt-4o"
|
||||
group.add_argument(
|
||||
"--4o",
|
||||
action="store_const",
|
||||
@@ -144,43 +132,59 @@ def get_parser(default_config_files, git_root):
|
||||
)
|
||||
|
||||
##########
|
||||
group = parser.add_argument_group("Model Settings")
|
||||
group = parser.add_argument_group("API Keys and settings")
|
||||
group.add_argument(
|
||||
"--openai-api-key",
|
||||
help="Specify the OpenAI API key",
|
||||
)
|
||||
group.add_argument(
|
||||
"--anthropic-api-key",
|
||||
help="Specify the Anthropic API key",
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-api-base",
|
||||
help="Specify the api base url",
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-api-type",
|
||||
help="(deprecated, use --set-env OPENAI_API_TYPE=<value>)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-api-version",
|
||||
help="(deprecated, use --set-env OPENAI_API_VERSION=<value>)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-api-deployment-id",
|
||||
help="(deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-organization-id",
|
||||
help="(deprecated, use --set-env OPENAI_ORGANIZATION=<value>)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--set-env",
|
||||
action="append",
|
||||
metavar="ENV_VAR_NAME=value",
|
||||
help="Set an environment variable (to control API settings, can be used multiple times)",
|
||||
default=[],
|
||||
)
|
||||
group.add_argument(
|
||||
"--api-key",
|
||||
action="append",
|
||||
metavar="PROVIDER=KEY",
|
||||
help=(
|
||||
"Set an API key for a provider (eg: --api-key provider=<key> sets"
|
||||
" PROVIDER_API_KEY=<key>)"
|
||||
),
|
||||
default=[],
|
||||
)
|
||||
group = parser.add_argument_group("Model settings")
|
||||
group.add_argument(
|
||||
"--list-models",
|
||||
"--models",
|
||||
metavar="MODEL",
|
||||
help="List known models which match the (partial) MODEL name",
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-api-base",
|
||||
metavar="OPENAI_API_BASE",
|
||||
env_var="OPENAI_API_BASE",
|
||||
help="Specify the api base url",
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-api-type",
|
||||
metavar="OPENAI_API_TYPE",
|
||||
env_var="OPENAI_API_TYPE",
|
||||
help="Specify the api_type",
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-api-version",
|
||||
metavar="OPENAI_API_VERSION",
|
||||
env_var="OPENAI_API_VERSION",
|
||||
help="Specify the api_version",
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-api-deployment-id",
|
||||
metavar="OPENAI_API_DEPLOYMENT_ID",
|
||||
env_var="OPENAI_API_DEPLOYMENT_ID",
|
||||
help="Specify the deployment_id",
|
||||
)
|
||||
group.add_argument(
|
||||
"--openai-organization-id",
|
||||
metavar="OPENAI_ORGANIZATION_ID",
|
||||
env_var="OPENAI_ORGANIZATION_ID",
|
||||
help="Specify the OpenAI organization ID",
|
||||
)
|
||||
group.add_argument(
|
||||
"--model-settings-file",
|
||||
metavar="MODEL_SETTINGS_FILE",
|
||||
@@ -193,12 +197,24 @@ def get_parser(default_config_files, git_root):
|
||||
default=".aider.model.metadata.json",
|
||||
help="Specify a file with context window and costs for unknown models",
|
||||
)
|
||||
group.add_argument(
|
||||
"--alias",
|
||||
action="append",
|
||||
metavar="ALIAS:MODEL",
|
||||
help="Add a model alias (can be used multiple times)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--verify-ssl",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=True,
|
||||
help="Verify the SSL cert when connecting to models (default: True)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--timeout",
|
||||
type=int,
|
||||
default=None,
|
||||
help="Timeout in seconds for API calls (default: None)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--edit-format",
|
||||
"--chat-mode",
|
||||
@@ -249,17 +265,9 @@ def get_parser(default_config_files, git_root):
|
||||
" If unspecified, defaults to the model's max_chat_history_tokens."
|
||||
),
|
||||
)
|
||||
# This is a duplicate of the argument in the preparser and is a no-op by this time of
|
||||
# argument parsing, but it's here so that the help is displayed as expected.
|
||||
group.add_argument(
|
||||
"--env-file",
|
||||
metavar="ENV_FILE",
|
||||
default=default_env_file(git_root),
|
||||
help="Specify the .env file to load (default: .env in git root)",
|
||||
)
|
||||
|
||||
##########
|
||||
group = parser.add_argument_group("Cache Settings")
|
||||
group = parser.add_argument_group("Cache settings")
|
||||
group.add_argument(
|
||||
"--cache-prompts",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
@@ -274,7 +282,7 @@ def get_parser(default_config_files, git_root):
|
||||
)
|
||||
|
||||
##########
|
||||
group = parser.add_argument_group("Repomap Settings")
|
||||
group = parser.add_argument_group("Repomap settings")
|
||||
group.add_argument(
|
||||
"--map-tokens",
|
||||
type=int,
|
||||
@@ -331,7 +339,7 @@ def get_parser(default_config_files, git_root):
|
||||
)
|
||||
|
||||
##########
|
||||
group = parser.add_argument_group("Output Settings")
|
||||
group = parser.add_argument_group("Output settings")
|
||||
group.add_argument(
|
||||
"--dark-mode",
|
||||
action="store_true",
|
||||
@@ -430,7 +438,7 @@ def get_parser(default_config_files, git_root):
|
||||
)
|
||||
|
||||
##########
|
||||
group = parser.add_argument_group("Git Settings")
|
||||
group = parser.add_argument_group("Git settings")
|
||||
group.add_argument(
|
||||
"--git",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
@@ -517,6 +525,12 @@ def get_parser(default_config_files, git_root):
|
||||
help="Skip the sanity check for the git repository (default: False)",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--watch-files",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=False,
|
||||
help="Enable/disable watching files for ai coding comments (default: False)",
|
||||
)
|
||||
group = parser.add_argument_group("Fixing and committing")
|
||||
group.add_argument(
|
||||
"--lint",
|
||||
@@ -553,7 +567,7 @@ def get_parser(default_config_files, git_root):
|
||||
group.add_argument(
|
||||
"--test",
|
||||
action="store_true",
|
||||
help="Run tests and fix problems found",
|
||||
help="Run tests, fix problems found and then exit",
|
||||
default=False,
|
||||
)
|
||||
|
||||
@@ -562,8 +576,8 @@ def get_parser(default_config_files, git_root):
|
||||
group.add_argument(
|
||||
"--analytics",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=False,
|
||||
help="Enable/disable analytics for one session (default: False)",
|
||||
default=None,
|
||||
help="Enable/disable analytics for current session (default: random)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--analytics-log",
|
||||
@@ -577,7 +591,133 @@ def get_parser(default_config_files, git_root):
|
||||
default=False,
|
||||
)
|
||||
|
||||
group = parser.add_argument_group("Other Settings")
|
||||
#########
|
||||
group = parser.add_argument_group("Upgrading")
|
||||
group.add_argument(
|
||||
"--just-check-update",
|
||||
action="store_true",
|
||||
help="Check for updates and return status in the exit code",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--check-update",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
help="Check for new aider versions on launch",
|
||||
default=True,
|
||||
)
|
||||
group.add_argument(
|
||||
"--show-release-notes",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
help="Show release notes on first run of new version (default: None, ask user)",
|
||||
default=None,
|
||||
)
|
||||
group.add_argument(
|
||||
"--install-main-branch",
|
||||
action="store_true",
|
||||
help="Install the latest version from the main branch",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--upgrade",
|
||||
"--update",
|
||||
action="store_true",
|
||||
help="Upgrade aider to the latest version from PyPI",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--version",
|
||||
action="version",
|
||||
version=f"%(prog)s {__version__}",
|
||||
help="Show the version number and exit",
|
||||
)
|
||||
|
||||
##########
|
||||
group = parser.add_argument_group("Modes")
|
||||
group.add_argument(
|
||||
"--message",
|
||||
"--msg",
|
||||
"-m",
|
||||
metavar="COMMAND",
|
||||
help=(
|
||||
"Specify a single message to send the LLM, process reply then exit (disables chat mode)"
|
||||
),
|
||||
)
|
||||
group.add_argument(
|
||||
"--message-file",
|
||||
"-f",
|
||||
metavar="MESSAGE_FILE",
|
||||
help=(
|
||||
"Specify a file containing the message to send the LLM, process reply, then exit"
|
||||
" (disables chat mode)"
|
||||
),
|
||||
)
|
||||
group.add_argument(
|
||||
"--gui",
|
||||
"--browser",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
help="Run aider in your browser (default: False)",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--copy-paste",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=False,
|
||||
help="Enable automatic copy/paste of chat between aider and web UI (default: False)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--apply",
|
||||
metavar="FILE",
|
||||
help="Apply the changes from the given file instead of running the chat (debug)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--apply-clipboard-edits",
|
||||
action="store_true",
|
||||
help="Apply clipboard contents as edits using the main model's editor format",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--exit",
|
||||
action="store_true",
|
||||
help="Do all startup activities then exit before accepting user input (debug)",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--show-repo-map",
|
||||
action="store_true",
|
||||
help="Print the repo map and exit (debug)",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--show-prompts",
|
||||
action="store_true",
|
||||
help="Print the system prompts and exit (debug)",
|
||||
default=False,
|
||||
)
|
||||
|
||||
##########
|
||||
group = parser.add_argument_group("Voice settings")
|
||||
group.add_argument(
|
||||
"--voice-format",
|
||||
metavar="VOICE_FORMAT",
|
||||
default="wav",
|
||||
choices=["wav", "mp3", "webm"],
|
||||
help="Audio format for voice recording (default: wav). webm and mp3 require ffmpeg",
|
||||
)
|
||||
group.add_argument(
|
||||
"--voice-language",
|
||||
metavar="VOICE_LANGUAGE",
|
||||
default="en",
|
||||
help="Specify the language for voice using ISO 639-1 code (default: auto)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--voice-input-device",
|
||||
metavar="VOICE_INPUT_DEVICE",
|
||||
default=None,
|
||||
help="Specify the input device name for voice recording",
|
||||
)
|
||||
|
||||
######
|
||||
group = parser.add_argument_group("Other settings")
|
||||
group.add_argument(
|
||||
"--file",
|
||||
action="append",
|
||||
@@ -602,48 +742,6 @@ def get_parser(default_config_files, git_root):
|
||||
default=None,
|
||||
help="Specify the language to use in the chat (default: None, uses system settings)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--version",
|
||||
action="version",
|
||||
version=f"%(prog)s {__version__}",
|
||||
help="Show the version number and exit",
|
||||
)
|
||||
group.add_argument(
|
||||
"--just-check-update",
|
||||
action="store_true",
|
||||
help="Check for updates and return status in the exit code",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--check-update",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
help="Check for new aider versions on launch",
|
||||
default=True,
|
||||
)
|
||||
group.add_argument(
|
||||
"--install-main-branch",
|
||||
action="store_true",
|
||||
help="Install the latest version from the main branch",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--upgrade",
|
||||
"--update",
|
||||
action="store_true",
|
||||
help="Upgrade aider to the latest version from PyPI",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--apply",
|
||||
metavar="FILE",
|
||||
help="Apply the changes from the given file instead of running the chat (debug)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--apply-clipboard-edits",
|
||||
action="store_true",
|
||||
help="Apply clipboard contents as edits using the main model's editor format",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--yes-always",
|
||||
action="store_true",
|
||||
@@ -657,42 +755,6 @@ def get_parser(default_config_files, git_root):
|
||||
help="Enable verbose output",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--show-repo-map",
|
||||
action="store_true",
|
||||
help="Print the repo map and exit (debug)",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--show-prompts",
|
||||
action="store_true",
|
||||
help="Print the system prompts and exit (debug)",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--exit",
|
||||
action="store_true",
|
||||
help="Do all startup activities then exit before accepting user input (debug)",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
"--message",
|
||||
"--msg",
|
||||
"-m",
|
||||
metavar="COMMAND",
|
||||
help=(
|
||||
"Specify a single message to send the LLM, process reply then exit (disables chat mode)"
|
||||
),
|
||||
)
|
||||
group.add_argument(
|
||||
"--message-file",
|
||||
"-f",
|
||||
metavar="MESSAGE_FILE",
|
||||
help=(
|
||||
"Specify a file containing the message to send the LLM, process reply, then exit"
|
||||
" (disables chat mode)"
|
||||
),
|
||||
)
|
||||
group.add_argument(
|
||||
"--load",
|
||||
metavar="LOAD_FILE",
|
||||
@@ -713,12 +775,13 @@ def get_parser(default_config_files, git_root):
|
||||
" or home directory)"
|
||||
),
|
||||
)
|
||||
# This is a duplicate of the argument in the preparser and is a no-op by this time of
|
||||
# argument parsing, but it's here so that the help is displayed as expected.
|
||||
group.add_argument(
|
||||
"--gui",
|
||||
"--browser",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
help="Run aider in your browser (default: False)",
|
||||
default=False,
|
||||
"--env-file",
|
||||
metavar="ENV_FILE",
|
||||
default=default_env_file(git_root),
|
||||
help="Specify the .env file to load (default: .env in git root)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--suggest-shell-commands",
|
||||
@@ -732,21 +795,21 @@ def get_parser(default_config_files, git_root):
|
||||
default=True,
|
||||
help="Enable/disable fancy input with history and completion (default: True)",
|
||||
)
|
||||
|
||||
##########
|
||||
group = parser.add_argument_group("Voice Settings")
|
||||
group.add_argument(
|
||||
"--voice-format",
|
||||
metavar="VOICE_FORMAT",
|
||||
default="wav",
|
||||
choices=["wav", "mp3", "webm"],
|
||||
help="Audio format for voice recording (default: wav). webm and mp3 require ffmpeg",
|
||||
"--multiline",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=False,
|
||||
help="Enable/disable multi-line input mode with Meta-Enter to submit (default: False)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--voice-language",
|
||||
metavar="VOICE_LANGUAGE",
|
||||
default="en",
|
||||
help="Specify the language for voice using ISO 639-1 code (default: auto)",
|
||||
"--detect-urls",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=True,
|
||||
help="Enable/disable detection and offering to add URLs to chat (default: True)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--editor",
|
||||
help="Specify which editor to use for the /editor command",
|
||||
)
|
||||
|
||||
return parser
|
||||
|
||||
@@ -37,6 +37,15 @@ from ..dump import dump # noqa: F401
|
||||
from .chat_chunks import ChatChunks
|
||||
|
||||
|
||||
class UnknownEditFormat(ValueError):
|
||||
def __init__(self, edit_format, valid_formats):
|
||||
self.edit_format = edit_format
|
||||
self.valid_formats = valid_formats
|
||||
super().__init__(
|
||||
f"Unknown edit format {edit_format}. Valid formats are: {', '.join(valid_formats)}"
|
||||
)
|
||||
|
||||
|
||||
class MissingAPIKeyError(ValueError):
|
||||
pass
|
||||
|
||||
@@ -91,8 +100,10 @@ class Coder:
|
||||
cache_warming_thread = None
|
||||
num_cache_warming_pings = 0
|
||||
suggest_shell_commands = True
|
||||
detect_urls = True
|
||||
ignore_mentions = None
|
||||
chat_language = None
|
||||
file_watcher = None
|
||||
|
||||
@classmethod
|
||||
def create(
|
||||
@@ -143,8 +154,9 @@ class Coder:
|
||||
aider_commit_hashes=from_coder.aider_commit_hashes,
|
||||
commands=from_coder.commands.clone(),
|
||||
total_cost=from_coder.total_cost,
|
||||
ignore_mentions=from_coder.ignore_mentions,
|
||||
file_watcher=from_coder.file_watcher,
|
||||
)
|
||||
|
||||
use_kwargs.update(update) # override to complete the switch
|
||||
use_kwargs.update(kwargs) # override passed kwargs
|
||||
|
||||
@@ -156,11 +168,15 @@ class Coder:
|
||||
res.original_kwargs = dict(kwargs)
|
||||
return res
|
||||
|
||||
raise ValueError(f"Unknown edit format {edit_format}")
|
||||
valid_formats = [
|
||||
str(c.edit_format)
|
||||
for c in coders.__all__
|
||||
if hasattr(c, "edit_format") and c.edit_format is not None
|
||||
]
|
||||
raise UnknownEditFormat(edit_format, valid_formats)
|
||||
|
||||
def clone(self, **kwargs):
|
||||
new_coder = Coder.create(from_coder=self, **kwargs)
|
||||
new_coder.ignore_mentions = self.ignore_mentions
|
||||
return new_coder
|
||||
|
||||
def get_announcements(self):
|
||||
@@ -232,6 +248,9 @@ class Coder:
|
||||
if self.done_messages:
|
||||
lines.append("Restored previous conversation history.")
|
||||
|
||||
if self.io.multiline_mode:
|
||||
lines.append("Multiline mode: Enabled. Enter inserts newline, Alt-Enter submits text")
|
||||
|
||||
return lines
|
||||
|
||||
def __init__(
|
||||
@@ -267,6 +286,10 @@ class Coder:
|
||||
num_cache_warming_pings=0,
|
||||
suggest_shell_commands=True,
|
||||
chat_language=None,
|
||||
detect_urls=True,
|
||||
ignore_mentions=None,
|
||||
file_watcher=None,
|
||||
auto_copy_context=False,
|
||||
):
|
||||
# Fill in a dummy Analytics if needed, but it is never .enable()'d
|
||||
self.analytics = analytics if analytics is not None else Analytics()
|
||||
@@ -277,9 +300,19 @@ class Coder:
|
||||
self.aider_commit_hashes = set()
|
||||
self.rejected_urls = set()
|
||||
self.abs_root_path_cache = {}
|
||||
self.ignore_mentions = set()
|
||||
|
||||
self.auto_copy_context = auto_copy_context
|
||||
|
||||
self.ignore_mentions = ignore_mentions
|
||||
if not self.ignore_mentions:
|
||||
self.ignore_mentions = set()
|
||||
|
||||
self.file_watcher = file_watcher
|
||||
if self.file_watcher:
|
||||
self.file_watcher.coder = self
|
||||
|
||||
self.suggest_shell_commands = suggest_shell_commands
|
||||
self.detect_urls = detect_urls
|
||||
|
||||
self.num_cache_warming_pings = num_cache_warming_pings
|
||||
|
||||
@@ -648,6 +681,8 @@ class Coder:
|
||||
|
||||
def get_readonly_files_messages(self):
|
||||
readonly_messages = []
|
||||
|
||||
# Handle non-image files
|
||||
read_only_content = self.get_read_only_files_content()
|
||||
if read_only_content:
|
||||
readonly_messages += [
|
||||
@@ -659,6 +694,15 @@ class Coder:
|
||||
content="Ok, I will use these files as references.",
|
||||
),
|
||||
]
|
||||
|
||||
# Handle image files
|
||||
images_message = self.get_images_message(self.abs_read_only_fnames)
|
||||
if images_message is not None:
|
||||
readonly_messages += [
|
||||
images_message,
|
||||
dict(role="assistant", content="Ok, I will use these images as references."),
|
||||
]
|
||||
|
||||
return readonly_messages
|
||||
|
||||
def get_chat_files_messages(self):
|
||||
@@ -680,7 +724,7 @@ class Coder:
|
||||
dict(role="assistant", content=files_reply),
|
||||
]
|
||||
|
||||
images_message = self.get_images_message()
|
||||
images_message = self.get_images_message(self.abs_fnames)
|
||||
if images_message is not None:
|
||||
chat_files_messages += [
|
||||
images_message,
|
||||
@@ -689,23 +733,42 @@ class Coder:
|
||||
|
||||
return chat_files_messages
|
||||
|
||||
def get_images_message(self):
|
||||
if not self.main_model.info.get("supports_vision"):
|
||||
def get_images_message(self, fnames):
|
||||
supports_images = self.main_model.info.get("supports_vision")
|
||||
supports_pdfs = self.main_model.info.get("supports_pdf_input") or self.main_model.info.get(
|
||||
"max_pdf_size_mb"
|
||||
)
|
||||
|
||||
# https://github.com/BerriAI/litellm/pull/6928
|
||||
supports_pdfs = supports_pdfs or "claude-3-5-sonnet-20241022" in self.main_model.name
|
||||
|
||||
if not (supports_images or supports_pdfs):
|
||||
return None
|
||||
|
||||
image_messages = []
|
||||
for fname, content in self.get_abs_fnames_content():
|
||||
if is_image_file(fname):
|
||||
with open(fname, "rb") as image_file:
|
||||
encoded_string = base64.b64encode(image_file.read()).decode("utf-8")
|
||||
mime_type, _ = mimetypes.guess_type(fname)
|
||||
if mime_type and mime_type.startswith("image/"):
|
||||
image_url = f"data:{mime_type};base64,{encoded_string}"
|
||||
rel_fname = self.get_rel_fname(fname)
|
||||
image_messages += [
|
||||
{"type": "text", "text": f"Image file: {rel_fname}"},
|
||||
{"type": "image_url", "image_url": {"url": image_url, "detail": "high"}},
|
||||
]
|
||||
for fname in fnames:
|
||||
if not is_image_file(fname):
|
||||
continue
|
||||
|
||||
mime_type, _ = mimetypes.guess_type(fname)
|
||||
if not mime_type:
|
||||
continue
|
||||
|
||||
with open(fname, "rb") as image_file:
|
||||
encoded_string = base64.b64encode(image_file.read()).decode("utf-8")
|
||||
image_url = f"data:{mime_type};base64,{encoded_string}"
|
||||
rel_fname = self.get_rel_fname(fname)
|
||||
|
||||
if mime_type.startswith("image/") and supports_images:
|
||||
image_messages += [
|
||||
{"type": "text", "text": f"Image file: {rel_fname}"},
|
||||
{"type": "image_url", "image_url": {"url": image_url, "detail": "high"}},
|
||||
]
|
||||
elif mime_type == "application/pdf" and supports_pdfs:
|
||||
image_messages += [
|
||||
{"type": "text", "text": f"PDF file: {rel_fname}"},
|
||||
{"type": "image_url", "image_url": image_url},
|
||||
]
|
||||
|
||||
if not image_messages:
|
||||
return None
|
||||
@@ -724,6 +787,7 @@ class Coder:
|
||||
self.lint_outcome = None
|
||||
self.test_outcome = None
|
||||
self.shell_commands = []
|
||||
self.message_cost = 0
|
||||
|
||||
if self.repo:
|
||||
self.commit_before_message.append(self.repo.get_head_commit_sha())
|
||||
@@ -734,9 +798,10 @@ class Coder:
|
||||
self.io.user_input(with_message)
|
||||
self.run_one(with_message, preproc)
|
||||
return self.partial_response_content
|
||||
|
||||
while True:
|
||||
try:
|
||||
if not self.io.placeholder:
|
||||
self.copy_context()
|
||||
user_message = self.get_input()
|
||||
self.run_one(user_message, preproc)
|
||||
self.show_undo_hint()
|
||||
@@ -745,6 +810,10 @@ class Coder:
|
||||
except EOFError:
|
||||
return
|
||||
|
||||
def copy_context(self):
|
||||
if self.auto_copy_context:
|
||||
self.commands.cmd_copy_context()
|
||||
|
||||
def get_input(self):
|
||||
inchat_files = self.get_inchat_relative_files()
|
||||
read_only_files = [self.get_rel_fname(fname) for fname in self.abs_read_only_fnames]
|
||||
@@ -767,7 +836,7 @@ class Coder:
|
||||
return self.commands.run(inp)
|
||||
|
||||
self.check_for_file_mentions(inp)
|
||||
self.check_for_urls(inp)
|
||||
inp = self.check_for_urls(inp)
|
||||
|
||||
return inp
|
||||
|
||||
@@ -812,9 +881,11 @@ class Coder:
|
||||
|
||||
def check_for_urls(self, inp: str) -> List[str]:
|
||||
"""Check input for URLs and offer to add them to the chat."""
|
||||
if not self.detect_urls:
|
||||
return inp
|
||||
|
||||
url_pattern = re.compile(r"(https?://[^\s/$.?#].[^\s]*[^\s,.])")
|
||||
urls = list(set(url_pattern.findall(inp))) # Use set to remove duplicates
|
||||
added_urls = []
|
||||
group = ConfirmGroup(urls)
|
||||
for url in urls:
|
||||
if url not in self.rejected_urls:
|
||||
@@ -824,11 +895,10 @@ class Coder:
|
||||
):
|
||||
inp += "\n\n"
|
||||
inp += self.commands.cmd_web(url, return_content=True)
|
||||
added_urls.append(url)
|
||||
else:
|
||||
self.rejected_urls.add(url)
|
||||
|
||||
return added_urls
|
||||
return inp
|
||||
|
||||
def keyboard_interrupt(self):
|
||||
now = time.time()
|
||||
@@ -836,6 +906,7 @@ class Coder:
|
||||
thresh = 2 # seconds
|
||||
if self.last_keyboard_interrupt and now - self.last_keyboard_interrupt < thresh:
|
||||
self.io.tool_warning("\n\n^C KeyboardInterrupt")
|
||||
self.event("exit", reason="Control-C")
|
||||
sys.exit()
|
||||
|
||||
self.io.tool_warning("\n\n^C again to exit")
|
||||
@@ -962,7 +1033,7 @@ class Coder:
|
||||
if self.chat_language:
|
||||
language = self.chat_language
|
||||
else:
|
||||
language = "in the same language they are using"
|
||||
language = "the same language they are using"
|
||||
|
||||
prompt = prompt.format(
|
||||
fence=self.fence,
|
||||
@@ -1054,18 +1125,21 @@ class Coder:
|
||||
# add the reminder anyway
|
||||
total_tokens = 0
|
||||
|
||||
final = chunks.cur[-1]
|
||||
if chunks.cur:
|
||||
final = chunks.cur[-1]
|
||||
else:
|
||||
final = None
|
||||
|
||||
max_input_tokens = self.main_model.info.get("max_input_tokens") or 0
|
||||
# Add the reminder prompt if we still have room to include it.
|
||||
if (
|
||||
max_input_tokens is None
|
||||
not max_input_tokens
|
||||
or total_tokens < max_input_tokens
|
||||
and self.gpt_prompts.system_reminder
|
||||
):
|
||||
if self.main_model.reminder == "sys":
|
||||
chunks.reminder = reminder_message
|
||||
elif self.main_model.reminder == "user" and final["role"] == "user":
|
||||
elif self.main_model.reminder == "user" and final and final["role"] == "user":
|
||||
# stuff it into the user message
|
||||
new_content = (
|
||||
final["content"]
|
||||
@@ -1137,6 +1211,8 @@ class Coder:
|
||||
return chunks
|
||||
|
||||
def send_message(self, inp):
|
||||
self.event("message_send_starting")
|
||||
|
||||
self.cur_messages += [
|
||||
dict(role="user", content=inp),
|
||||
]
|
||||
@@ -1216,6 +1292,7 @@ class Coder:
|
||||
lines = traceback.format_exception(type(err), err, err.__traceback__)
|
||||
self.io.tool_warning("".join(lines))
|
||||
self.io.tool_error(str(err))
|
||||
self.event("message_send_exception", exception=str(err))
|
||||
return
|
||||
finally:
|
||||
if self.mdstream:
|
||||
@@ -1245,10 +1322,19 @@ class Coder:
|
||||
else:
|
||||
content = ""
|
||||
|
||||
try:
|
||||
self.reply_completed()
|
||||
except KeyboardInterrupt:
|
||||
interrupted = True
|
||||
if not interrupted:
|
||||
add_rel_files_message = self.check_for_file_mentions(content)
|
||||
if add_rel_files_message:
|
||||
if self.reflected_message:
|
||||
self.reflected_message += "\n\n" + add_rel_files_message
|
||||
else:
|
||||
self.reflected_message = add_rel_files_message
|
||||
return
|
||||
|
||||
try:
|
||||
self.reply_completed()
|
||||
except KeyboardInterrupt:
|
||||
interrupted = True
|
||||
|
||||
if interrupted:
|
||||
content += "\n^C KeyboardInterrupt"
|
||||
@@ -1299,13 +1385,6 @@ class Coder:
|
||||
self.update_cur_messages()
|
||||
return
|
||||
|
||||
add_rel_files_message = self.check_for_file_mentions(content)
|
||||
if add_rel_files_message:
|
||||
if self.reflected_message:
|
||||
self.reflected_message += "\n\n" + add_rel_files_message
|
||||
else:
|
||||
self.reflected_message = add_rel_files_message
|
||||
|
||||
def reply_completed(self):
|
||||
pass
|
||||
|
||||
@@ -1348,9 +1427,7 @@ class Coder:
|
||||
res.append("- Ask for smaller changes in each request.")
|
||||
res.append("- Break your code into smaller source files.")
|
||||
if "diff" not in self.main_model.edit_format:
|
||||
res.append(
|
||||
"- Use a stronger model like gpt-4o, sonnet or opus that can return diffs."
|
||||
)
|
||||
res.append("- Use a stronger model that can return diffs.")
|
||||
|
||||
if input_tokens >= max_input_tokens or total_tokens >= max_input_tokens:
|
||||
res.append("")
|
||||
@@ -1367,6 +1444,8 @@ class Coder:
|
||||
def lint_edited(self, fnames):
|
||||
res = ""
|
||||
for fname in fnames:
|
||||
if not fname:
|
||||
continue
|
||||
errors = self.linter.lint(self.abs_root_path(fname))
|
||||
|
||||
if errors:
|
||||
@@ -1395,7 +1474,7 @@ class Coder:
|
||||
words = set(word for word in content.split())
|
||||
|
||||
# drop sentence punctuation from the end
|
||||
words = set(word.rstrip(",.!;:") for word in words)
|
||||
words = set(word.rstrip(",.!;:?") for word in words)
|
||||
|
||||
# strip away all kinds of quotes
|
||||
quotes = "".join(['"', "'", "`"])
|
||||
@@ -1403,9 +1482,18 @@ class Coder:
|
||||
|
||||
addable_rel_fnames = self.get_addable_relative_files()
|
||||
|
||||
# Get basenames of files already in chat or read-only
|
||||
existing_basenames = {os.path.basename(f) for f in self.get_inchat_relative_files()} | {
|
||||
os.path.basename(self.get_rel_fname(f)) for f in self.abs_read_only_fnames
|
||||
}
|
||||
|
||||
mentioned_rel_fnames = set()
|
||||
fname_to_rel_fnames = {}
|
||||
for rel_fname in addable_rel_fnames:
|
||||
# Skip files that share a basename with files already in chat
|
||||
if os.path.basename(rel_fname) in existing_basenames:
|
||||
continue
|
||||
|
||||
normalized_rel_fname = rel_fname.replace("\\", "/")
|
||||
normalized_words = set(word.replace("\\", "/") for word in words)
|
||||
if normalized_rel_fname in normalized_words:
|
||||
@@ -1475,6 +1563,16 @@ class Coder:
|
||||
yield from self.show_send_output_stream(completion)
|
||||
else:
|
||||
self.show_send_output(completion)
|
||||
|
||||
# Calculate costs for successful responses
|
||||
self.calculate_and_show_tokens_and_cost(messages, completion)
|
||||
|
||||
except LiteLLMExceptions().exceptions_tuple() as err:
|
||||
ex_info = LiteLLMExceptions().get_ex_info(err)
|
||||
if ex_info.name == "ContextWindowExceededError":
|
||||
# Still calculate costs for context window errors
|
||||
self.calculate_and_show_tokens_and_cost(messages, completion)
|
||||
raise
|
||||
except KeyboardInterrupt as kbi:
|
||||
self.keyboard_interrupt()
|
||||
raise kbi
|
||||
@@ -1492,8 +1590,6 @@ class Coder:
|
||||
if args:
|
||||
self.io.ai_output(json.dumps(args, indent=4))
|
||||
|
||||
self.calculate_and_show_tokens_and_cost(messages, completion)
|
||||
|
||||
def show_send_output(self, completion):
|
||||
if self.verbose:
|
||||
print(completion)
|
||||
@@ -2055,13 +2151,14 @@ class Coder:
|
||||
self.io.tool_output(f"Running {command}")
|
||||
# Add the command to input history
|
||||
self.io.add_to_input_history(f"/run {command.strip()}")
|
||||
exit_status, output = run_cmd(command, error_print=self.io.tool_error)
|
||||
exit_status, output = run_cmd(command, error_print=self.io.tool_error, cwd=self.root)
|
||||
if output:
|
||||
accumulated_output += f"Output from {command}\n{output}\n"
|
||||
|
||||
if accumulated_output.strip() and not self.io.confirm_ask(
|
||||
if accumulated_output.strip() and self.io.confirm_ask(
|
||||
"Add command output to the chat?", allow_never=True
|
||||
):
|
||||
accumulated_output = ""
|
||||
|
||||
return accumulated_output
|
||||
num_lines = len(accumulated_output.strip().splitlines())
|
||||
line_plural = "line" if num_lines == 1 else "lines"
|
||||
self.io.tool_output(f"Added {num_lines} {line_plural} of output to the chat.")
|
||||
return accumulated_output
|
||||
|
||||
@@ -35,7 +35,9 @@ ONLY EVER RETURN CODE IN A *SEARCH/REPLACE BLOCK*!
|
||||
|
||||
Just suggest shell commands this way, not example code.
|
||||
Only suggest complete shell commands that are ready to execute, without placeholders.
|
||||
Only suggest at most a few shell commands at a time, not more than 1-3.
|
||||
Only suggest at most a few shell commands at a time, not more than 1-3, one per line.
|
||||
Do not suggest multi-line shell commands.
|
||||
All shell commands will run from the root directory of the user's project.
|
||||
|
||||
Use the appropriate shell based on the user's system info:
|
||||
{platform}
|
||||
|
||||
@@ -3,5 +3,6 @@ from .editor_editblock_prompts import EditorEditBlockPrompts
|
||||
|
||||
|
||||
class EditorEditBlockCoder(EditBlockCoder):
|
||||
"A coder that uses search/replace blocks, focused purely on editing files."
|
||||
edit_format = "editor-diff"
|
||||
gpt_prompts = EditorEditBlockPrompts()
|
||||
|
||||
@@ -3,5 +3,6 @@ from .wholefile_coder import WholeFileCoder
|
||||
|
||||
|
||||
class EditorWholeFileCoder(WholeFileCoder):
|
||||
"A coder that operates on entire files, focused purely on editing files."
|
||||
edit_format = "editor-whole"
|
||||
gpt_prompts = EditorWholeFilePrompts()
|
||||
|
||||
@@ -14,6 +14,7 @@ from prompt_toolkit.completion import Completion, PathCompleter
|
||||
from prompt_toolkit.document import Document
|
||||
|
||||
from aider import models, prompts, voice
|
||||
from aider.editor import pipe_editor
|
||||
from aider.format_settings import format_settings
|
||||
from aider.help import Help, install_help_extra
|
||||
from aider.llm import litellm
|
||||
@@ -42,10 +43,20 @@ class Commands:
|
||||
verify_ssl=self.verify_ssl,
|
||||
args=self.args,
|
||||
parser=self.parser,
|
||||
verbose=self.verbose,
|
||||
editor=self.editor,
|
||||
)
|
||||
|
||||
def __init__(
|
||||
self, io, coder, voice_language=None, verify_ssl=True, args=None, parser=None, verbose=False
|
||||
self,
|
||||
io,
|
||||
coder,
|
||||
voice_language=None,
|
||||
verify_ssl=True,
|
||||
args=None,
|
||||
parser=None,
|
||||
verbose=False,
|
||||
editor=None,
|
||||
):
|
||||
self.io = io
|
||||
self.coder = coder
|
||||
@@ -60,6 +71,7 @@ class Commands:
|
||||
self.voice_language = voice_language
|
||||
|
||||
self.help = None
|
||||
self.editor = editor
|
||||
|
||||
def cmd_model(self, args):
|
||||
"Switch to a new LLM"
|
||||
@@ -91,6 +103,13 @@ class Commands:
|
||||
("help", "Get help about using aider (usage, config, troubleshoot)."),
|
||||
("ask", "Ask questions about your code without making any changes."),
|
||||
("code", "Ask for changes to your code (using the best edit format)."),
|
||||
(
|
||||
"architect",
|
||||
(
|
||||
"Work with an architect model to design code changes, and an editor to make"
|
||||
" them."
|
||||
),
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
@@ -578,6 +597,10 @@ class Commands:
|
||||
|
||||
self.io.tool_output(f"Diff since {commit_before_message[:7]}...")
|
||||
|
||||
if self.coder.pretty:
|
||||
run_cmd(f"git diff {commit_before_message}")
|
||||
return
|
||||
|
||||
diff = self.coder.repo.diff_commits(
|
||||
self.coder.pretty,
|
||||
commit_before_message,
|
||||
@@ -775,7 +798,8 @@ class Commands:
|
||||
self.io.tool_error(f"Unable to read {matched_file}")
|
||||
else:
|
||||
self.coder.abs_fnames.add(abs_file_path)
|
||||
self.io.tool_output(f"Added {matched_file} to the chat")
|
||||
fname = self.coder.get_rel_fname(abs_file_path)
|
||||
self.io.tool_output(f"Added {fname} to the chat")
|
||||
self.coder.check_added_files()
|
||||
|
||||
def completions_drop(self):
|
||||
@@ -798,15 +822,33 @@ class Commands:
|
||||
# Expand tilde in the path
|
||||
expanded_word = os.path.expanduser(word)
|
||||
|
||||
# Handle read-only files separately, without glob_filtered_to_repo
|
||||
read_only_matched = [f for f in self.coder.abs_read_only_fnames if expanded_word in f]
|
||||
# Handle read-only files with substring matching and samefile check
|
||||
read_only_matched = []
|
||||
for f in self.coder.abs_read_only_fnames:
|
||||
if expanded_word in f:
|
||||
read_only_matched.append(f)
|
||||
continue
|
||||
|
||||
if read_only_matched:
|
||||
for matched_file in read_only_matched:
|
||||
self.coder.abs_read_only_fnames.remove(matched_file)
|
||||
self.io.tool_output(f"Removed read-only file {matched_file} from the chat")
|
||||
# Try samefile comparison for relative paths
|
||||
try:
|
||||
abs_word = os.path.abspath(expanded_word)
|
||||
if os.path.samefile(abs_word, f):
|
||||
read_only_matched.append(f)
|
||||
except (FileNotFoundError, OSError):
|
||||
continue
|
||||
|
||||
matched_files = self.glob_filtered_to_repo(expanded_word)
|
||||
for matched_file in read_only_matched:
|
||||
self.coder.abs_read_only_fnames.remove(matched_file)
|
||||
self.io.tool_output(f"Removed read-only file {matched_file} from the chat")
|
||||
|
||||
# For editable files, use glob if word contains glob chars, otherwise use substring
|
||||
if any(c in expanded_word for c in "*?[]"):
|
||||
matched_files = self.glob_filtered_to_repo(expanded_word)
|
||||
else:
|
||||
# Use substring matching like we do for read-only files
|
||||
matched_files = [
|
||||
self.coder.get_rel_fname(f) for f in self.coder.abs_fnames if expanded_word in f
|
||||
]
|
||||
|
||||
if not matched_files:
|
||||
matched_files.append(expanded_word)
|
||||
@@ -866,9 +908,8 @@ class Commands:
|
||||
def cmd_run(self, args, add_on_nonzero_exit=False):
|
||||
"Run a shell command and optionally add the output to the chat (alias: !)"
|
||||
exit_status, combined_output = run_cmd(
|
||||
args, verbose=self.verbose, error_print=self.io.tool_error
|
||||
args, verbose=self.verbose, error_print=self.io.tool_error, cwd=self.coder.root
|
||||
)
|
||||
instructions = None
|
||||
|
||||
if combined_output is None:
|
||||
return
|
||||
@@ -876,44 +917,34 @@ class Commands:
|
||||
if add_on_nonzero_exit:
|
||||
add = exit_status != 0
|
||||
else:
|
||||
self.io.tool_output()
|
||||
response = self.io.prompt_ask(
|
||||
"Add the output to the chat?\n(Y)es/(n)o/message with instructions:",
|
||||
).strip()
|
||||
self.io.tool_output()
|
||||
|
||||
if response.lower() in ["yes", "y"]:
|
||||
add = True
|
||||
elif response.lower() in ["no", "n"]:
|
||||
add = False
|
||||
else:
|
||||
add = True
|
||||
instructions = response
|
||||
if response.strip():
|
||||
self.io.user_input(response, log_only=True)
|
||||
self.io.add_to_input_history(response)
|
||||
add = self.io.confirm_ask("Add command output to the chat?")
|
||||
|
||||
if add:
|
||||
for line in combined_output.splitlines():
|
||||
self.io.tool_output(line, log_only=True)
|
||||
num_lines = len(combined_output.strip().splitlines())
|
||||
line_plural = "line" if num_lines == 1 else "lines"
|
||||
self.io.tool_output(f"Added {num_lines} {line_plural} of output to the chat.")
|
||||
|
||||
msg = prompts.run_output.format(
|
||||
command=args,
|
||||
output=combined_output,
|
||||
)
|
||||
|
||||
if instructions:
|
||||
msg = instructions + "\n\n" + msg
|
||||
self.coder.cur_messages += [
|
||||
dict(role="user", content=msg),
|
||||
dict(role="assistant", content="Ok."),
|
||||
]
|
||||
|
||||
return msg
|
||||
if add and exit_status != 0:
|
||||
self.io.placeholder = "Fix that"
|
||||
|
||||
def cmd_exit(self, args):
|
||||
"Exit the application"
|
||||
self.coder.event("exit", reason="/exit")
|
||||
sys.exit()
|
||||
|
||||
def cmd_quit(self, args):
|
||||
"Exit the application"
|
||||
sys.exit()
|
||||
self.cmd_exit(args)
|
||||
|
||||
def cmd_ls(self, args):
|
||||
"List all known files and indicate which are included in the chat session"
|
||||
@@ -1085,43 +1116,23 @@ class Commands:
|
||||
self.io.tool_error("To use /voice you must provide an OpenAI API key.")
|
||||
return
|
||||
try:
|
||||
self.voice = voice.Voice(audio_format=self.args.voice_format)
|
||||
self.voice = voice.Voice(
|
||||
audio_format=self.args.voice_format, device_name=self.args.voice_input_device
|
||||
)
|
||||
except voice.SoundDeviceError:
|
||||
self.io.tool_error(
|
||||
"Unable to import `sounddevice` and/or `soundfile`, is portaudio installed?"
|
||||
)
|
||||
return
|
||||
|
||||
history_iter = self.io.get_input_history()
|
||||
|
||||
history = []
|
||||
size = 0
|
||||
for line in history_iter:
|
||||
if line.startswith("/"):
|
||||
continue
|
||||
if line in history:
|
||||
continue
|
||||
if size + len(line) > 1024:
|
||||
break
|
||||
size += len(line)
|
||||
history.append(line)
|
||||
|
||||
history.reverse()
|
||||
history = "\n".join(history)
|
||||
|
||||
try:
|
||||
text = self.voice.record_and_transcribe(history, language=self.voice_language)
|
||||
text = self.voice.record_and_transcribe(None, language=self.voice_language)
|
||||
except litellm.OpenAIError as err:
|
||||
self.io.tool_error(f"Unable to use OpenAI whisper model: {err}")
|
||||
return
|
||||
|
||||
if text:
|
||||
self.io.add_to_input_history(text)
|
||||
self.io.print()
|
||||
self.io.user_input(text, log_only=False)
|
||||
self.io.print()
|
||||
|
||||
return text
|
||||
self.io.placeholder = text
|
||||
|
||||
def cmd_paste(self, args):
|
||||
"""Paste image/text from the clipboard into the chat.\
|
||||
@@ -1174,9 +1185,14 @@ class Commands:
|
||||
self.io.tool_error(f"Error processing clipboard content: {e}")
|
||||
|
||||
def cmd_read_only(self, args):
|
||||
"Add files to the chat that are for reference, not to be edited"
|
||||
"Add files to the chat that are for reference only, or turn added files to read-only"
|
||||
if not args.strip():
|
||||
self.io.tool_error("Please provide filenames or directories to read.")
|
||||
# Convert all files in chat to read-only
|
||||
for fname in list(self.coder.abs_fnames):
|
||||
self.coder.abs_fnames.remove(fname)
|
||||
self.coder.abs_read_only_fnames.add(fname)
|
||||
rel_fname = self.coder.get_rel_fname(fname)
|
||||
self.io.tool_output(f"Converted {rel_fname} to read-only")
|
||||
return
|
||||
|
||||
filenames = parse_quoted_filenames(args)
|
||||
@@ -1325,6 +1341,10 @@ class Commands:
|
||||
except Exception as e:
|
||||
self.io.tool_error(f"Error saving commands to file: {e}")
|
||||
|
||||
def cmd_multiline_mode(self, args):
|
||||
"Toggle multiline mode (swaps behavior of Enter and Meta+Enter)"
|
||||
self.io.toggle_multiline_mode()
|
||||
|
||||
def cmd_copy(self, args):
|
||||
"Copy the last assistant message to the clipboard"
|
||||
all_messages = self.coder.done_messages + self.coder.cur_messages
|
||||
@@ -1366,6 +1386,57 @@ class Commands:
|
||||
|
||||
report_github_issue(issue_text, title=title, confirm=False)
|
||||
|
||||
def cmd_editor(self, initial_content=""):
|
||||
"Open an editor to write a prompt"
|
||||
|
||||
user_input = pipe_editor(initial_content, suffix="md", editor=self.editor)
|
||||
if user_input.strip():
|
||||
self.io.set_placeholder(user_input.rstrip())
|
||||
|
||||
def cmd_copy_context(self, args=None):
|
||||
"""Copy the current chat context as markdown, suitable to paste into a web UI"""
|
||||
|
||||
chunks = self.coder.format_chat_chunks()
|
||||
|
||||
markdown = ""
|
||||
|
||||
# Only include specified chunks in order
|
||||
for messages in [chunks.repo, chunks.readonly_files, chunks.chat_files]:
|
||||
for msg in messages:
|
||||
# Only include user messages
|
||||
if msg["role"] != "user":
|
||||
continue
|
||||
|
||||
content = msg["content"]
|
||||
|
||||
# Handle image/multipart content
|
||||
if isinstance(content, list):
|
||||
for part in content:
|
||||
if part.get("type") == "text":
|
||||
markdown += part["text"] + "\n\n"
|
||||
else:
|
||||
markdown += content + "\n\n"
|
||||
|
||||
args = args or ""
|
||||
markdown += f"""
|
||||
Just tell me how to edit the files to make the changes.
|
||||
Don't give me back entire files.
|
||||
Just show me the edits I need to make.
|
||||
|
||||
{args}
|
||||
"""
|
||||
|
||||
try:
|
||||
pyperclip.copy(markdown)
|
||||
self.io.tool_output("Copied code context to clipboard.")
|
||||
except pyperclip.PyperclipException as e:
|
||||
self.io.tool_error(f"Failed to copy to clipboard: {str(e)}")
|
||||
self.io.tool_output(
|
||||
"You may need to install xclip or xsel on Linux, or pbcopy on macOS."
|
||||
)
|
||||
except Exception as e:
|
||||
self.io.tool_error(f"An unexpected error occurred while copying to clipboard: {str(e)}")
|
||||
|
||||
|
||||
def expand_subdir(file_path):
|
||||
if file_path.is_file():
|
||||
|
||||
72
aider/copypaste.py
Normal file
@@ -0,0 +1,72 @@
|
||||
import threading
|
||||
import time
|
||||
|
||||
import pyperclip
|
||||
|
||||
|
||||
class ClipboardWatcher:
|
||||
"""Watches clipboard for changes and updates IO placeholder"""
|
||||
|
||||
def __init__(self, io, verbose=False):
|
||||
self.io = io
|
||||
self.verbose = verbose
|
||||
self.stop_event = None
|
||||
self.watcher_thread = None
|
||||
self.last_clipboard = None
|
||||
self.io.clipboard_watcher = self
|
||||
|
||||
def start(self):
|
||||
"""Start watching clipboard for changes"""
|
||||
self.stop_event = threading.Event()
|
||||
self.last_clipboard = pyperclip.paste()
|
||||
|
||||
def watch_clipboard():
|
||||
while not self.stop_event.is_set():
|
||||
try:
|
||||
current = pyperclip.paste()
|
||||
if current != self.last_clipboard:
|
||||
self.last_clipboard = current
|
||||
self.io.interrupt_input()
|
||||
self.io.placeholder = current
|
||||
if len(current.splitlines()) > 1:
|
||||
self.io.placeholder = "\n" + self.io.placeholder + "\n"
|
||||
|
||||
time.sleep(0.5)
|
||||
except Exception as e:
|
||||
if self.verbose:
|
||||
from aider.dump import dump
|
||||
|
||||
dump(f"Clipboard watcher error: {e}")
|
||||
continue
|
||||
|
||||
self.watcher_thread = threading.Thread(target=watch_clipboard, daemon=True)
|
||||
self.watcher_thread.start()
|
||||
|
||||
def stop(self):
|
||||
"""Stop watching clipboard for changes"""
|
||||
if self.stop_event:
|
||||
self.stop_event.set()
|
||||
if self.watcher_thread:
|
||||
self.watcher_thread.join()
|
||||
self.watcher_thread = None
|
||||
self.stop_event = None
|
||||
|
||||
|
||||
def main():
|
||||
"""Example usage of the clipboard watcher"""
|
||||
from aider.io import InputOutput
|
||||
|
||||
io = InputOutput()
|
||||
watcher = ClipboardWatcher(io, verbose=True)
|
||||
|
||||
try:
|
||||
watcher.start()
|
||||
while True:
|
||||
time.sleep(1)
|
||||
except KeyboardInterrupt:
|
||||
print("\nStopped watching clipboard")
|
||||
watcher.stop()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -50,7 +50,6 @@ def diff_partial_update(lines_orig, lines_updated, final=False, fname=None):
|
||||
# dump(lines_orig)
|
||||
# dump(lines_updated)
|
||||
|
||||
assert_newlines(lines_orig)
|
||||
assert_newlines(lines_orig)
|
||||
|
||||
num_orig_lines = len(lines_orig)
|
||||
|
||||
146
aider/editor.py
Normal file
@@ -0,0 +1,146 @@
|
||||
"""
|
||||
Editor module for handling system text editor interactions.
|
||||
|
||||
This module provides functionality to:
|
||||
- Discover and launch the system's configured text editor
|
||||
- Create and manage temporary files for editing
|
||||
- Handle editor preferences from environment variables
|
||||
- Support cross-platform editor operations
|
||||
"""
|
||||
|
||||
import os
|
||||
import platform
|
||||
import shlex
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
DEFAULT_EDITOR_NIX = "vi"
|
||||
DEFAULT_EDITOR_OS_X = "vim"
|
||||
DEFAULT_EDITOR_WINDOWS = "notepad"
|
||||
|
||||
console = Console()
|
||||
|
||||
|
||||
def print_status_message(success, message, style=None):
|
||||
"""
|
||||
Print a status message with appropriate styling.
|
||||
|
||||
:param success: Whether the operation was successful
|
||||
:param message: The message to display
|
||||
:param style: Optional style override. If None, uses green for success and red for failure
|
||||
"""
|
||||
if style is None:
|
||||
style = "bold green" if success else "bold red"
|
||||
console.print(message, style=style)
|
||||
print("")
|
||||
|
||||
|
||||
def write_temp_file(
|
||||
input_data="",
|
||||
suffix=None,
|
||||
prefix=None,
|
||||
dir=None,
|
||||
):
|
||||
"""
|
||||
Create a temporary file with the given input data.
|
||||
|
||||
:param input_data: Content to write to the temporary file
|
||||
:param suffix: Optional file extension (without the dot)
|
||||
:param prefix: Optional prefix for the temporary filename
|
||||
:param dir: Optional directory to create the file in
|
||||
:return: Path to the created temporary file
|
||||
:raises: OSError if file creation or writing fails
|
||||
"""
|
||||
kwargs = {"prefix": prefix, "dir": dir}
|
||||
if suffix:
|
||||
kwargs["suffix"] = f".{suffix}"
|
||||
fd, filepath = tempfile.mkstemp(**kwargs)
|
||||
try:
|
||||
with os.fdopen(fd, "w") as f:
|
||||
f.write(input_data)
|
||||
except Exception:
|
||||
os.close(fd)
|
||||
raise
|
||||
return filepath
|
||||
|
||||
|
||||
def get_environment_editor(default=None):
|
||||
"""
|
||||
Fetches the preferred editor from the environment variables.
|
||||
|
||||
This function checks the following environment variables in order to
|
||||
determine the user's preferred editor:
|
||||
|
||||
- VISUAL
|
||||
- EDITOR
|
||||
|
||||
:param default: The default editor to return if no environment variable is set.
|
||||
:type default: str or None
|
||||
:return: The preferred editor as specified by environment variables or the default value.
|
||||
:rtype: str or None
|
||||
"""
|
||||
editor = os.environ.get("VISUAL", os.environ.get("EDITOR", default))
|
||||
return editor
|
||||
|
||||
|
||||
def discover_editor(editor_override=None):
|
||||
"""
|
||||
Discovers and returns the appropriate editor command as a list of arguments.
|
||||
|
||||
Handles cases where the editor command includes arguments, including quoted arguments
|
||||
with spaces (e.g. 'vim -c "set noswapfile"').
|
||||
|
||||
:return: A list of command parts ready for subprocess execution
|
||||
:rtype: list[str]
|
||||
"""
|
||||
system = platform.system()
|
||||
if system == "Windows":
|
||||
default_editor = DEFAULT_EDITOR_WINDOWS
|
||||
elif system == "Darwin":
|
||||
default_editor = DEFAULT_EDITOR_OS_X
|
||||
else:
|
||||
default_editor = DEFAULT_EDITOR_NIX
|
||||
if editor_override:
|
||||
editor = editor_override
|
||||
else:
|
||||
editor = get_environment_editor(default_editor)
|
||||
try:
|
||||
return shlex.split(editor)
|
||||
except ValueError as e:
|
||||
raise RuntimeError(f"Invalid editor command format '{editor}': {e}")
|
||||
|
||||
|
||||
def pipe_editor(input_data="", suffix=None, editor=None):
|
||||
"""
|
||||
Opens the system editor with optional input data and returns the edited content.
|
||||
|
||||
This function creates a temporary file with the provided input data, opens it in
|
||||
the system editor, waits for the user to make changes and close the editor, then
|
||||
reads and returns the modified content. The temporary file is deleted afterwards.
|
||||
|
||||
:param input_data: Initial content to populate the editor with
|
||||
:type input_data: str
|
||||
:param suffix: Optional file extension for the temporary file (e.g. '.txt', '.md')
|
||||
:type suffix: str or None
|
||||
:return: The edited content after the editor is closed
|
||||
:rtype: str
|
||||
"""
|
||||
filepath = write_temp_file(input_data, suffix)
|
||||
command_parts = discover_editor(editor)
|
||||
command_parts.append(filepath)
|
||||
subprocess.call(command_parts)
|
||||
with open(filepath, "r") as f:
|
||||
output_data = f.read()
|
||||
try:
|
||||
os.remove(filepath)
|
||||
except PermissionError:
|
||||
print_status_message(
|
||||
False,
|
||||
(
|
||||
f"WARNING: Unable to delete temporary file {filepath!r}. You may need to delete it"
|
||||
" manually."
|
||||
),
|
||||
)
|
||||
return output_data
|
||||
@@ -40,6 +40,11 @@ EXCEPTIONS = [
|
||||
ExInfo("ServiceUnavailableError", True, "The API provider's servers are down or overloaded."),
|
||||
ExInfo("UnprocessableEntityError", True, None),
|
||||
ExInfo("UnsupportedParamsError", True, None),
|
||||
ExInfo(
|
||||
"Timeout",
|
||||
True,
|
||||
"The API provider timed out without returning a response. They may be down or overloaded.",
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -73,4 +78,13 @@ class LiteLLMExceptions:
|
||||
|
||||
def get_ex_info(self, ex):
|
||||
"""Return the ExInfo for a given exception instance"""
|
||||
import litellm
|
||||
|
||||
if ex.__class__ is litellm.APIConnectionError:
|
||||
if "google.auth" in str(ex):
|
||||
return ExInfo(
|
||||
"APIConnectionError", False, "You need to: pip install google-generativeai"
|
||||
)
|
||||
if "boto3" in str(ex):
|
||||
return ExInfo("APIConnectionError", False, "You need to: pip install boto3")
|
||||
return self.exceptions.get(ex.__class__, ExInfo(None, None, None))
|
||||
|
||||
@@ -7,4 +7,5 @@ exclude_website_pats = [
|
||||
"docs/unified-diffs.md",
|
||||
"docs/leaderboards/index.md",
|
||||
"assets/**",
|
||||
"**/.DS_Store",
|
||||
]
|
||||
|
||||
@@ -108,9 +108,7 @@ class ChatSummary:
|
||||
|
||||
for model in self.models:
|
||||
try:
|
||||
summary = simple_send_with_retries(
|
||||
model.name, summarize_messages, extra_params=model.extra_params
|
||||
)
|
||||
summary = simple_send_with_retries(model, summarize_messages)
|
||||
if summary is not None:
|
||||
summary = prompts.summary_prefix + summary
|
||||
return [dict(role="user", content=summary)]
|
||||
|
||||
204
aider/io.py
@@ -1,5 +1,6 @@
|
||||
import base64
|
||||
import os
|
||||
import signal
|
||||
import time
|
||||
import webbrowser
|
||||
from collections import defaultdict
|
||||
@@ -11,8 +12,10 @@ from pathlib import Path
|
||||
from prompt_toolkit.completion import Completer, Completion, ThreadedCompleter
|
||||
from prompt_toolkit.cursor_shapes import ModalCursorShapeConfig
|
||||
from prompt_toolkit.enums import EditingMode
|
||||
from prompt_toolkit.filters import Condition, is_searching
|
||||
from prompt_toolkit.history import FileHistory
|
||||
from prompt_toolkit.key_binding import KeyBindings
|
||||
from prompt_toolkit.keys import Keys
|
||||
from prompt_toolkit.lexers import PygmentsLexer
|
||||
from prompt_toolkit.shortcuts import CompleteStyle, PromptSession
|
||||
from prompt_toolkit.styles import Style
|
||||
@@ -173,6 +176,7 @@ class AutoCompleter(Completer):
|
||||
class InputOutput:
|
||||
num_error_outputs = 0
|
||||
num_user_asks = 0
|
||||
clipboard_watcher = None
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -197,9 +201,14 @@ class InputOutput:
|
||||
llm_history_file=None,
|
||||
editingmode=EditingMode.EMACS,
|
||||
fancy_input=True,
|
||||
file_watcher=None,
|
||||
multiline_mode=False,
|
||||
):
|
||||
self.placeholder = None
|
||||
self.interrupted = False
|
||||
self.never_prompts = set()
|
||||
self.editingmode = editingmode
|
||||
self.multiline_mode = multiline_mode
|
||||
no_color = os.environ.get("NO_COLOR")
|
||||
if no_color is not None and no_color != "":
|
||||
pretty = False
|
||||
@@ -260,6 +269,8 @@ class InputOutput:
|
||||
else:
|
||||
self.console = Console(force_terminal=False, no_color=True) # non-pretty
|
||||
|
||||
self.file_watcher = file_watcher
|
||||
|
||||
def _get_style(self):
|
||||
style_dict = {}
|
||||
if not self.pretty:
|
||||
@@ -313,7 +324,7 @@ class InputOutput:
|
||||
self.tool_error(f"{filename}: {e}")
|
||||
return
|
||||
|
||||
def read_text(self, filename):
|
||||
def read_text(self, filename, silent=False):
|
||||
if is_image_file(filename):
|
||||
return self.read_image(filename)
|
||||
|
||||
@@ -321,17 +332,21 @@ class InputOutput:
|
||||
with open(str(filename), "r", encoding=self.encoding) as f:
|
||||
return f.read()
|
||||
except OSError as err:
|
||||
self.tool_error(f"{filename}: unable to read: {err}")
|
||||
if not silent:
|
||||
self.tool_error(f"{filename}: unable to read: {err}")
|
||||
return
|
||||
except FileNotFoundError:
|
||||
self.tool_error(f"{filename}: file not found error")
|
||||
if not silent:
|
||||
self.tool_error(f"{filename}: file not found error")
|
||||
return
|
||||
except IsADirectoryError:
|
||||
self.tool_error(f"{filename}: is a directory")
|
||||
if not silent:
|
||||
self.tool_error(f"{filename}: is a directory")
|
||||
return
|
||||
except UnicodeError as e:
|
||||
self.tool_error(f"{filename}: {e}")
|
||||
self.tool_error("Use --encoding to set the unicode encoding.")
|
||||
if not silent:
|
||||
self.tool_error(f"{filename}: {e}")
|
||||
self.tool_error("Use --encoding to set the unicode encoding.")
|
||||
return
|
||||
|
||||
def write_text(self, filename, content, max_retries=5, initial_delay=0.1):
|
||||
@@ -372,6 +387,13 @@ class InputOutput:
|
||||
else:
|
||||
print()
|
||||
|
||||
def interrupt_input(self):
|
||||
if self.prompt_session and self.prompt_session.app:
|
||||
# Store any partial input before interrupting
|
||||
self.placeholder = self.prompt_session.app.current_buffer.text
|
||||
self.interrupted = True
|
||||
self.prompt_session.app.exit()
|
||||
|
||||
def get_input(
|
||||
self,
|
||||
root,
|
||||
@@ -392,6 +414,8 @@ class InputOutput:
|
||||
show = self.format_files_for_input(rel_fnames, rel_read_only_fnames)
|
||||
if edit_format:
|
||||
show += edit_format
|
||||
if self.multiline_mode:
|
||||
show += (" " if edit_format else "") + "multi"
|
||||
show += "> "
|
||||
|
||||
inp = ""
|
||||
@@ -410,16 +434,51 @@ class InputOutput:
|
||||
)
|
||||
)
|
||||
|
||||
def suspend_to_bg(event):
|
||||
"""Suspend currently running application."""
|
||||
event.app.suspend_to_background()
|
||||
|
||||
kb = KeyBindings()
|
||||
|
||||
@kb.add(Keys.ControlZ, filter=Condition(lambda: hasattr(signal, "SIGTSTP")))
|
||||
def _(event):
|
||||
"Suspend to background with ctrl-z"
|
||||
suspend_to_bg(event)
|
||||
|
||||
@kb.add("c-space")
|
||||
def _(event):
|
||||
"Ignore Ctrl when pressing space bar"
|
||||
event.current_buffer.insert_text(" ")
|
||||
|
||||
@kb.add("escape", "c-m", eager=True)
|
||||
@kb.add("c-up")
|
||||
def _(event):
|
||||
event.current_buffer.insert_text("\n")
|
||||
"Navigate backward through history"
|
||||
event.current_buffer.history_backward()
|
||||
|
||||
@kb.add("c-down")
|
||||
def _(event):
|
||||
"Navigate forward through history"
|
||||
event.current_buffer.history_forward()
|
||||
|
||||
@kb.add("enter", eager=True, filter=~is_searching)
|
||||
def _(event):
|
||||
"Handle Enter key press"
|
||||
if self.multiline_mode:
|
||||
# In multiline mode, Enter adds a newline
|
||||
event.current_buffer.insert_text("\n")
|
||||
else:
|
||||
# In normal mode, Enter submits
|
||||
event.current_buffer.validate_and_handle()
|
||||
|
||||
@kb.add("escape", "enter", eager=True, filter=~is_searching) # This is Alt+Enter
|
||||
def _(event):
|
||||
"Handle Alt+Enter key press"
|
||||
if self.multiline_mode:
|
||||
# In multiline mode, Alt+Enter submits
|
||||
event.current_buffer.validate_and_handle()
|
||||
else:
|
||||
# In normal mode, Alt+Enter adds a newline
|
||||
event.current_buffer.insert_text("\n")
|
||||
|
||||
while True:
|
||||
if multiline_input:
|
||||
@@ -427,8 +486,20 @@ class InputOutput:
|
||||
|
||||
try:
|
||||
if self.prompt_session:
|
||||
# Use placeholder if set, then clear it
|
||||
default = self.placeholder or ""
|
||||
self.placeholder = None
|
||||
|
||||
self.interrupted = False
|
||||
if not multiline_input:
|
||||
if self.file_watcher:
|
||||
self.file_watcher.start()
|
||||
if self.clipboard_watcher:
|
||||
self.clipboard_watcher.start()
|
||||
|
||||
line = self.prompt_session.prompt(
|
||||
show,
|
||||
default=default,
|
||||
completer=completer_instance,
|
||||
reserve_space_for_menu=4,
|
||||
complete_style=CompleteStyle.MULTI_COLUMN,
|
||||
@@ -437,17 +508,63 @@ class InputOutput:
|
||||
)
|
||||
else:
|
||||
line = input(show)
|
||||
|
||||
# Check if we were interrupted by a file change
|
||||
if self.interrupted:
|
||||
line = line or ""
|
||||
if self.file_watcher:
|
||||
cmd = self.file_watcher.process_changes()
|
||||
return cmd
|
||||
|
||||
except EOFError:
|
||||
raise
|
||||
except Exception as err:
|
||||
import traceback
|
||||
|
||||
self.tool_error(str(err))
|
||||
self.tool_error(traceback.format_exc())
|
||||
return ""
|
||||
except UnicodeEncodeError as err:
|
||||
self.tool_error(str(err))
|
||||
return ""
|
||||
finally:
|
||||
if self.file_watcher:
|
||||
self.file_watcher.stop()
|
||||
if self.clipboard_watcher:
|
||||
self.clipboard_watcher.stop()
|
||||
|
||||
if line and line[0] == "{" and not multiline_input:
|
||||
multiline_input = True
|
||||
inp += line[1:] + "\n"
|
||||
if line.strip("\r\n") and not multiline_input:
|
||||
stripped = line.strip("\r\n")
|
||||
if stripped == "{":
|
||||
multiline_input = True
|
||||
multiline_tag = None
|
||||
inp += ""
|
||||
elif stripped[0] == "{":
|
||||
# Extract tag if it exists (only alphanumeric chars)
|
||||
tag = "".join(c for c in stripped[1:] if c.isalnum())
|
||||
if stripped == "{" + tag:
|
||||
multiline_input = True
|
||||
multiline_tag = tag
|
||||
inp += ""
|
||||
else:
|
||||
inp = line
|
||||
break
|
||||
else:
|
||||
inp = line
|
||||
break
|
||||
continue
|
||||
elif line and line[-1] == "}" and multiline_input:
|
||||
inp += line[:-1] + "\n"
|
||||
break
|
||||
elif multiline_input and line.strip():
|
||||
if multiline_tag:
|
||||
# Check if line is exactly "tag}"
|
||||
if line.strip("\r\n") == f"{multiline_tag}}}":
|
||||
break
|
||||
else:
|
||||
inp += line + "\n"
|
||||
# Check if line is exactly "}"
|
||||
elif line.strip("\r\n") == "}":
|
||||
break
|
||||
else:
|
||||
inp += line + "\n"
|
||||
elif multiline_input:
|
||||
inp += line + "\n"
|
||||
else:
|
||||
@@ -461,10 +578,13 @@ class InputOutput:
|
||||
def add_to_input_history(self, inp):
|
||||
if not self.input_history_file:
|
||||
return
|
||||
FileHistory(self.input_history_file).append_string(inp)
|
||||
# Also add to the in-memory history if it exists
|
||||
if hasattr(self, "session") and hasattr(self.session, "history"):
|
||||
self.session.history.append_string(inp)
|
||||
try:
|
||||
FileHistory(self.input_history_file).append_string(inp)
|
||||
# Also add to the in-memory history if it exists
|
||||
if self.prompt_session and self.prompt_session.history:
|
||||
self.prompt_session.history.append_string(inp)
|
||||
except OSError as err:
|
||||
self.tool_warning(f"Unable to write to input history file: {err}")
|
||||
|
||||
def get_input_history(self):
|
||||
if not self.input_history_file:
|
||||
@@ -481,14 +601,17 @@ class InputOutput:
|
||||
log_file.write(f"{role.upper()} {timestamp}\n")
|
||||
log_file.write(content + "\n")
|
||||
|
||||
def display_user_input(self, inp):
|
||||
if self.pretty and self.user_input_color:
|
||||
style = dict(style=self.user_input_color)
|
||||
else:
|
||||
style = dict()
|
||||
|
||||
self.console.print(Text(inp), **style)
|
||||
|
||||
def user_input(self, inp, log_only=True):
|
||||
if not log_only:
|
||||
if self.pretty and self.user_input_color:
|
||||
style = dict(style=self.user_input_color)
|
||||
else:
|
||||
style = dict()
|
||||
|
||||
self.console.print(Text(inp), **style)
|
||||
self.display_user_input(inp)
|
||||
|
||||
prefix = "####"
|
||||
if inp:
|
||||
@@ -508,11 +631,11 @@ class InputOutput:
|
||||
hist = "\n" + content.strip() + "\n\n"
|
||||
self.append_chat_history(hist)
|
||||
|
||||
def offer_url(self, url, prompt="Open URL for more info?"):
|
||||
def offer_url(self, url, prompt="Open URL for more info?", allow_never=True):
|
||||
"""Offer to open a URL in the browser, returns True if opened."""
|
||||
if url in self.never_prompts:
|
||||
return False
|
||||
if self.confirm_ask(prompt, subject=url, allow_never=True):
|
||||
if self.confirm_ask(prompt, subject=url, allow_never=allow_never):
|
||||
webbrowser.open(url)
|
||||
return True
|
||||
return False
|
||||
@@ -526,6 +649,9 @@ class InputOutput:
|
||||
group=None,
|
||||
allow_never=False,
|
||||
):
|
||||
# Temporarily disable multiline mode for yes/no prompts
|
||||
orig_multiline = self.multiline_mode
|
||||
self.multiline_mode = False
|
||||
self.num_user_asks += 1
|
||||
|
||||
question_id = (question, subject)
|
||||
@@ -583,6 +709,7 @@ class InputOutput:
|
||||
res = self.prompt_session.prompt(
|
||||
question,
|
||||
style=style,
|
||||
complete_while_typing=False,
|
||||
)
|
||||
else:
|
||||
res = input(question)
|
||||
@@ -623,9 +750,15 @@ class InputOutput:
|
||||
hist = f"{question.strip()} {res}"
|
||||
self.append_chat_history(hist, linebreak=True, blockquote=True)
|
||||
|
||||
# Restore original multiline mode
|
||||
self.multiline_mode = orig_multiline
|
||||
|
||||
return is_yes
|
||||
|
||||
def prompt_ask(self, question, default="", subject=None):
|
||||
# Temporarily disable multiline mode for prompts
|
||||
orig_multiline = self.multiline_mode
|
||||
self.multiline_mode = False
|
||||
self.num_user_asks += 1
|
||||
|
||||
if subject:
|
||||
@@ -649,6 +782,9 @@ class InputOutput:
|
||||
if self.yes in (True, False):
|
||||
self.tool_output(hist)
|
||||
|
||||
# Restore original multiline mode
|
||||
self.multiline_mode = orig_multiline
|
||||
|
||||
return res
|
||||
|
||||
def _tool_message(self, message="", strip=True, color=None):
|
||||
@@ -711,9 +847,25 @@ class InputOutput:
|
||||
|
||||
self.console.print(show_resp)
|
||||
|
||||
def set_placeholder(self, placeholder):
|
||||
"""Set a one-time placeholder text for the next input prompt."""
|
||||
self.placeholder = placeholder
|
||||
|
||||
def print(self, message=""):
|
||||
print(message)
|
||||
|
||||
def toggle_multiline_mode(self):
|
||||
"""Toggle between normal and multiline input modes"""
|
||||
self.multiline_mode = not self.multiline_mode
|
||||
if self.multiline_mode:
|
||||
self.tool_output(
|
||||
"Multiline mode: Enabled. Enter inserts newline, Alt-Enter submits text"
|
||||
)
|
||||
else:
|
||||
self.tool_output(
|
||||
"Multiline mode: Disabled. Alt-Enter inserts newline, Enter submits text"
|
||||
)
|
||||
|
||||
def append_chat_history(self, text, linebreak=False, blockquote=False, strip=True):
|
||||
if blockquote:
|
||||
if strip:
|
||||
|
||||
@@ -49,11 +49,11 @@ class Linter:
|
||||
try:
|
||||
process = subprocess.Popen(
|
||||
cmd,
|
||||
cwd=self.root,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
encoding=self.encoding,
|
||||
errors="replace",
|
||||
cwd=self.root,
|
||||
)
|
||||
except OSError as err:
|
||||
print(f"Unable to execute lint command: {err}")
|
||||
@@ -152,12 +152,12 @@ class Linter:
|
||||
try:
|
||||
result = subprocess.run(
|
||||
flake8_cmd,
|
||||
cwd=self.root,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
encoding=self.encoding,
|
||||
errors="replace",
|
||||
cwd=self.root,
|
||||
)
|
||||
errors = result.stdout + result.stderr
|
||||
except Exception as e:
|
||||
|
||||
@@ -13,6 +13,8 @@ os.environ["LITELLM_MODE"] = "PRODUCTION"
|
||||
|
||||
# `import litellm` takes 1.5 seconds, defer it!
|
||||
|
||||
VERBOSE = False
|
||||
|
||||
|
||||
class LazyLiteLLM:
|
||||
_lazy_module = None
|
||||
@@ -27,6 +29,9 @@ class LazyLiteLLM:
|
||||
if self._lazy_module is not None:
|
||||
return
|
||||
|
||||
if VERBOSE:
|
||||
print("Loading litellm...")
|
||||
|
||||
self._lazy_module = importlib.import_module("litellm")
|
||||
|
||||
self._lazy_module.suppress_debug_info = True
|
||||
|
||||
252
aider/main.py
@@ -5,6 +5,8 @@ import re
|
||||
import sys
|
||||
import threading
|
||||
import traceback
|
||||
import webbrowser
|
||||
from dataclasses import fields
|
||||
from pathlib import Path
|
||||
|
||||
import git
|
||||
@@ -16,14 +18,18 @@ from aider import __version__, models, urls, utils
|
||||
from aider.analytics import Analytics
|
||||
from aider.args import get_parser
|
||||
from aider.coders import Coder
|
||||
from aider.coders.base_coder import UnknownEditFormat
|
||||
from aider.commands import Commands, SwitchCoder
|
||||
from aider.copypaste import ClipboardWatcher
|
||||
from aider.format_settings import format_settings, scrub_sensitive_info
|
||||
from aider.history import ChatSummary
|
||||
from aider.io import InputOutput
|
||||
from aider.llm import litellm # noqa: F401; properly init litellm on launch
|
||||
from aider.models import ModelSettings
|
||||
from aider.repo import ANY_GIT_ERROR, GitRepo
|
||||
from aider.report import report_uncaught_exceptions
|
||||
from aider.versioncheck import check_version, install_from_main_branch, install_upgrade
|
||||
from aider.watch import FileWatcher
|
||||
|
||||
from .dump import dump # noqa: F401
|
||||
|
||||
@@ -153,13 +159,17 @@ def check_gitignore(git_root, io, ask=True):
|
||||
|
||||
gitignore_file = Path(git_root) / ".gitignore"
|
||||
if gitignore_file.exists():
|
||||
content = io.read_text(gitignore_file)
|
||||
if content is None:
|
||||
try:
|
||||
content = io.read_text(gitignore_file)
|
||||
if content is None:
|
||||
return
|
||||
existing_lines = content.splitlines()
|
||||
for pat in patterns:
|
||||
if pat not in existing_lines:
|
||||
patterns_to_add.append(pat)
|
||||
except OSError as e:
|
||||
io.tool_error(f"Error when trying to read {gitignore_file}: {e}")
|
||||
return
|
||||
existing_lines = content.splitlines()
|
||||
for pat in patterns:
|
||||
if pat not in existing_lines:
|
||||
patterns_to_add.append(pat)
|
||||
else:
|
||||
content = ""
|
||||
patterns_to_add = patterns
|
||||
@@ -173,9 +183,17 @@ def check_gitignore(git_root, io, ask=True):
|
||||
if content and not content.endswith("\n"):
|
||||
content += "\n"
|
||||
content += "\n".join(patterns_to_add) + "\n"
|
||||
io.write_text(gitignore_file, content)
|
||||
|
||||
io.tool_output(f"Added {', '.join(patterns_to_add)} to .gitignore")
|
||||
try:
|
||||
io.write_text(gitignore_file, content)
|
||||
io.tool_output(f"Added {', '.join(patterns_to_add)} to .gitignore")
|
||||
except OSError as e:
|
||||
io.tool_error(f"Error when trying to write to {gitignore_file}: {e}")
|
||||
io.tool_output(
|
||||
"Try running with appropriate permissions or manually add these patterns to .gitignore:"
|
||||
)
|
||||
for pattern in patterns_to_add:
|
||||
io.tool_output(f" {pattern}")
|
||||
|
||||
|
||||
def check_streamlit_install(io):
|
||||
@@ -451,6 +469,10 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
litellm._lazy_module.client_session = httpx.Client(verify=False)
|
||||
litellm._lazy_module.aclient_session = httpx.AsyncClient(verify=False)
|
||||
|
||||
if args.timeout:
|
||||
litellm._load_litellm()
|
||||
litellm._lazy_module.request_timeout = args.timeout
|
||||
|
||||
if args.dark_mode:
|
||||
args.user_input_color = "#32FF32"
|
||||
args.tool_error_color = "#FF3333"
|
||||
@@ -493,6 +515,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
llm_history_file=args.llm_history_file,
|
||||
editingmode=editing_mode,
|
||||
fancy_input=args.fancy_input,
|
||||
multiline_mode=args.multiline,
|
||||
)
|
||||
|
||||
io = get_io(args.pretty)
|
||||
@@ -504,9 +527,53 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
io = get_io(False)
|
||||
io.tool_warning("Terminal does not support pretty output (UnicodeDecodeError)")
|
||||
|
||||
# Process any environment variables set via --set-env
|
||||
if args.set_env:
|
||||
for env_setting in args.set_env:
|
||||
try:
|
||||
name, value = env_setting.split("=", 1)
|
||||
os.environ[name.strip()] = value.strip()
|
||||
except ValueError:
|
||||
io.tool_error(f"Invalid --set-env format: {env_setting}")
|
||||
io.tool_output("Format should be: ENV_VAR_NAME=value")
|
||||
return 1
|
||||
|
||||
# Process any API keys set via --api-key
|
||||
if args.api_key:
|
||||
for api_setting in args.api_key:
|
||||
try:
|
||||
provider, key = api_setting.split("=", 1)
|
||||
env_var = f"{provider.strip().upper()}_API_KEY"
|
||||
os.environ[env_var] = key.strip()
|
||||
except ValueError:
|
||||
io.tool_error(f"Invalid --api-key format: {api_setting}")
|
||||
io.tool_output("Format should be: provider=key")
|
||||
return 1
|
||||
|
||||
if args.anthropic_api_key:
|
||||
os.environ["ANTHROPIC_API_KEY"] = args.anthropic_api_key
|
||||
|
||||
if args.openai_api_key:
|
||||
os.environ["OPENAI_API_KEY"] = args.openai_api_key
|
||||
if args.openai_api_base:
|
||||
os.environ["OPENAI_API_BASE"] = args.openai_api_base
|
||||
if args.openai_api_version:
|
||||
io.tool_warning(
|
||||
"--openai-api-version is deprecated, use --set-env OPENAI_API_VERSION=<value>"
|
||||
)
|
||||
os.environ["OPENAI_API_VERSION"] = args.openai_api_version
|
||||
if args.openai_api_type:
|
||||
io.tool_warning("--openai-api-type is deprecated, use --set-env OPENAI_API_TYPE=<value>")
|
||||
os.environ["OPENAI_API_TYPE"] = args.openai_api_type
|
||||
if args.openai_organization_id:
|
||||
io.tool_warning(
|
||||
"--openai-organization-id is deprecated, use --set-env OPENAI_ORGANIZATION=<value>"
|
||||
)
|
||||
os.environ["OPENAI_ORGANIZATION"] = args.openai_organization_id
|
||||
|
||||
analytics = Analytics(logfile=args.analytics_log, permanently_disable=args.analytics_disable)
|
||||
if args.analytics:
|
||||
if analytics.need_to_ask():
|
||||
if args.analytics is not False:
|
||||
if analytics.need_to_ask(args.analytics):
|
||||
io.tool_output(
|
||||
"Aider respects your privacy and never collects your code, chat messages, keys or"
|
||||
" personal info."
|
||||
@@ -531,9 +598,11 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
|
||||
if args.gui and not return_coder:
|
||||
if not check_streamlit_install(io):
|
||||
analytics.event("exit", reason="Streamlit not installed")
|
||||
return
|
||||
analytics.event("gui session")
|
||||
launch_gui(argv)
|
||||
analytics.event("exit", reason="GUI session ended")
|
||||
return
|
||||
|
||||
if args.verbose:
|
||||
@@ -544,7 +613,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
fnames = [str(Path(fn).resolve()) for fn in all_files]
|
||||
read_only_fnames = []
|
||||
for fn in args.read or []:
|
||||
path = Path(fn).resolve()
|
||||
path = Path(fn).expanduser().resolve()
|
||||
if path.is_dir():
|
||||
read_only_fnames.extend(str(f) for f in path.rglob("*") if f.is_file())
|
||||
else:
|
||||
@@ -560,6 +629,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
io.tool_output(
|
||||
"Provide either a single directory of a git repo, or a list of one or more files."
|
||||
)
|
||||
analytics.event("exit", reason="Invalid directory input")
|
||||
return 1
|
||||
|
||||
git_dname = None
|
||||
@@ -570,6 +640,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
fnames = []
|
||||
else:
|
||||
io.tool_error(f"{all_files[0]} is a directory, but --no-git selected.")
|
||||
analytics.event("exit", reason="Directory with --no-git")
|
||||
return 1
|
||||
|
||||
# We can't know the git repo for sure until after parsing the args.
|
||||
@@ -578,18 +649,22 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
if args.git and not force_git_root:
|
||||
right_repo_root = guessed_wrong_repo(io, git_root, fnames, git_dname)
|
||||
if right_repo_root:
|
||||
analytics.event("exit", reason="Recursing with correct repo")
|
||||
return main(argv, input, output, right_repo_root, return_coder=return_coder)
|
||||
|
||||
if args.just_check_update:
|
||||
update_available = check_version(io, just_check=True, verbose=args.verbose)
|
||||
analytics.event("exit", reason="Just checking update")
|
||||
return 0 if not update_available else 1
|
||||
|
||||
if args.install_main_branch:
|
||||
success = install_from_main_branch(io)
|
||||
analytics.event("exit", reason="Installed main branch")
|
||||
return 0 if success else 1
|
||||
|
||||
if args.upgrade:
|
||||
success = install_upgrade(io)
|
||||
analytics.event("exit", reason="Upgrade completed")
|
||||
return 0 if success else 1
|
||||
|
||||
if args.check_update:
|
||||
@@ -597,6 +672,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
|
||||
if args.list_models:
|
||||
models.print_matching_models(io, args.list_models)
|
||||
analytics.event("exit", reason="Listed models")
|
||||
return 0
|
||||
|
||||
if args.git:
|
||||
@@ -612,25 +688,25 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
cmd_line = scrub_sensitive_info(args, cmd_line)
|
||||
io.tool_output(cmd_line, log_only=True)
|
||||
|
||||
check_and_load_imports(io, verbose=args.verbose)
|
||||
|
||||
if args.anthropic_api_key:
|
||||
os.environ["ANTHROPIC_API_KEY"] = args.anthropic_api_key
|
||||
|
||||
if args.openai_api_key:
|
||||
os.environ["OPENAI_API_KEY"] = args.openai_api_key
|
||||
if args.openai_api_base:
|
||||
os.environ["OPENAI_API_BASE"] = args.openai_api_base
|
||||
if args.openai_api_version:
|
||||
os.environ["OPENAI_API_VERSION"] = args.openai_api_version
|
||||
if args.openai_api_type:
|
||||
os.environ["OPENAI_API_TYPE"] = args.openai_api_type
|
||||
if args.openai_organization_id:
|
||||
os.environ["OPENAI_ORGANIZATION"] = args.openai_organization_id
|
||||
is_first_run = is_first_run_of_new_version(io, verbose=args.verbose)
|
||||
check_and_load_imports(io, is_first_run, verbose=args.verbose)
|
||||
|
||||
register_models(git_root, args.model_settings_file, io, verbose=args.verbose)
|
||||
register_litellm_models(git_root, args.model_metadata_file, io, verbose=args.verbose)
|
||||
|
||||
# Process any command line aliases
|
||||
if args.alias:
|
||||
for alias_def in args.alias:
|
||||
# Split on first colon only
|
||||
parts = alias_def.split(":", 1)
|
||||
if len(parts) != 2:
|
||||
io.tool_error(f"Invalid alias format: {alias_def}")
|
||||
io.tool_output("Format should be: alias:model-name")
|
||||
analytics.event("exit", reason="Invalid alias format error")
|
||||
return 1
|
||||
alias, model = parts
|
||||
models.MODEL_ALIASES[alias.strip()] = model.strip()
|
||||
|
||||
if not args.model:
|
||||
args.model = "gpt-4o-2024-08-06"
|
||||
if os.environ.get("ANTHROPIC_API_KEY"):
|
||||
@@ -643,12 +719,23 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
editor_edit_format=args.editor_edit_format,
|
||||
)
|
||||
|
||||
if args.copy_paste and args.edit_format is None:
|
||||
if main_model.edit_format in ("diff", "whole"):
|
||||
main_model.edit_format = "editor-" + main_model.edit_format
|
||||
|
||||
if args.verbose:
|
||||
io.tool_output("Model info:")
|
||||
io.tool_output("Model metadata:")
|
||||
io.tool_output(json.dumps(main_model.info, indent=4))
|
||||
|
||||
io.tool_output("Model settings:")
|
||||
for attr in sorted(fields(ModelSettings), key=lambda x: x.name):
|
||||
val = getattr(main_model, attr.name)
|
||||
val = json.dumps(val, indent=4)
|
||||
io.tool_output(f"{attr.name}: {val}")
|
||||
|
||||
lint_cmds = parse_lint_cmds(args.lint_cmd, io)
|
||||
if lint_cmds is None:
|
||||
analytics.event("exit", reason="Invalid lint command format")
|
||||
return 1
|
||||
|
||||
if args.show_model_warnings:
|
||||
@@ -661,6 +748,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
io.offer_url(urls.model_warnings, "Open documentation url for more info?")
|
||||
io.tool_output()
|
||||
except KeyboardInterrupt:
|
||||
analytics.event("exit", reason="Keyboard interrupt during model warnings")
|
||||
return 1
|
||||
|
||||
repo = None
|
||||
@@ -684,10 +772,22 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
|
||||
if not args.skip_sanity_check_repo:
|
||||
if not sanity_check_repo(repo, io):
|
||||
analytics.event("exit", reason="Repository sanity check failed")
|
||||
return 1
|
||||
|
||||
if repo:
|
||||
analytics.event("repo", num_files=len(repo.get_tracked_files()))
|
||||
else:
|
||||
analytics.event("no-repo")
|
||||
|
||||
commands = Commands(
|
||||
io, None, verify_ssl=args.verify_ssl, args=args, parser=parser, verbose=args.verbose
|
||||
io,
|
||||
None,
|
||||
verify_ssl=args.verify_ssl,
|
||||
args=args,
|
||||
parser=parser,
|
||||
verbose=args.verbose,
|
||||
editor=args.editor,
|
||||
)
|
||||
|
||||
summarizer = ChatSummary(
|
||||
@@ -735,14 +835,39 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
num_cache_warming_pings=args.cache_keepalive_pings,
|
||||
suggest_shell_commands=args.suggest_shell_commands,
|
||||
chat_language=args.chat_language,
|
||||
detect_urls=args.detect_urls,
|
||||
auto_copy_context=args.copy_paste,
|
||||
)
|
||||
except UnknownEditFormat as err:
|
||||
io.tool_error(str(err))
|
||||
io.offer_url(urls.edit_formats, "Open documentation about edit formats?")
|
||||
analytics.event("exit", reason="Unknown edit format")
|
||||
return 1
|
||||
except ValueError as err:
|
||||
io.tool_error(str(err))
|
||||
analytics.event("exit", reason="ValueError during coder creation")
|
||||
return 1
|
||||
|
||||
if return_coder:
|
||||
analytics.event("exit", reason="Returning coder object")
|
||||
return coder
|
||||
|
||||
ignores = []
|
||||
if git_root:
|
||||
ignores.append(str(Path(git_root) / ".gitignore"))
|
||||
if args.aiderignore:
|
||||
ignores.append(args.aiderignore)
|
||||
|
||||
if args.watch_files:
|
||||
file_watcher = FileWatcher(
|
||||
coder, gitignores=ignores, verbose=args.verbose, analytics=analytics
|
||||
)
|
||||
coder.file_watcher = file_watcher
|
||||
|
||||
if args.copy_paste:
|
||||
analytics.event("copy-paste mode")
|
||||
ClipboardWatcher(coder.io, verbose=args.verbose)
|
||||
|
||||
coder.show_announcements()
|
||||
|
||||
if args.show_prompts:
|
||||
@@ -751,6 +876,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
]
|
||||
messages = coder.format_messages().all_messages()
|
||||
utils.show_messages(messages)
|
||||
analytics.event("exit", reason="Showed prompts")
|
||||
return
|
||||
|
||||
if args.lint:
|
||||
@@ -759,10 +885,11 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
if args.test:
|
||||
if not args.test_cmd:
|
||||
io.tool_error("No --test-cmd provided.")
|
||||
analytics.event("exit", reason="No test command provided")
|
||||
return 1
|
||||
test_errors = coder.commands.cmd_test(args.test_cmd)
|
||||
if test_errors:
|
||||
coder.run(test_errors)
|
||||
coder.commands.cmd_test(args.test_cmd)
|
||||
if io.placeholder:
|
||||
coder.run(io.placeholder)
|
||||
|
||||
if args.commit:
|
||||
if args.dry_run:
|
||||
@@ -771,31 +898,41 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
coder.commands.cmd_commit()
|
||||
|
||||
if args.lint or args.test or args.commit:
|
||||
analytics.event("exit", reason="Completed lint/test/commit")
|
||||
return
|
||||
|
||||
if args.show_repo_map:
|
||||
repo_map = coder.get_repo_map()
|
||||
if repo_map:
|
||||
io.tool_output(repo_map)
|
||||
analytics.event("exit", reason="Showed repo map")
|
||||
return
|
||||
|
||||
if args.apply:
|
||||
content = io.read_text(args.apply)
|
||||
if content is None:
|
||||
analytics.event("exit", reason="Failed to read apply content")
|
||||
return
|
||||
coder.partial_response_content = content
|
||||
coder.apply_updates()
|
||||
analytics.event("exit", reason="Applied updates")
|
||||
return
|
||||
|
||||
if args.apply_clipboard_edits:
|
||||
args.edit_format = main_model.editor_edit_format
|
||||
args.message = "/paste"
|
||||
|
||||
if "VSCODE_GIT_IPC_HANDLE" in os.environ:
|
||||
args.pretty = False
|
||||
io.tool_output("VSCode terminal detected, pretty output has been disabled.")
|
||||
|
||||
io.tool_output('Use /help <question> for help, run "aider --help" to see cmd line args')
|
||||
if args.show_release_notes is True:
|
||||
io.tool_output(f"Opening release notes: {urls.release_notes}")
|
||||
io.tool_output()
|
||||
webbrowser.open(urls.release_notes)
|
||||
elif args.show_release_notes is None and is_first_run:
|
||||
io.tool_output()
|
||||
io.offer_url(
|
||||
urls.release_notes,
|
||||
"Would you like to see what's new in this version?",
|
||||
allow_never=False,
|
||||
)
|
||||
|
||||
if git_root and Path.cwd().resolve() != Path(git_root).resolve():
|
||||
io.tool_warning(
|
||||
@@ -816,6 +953,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
coder.run(with_message=args.message)
|
||||
except SwitchCoder:
|
||||
pass
|
||||
analytics.event("exit", reason="Completed --message")
|
||||
return
|
||||
|
||||
if args.message_file:
|
||||
@@ -825,13 +963,18 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
coder.run(with_message=message_from_file)
|
||||
except FileNotFoundError:
|
||||
io.tool_error(f"Message file not found: {args.message_file}")
|
||||
analytics.event("exit", reason="Message file not found")
|
||||
return 1
|
||||
except IOError as e:
|
||||
io.tool_error(f"Error reading message file: {e}")
|
||||
analytics.event("exit", reason="Message file IO error")
|
||||
return 1
|
||||
|
||||
analytics.event("exit", reason="Completed --message-file")
|
||||
return
|
||||
|
||||
if args.exit:
|
||||
analytics.event("exit", reason="Exit flag set")
|
||||
return
|
||||
|
||||
analytics.event("cli session", main_model=main_model, edit_format=main_model.edit_format)
|
||||
@@ -839,6 +982,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
while True:
|
||||
try:
|
||||
coder.run()
|
||||
analytics.event("exit", reason="Completed main CLI coder.run")
|
||||
return
|
||||
except SwitchCoder as switch:
|
||||
kwargs = dict(io=io, from_coder=coder)
|
||||
@@ -852,10 +996,15 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
coder.show_announcements()
|
||||
|
||||
|
||||
def check_and_load_imports(io, verbose=False):
|
||||
def is_first_run_of_new_version(io, verbose=False):
|
||||
"""Check if this is the first run of a new version/executable combination"""
|
||||
installs_file = Path.home() / ".aider" / "installs.json"
|
||||
key = (__version__, sys.executable)
|
||||
|
||||
# Never show notes for .dev versions
|
||||
if ".dev" in __version__:
|
||||
return False
|
||||
|
||||
if verbose:
|
||||
io.tool_output(
|
||||
f"Checking imports for version {__version__} and executable {sys.executable}"
|
||||
@@ -873,7 +1022,26 @@ def check_and_load_imports(io, verbose=False):
|
||||
if verbose:
|
||||
io.tool_output("Installs file does not exist, creating new dictionary")
|
||||
|
||||
if str(key) not in installs:
|
||||
is_first_run = str(key) not in installs
|
||||
|
||||
if is_first_run:
|
||||
installs[str(key)] = True
|
||||
installs_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
with open(installs_file, "w") as f:
|
||||
json.dump(installs, f, indent=4)
|
||||
|
||||
return is_first_run
|
||||
|
||||
except Exception as e:
|
||||
io.tool_warning(f"Error checking version: {e}")
|
||||
if verbose:
|
||||
io.tool_output(f"Full exception details: {traceback.format_exc()}")
|
||||
return True # Safer to assume it's a first run if we hit an error
|
||||
|
||||
|
||||
def check_and_load_imports(io, is_first_run, verbose=False):
|
||||
try:
|
||||
if is_first_run:
|
||||
if verbose:
|
||||
io.tool_output(
|
||||
"First run for this version and executable, loading imports synchronously"
|
||||
@@ -884,13 +1052,8 @@ def check_and_load_imports(io, verbose=False):
|
||||
io.tool_error(str(err))
|
||||
io.tool_output("Error loading required imports. Did you install aider properly?")
|
||||
io.offer_url(urls.install_properly, "Open documentation url for more info?")
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
installs[str(key)] = True
|
||||
installs_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
with open(installs_file, "w") as f:
|
||||
json.dump(installs, f, indent=4)
|
||||
if verbose:
|
||||
io.tool_output("Imports loaded and installs file updated")
|
||||
else:
|
||||
@@ -899,8 +1062,9 @@ def check_and_load_imports(io, verbose=False):
|
||||
thread = threading.Thread(target=load_slow_imports)
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
|
||||
except Exception as e:
|
||||
io.tool_warning(f"Error in checking imports: {e}")
|
||||
io.tool_warning(f"Error in loading imports: {e}")
|
||||
if verbose:
|
||||
io.tool_output(f"Full exception details: {traceback.format_exc()}")
|
||||
|
||||
|
||||
124
aider/models.py
@@ -17,7 +17,7 @@ from aider.dump import dump # noqa: F401
|
||||
from aider.llm import litellm
|
||||
|
||||
DEFAULT_MODEL_NAME = "gpt-4o"
|
||||
ANTHROPIC_BETA_HEADER = "prompt-caching-2024-07-31"
|
||||
ANTHROPIC_BETA_HEADER = "prompt-caching-2024-07-31,pdfs-2024-09-25"
|
||||
|
||||
OPENAI_MODELS = """
|
||||
gpt-4
|
||||
@@ -61,6 +61,24 @@ claude-3-5-sonnet-20241022
|
||||
|
||||
ANTHROPIC_MODELS = [ln.strip() for ln in ANTHROPIC_MODELS.splitlines() if ln.strip()]
|
||||
|
||||
# Mapping of model aliases to their canonical names
|
||||
MODEL_ALIASES = {
|
||||
# Claude models
|
||||
"sonnet": "claude-3-5-sonnet-20241022",
|
||||
"haiku": "claude-3-5-haiku-20241022",
|
||||
"opus": "claude-3-opus-20240229",
|
||||
# GPT models
|
||||
"4": "gpt-4-0613",
|
||||
"4o": "gpt-4o",
|
||||
"4-turbo": "gpt-4-1106-preview",
|
||||
"35turbo": "gpt-3.5-turbo",
|
||||
"35-turbo": "gpt-3.5-turbo",
|
||||
"3": "gpt-3.5-turbo",
|
||||
# Other models
|
||||
"deepseek": "deepseek/deepseek-coder",
|
||||
"flash": "gemini/gemini-2.0-flash-exp",
|
||||
}
|
||||
|
||||
|
||||
@dataclass
|
||||
class ModelSettings:
|
||||
@@ -161,6 +179,22 @@ MODEL_SETTINGS = [
|
||||
lazy=True,
|
||||
reminder="sys",
|
||||
),
|
||||
ModelSettings(
|
||||
"gpt-4o-2024-11-20",
|
||||
"diff",
|
||||
weak_model_name="gpt-4o-mini",
|
||||
use_repo_map=True,
|
||||
lazy=True,
|
||||
reminder="sys",
|
||||
),
|
||||
ModelSettings(
|
||||
"openai/gpt-4o-2024-11-20",
|
||||
"diff",
|
||||
weak_model_name="gpt-4o-mini",
|
||||
use_repo_map=True,
|
||||
lazy=True,
|
||||
reminder="sys",
|
||||
),
|
||||
ModelSettings(
|
||||
"gpt-4o",
|
||||
"diff",
|
||||
@@ -550,6 +584,21 @@ MODEL_SETTINGS = [
|
||||
"diff-fenced",
|
||||
use_repo_map=True,
|
||||
),
|
||||
ModelSettings(
|
||||
"gemini/gemini-exp-1206",
|
||||
"diff",
|
||||
use_repo_map=True,
|
||||
),
|
||||
ModelSettings(
|
||||
"gemini/gemini-exp-1114",
|
||||
"diff",
|
||||
use_repo_map=True,
|
||||
),
|
||||
ModelSettings(
|
||||
"gemini/gemini-exp-1121",
|
||||
"diff",
|
||||
use_repo_map=True,
|
||||
),
|
||||
ModelSettings(
|
||||
"vertex_ai/gemini-pro-experimental",
|
||||
"diff-fenced",
|
||||
@@ -561,6 +610,12 @@ MODEL_SETTINGS = [
|
||||
use_repo_map=False,
|
||||
send_undo_reply=False,
|
||||
),
|
||||
ModelSettings(
|
||||
"gemini/gemini-2.0-flash-exp",
|
||||
"diff",
|
||||
use_repo_map=True,
|
||||
send_undo_reply=False,
|
||||
),
|
||||
ModelSettings(
|
||||
"deepseek/deepseek-chat",
|
||||
"diff",
|
||||
@@ -629,7 +684,6 @@ MODEL_SETTINGS = [
|
||||
reminder="user",
|
||||
use_system_prompt=False,
|
||||
use_temperature=False,
|
||||
streaming=False,
|
||||
),
|
||||
ModelSettings(
|
||||
"azure/o1-mini",
|
||||
@@ -641,7 +695,6 @@ MODEL_SETTINGS = [
|
||||
reminder="user",
|
||||
use_system_prompt=False,
|
||||
use_temperature=False,
|
||||
streaming=False,
|
||||
),
|
||||
ModelSettings(
|
||||
"o1-mini",
|
||||
@@ -653,7 +706,6 @@ MODEL_SETTINGS = [
|
||||
reminder="user",
|
||||
use_system_prompt=False,
|
||||
use_temperature=False,
|
||||
streaming=False,
|
||||
),
|
||||
ModelSettings(
|
||||
"openai/o1-preview",
|
||||
@@ -665,7 +717,6 @@ MODEL_SETTINGS = [
|
||||
reminder="user",
|
||||
use_system_prompt=False,
|
||||
use_temperature=False,
|
||||
streaming=False,
|
||||
),
|
||||
ModelSettings(
|
||||
"azure/o1-preview",
|
||||
@@ -677,7 +728,6 @@ MODEL_SETTINGS = [
|
||||
reminder="user",
|
||||
use_system_prompt=False,
|
||||
use_temperature=False,
|
||||
streaming=False,
|
||||
),
|
||||
ModelSettings(
|
||||
"o1-preview",
|
||||
@@ -689,7 +739,6 @@ MODEL_SETTINGS = [
|
||||
reminder="user",
|
||||
use_system_prompt=False,
|
||||
use_temperature=False,
|
||||
streaming=False,
|
||||
),
|
||||
ModelSettings(
|
||||
"openrouter/openai/o1-mini",
|
||||
@@ -762,6 +811,11 @@ class ModelInfoManager:
|
||||
pass
|
||||
except Exception as ex:
|
||||
print(str(ex))
|
||||
try:
|
||||
# Save empty dict to cache file on failure
|
||||
self.cache_file.write_text("{}")
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def get_model_from_cached_json_db(self, model):
|
||||
if not self.content:
|
||||
@@ -804,11 +858,20 @@ model_info_manager = ModelInfoManager()
|
||||
|
||||
class Model(ModelSettings):
|
||||
def __init__(self, model, weak_model=None, editor_model=None, editor_edit_format=None):
|
||||
# Map any alias to its canonical name
|
||||
model = MODEL_ALIASES.get(model, model)
|
||||
|
||||
self.name = model
|
||||
|
||||
self.max_chat_history_tokens = 1024
|
||||
self.weak_model = None
|
||||
self.editor_model = None
|
||||
|
||||
# Find the extra settings
|
||||
self.extra_model_settings = next(
|
||||
(ms for ms in MODEL_SETTINGS if ms.name == "aider/extra_params"), None
|
||||
)
|
||||
|
||||
self.info = self.get_model_info(model)
|
||||
|
||||
# Are all needed keys/params available?
|
||||
@@ -836,17 +899,44 @@ class Model(ModelSettings):
|
||||
def get_model_info(self, model):
|
||||
return model_info_manager.get_model_info(model)
|
||||
|
||||
def _copy_fields(self, source):
|
||||
"""Helper to copy fields from a ModelSettings instance to self"""
|
||||
for field in fields(ModelSettings):
|
||||
val = getattr(source, field.name)
|
||||
setattr(self, field.name, val)
|
||||
|
||||
def configure_model_settings(self, model):
|
||||
# Look for exact model match
|
||||
exact_match = False
|
||||
for ms in MODEL_SETTINGS:
|
||||
# direct match, or match "provider/<model>"
|
||||
if model == ms.name:
|
||||
for field in fields(ModelSettings):
|
||||
val = getattr(ms, field.name)
|
||||
setattr(self, field.name, val)
|
||||
return # <--
|
||||
self._copy_fields(ms)
|
||||
exact_match = True
|
||||
break # Continue to apply overrides
|
||||
|
||||
model = model.lower()
|
||||
|
||||
# If no exact match, try generic settings
|
||||
if not exact_match:
|
||||
self.apply_generic_model_settings(model)
|
||||
|
||||
# Apply override settings last if they exist
|
||||
if self.extra_model_settings and self.extra_model_settings.extra_params:
|
||||
# Initialize extra_params if it doesn't exist
|
||||
if not self.extra_params:
|
||||
self.extra_params = {}
|
||||
|
||||
# Deep merge the extra_params dicts
|
||||
for key, value in self.extra_model_settings.extra_params.items():
|
||||
if isinstance(value, dict) and isinstance(self.extra_params.get(key), dict):
|
||||
# For nested dicts, merge recursively
|
||||
self.extra_params[key] = {**self.extra_params[key], **value}
|
||||
else:
|
||||
# For non-dict values, simply update
|
||||
self.extra_params[key] = value
|
||||
|
||||
def apply_generic_model_settings(self, model):
|
||||
if ("llama3" in model or "llama-3" in model) and "70b" in model:
|
||||
self.edit_format = "diff"
|
||||
self.use_repo_map = True
|
||||
@@ -868,17 +958,19 @@ class Model(ModelSettings):
|
||||
|
||||
if "gpt-3.5" in model or "gpt-4" in model:
|
||||
self.reminder = "sys"
|
||||
return # <--
|
||||
|
||||
if "3.5-sonnet" in model or "3-5-sonnet" in model:
|
||||
self.edit_format = "diff"
|
||||
self.use_repo_map = True
|
||||
self.examples_as_sys_msg = True
|
||||
self.reminder = "user"
|
||||
return # <--
|
||||
|
||||
if model.startswith("o1-") or "/o1-" in model:
|
||||
self.use_system_prompt = False
|
||||
self.use_temperature = False
|
||||
self.streaming = False
|
||||
return # <--
|
||||
|
||||
if (
|
||||
"qwen" in model
|
||||
@@ -886,14 +978,17 @@ class Model(ModelSettings):
|
||||
and ("2.5" in model or "2-5" in model)
|
||||
and "32b" in model
|
||||
):
|
||||
"openrouter/qwen/qwen-2.5-coder-32b-instruct",
|
||||
self.edit_format = "diff"
|
||||
self.editor_edit_format = "editor-diff"
|
||||
self.use_repo_map = True
|
||||
if model.startswith("ollama/") or model.startswith("ollama_chat/"):
|
||||
self.extra_params = dict(num_ctx=8 * 1024)
|
||||
return # <--
|
||||
|
||||
# use the defaults
|
||||
if self.edit_format == "diff":
|
||||
self.use_repo_map = True
|
||||
return # <--
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@@ -1050,6 +1145,9 @@ def register_models(model_settings_fnames):
|
||||
if not os.path.exists(model_settings_fname):
|
||||
continue
|
||||
|
||||
if not Path(model_settings_fname).read_text().strip():
|
||||
continue
|
||||
|
||||
try:
|
||||
with open(model_settings_fname, "r") as model_settings_file:
|
||||
model_settings_list = yaml.safe_load(model_settings_file)
|
||||
|
||||
91
aider/queries/tree-sitter-dart-tags.scm
Normal file
@@ -0,0 +1,91 @@
|
||||
(class_definition
|
||||
name: (identifier) @name.definition.class) @definition.class
|
||||
|
||||
(method_signature
|
||||
(function_signature)) @definition.method
|
||||
|
||||
(type_alias
|
||||
(type_identifier) @name.definition.type) @definition.type
|
||||
|
||||
(method_signature
|
||||
(getter_signature
|
||||
name: (identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(method_signature
|
||||
(setter_signature
|
||||
name: (identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(method_signature
|
||||
(function_signature
|
||||
name: (identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(method_signature
|
||||
(factory_constructor_signature
|
||||
(identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(method_signature
|
||||
(constructor_signature
|
||||
name: (identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(method_signature
|
||||
(operator_signature)) @definition.method
|
||||
|
||||
(method_signature) @definition.method
|
||||
|
||||
(mixin_declaration
|
||||
(mixin)
|
||||
(identifier) @name.definition.mixin) @definition.mixin
|
||||
|
||||
(extension_declaration
|
||||
name: (identifier) @name.definition.extension) @definition.extension
|
||||
|
||||
(enum_declaration
|
||||
name: (identifier) @name.definition.enum) @definition.enum
|
||||
|
||||
(function_signature
|
||||
name: (identifier) @name.definition.function) @definition.function
|
||||
|
||||
(new_expression
|
||||
(type_identifier) @name.reference.class) @reference.class
|
||||
|
||||
(initialized_variable_definition
|
||||
name: (identifier)
|
||||
value: (identifier) @name.reference.class
|
||||
value: (selector
|
||||
"!"?
|
||||
(argument_part
|
||||
(arguments
|
||||
(argument)*))?)?) @reference.class
|
||||
|
||||
(assignment_expression
|
||||
left: (assignable_expression
|
||||
(identifier)
|
||||
(unconditional_assignable_selector
|
||||
"."
|
||||
(identifier) @name.reference.call))) @reference.call
|
||||
|
||||
(assignment_expression
|
||||
left: (assignable_expression
|
||||
(identifier)
|
||||
(conditional_assignable_selector
|
||||
"?."
|
||||
(identifier) @name.reference.call))) @reference.call
|
||||
|
||||
((identifier) @name
|
||||
(selector
|
||||
"!"?
|
||||
(conditional_assignable_selector
|
||||
"?." (identifier) @name.reference.call)?
|
||||
(unconditional_assignable_selector
|
||||
"."? (identifier) @name.reference.call)?
|
||||
(argument_part
|
||||
(arguments
|
||||
(argument)*))?)*
|
||||
(cascade_section
|
||||
(cascade_selector
|
||||
(identifier)) @name.reference.call
|
||||
(argument_part
|
||||
(arguments
|
||||
(argument)*))?)?) @reference.call
|
||||
|
||||
|
||||
@@ -192,9 +192,7 @@ class GitRepo:
|
||||
max_tokens = model.info.get("max_input_tokens") or 0
|
||||
if max_tokens and num_tokens > max_tokens:
|
||||
continue
|
||||
commit_message = simple_send_with_retries(
|
||||
model.name, messages, extra_params=model.extra_params
|
||||
)
|
||||
commit_message = simple_send_with_retries(model, messages)
|
||||
if commit_message:
|
||||
break
|
||||
|
||||
|
||||
@@ -1,11 +1,38 @@
|
||||
{
|
||||
"openrouter/qwen/qwen-2.5-coder-32b-instruct": {
|
||||
"max_tokens": 33792,
|
||||
"max_input_tokens": 33792,
|
||||
"max_output_tokens": 33792,
|
||||
"input_cost_per_token": 0.00000018,
|
||||
"output_cost_per_token": 0.00000018,
|
||||
"litellm_provider": "openrouter",
|
||||
"gemini-2.0-flash-exp": {
|
||||
"max_tokens": 8192,
|
||||
"max_input_tokens": 1048576,
|
||||
"max_output_tokens": 8192,
|
||||
"max_images_per_prompt": 3000,
|
||||
"max_videos_per_prompt": 10,
|
||||
"max_video_length": 1,
|
||||
"max_audio_length_hours": 8.4,
|
||||
"max_audio_per_prompt": 1,
|
||||
"max_pdf_size_mb": 30,
|
||||
"litellm_provider": "vertex_ai-language-models",
|
||||
"mode": "chat",
|
||||
},
|
||||
"supports_system_messages": true,
|
||||
"supports_function_calling": true,
|
||||
"supports_vision": true,
|
||||
"supports_response_schema": true,
|
||||
"source": "https://cloud.google.com/vertex-ai/generative-ai/docs/gemini-v2"
|
||||
},
|
||||
"gemini-2.0-flash-exp": {
|
||||
"max_tokens": 8192,
|
||||
"max_input_tokens": 1048576,
|
||||
"max_output_tokens": 8192,
|
||||
"max_images_per_prompt": 3000,
|
||||
"max_videos_per_prompt": 10,
|
||||
"max_video_length": 1,
|
||||
"max_audio_length_hours": 8.4,
|
||||
"max_audio_per_prompt": 1,
|
||||
"max_pdf_size_mb": 30,
|
||||
"litellm_provider": "gemini",
|
||||
"mode": "chat",
|
||||
"supports_system_messages": true,
|
||||
"supports_function_calling": true,
|
||||
"supports_vision": true,
|
||||
"supports_response_schema": true,
|
||||
"source": "https://cloud.google.com/vertex-ai/generative-ai/docs/gemini-v2"
|
||||
},
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@ import pexpect
|
||||
import psutil
|
||||
|
||||
|
||||
def run_cmd(command, verbose=False, error_print=None):
|
||||
def run_cmd(command, verbose=False, error_print=None, cwd=None):
|
||||
try:
|
||||
if sys.stdin.isatty() and hasattr(pexpect, "spawn") and platform.system() != "Windows":
|
||||
return run_cmd_pexpect(command, verbose)
|
||||
return run_cmd_pexpect(command, verbose, cwd)
|
||||
|
||||
return run_cmd_subprocess(command, verbose)
|
||||
return run_cmd_subprocess(command, verbose, cwd)
|
||||
except OSError as e:
|
||||
error_message = f"Error occurred while running command '{command}': {str(e)}"
|
||||
if error_print is None:
|
||||
@@ -39,7 +39,7 @@ def get_windows_parent_process_name():
|
||||
return None
|
||||
|
||||
|
||||
def run_cmd_subprocess(command, verbose=False):
|
||||
def run_cmd_subprocess(command, verbose=False, cwd=None):
|
||||
if verbose:
|
||||
print("Using run_cmd_subprocess:", command)
|
||||
|
||||
@@ -69,6 +69,7 @@ def run_cmd_subprocess(command, verbose=False):
|
||||
errors="replace",
|
||||
bufsize=0, # Set bufsize to 0 for unbuffered output
|
||||
universal_newlines=True,
|
||||
cwd=cwd,
|
||||
)
|
||||
|
||||
output = []
|
||||
@@ -85,7 +86,7 @@ def run_cmd_subprocess(command, verbose=False):
|
||||
return 1, str(e)
|
||||
|
||||
|
||||
def run_cmd_pexpect(command, verbose=False):
|
||||
def run_cmd_pexpect(command, verbose=False, cwd=None):
|
||||
"""
|
||||
Run a shell command interactively using pexpect, capturing all output.
|
||||
|
||||
@@ -112,12 +113,12 @@ def run_cmd_pexpect(command, verbose=False):
|
||||
# Use the shell from SHELL environment variable
|
||||
if verbose:
|
||||
print("Running pexpect.spawn with shell:", shell)
|
||||
child = pexpect.spawn(shell, args=["-c", command], encoding="utf-8")
|
||||
child = pexpect.spawn(shell, args=["-i", "-c", command], encoding="utf-8", cwd=cwd)
|
||||
else:
|
||||
# Fall back to spawning the command directly
|
||||
if verbose:
|
||||
print("Running pexpect.spawn without shell.")
|
||||
child = pexpect.spawn(command, encoding="utf-8")
|
||||
child = pexpect.spawn(command, encoding="utf-8", cwd=cwd)
|
||||
|
||||
# Transfer control to the user, capturing output
|
||||
child.interact(output_filter=output_callback)
|
||||
|
||||
@@ -56,18 +56,19 @@ def send_completion(
|
||||
return hash_object, res
|
||||
|
||||
|
||||
def simple_send_with_retries(model_name, messages, extra_params=None):
|
||||
def simple_send_with_retries(model, messages):
|
||||
litellm_ex = LiteLLMExceptions()
|
||||
|
||||
retry_delay = 0.125
|
||||
while True:
|
||||
try:
|
||||
kwargs = {
|
||||
"model_name": model_name,
|
||||
"model_name": model.name,
|
||||
"messages": messages,
|
||||
"functions": None,
|
||||
"stream": False,
|
||||
"extra_params": extra_params,
|
||||
"temperature": None if not model.use_temperature else 0,
|
||||
"extra_params": model.extra_params,
|
||||
}
|
||||
|
||||
_hash, response = send_completion(**kwargs)
|
||||
|
||||
@@ -12,3 +12,5 @@ github_issues = "https://github.com/Aider-AI/aider/issues/new"
|
||||
git_index_version = "https://github.com/Aider-AI/aider/issues/211"
|
||||
install_properly = "https://aider.chat/docs/troubleshooting/imports.html"
|
||||
analytics = "https://aider.chat/docs/more/analytics.html"
|
||||
release_notes = "https://aider.chat/HISTORY.html#release-notes"
|
||||
edit_formats = "https://aider.chat/docs/more/edit-formats.html"
|
||||
|
||||
@@ -2,7 +2,6 @@ import itertools
|
||||
import os
|
||||
import platform
|
||||
import shlex
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
@@ -13,7 +12,7 @@ import git
|
||||
|
||||
from aider.dump import dump # noqa: F401
|
||||
|
||||
IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".webp"}
|
||||
IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".webp", ".pdf"}
|
||||
|
||||
|
||||
class IgnorantTemporaryDirectory:
|
||||
@@ -194,25 +193,9 @@ def split_chat_history_markdown(text, include_tool=False):
|
||||
return messages
|
||||
|
||||
|
||||
# Copied from pip, MIT license
|
||||
# https://github.com/pypa/pip/blob/b989e6ef04810bbd4033a3683020bd4ddcbdb627/src/pip/_internal/utils/entrypoints.py#L73
|
||||
def get_best_invocation_for_this_python() -> str:
|
||||
"""Try to figure out the best way to invoke the current Python."""
|
||||
exe = sys.executable
|
||||
exe_name = os.path.basename(exe)
|
||||
|
||||
# Try to use the basename, if it's the first executable.
|
||||
found_executable = shutil.which(exe_name)
|
||||
if found_executable and os.path.samefile(found_executable, exe):
|
||||
return exe_name
|
||||
|
||||
# Use the full executable name, because we couldn't find something simpler.
|
||||
return exe
|
||||
|
||||
|
||||
def get_pip_install(args):
|
||||
cmd = [
|
||||
get_best_invocation_for_this_python(),
|
||||
sys.executable,
|
||||
"-m",
|
||||
"pip",
|
||||
"install",
|
||||
@@ -268,7 +251,8 @@ def run_install(cmd):
|
||||
|
||||
|
||||
class Spinner:
|
||||
spinner_chars = itertools.cycle(["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"])
|
||||
unicode_spinner = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
|
||||
ascii_spinner = ["|", "/", "-", "\\"]
|
||||
|
||||
def __init__(self, text):
|
||||
self.text = text
|
||||
@@ -276,6 +260,20 @@ class Spinner:
|
||||
self.last_update = 0
|
||||
self.visible = False
|
||||
self.is_tty = sys.stdout.isatty()
|
||||
self.tested = False
|
||||
|
||||
def test_charset(self):
|
||||
if self.tested:
|
||||
return
|
||||
self.tested = True
|
||||
# Try unicode first, fall back to ascii if needed
|
||||
try:
|
||||
# Test if we can print unicode characters
|
||||
print(self.unicode_spinner[0], end="", flush=True)
|
||||
print("\r", end="", flush=True)
|
||||
self.spinner_chars = itertools.cycle(self.unicode_spinner)
|
||||
except UnicodeEncodeError:
|
||||
self.spinner_chars = itertools.cycle(self.ascii_spinner)
|
||||
|
||||
def step(self):
|
||||
if not self.is_tty:
|
||||
@@ -293,6 +291,7 @@ class Spinner:
|
||||
if not self.visible:
|
||||
return
|
||||
|
||||
self.test_charset()
|
||||
print(f"\r{self.text} {next(self.spinner_chars)}\r{self.text} ", end="", flush=True)
|
||||
|
||||
def end(self):
|
||||
@@ -382,3 +381,15 @@ def printable_shell_command(cmd_list):
|
||||
return subprocess.list2cmdline(cmd_list)
|
||||
else:
|
||||
return shlex.join(cmd_list)
|
||||
|
||||
|
||||
def main():
|
||||
spinner = Spinner("Running spinner...")
|
||||
for _ in range(40): # 40 steps * 0.25 seconds = 10 seconds
|
||||
time.sleep(0.25)
|
||||
spinner.step()
|
||||
spinner.end()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -14,6 +14,8 @@ from .dump import dump # noqa: F401
|
||||
warnings.filterwarnings(
|
||||
"ignore", message="Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work"
|
||||
)
|
||||
warnings.filterwarnings("ignore", category=SyntaxWarning)
|
||||
|
||||
|
||||
from pydub import AudioSegment # noqa
|
||||
|
||||
@@ -34,7 +36,7 @@ class Voice:
|
||||
|
||||
threshold = 0.15
|
||||
|
||||
def __init__(self, audio_format="wav"):
|
||||
def __init__(self, audio_format="wav", device_name=None):
|
||||
if sf is None:
|
||||
raise SoundDeviceError
|
||||
try:
|
||||
@@ -42,6 +44,29 @@ class Voice:
|
||||
import sounddevice as sd
|
||||
|
||||
self.sd = sd
|
||||
|
||||
devices = sd.query_devices()
|
||||
|
||||
if device_name:
|
||||
# Find the device with matching name
|
||||
device_id = None
|
||||
for i, device in enumerate(devices):
|
||||
if device_name in device["name"]:
|
||||
device_id = i
|
||||
break
|
||||
if device_id is None:
|
||||
available_inputs = [d["name"] for d in devices if d["max_input_channels"] > 0]
|
||||
raise ValueError(
|
||||
f"Device '{device_name}' not found. Available input devices:"
|
||||
f" {available_inputs}"
|
||||
)
|
||||
|
||||
print(f"Using input device: {device_name} (ID: {device_id})")
|
||||
|
||||
self.device_id = device_id
|
||||
else:
|
||||
self.device_id = None
|
||||
|
||||
except (OSError, ModuleNotFoundError):
|
||||
raise SoundDeviceError
|
||||
if audio_format not in ["wav", "mp3", "webm"]:
|
||||
@@ -93,7 +118,7 @@ class Voice:
|
||||
temp_wav = tempfile.mktemp(suffix=".wav")
|
||||
|
||||
try:
|
||||
sample_rate = int(self.sd.query_devices(None, "input")["default_samplerate"])
|
||||
sample_rate = int(self.sd.query_devices(self.device_id, "input")["default_samplerate"])
|
||||
except (TypeError, ValueError):
|
||||
sample_rate = 16000 # fallback to 16kHz if unable to query device
|
||||
except self.sd.PortAudioError:
|
||||
@@ -104,7 +129,9 @@ class Voice:
|
||||
self.start_time = time.time()
|
||||
|
||||
try:
|
||||
with self.sd.InputStream(samplerate=sample_rate, channels=1, callback=self.callback):
|
||||
with self.sd.InputStream(
|
||||
samplerate=sample_rate, channels=1, callback=self.callback, device=self.device_id
|
||||
):
|
||||
prompt(self.get_prompt, refresh_interval=0.1)
|
||||
except self.sd.PortAudioError as err:
|
||||
raise SoundDeviceError(f"Error accessing audio input device: {err}")
|
||||
|
||||
271
aider/watch.py
Normal file
@@ -0,0 +1,271 @@
|
||||
import re
|
||||
import threading
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from grep_ast import TreeContext
|
||||
from pathspec import PathSpec
|
||||
from pathspec.patterns import GitWildMatchPattern
|
||||
from watchfiles import watch
|
||||
|
||||
from aider.dump import dump # noqa
|
||||
from aider.watch_prompts import watch_ask_prompt, watch_code_prompt
|
||||
|
||||
|
||||
def load_gitignores(gitignore_paths: list[Path]) -> Optional[PathSpec]:
|
||||
"""Load and parse multiple .gitignore files into a single PathSpec"""
|
||||
if not gitignore_paths:
|
||||
return None
|
||||
|
||||
patterns = [
|
||||
".aider*",
|
||||
".git",
|
||||
# Common editor backup/temp files
|
||||
"*~", # Emacs/vim backup
|
||||
"*.bak", # Generic backup
|
||||
"*.swp", # Vim swap
|
||||
"*.swo", # Vim swap
|
||||
"\\#*\\#", # Emacs auto-save
|
||||
".#*", # Emacs lock files
|
||||
"*.tmp", # Generic temp files
|
||||
"*.temp", # Generic temp files
|
||||
"*.orig", # Merge conflict originals
|
||||
"*.pyc", # Python bytecode
|
||||
"__pycache__/", # Python cache dir
|
||||
".DS_Store", # macOS metadata
|
||||
"Thumbs.db", # Windows thumbnail cache
|
||||
# IDE files
|
||||
".idea/", # JetBrains IDEs
|
||||
".vscode/", # VS Code
|
||||
"*.sublime-*", # Sublime Text
|
||||
".project", # Eclipse
|
||||
".settings/", # Eclipse
|
||||
"*.code-workspace", # VS Code workspace
|
||||
# Environment files
|
||||
".env", # Environment variables
|
||||
".venv/", # Python virtual environments
|
||||
"node_modules/", # Node.js dependencies
|
||||
"vendor/", # Various dependencies
|
||||
# Logs and caches
|
||||
"*.log", # Log files
|
||||
".cache/", # Cache directories
|
||||
".pytest_cache/", # Python test cache
|
||||
"coverage/", # Code coverage reports
|
||||
] # Always ignore
|
||||
for path in gitignore_paths:
|
||||
if path.exists():
|
||||
with open(path) as f:
|
||||
patterns.extend(f.readlines())
|
||||
|
||||
return PathSpec.from_lines(GitWildMatchPattern, patterns) if patterns else None
|
||||
|
||||
|
||||
class FileWatcher:
|
||||
"""Watches source files for changes and AI comments"""
|
||||
|
||||
# Compiled regex pattern for AI comments
|
||||
ai_comment_pattern = re.compile(r"(?:#|//|--) *(ai\b.*|ai\b.*|.*\bai[?!]?) *$", re.IGNORECASE)
|
||||
|
||||
def __init__(self, coder, gitignores=None, verbose=False, analytics=None):
|
||||
self.coder = coder
|
||||
self.io = coder.io
|
||||
self.root = Path(coder.root)
|
||||
self.verbose = verbose
|
||||
self.analytics = analytics
|
||||
self.stop_event = None
|
||||
self.watcher_thread = None
|
||||
self.changed_files = set()
|
||||
self.gitignores = gitignores
|
||||
|
||||
self.gitignore_spec = load_gitignores(
|
||||
[Path(g) for g in self.gitignores] if self.gitignores else []
|
||||
)
|
||||
|
||||
coder.io.file_watcher = self
|
||||
|
||||
def filter_func(self, change_type, path):
|
||||
"""Filter function for the file watcher"""
|
||||
path_obj = Path(path)
|
||||
path_abs = path_obj.absolute()
|
||||
|
||||
if not path_abs.is_relative_to(self.root.absolute()):
|
||||
return False
|
||||
|
||||
rel_path = path_abs.relative_to(self.root)
|
||||
if self.verbose:
|
||||
dump(rel_path)
|
||||
|
||||
if self.gitignore_spec and self.gitignore_spec.match_file(str(rel_path)):
|
||||
return False
|
||||
|
||||
if self.verbose:
|
||||
dump("ok", rel_path)
|
||||
|
||||
# Check if file contains AI markers
|
||||
try:
|
||||
comments, _, _ = self.get_ai_comments(str(path_abs))
|
||||
return bool(comments)
|
||||
except Exception:
|
||||
return
|
||||
|
||||
def start(self):
|
||||
"""Start watching for file changes"""
|
||||
self.stop_event = threading.Event()
|
||||
self.changed_files = set()
|
||||
|
||||
def watch_files():
|
||||
try:
|
||||
for changes in watch(
|
||||
str(self.root), watch_filter=self.filter_func, stop_event=self.stop_event
|
||||
):
|
||||
if not changes:
|
||||
continue
|
||||
changed_files = {str(Path(change[1])) for change in changes}
|
||||
self.changed_files.update(changed_files)
|
||||
self.io.interrupt_input()
|
||||
return
|
||||
except Exception as e:
|
||||
if self.verbose:
|
||||
dump(f"File watcher error: {e}")
|
||||
raise e
|
||||
|
||||
self.watcher_thread = threading.Thread(target=watch_files, daemon=True)
|
||||
self.watcher_thread.start()
|
||||
|
||||
def stop(self):
|
||||
"""Stop watching for file changes"""
|
||||
if self.stop_event:
|
||||
self.stop_event.set()
|
||||
if self.watcher_thread:
|
||||
self.watcher_thread.join()
|
||||
self.watcher_thread = None
|
||||
self.stop_event = None
|
||||
|
||||
def process_changes(self):
|
||||
"""Get any detected file changes"""
|
||||
|
||||
has_action = None
|
||||
for fname in self.changed_files:
|
||||
_, _, action = self.get_ai_comments(fname)
|
||||
if action in ("!", "?"):
|
||||
has_action = action
|
||||
|
||||
if fname in self.coder.abs_fnames:
|
||||
continue
|
||||
if self.analytics:
|
||||
self.analytics.event("ai-comments file-add")
|
||||
self.coder.abs_fnames.add(fname)
|
||||
rel_fname = self.coder.get_rel_fname(fname)
|
||||
self.io.tool_output(f"Added {rel_fname} to the chat")
|
||||
self.io.tool_output()
|
||||
|
||||
if not has_action:
|
||||
return ""
|
||||
|
||||
if self.analytics:
|
||||
self.analytics.event("ai-comments execute")
|
||||
self.io.tool_output("Processing your request...")
|
||||
|
||||
if has_action == "!":
|
||||
res = watch_code_prompt
|
||||
elif has_action == "?":
|
||||
res = watch_ask_prompt
|
||||
|
||||
# Refresh all AI comments from tracked files
|
||||
for fname in self.coder.abs_fnames:
|
||||
line_nums, comments, _action = self.get_ai_comments(fname)
|
||||
if not line_nums:
|
||||
continue
|
||||
|
||||
code = self.io.read_text(fname)
|
||||
if not code:
|
||||
continue
|
||||
|
||||
rel_fname = self.coder.get_rel_fname(fname)
|
||||
res += f"\n{rel_fname}:\n"
|
||||
|
||||
# Convert comment line numbers to line indices (0-based)
|
||||
lois = [ln - 1 for ln, _ in zip(line_nums, comments) if ln > 0]
|
||||
|
||||
try:
|
||||
context = TreeContext(
|
||||
rel_fname,
|
||||
code,
|
||||
color=False,
|
||||
line_number=False,
|
||||
child_context=False,
|
||||
last_line=False,
|
||||
margin=0,
|
||||
mark_lois=True,
|
||||
loi_pad=3,
|
||||
show_top_of_file_parent_scope=False,
|
||||
)
|
||||
context.lines_of_interest = set()
|
||||
context.add_lines_of_interest(lois)
|
||||
context.add_context()
|
||||
res += context.format()
|
||||
except ValueError:
|
||||
for ln, comment in zip(line_nums, comments):
|
||||
res += f" Line {ln}: {comment}\n"
|
||||
|
||||
return res
|
||||
|
||||
def get_ai_comments(self, filepath):
|
||||
"""Extract AI comment line numbers, comments and action status from a file"""
|
||||
line_nums = []
|
||||
comments = []
|
||||
has_action = None # None, "!" or "?"
|
||||
content = self.io.read_text(filepath, silent=True)
|
||||
for i, line in enumerate(content.splitlines(), 1):
|
||||
if match := self.ai_comment_pattern.search(line):
|
||||
comment = match.group(0).strip()
|
||||
if comment:
|
||||
line_nums.append(i)
|
||||
comments.append(comment)
|
||||
comment = comment.lower()
|
||||
comment = comment.lstrip("/#-")
|
||||
comment = comment.strip()
|
||||
if comment.startswith("ai!") or comment.endswith("ai!"):
|
||||
has_action = "!"
|
||||
elif comment.startswith("ai?") or comment.endswith("ai?"):
|
||||
has_action = "?"
|
||||
if not line_nums:
|
||||
return None, None, None
|
||||
return line_nums, comments, has_action
|
||||
|
||||
|
||||
def main():
|
||||
"""Example usage of the file watcher"""
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(description="Watch source files for changes")
|
||||
parser.add_argument("directory", help="Directory to watch")
|
||||
parser.add_argument(
|
||||
"--gitignore",
|
||||
action="append",
|
||||
help="Path to .gitignore file (can be specified multiple times)",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
directory = args.directory
|
||||
print(f"Watching source files in {directory}...")
|
||||
|
||||
# Example ignore function that ignores files with "test" in the name
|
||||
def ignore_test_files(path):
|
||||
return "test" in path.name.lower()
|
||||
|
||||
watcher = FileWatcher(directory, gitignores=args.gitignore)
|
||||
try:
|
||||
watcher.start()
|
||||
while True:
|
||||
if changes := watcher.get_changes():
|
||||
for file in sorted(changes.keys()):
|
||||
print(file)
|
||||
watcher.changed_files = None
|
||||
except KeyboardInterrupt:
|
||||
print("\nStopped watching files")
|
||||
watcher.stop()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
11
aider/watch_prompts.py
Normal file
@@ -0,0 +1,11 @@
|
||||
watch_code_prompt = """
|
||||
Find the "AI" comments below (marked with █) in the code files I've shared with you.
|
||||
They contain your instructions.
|
||||
Make the requested changes.
|
||||
Be sure to remove all these "AI" comments from the code!
|
||||
"""
|
||||
|
||||
watch_ask_prompt = """/ask
|
||||
Find the "AI" comments below (marked with █) in the code files I've shared with you.
|
||||
They contain your questions you need to answer and other instructions.
|
||||
"""
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
title: Release history
|
||||
parent: More info
|
||||
nav_order: 900
|
||||
nav_order: 925
|
||||
highlight_image: /assets/blame.jpg
|
||||
description: Release notes and stats on aider writing its own code.
|
||||
---
|
||||
@@ -12,7 +11,9 @@ description: Release notes and stats on aider writing its own code.
|
||||
|
||||
The above
|
||||
[stats are based on the git commit history](/docs/faq.html#how-are-the-aider-wrote-xx-of-code-stats-computed)
|
||||
in the aider repo.
|
||||
of the aider repo.
|
||||
|
||||
## Release notes
|
||||
|
||||
<!--[[[cog
|
||||
# This page is a copy of HISTORY.md, adding the front matter above.
|
||||
@@ -22,8 +23,115 @@ cog.out(text)
|
||||
]]]-->
|
||||
|
||||
|
||||
### Aider v0.69.0
|
||||
|
||||
### main branch
|
||||
- [Watch files](https://aider.chat/docs/usage/watch.html) improvements:
|
||||
- Use `# ... AI?` comments to trigger aider and ask questions about your code.
|
||||
- Now watches *all* files, not just certain source files.
|
||||
- Use `# AI comments`, `// AI comments`, or `-- AI comments` to give aider instructions in any text file.
|
||||
- Full support for Gemini Flash 2.0 Exp:
|
||||
- `aider --model flash` or `aider --model gemini/gemini-2.0-flash-exp`
|
||||
- [New `--multiline` flag and `/multiline-mode` command](https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages) makes ENTER a soft newline and META-ENTER send the message, by @miradnanali.
|
||||
- `/copy-context <instructions>` now takes optional "instructions" when [copying code context to the clipboard](https://aider.chat/docs/usage/copypaste.html#copy-aiders-code-context-to-your-clipboard-paste-into-the-web-ui).
|
||||
- Improved clipboard error handling with helpful requirements install info.
|
||||
- Ask 5% of users if they want to opt-in to analytics.
|
||||
- `/voice` now lets you edit the transcribed text before sending.
|
||||
- Disabled auto-complete in Y/N prompts.
|
||||
- Aider wrote 60% of the code in this release.
|
||||
|
||||
### Aider v0.68.0
|
||||
|
||||
- [Aider works with LLM web chat UIs](https://aider.chat/docs/usage/copypaste.html).
|
||||
- New `--copy-paste` mode.
|
||||
- New `/copy-context` command.
|
||||
- [Set API keys and other environment variables for all providers from command line or yaml conf file](https://aider.chat/docs/config/aider_conf.html#storing-llm-keys).
|
||||
- New `--api-key provider=key` setting.
|
||||
- New `--set-env VAR=value` setting.
|
||||
- Added bash and zsh support to `--watch-files`.
|
||||
- Better error messages when missing dependencies for Gemini and Bedrock models.
|
||||
- Control-D now properly exits the program.
|
||||
- Don't count token costs when API provider returns a hard error.
|
||||
- Bugfix so watch files works with files that don't have tree-sitter support.
|
||||
- Bugfix so o1 models can be used as weak model.
|
||||
- Updated shell command prompt.
|
||||
- Added docstrings for all Coders.
|
||||
- Reorganized command line arguments with improved help messages and grouping.
|
||||
- Use the exact `sys.python` for self-upgrades.
|
||||
- Added experimental Gemini models.
|
||||
- Aider wrote 71% of the code in this release.
|
||||
|
||||
### Aider v0.67.0
|
||||
|
||||
- [Use aider in your IDE or editor](https://aider.chat/docs/usage/watch.html).
|
||||
- Run `aider --watch-files` and it will watch for instructions you add to your source files.
|
||||
- One-liner `# ...` or `// ...` comments that start or end with "AI" are instructions to aider.
|
||||
- When aider sees "AI!" it reads and follows all the instructions in AI comments.
|
||||
- Support for new Amazon Bedrock Nova models.
|
||||
- When `/run` or `/test` have non-zero exit codes, pre-fill "Fix that" into the next message prompt.
|
||||
- `/diff` now invokes `git diff` to use your preferred diff tool.
|
||||
- Added Ctrl-Z support for process suspension.
|
||||
- Spinner now falls back to ASCII art if fancy symbols throw unicode errors.
|
||||
- `--read` now expands `~` home dirs.
|
||||
- Enabled exception capture in analytics.
|
||||
- [Aider wrote 61% of the code in this release.](https://aider.chat/HISTORY.html)
|
||||
|
||||
### Aider v0.66.0
|
||||
|
||||
- PDF support for Sonnet and Gemini models.
|
||||
- Added `--voice-input-device` to select audio input device for voice recording, by @preynal.
|
||||
- Added `--timeout` option to configure API call timeouts.
|
||||
- Set cwd to repo root when running shell commands.
|
||||
- Added Ctrl-Up/Down keyboard shortcuts for per-message history navigation.
|
||||
- Improved error handling for failed .gitignore file operations.
|
||||
- Improved error handling for input history file permissions.
|
||||
- Improved error handling for analytics file access.
|
||||
- Removed spurious warning about disabling pretty in VSCode.
|
||||
- Removed broken support for Dart.
|
||||
- Bugfix when scraping URLs found in chat messages.
|
||||
- Better handling of __version__ import errors.
|
||||
- Improved `/drop` command to support substring matching for non-glob patterns.
|
||||
- Aider wrote 82% of the code in this release.
|
||||
|
||||
### Aider v0.65.1
|
||||
|
||||
- Bugfix to `--alias`.
|
||||
|
||||
### Aider v0.65.0
|
||||
|
||||
- Added `--alias` config to define [custom model aliases](https://aider.chat/docs/config/model-aliases.html).
|
||||
- Added `--[no-]detect-urls` flag to disable detecting and offering to scrape URLs found in the chat.
|
||||
- Ollama models now default to an 8k context window.
|
||||
- Added [RepoMap support for Dart language](https://aider.chat/docs/languages.html) by @malkoG.
|
||||
- Ask 2.5% of users if they want to opt-in to [analytics](https://aider.chat/docs/more/analytics.html).
|
||||
- Skip suggesting files that share names with files already in chat.
|
||||
- `/editor` returns and prefill the file content into the prompt, so you can use `/editor` to compose messages that start with `/commands`, etc.
|
||||
- Enhanced error handling for analytics.
|
||||
- Improved handling of UnknownEditFormat exceptions with helpful documentation links.
|
||||
- Bumped dependencies to pick up grep-ast 0.4.0 for Dart language support.
|
||||
- Aider wrote 81% of the code in this release.
|
||||
|
||||
### Aider v0.64.1
|
||||
|
||||
- Disable streaming for o1 on OpenRouter.
|
||||
|
||||
### Aider v0.64.0
|
||||
|
||||
- Added [`/editor` command](https://aider.chat/docs/usage/commands.html) to open system editor for writing prompts, by @thehunmonkgroup.
|
||||
- Full support for `gpt-4o-2024-11-20`.
|
||||
- Stream o1 models by default.
|
||||
- `/run` and suggested shell commands are less mysterious and now confirm that they "Added XX lines of output to the chat."
|
||||
- Ask 1% of users if they want to opt-in to [analytics](https://aider.chat/docs/more/analytics.html).
|
||||
- Added support for [optional multiline input tags](https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages) with matching closing tags.
|
||||
- Improved [model settings configuration](https://aider.chat/docs/config/adv-model-settings.html#global-extra-params) with support for global `extra_params` for `litellm.completion()`.
|
||||
- Architect mode now asks to add files suggested by the LLM.
|
||||
- Fixed bug in fuzzy model name matching.
|
||||
- Added Timeout exception to handle API provider timeouts.
|
||||
- Added `--show-release-notes` to control release notes display on first run of new version.
|
||||
- Save empty dict to cache file on model metadata download failure, to delay retry.
|
||||
- Improved error handling and code formatting.
|
||||
- Aider wrote 74% of the code in this release.
|
||||
|
||||
### Aider v0.63.2
|
||||
|
||||
- Fixed bug in fuzzy model name matching when litellm provider info is missing.
|
||||
- Modified model metadata file loading to allow override of resource file.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
- dirname: 2024-05-01-20-05-59--direct-opus-filenames-outside-fence
|
||||
test_cases: 133
|
||||
model: claude-3-opus-20240229
|
||||
released: 2024-02-29
|
||||
_released: 2024-02-29
|
||||
edit_format: diff
|
||||
commit_hash: f4b1797-dirty, f4b1797
|
||||
pass_rate_1: 53.4
|
||||
@@ -46,7 +46,8 @@
|
||||
|
||||
- dirname: 2024-05-03-20-47-24--gemini-1.5-pro-diff-fenced
|
||||
test_cases: 133
|
||||
model: gemini-1.5-pro-latest
|
||||
released: 2024-05-03
|
||||
model: gemini-1.5-pro-001
|
||||
edit_format: diff-fenced
|
||||
commit_hash: 3a48dfb, 5d32dd7
|
||||
pass_rate_1: 45.9
|
||||
@@ -274,7 +275,7 @@
|
||||
- dirname: 2024-05-03-22-24-48--openrouter--llama3-diff-examples-sys-msg
|
||||
test_cases: 132
|
||||
model: llama3-70b-8192
|
||||
released: 2024-04-18
|
||||
_released: 2024-04-18
|
||||
edit_format: diff
|
||||
commit_hash: b5bb453
|
||||
pass_rate_1: 38.6
|
||||
@@ -297,7 +298,7 @@
|
||||
- dirname: 2024-05-06-18-31-08--command-r-plus-whole-final
|
||||
test_cases: 133
|
||||
model: command-r-plus
|
||||
released: 2024-04-04
|
||||
_released: 2024-04-04
|
||||
edit_format: whole
|
||||
commit_hash: fc3a43e-dirty
|
||||
pass_rate_1: 21.8
|
||||
@@ -410,6 +411,7 @@
|
||||
- dirname: 2024-06-08-22-37-55--qwen2-72b-instruct-whole
|
||||
test_cases: 133
|
||||
model: Qwen2 72B Instruct
|
||||
released: 2024-06-08
|
||||
edit_format: whole
|
||||
commit_hash: 02c7335-dirty, 1a97498-dirty
|
||||
pass_rate_1: 44.4
|
||||
@@ -623,7 +625,7 @@
|
||||
commit_hash: d31eef3-dirty
|
||||
pass_rate_1: 40.6
|
||||
pass_rate_2: 55.6
|
||||
released: 2024-07-18
|
||||
_released: 2024-07-18
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 1
|
||||
num_malformed_responses: 0
|
||||
@@ -642,7 +644,7 @@
|
||||
|
||||
- dirname: 2024-07-19-08-57-13--openrouter-deepseek-chat-v2-0628
|
||||
test_cases: 133
|
||||
model: DeepSeek Chat V2 0628 (deprecated)
|
||||
model: DeepSeek Chat V2 0628
|
||||
edit_format: diff
|
||||
commit_hash: 96ff06e-dirty
|
||||
pass_rate_1: 60.9
|
||||
@@ -671,7 +673,7 @@
|
||||
commit_hash: f7ce78b-dirty
|
||||
pass_rate_1: 46.6
|
||||
pass_rate_2: 63.9
|
||||
released: 2024-07-23
|
||||
_released: 2024-07-23
|
||||
percent_cases_well_formed: 92.5
|
||||
error_outputs: 84
|
||||
num_malformed_responses: 19
|
||||
@@ -691,6 +693,7 @@
|
||||
- dirname: 2024-07-24-06-30-29--llama-405b-whole
|
||||
test_cases: 133
|
||||
model: llama-3.1-405b-instruct (whole)
|
||||
_released: 2024-07-23
|
||||
edit_format: whole
|
||||
commit_hash: a362dea-dirty
|
||||
pass_rate_1: 48.9
|
||||
@@ -698,7 +701,6 @@
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 0
|
||||
num_malformed_responses: 0
|
||||
released: 2024-07-23
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 0
|
||||
lazy_comments: 0
|
||||
@@ -714,7 +716,7 @@
|
||||
|
||||
- dirname: 2024-07-24-07-10-58--deepseek-coder2-0724-diff-direct
|
||||
test_cases: 133
|
||||
model: DeepSeek Coder V2 0724 (deprecated)
|
||||
model: DeepSeek Coder V2 0724
|
||||
edit_format: diff
|
||||
commit_hash: 89965bf
|
||||
pass_rate_1: 57.9
|
||||
@@ -770,7 +772,7 @@
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 27
|
||||
num_malformed_responses: 0
|
||||
released: 2024-07-23
|
||||
_released: 2024-07-23
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 23
|
||||
lazy_comments: 8
|
||||
@@ -796,7 +798,7 @@
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 0
|
||||
released: 2024-07-23
|
||||
_released: 2024-07-23
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
@@ -835,6 +837,7 @@
|
||||
- dirname: 2024-08-28-07-10-50--gemini-1.5-pro-exp-0827-diff-fenced
|
||||
test_cases: 133
|
||||
model: gemini-1.5-pro-exp-0827
|
||||
released: 2024-08-27
|
||||
edit_format: diff-fenced
|
||||
commit_hash: d8adc75
|
||||
pass_rate_1: 54.9
|
||||
@@ -946,7 +949,7 @@
|
||||
versions: 0.54.13.dev
|
||||
seconds_per_case: 8.3
|
||||
total_cost: 0.0000
|
||||
released: 2024-09-04
|
||||
_released: 2024-09-04
|
||||
|
||||
- dirname: 2024-09-04-16-17-33--yi-coder-9b-chat-q4_0-whole
|
||||
test_cases: 133
|
||||
@@ -973,6 +976,7 @@
|
||||
|
||||
- dirname: 2024-09-05-14-50-11--deepseek-sep5-no-shell
|
||||
test_cases: 133
|
||||
released: 2024-09-05
|
||||
model: DeepSeek V2.5
|
||||
edit_format: diff
|
||||
commit_hash: 1279c86
|
||||
@@ -1112,6 +1116,7 @@
|
||||
- dirname: 2024-09-21-16-45-11--o1-preview-flex-sr-markers
|
||||
test_cases: 133
|
||||
model: o1-preview
|
||||
_released: 2024-09-12
|
||||
edit_format: diff
|
||||
commit_hash: 5493654-dirty
|
||||
pass_rate_1: 57.9
|
||||
@@ -1204,6 +1209,7 @@
|
||||
- dirname: 2024-09-24-16-26-45--gemini-1.5-pro-002-diff-fenced
|
||||
test_cases: 133
|
||||
model: gemini-1.5-pro-002
|
||||
released: 2024-09-24
|
||||
edit_format: diff-fenced
|
||||
commit_hash: 6b5fe9b, 3edcd71
|
||||
pass_rate_1: 49.6
|
||||
@@ -1226,7 +1232,7 @@
|
||||
|
||||
- dirname: 2024-09-24-16-33-23--gemini-1.5-flash-002-whole
|
||||
test_cases: 133
|
||||
model: gemini-1.5-flash-002
|
||||
model: gemini-1.5-flash-002 (0924)
|
||||
edit_format: whole
|
||||
commit_hash: 3edcd71
|
||||
pass_rate_1: 37.6
|
||||
@@ -1477,6 +1483,7 @@
|
||||
- dirname: 2024-10-04-16-30-08--chatgpt-4o-latest-diff-oct4
|
||||
test_cases: 133
|
||||
model: openai/chatgpt-4o-latest
|
||||
released: 2024-10-04
|
||||
edit_format: diff
|
||||
commit_hash: af10953
|
||||
pass_rate_1: 56.4
|
||||
@@ -1592,6 +1599,7 @@
|
||||
- dirname: 2024-10-22-17-45-28--sonnet-1022-diff-fixed-model-settings
|
||||
test_cases: 133
|
||||
model: claude-3-5-sonnet-20241022
|
||||
released: 2024-10-22
|
||||
edit_format: diff
|
||||
commit_hash: 3b14eb9
|
||||
pass_rate_1: 69.2
|
||||
@@ -1615,6 +1623,7 @@
|
||||
- dirname: 2024-11-04-19-19-32--haiku35-diff-ex-as-sys-false
|
||||
test_cases: 133
|
||||
model: claude-3-5-haiku-20241022
|
||||
released: 2024-10-22
|
||||
edit_format: diff
|
||||
commit_hash: 03bbdb0-dirty
|
||||
pass_rate_1: 61.7
|
||||
@@ -1773,32 +1782,10 @@
|
||||
seconds_per_case: 18.3
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-09-10-57-11--Qwen2.5-Coder-32B-Instruct
|
||||
test_cases: 133
|
||||
model: Qwen2.5-Coder-32B-Instruct (whole)
|
||||
edit_format: whole
|
||||
commit_hash: ec9982a
|
||||
pass_rate_1: 60.9
|
||||
pass_rate_2: 73.7
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 1
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 1
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 1
|
||||
test_timeouts: 1
|
||||
command: aider --model openai/Qwen2.5-Coder-32B-Instruct
|
||||
date: 2024-11-09
|
||||
versions: 0.59.2.dev
|
||||
seconds_per_case: 26.6
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-09-11-09-15--Qwen2.5-Coder-32B-Instruct
|
||||
test_cases: 133
|
||||
model: Qwen2.5-Coder-32B-Instruct (diff)
|
||||
model: Qwen2.5-Coder-32B-Instruct
|
||||
released: 2024-11-12
|
||||
edit_format: diff
|
||||
commit_hash: ec9982a
|
||||
pass_rate_1: 59.4
|
||||
@@ -1813,8 +1800,384 @@
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 3
|
||||
command: aider --model openai/Qwen2.5-Coder-32B-Instruct
|
||||
command: aider --model openai/hf:Qwen/Qwen2.5-Coder-32B-Instruct --openai-api-base https://glhf.chat/api/openai/v1
|
||||
date: 2024-11-09
|
||||
versions: 0.59.2.dev
|
||||
seconds_per_case: 22.5
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-20-14-57-11--mistral-2411-direct-diff
|
||||
test_cases: 133
|
||||
model: Mistral Large (2411)
|
||||
released: 2024-11-18
|
||||
edit_format: diff
|
||||
commit_hash: dba844c
|
||||
pass_rate_1: 46.6
|
||||
pass_rate_2: 65.4
|
||||
percent_cases_well_formed: 96.2
|
||||
error_outputs: 8
|
||||
num_malformed_responses: 8
|
||||
num_with_malformed_responses: 5
|
||||
user_asks: 5
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 1
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 1
|
||||
command: aider --model mistral/mistral-large-latest
|
||||
date: 2024-11-20
|
||||
versions: 0.63.3.dev
|
||||
seconds_per_case: 24.9
|
||||
total_cost: 3.2334
|
||||
|
||||
- dirname: 2024-11-20-19-28-30--gpt-4o-2024-11-20
|
||||
test_cases: 133
|
||||
model: gpt-4o-2024-11-20
|
||||
released: 2024-11-20
|
||||
edit_format: diff
|
||||
commit_hash: 2ac0776-dirty
|
||||
pass_rate_1: 58.6
|
||||
pass_rate_2: 71.4
|
||||
percent_cases_well_formed: 99.2
|
||||
error_outputs: 1
|
||||
num_malformed_responses: 1
|
||||
num_with_malformed_responses: 1
|
||||
user_asks: 4
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 5
|
||||
command: aider --model openai/gpt-4o-2024-11-20
|
||||
date: 2024-11-20
|
||||
versions: 0.63.3.dev
|
||||
seconds_per_case: 6.0
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-09-20-21-47-17--qwen2.5-32b-instruct-q8_0-whole
|
||||
test_cases: 133
|
||||
model: ollama/qwen2.5:32b-instruct-q8_0
|
||||
edit_format: whole
|
||||
commit_hash: 2753ac6
|
||||
pass_rate_1: 46.6
|
||||
pass_rate_2: 58.6
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 0
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 1
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 2
|
||||
command: aider --model ollama/qwen2.5:32b-instruct-q8_0
|
||||
date: 2024-09-20
|
||||
versions: 0.56.1.dev
|
||||
seconds_per_case: 1763.7
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-20-15-17-37--qwen25-32b-or-diff
|
||||
test_cases: 133
|
||||
model: openrouter/qwen/qwen-2.5-coder-32b-instruct
|
||||
edit_format: diff
|
||||
commit_hash: e917424
|
||||
pass_rate_1: 49.6
|
||||
pass_rate_2: 65.4
|
||||
percent_cases_well_formed: 84.2
|
||||
error_outputs: 43
|
||||
num_malformed_responses: 31
|
||||
num_with_malformed_responses: 21
|
||||
user_asks: 43
|
||||
lazy_comments: 0
|
||||
syntax_errors: 2
|
||||
indentation_errors: 2
|
||||
exhausted_context_windows: 12
|
||||
test_timeouts: 2
|
||||
command: aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct
|
||||
date: 2024-11-20
|
||||
versions: 0.63.3.dev
|
||||
seconds_per_case: 40.7
|
||||
total_cost: 0.1497
|
||||
|
||||
- dirname: 2024-11-21-17-46-36--gemini-exp-1121-diff
|
||||
test_cases: 133
|
||||
model: gemini-exp-1121
|
||||
released: 2024-11-21
|
||||
edit_format: diff
|
||||
commit_hash: e94961a
|
||||
pass_rate_1: 46.6
|
||||
pass_rate_2: 57.9
|
||||
percent_cases_well_formed: 83.5
|
||||
error_outputs: 101
|
||||
num_malformed_responses: 101
|
||||
num_with_malformed_responses: 22
|
||||
user_asks: 5
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 2
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 3
|
||||
command: aider --model gemini/gemini-exp-1121
|
||||
date: 2024-11-21
|
||||
versions: 0.63.3.dev
|
||||
seconds_per_case: 60.3
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-15-20-33-31--gemini-exp-1114-diff
|
||||
test_cases: 133
|
||||
model: gemini-exp-1114
|
||||
released: 2024-11-14
|
||||
edit_format: diff
|
||||
commit_hash: 0bf17a4
|
||||
pass_rate_1: 50.4
|
||||
pass_rate_2: 60.9
|
||||
percent_cases_well_formed: 85.7
|
||||
error_outputs: 70
|
||||
num_malformed_responses: 70
|
||||
num_with_malformed_responses: 19
|
||||
user_asks: 2
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 4
|
||||
command: aider --model gemini/gemini-exp-1114
|
||||
date: 2024-11-15
|
||||
versions: 0.63.2.dev
|
||||
seconds_per_case: 38.6
|
||||
- dirname: 2024-11-27-07-41-51--qwen2.5-coder-14b-whole-1
|
||||
test_cases: 133
|
||||
model: ollama/qwen2.5-coder:14b
|
||||
edit_format: whole
|
||||
commit_hash: 200295e
|
||||
pass_rate_1: 53.4
|
||||
pass_rate_2: 61.7
|
||||
percent_cases_well_formed: 98.5
|
||||
error_outputs: 4
|
||||
num_malformed_responses: 4
|
||||
num_with_malformed_responses: 2
|
||||
user_asks: 48
|
||||
lazy_comments: 0
|
||||
syntax_errors: 2
|
||||
indentation_errors: 2
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 2
|
||||
command: aider --model ollama/qwen2.5-coder:14b
|
||||
date: 2024-11-27
|
||||
versions: 0.65.2.dev
|
||||
seconds_per_case: 58.0
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-28-07-42-56--qwen2.5-coder-32b-whole-4
|
||||
test_cases: 133
|
||||
model: ollama/qwen2.5-coder:32b
|
||||
edit_format: whole
|
||||
commit_hash: 200295e
|
||||
pass_rate_1: 58.6
|
||||
pass_rate_2: 72.9
|
||||
percent_cases_well_formed: 100.0
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
command: aider --model ollama/qwen2.5-coder:32b
|
||||
date: 2024-11-28
|
||||
versions: 0.65.2.dev
|
||||
seconds_per_case: 147.5
|
||||
total_cost: 0.0000
|
||||
- dirname: 2024-11-28-13-14-00--tulu3-whole-2
|
||||
test_cases: 133
|
||||
model: ollama/tulu3
|
||||
edit_format: whole
|
||||
commit_hash: 200295e
|
||||
pass_rate_1: 21.8
|
||||
pass_rate_2: 26.3
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 0
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
exhausted_context_windows: 0
|
||||
command: aider --model ollama/tulu3
|
||||
date: 2024-11-28
|
||||
versions: 0.65.2.dev
|
||||
seconds_per_case: 35.8
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-28-14-41-46--granite3-dense-8b-whole-1
|
||||
test_cases: 133
|
||||
model: ollama/granite3-dense:8b
|
||||
edit_format: whole
|
||||
commit_hash: 200295e
|
||||
pass_rate_1: 17.3
|
||||
pass_rate_2: 20.3
|
||||
percent_cases_well_formed: 78.9
|
||||
exhausted_context_windows: 0
|
||||
command: aider --model ollama/granite3-dense:8b
|
||||
date: 2024-11-28
|
||||
versions: 0.65.2.dev
|
||||
seconds_per_case: 38.1
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-12-04-13-53-03--nova-whole
|
||||
test_cases: 133
|
||||
model: Nova Pro
|
||||
edit_format: whole
|
||||
commit_hash: 699e283
|
||||
pass_rate_1: 44.4
|
||||
pass_rate_2: 54.1
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 0
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 7
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 4
|
||||
command: aider --model bedrock/us.amazon.nova-pro-v1:0
|
||||
date: 2024-12-04
|
||||
versions: 0.66.1.dev
|
||||
seconds_per_case: 8.7
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-12-06-18-27-47--llama33-diff
|
||||
test_cases: 133
|
||||
model: llama-3.3-70b-instruct
|
||||
edit_format: diff
|
||||
commit_hash: 53e0d67
|
||||
pass_rate_1: 42.1
|
||||
pass_rate_2: 59.4
|
||||
percent_cases_well_formed: 88.7
|
||||
error_outputs: 33
|
||||
num_malformed_responses: 33
|
||||
num_with_malformed_responses: 15
|
||||
user_asks: 3
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 3
|
||||
command: aider --model openrouter/meta-llama/llama-3.3-70b-instruct
|
||||
date: 2024-12-06
|
||||
versions: 0.67.1.dev
|
||||
seconds_per_case: 20.2
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-12-06-21-35-50--gemini-exp-1206-diff
|
||||
test_cases: 133
|
||||
model: gemini-exp-1206 (diff)
|
||||
edit_format: diff
|
||||
commit_hash: f2d2ab5
|
||||
pass_rate_1: 55.6
|
||||
pass_rate_2: 69.2
|
||||
percent_cases_well_formed: 84.2
|
||||
error_outputs: 68
|
||||
num_malformed_responses: 68
|
||||
num_with_malformed_responses: 21
|
||||
user_asks: 5
|
||||
lazy_comments: 0
|
||||
syntax_errors: 2
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 0
|
||||
command: aider --model gemini/gemini-exp-1206
|
||||
date: 2024-12-06
|
||||
versions: 0.67.1.dev
|
||||
seconds_per_case: 32.1
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-12-08-21-39-06--gemini-exp-1206-whole
|
||||
test_cases: 133
|
||||
model: gemini-exp-1206 (whole)
|
||||
edit_format: whole
|
||||
commit_hash: f2d2ab5
|
||||
pass_rate_1: 60.9
|
||||
pass_rate_2: 80.5
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 0
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 1
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 3
|
||||
command: aider --model gemini/gemini-exp-1206
|
||||
date: 2024-12-08
|
||||
versions: 0.67.1.dev
|
||||
seconds_per_case: 64.2
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-12-10-14-45-21--deepseek-1210-diff
|
||||
test_cases: 133
|
||||
model: DeepSeek-V2.5-1210
|
||||
edit_format: diff
|
||||
commit_hash: 16332b2
|
||||
pass_rate_1: 58.6
|
||||
pass_rate_2: 72.2
|
||||
percent_cases_well_formed: 99.2
|
||||
error_outputs: 1
|
||||
num_malformed_responses: 1
|
||||
num_with_malformed_responses: 1
|
||||
user_asks: 2
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 2
|
||||
command: aider --model deepseek/deepseek-chat
|
||||
date: 2024-12-10
|
||||
versions: 0.67.1.dev
|
||||
seconds_per_case: 32.7
|
||||
total_cost: 0.1106
|
||||
|
||||
- dirname: 2024-12-11-00-37-08--yi-test
|
||||
test_cases: 133
|
||||
model: yi-lightning
|
||||
edit_format: whole
|
||||
commit_hash: e909a3d-dirty
|
||||
pass_rate_1: 49.6
|
||||
pass_rate_2: 65.4
|
||||
percent_cases_well_formed: 97.0
|
||||
error_outputs: 304
|
||||
num_malformed_responses: 5
|
||||
num_with_malformed_responses: 4
|
||||
user_asks: 34
|
||||
lazy_comments: 2
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 2
|
||||
command: aider --model openai/yi-lightning
|
||||
date: 2024-12-11
|
||||
versions: 0.67.1.dev
|
||||
seconds_per_case: 57.8
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-12-11-21-07-00--gemini-2-flash-diff
|
||||
test_cases: 133
|
||||
model: gemini-2.0-flash-exp
|
||||
edit_format: diff
|
||||
commit_hash: fcb2bac-dirty, 02e7e31-dirty
|
||||
pass_rate_1: 56.4
|
||||
pass_rate_2: 69.9
|
||||
percent_cases_well_formed: 97.0
|
||||
error_outputs: 10
|
||||
num_malformed_responses: 6
|
||||
num_with_malformed_responses: 4
|
||||
user_asks: 8
|
||||
lazy_comments: 0
|
||||
syntax_errors: 1
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 2
|
||||
test_timeouts: 1
|
||||
command: aider --model gemini/gemini-2.0-flash-exp
|
||||
date: 2024-12-11
|
||||
versions: 0.68.1.dev
|
||||
seconds_per_case: 7.3
|
||||
total_cost: 0.0000
|
||||
322
aider/website/_data/quant.yml
Normal file
@@ -0,0 +1,322 @@
|
||||
- dirname: 2024-11-09-11-09-15--Qwen2.5-Coder-32B-Instruct
|
||||
test_cases: 133
|
||||
model: "HuggingFace via GLHF: BF16"
|
||||
released: 2024-11-12
|
||||
edit_format: diff
|
||||
commit_hash: ec9982a
|
||||
pass_rate_1: 59.4
|
||||
pass_rate_2: 71.4
|
||||
percent_cases_well_formed: 94.7
|
||||
error_outputs: 17
|
||||
num_malformed_responses: 17
|
||||
num_with_malformed_responses: 7
|
||||
user_asks: 1
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 3
|
||||
command: aider --model openai/hf:Qwen/Qwen2.5-Coder-32B-Instruct --openai-api-base https://glhf.chat/api/openai/v1
|
||||
date: 2024-11-09
|
||||
versions: 0.59.2.dev
|
||||
seconds_per_case: 22.5
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-22-18-56-13--ollama-qwen2.5-coder:32b-instruct-fp16
|
||||
test_cases: 132
|
||||
model: "Ollama: fp16"
|
||||
edit_format: diff
|
||||
commit_hash: f06452c-dirty, 6a0a97c-dirty, 4e9ae16-dirty, 5506d0f-dirty
|
||||
pass_rate_1: 58.3
|
||||
pass_rate_2: 71.4
|
||||
percent_cases_well_formed: 90.2
|
||||
error_outputs: 27
|
||||
num_malformed_responses: 26
|
||||
num_with_malformed_responses: 13
|
||||
user_asks: 2
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 0
|
||||
command: aider --model ollama/qwen2.5-coder:32b-instruct-fp16
|
||||
date: 2024-11-22
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 119.6
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-22-14-53-26--hyperbolic-qwen25coder32binstruct
|
||||
test_cases: 133
|
||||
model: "Hyperbolic: BF16"
|
||||
edit_format: diff
|
||||
commit_hash: f9ef161, 17aef7b-dirty
|
||||
pass_rate_1: 57.9
|
||||
pass_rate_2: 69.2
|
||||
percent_cases_well_formed: 91.7
|
||||
error_outputs: 30
|
||||
num_malformed_responses: 29
|
||||
num_with_malformed_responses: 11
|
||||
user_asks: 9
|
||||
lazy_comments: 0
|
||||
syntax_errors: 4
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 2
|
||||
command: aider --model openai/Qwen/Qwen2.5-Coder-32B-Instruct --openai-api-base https://api.hyperbolic.xyz/v1/
|
||||
date: 2024-11-22
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 33.2
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-22-17-53-35--qwen25-coder-32b-Instruct-4bit
|
||||
test_cases: 133
|
||||
model: "mlx-community: 4bit"
|
||||
edit_format: diff
|
||||
commit_hash: a16dcab-dirty
|
||||
pass_rate_1: 60.2
|
||||
pass_rate_2: 72.2
|
||||
percent_cases_well_formed: 88.7
|
||||
error_outputs: 31
|
||||
num_malformed_responses: 30
|
||||
num_with_malformed_responses: 15
|
||||
user_asks: 6
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 1
|
||||
test_timeouts: 0
|
||||
command: aider --model openai/mlx-community/Qwen2.5-Coder-32B-Instruct-4bit
|
||||
date: 2024-11-23
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 53.4
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-23-15-07-20--qwen25-coder-32b-Instruct-8bit
|
||||
test_cases: 133
|
||||
model: "mlx-community: 8bit"
|
||||
edit_format: diff
|
||||
commit_hash: a16dcab-dirty
|
||||
pass_rate_1: 59.4
|
||||
pass_rate_2: 72.2
|
||||
percent_cases_well_formed: 92.5
|
||||
error_outputs: 20
|
||||
num_malformed_responses: 15
|
||||
num_with_malformed_responses: 10
|
||||
user_asks: 7
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 5
|
||||
test_timeouts: 2
|
||||
command: aider --model openai/mlx-community/Qwen2.5-Coder-32B-Instruct-8bit
|
||||
date: 2024-11-23
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 98.4
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-24-22-18-18--or-all-or-fixed-blank-messages2
|
||||
test_cases: 133
|
||||
model: "OpenRouter: multiple"
|
||||
edit_format: diff
|
||||
commit_hash: 0c59d32
|
||||
pass_rate_1: 57.1
|
||||
pass_rate_2: 67.7
|
||||
percent_cases_well_formed: 95.5
|
||||
error_outputs: 56
|
||||
num_malformed_responses: 10
|
||||
num_with_malformed_responses: 6
|
||||
user_asks: 14
|
||||
lazy_comments: 0
|
||||
syntax_errors: 6
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 3
|
||||
test_timeouts: 1
|
||||
command: aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct
|
||||
date: 2024-11-24
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 21.2
|
||||
total_cost: 0.1420
|
||||
|
||||
- dirname: 2024-11-23-21-08-53--ollama-qwen2.5-coder:32b-instruct-q4_K_M-8kctx
|
||||
test_cases: 133
|
||||
model: "Ollama: q4_K_M"
|
||||
edit_format: diff
|
||||
commit_hash: baa1335-dirty, e63df83-dirty, ff8c1aa-dirty
|
||||
pass_rate_1: 54.9
|
||||
pass_rate_2: 66.9
|
||||
percent_cases_well_formed: 94.0
|
||||
error_outputs: 21
|
||||
num_malformed_responses: 21
|
||||
num_with_malformed_responses: 8
|
||||
user_asks: 5
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 3
|
||||
command: aider --model ollama/qwen2.5-coder:32b-instruct-q4_K_M
|
||||
date: 2024-11-23
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 35.7
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-24-02-23-32--deepinfra-qwen-diff
|
||||
test_cases: 133
|
||||
model: "Deepinfra: BF16"
|
||||
edit_format: diff
|
||||
commit_hash: bb78e2f
|
||||
pass_rate_1: 58.6
|
||||
pass_rate_2: 72.2
|
||||
percent_cases_well_formed: 94.7
|
||||
error_outputs: 15
|
||||
num_malformed_responses: 13
|
||||
num_with_malformed_responses: 7
|
||||
user_asks: 3
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 2
|
||||
test_timeouts: 3
|
||||
command: aider --model deepinfra/Qwen/Qwen2.5-Coder-32B-Instruct
|
||||
date: 2024-11-24
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 17.5
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-24-04-12-58--fireworks-qwen-diff
|
||||
test_cases: 133
|
||||
model: "Fireworks: unknown"
|
||||
edit_format: diff
|
||||
commit_hash: 757eac0
|
||||
pass_rate_1: 57.9
|
||||
pass_rate_2: 72.2
|
||||
percent_cases_well_formed: 94.0
|
||||
error_outputs: 23
|
||||
num_malformed_responses: 19
|
||||
num_with_malformed_responses: 8
|
||||
user_asks: 8
|
||||
lazy_comments: 0
|
||||
syntax_errors: 6
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 4
|
||||
test_timeouts: 1
|
||||
command: aider --model fireworks_ai/accounts/fireworks/models/qwen2p5-coder-32b-instruct
|
||||
date: 2024-11-24
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 10.4
|
||||
total_cost: 0.5759
|
||||
|
||||
- dirname: 2024-11-24-02-04-59--ollama-qwen2.5-coder:32b-instruct-q2_K-8kctx
|
||||
test_cases: 133
|
||||
model: "Ollama: q2_K"
|
||||
edit_format: diff
|
||||
commit_hash: 757eac0, bb78e2f, 8d0ba40-dirty, 1d09e96
|
||||
pass_rate_1: 48.9
|
||||
pass_rate_2: 61.7
|
||||
percent_cases_well_formed: 91.7
|
||||
error_outputs: 32
|
||||
num_malformed_responses: 32
|
||||
num_with_malformed_responses: 11
|
||||
user_asks: 8
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 1
|
||||
command: aider --model ollama/qwen2.5-coder:32b-instruct-q2_K
|
||||
date: 2024-11-24
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 97.8
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-11-24-14-56-49--qwen25-32b-or-fireworks
|
||||
test_cases: 133
|
||||
model: "Fireworks via OpenRouter: unknown"
|
||||
edit_format: diff
|
||||
commit_hash: c2f184f
|
||||
pass_rate_1: 55.6
|
||||
pass_rate_2: 67.7
|
||||
percent_cases_well_formed: 94.0
|
||||
error_outputs: 39
|
||||
num_malformed_responses: 24
|
||||
num_with_malformed_responses: 8
|
||||
user_asks: 13
|
||||
lazy_comments: 0
|
||||
syntax_errors: 1
|
||||
indentation_errors: 1
|
||||
exhausted_context_windows: 7
|
||||
test_timeouts: 4
|
||||
command: aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct
|
||||
date: 2024-11-24
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 16.1
|
||||
total_cost: 0.1391
|
||||
|
||||
- dirname: 2024-11-24-22-03-19--or-hyperbolic-or-fixed-blank-messages2
|
||||
test_cases: 133
|
||||
model: "Hyperbolic via OpenRouter: BF16"
|
||||
edit_format: diff
|
||||
commit_hash: 0c59d32
|
||||
pass_rate_1: 55.6
|
||||
pass_rate_2: 68.4
|
||||
percent_cases_well_formed: 89.5
|
||||
error_outputs: 28
|
||||
num_malformed_responses: 24
|
||||
num_with_malformed_responses: 14
|
||||
user_asks: 29
|
||||
lazy_comments: 0
|
||||
syntax_errors: 1
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 4
|
||||
test_timeouts: 1
|
||||
command: aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct
|
||||
date: 2024-11-24
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 41.5
|
||||
total_cost: 0.1402
|
||||
|
||||
- dirname: 2024-11-24-15-00-50--qwen25-32b-or-deepinfra
|
||||
test_cases: 133
|
||||
model: "Deepinfra via OpenRouter: BF16"
|
||||
edit_format: diff
|
||||
commit_hash: c2f184f
|
||||
pass_rate_1: 57.1
|
||||
pass_rate_2: 69.9
|
||||
percent_cases_well_formed: 89.5
|
||||
error_outputs: 35
|
||||
num_malformed_responses: 31
|
||||
num_with_malformed_responses: 14
|
||||
user_asks: 11
|
||||
lazy_comments: 0
|
||||
syntax_errors: 1
|
||||
indentation_errors: 1
|
||||
exhausted_context_windows: 4
|
||||
test_timeouts: 1
|
||||
command: aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct
|
||||
date: 2024-11-24
|
||||
versions: 0.64.2.dev
|
||||
seconds_per_case: 28.5
|
||||
total_cost: 0.1390
|
||||
|
||||
- dirname: 2024-11-26-03-15-06--ollama-qwen2.5-coder:32b-instruct-fp16-2kctx
|
||||
test_cases: 132
|
||||
model: "Ollama: fp16, 2k ctx"
|
||||
edit_format: diff
|
||||
commit_hash: 68be6c5-dirty, 554d274, 2ff3a23, 2ff3a23-dirty, 61759f9, dd48b74, 3ebd47d-dirty
|
||||
pass_rate_1: 43.2
|
||||
pass_rate_2: 51.9
|
||||
percent_cases_well_formed: 46.2
|
||||
error_outputs: 171
|
||||
num_malformed_responses: 165
|
||||
num_with_malformed_responses: 71
|
||||
user_asks: 97
|
||||
lazy_comments: 2
|
||||
syntax_errors: 4
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 0
|
||||
command: "aider --model ollama/qwen2.5-coder:32b-instruct-fp16 # num_ctx: 2048"
|
||||
date: 2024-11-26
|
||||
versions: 0.64.2.dev,0.65.1.dev
|
||||
seconds_per_case: 188.6
|
||||
total_cost: 0.0000
|
||||
170
aider/website/_data/qwq.yml
Normal file
@@ -0,0 +1,170 @@
|
||||
|
||||
- dirname: 2024-11-28-21-38-50--architect-qwq-haiku-whole
|
||||
test_cases: 133
|
||||
model: QwQ + Haiku
|
||||
edit_format: architect
|
||||
commit_hash: e4a1d6f
|
||||
editor_model: claude-3-5-haiku-20241022
|
||||
editor_edit_format: editor-whole
|
||||
pass_rate_1: 54.1
|
||||
pass_rate_2: 71.4
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 4
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 196
|
||||
lazy_comments: 4
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 0
|
||||
command: aider --model openrouter/qwen/qwq-32b-preview --editor-model claude-3-5-haiku-20241022 --edit-format editor-whole
|
||||
date: 2024-11-28
|
||||
versions: 0.65.2.dev
|
||||
seconds_per_case: 154.7
|
||||
total_cost: 1.4196
|
||||
|
||||
- dirname: 2024-11-28-19-24-35--architect-qwq-deepseek-whole
|
||||
test_cases: 133
|
||||
model: QwQ + DeepSeek V2.5
|
||||
edit_format: architect
|
||||
commit_hash: e4a1d6f
|
||||
editor_model: deepseek/deepseek-chat
|
||||
editor_edit_format: editor-whole
|
||||
pass_rate_1: 55.6
|
||||
pass_rate_2: 67.7
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 3
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 193
|
||||
lazy_comments: 2
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 0
|
||||
command: aider --model openrouter/qwen/qwq-32b-preview --editor-model deepseek/deepseek-chat --edit-format editor-whole
|
||||
date: 2024-11-28
|
||||
versions: 0.65.2.dev
|
||||
seconds_per_case: 170.3
|
||||
total_cost: 0.1558
|
||||
|
||||
|
||||
- dirname: 2024-11-09-11-09-15--Qwen2.5-Coder-32B-Instruct
|
||||
test_cases: 133
|
||||
model: Qwen2.5 Coder 32B-I
|
||||
released: 2024-11-12
|
||||
edit_format: diff
|
||||
commit_hash: ec9982a
|
||||
pass_rate_1: 59.4
|
||||
pass_rate_2: 71.4
|
||||
percent_cases_well_formed: 94.7
|
||||
error_outputs: 17
|
||||
num_malformed_responses: 17
|
||||
num_with_malformed_responses: 7
|
||||
user_asks: 1
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 3
|
||||
command: aider --model openai/hf:Qwen/Qwen2.5-Coder-32B-Instruct --openai-api-base https://glhf.chat/api/openai/v1 (via GLHF)
|
||||
date: 2024-11-09
|
||||
versions: 0.59.2.dev
|
||||
seconds_per_case: 22.5
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-12-04-00-10-39--architect-qwq-qwen
|
||||
test_cases: 132
|
||||
model: QwQ + Qwen2.5 Coder 32B-I
|
||||
edit_format: architect
|
||||
commit_hash: 51c02da
|
||||
editor_model: openrouter/qwen/qwen-2.5-coder-32b-instruct
|
||||
editor_edit_format: editor-whole
|
||||
pass_rate_1: 58.3
|
||||
pass_rate_2: 73.6
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 3
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 186
|
||||
lazy_comments: 5
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 0
|
||||
command: aider --model openrouter/qwen/qwq-32b-preview --editor-model openrouter/qwen/qwen-2.5-coder-32b-instruct --editor-edit-format editor-whole
|
||||
date: 2024-12-04
|
||||
versions: 0.66.1.dev
|
||||
seconds_per_case: 144.1
|
||||
total_cost: 0.1444
|
||||
|
||||
- dirname: 2024-12-04-00-42-05--qwq-alone-whole
|
||||
test_cases: 133
|
||||
model: QwQ
|
||||
edit_format: whole
|
||||
commit_hash: 19004c0
|
||||
pass_rate_1: 33.1
|
||||
pass_rate_2: 42.1
|
||||
percent_cases_well_formed: 91.0
|
||||
error_outputs: 28
|
||||
num_malformed_responses: 12
|
||||
num_with_malformed_responses: 12
|
||||
user_asks: 119
|
||||
lazy_comments: 2
|
||||
syntax_errors: 22
|
||||
indentation_errors: 9
|
||||
exhausted_context_windows: 2
|
||||
test_timeouts: 1
|
||||
command: aider --model openrouter/qwen/qwq-32b-preview
|
||||
date: 2024-12-04
|
||||
versions: 0.66.1.dev
|
||||
seconds_per_case: 414.3
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2024-09-12-19-57-35--o1-mini-whole
|
||||
test_cases: 133
|
||||
model: o1-mini
|
||||
edit_format: whole
|
||||
commit_hash: 36fa773-dirty, 291b456
|
||||
pass_rate_1: 49.6
|
||||
pass_rate_2: 70.7
|
||||
percent_cases_well_formed: 90.0
|
||||
error_outputs: 0
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 17
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 1
|
||||
command: aider --model o1-mini
|
||||
date: 2024-09-12
|
||||
versions: 0.56.1.dev
|
||||
seconds_per_case: 103.0
|
||||
total_cost: 5.3725
|
||||
|
||||
- dirname: 2024-09-21-16-45-11--o1-preview-flex-sr-markers
|
||||
test_cases: 133
|
||||
model: o1-preview
|
||||
_released: 2024-09-12
|
||||
edit_format: diff
|
||||
commit_hash: 5493654-dirty
|
||||
pass_rate_1: 57.9
|
||||
pass_rate_2: 79.7
|
||||
percent_cases_well_formed: 93.2
|
||||
error_outputs: 11
|
||||
num_malformed_responses: 11
|
||||
num_with_malformed_responses: 9
|
||||
user_asks: 3
|
||||
lazy_comments: 0
|
||||
syntax_errors: 10
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 0
|
||||
test_timeouts: 1
|
||||
command: aider --model o1-preview
|
||||
date: 2024-09-21
|
||||
versions: 0.56.1.dev
|
||||
seconds_per_case: 80.9
|
||||
total_cost: 63.9190
|
||||
21
aider/website/_includes/conflicts.md
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
## Avoid package conflicts
|
||||
|
||||
You can avoid python package conflicts by installing aider using
|
||||
[pipx](/docs/install/pipx.html)
|
||||
or
|
||||
[uv](/docs/install/uv.html).
|
||||
|
||||
If you are using aider to work on a python project, sometimes your project will require
|
||||
specific versions of python packages which conflict with the versions that aider
|
||||
requires.
|
||||
If this happens, the `python -m pip install aide-chat` command may return errors like these:
|
||||
|
||||
```
|
||||
aider-chat 0.23.0 requires somepackage==X.Y.Z, but you have somepackage U.W.V which is incompatible.
|
||||
```
|
||||
|
||||
which will install it globally on your system
|
||||
within its own python environment.
|
||||
This way you can use aider to work on any python project,
|
||||
even if that project has conflicting dependencies.
|
||||
185
aider/website/_includes/edit-leaderboard.js
Normal file
@@ -0,0 +1,185 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var ctx = document.getElementById('editChart').getContext('2d');
|
||||
const blueDiagonalPattern = pattern.draw('diagonal', 'rgba(54, 162, 235, 0.2)');
|
||||
const redDiagonalPattern = pattern.draw('diagonal', 'rgba(255, 99, 132, 0.2)');
|
||||
let displayedData = [];
|
||||
|
||||
const HIGHTLIGHT_MODEL = 'no no no';
|
||||
var leaderboardData = {
|
||||
labels: [],
|
||||
datasets: [{
|
||||
label: 'Percent completed correctly',
|
||||
data: [],
|
||||
backgroundColor: function(context) {
|
||||
const row = allData[context.dataIndex];
|
||||
if (row && row.edit_format === 'whole') {
|
||||
return diagonalPattern;
|
||||
}
|
||||
const label = leaderboardData.labels[context.dataIndex] || '';
|
||||
return (label && label.includes(HIGHTLIGHT_MODEL)) ? 'rgba(255, 99, 132, 0.2)' : 'rgba(54, 162, 235, 0.2)';
|
||||
},
|
||||
borderColor: function(context) {
|
||||
const label = context.chart.data.labels[context.dataIndex] || '';
|
||||
return (label && label.includes(HIGHTLIGHT_MODEL)) ? 'rgba(255, 99, 132, 1)' : 'rgba(54, 162, 235, 1)';
|
||||
},
|
||||
borderWidth: 1
|
||||
}]
|
||||
};
|
||||
|
||||
var allData = [];
|
||||
{% for row in edit_sorted %}
|
||||
allData.push({
|
||||
model: '{{ row.model }}',
|
||||
pass_rate_2: {{ row.pass_rate_2 }},
|
||||
percent_cases_well_formed: {{ row.percent_cases_well_formed }},
|
||||
edit_format: '{{ row.edit_format }}'
|
||||
});
|
||||
{% endfor %}
|
||||
|
||||
function updateChart() {
|
||||
var selectedRows = document.querySelectorAll('tr.selected');
|
||||
var showAll = selectedRows.length === 0;
|
||||
|
||||
displayedData = [];
|
||||
leaderboardData.labels = [];
|
||||
leaderboardData.datasets[0].data = [];
|
||||
|
||||
allData.forEach(function(row, index) {
|
||||
var rowElement = document.getElementById('edit-row-' + index);
|
||||
if (showAll) {
|
||||
rowElement.classList.remove('selected');
|
||||
}
|
||||
if (showAll || rowElement.classList.contains('selected')) {
|
||||
displayedData.push(row);
|
||||
leaderboardData.labels.push(row.model);
|
||||
leaderboardData.datasets[0].data.push(row.pass_rate_2);
|
||||
}
|
||||
});
|
||||
|
||||
leaderboardChart.update();
|
||||
leaderboardChart.render();
|
||||
}
|
||||
|
||||
// Use displayedData in the backgroundColor callback instead of allData
|
||||
leaderboardData.datasets[0].backgroundColor = function(context) {
|
||||
const row = displayedData[context.dataIndex];
|
||||
const label = leaderboardData.labels[context.dataIndex] || '';
|
||||
if (label && label.includes(HIGHTLIGHT_MODEL)) {
|
||||
if (row && row.edit_format === 'whole') return redDiagonalPattern;
|
||||
else return 'rgba(255, 99, 132, 0.2)';
|
||||
} else if (row && row.edit_format === 'whole') {
|
||||
return blueDiagonalPattern;
|
||||
} else {
|
||||
return 'rgba(54, 162, 235, 0.2)';
|
||||
}
|
||||
};
|
||||
|
||||
var tableBody = document.querySelector('table tbody');
|
||||
allData.forEach(function(row, index) {
|
||||
var tr = tableBody.children[index];
|
||||
tr.id = 'edit-row-' + index;
|
||||
tr.style.cursor = 'pointer';
|
||||
tr.onclick = function() {
|
||||
this.classList.toggle('selected');
|
||||
updateChart();
|
||||
};
|
||||
});
|
||||
|
||||
var leaderboardChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: leaderboardData,
|
||||
options: {
|
||||
plugins: {
|
||||
legend: {
|
||||
display: true,
|
||||
labels: {
|
||||
generateLabels: function(chart) {
|
||||
return [
|
||||
{
|
||||
text: 'Diff-like format',
|
||||
fillStyle: 'rgba(54, 162, 235, 0.2)',
|
||||
strokeStyle: 'rgba(54, 162, 235, 1)',
|
||||
lineWidth: 1
|
||||
},
|
||||
{
|
||||
text: 'Whole format',
|
||||
fillStyle: blueDiagonalPattern,
|
||||
strokeStyle: 'rgba(54, 162, 235, 1)',
|
||||
lineWidth: 1
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Percent completed correctly'
|
||||
}
|
||||
},
|
||||
x: {
|
||||
ticks: {
|
||||
callback: function(value, index) {
|
||||
const label = this.getLabelForValue(value);
|
||||
if (label.length <= "claude-3-5-sonnet".length) {
|
||||
return label;
|
||||
}
|
||||
|
||||
// Find all possible split positions
|
||||
const splitPositions = [];
|
||||
for (let i = 0; i < label.length; i++) {
|
||||
if (label[i] === '-' || label[i] === ' ') {
|
||||
splitPositions.push(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (splitPositions.length === 0) {
|
||||
return label;
|
||||
}
|
||||
|
||||
// Find split position closest to middle
|
||||
const middle = label.length / 2;
|
||||
const splitIndex = splitPositions.reduce((closest, current) => {
|
||||
return Math.abs(current - middle) < Math.abs(closest - middle) ? current : closest;
|
||||
});
|
||||
|
||||
return [
|
||||
label.slice(0, splitIndex),
|
||||
label.slice(splitIndex + 1)
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
updateChart();
|
||||
|
||||
// Add search functionality for edit table
|
||||
document.getElementById('editSearchInput').addEventListener('keyup', function() {
|
||||
var searchWords = this.value.toLowerCase().split(' ').filter(word => word.length > 0);
|
||||
var tableBody = document.querySelector('table:first-of-type tbody');
|
||||
var rows = tableBody.getElementsByTagName('tr');
|
||||
|
||||
displayedData = [];
|
||||
leaderboardData.labels = [];
|
||||
leaderboardData.datasets[0].data = [];
|
||||
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var rowText = rows[i].textContent;
|
||||
if (searchWords.every(word => rowText.toLowerCase().includes(word))) {
|
||||
rows[i].style.display = '';
|
||||
displayedData.push(allData[i]);
|
||||
leaderboardData.labels.push(allData[i].model);
|
||||
leaderboardData.datasets[0].data.push(allData[i].pass_rate_2);
|
||||
} else {
|
||||
rows[i].style.display = 'none';
|
||||
}
|
||||
}
|
||||
leaderboardChart.update();
|
||||
});
|
||||
});
|
||||
@@ -1,6 +1,5 @@
|
||||
{: .tip }
|
||||
All API keys can be stored in a
|
||||
[.env file](/docs/config/dotenv.html).
|
||||
Only OpenAI and Anthropic keys can be stored in the
|
||||
[YAML config file](/docs/config/aider_conf.html).
|
||||
[.env file](/docs/config/dotenv.html#storing-llm-keys)
|
||||
or in a [YAML config file](/docs/config/aider_conf.html#storing-llm-keys).
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
You can get started quickly like this:
|
||||
|
||||
```
|
||||
```bash
|
||||
python -m pip install -U aider-chat
|
||||
|
||||
# Change directory into a git repo
|
||||
|
||||
@@ -18,3 +18,63 @@
|
||||
<link rel="mask-icon" href="{{ '/assets/icons/safari-pinned-tab.svg' | relative_url }}" color="#5bbad5">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<!-- Cookie Consent -->
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script>
|
||||
<script>
|
||||
window.addEventListener('load', function(){
|
||||
window.cookieconsent.initialise({
|
||||
palette: {
|
||||
popup: {
|
||||
background: "#333333",
|
||||
text: "#ffffff"
|
||||
},
|
||||
button: {
|
||||
background: "#ffffff",
|
||||
text: "#333333"
|
||||
}
|
||||
},
|
||||
type: "opt-in",
|
||||
position: "bottom-left",
|
||||
showLink: false,
|
||||
dismissOnScroll: true,
|
||||
cookie: {
|
||||
name: 'cookieconsent_status',
|
||||
path: '/',
|
||||
domain: 'aider.chat',
|
||||
expiryDays: 365
|
||||
},
|
||||
content: {
|
||||
message: "This website uses analytics cookies to help us understand how you use the site.",
|
||||
dismiss: "Decline",
|
||||
allow: "Accept",
|
||||
link: "Learn more",
|
||||
href: "https://aider.chat/docs/legal/privacy.html"
|
||||
},
|
||||
onInitialise: function(status) {
|
||||
var type = this.options.type;
|
||||
var didConsent = this.hasConsented();
|
||||
if (didConsent) {
|
||||
initPostHog();
|
||||
}
|
||||
},
|
||||
onStatusChange: function(status, chosenBefore) {
|
||||
var type = this.options.type;
|
||||
var didConsent = this.hasConsented();
|
||||
if (didConsent) {
|
||||
initPostHog();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
// PostHog initialization function
|
||||
function initPostHog() {
|
||||
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init capture register register_once register_for_session unregister unregister_for_session getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey getNextSurveyStep identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty createPersonProfile opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing clear_opt_in_out_capturing debug".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
|
||||
posthog.init('phc_99T7muzafUMMZX15H8XePbMSreEUzahHbtWjy3l5Qbv', {
|
||||
api_host:'https://us.i.posthog.com',
|
||||
person_profiles: 'identified_only'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
0
aider/website/_includes/leaderboard.js
Normal file
@@ -1,5 +1,22 @@
|
||||
You can send long, multi-line messages in the chat in a few ways:
|
||||
- Paste a multi-line message directly into the chat.
|
||||
- Enter `{` alone on the first line to start a multiline message and `}` alone on the last line to end it.
|
||||
- Or, start with `{tag` (where "tag" is any sequence of letters/numbers) and end with `tag}`. This is useful when you need to include closing braces `}` in your message.
|
||||
- Use Meta-ENTER to start a new line without sending the message (Esc+ENTER in some environments).
|
||||
- Use `/paste` to paste text from the clipboard into the chat.
|
||||
- Use the `/editor` command to open your editor to create the next chat message. See [editor configuration docs](/docs/config/editor.html) for more info.
|
||||
- Use multiline-mode, which swaps the function of Meta-Enter and Enter, so that Enter inserts a newline, and Meta-Enter submits your command. To enable multiline mode:
|
||||
- Use the `/multiline-mode` command to toggle it during a session.
|
||||
- Use the `--multiline` switch.
|
||||
|
||||
Example with a tag:
|
||||
```
|
||||
{python
|
||||
def hello():
|
||||
print("Hello}") # Note: contains a brace
|
||||
python}
|
||||
```
|
||||
|
||||
{: .note }
|
||||
People often ask for SHIFT-ENTER to be a soft-newline.
|
||||
Unfortunately there is no portable way to detect that keystroke in terminals.
|
||||
|
||||
95
aider/website/_includes/quant-chart.js
Normal file
@@ -0,0 +1,95 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var ctx = document.getElementById('quantChart').getContext('2d');
|
||||
var allData = [];
|
||||
{% for row in site.data.quant %}
|
||||
allData.push({
|
||||
model: '{{ row.model }}',
|
||||
pass_rate_2: {{ row.pass_rate_2 }}
|
||||
});
|
||||
{% endfor %}
|
||||
|
||||
// Sort data by pass_rate_2 in descending order
|
||||
allData.sort((a, b) => b.pass_rate_2 - a.pass_rate_2);
|
||||
|
||||
var chart;
|
||||
|
||||
function updateChart(filterText) {
|
||||
var filteredData = allData.filter(row =>
|
||||
row.model.toLowerCase().includes(filterText.toLowerCase())
|
||||
);
|
||||
|
||||
var chartData = {
|
||||
labels: filteredData.map(row => row.model),
|
||||
datasets: [{
|
||||
label: 'Percent completed correctly',
|
||||
data: filteredData.map(row => row.pass_rate_2),
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||
borderColor: 'rgba(54, 162, 235, 1)',
|
||||
borderWidth: 1
|
||||
}]
|
||||
};
|
||||
|
||||
if (chart) {
|
||||
chart.data = chartData;
|
||||
chart.update();
|
||||
} else {
|
||||
chart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: chartData,
|
||||
options: {
|
||||
plugins: {
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Aider code editing benchmark',
|
||||
font: {
|
||||
size: 16
|
||||
}
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Percent completed correctly',
|
||||
font: {
|
||||
size: 14
|
||||
}
|
||||
},
|
||||
ticks: {
|
||||
font: {
|
||||
size: 16
|
||||
}
|
||||
}
|
||||
},
|
||||
x: {
|
||||
ticks: {
|
||||
font: {
|
||||
size: 16
|
||||
}
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Provider: quantization',
|
||||
font: {
|
||||
size: 14
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Initial chart render
|
||||
updateChart('');
|
||||
|
||||
// Connect search input to chart filtering
|
||||
document.getElementById('quantSearchInput').addEventListener('keyup', function() {
|
||||
updateChart(this.value);
|
||||
});
|
||||
});
|
||||
120
aider/website/_includes/qwq-chart.js
Normal file
@@ -0,0 +1,120 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var ctx = document.getElementById('qwqChart').getContext('2d');
|
||||
var allData = [];
|
||||
{% for row in site.data.qwq %}
|
||||
allData.push({
|
||||
model: '{{ row.model }}',
|
||||
pass_rate_2: {{ row.pass_rate_2 }}
|
||||
});
|
||||
{% endfor %}
|
||||
|
||||
// Sort data by pass_rate_2 in descending order
|
||||
allData.sort((a, b) => b.pass_rate_2 - a.pass_rate_2);
|
||||
|
||||
var chart;
|
||||
|
||||
function updateChart(filterText) {
|
||||
var filteredData = allData.filter(row =>
|
||||
row.model.toLowerCase().includes(filterText.toLowerCase())
|
||||
);
|
||||
|
||||
var chartData = {
|
||||
labels: filteredData.map(row => row.model),
|
||||
datasets: [{
|
||||
data: filteredData.map(row => row.pass_rate_2),
|
||||
backgroundColor: filteredData.map(row =>
|
||||
(row.model === 'Qwen2.5 Coder 32B-I' || row.model === 'Sonnet (SOTA)' || row.model === 'o1-mini' || row.model === 'o1-preview' || row.model === 'QwQ')
|
||||
? 'rgba(75, 192, 192, 0.2)' // Green for solo models
|
||||
: 'rgba(54, 162, 235, 0.2)' // Blue for architect+editor
|
||||
),
|
||||
borderColor: filteredData.map(row =>
|
||||
(row.model === 'Qwen2.5 Coder 32B-I' || row.model === 'Sonnet (SOTA)' || row.model === 'o1-mini' || row.model === 'o1-preview' || row.model === 'QwQ')
|
||||
? 'rgba(75, 192, 192, 1)' // Green border for solo models
|
||||
: 'rgba(54, 162, 235, 1)' // Blue border for architect+editor
|
||||
),
|
||||
borderWidth: 1
|
||||
}]
|
||||
};
|
||||
|
||||
if (chart) {
|
||||
chart.data = chartData;
|
||||
chart.update();
|
||||
} else {
|
||||
chart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: chartData,
|
||||
options: {
|
||||
plugins: {
|
||||
legend: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
labels: {
|
||||
font: {
|
||||
size: 14
|
||||
},
|
||||
generateLabels: function(chart) {
|
||||
return [
|
||||
{
|
||||
text: 'Solo model',
|
||||
fillStyle: 'rgba(75, 192, 192, 0.2)',
|
||||
strokeStyle: 'rgba(75, 192, 192, 1)',
|
||||
lineWidth: 1,
|
||||
fontColor: '#666'
|
||||
},
|
||||
{
|
||||
text: 'Architect + Editor',
|
||||
fillStyle: 'rgba(54, 162, 235, 0.2)',
|
||||
strokeStyle: 'rgba(54, 162, 235, 1)',
|
||||
lineWidth: 1,
|
||||
fontColor: '#666'
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Aider code editing benchmark (%)',
|
||||
font: {
|
||||
size: 18
|
||||
}
|
||||
},
|
||||
ticks: {
|
||||
font: {
|
||||
size: 16
|
||||
}
|
||||
}
|
||||
},
|
||||
x: {
|
||||
ticks: {
|
||||
font: {
|
||||
size: 16
|
||||
},
|
||||
callback: function(value, index) {
|
||||
const label = this.getLabelForValue(value);
|
||||
if (label.includes(" + ")) {
|
||||
const parts = label.split(" + ");
|
||||
return [parts[0] + " +", parts[1]];
|
||||
}
|
||||
return label;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Initial chart render
|
||||
updateChart('');
|
||||
|
||||
// Connect search input to chart filtering
|
||||
document.getElementById('qwqSearchInput').addEventListener('keyup', function() {
|
||||
updateChart(this.value);
|
||||
});
|
||||
});
|
||||
90
aider/website/_includes/refactor-leaderboard.js
Normal file
@@ -0,0 +1,90 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var ctx = document.getElementById('refacChart').getContext('2d');
|
||||
var leaderboardData = {
|
||||
labels: [],
|
||||
datasets: [{
|
||||
label: 'Percent completed correctly',
|
||||
data: [],
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||
borderColor: 'rgba(54, 162, 235, 1)',
|
||||
borderWidth: 1
|
||||
}]
|
||||
};
|
||||
|
||||
var allData = [];
|
||||
{% for row in refac_sorted %}
|
||||
allData.push({
|
||||
model: '{{ row.model }}',
|
||||
pass_rate_1: {{ row.pass_rate_1 }},
|
||||
percent_cases_well_formed: {{ row.percent_cases_well_formed }}
|
||||
});
|
||||
{% endfor %}
|
||||
|
||||
function updateChart() {
|
||||
var selectedRows = document.querySelectorAll('tr.selected');
|
||||
var showAll = selectedRows.length === 0;
|
||||
|
||||
leaderboardData.labels = [];
|
||||
leaderboardData.datasets[0].data = [];
|
||||
|
||||
allData.forEach(function(row, index) {
|
||||
var rowElement = document.getElementById('refac-row-' + index);
|
||||
if (showAll) {
|
||||
rowElement.classList.remove('selected');
|
||||
}
|
||||
if (showAll || rowElement.classList.contains('selected')) {
|
||||
leaderboardData.labels.push(row.model);
|
||||
leaderboardData.datasets[0].data.push(row.pass_rate_1);
|
||||
}
|
||||
});
|
||||
|
||||
leaderboardChart.update();
|
||||
}
|
||||
|
||||
var tableBody = document.querySelectorAll('table tbody')[1];
|
||||
allData.forEach(function(row, index) {
|
||||
var tr = tableBody.children[index];
|
||||
tr.id = 'refac-row-' + index;
|
||||
tr.style.cursor = 'pointer';
|
||||
tr.onclick = function() {
|
||||
this.classList.toggle('selected');
|
||||
updateChart();
|
||||
};
|
||||
});
|
||||
|
||||
var leaderboardChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: leaderboardData,
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
updateChart();
|
||||
|
||||
// Add search functionality for refactoring table
|
||||
document.getElementById('refacSearchInput').addEventListener('keyup', function() {
|
||||
var searchWords = this.value.toLowerCase().split(' ').filter(word => word.length > 0);
|
||||
var tableBody = document.querySelectorAll('table tbody')[1];
|
||||
var rows = tableBody.getElementsByTagName('tr');
|
||||
|
||||
leaderboardData.labels = [];
|
||||
leaderboardData.datasets[0].data = [];
|
||||
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var rowText = rows[i].textContent;
|
||||
if (searchWords.every(word => rowText.toLowerCase().includes(word))) {
|
||||
rows[i].style.display = '';
|
||||
leaderboardData.labels.push(allData[i].model);
|
||||
leaderboardData.datasets[0].data.push(allData[i].pass_rate_1);
|
||||
} else {
|
||||
rows[i].style.display = 'none';
|
||||
}
|
||||
}
|
||||
leaderboardChart.update();
|
||||
});
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
To use aider with pipx on replit, you can run these commands in the replit shell:
|
||||
|
||||
```
|
||||
```bash
|
||||
pip install pipx
|
||||
pipx run aider-chat ...normal aider args...
|
||||
```
|
||||
|
||||
@@ -1,12 +1,49 @@
|
||||
|
||||
Aider has special support for providing
|
||||
OpenAI and Anthropic API keys
|
||||
via
|
||||
[command line switches](/docs/config/options.html)
|
||||
and
|
||||
[yaml config file](/docs/config/aider_conf.html).
|
||||
*All other LLM providers* must
|
||||
have their keys and settings
|
||||
specified in environment variables.
|
||||
This can be done in your shell,
|
||||
or by using a
|
||||
[.env file](/docs/config/dotenv.html).
|
||||
via dedicated
|
||||
[command line switches](/docs/config/options.html#api-keys-and-settings)
|
||||
`--openai-api-key` and `--anthropic-api-key`.
|
||||
|
||||
You can also set those API keys via special entries in the
|
||||
[yaml config file](/docs/config/aider_conf.html), like this:
|
||||
|
||||
```yaml
|
||||
openai-api-key: <key>
|
||||
anthropic-api-key: <key>
|
||||
```
|
||||
|
||||
All other LLM providers can use one of the following methods to set their
|
||||
keys:
|
||||
|
||||
### API keys on the command line
|
||||
{: .no_toc }
|
||||
|
||||
Use `--api-key provider=<key>` which has the effect of setting the environment variable `PROVIDER_API_KEY=<key>`. So `--api-key gemini=xxx` would set `GEMINI_API_KEY=xxx`.
|
||||
|
||||
### API keys in a .env file
|
||||
{: .no_toc }
|
||||
|
||||
The [.env file](/docs/config/dotenv.html)
|
||||
is a great place to set API keys and other provider API environment variables:
|
||||
|
||||
```bash
|
||||
GEMINI_API_KEY=foo
|
||||
OPENROUTER_API_KEY=bar
|
||||
DEEPSEEK_API_KEY=baz
|
||||
```
|
||||
|
||||
### API keys in .aider.conf.yml
|
||||
{: .no_toc }
|
||||
|
||||
Or you can set API keys in the
|
||||
[`.aider.conf.yml` file](/docs/config/aider_conf.html)
|
||||
via the `api-key` entry:
|
||||
|
||||
```
|
||||
api-key:
|
||||
- gemini=foo # Sets env var GEMINI_API_KEY=foo
|
||||
- openrouter=bar # Sets env var OPENROUTER_API_KEY=bar
|
||||
- deepseek=baz # Sets env var DEEPSEEK_API_KEY=baz
|
||||
```
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{: .tip }
|
||||
Using a Python
|
||||
The best way to install aider is with
|
||||
[pipx](/docs/install/pipx.html)
|
||||
or
|
||||
[uv](/docs/install/uv.html)
|
||||
once for your whole system.
|
||||
Or, using a python
|
||||
[virtual environment](https://docs.python.org/3/library/venv.html){:target="_blank"}
|
||||
is recommended.
|
||||
Or, you could
|
||||
[use pipx to install aider](/docs/install/pipx.html)
|
||||
once for your whole system.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Aider has written 7% of its own code
|
||||
excerpt: Aider has written 7% of its own code, via 600+ commits that inserted 4.8K and deleted 1.5K lines of code.
|
||||
title: Aider has written 7% of its own code (outdated, now 70%)
|
||||
excerpt: This article is quite out dated. Aider is currently writing about 70% of the new code in each release.
|
||||
highlight_image: /assets/self-assembly.jpg
|
||||
nav_exclude: true
|
||||
---
|
||||
@@ -8,13 +8,16 @@ nav_exclude: true
|
||||
<p class="post-date">{{ page.date | date: "%B %d, %Y" }}</p>
|
||||
{% endif %}
|
||||
|
||||
# Aider has written 7% of its own code
|
||||
# Aider has written 7% of its own code (outdated, now 70%)
|
||||
|
||||
[](https://aider.chat/assets/self-assembly.jpg)
|
||||
|
||||
{: .note }
|
||||
This article is quite out dated. For current statistics, see
|
||||
[aider's release history](/HISTORY.html).
|
||||
This article is quite old and outdated.
|
||||
Aider is currently writing about 70% of the new code
|
||||
in each release.
|
||||
See
|
||||
[aider's release history](/HISTORY.html) for the latest statistics.
|
||||
|
||||
The
|
||||
[aider git repo](https://github.com/Aider-AI/aider)
|
||||
|
||||
194
aider/website/_posts/2024-11-21-quantization.md
Normal file
@@ -0,0 +1,194 @@
|
||||
---
|
||||
title: Details matter with open source models
|
||||
excerpt: Open source LLMs are becoming very powerful, but pay attention to how you (or your provider) are serving the model. It can affect code editing skill.
|
||||
highlight_image: /assets/quantization.jpg
|
||||
draft: false
|
||||
nav_exclude: true
|
||||
---
|
||||
{% if page.date %}
|
||||
<p class="post-date">{{ page.date | date: "%B %d, %Y" }}</p>
|
||||
{% endif %}
|
||||
|
||||
# Details matter with open source models
|
||||
{: .no_toc }
|
||||
|
||||
<canvas id="quantChart" width="800" height="600" style="margin: 20px 0"></canvas>
|
||||
|
||||
Open source models like Qwen 2.5 32B Instruct are performing very well on
|
||||
aider's code editing benchmark, rivaling closed source frontier models.
|
||||
|
||||
But pay attention to how your model is being served and quantized,
|
||||
as it can impact code editing skill.
|
||||
Open source models are often available at a variety of quantizations,
|
||||
and can be served with different token limits.
|
||||
These details matter when working with code.
|
||||
|
||||
The graph above and table below compares different versions of the Qwen 2.5 Coder 32B Instruct model,
|
||||
served both locally and from a variety of cloud providers.
|
||||
|
||||
- The [HuggingFace BF16 weights](https://huggingface.co/Qwen/Qwen2.5-Coder-32B-Instruct) served via [glhf.chat](https://glhf.chat).
|
||||
- [4bit and 8bit quants for mlx](https://t.co/cwX3DYX35D).
|
||||
- The results from [OpenRouter's mix of providers](https://openrouter.ai/qwen/qwen-2.5-coder-32b-instruct/providers) which serve the model with different levels of quantization.
|
||||
- Results from OpenRouter's providers, both served via OpenRouter and directly to their own APIs.
|
||||
- Ollama locally serving different quantizations from the [Ollama model library](https://ollama.com/library/qwen2.5-coder:32b-instruct-q4_K_M) with 8k+
|
||||
context windows.
|
||||
- An Ollama fp16 quantization served with Ollama's default 2k context window.
|
||||
|
||||
### Pitfalls and details
|
||||
|
||||
This benchmarking effort highlighted a number of pitfalls and details specific to open source
|
||||
models which
|
||||
can have a significant impact on their ability to correctly edit code:
|
||||
|
||||
- **Quantization** -- Open source models are often available at dozens of different quantizations.
|
||||
Most seem to only modestly decrease code editing skill, but stronger quantizations
|
||||
do have a real impact.
|
||||
- **Context window** -- Cloud providers can decide how large a context window to accept,
|
||||
and they often choose differently. Ollama's local API server
|
||||
defaults to a tiny 2k context window,
|
||||
and silently discards data that exceeds it. Such a small window has
|
||||
catastrophic effects on performance, without throwing obvious hard errors.
|
||||
- **Output token limits** -- Open source models are often served with wildly
|
||||
differing output token limits. This has a direct impact on how much code the
|
||||
model can write or edit in a response.
|
||||
- **Buggy cloud providers** -- While benchmarking Qwen 2.5 Coder 32B Instruct
|
||||
and DeepSeek V2.5, I discovered
|
||||
multiple cloud providers with broken or buggy API endpoints.
|
||||
They seemed
|
||||
to be returning results different from expected based on the advertised
|
||||
quantization and context sizes.
|
||||
The harm caused to the code editing benchmark varied from serious
|
||||
to catastrophic.
|
||||
One provider scored 0.5% on the benchmark with DeepSeek V2.5, a highly capable model.
|
||||
|
||||
Closed source, proprietary models don't typically have these issues.
|
||||
They are owned and operated by the organization that created them,
|
||||
and typically served with specific, predictable context window and output token limits.
|
||||
Their quantization level is usually unknown, but fixed and unchanging for all users.
|
||||
|
||||
### Conclusions
|
||||
|
||||
The best versions of the Qwen model rival GPT-4o, while the worst performing
|
||||
quantization is more like the older GPT-4 Turbo when served competently.
|
||||
Even an otherwise excellent fp16 quantization falls to GPT-3.5 Turbo levels of performance
|
||||
if run with Ollama's default 2k context window.
|
||||
|
||||
### Sections
|
||||
{: .no_toc }
|
||||
|
||||
- TOC
|
||||
{:toc}
|
||||
|
||||
## Benchmark results
|
||||
|
||||
{: .note :}
|
||||
These are results from single benchmark runs, so expect normal variance of +/- 1-2%.
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script>
|
||||
{% include quant-chart.js %}
|
||||
</script>
|
||||
|
||||
<input type="text" id="quantSearchInput" placeholder="Search..." style="width: 100%; max-width: 800px; margin: 10px auto; padding: 8px; display: block; border: 1px solid #ddd; border-radius: 4px;">
|
||||
|
||||
<table style="width: 100%; max-width: 800px; margin: auto; border-collapse: collapse; box-shadow: 0 2px 4px rgba(0,0,0,0.1); font-size: 14px;">
|
||||
<thead style="background-color: #f2f2f2;">
|
||||
<tr>
|
||||
<th style="padding: 8px; text-align: left;">Model</th>
|
||||
<th style="padding: 8px; text-align: center;">Percent completed correctly</th>
|
||||
<th style="padding: 8px; text-align: center;">Percent using correct edit format</th>
|
||||
<th style="padding: 8px; text-align: left;">Command</th>
|
||||
<th style="padding: 8px; text-align: center;">Edit format</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% assign quant_sorted = site.data.quant | sort: 'pass_rate_2' | reverse %}
|
||||
{% for row in quant_sorted %}
|
||||
<tr style="border-bottom: 1px solid #ddd;">
|
||||
<td style="padding: 8px;">{{ row.model }}</td>
|
||||
<td style="padding: 8px; text-align: center;">{{ row.pass_rate_2 }}%</td>
|
||||
<td style="padding: 8px; text-align: center;">{{ row.percent_cases_well_formed }}%</td>
|
||||
<td style="padding: 8px;"><code>{{ row.command }}</code></td>
|
||||
<td style="padding: 8px; text-align: center;">{{ row.edit_format }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<style>
|
||||
tr.selected {
|
||||
color: #0056b3;
|
||||
}
|
||||
table {
|
||||
table-layout: fixed;
|
||||
}
|
||||
td, th {
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
td:nth-child(3), td:nth-child(4) {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
document.getElementById('quantSearchInput').addEventListener('keyup', function() {
|
||||
var input = this.value.toLowerCase();
|
||||
var rows = document.querySelectorAll('tbody tr');
|
||||
|
||||
rows.forEach(function(row) {
|
||||
var text = row.textContent.toLowerCase();
|
||||
if(text.includes(input)) {
|
||||
row.style.display = '';
|
||||
row.classList.add('selected');
|
||||
} else {
|
||||
row.style.display = 'none';
|
||||
row.classList.remove('selected');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
## Setting Ollama's context window size
|
||||
|
||||
[Ollama uses a 2k context window by default](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-specify-the-context-window-size),
|
||||
which is very small for working with aider.
|
||||
Unlike most other LLM servers, Ollama does not throw an error if you submit
|
||||
a request that exceeds the context window.
|
||||
Instead, it just silently truncates the request by discarding the "oldest" messages
|
||||
in the chat to make it fit within the context window.
|
||||
|
||||
Except for the single 2k context result,
|
||||
all of the Ollama results above were collected with at least an 8k context window.
|
||||
An 8k window is large enough to attempt all the coding problems in the benchmark.
|
||||
Aider sets Ollama's context window to 8k by default, starting in aider v0.65.0.
|
||||
|
||||
You can change the Ollama server's context window with a
|
||||
[`.aider.model.settings.yml` file](https://aider.chat/docs/config/adv-model-settings.html#model-settings)
|
||||
like this:
|
||||
|
||||
```
|
||||
- name: ollama/qwen2.5-coder:32b-instruct-fp16
|
||||
extra_params:
|
||||
num_ctx: 8192
|
||||
```
|
||||
|
||||
## Choosing providers with OpenRouter
|
||||
|
||||
OpenRouter allows you to ignore specific providers in your
|
||||
[preferences](https://openrouter.ai/settings/preferences).
|
||||
This can be used to limit your OpenRouter requests to be
|
||||
served by only your preferred providers.
|
||||
|
||||
## Notes
|
||||
|
||||
This article went through many revisions as I received feedback from
|
||||
numerous members of the community.
|
||||
Here are some of the noteworthy learnings and changes:
|
||||
|
||||
- The first version of this article included incorrect Ollama models.
|
||||
- Earlier Ollama results used the too small default 2k context window,
|
||||
artificially harming the benchmark results.
|
||||
- The benchmark results appear to have uncovered a problem in the way
|
||||
OpenRouter was communicating with Hyperbolic.
|
||||
They fixed the issue 11/24/24, shortly after it was pointed out.
|
||||
140
aider/website/_posts/2024-12-03-qwq.md
Normal file
@@ -0,0 +1,140 @@
|
||||
---
|
||||
title: QwQ is a code architect, not an editor
|
||||
excerpt: QwQ is reasoning model like o1, and needs to be used as an architect with another model as editor.
|
||||
highlight_image: /assets/qwq.jpg
|
||||
draft: false
|
||||
nav_exclude: true
|
||||
---
|
||||
{% if page.date %}
|
||||
<p class="post-date">{{ page.date | date: "%B %d, %Y" }}</p>
|
||||
{% endif %}
|
||||
|
||||
# QwQ is a code architect, not an editor
|
||||
{: .no_toc }
|
||||
|
||||
<canvas id="qwqChart" width="800" height="500" style="margin: 20px 0"></canvas>
|
||||
|
||||
QwQ 32B Preview is a "reasoning" model, which spends a lot of tokens thinking before
|
||||
rendering a final response.
|
||||
This is similar to OpenAI's o1 models, which are most effective with aider
|
||||
[when paired as an architect with a traditional LLM as an editor](https://aider.chat/2024/09/26/architect.html).
|
||||
In this mode, the reasoning model acts as an "architect" to propose a solution to the
|
||||
coding problem without regard for how to actually make edits to the source files.
|
||||
The "editor" model receives that proposal, and focuses solely on how to
|
||||
edit the existing source code to implement it.
|
||||
|
||||
Used alone without being paired with an editor,
|
||||
QwQ was unable to comply with even the simplest
|
||||
[editing format](https://aider.chat/docs/more/edit-formats.html).
|
||||
It was not able to reliably edit source code files.
|
||||
As a result, QwQ's solo score on the benchmark was quite underwhelming
|
||||
(and far worse than the o1 models performing solo).
|
||||
|
||||
QwQ is based on
|
||||
Qwen 2.5 Coder 32B Instruct,
|
||||
and does better when paired with it as an architect + editor combo.
|
||||
Though this provided only a modest benchmark improvement over just using Qwen alone,
|
||||
and comes with a fairly high cost in terms of latency.
|
||||
Each request must wait for QwQ to return all its thinking text
|
||||
and the final solution proposal.
|
||||
And then one must wait for Qwen to turn that large
|
||||
response into actual file edits.
|
||||
|
||||
Pairing QwQ with other sensible editor models performed the same or worse than
|
||||
just using Qwen 2.5 Coder 32B Instruct alone.
|
||||
|
||||
QwQ+Qwen seems to be the best way to use QwQ, achieving a score of 74%.
|
||||
That is well below the
|
||||
SOTA results for this benchmark: Sonnet alone scores 84%, and
|
||||
o1-preview + o1-mini as architect + editor scores 85%.
|
||||
|
||||
|
||||
## QwQ specific editing formats
|
||||
|
||||
I spent some time experimenting with a variety of custom editing formats
|
||||
for QwQ.
|
||||
In particular, I tried to parse the QwQ response and discard the long
|
||||
sections of "thinking" and retain only the "final" solution.
|
||||
None of this custom work seemed to translate
|
||||
into any significant improvement in the benchmark results.
|
||||
|
||||
|
||||
## Results
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script>
|
||||
{% include qwq-chart.js %}
|
||||
</script>
|
||||
|
||||
<table style="width: 100%; max-width: 800px; margin: auto; border-collapse: collapse; box-shadow: 0 2px 4px rgba(0,0,0,0.1); font-size: 14px;">
|
||||
<thead style="background-color: #f2f2f2;">
|
||||
<tr>
|
||||
<th style="padding: 8px; text-align: left;">Model</th>
|
||||
<th style="padding: 8px; text-align: center;">Percent completed correctly</th>
|
||||
<th style="padding: 8px; text-align: center;">Percent using correct edit format</th>
|
||||
<th style="padding: 8px; text-align: left;">Command</th>
|
||||
<th style="padding: 8px; text-align: center;">Edit format</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% assign qwq_sorted = site.data.qwq | sort: 'pass_rate_2' | reverse %}
|
||||
{% for row in qwq_sorted %}
|
||||
<tr style="border-bottom: 1px solid #ddd;">
|
||||
<td style="padding: 8px;">{{ row.model }}</td>
|
||||
<td style="padding: 8px; text-align: center;">{{ row.pass_rate_2 }}%</td>
|
||||
<td style="padding: 8px; text-align: center;">{{ row.percent_cases_well_formed }}%</td>
|
||||
<td style="padding: 8px;"><code>{{ row.command }}</code></td>
|
||||
<td style="padding: 8px; text-align: center;">{{ row.edit_format }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<style>
|
||||
tr.selected {
|
||||
color: #0056b3;
|
||||
}
|
||||
table {
|
||||
table-layout: fixed;
|
||||
}
|
||||
td, th {
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
td:nth-child(3), td:nth-child(4) {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
document.getElementById('qwqSearchInput').addEventListener('keyup', function() {
|
||||
var input = this.value.toLowerCase();
|
||||
var rows = document.querySelectorAll('tbody tr');
|
||||
|
||||
rows.forEach(function(row) {
|
||||
var text = row.textContent.toLowerCase();
|
||||
if(text.includes(input)) {
|
||||
row.style.display = '';
|
||||
row.classList.add('selected');
|
||||
} else {
|
||||
row.style.display = 'none';
|
||||
row.classList.remove('selected');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
## Open source model caveats
|
||||
|
||||
As discussed in a recent blog post,
|
||||
[details matter with open source models](https://aider.chat/2024/11/21/quantization.html).
|
||||
For clarity, new benchmark runs for this article were
|
||||
performed against OpenRouter's endpoints for
|
||||
QwQ 32B Preview and Qwen 2.5 Coder 32B Instruct.
|
||||
For the other models, the benchmark was direct to their providers' APIs.
|
||||
|
||||
Having recently done extensive testing of OpenRouter's Qwen 2.5 Coder 32B Instruct endpoint,
|
||||
it seems reliable.
|
||||
The provider Mancer was blocked due to the small context window it provides.
|
||||
|
||||
For QwQ 32B Preview, Fireworks was blocked because of its small context window.
|
||||
BIN
aider/website/assets/copypaste.jpg
Normal file
|
After Width: | Height: | Size: 314 KiB |
BIN
aider/website/assets/copypaste.mp4
Normal file
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 59 KiB |
BIN
aider/website/assets/quantization.jpg
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
aider/website/assets/qwq.jpg
Normal file
|
After Width: | Height: | Size: 115 KiB |
@@ -14,14 +14,8 @@
|
||||
## show this help message and exit
|
||||
#help: xxx
|
||||
|
||||
#######
|
||||
# Main:
|
||||
|
||||
## Specify the OpenAI API key
|
||||
#openai-api-key: xxx
|
||||
|
||||
## Specify the Anthropic API key
|
||||
#anthropic-api-key: xxx
|
||||
#############
|
||||
# Main model:
|
||||
|
||||
## Specify the model to use for the main chat
|
||||
#model: xxx
|
||||
@@ -38,7 +32,7 @@
|
||||
## Use gpt-4-0613 model for the main chat
|
||||
#4: false
|
||||
|
||||
## Use gpt-4o-2024-08-06 model for the main chat
|
||||
## Use gpt-4o model for the main chat
|
||||
#4o: false
|
||||
|
||||
## Use gpt-4o-mini model for the main chat
|
||||
@@ -59,36 +53,72 @@
|
||||
## Use o1-preview model for the main chat
|
||||
#o1-preview: false
|
||||
|
||||
#################
|
||||
# Model Settings:
|
||||
########################
|
||||
# API Keys and settings:
|
||||
|
||||
## List known models which match the (partial) MODEL name
|
||||
#list-models: xxx
|
||||
## Specify the OpenAI API key
|
||||
#openai-api-key: xxx
|
||||
|
||||
## Specify the Anthropic API key
|
||||
#anthropic-api-key: xxx
|
||||
|
||||
## Specify the api base url
|
||||
#openai-api-base: xxx
|
||||
|
||||
## Specify the api_type
|
||||
## (deprecated, use --set-env OPENAI_API_TYPE=<value>)
|
||||
#openai-api-type: xxx
|
||||
|
||||
## Specify the api_version
|
||||
## (deprecated, use --set-env OPENAI_API_VERSION=<value>)
|
||||
#openai-api-version: xxx
|
||||
|
||||
## Specify the deployment_id
|
||||
## (deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)
|
||||
#openai-api-deployment-id: xxx
|
||||
|
||||
## Specify the OpenAI organization ID
|
||||
## (deprecated, use --set-env OPENAI_ORGANIZATION=<value>)
|
||||
#openai-organization-id: xxx
|
||||
|
||||
## Set an environment variable (to control API settings, can be used multiple times)
|
||||
#set-env: xxx
|
||||
## Specify multiple values like this:
|
||||
#set-env:
|
||||
# - xxx
|
||||
# - yyy
|
||||
# - zzz
|
||||
|
||||
## Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
|
||||
#api-key: xxx
|
||||
## Specify multiple values like this:
|
||||
#api-key:
|
||||
# - xxx
|
||||
# - yyy
|
||||
# - zzz
|
||||
|
||||
#################
|
||||
# Model settings:
|
||||
|
||||
## List known models which match the (partial) MODEL name
|
||||
#list-models: xxx
|
||||
|
||||
## Specify a file with aider model settings for unknown models
|
||||
#model-settings-file: .aider.model.settings.yml
|
||||
|
||||
## Specify a file with context window and costs for unknown models
|
||||
#model-metadata-file: .aider.model.metadata.json
|
||||
|
||||
## Add a model alias (can be used multiple times)
|
||||
#alias: xxx
|
||||
## Specify multiple values like this:
|
||||
#alias:
|
||||
# - xxx
|
||||
# - yyy
|
||||
# - zzz
|
||||
|
||||
## Verify the SSL cert when connecting to models (default: True)
|
||||
#verify-ssl: true
|
||||
|
||||
## Timeout in seconds for API calls (default: None)
|
||||
#timeout: xxx
|
||||
|
||||
## Specify what edit format the LLM should use (default depends on model)
|
||||
#edit-format: xxx
|
||||
|
||||
@@ -110,11 +140,8 @@
|
||||
## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.
|
||||
#max-chat-history-tokens: xxx
|
||||
|
||||
## Specify the .env file to load (default: .env in git root)
|
||||
#env-file: .env
|
||||
|
||||
#################
|
||||
# Cache Settings:
|
||||
# Cache settings:
|
||||
|
||||
## Enable caching of prompts (default: False)
|
||||
#cache-prompts: false
|
||||
@@ -123,7 +150,7 @@
|
||||
#cache-keepalive-pings: false
|
||||
|
||||
###################
|
||||
# Repomap Settings:
|
||||
# Repomap settings:
|
||||
|
||||
## Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)
|
||||
#map-tokens: xxx
|
||||
@@ -150,7 +177,7 @@
|
||||
#llm-history-file: xxx
|
||||
|
||||
##################
|
||||
# Output Settings:
|
||||
# Output settings:
|
||||
|
||||
## Use colors suitable for a dark terminal background (default: False)
|
||||
#dark-mode: false
|
||||
@@ -198,7 +225,7 @@
|
||||
#show-diffs: false
|
||||
|
||||
###############
|
||||
# Git Settings:
|
||||
# Git settings:
|
||||
|
||||
## Enable/disable looking for a git repo (default: True)
|
||||
#git: true
|
||||
@@ -242,6 +269,9 @@
|
||||
## Skip the sanity check for the git repository (default: False)
|
||||
#skip-sanity-check-repo: false
|
||||
|
||||
## Enable/disable watching files for ai coding comments (default: False)
|
||||
#watch-files: false
|
||||
|
||||
########################
|
||||
# Fixing and committing:
|
||||
|
||||
@@ -265,14 +295,14 @@
|
||||
## Enable/disable automatic testing after changes (default: False)
|
||||
#auto-test: false
|
||||
|
||||
## Run tests and fix problems found
|
||||
## Run tests, fix problems found and then exit
|
||||
#test: false
|
||||
|
||||
############
|
||||
# Analytics:
|
||||
|
||||
## Enable/disable analytics for one session (default: False)
|
||||
#analytics: false
|
||||
## Enable/disable analytics for current session (default: random)
|
||||
#analytics: xxx
|
||||
|
||||
## Specify a file to log analytics events
|
||||
#analytics-log: xxx
|
||||
@@ -280,8 +310,71 @@
|
||||
## Permanently disable analytics
|
||||
#analytics-disable: false
|
||||
|
||||
############
|
||||
# Upgrading:
|
||||
|
||||
## Check for updates and return status in the exit code
|
||||
#just-check-update: false
|
||||
|
||||
## Check for new aider versions on launch
|
||||
#check-update: true
|
||||
|
||||
## Show release notes on first run of new version (default: None, ask user)
|
||||
#show-release-notes: xxx
|
||||
|
||||
## Install the latest version from the main branch
|
||||
#install-main-branch: false
|
||||
|
||||
## Upgrade aider to the latest version from PyPI
|
||||
#upgrade: false
|
||||
|
||||
## Show the version number and exit
|
||||
#version: xxx
|
||||
|
||||
########
|
||||
# Modes:
|
||||
|
||||
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
|
||||
#message: xxx
|
||||
|
||||
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
|
||||
#message-file: xxx
|
||||
|
||||
## Run aider in your browser (default: False)
|
||||
#gui: false
|
||||
|
||||
## Enable automatic copy/paste of chat between aider and web UI (default: False)
|
||||
#copy-paste: false
|
||||
|
||||
## Apply the changes from the given file instead of running the chat (debug)
|
||||
#apply: xxx
|
||||
|
||||
## Apply clipboard contents as edits using the main model's editor format
|
||||
#apply-clipboard-edits: false
|
||||
|
||||
## Do all startup activities then exit before accepting user input (debug)
|
||||
#exit: false
|
||||
|
||||
## Print the repo map and exit (debug)
|
||||
#show-repo-map: false
|
||||
|
||||
## Print the system prompts and exit (debug)
|
||||
#show-prompts: false
|
||||
|
||||
#################
|
||||
# Other Settings:
|
||||
# Voice settings:
|
||||
|
||||
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
|
||||
#voice-format: wav
|
||||
|
||||
## Specify the language for voice using ISO 639-1 code (default: auto)
|
||||
#voice-language: en
|
||||
|
||||
## Specify the input device name for voice recording
|
||||
#voice-input-device: xxx
|
||||
|
||||
#################
|
||||
# Other settings:
|
||||
|
||||
## specify a file to edit (can be used multiple times)
|
||||
#file: xxx
|
||||
@@ -305,48 +398,12 @@
|
||||
## Specify the language to use in the chat (default: None, uses system settings)
|
||||
#chat-language: xxx
|
||||
|
||||
## Show the version number and exit
|
||||
#version: xxx
|
||||
|
||||
## Check for updates and return status in the exit code
|
||||
#just-check-update: false
|
||||
|
||||
## Check for new aider versions on launch
|
||||
#check-update: true
|
||||
|
||||
## Install the latest version from the main branch
|
||||
#install-main-branch: false
|
||||
|
||||
## Upgrade aider to the latest version from PyPI
|
||||
#upgrade: false
|
||||
|
||||
## Apply the changes from the given file instead of running the chat (debug)
|
||||
#apply: xxx
|
||||
|
||||
## Apply clipboard contents as edits using the main model's editor format
|
||||
#apply-clipboard-edits: false
|
||||
|
||||
## Always say yes to every confirmation
|
||||
#yes-always: false
|
||||
|
||||
## Enable verbose output
|
||||
#verbose: false
|
||||
|
||||
## Print the repo map and exit (debug)
|
||||
#show-repo-map: false
|
||||
|
||||
## Print the system prompts and exit (debug)
|
||||
#show-prompts: false
|
||||
|
||||
## Do all startup activities then exit before accepting user input (debug)
|
||||
#exit: false
|
||||
|
||||
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
|
||||
#message: xxx
|
||||
|
||||
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
|
||||
#message-file: xxx
|
||||
|
||||
## Load and execute /commands from a file on launch
|
||||
#load: xxx
|
||||
|
||||
@@ -356,8 +413,8 @@
|
||||
## Specify the config file (default: search for .aider.conf.yml in git root, cwd or home directory)
|
||||
#config: xxx
|
||||
|
||||
## Run aider in your browser (default: False)
|
||||
#gui: false
|
||||
## Specify the .env file to load (default: .env in git root)
|
||||
#env-file: .env
|
||||
|
||||
## Enable/disable suggesting shell commands (default: True)
|
||||
#suggest-shell-commands: true
|
||||
@@ -365,11 +422,11 @@
|
||||
## Enable/disable fancy input with history and completion (default: True)
|
||||
#fancy-input: true
|
||||
|
||||
#################
|
||||
# Voice Settings:
|
||||
## Enable/disable multi-line input mode with Meta-Enter to submit (default: False)
|
||||
#multiline: false
|
||||
|
||||
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
|
||||
#voice-format: wav
|
||||
## Enable/disable detection and offering to add URLs to chat (default: True)
|
||||
#detect-urls: true
|
||||
|
||||
## Specify the language for voice using ISO 639-1 code (default: auto)
|
||||
#voice-language: en
|
||||
## Specify which editor to use for the /editor command
|
||||
#editor: xxx
|
||||
|
||||
@@ -18,14 +18,8 @@
|
||||
|
||||
##...
|
||||
|
||||
#######
|
||||
# Main:
|
||||
|
||||
## Specify the OpenAI API key
|
||||
#OPENAI_API_KEY=
|
||||
|
||||
## Specify the Anthropic API key
|
||||
#ANTHROPIC_API_KEY=
|
||||
#############
|
||||
# Main model:
|
||||
|
||||
## Specify the model to use for the main chat
|
||||
#AIDER_MODEL=
|
||||
@@ -42,7 +36,7 @@
|
||||
## Use gpt-4-0613 model for the main chat
|
||||
#AIDER_4=
|
||||
|
||||
## Use gpt-4o-2024-08-06 model for the main chat
|
||||
## Use gpt-4o model for the main chat
|
||||
#AIDER_4O=
|
||||
|
||||
## Use gpt-4o-mini model for the main chat
|
||||
@@ -63,36 +57,57 @@
|
||||
## Use o1-preview model for the main chat
|
||||
#AIDER_O1_PREVIEW=
|
||||
|
||||
########################
|
||||
# API Keys and settings:
|
||||
|
||||
## Specify the OpenAI API key
|
||||
#AIDER_OPENAI_API_KEY=
|
||||
|
||||
## Specify the Anthropic API key
|
||||
#AIDER_ANTHROPIC_API_KEY=
|
||||
|
||||
## Specify the api base url
|
||||
#AIDER_OPENAI_API_BASE=
|
||||
|
||||
## (deprecated, use --set-env OPENAI_API_TYPE=<value>)
|
||||
#AIDER_OPENAI_API_TYPE=
|
||||
|
||||
## (deprecated, use --set-env OPENAI_API_VERSION=<value>)
|
||||
#AIDER_OPENAI_API_VERSION=
|
||||
|
||||
## (deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)
|
||||
#AIDER_OPENAI_API_DEPLOYMENT_ID=
|
||||
|
||||
## (deprecated, use --set-env OPENAI_ORGANIZATION=<value>)
|
||||
#AIDER_OPENAI_ORGANIZATION_ID=
|
||||
|
||||
## Set an environment variable (to control API settings, can be used multiple times)
|
||||
#AIDER_SET_ENV=
|
||||
|
||||
## Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
|
||||
#AIDER_API_KEY=
|
||||
|
||||
#################
|
||||
# Model Settings:
|
||||
# Model settings:
|
||||
|
||||
## List known models which match the (partial) MODEL name
|
||||
#AIDER_LIST_MODELS=
|
||||
|
||||
## Specify the api base url
|
||||
#OPENAI_API_BASE=
|
||||
|
||||
## Specify the api_type
|
||||
#OPENAI_API_TYPE=
|
||||
|
||||
## Specify the api_version
|
||||
#OPENAI_API_VERSION=
|
||||
|
||||
## Specify the deployment_id
|
||||
#OPENAI_API_DEPLOYMENT_ID=
|
||||
|
||||
## Specify the OpenAI organization ID
|
||||
#OPENAI_ORGANIZATION_ID=
|
||||
|
||||
## Specify a file with aider model settings for unknown models
|
||||
#AIDER_MODEL_SETTINGS_FILE=.aider.model.settings.yml
|
||||
|
||||
## Specify a file with context window and costs for unknown models
|
||||
#AIDER_MODEL_METADATA_FILE=.aider.model.metadata.json
|
||||
|
||||
## Add a model alias (can be used multiple times)
|
||||
#AIDER_ALIAS=
|
||||
|
||||
## Verify the SSL cert when connecting to models (default: True)
|
||||
#AIDER_VERIFY_SSL=true
|
||||
|
||||
## Timeout in seconds for API calls (default: None)
|
||||
#AIDER_TIMEOUT=
|
||||
|
||||
## Specify what edit format the LLM should use (default depends on model)
|
||||
#AIDER_EDIT_FORMAT=
|
||||
|
||||
@@ -114,11 +129,8 @@
|
||||
## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.
|
||||
#AIDER_MAX_CHAT_HISTORY_TOKENS=
|
||||
|
||||
## Specify the .env file to load (default: .env in git root)
|
||||
#AIDER_ENV_FILE=.env
|
||||
|
||||
#################
|
||||
# Cache Settings:
|
||||
# Cache settings:
|
||||
|
||||
## Enable caching of prompts (default: False)
|
||||
#AIDER_CACHE_PROMPTS=false
|
||||
@@ -127,7 +139,7 @@
|
||||
#AIDER_CACHE_KEEPALIVE_PINGS=false
|
||||
|
||||
###################
|
||||
# Repomap Settings:
|
||||
# Repomap settings:
|
||||
|
||||
## Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)
|
||||
#AIDER_MAP_TOKENS=
|
||||
@@ -154,7 +166,7 @@
|
||||
#AIDER_LLM_HISTORY_FILE=
|
||||
|
||||
##################
|
||||
# Output Settings:
|
||||
# Output settings:
|
||||
|
||||
## Use colors suitable for a dark terminal background (default: False)
|
||||
#AIDER_DARK_MODE=false
|
||||
@@ -202,7 +214,7 @@
|
||||
#AIDER_SHOW_DIFFS=false
|
||||
|
||||
###############
|
||||
# Git Settings:
|
||||
# Git settings:
|
||||
|
||||
## Enable/disable looking for a git repo (default: True)
|
||||
#AIDER_GIT=true
|
||||
@@ -246,6 +258,9 @@
|
||||
## Skip the sanity check for the git repository (default: False)
|
||||
#AIDER_SKIP_SANITY_CHECK_REPO=false
|
||||
|
||||
## Enable/disable watching files for ai coding comments (default: False)
|
||||
#AIDER_WATCH_FILES=false
|
||||
|
||||
########################
|
||||
# Fixing and committing:
|
||||
|
||||
@@ -264,14 +279,14 @@
|
||||
## Enable/disable automatic testing after changes (default: False)
|
||||
#AIDER_AUTO_TEST=false
|
||||
|
||||
## Run tests and fix problems found
|
||||
## Run tests, fix problems found and then exit
|
||||
#AIDER_TEST=false
|
||||
|
||||
############
|
||||
# Analytics:
|
||||
|
||||
## Enable/disable analytics for one session (default: False)
|
||||
#AIDER_ANALYTICS=false
|
||||
## Enable/disable analytics for current session (default: random)
|
||||
#AIDER_ANALYTICS=
|
||||
|
||||
## Specify a file to log analytics events
|
||||
#AIDER_ANALYTICS_LOG=
|
||||
@@ -279,8 +294,68 @@
|
||||
## Permanently disable analytics
|
||||
#AIDER_ANALYTICS_DISABLE=false
|
||||
|
||||
############
|
||||
# Upgrading:
|
||||
|
||||
## Check for updates and return status in the exit code
|
||||
#AIDER_JUST_CHECK_UPDATE=false
|
||||
|
||||
## Check for new aider versions on launch
|
||||
#AIDER_CHECK_UPDATE=true
|
||||
|
||||
## Show release notes on first run of new version (default: None, ask user)
|
||||
#AIDER_SHOW_RELEASE_NOTES=
|
||||
|
||||
## Install the latest version from the main branch
|
||||
#AIDER_INSTALL_MAIN_BRANCH=false
|
||||
|
||||
## Upgrade aider to the latest version from PyPI
|
||||
#AIDER_UPGRADE=false
|
||||
|
||||
########
|
||||
# Modes:
|
||||
|
||||
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
|
||||
#AIDER_MESSAGE=
|
||||
|
||||
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
|
||||
#AIDER_MESSAGE_FILE=
|
||||
|
||||
## Run aider in your browser (default: False)
|
||||
#AIDER_GUI=false
|
||||
|
||||
## Enable automatic copy/paste of chat between aider and web UI (default: False)
|
||||
#AIDER_COPY_PASTE=false
|
||||
|
||||
## Apply the changes from the given file instead of running the chat (debug)
|
||||
#AIDER_APPLY=
|
||||
|
||||
## Apply clipboard contents as edits using the main model's editor format
|
||||
#AIDER_APPLY_CLIPBOARD_EDITS=false
|
||||
|
||||
## Do all startup activities then exit before accepting user input (debug)
|
||||
#AIDER_EXIT=false
|
||||
|
||||
## Print the repo map and exit (debug)
|
||||
#AIDER_SHOW_REPO_MAP=false
|
||||
|
||||
## Print the system prompts and exit (debug)
|
||||
#AIDER_SHOW_PROMPTS=false
|
||||
|
||||
#################
|
||||
# Other Settings:
|
||||
# Voice settings:
|
||||
|
||||
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
|
||||
#AIDER_VOICE_FORMAT=wav
|
||||
|
||||
## Specify the language for voice using ISO 639-1 code (default: auto)
|
||||
#AIDER_VOICE_LANGUAGE=en
|
||||
|
||||
## Specify the input device name for voice recording
|
||||
#AIDER_VOICE_INPUT_DEVICE=
|
||||
|
||||
#################
|
||||
# Other settings:
|
||||
|
||||
## specify a file to edit (can be used multiple times)
|
||||
#AIDER_FILE=
|
||||
@@ -294,53 +369,20 @@
|
||||
## Specify the language to use in the chat (default: None, uses system settings)
|
||||
#AIDER_CHAT_LANGUAGE=
|
||||
|
||||
## Check for updates and return status in the exit code
|
||||
#AIDER_JUST_CHECK_UPDATE=false
|
||||
|
||||
## Check for new aider versions on launch
|
||||
#AIDER_CHECK_UPDATE=true
|
||||
|
||||
## Install the latest version from the main branch
|
||||
#AIDER_INSTALL_MAIN_BRANCH=false
|
||||
|
||||
## Upgrade aider to the latest version from PyPI
|
||||
#AIDER_UPGRADE=false
|
||||
|
||||
## Apply the changes from the given file instead of running the chat (debug)
|
||||
#AIDER_APPLY=
|
||||
|
||||
## Apply clipboard contents as edits using the main model's editor format
|
||||
#AIDER_APPLY_CLIPBOARD_EDITS=false
|
||||
|
||||
## Always say yes to every confirmation
|
||||
#AIDER_YES_ALWAYS=
|
||||
|
||||
## Enable verbose output
|
||||
#AIDER_VERBOSE=false
|
||||
|
||||
## Print the repo map and exit (debug)
|
||||
#AIDER_SHOW_REPO_MAP=false
|
||||
|
||||
## Print the system prompts and exit (debug)
|
||||
#AIDER_SHOW_PROMPTS=false
|
||||
|
||||
## Do all startup activities then exit before accepting user input (debug)
|
||||
#AIDER_EXIT=false
|
||||
|
||||
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
|
||||
#AIDER_MESSAGE=
|
||||
|
||||
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
|
||||
#AIDER_MESSAGE_FILE=
|
||||
|
||||
## Load and execute /commands from a file on launch
|
||||
#AIDER_LOAD=
|
||||
|
||||
## Specify the encoding for input and output (default: utf-8)
|
||||
#AIDER_ENCODING=utf-8
|
||||
|
||||
## Run aider in your browser (default: False)
|
||||
#AIDER_GUI=false
|
||||
## Specify the .env file to load (default: .env in git root)
|
||||
#AIDER_ENV_FILE=.env
|
||||
|
||||
## Enable/disable suggesting shell commands (default: True)
|
||||
#AIDER_SUGGEST_SHELL_COMMANDS=true
|
||||
@@ -348,11 +390,11 @@
|
||||
## Enable/disable fancy input with history and completion (default: True)
|
||||
#AIDER_FANCY_INPUT=true
|
||||
|
||||
#################
|
||||
# Voice Settings:
|
||||
## Enable/disable multi-line input mode with Meta-Enter to submit (default: False)
|
||||
#AIDER_MULTILINE=false
|
||||
|
||||
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
|
||||
#AIDER_VOICE_FORMAT=wav
|
||||
## Enable/disable detection and offering to add URLs to chat (default: True)
|
||||
#AIDER_DETECT_URLS=true
|
||||
|
||||
## Specify the language for voice using ISO 639-1 code (default: auto)
|
||||
#AIDER_VOICE_LANGUAGE=en
|
||||
## Specify which editor to use for the /editor command
|
||||
#AIDER_EDITOR=
|
||||
|
||||
BIN
aider/website/assets/watch.jpg
Normal file
|
After Width: | Height: | Size: 204 KiB |
BIN
aider/website/assets/watch.mp4
Normal file
@@ -11,6 +11,13 @@ description: Configuring advanced settings for LLMs.
|
||||
In most cases, you can safely ignore aider's warning about unknown context
|
||||
window size and model costs.
|
||||
|
||||
{: .note }
|
||||
Aider never *enforces* token limits, it only *reports* token limit errors
|
||||
from the API provider.
|
||||
You probably don't need to
|
||||
configure aider with the proper token limits
|
||||
for unusual models.
|
||||
|
||||
But, you can register context window limits and costs for models that aren't known
|
||||
to aider. Create a `.aider.model.metadata.json` file in one of these locations:
|
||||
|
||||
@@ -39,13 +46,19 @@ The json file should be a dictionary with an entry for each model, as follows:
|
||||
}
|
||||
```
|
||||
|
||||
See
|
||||
[litellm's model_prices_and_context_window.json file](https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json) for more examples.
|
||||
|
||||
{: .tip }
|
||||
Use a fully qualified model name with a `provider/` at the front
|
||||
in the `.aider.model.metadata.json` file.
|
||||
For example, use `deepseek/deepseek-chat`, not just `deepseek-chat`.
|
||||
That prefix should match the `litellm_provider` field.
|
||||
|
||||
### Contribute model metadata
|
||||
|
||||
Aider relies on
|
||||
[litellm's model_prices_and_context_window.json file](https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json)
|
||||
for model metadata.
|
||||
|
||||
Consider submitting a PR to that file to add missing models.
|
||||
|
||||
## Model settings
|
||||
|
||||
@@ -55,8 +68,10 @@ These model settings are pre-configured for most popular models.
|
||||
But it can sometimes be helpful to override them or add settings for
|
||||
a model that aider doesn't know about.
|
||||
|
||||
To do that,
|
||||
create a `.aider.model.settings.yml` file in one of these locations:
|
||||
|
||||
### Configuration file locations
|
||||
|
||||
You can override or add settings for any model by creating a `.aider.model.settings.yml` file in one of these locations:
|
||||
|
||||
- Your home directory.
|
||||
- The root if your git repo.
|
||||
@@ -66,9 +81,31 @@ create a `.aider.model.settings.yml` file in one of these locations:
|
||||
If the files above exist, they will be loaded in that order.
|
||||
Files loaded last will take priority.
|
||||
|
||||
The yaml file should be a a list of dictionary objects for each model.
|
||||
For example, below are all the pre-configured model settings
|
||||
to give a sense for the settings which are supported.
|
||||
The yaml file should be a list of dictionary objects for each model.
|
||||
|
||||
|
||||
### Global extra params
|
||||
|
||||
You can use the special model name `aider/extra_params` to define
|
||||
`extra_params` that will be passed to `litellm.completion()` for all models.
|
||||
Only the `extra_params` dict is used from this special model name.
|
||||
|
||||
For example:
|
||||
|
||||
```yaml
|
||||
- name: aider/extra_params
|
||||
extra_params:
|
||||
extra_headers:
|
||||
Custom-Header: value
|
||||
max_tokens: 8192
|
||||
```
|
||||
|
||||
These settings will be merged with any model-specific settings, with the
|
||||
`aider/extra_params` settings taking precedence for any direct conflicts.
|
||||
|
||||
### Example model settings
|
||||
|
||||
Below are all the pre-configured model settings to give a sense for the settings which are supported.
|
||||
|
||||
You can also look at the `ModelSettings` class in
|
||||
[models.py](https://github.com/Aider-AI/aider/blob/main/aider/models.py)
|
||||
@@ -241,6 +278,38 @@ cog.out("```\n")
|
||||
use_system_prompt: true
|
||||
use_temperature: true
|
||||
weak_model_name: gpt-4o-mini
|
||||
- cache_control: false
|
||||
caches_by_default: false
|
||||
edit_format: diff
|
||||
editor_edit_format: null
|
||||
editor_model_name: null
|
||||
examples_as_sys_msg: false
|
||||
extra_params: null
|
||||
lazy: true
|
||||
name: gpt-4o-2024-11-20
|
||||
reminder: sys
|
||||
send_undo_reply: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: true
|
||||
use_temperature: true
|
||||
weak_model_name: gpt-4o-mini
|
||||
- cache_control: false
|
||||
caches_by_default: false
|
||||
edit_format: diff
|
||||
editor_edit_format: null
|
||||
editor_model_name: null
|
||||
examples_as_sys_msg: false
|
||||
extra_params: null
|
||||
lazy: true
|
||||
name: openai/gpt-4o-2024-11-20
|
||||
reminder: sys
|
||||
send_undo_reply: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: true
|
||||
use_temperature: true
|
||||
weak_model_name: gpt-4o-mini
|
||||
- cache_control: false
|
||||
caches_by_default: false
|
||||
edit_format: diff
|
||||
@@ -441,7 +510,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
max_tokens: 8192
|
||||
lazy: false
|
||||
name: claude-3-5-sonnet-20240620
|
||||
@@ -460,7 +529,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
max_tokens: 8192
|
||||
lazy: false
|
||||
name: anthropic/claude-3-5-sonnet-20240620
|
||||
@@ -479,7 +548,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
max_tokens: 8192
|
||||
lazy: false
|
||||
name: anthropic/claude-3-5-sonnet-20241022
|
||||
@@ -498,7 +567,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
max_tokens: 8192
|
||||
lazy: false
|
||||
name: bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
|
||||
@@ -517,7 +586,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
max_tokens: 8192
|
||||
lazy: false
|
||||
name: anthropic/claude-3-5-sonnet-latest
|
||||
@@ -536,7 +605,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
max_tokens: 8192
|
||||
lazy: false
|
||||
name: claude-3-5-sonnet-20241022
|
||||
@@ -555,7 +624,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
lazy: false
|
||||
name: anthropic/claude-3-haiku-20240307
|
||||
reminder: user
|
||||
@@ -573,7 +642,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: false
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
lazy: false
|
||||
name: anthropic/claude-3-5-haiku-20241022
|
||||
reminder: user
|
||||
@@ -591,7 +660,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: false
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
lazy: false
|
||||
name: bedrock/anthropic.claude-3-5-haiku-20241022-v1:0
|
||||
reminder: user
|
||||
@@ -609,7 +678,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
lazy: false
|
||||
name: claude-3-5-haiku-20241022
|
||||
reminder: user
|
||||
@@ -644,7 +713,7 @@ cog.out("```\n")
|
||||
examples_as_sys_msg: true
|
||||
extra_params:
|
||||
extra_headers:
|
||||
anthropic-beta: prompt-caching-2024-07-31
|
||||
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
|
||||
lazy: false
|
||||
name: claude-3-haiku-20240307
|
||||
reminder: user
|
||||
@@ -914,6 +983,54 @@ cog.out("```\n")
|
||||
use_system_prompt: true
|
||||
use_temperature: true
|
||||
weak_model_name: null
|
||||
- cache_control: false
|
||||
caches_by_default: false
|
||||
edit_format: diff
|
||||
editor_edit_format: null
|
||||
editor_model_name: null
|
||||
examples_as_sys_msg: false
|
||||
extra_params: null
|
||||
lazy: false
|
||||
name: gemini/gemini-exp-1206
|
||||
reminder: user
|
||||
send_undo_reply: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: true
|
||||
use_temperature: true
|
||||
weak_model_name: null
|
||||
- cache_control: false
|
||||
caches_by_default: false
|
||||
edit_format: diff
|
||||
editor_edit_format: null
|
||||
editor_model_name: null
|
||||
examples_as_sys_msg: false
|
||||
extra_params: null
|
||||
lazy: false
|
||||
name: gemini/gemini-exp-1114
|
||||
reminder: user
|
||||
send_undo_reply: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: true
|
||||
use_temperature: true
|
||||
weak_model_name: null
|
||||
- cache_control: false
|
||||
caches_by_default: false
|
||||
edit_format: diff
|
||||
editor_edit_format: null
|
||||
editor_model_name: null
|
||||
examples_as_sys_msg: false
|
||||
extra_params: null
|
||||
lazy: false
|
||||
name: gemini/gemini-exp-1121
|
||||
reminder: user
|
||||
send_undo_reply: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: true
|
||||
use_temperature: true
|
||||
weak_model_name: null
|
||||
- cache_control: false
|
||||
caches_by_default: false
|
||||
edit_format: diff-fenced
|
||||
@@ -946,6 +1063,22 @@ cog.out("```\n")
|
||||
use_system_prompt: true
|
||||
use_temperature: true
|
||||
weak_model_name: null
|
||||
- cache_control: false
|
||||
caches_by_default: false
|
||||
edit_format: diff
|
||||
editor_edit_format: null
|
||||
editor_model_name: null
|
||||
examples_as_sys_msg: false
|
||||
extra_params: null
|
||||
lazy: false
|
||||
name: gemini/gemini-2.0-flash-exp
|
||||
reminder: user
|
||||
send_undo_reply: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: true
|
||||
use_temperature: true
|
||||
weak_model_name: null
|
||||
- cache_control: false
|
||||
caches_by_default: false
|
||||
edit_format: diff
|
||||
@@ -1057,7 +1190,7 @@ cog.out("```\n")
|
||||
name: openai/o1-mini
|
||||
reminder: user
|
||||
send_undo_reply: false
|
||||
streaming: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: false
|
||||
use_temperature: false
|
||||
@@ -1073,7 +1206,7 @@ cog.out("```\n")
|
||||
name: azure/o1-mini
|
||||
reminder: user
|
||||
send_undo_reply: false
|
||||
streaming: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: false
|
||||
use_temperature: false
|
||||
@@ -1089,7 +1222,7 @@ cog.out("```\n")
|
||||
name: o1-mini
|
||||
reminder: user
|
||||
send_undo_reply: false
|
||||
streaming: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: false
|
||||
use_temperature: false
|
||||
@@ -1105,7 +1238,7 @@ cog.out("```\n")
|
||||
name: openai/o1-preview
|
||||
reminder: user
|
||||
send_undo_reply: false
|
||||
streaming: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: false
|
||||
use_temperature: false
|
||||
@@ -1121,7 +1254,7 @@ cog.out("```\n")
|
||||
name: azure/o1-preview
|
||||
reminder: user
|
||||
send_undo_reply: false
|
||||
streaming: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: false
|
||||
use_temperature: false
|
||||
@@ -1137,7 +1270,7 @@ cog.out("```\n")
|
||||
name: o1-preview
|
||||
reminder: user
|
||||
send_undo_reply: false
|
||||
streaming: false
|
||||
streaming: true
|
||||
use_repo_map: true
|
||||
use_system_prompt: false
|
||||
use_temperature: false
|
||||
|
||||
@@ -70,14 +70,8 @@ cog.outl("```")
|
||||
## show this help message and exit
|
||||
#help: xxx
|
||||
|
||||
#######
|
||||
# Main:
|
||||
|
||||
## Specify the OpenAI API key
|
||||
#openai-api-key: xxx
|
||||
|
||||
## Specify the Anthropic API key
|
||||
#anthropic-api-key: xxx
|
||||
#############
|
||||
# Main model:
|
||||
|
||||
## Specify the model to use for the main chat
|
||||
#model: xxx
|
||||
@@ -94,7 +88,7 @@ cog.outl("```")
|
||||
## Use gpt-4-0613 model for the main chat
|
||||
#4: false
|
||||
|
||||
## Use gpt-4o-2024-08-06 model for the main chat
|
||||
## Use gpt-4o model for the main chat
|
||||
#4o: false
|
||||
|
||||
## Use gpt-4o-mini model for the main chat
|
||||
@@ -115,36 +109,72 @@ cog.outl("```")
|
||||
## Use o1-preview model for the main chat
|
||||
#o1-preview: false
|
||||
|
||||
#################
|
||||
# Model Settings:
|
||||
########################
|
||||
# API Keys and settings:
|
||||
|
||||
## List known models which match the (partial) MODEL name
|
||||
#list-models: xxx
|
||||
## Specify the OpenAI API key
|
||||
#openai-api-key: xxx
|
||||
|
||||
## Specify the Anthropic API key
|
||||
#anthropic-api-key: xxx
|
||||
|
||||
## Specify the api base url
|
||||
#openai-api-base: xxx
|
||||
|
||||
## Specify the api_type
|
||||
## (deprecated, use --set-env OPENAI_API_TYPE=<value>)
|
||||
#openai-api-type: xxx
|
||||
|
||||
## Specify the api_version
|
||||
## (deprecated, use --set-env OPENAI_API_VERSION=<value>)
|
||||
#openai-api-version: xxx
|
||||
|
||||
## Specify the deployment_id
|
||||
## (deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)
|
||||
#openai-api-deployment-id: xxx
|
||||
|
||||
## Specify the OpenAI organization ID
|
||||
## (deprecated, use --set-env OPENAI_ORGANIZATION=<value>)
|
||||
#openai-organization-id: xxx
|
||||
|
||||
## Set an environment variable (to control API settings, can be used multiple times)
|
||||
#set-env: xxx
|
||||
## Specify multiple values like this:
|
||||
#set-env:
|
||||
# - xxx
|
||||
# - yyy
|
||||
# - zzz
|
||||
|
||||
## Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
|
||||
#api-key: xxx
|
||||
## Specify multiple values like this:
|
||||
#api-key:
|
||||
# - xxx
|
||||
# - yyy
|
||||
# - zzz
|
||||
|
||||
#################
|
||||
# Model settings:
|
||||
|
||||
## List known models which match the (partial) MODEL name
|
||||
#list-models: xxx
|
||||
|
||||
## Specify a file with aider model settings for unknown models
|
||||
#model-settings-file: .aider.model.settings.yml
|
||||
|
||||
## Specify a file with context window and costs for unknown models
|
||||
#model-metadata-file: .aider.model.metadata.json
|
||||
|
||||
## Add a model alias (can be used multiple times)
|
||||
#alias: xxx
|
||||
## Specify multiple values like this:
|
||||
#alias:
|
||||
# - xxx
|
||||
# - yyy
|
||||
# - zzz
|
||||
|
||||
## Verify the SSL cert when connecting to models (default: True)
|
||||
#verify-ssl: true
|
||||
|
||||
## Timeout in seconds for API calls (default: None)
|
||||
#timeout: xxx
|
||||
|
||||
## Specify what edit format the LLM should use (default depends on model)
|
||||
#edit-format: xxx
|
||||
|
||||
@@ -166,11 +196,8 @@ cog.outl("```")
|
||||
## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.
|
||||
#max-chat-history-tokens: xxx
|
||||
|
||||
## Specify the .env file to load (default: .env in git root)
|
||||
#env-file: .env
|
||||
|
||||
#################
|
||||
# Cache Settings:
|
||||
# Cache settings:
|
||||
|
||||
## Enable caching of prompts (default: False)
|
||||
#cache-prompts: false
|
||||
@@ -179,7 +206,7 @@ cog.outl("```")
|
||||
#cache-keepalive-pings: false
|
||||
|
||||
###################
|
||||
# Repomap Settings:
|
||||
# Repomap settings:
|
||||
|
||||
## Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)
|
||||
#map-tokens: xxx
|
||||
@@ -206,7 +233,7 @@ cog.outl("```")
|
||||
#llm-history-file: xxx
|
||||
|
||||
##################
|
||||
# Output Settings:
|
||||
# Output settings:
|
||||
|
||||
## Use colors suitable for a dark terminal background (default: False)
|
||||
#dark-mode: false
|
||||
@@ -254,7 +281,7 @@ cog.outl("```")
|
||||
#show-diffs: false
|
||||
|
||||
###############
|
||||
# Git Settings:
|
||||
# Git settings:
|
||||
|
||||
## Enable/disable looking for a git repo (default: True)
|
||||
#git: true
|
||||
@@ -298,6 +325,9 @@ cog.outl("```")
|
||||
## Skip the sanity check for the git repository (default: False)
|
||||
#skip-sanity-check-repo: false
|
||||
|
||||
## Enable/disable watching files for ai coding comments (default: False)
|
||||
#watch-files: false
|
||||
|
||||
########################
|
||||
# Fixing and committing:
|
||||
|
||||
@@ -321,14 +351,14 @@ cog.outl("```")
|
||||
## Enable/disable automatic testing after changes (default: False)
|
||||
#auto-test: false
|
||||
|
||||
## Run tests and fix problems found
|
||||
## Run tests, fix problems found and then exit
|
||||
#test: false
|
||||
|
||||
############
|
||||
# Analytics:
|
||||
|
||||
## Enable/disable analytics for one session (default: False)
|
||||
#analytics: false
|
||||
## Enable/disable analytics for current session (default: random)
|
||||
#analytics: xxx
|
||||
|
||||
## Specify a file to log analytics events
|
||||
#analytics-log: xxx
|
||||
@@ -336,8 +366,71 @@ cog.outl("```")
|
||||
## Permanently disable analytics
|
||||
#analytics-disable: false
|
||||
|
||||
############
|
||||
# Upgrading:
|
||||
|
||||
## Check for updates and return status in the exit code
|
||||
#just-check-update: false
|
||||
|
||||
## Check for new aider versions on launch
|
||||
#check-update: true
|
||||
|
||||
## Show release notes on first run of new version (default: None, ask user)
|
||||
#show-release-notes: xxx
|
||||
|
||||
## Install the latest version from the main branch
|
||||
#install-main-branch: false
|
||||
|
||||
## Upgrade aider to the latest version from PyPI
|
||||
#upgrade: false
|
||||
|
||||
## Show the version number and exit
|
||||
#version: xxx
|
||||
|
||||
########
|
||||
# Modes:
|
||||
|
||||
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
|
||||
#message: xxx
|
||||
|
||||
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
|
||||
#message-file: xxx
|
||||
|
||||
## Run aider in your browser (default: False)
|
||||
#gui: false
|
||||
|
||||
## Enable automatic copy/paste of chat between aider and web UI (default: False)
|
||||
#copy-paste: false
|
||||
|
||||
## Apply the changes from the given file instead of running the chat (debug)
|
||||
#apply: xxx
|
||||
|
||||
## Apply clipboard contents as edits using the main model's editor format
|
||||
#apply-clipboard-edits: false
|
||||
|
||||
## Do all startup activities then exit before accepting user input (debug)
|
||||
#exit: false
|
||||
|
||||
## Print the repo map and exit (debug)
|
||||
#show-repo-map: false
|
||||
|
||||
## Print the system prompts and exit (debug)
|
||||
#show-prompts: false
|
||||
|
||||
#################
|
||||
# Other Settings:
|
||||
# Voice settings:
|
||||
|
||||
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
|
||||
#voice-format: wav
|
||||
|
||||
## Specify the language for voice using ISO 639-1 code (default: auto)
|
||||
#voice-language: en
|
||||
|
||||
## Specify the input device name for voice recording
|
||||
#voice-input-device: xxx
|
||||
|
||||
#################
|
||||
# Other settings:
|
||||
|
||||
## specify a file to edit (can be used multiple times)
|
||||
#file: xxx
|
||||
@@ -361,48 +454,12 @@ cog.outl("```")
|
||||
## Specify the language to use in the chat (default: None, uses system settings)
|
||||
#chat-language: xxx
|
||||
|
||||
## Show the version number and exit
|
||||
#version: xxx
|
||||
|
||||
## Check for updates and return status in the exit code
|
||||
#just-check-update: false
|
||||
|
||||
## Check for new aider versions on launch
|
||||
#check-update: true
|
||||
|
||||
## Install the latest version from the main branch
|
||||
#install-main-branch: false
|
||||
|
||||
## Upgrade aider to the latest version from PyPI
|
||||
#upgrade: false
|
||||
|
||||
## Apply the changes from the given file instead of running the chat (debug)
|
||||
#apply: xxx
|
||||
|
||||
## Apply clipboard contents as edits using the main model's editor format
|
||||
#apply-clipboard-edits: false
|
||||
|
||||
## Always say yes to every confirmation
|
||||
#yes-always: false
|
||||
|
||||
## Enable verbose output
|
||||
#verbose: false
|
||||
|
||||
## Print the repo map and exit (debug)
|
||||
#show-repo-map: false
|
||||
|
||||
## Print the system prompts and exit (debug)
|
||||
#show-prompts: false
|
||||
|
||||
## Do all startup activities then exit before accepting user input (debug)
|
||||
#exit: false
|
||||
|
||||
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
|
||||
#message: xxx
|
||||
|
||||
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
|
||||
#message-file: xxx
|
||||
|
||||
## Load and execute /commands from a file on launch
|
||||
#load: xxx
|
||||
|
||||
@@ -412,8 +469,8 @@ cog.outl("```")
|
||||
## Specify the config file (default: search for .aider.conf.yml in git root, cwd or home directory)
|
||||
#config: xxx
|
||||
|
||||
## Run aider in your browser (default: False)
|
||||
#gui: false
|
||||
## Specify the .env file to load (default: .env in git root)
|
||||
#env-file: .env
|
||||
|
||||
## Enable/disable suggesting shell commands (default: True)
|
||||
#suggest-shell-commands: true
|
||||
@@ -421,13 +478,13 @@ cog.outl("```")
|
||||
## Enable/disable fancy input with history and completion (default: True)
|
||||
#fancy-input: true
|
||||
|
||||
#################
|
||||
# Voice Settings:
|
||||
## Enable/disable multi-line input mode with Meta-Enter to submit (default: False)
|
||||
#multiline: false
|
||||
|
||||
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
|
||||
#voice-format: wav
|
||||
## Enable/disable detection and offering to add URLs to chat (default: True)
|
||||
#detect-urls: true
|
||||
|
||||
## Specify the language for voice using ISO 639-1 code (default: auto)
|
||||
#voice-language: en
|
||||
## Specify which editor to use for the /editor command
|
||||
#editor: xxx
|
||||
```
|
||||
<!--[[[end]]]-->
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
parent: Configuration
|
||||
nav_order: 900
|
||||
nav_order: 20
|
||||
description: Using a .env file to store LLM API keys for aider.
|
||||
---
|
||||
|
||||
@@ -24,6 +24,8 @@ If the files above exist, they will be loaded in that order. Files loaded last w
|
||||
|
||||
{% include special-keys.md %}
|
||||
|
||||
{% include env-keys-tip.md %}
|
||||
|
||||
## Sample .env file
|
||||
|
||||
Below is a sample `.env` file, which you
|
||||
@@ -60,14 +62,8 @@ cog.outl("```")
|
||||
|
||||
##...
|
||||
|
||||
#######
|
||||
# Main:
|
||||
|
||||
## Specify the OpenAI API key
|
||||
#OPENAI_API_KEY=
|
||||
|
||||
## Specify the Anthropic API key
|
||||
#ANTHROPIC_API_KEY=
|
||||
#############
|
||||
# Main model:
|
||||
|
||||
## Specify the model to use for the main chat
|
||||
#AIDER_MODEL=
|
||||
@@ -84,7 +80,7 @@ cog.outl("```")
|
||||
## Use gpt-4-0613 model for the main chat
|
||||
#AIDER_4=
|
||||
|
||||
## Use gpt-4o-2024-08-06 model for the main chat
|
||||
## Use gpt-4o model for the main chat
|
||||
#AIDER_4O=
|
||||
|
||||
## Use gpt-4o-mini model for the main chat
|
||||
@@ -105,36 +101,57 @@ cog.outl("```")
|
||||
## Use o1-preview model for the main chat
|
||||
#AIDER_O1_PREVIEW=
|
||||
|
||||
########################
|
||||
# API Keys and settings:
|
||||
|
||||
## Specify the OpenAI API key
|
||||
#AIDER_OPENAI_API_KEY=
|
||||
|
||||
## Specify the Anthropic API key
|
||||
#AIDER_ANTHROPIC_API_KEY=
|
||||
|
||||
## Specify the api base url
|
||||
#AIDER_OPENAI_API_BASE=
|
||||
|
||||
## (deprecated, use --set-env OPENAI_API_TYPE=<value>)
|
||||
#AIDER_OPENAI_API_TYPE=
|
||||
|
||||
## (deprecated, use --set-env OPENAI_API_VERSION=<value>)
|
||||
#AIDER_OPENAI_API_VERSION=
|
||||
|
||||
## (deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)
|
||||
#AIDER_OPENAI_API_DEPLOYMENT_ID=
|
||||
|
||||
## (deprecated, use --set-env OPENAI_ORGANIZATION=<value>)
|
||||
#AIDER_OPENAI_ORGANIZATION_ID=
|
||||
|
||||
## Set an environment variable (to control API settings, can be used multiple times)
|
||||
#AIDER_SET_ENV=
|
||||
|
||||
## Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
|
||||
#AIDER_API_KEY=
|
||||
|
||||
#################
|
||||
# Model Settings:
|
||||
# Model settings:
|
||||
|
||||
## List known models which match the (partial) MODEL name
|
||||
#AIDER_LIST_MODELS=
|
||||
|
||||
## Specify the api base url
|
||||
#OPENAI_API_BASE=
|
||||
|
||||
## Specify the api_type
|
||||
#OPENAI_API_TYPE=
|
||||
|
||||
## Specify the api_version
|
||||
#OPENAI_API_VERSION=
|
||||
|
||||
## Specify the deployment_id
|
||||
#OPENAI_API_DEPLOYMENT_ID=
|
||||
|
||||
## Specify the OpenAI organization ID
|
||||
#OPENAI_ORGANIZATION_ID=
|
||||
|
||||
## Specify a file with aider model settings for unknown models
|
||||
#AIDER_MODEL_SETTINGS_FILE=.aider.model.settings.yml
|
||||
|
||||
## Specify a file with context window and costs for unknown models
|
||||
#AIDER_MODEL_METADATA_FILE=.aider.model.metadata.json
|
||||
|
||||
## Add a model alias (can be used multiple times)
|
||||
#AIDER_ALIAS=
|
||||
|
||||
## Verify the SSL cert when connecting to models (default: True)
|
||||
#AIDER_VERIFY_SSL=true
|
||||
|
||||
## Timeout in seconds for API calls (default: None)
|
||||
#AIDER_TIMEOUT=
|
||||
|
||||
## Specify what edit format the LLM should use (default depends on model)
|
||||
#AIDER_EDIT_FORMAT=
|
||||
|
||||
@@ -156,11 +173,8 @@ cog.outl("```")
|
||||
## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.
|
||||
#AIDER_MAX_CHAT_HISTORY_TOKENS=
|
||||
|
||||
## Specify the .env file to load (default: .env in git root)
|
||||
#AIDER_ENV_FILE=.env
|
||||
|
||||
#################
|
||||
# Cache Settings:
|
||||
# Cache settings:
|
||||
|
||||
## Enable caching of prompts (default: False)
|
||||
#AIDER_CACHE_PROMPTS=false
|
||||
@@ -169,7 +183,7 @@ cog.outl("```")
|
||||
#AIDER_CACHE_KEEPALIVE_PINGS=false
|
||||
|
||||
###################
|
||||
# Repomap Settings:
|
||||
# Repomap settings:
|
||||
|
||||
## Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)
|
||||
#AIDER_MAP_TOKENS=
|
||||
@@ -196,7 +210,7 @@ cog.outl("```")
|
||||
#AIDER_LLM_HISTORY_FILE=
|
||||
|
||||
##################
|
||||
# Output Settings:
|
||||
# Output settings:
|
||||
|
||||
## Use colors suitable for a dark terminal background (default: False)
|
||||
#AIDER_DARK_MODE=false
|
||||
@@ -244,7 +258,7 @@ cog.outl("```")
|
||||
#AIDER_SHOW_DIFFS=false
|
||||
|
||||
###############
|
||||
# Git Settings:
|
||||
# Git settings:
|
||||
|
||||
## Enable/disable looking for a git repo (default: True)
|
||||
#AIDER_GIT=true
|
||||
@@ -288,6 +302,9 @@ cog.outl("```")
|
||||
## Skip the sanity check for the git repository (default: False)
|
||||
#AIDER_SKIP_SANITY_CHECK_REPO=false
|
||||
|
||||
## Enable/disable watching files for ai coding comments (default: False)
|
||||
#AIDER_WATCH_FILES=false
|
||||
|
||||
########################
|
||||
# Fixing and committing:
|
||||
|
||||
@@ -306,14 +323,14 @@ cog.outl("```")
|
||||
## Enable/disable automatic testing after changes (default: False)
|
||||
#AIDER_AUTO_TEST=false
|
||||
|
||||
## Run tests and fix problems found
|
||||
## Run tests, fix problems found and then exit
|
||||
#AIDER_TEST=false
|
||||
|
||||
############
|
||||
# Analytics:
|
||||
|
||||
## Enable/disable analytics for one session (default: False)
|
||||
#AIDER_ANALYTICS=false
|
||||
## Enable/disable analytics for current session (default: random)
|
||||
#AIDER_ANALYTICS=
|
||||
|
||||
## Specify a file to log analytics events
|
||||
#AIDER_ANALYTICS_LOG=
|
||||
@@ -321,8 +338,68 @@ cog.outl("```")
|
||||
## Permanently disable analytics
|
||||
#AIDER_ANALYTICS_DISABLE=false
|
||||
|
||||
############
|
||||
# Upgrading:
|
||||
|
||||
## Check for updates and return status in the exit code
|
||||
#AIDER_JUST_CHECK_UPDATE=false
|
||||
|
||||
## Check for new aider versions on launch
|
||||
#AIDER_CHECK_UPDATE=true
|
||||
|
||||
## Show release notes on first run of new version (default: None, ask user)
|
||||
#AIDER_SHOW_RELEASE_NOTES=
|
||||
|
||||
## Install the latest version from the main branch
|
||||
#AIDER_INSTALL_MAIN_BRANCH=false
|
||||
|
||||
## Upgrade aider to the latest version from PyPI
|
||||
#AIDER_UPGRADE=false
|
||||
|
||||
########
|
||||
# Modes:
|
||||
|
||||
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
|
||||
#AIDER_MESSAGE=
|
||||
|
||||
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
|
||||
#AIDER_MESSAGE_FILE=
|
||||
|
||||
## Run aider in your browser (default: False)
|
||||
#AIDER_GUI=false
|
||||
|
||||
## Enable automatic copy/paste of chat between aider and web UI (default: False)
|
||||
#AIDER_COPY_PASTE=false
|
||||
|
||||
## Apply the changes from the given file instead of running the chat (debug)
|
||||
#AIDER_APPLY=
|
||||
|
||||
## Apply clipboard contents as edits using the main model's editor format
|
||||
#AIDER_APPLY_CLIPBOARD_EDITS=false
|
||||
|
||||
## Do all startup activities then exit before accepting user input (debug)
|
||||
#AIDER_EXIT=false
|
||||
|
||||
## Print the repo map and exit (debug)
|
||||
#AIDER_SHOW_REPO_MAP=false
|
||||
|
||||
## Print the system prompts and exit (debug)
|
||||
#AIDER_SHOW_PROMPTS=false
|
||||
|
||||
#################
|
||||
# Other Settings:
|
||||
# Voice settings:
|
||||
|
||||
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
|
||||
#AIDER_VOICE_FORMAT=wav
|
||||
|
||||
## Specify the language for voice using ISO 639-1 code (default: auto)
|
||||
#AIDER_VOICE_LANGUAGE=en
|
||||
|
||||
## Specify the input device name for voice recording
|
||||
#AIDER_VOICE_INPUT_DEVICE=
|
||||
|
||||
#################
|
||||
# Other settings:
|
||||
|
||||
## specify a file to edit (can be used multiple times)
|
||||
#AIDER_FILE=
|
||||
@@ -336,53 +413,20 @@ cog.outl("```")
|
||||
## Specify the language to use in the chat (default: None, uses system settings)
|
||||
#AIDER_CHAT_LANGUAGE=
|
||||
|
||||
## Check for updates and return status in the exit code
|
||||
#AIDER_JUST_CHECK_UPDATE=false
|
||||
|
||||
## Check for new aider versions on launch
|
||||
#AIDER_CHECK_UPDATE=true
|
||||
|
||||
## Install the latest version from the main branch
|
||||
#AIDER_INSTALL_MAIN_BRANCH=false
|
||||
|
||||
## Upgrade aider to the latest version from PyPI
|
||||
#AIDER_UPGRADE=false
|
||||
|
||||
## Apply the changes from the given file instead of running the chat (debug)
|
||||
#AIDER_APPLY=
|
||||
|
||||
## Apply clipboard contents as edits using the main model's editor format
|
||||
#AIDER_APPLY_CLIPBOARD_EDITS=false
|
||||
|
||||
## Always say yes to every confirmation
|
||||
#AIDER_YES_ALWAYS=
|
||||
|
||||
## Enable verbose output
|
||||
#AIDER_VERBOSE=false
|
||||
|
||||
## Print the repo map and exit (debug)
|
||||
#AIDER_SHOW_REPO_MAP=false
|
||||
|
||||
## Print the system prompts and exit (debug)
|
||||
#AIDER_SHOW_PROMPTS=false
|
||||
|
||||
## Do all startup activities then exit before accepting user input (debug)
|
||||
#AIDER_EXIT=false
|
||||
|
||||
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
|
||||
#AIDER_MESSAGE=
|
||||
|
||||
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
|
||||
#AIDER_MESSAGE_FILE=
|
||||
|
||||
## Load and execute /commands from a file on launch
|
||||
#AIDER_LOAD=
|
||||
|
||||
## Specify the encoding for input and output (default: utf-8)
|
||||
#AIDER_ENCODING=utf-8
|
||||
|
||||
## Run aider in your browser (default: False)
|
||||
#AIDER_GUI=false
|
||||
## Specify the .env file to load (default: .env in git root)
|
||||
#AIDER_ENV_FILE=.env
|
||||
|
||||
## Enable/disable suggesting shell commands (default: True)
|
||||
#AIDER_SUGGEST_SHELL_COMMANDS=true
|
||||
@@ -390,15 +434,13 @@ cog.outl("```")
|
||||
## Enable/disable fancy input with history and completion (default: True)
|
||||
#AIDER_FANCY_INPUT=true
|
||||
|
||||
#################
|
||||
# Voice Settings:
|
||||
## Enable/disable multi-line input mode with Meta-Enter to submit (default: False)
|
||||
#AIDER_MULTILINE=false
|
||||
|
||||
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
|
||||
#AIDER_VOICE_FORMAT=wav
|
||||
## Enable/disable detection and offering to add URLs to chat (default: True)
|
||||
#AIDER_DETECT_URLS=true
|
||||
|
||||
## Specify the language for voice using ISO 639-1 code (default: auto)
|
||||
#AIDER_VOICE_LANGUAGE=en
|
||||
## Specify which editor to use for the /editor command
|
||||
#AIDER_EDITOR=
|
||||
```
|
||||
<!--[[[end]]]-->
|
||||
|
||||
|
||||
|
||||
127
aider/website/docs/config/editor.md
Normal file
@@ -0,0 +1,127 @@
|
||||
---
|
||||
parent: Configuration
|
||||
nav_order: 100
|
||||
description: How to configure a custom editor for aider's /editor command
|
||||
---
|
||||
|
||||
# Editor configuration
|
||||
|
||||
Aider allows you to configure your preferred text editor for use with the `/editor` command. The editor must be capable of running in "blocking mode", meaning the command line will wait until you close the editor before proceeding.
|
||||
|
||||
## Using `--editor`
|
||||
|
||||
You can specify the text editor with the `--editor` switch or using
|
||||
`editor:` in aider's
|
||||
[yaml config file](https://aider.chat/docs/config/aider_conf.html).
|
||||
|
||||
## Environment variables
|
||||
|
||||
Aider checks the following environment variables in order to determine which editor to use:
|
||||
|
||||
1. `AIDER_EDITOR`
|
||||
2. `VISUAL`
|
||||
3. `EDITOR`
|
||||
|
||||
## Default behavior
|
||||
|
||||
If no editor is configured, aider will use these platform-specific defaults:
|
||||
|
||||
- Windows: `notepad`
|
||||
- macOS: `vim`
|
||||
- Linux/Unix: `vi`
|
||||
|
||||
## Using a custom editor
|
||||
|
||||
You can set your preferred editor in your shell's configuration file (e.g., `.bashrc`, `.zshrc`):
|
||||
|
||||
```bash
|
||||
export AIDER_EDITOR=vim
|
||||
```
|
||||
|
||||
## Popular Editors by Platform
|
||||
|
||||
### macOS
|
||||
|
||||
1. **vim**
|
||||
```bash
|
||||
export AIDER_EDITOR=vim
|
||||
```
|
||||
|
||||
2. **Emacs**
|
||||
```bash
|
||||
export AIDER_EDITOR=emacs
|
||||
```
|
||||
|
||||
3. **VSCode**
|
||||
```bash
|
||||
export AIDER_EDITOR="code --wait"
|
||||
```
|
||||
|
||||
4. **Sublime Text**
|
||||
```bash
|
||||
export AIDER_EDITOR="subl --wait"
|
||||
```
|
||||
|
||||
5. **BBEdit**
|
||||
```bash
|
||||
export AIDER_EDITOR="bbedit --wait"
|
||||
```
|
||||
|
||||
### Linux
|
||||
|
||||
1. **vim**
|
||||
```bash
|
||||
export AIDER_EDITOR=vim
|
||||
```
|
||||
|
||||
2. **Emacs**
|
||||
```bash
|
||||
export AIDER_EDITOR=emacs
|
||||
```
|
||||
|
||||
3. **nano**
|
||||
```bash
|
||||
export AIDER_EDITOR=nano
|
||||
```
|
||||
|
||||
4. **VSCode**
|
||||
```bash
|
||||
export AIDER_EDITOR="code --wait"
|
||||
```
|
||||
|
||||
5. **Sublime Text**
|
||||
```bash
|
||||
export AIDER_EDITOR="subl --wait"
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
1. **Notepad**
|
||||
```bat
|
||||
set AIDER_EDITOR=notepad
|
||||
```
|
||||
|
||||
2. **VSCode**
|
||||
```bat
|
||||
set AIDER_EDITOR="code --wait"
|
||||
```
|
||||
|
||||
3. **Notepad++**
|
||||
```bat
|
||||
set AIDER_EDITOR="notepad++ -multiInst -notabbar -nosession -noPlugin -waitForClose"
|
||||
```
|
||||
|
||||
## Editor command arguments
|
||||
|
||||
Some editors require specific command-line arguments to operate in blocking mode. The `--wait` flag (or equivalent) is commonly used to make the editor block until the file is closed.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you encounter issues with your editor not blocking (returning to the prompt immediately), verify that:
|
||||
|
||||
1. Your editor supports blocking mode
|
||||
2. You've included the necessary command-line arguments for blocking mode
|
||||
3. The editor command is properly quoted if it contains spaces or special characters, e.g.:
|
||||
```bash
|
||||
export AIDER_EDITOR="code --wait"
|
||||
```
|
||||
73
aider/website/docs/config/model-aliases.md
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
parent: Configuration
|
||||
nav_order: 1000
|
||||
description: Assign convenient short names to models.
|
||||
---
|
||||
|
||||
# Model Aliases
|
||||
|
||||
Model aliases allow you to create shorthand names for models you frequently use. This is particularly useful for models with long names or when you want to standardize model usage across your team.
|
||||
|
||||
## Command Line Usage
|
||||
|
||||
You can define aliases when launching aider using the `--alias` option:
|
||||
|
||||
```bash
|
||||
aider --alias "fast:gpt-3.5-turbo" --alias "smart:gpt-4"
|
||||
```
|
||||
|
||||
Multiple aliases can be defined by using the `--alias` option multiple times. Each alias definition should be in the format `alias:model-name`.
|
||||
|
||||
## Configuration File
|
||||
|
||||
You can also define aliases in your [`.aider.conf.yml` file](https://aider.chat/docs/config/aider_conf.html):
|
||||
|
||||
```yaml
|
||||
alias:
|
||||
- "fast:gpt-3.5-turbo"
|
||||
- "smart:gpt-4"
|
||||
- "hacker:claude-3-sonnet-20240229"
|
||||
```
|
||||
|
||||
## Using Aliases
|
||||
|
||||
Once defined, you can use the alias instead of the full model name:
|
||||
|
||||
```bash
|
||||
aider --model fast # Uses gpt-3.5-turbo
|
||||
aider --model smart # Uses gpt-4
|
||||
```
|
||||
|
||||
## Built-in Aliases
|
||||
|
||||
Aider includes some built-in aliases for convenience:
|
||||
|
||||
<!--[[[cog
|
||||
import cog
|
||||
from aider.models import MODEL_ALIASES
|
||||
|
||||
for alias, model in sorted(MODEL_ALIASES.items()):
|
||||
cog.outl(f"- `{alias}`: {model}")
|
||||
]]]-->
|
||||
- `3`: gpt-3.5-turbo
|
||||
- `35-turbo`: gpt-3.5-turbo
|
||||
- `35turbo`: gpt-3.5-turbo
|
||||
- `4`: gpt-4-0613
|
||||
- `4-turbo`: gpt-4-1106-preview
|
||||
- `4o`: gpt-4o
|
||||
- `deepseek`: deepseek/deepseek-coder
|
||||
- `flash`: gemini/gemini-2.0-flash-exp
|
||||
- `haiku`: claude-3-5-haiku-20241022
|
||||
- `opus`: claude-3-opus-20240229
|
||||
- `sonnet`: claude-3-5-sonnet-20241022
|
||||
<!--[[[end]]]-->
|
||||
|
||||
## Priority
|
||||
|
||||
If the same alias is defined in multiple places, the priority is:
|
||||
|
||||
1. Command line aliases (highest priority)
|
||||
2. Configuration file aliases
|
||||
3. Built-in aliases (lowest priority)
|
||||
|
||||
This allows you to override built-in aliases with your own preferences.
|
||||
@@ -14,7 +14,6 @@ or review them below.
|
||||
{:toc}
|
||||
|
||||
## LLM keys
|
||||
{: .no_toc }
|
||||
|
||||
{% include special-keys.md %}
|
||||
|
||||
@@ -25,18 +24,19 @@ from aider.args import get_md_help
|
||||
cog.out(get_md_help())
|
||||
]]]-->
|
||||
```
|
||||
usage: aider [-h] [--openai-api-key] [--anthropic-api-key] [--model]
|
||||
[--opus] [--sonnet] [--haiku] [--4] [--4o] [--mini]
|
||||
[--4-turbo] [--35turbo] [--deepseek] [--o1-mini]
|
||||
[--o1-preview] [--list-models] [--openai-api-base]
|
||||
usage: aider [-h] [--model] [--opus] [--sonnet] [--haiku] [--4]
|
||||
[--4o] [--mini] [--4-turbo] [--35turbo] [--deepseek]
|
||||
[--o1-mini] [--o1-preview] [--openai-api-key]
|
||||
[--anthropic-api-key] [--openai-api-base]
|
||||
[--openai-api-type] [--openai-api-version]
|
||||
[--openai-api-deployment-id] [--openai-organization-id]
|
||||
[--set-env] [--api-key] [--list-models]
|
||||
[--model-settings-file] [--model-metadata-file]
|
||||
[--verify-ssl | --no-verify-ssl] [--edit-format]
|
||||
[--architect] [--weak-model] [--editor-model]
|
||||
[--editor-edit-format]
|
||||
[--alias] [--verify-ssl | --no-verify-ssl] [--timeout]
|
||||
[--edit-format] [--architect] [--weak-model]
|
||||
[--editor-model] [--editor-edit-format]
|
||||
[--show-model-warnings | --no-show-model-warnings]
|
||||
[--max-chat-history-tokens] [--env-file]
|
||||
[--max-chat-history-tokens]
|
||||
[--cache-prompts | --no-cache-prompts]
|
||||
[--cache-keepalive-pings] [--map-tokens]
|
||||
[--map-refresh] [--map-multiplier-no-files]
|
||||
@@ -59,21 +59,27 @@ usage: aider [-h] [--openai-api-key] [--anthropic-api-key] [--model]
|
||||
[--attribute-commit-message-author | --no-attribute-commit-message-author]
|
||||
[--attribute-commit-message-committer | --no-attribute-commit-message-committer]
|
||||
[--commit] [--commit-prompt] [--dry-run | --no-dry-run]
|
||||
[--skip-sanity-check-repo] [--lint] [--lint-cmd]
|
||||
[--auto-lint | --no-auto-lint] [--test-cmd]
|
||||
[--auto-test | --no-auto-test] [--test]
|
||||
[--skip-sanity-check-repo]
|
||||
[--watch-files | --no-watch-files] [--lint]
|
||||
[--lint-cmd] [--auto-lint | --no-auto-lint]
|
||||
[--test-cmd] [--auto-test | --no-auto-test] [--test]
|
||||
[--analytics | --no-analytics] [--analytics-log]
|
||||
[--analytics-disable] [--file] [--read] [--vim]
|
||||
[--chat-language] [--version] [--just-check-update]
|
||||
[--analytics-disable] [--just-check-update]
|
||||
[--check-update | --no-check-update]
|
||||
[--install-main-branch] [--upgrade] [--apply]
|
||||
[--apply-clipboard-edits] [--yes-always] [-v]
|
||||
[--show-repo-map] [--show-prompts] [--exit] [--message]
|
||||
[--message-file] [--load] [--encoding] [-c]
|
||||
[--show-release-notes | --no-show-release-notes]
|
||||
[--install-main-branch] [--upgrade] [--version]
|
||||
[--message] [--message-file]
|
||||
[--gui | --no-gui | --browser | --no-browser]
|
||||
[--copy-paste | --no-copy-paste] [--apply]
|
||||
[--apply-clipboard-edits] [--exit] [--show-repo-map]
|
||||
[--show-prompts] [--voice-format] [--voice-language]
|
||||
[--voice-input-device] [--file] [--read] [--vim]
|
||||
[--chat-language] [--yes-always] [-v] [--load]
|
||||
[--encoding] [-c] [--env-file]
|
||||
[--suggest-shell-commands | --no-suggest-shell-commands]
|
||||
[--fancy-input | --no-fancy-input] [--voice-format]
|
||||
[--voice-language]
|
||||
[--fancy-input | --no-fancy-input]
|
||||
[--multiline | --no-multiline]
|
||||
[--detect-urls | --no-detect-urls] [--editor]
|
||||
|
||||
```
|
||||
|
||||
@@ -85,15 +91,7 @@ Aliases:
|
||||
- `-h`
|
||||
- `--help`
|
||||
|
||||
## Main:
|
||||
|
||||
### `--openai-api-key OPENAI_API_KEY`
|
||||
Specify the OpenAI API key
|
||||
Environment variable: `OPENAI_API_KEY`
|
||||
|
||||
### `--anthropic-api-key ANTHROPIC_API_KEY`
|
||||
Specify the Anthropic API key
|
||||
Environment variable: `ANTHROPIC_API_KEY`
|
||||
## Main model:
|
||||
|
||||
### `--model MODEL`
|
||||
Specify the model to use for the main chat
|
||||
@@ -119,7 +117,7 @@ Aliases:
|
||||
- `-4`
|
||||
|
||||
### `--4o`
|
||||
Use gpt-4o-2024-08-06 model for the main chat
|
||||
Use gpt-4o model for the main chat
|
||||
Environment variable: `AIDER_4O`
|
||||
|
||||
### `--mini`
|
||||
@@ -151,7 +149,47 @@ Environment variable: `AIDER_O1_MINI`
|
||||
Use o1-preview model for the main chat
|
||||
Environment variable: `AIDER_O1_PREVIEW`
|
||||
|
||||
## Model Settings:
|
||||
## API Keys and settings:
|
||||
|
||||
### `--openai-api-key VALUE`
|
||||
Specify the OpenAI API key
|
||||
Environment variable: `AIDER_OPENAI_API_KEY`
|
||||
|
||||
### `--anthropic-api-key VALUE`
|
||||
Specify the Anthropic API key
|
||||
Environment variable: `AIDER_ANTHROPIC_API_KEY`
|
||||
|
||||
### `--openai-api-base VALUE`
|
||||
Specify the api base url
|
||||
Environment variable: `AIDER_OPENAI_API_BASE`
|
||||
|
||||
### `--openai-api-type VALUE`
|
||||
(deprecated, use --set-env OPENAI_API_TYPE=<value>)
|
||||
Environment variable: `AIDER_OPENAI_API_TYPE`
|
||||
|
||||
### `--openai-api-version VALUE`
|
||||
(deprecated, use --set-env OPENAI_API_VERSION=<value>)
|
||||
Environment variable: `AIDER_OPENAI_API_VERSION`
|
||||
|
||||
### `--openai-api-deployment-id VALUE`
|
||||
(deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)
|
||||
Environment variable: `AIDER_OPENAI_API_DEPLOYMENT_ID`
|
||||
|
||||
### `--openai-organization-id VALUE`
|
||||
(deprecated, use --set-env OPENAI_ORGANIZATION=<value>)
|
||||
Environment variable: `AIDER_OPENAI_ORGANIZATION_ID`
|
||||
|
||||
### `--set-env ENV_VAR_NAME=value`
|
||||
Set an environment variable (to control API settings, can be used multiple times)
|
||||
Default: []
|
||||
Environment variable: `AIDER_SET_ENV`
|
||||
|
||||
### `--api-key PROVIDER=KEY`
|
||||
Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
|
||||
Default: []
|
||||
Environment variable: `AIDER_API_KEY`
|
||||
|
||||
## Model settings:
|
||||
|
||||
### `--list-models MODEL`
|
||||
List known models which match the (partial) MODEL name
|
||||
@@ -160,26 +198,6 @@ Aliases:
|
||||
- `--list-models MODEL`
|
||||
- `--models MODEL`
|
||||
|
||||
### `--openai-api-base OPENAI_API_BASE`
|
||||
Specify the api base url
|
||||
Environment variable: `OPENAI_API_BASE`
|
||||
|
||||
### `--openai-api-type OPENAI_API_TYPE`
|
||||
Specify the api_type
|
||||
Environment variable: `OPENAI_API_TYPE`
|
||||
|
||||
### `--openai-api-version OPENAI_API_VERSION`
|
||||
Specify the api_version
|
||||
Environment variable: `OPENAI_API_VERSION`
|
||||
|
||||
### `--openai-api-deployment-id OPENAI_API_DEPLOYMENT_ID`
|
||||
Specify the deployment_id
|
||||
Environment variable: `OPENAI_API_DEPLOYMENT_ID`
|
||||
|
||||
### `--openai-organization-id OPENAI_ORGANIZATION_ID`
|
||||
Specify the OpenAI organization ID
|
||||
Environment variable: `OPENAI_ORGANIZATION_ID`
|
||||
|
||||
### `--model-settings-file MODEL_SETTINGS_FILE`
|
||||
Specify a file with aider model settings for unknown models
|
||||
Default: .aider.model.settings.yml
|
||||
@@ -190,6 +208,10 @@ Specify a file with context window and costs for unknown models
|
||||
Default: .aider.model.metadata.json
|
||||
Environment variable: `AIDER_MODEL_METADATA_FILE`
|
||||
|
||||
### `--alias ALIAS:MODEL`
|
||||
Add a model alias (can be used multiple times)
|
||||
Environment variable: `AIDER_ALIAS`
|
||||
|
||||
### `--verify-ssl`
|
||||
Verify the SSL cert when connecting to models (default: True)
|
||||
Default: True
|
||||
@@ -198,6 +220,10 @@ Aliases:
|
||||
- `--verify-ssl`
|
||||
- `--no-verify-ssl`
|
||||
|
||||
### `--timeout VALUE`
|
||||
Timeout in seconds for API calls (default: None)
|
||||
Environment variable: `AIDER_TIMEOUT`
|
||||
|
||||
### `--edit-format EDIT_FORMAT`
|
||||
Specify what edit format the LLM should use (default depends on model)
|
||||
Environment variable: `AIDER_EDIT_FORMAT`
|
||||
@@ -233,12 +259,7 @@ Aliases:
|
||||
Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.
|
||||
Environment variable: `AIDER_MAX_CHAT_HISTORY_TOKENS`
|
||||
|
||||
### `--env-file ENV_FILE`
|
||||
Specify the .env file to load (default: .env in git root)
|
||||
Default: .env
|
||||
Environment variable: `AIDER_ENV_FILE`
|
||||
|
||||
## Cache Settings:
|
||||
## Cache settings:
|
||||
|
||||
### `--cache-prompts`
|
||||
Enable caching of prompts (default: False)
|
||||
@@ -253,7 +274,7 @@ Number of times to ping at 5min intervals to keep prompt cache warm (default: 0)
|
||||
Default: 0
|
||||
Environment variable: `AIDER_CACHE_KEEPALIVE_PINGS`
|
||||
|
||||
## Repomap Settings:
|
||||
## Repomap settings:
|
||||
|
||||
### `--map-tokens VALUE`
|
||||
Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)
|
||||
@@ -293,7 +314,7 @@ Aliases:
|
||||
Log the conversation with the LLM to this file (for example, .aider.llm.history)
|
||||
Environment variable: `AIDER_LLM_HISTORY_FILE`
|
||||
|
||||
## Output Settings:
|
||||
## Output settings:
|
||||
|
||||
### `--dark-mode`
|
||||
Use colors suitable for a dark terminal background (default: False)
|
||||
@@ -371,7 +392,7 @@ Show diffs when committing changes (default: False)
|
||||
Default: False
|
||||
Environment variable: `AIDER_SHOW_DIFFS`
|
||||
|
||||
## Git Settings:
|
||||
## Git settings:
|
||||
|
||||
### `--git`
|
||||
Enable/disable looking for a git repo (default: True)
|
||||
@@ -469,6 +490,14 @@ Skip the sanity check for the git repository (default: False)
|
||||
Default: False
|
||||
Environment variable: `AIDER_SKIP_SANITY_CHECK_REPO`
|
||||
|
||||
### `--watch-files`
|
||||
Enable/disable watching files for ai coding comments (default: False)
|
||||
Default: False
|
||||
Environment variable: `AIDER_WATCH_FILES`
|
||||
Aliases:
|
||||
- `--watch-files`
|
||||
- `--no-watch-files`
|
||||
|
||||
## Fixing and committing:
|
||||
|
||||
### `--lint`
|
||||
@@ -503,15 +532,14 @@ Aliases:
|
||||
- `--no-auto-test`
|
||||
|
||||
### `--test`
|
||||
Run tests and fix problems found
|
||||
Run tests, fix problems found and then exit
|
||||
Default: False
|
||||
Environment variable: `AIDER_TEST`
|
||||
|
||||
## Analytics:
|
||||
|
||||
### `--analytics`
|
||||
Enable/disable analytics for one session (default: False)
|
||||
Default: False
|
||||
Enable/disable analytics for current session (default: random)
|
||||
Environment variable: `AIDER_ANALYTICS`
|
||||
Aliases:
|
||||
- `--analytics`
|
||||
@@ -526,7 +554,120 @@ Permanently disable analytics
|
||||
Default: False
|
||||
Environment variable: `AIDER_ANALYTICS_DISABLE`
|
||||
|
||||
## Other Settings:
|
||||
## Upgrading:
|
||||
|
||||
### `--just-check-update`
|
||||
Check for updates and return status in the exit code
|
||||
Default: False
|
||||
Environment variable: `AIDER_JUST_CHECK_UPDATE`
|
||||
|
||||
### `--check-update`
|
||||
Check for new aider versions on launch
|
||||
Default: True
|
||||
Environment variable: `AIDER_CHECK_UPDATE`
|
||||
Aliases:
|
||||
- `--check-update`
|
||||
- `--no-check-update`
|
||||
|
||||
### `--show-release-notes`
|
||||
Show release notes on first run of new version (default: None, ask user)
|
||||
Environment variable: `AIDER_SHOW_RELEASE_NOTES`
|
||||
Aliases:
|
||||
- `--show-release-notes`
|
||||
- `--no-show-release-notes`
|
||||
|
||||
### `--install-main-branch`
|
||||
Install the latest version from the main branch
|
||||
Default: False
|
||||
Environment variable: `AIDER_INSTALL_MAIN_BRANCH`
|
||||
|
||||
### `--upgrade`
|
||||
Upgrade aider to the latest version from PyPI
|
||||
Default: False
|
||||
Environment variable: `AIDER_UPGRADE`
|
||||
Aliases:
|
||||
- `--upgrade`
|
||||
- `--update`
|
||||
|
||||
### `--version`
|
||||
Show the version number and exit
|
||||
|
||||
## Modes:
|
||||
|
||||
### `--message COMMAND`
|
||||
Specify a single message to send the LLM, process reply then exit (disables chat mode)
|
||||
Environment variable: `AIDER_MESSAGE`
|
||||
Aliases:
|
||||
- `--message COMMAND`
|
||||
- `--msg COMMAND`
|
||||
- `-m COMMAND`
|
||||
|
||||
### `--message-file MESSAGE_FILE`
|
||||
Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
|
||||
Environment variable: `AIDER_MESSAGE_FILE`
|
||||
Aliases:
|
||||
- `--message-file MESSAGE_FILE`
|
||||
- `-f MESSAGE_FILE`
|
||||
|
||||
### `--gui`
|
||||
Run aider in your browser (default: False)
|
||||
Default: False
|
||||
Environment variable: `AIDER_GUI`
|
||||
Aliases:
|
||||
- `--gui`
|
||||
- `--no-gui`
|
||||
- `--browser`
|
||||
- `--no-browser`
|
||||
|
||||
### `--copy-paste`
|
||||
Enable automatic copy/paste of chat between aider and web UI (default: False)
|
||||
Default: False
|
||||
Environment variable: `AIDER_COPY_PASTE`
|
||||
Aliases:
|
||||
- `--copy-paste`
|
||||
- `--no-copy-paste`
|
||||
|
||||
### `--apply FILE`
|
||||
Apply the changes from the given file instead of running the chat (debug)
|
||||
Environment variable: `AIDER_APPLY`
|
||||
|
||||
### `--apply-clipboard-edits`
|
||||
Apply clipboard contents as edits using the main model's editor format
|
||||
Default: False
|
||||
Environment variable: `AIDER_APPLY_CLIPBOARD_EDITS`
|
||||
|
||||
### `--exit`
|
||||
Do all startup activities then exit before accepting user input (debug)
|
||||
Default: False
|
||||
Environment variable: `AIDER_EXIT`
|
||||
|
||||
### `--show-repo-map`
|
||||
Print the repo map and exit (debug)
|
||||
Default: False
|
||||
Environment variable: `AIDER_SHOW_REPO_MAP`
|
||||
|
||||
### `--show-prompts`
|
||||
Print the system prompts and exit (debug)
|
||||
Default: False
|
||||
Environment variable: `AIDER_SHOW_PROMPTS`
|
||||
|
||||
## Voice settings:
|
||||
|
||||
### `--voice-format VOICE_FORMAT`
|
||||
Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
|
||||
Default: wav
|
||||
Environment variable: `AIDER_VOICE_FORMAT`
|
||||
|
||||
### `--voice-language VOICE_LANGUAGE`
|
||||
Specify the language for voice using ISO 639-1 code (default: auto)
|
||||
Default: en
|
||||
Environment variable: `AIDER_VOICE_LANGUAGE`
|
||||
|
||||
### `--voice-input-device VOICE_INPUT_DEVICE`
|
||||
Specify the input device name for voice recording
|
||||
Environment variable: `AIDER_VOICE_INPUT_DEVICE`
|
||||
|
||||
## Other settings:
|
||||
|
||||
### `--file FILE`
|
||||
specify a file to edit (can be used multiple times)
|
||||
@@ -545,44 +686,6 @@ Environment variable: `AIDER_VIM`
|
||||
Specify the language to use in the chat (default: None, uses system settings)
|
||||
Environment variable: `AIDER_CHAT_LANGUAGE`
|
||||
|
||||
### `--version`
|
||||
Show the version number and exit
|
||||
|
||||
### `--just-check-update`
|
||||
Check for updates and return status in the exit code
|
||||
Default: False
|
||||
Environment variable: `AIDER_JUST_CHECK_UPDATE`
|
||||
|
||||
### `--check-update`
|
||||
Check for new aider versions on launch
|
||||
Default: True
|
||||
Environment variable: `AIDER_CHECK_UPDATE`
|
||||
Aliases:
|
||||
- `--check-update`
|
||||
- `--no-check-update`
|
||||
|
||||
### `--install-main-branch`
|
||||
Install the latest version from the main branch
|
||||
Default: False
|
||||
Environment variable: `AIDER_INSTALL_MAIN_BRANCH`
|
||||
|
||||
### `--upgrade`
|
||||
Upgrade aider to the latest version from PyPI
|
||||
Default: False
|
||||
Environment variable: `AIDER_UPGRADE`
|
||||
Aliases:
|
||||
- `--upgrade`
|
||||
- `--update`
|
||||
|
||||
### `--apply FILE`
|
||||
Apply the changes from the given file instead of running the chat (debug)
|
||||
Environment variable: `AIDER_APPLY`
|
||||
|
||||
### `--apply-clipboard-edits`
|
||||
Apply clipboard contents as edits using the main model's editor format
|
||||
Default: False
|
||||
Environment variable: `AIDER_APPLY_CLIPBOARD_EDITS`
|
||||
|
||||
### `--yes-always`
|
||||
Always say yes to every confirmation
|
||||
Environment variable: `AIDER_YES_ALWAYS`
|
||||
@@ -595,36 +698,6 @@ Aliases:
|
||||
- `-v`
|
||||
- `--verbose`
|
||||
|
||||
### `--show-repo-map`
|
||||
Print the repo map and exit (debug)
|
||||
Default: False
|
||||
Environment variable: `AIDER_SHOW_REPO_MAP`
|
||||
|
||||
### `--show-prompts`
|
||||
Print the system prompts and exit (debug)
|
||||
Default: False
|
||||
Environment variable: `AIDER_SHOW_PROMPTS`
|
||||
|
||||
### `--exit`
|
||||
Do all startup activities then exit before accepting user input (debug)
|
||||
Default: False
|
||||
Environment variable: `AIDER_EXIT`
|
||||
|
||||
### `--message COMMAND`
|
||||
Specify a single message to send the LLM, process reply then exit (disables chat mode)
|
||||
Environment variable: `AIDER_MESSAGE`
|
||||
Aliases:
|
||||
- `--message COMMAND`
|
||||
- `--msg COMMAND`
|
||||
- `-m COMMAND`
|
||||
|
||||
### `--message-file MESSAGE_FILE`
|
||||
Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
|
||||
Environment variable: `AIDER_MESSAGE_FILE`
|
||||
Aliases:
|
||||
- `--message-file MESSAGE_FILE`
|
||||
- `-f MESSAGE_FILE`
|
||||
|
||||
### `--load LOAD_FILE`
|
||||
Load and execute /commands from a file on launch
|
||||
Environment variable: `AIDER_LOAD`
|
||||
@@ -640,15 +713,10 @@ Aliases:
|
||||
- `-c CONFIG_FILE`
|
||||
- `--config CONFIG_FILE`
|
||||
|
||||
### `--gui`
|
||||
Run aider in your browser (default: False)
|
||||
Default: False
|
||||
Environment variable: `AIDER_GUI`
|
||||
Aliases:
|
||||
- `--gui`
|
||||
- `--no-gui`
|
||||
- `--browser`
|
||||
- `--no-browser`
|
||||
### `--env-file ENV_FILE`
|
||||
Specify the .env file to load (default: .env in git root)
|
||||
Default: .env
|
||||
Environment variable: `AIDER_ENV_FILE`
|
||||
|
||||
### `--suggest-shell-commands`
|
||||
Enable/disable suggesting shell commands (default: True)
|
||||
@@ -666,15 +734,23 @@ Aliases:
|
||||
- `--fancy-input`
|
||||
- `--no-fancy-input`
|
||||
|
||||
## Voice Settings:
|
||||
### `--multiline`
|
||||
Enable/disable multi-line input mode with Meta-Enter to submit (default: False)
|
||||
Default: False
|
||||
Environment variable: `AIDER_MULTILINE`
|
||||
Aliases:
|
||||
- `--multiline`
|
||||
- `--no-multiline`
|
||||
|
||||
### `--voice-format VOICE_FORMAT`
|
||||
Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
|
||||
Default: wav
|
||||
Environment variable: `AIDER_VOICE_FORMAT`
|
||||
### `--detect-urls`
|
||||
Enable/disable detection and offering to add URLs to chat (default: True)
|
||||
Default: True
|
||||
Environment variable: `AIDER_DETECT_URLS`
|
||||
Aliases:
|
||||
- `--detect-urls`
|
||||
- `--no-detect-urls`
|
||||
|
||||
### `--voice-language VOICE_LANGUAGE`
|
||||
Specify the language for voice using ISO 639-1 code (default: auto)
|
||||
Default: en
|
||||
Environment variable: `AIDER_VOICE_LANGUAGE`
|
||||
### `--editor VALUE`
|
||||
Specify which editor to use for the /editor command
|
||||
Environment variable: `AIDER_EDITOR`
|
||||
<!--[[[end]]]-->
|
||||
|
||||
@@ -60,6 +60,23 @@ directory you start in.
|
||||
You can also create a `.aiderignore` file to tell aider
|
||||
to ignore parts of the repo that aren't relevant to your task.
|
||||
This file conforms to `.gitignore` syntax and conventions.
|
||||
For example, to focus only on specific directories in a monorepo,
|
||||
you could create a `.aiderignore` file with:
|
||||
|
||||
```
|
||||
# Ignore everything
|
||||
/*
|
||||
|
||||
# Allow specific directories and their contents
|
||||
!foo/
|
||||
!bar/
|
||||
!baz/
|
||||
|
||||
# Allow nested files under these directories
|
||||
!foo/**
|
||||
!bar/**
|
||||
!baz/**
|
||||
```
|
||||
|
||||
You can use `--aiderignore <filename>` to name a specific file
|
||||
to use for ignore patterns.
|
||||
@@ -152,7 +169,10 @@ python -m aider
|
||||
|
||||
## Can I change the system prompts that aider uses?
|
||||
|
||||
Aider is set up to support different system prompts and edit formats
|
||||
The most convenient way to add custom instructions is to use a
|
||||
[conventions file](https://aider.chat/docs/usage/conventions.html).
|
||||
|
||||
But, aider is set up to support different actual system prompts and edit formats
|
||||
in a modular way. If you look in the `aider/coders` subdirectory, you'll
|
||||
see there's a base coder with base prompts, and then there are
|
||||
a number of
|
||||
@@ -193,13 +213,25 @@ You can also refer to the
|
||||
## How are the "aider wrote xx% of code" stats computed?
|
||||
|
||||
[Aider is tightly integrated with git](/docs/git.html) so all
|
||||
one of aider's code changes are committed to the repo with proper attribution.
|
||||
of aider's code changes are committed to the repo with proper attribution.
|
||||
The
|
||||
[stats are computed](https://github.com/Aider-AI/aider/blob/main/scripts/blame.py)
|
||||
by doing something like `git blame` on the repo,
|
||||
and counting up who wrote all the new lines of code in each release.
|
||||
Only lines in source code files are counted, not documentation or prompt files.
|
||||
|
||||
## Why is the LLM speaking to me in an unexpected language?
|
||||
|
||||
Aider goes to some effort to prompt the model to use the language that is configured
|
||||
for your system.
|
||||
But LLMs aren't fully reliable, and they sometimes decide to speak in
|
||||
an unexpected language.
|
||||
Claude is especially fond of speaking French.
|
||||
|
||||
You can explicitly set the language that aider tells the model to use with
|
||||
`--chat-language <language>`.
|
||||
But the LLM may not comply.
|
||||
|
||||
## Can I share my aider chat transcript?
|
||||
|
||||
Yes, you can now share aider chat logs in a pretty way.
|
||||
|
||||
@@ -15,7 +15,7 @@ for more details,
|
||||
or the
|
||||
[usage instructions](https://aider.chat/docs/usage.html) to start coding with aider.
|
||||
|
||||
{% include python-m-aider.md %}
|
||||
{% include venv-pipx.md %}
|
||||
|
||||
<div class="video-container">
|
||||
<video controls poster="/assets/install.jpg">
|
||||
|
||||
@@ -33,28 +33,28 @@ To work with Anthropic's models like Claude 3.5 Sonnet you need a paid
|
||||
|
||||
## Mac/Linux install
|
||||
|
||||
```
|
||||
```bash
|
||||
# Install aider
|
||||
python -m pip install -U --upgrade-strategy only-if-needed aider-chat
|
||||
|
||||
# To work with GPT-4o:
|
||||
$ aider --4o --openai-api-key sk-xxx...
|
||||
aider --4o --openai-api-key sk-xxx...
|
||||
|
||||
# To work with Claude 3.5 Sonnet:
|
||||
$ aider --sonnet --anthropic-api-key sk-xxx...
|
||||
aider --sonnet --anthropic-api-key sk-xxx...
|
||||
```
|
||||
|
||||
## Windows install
|
||||
|
||||
```
|
||||
```bash
|
||||
# Install aider
|
||||
python -m pip install -U --upgrade-strategy only-if-needed aider-chat
|
||||
|
||||
# To work with GPT-4o:
|
||||
$ aider --4o --openai-api-key sk-xxx...
|
||||
aider --4o --openai-api-key sk-xxx...
|
||||
|
||||
# To work with Claude 3.5 Sonnet:
|
||||
$ aider --sonnet --anthropic-api-key sk-xxx...
|
||||
aider --sonnet --anthropic-api-key sk-xxx...
|
||||
```
|
||||
|
||||
{% include python-m-aider.md %}
|
||||
|
||||
@@ -53,6 +53,7 @@ Installing PortAudio is completely optional, but can usually be accomplished lik
|
||||
- For Windows, there is no need to install PortAudio.
|
||||
- For Mac, do `brew install portaudio`
|
||||
- For Linux, do `sudo apt-get install libportaudio2`
|
||||
- Some linux environments may also need `sudo apt install libasound2-plugins`
|
||||
|
||||
## Add aider to your editor
|
||||
|
||||
|
||||
@@ -5,29 +5,20 @@ nav_order: 100
|
||||
|
||||
# Install with pipx
|
||||
|
||||
If you are using aider to work on a python project, sometimes your project will require
|
||||
specific versions of python packages which conflict with the versions that aider
|
||||
requires.
|
||||
If this happens, the `python -m pip install` command may return errors like these:
|
||||
A recommended way to install aider is with pipx:
|
||||
|
||||
```
|
||||
aider-chat 0.23.0 requires somepackage==X.Y.Z, but you have somepackage U.W.V which is incompatible.
|
||||
```
|
||||
|
||||
You can avoid this problem by installing aider using `pipx`,
|
||||
which will install it globally on your system
|
||||
within its own python environment.
|
||||
This way you can use aider to work on any python project,
|
||||
even if that project has conflicting dependencies.
|
||||
|
||||
Install [pipx](https://pipx.pypa.io/stable/) then just do:
|
||||
|
||||
```
|
||||
```bash
|
||||
python -m pip install pipx # If you need to install pipx
|
||||
pipx install aider-chat
|
||||
```
|
||||
|
||||
See also the
|
||||
[docs on other methods for installing pipx itself](https://pipx.pypa.io/stable/installation/).
|
||||
|
||||
|
||||
## pipx on replit
|
||||
|
||||
{% include replit-pipx.md %}
|
||||
|
||||
|
||||
{% include conflicts.md %}
|
||||
|
||||
18
aider/website/docs/install/uv.md
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
parent: Installation
|
||||
nav_order: 100
|
||||
---
|
||||
|
||||
# Install with uv
|
||||
|
||||
A recommended way to install aider is with uv:
|
||||
|
||||
```bash
|
||||
python -m pip install uv # If you need to install uv
|
||||
uv tool install --python python3.12 aider-chat
|
||||
```
|
||||
|
||||
See also the
|
||||
[docs on other methods for installing uv itself](https://docs.astral.sh/uv/getting-started/installation/).
|
||||
|
||||
{% include conflicts.md %}
|
||||
@@ -31,6 +31,8 @@ This measures the LLM's coding ability, and whether it can
|
||||
write new code that integrates into existing code.
|
||||
The model also has to successfully apply all its changes to the source file without human intervention.
|
||||
|
||||
<input type="text" id="editSearchInput" placeholder="Search..." style="width: 100%; max-width: 800px; margin: 10px auto; padding: 8px; display: block; border: 1px solid #ddd; border-radius: 4px;">
|
||||
|
||||
<table style="width: 100%; max-width: 800px; margin: auto; border-collapse: collapse; box-shadow: 0 2px 4px rgba(0,0,0,0.1); font-size: 14px;">
|
||||
<thead style="background-color: #f2f2f2;">
|
||||
<tr>
|
||||
@@ -56,83 +58,10 @@ The model also has to successfully apply all its changes to the source file with
|
||||
</table>
|
||||
|
||||
<canvas id="editChart" width="800" height="450" style="margin-top: 20px"></canvas>
|
||||
<script src="https://unpkg.com/patternomaly/dist/patternomaly.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var ctx = document.getElementById('editChart').getContext('2d');
|
||||
const HIGHTLIGHT_MODEL = 'no no no no';
|
||||
var leaderboardData = {
|
||||
labels: [],
|
||||
datasets: [{
|
||||
label: 'Percent completed correctly',
|
||||
data: [],
|
||||
backgroundColor: function(context) {
|
||||
const label = context.chart.data.labels[context.dataIndex] || '';
|
||||
return (label && label.includes(HIGHTLIGHT_MODEL)) ? 'rgba(255, 99, 132, 0.2)' : 'rgba(54, 162, 235, 0.2)';
|
||||
},
|
||||
borderColor: function(context) {
|
||||
const label = context.chart.data.labels[context.dataIndex] || '';
|
||||
return (label && label.includes(HIGHTLIGHT_MODEL)) ? 'rgba(255, 99, 132, 1)' : 'rgba(54, 162, 235, 1)';
|
||||
},
|
||||
borderWidth: 1
|
||||
}]
|
||||
};
|
||||
|
||||
var allData = [];
|
||||
{% for row in edit_sorted %}
|
||||
allData.push({
|
||||
model: '{{ row.model }}',
|
||||
pass_rate_2: {{ row.pass_rate_2 }},
|
||||
percent_cases_well_formed: {{ row.percent_cases_well_formed }}
|
||||
});
|
||||
{% endfor %}
|
||||
|
||||
function updateChart() {
|
||||
var selectedRows = document.querySelectorAll('tr.selected');
|
||||
var showAll = selectedRows.length === 0;
|
||||
|
||||
leaderboardData.labels = [];
|
||||
leaderboardData.datasets[0].data = [];
|
||||
|
||||
allData.forEach(function(row, index) {
|
||||
var rowElement = document.getElementById('edit-row-' + index);
|
||||
if (showAll) {
|
||||
rowElement.classList.remove('selected');
|
||||
}
|
||||
if (showAll || rowElement.classList.contains('selected')) {
|
||||
leaderboardData.labels.push(row.model);
|
||||
leaderboardData.datasets[0].data.push(row.pass_rate_2);
|
||||
}
|
||||
});
|
||||
|
||||
leaderboardChart.update();
|
||||
}
|
||||
|
||||
var tableBody = document.querySelector('table tbody');
|
||||
allData.forEach(function(row, index) {
|
||||
var tr = tableBody.children[index];
|
||||
tr.id = 'edit-row-' + index;
|
||||
tr.style.cursor = 'pointer';
|
||||
tr.onclick = function() {
|
||||
this.classList.toggle('selected');
|
||||
updateChart();
|
||||
};
|
||||
});
|
||||
|
||||
var leaderboardChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: leaderboardData,
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
updateChart();
|
||||
});
|
||||
{% include edit-leaderboard.js %}
|
||||
</script>
|
||||
<style>
|
||||
tr.selected {
|
||||
@@ -158,6 +87,8 @@ The refactoring benchmark requires a large context window to
|
||||
work with large source files.
|
||||
Therefore, results are available for fewer models.
|
||||
|
||||
<input type="text" id="refacSearchInput" placeholder="Search..." style="width: 100%; max-width: 800px; margin: 10px auto; padding: 8px; display: block; border: 1px solid #ddd; border-radius: 4px;">
|
||||
|
||||
<table style="width: 100%; max-width: 800px; margin: auto; border-collapse: collapse; box-shadow: 0 2px 4px rgba(0,0,0,0.1); font-size: 14px;">
|
||||
<thead style="background-color: #f2f2f2;">
|
||||
<tr>
|
||||
@@ -183,76 +114,10 @@ Therefore, results are available for fewer models.
|
||||
</table>
|
||||
|
||||
<canvas id="refacChart" width="800" height="450" style="margin-top: 20px"></canvas>
|
||||
<script src="https://unpkg.com/patternomaly/dist/patternomaly.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var ctx = document.getElementById('refacChart').getContext('2d');
|
||||
var leaderboardData = {
|
||||
labels: [],
|
||||
datasets: [{
|
||||
label: 'Percent completed correctly',
|
||||
data: [],
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||
borderColor: 'rgba(54, 162, 235, 1)',
|
||||
borderWidth: 1
|
||||
}]
|
||||
};
|
||||
|
||||
var allData = [];
|
||||
{% for row in refac_sorted %}
|
||||
allData.push({
|
||||
model: '{{ row.model }}',
|
||||
pass_rate_1: {{ row.pass_rate_1 }},
|
||||
percent_cases_well_formed: {{ row.percent_cases_well_formed }}
|
||||
});
|
||||
{% endfor %}
|
||||
|
||||
function updateChart() {
|
||||
var selectedRows = document.querySelectorAll('tr.selected');
|
||||
var showAll = selectedRows.length === 0;
|
||||
|
||||
leaderboardData.labels = [];
|
||||
leaderboardData.datasets[0].data = [];
|
||||
|
||||
allData.forEach(function(row, index) {
|
||||
var rowElement = document.getElementById('refac-row-' + index);
|
||||
if (showAll) {
|
||||
rowElement.classList.remove('selected');
|
||||
}
|
||||
if (showAll || rowElement.classList.contains('selected')) {
|
||||
leaderboardData.labels.push(row.model);
|
||||
leaderboardData.datasets[0].data.push(row.pass_rate_1);
|
||||
}
|
||||
});
|
||||
|
||||
leaderboardChart.update();
|
||||
}
|
||||
|
||||
var tableBody = document.querySelectorAll('table tbody')[1];
|
||||
allData.forEach(function(row, index) {
|
||||
var tr = tableBody.children[index];
|
||||
tr.id = 'refac-row-' + index;
|
||||
tr.style.cursor = 'pointer';
|
||||
tr.onclick = function() {
|
||||
this.classList.toggle('selected');
|
||||
updateChart();
|
||||
};
|
||||
});
|
||||
|
||||
var leaderboardChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: leaderboardData,
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
updateChart();
|
||||
});
|
||||
{% include refactor-leaderboard.js %}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -318,6 +183,6 @@ mod_dates = [get_last_modified_date(file) for file in files]
|
||||
latest_mod_date = max(mod_dates)
|
||||
cog.out(f"{latest_mod_date.strftime('%B %d, %Y.')}")
|
||||
]]]-->
|
||||
November 11, 2024.
|
||||
December 11, 2024.
|
||||
<!--[[[end]]]-->
|
||||
</p>
|
||||
|
||||
@@ -69,7 +69,7 @@ We make reasonable efforts to protect your information by using physical and ele
|
||||
|
||||
### Children’s Privacy
|
||||
|
||||
We do not knowingly collect, maintain, or use personal information from children under 18 years of age, and no part of our Service(s) is directed to children. If you learn that a child has provided us with personal information in violation of this Privacy Policy, then you may alert us at [INSERT EMAIL ADDRESS].
|
||||
We do not knowingly collect, maintain, or use personal information from children under 18 years of age, and no part of our Service(s) is directed to children. If you learn that a child has provided us with personal information in violation of this Privacy Policy, then you may alert us at privacy@aider.chat.
|
||||
|
||||
### International Visitors
|
||||
|
||||
@@ -98,7 +98,7 @@ if result.returncode == 0:
|
||||
date = datetime.datetime.fromtimestamp(timestamp)
|
||||
cog.out(f"{date.strftime('%B %d, %Y.')}")
|
||||
]]]-->
|
||||
October 31, 2024.
|
||||
December 06, 2024.
|
||||
<!--[[[end]]]-->
|
||||
|
||||
</p>
|
||||
|
||||
@@ -39,12 +39,18 @@ export AWS_PROFILE=your-profile
|
||||
You can add these to your
|
||||
[.env file](/docs/config/dotenv.html).
|
||||
|
||||
## Bedrock with `pipx` installation
|
||||
## Install boto3
|
||||
|
||||
The AWS Bedrock provider requires the `boto3` package in order to function correctly. To use aider installed via `pipx` with AWS Bedrock, you must add the `boto3` dependency to aider's virtual environment by running
|
||||
The AWS Bedrock provider requires the `boto3` package in order to function correctly:
|
||||
|
||||
```bash
|
||||
pip install boto3
|
||||
```
|
||||
pipx inject aider boto3
|
||||
|
||||
To use aider installed via `pipx` with AWS Bedrock, you must add the `boto3` dependency to aider's virtual environment by running
|
||||
|
||||
```bash
|
||||
pipx inject aider-chat boto3
|
||||
```
|
||||
|
||||
|
||||
@@ -56,12 +62,18 @@ Once your AWS credentials are set up, you can run Aider with the `--model` comma
|
||||
aider --model bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0
|
||||
```
|
||||
|
||||
Sometimes it seems to help if you prefix the model name with "us.":
|
||||
|
||||
```bash
|
||||
aider --model bedrock/us.anthropic.claude-3-5-sonnet-20240620-v1:0
|
||||
```
|
||||
|
||||
|
||||
## Available Models
|
||||
|
||||
To see some models available via Bedrock, run:
|
||||
|
||||
```
|
||||
```bash
|
||||
aider --list-models bedrock/
|
||||
```
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
parent: Connecting to LLMs
|
||||
nav_order: 850
|
||||
---
|
||||
|
||||
# Editing format
|
||||
|
||||
Aider uses different "edit formats" to collect code edits from different LLMs.
|
||||
The "whole" format is the easiest for an LLM to use, but it uses a lot of tokens
|
||||
and may limit how large a file can be edited.
|
||||
Models which can use one of the diff formats are much more efficient,
|
||||
using far fewer tokens.
|
||||
Models that use a diff-like format are able to
|
||||
edit larger files with less cost and without hitting token limits.
|
||||
|
||||
Aider is configured to use the best edit format for the popular OpenAI and Anthropic models
|
||||
and the [other models recommended on the LLM page](https://aider.chat/docs/llms.html).
|
||||
For lesser known models aider will default to using the "whole" editing format
|
||||
since it is the easiest format for an LLM to use.
|
||||
|
||||
If you would like to experiment with the more advanced formats, you can
|
||||
use these switches: `--edit-format diff` or `--edit-format udiff`.
|
||||
@@ -5,15 +5,17 @@ nav_order: 300
|
||||
|
||||
# Gemini
|
||||
|
||||
Google currently offers
|
||||
[*free* API access to the Gemini 1.5 Pro model](https://ai.google.dev/pricing).
|
||||
This is the most capable free model to use with aider,
|
||||
with code editing capability that's comparable to GPT-3.5.
|
||||
You'll need a [Gemini API key](https://aistudio.google.com/app/u/2/apikey).
|
||||
|
||||
```
|
||||
python -m pip install -U aider-chat
|
||||
|
||||
# You may need to install google-generativeai
|
||||
pip install -U google-generativeai
|
||||
|
||||
# Or with pipx...
|
||||
pipx inject aider-chat google-generativeai
|
||||
|
||||
export GEMINI_API_KEY=<key> # Mac/Linux
|
||||
setx GEMINI_API_KEY <key> # Windows, restart shell after setx
|
||||
|
||||
|
||||
26
aider/website/docs/llms/lm-studio.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
parent: Connecting to LLMs
|
||||
nav_order: 400
|
||||
---
|
||||
|
||||
# LM Studio
|
||||
|
||||
To use LM Studio:
|
||||
|
||||
```
|
||||
python -m pip install -U aider-chat
|
||||
|
||||
export LM_STUDIO_API_KEY=<key> # Mac/Linux
|
||||
setx LM_STUDIO_API_KEY <key> # Windows, restart shell after setx
|
||||
|
||||
export LM_STUDIO_API_BASE=<url> # Mac/Linux
|
||||
setx LM_STUDIO_API_BASE <url> # Windows, restart shell after setx
|
||||
|
||||
aider --model lm_studio/<your-model-name>
|
||||
```
|
||||
|
||||
|
||||
|
||||
See the [model warnings](warnings.html)
|
||||
section for information on warnings which will occur
|
||||
when working with models that aider is not familiar with.
|
||||
@@ -20,24 +20,49 @@ python -m pip install -U aider-chat
|
||||
export OLLAMA_API_BASE=http://127.0.0.1:11434 # Mac/Linux
|
||||
setx OLLAMA_API_BASE http://127.0.0.1:11434 # Windows, restart shell after setx
|
||||
|
||||
aider --model ollama/<model>
|
||||
aider --model ollama_chat/<model>
|
||||
```
|
||||
|
||||
In particular, `llama3:70b` works well with aider:
|
||||
{: .note }
|
||||
Using `ollama_chat/` is recommended over `ollama/`.
|
||||
|
||||
|
||||
```
|
||||
ollama pull llama3:70b
|
||||
ollama serve
|
||||
|
||||
# In another terminal window...
|
||||
export OLLAMA_API_BASE=http://127.0.0.1:11434 # Mac/Linux
|
||||
setx OLLAMA_API_BASE http://127.0.0.1:11434 # Windows, restart shell after setx
|
||||
|
||||
aider --model ollama/llama3:70b
|
||||
```
|
||||
|
||||
See the [model warnings](warnings.html)
|
||||
section for information on warnings which will occur
|
||||
when working with models that aider is not familiar with.
|
||||
|
||||
## API Key
|
||||
|
||||
If you are using an ollama that requires an API key you can set `OLLAMA_API_KEY`:
|
||||
|
||||
```
|
||||
export OLLAMA_API_KEY=<api-key> # Mac/Linux
|
||||
setx OLLAMA_API_KEY <api-key> # Windows, restart shell after setx
|
||||
```
|
||||
|
||||
## Setting the context window size
|
||||
|
||||
[Ollama uses a 2k context window by default](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-specify-the-context-window-size),
|
||||
which is very small for working with aider.
|
||||
|
||||
Aider sets Ollama's context window to 8k by default.
|
||||
If you would like
|
||||
a larger context window
|
||||
you can use a
|
||||
[`.aider.model.settings.yml` file](https://aider.chat/docs/config/adv-model-settings.html#model-settings)
|
||||
like this:
|
||||
|
||||
```
|
||||
- name: ollama/qwen2.5-coder:32b-instruct-fp16
|
||||
extra_params:
|
||||
num_ctx: 8192
|
||||
```
|
||||
|
||||
Unlike most other LLM servers, Ollama does not throw an error if you submit
|
||||
a request that exceeds the context window.
|
||||
Instead, it just silently truncates the request by discarding the "oldest" messages
|
||||
in the chat to make it fit within the context window.
|
||||
So if your context window is too small, you won't get an error.
|
||||
Aider will probably just fail to work well and experience
|
||||
a lot of
|
||||
[file editing problems](https://aider.chat/docs/troubleshooting/edit-errors.html).
|
||||
|
||||
24
aider/website/docs/llms/xai.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
parent: Connecting to LLMs
|
||||
nav_order: 400
|
||||
---
|
||||
|
||||
# xAI
|
||||
|
||||
You'll need a [xAI API key](https://console.x.ai.).
|
||||
|
||||
To use xAI:
|
||||
|
||||
```
|
||||
python -m pip install -U aider-chat
|
||||
|
||||
export XAI_API_KEY=<key> # Mac/Linux
|
||||
setx XAI_API_KEY <key> # Windows, restart shell after setx
|
||||
|
||||
aider --model xai/grok-beta
|
||||
|
||||
# List models available from xAI
|
||||
aider --list-models xai/
|
||||
```
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ features and commands are most used.
|
||||
It also helps uncover bugs that users are experiencing, so that they can be fixed
|
||||
in upcoming releases.
|
||||
|
||||
## Enabling & disabling analytics
|
||||
## Disabling analytics
|
||||
|
||||
You can opt out of analytics forever by running this command one time:
|
||||
|
||||
@@ -39,10 +39,27 @@ You can opt out of analytics forever by running this command one time:
|
||||
aider --analytics-disable
|
||||
```
|
||||
|
||||
To enable analytics for a single session, you can run aider with `--analytics`.
|
||||
This will *not* have any effect if you have permanently disabled analytics with the previous command.
|
||||
## Enabling analytics
|
||||
|
||||
The first time, you will need to agree to opt-in.
|
||||
The `--[no-]analytics` switch controls whether analytics are enabled for the
|
||||
current session:
|
||||
|
||||
- `--analytics` will turn on analytics for the current session.
|
||||
This will *not* have any effect if you have permanently disabled analytics
|
||||
with `--analytics-disable`.
|
||||
If this is the first time you have enabled analytics, aider
|
||||
will confirm you wish to opt-in to analytics.
|
||||
- `--no-analytics` will turn off analytics for the current session.
|
||||
- By default, if you don't provide `--analytics` or `--no-analytics`,
|
||||
aider will enable analytics for a random subset of users.
|
||||
This will never happen if you have permanently disabled analytics
|
||||
with `--analytics-disable`.
|
||||
Randomly selected users will be asked if they wish to opt-in to analytics.
|
||||
|
||||
|
||||
## Opting in
|
||||
|
||||
The first time analytics are enabled, you will need to agree to opt-in.
|
||||
|
||||
```
|
||||
aider --analytics
|
||||
@@ -53,13 +70,8 @@ For more info: https://aider.chat/docs/more/analytics.html
|
||||
Allow collection of anonymous analytics to help improve aider? (Y)es/(N)o [Yes]:
|
||||
```
|
||||
|
||||
If you've added `analytics: true` to your
|
||||
[yaml config file](/docs/config/aider_conf.html),
|
||||
you can disable analytics for a single session, you can run:
|
||||
If you say "no", analytics will be permanently disabled.
|
||||
|
||||
```
|
||||
aider --no-analytics
|
||||
```
|
||||
|
||||
## Details about data being collected
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ cog.out(model_list)
|
||||
]]]-->
|
||||
- anthropic.claude-3-5-haiku-20241022-v1:0
|
||||
- anthropic.claude-3-5-sonnet-20241022-v2:0
|
||||
- anthropic/claude-3-5-sonnet-20241022
|
||||
- claude-3-5-haiku-20241022
|
||||
- claude-3-5-sonnet-20240620
|
||||
- claude-3-5-sonnet-20241022
|
||||
@@ -91,11 +90,17 @@ cog.out(model_list)
|
||||
- openrouter/anthropic/claude-3.5-sonnet
|
||||
- us.anthropic.claude-3-5-haiku-20241022-v1:0
|
||||
- us.anthropic.claude-3-5-sonnet-20241022-v2:0
|
||||
- vertex_ai/claude-3-5-haiku
|
||||
- vertex_ai/claude-3-5-haiku@20241022
|
||||
- vertex_ai/claude-3-5-sonnet
|
||||
- vertex_ai/claude-3-5-sonnet-v2
|
||||
- vertex_ai/claude-3-5-sonnet-v2@20241022
|
||||
- vertex_ai/claude-3-5-sonnet@20240620
|
||||
- vertex_ai/claude-3-haiku
|
||||
- vertex_ai/claude-3-haiku@20240307
|
||||
- vertex_ai/claude-3-opus
|
||||
- vertex_ai/claude-3-opus@20240229
|
||||
- vertex_ai/claude-3-sonnet
|
||||
- vertex_ai/claude-3-sonnet@20240229
|
||||
<!--[[[end]]]-->
|
||||
|
||||
|
||||
@@ -96,5 +96,5 @@ coder = Coder.create(model=model, fnames=fnames, io=io)
|
||||
```
|
||||
|
||||
{: .note }
|
||||
The scripting API is not officially supported or documented and may
|
||||
change without warning.
|
||||
The python scripting API is not officially supported or documented,
|
||||
and could change in future releases without providing backwards compatibility.
|
||||
|
||||
@@ -42,7 +42,14 @@ disobeying the system prompt instructions.
|
||||
Most local models are just barely capable of working with aider,
|
||||
so editing errors are probably unavoidable.
|
||||
|
||||
Local models which have been quantized are even more likely to have problems
|
||||
## Local models: context window and quantization
|
||||
|
||||
Be especially careful about the
|
||||
[Ollama context window](https://aider.chat/docs/llms/ollama.html#setting-the-context-window-size)
|
||||
when working with local models.
|
||||
It defaults to be very small and silently discards data if you exceed it.
|
||||
|
||||
Local models which have been quantized are more likely to have editing problems
|
||||
because they are not capable enough to follow aider's system prompts.
|
||||
|
||||
## Try the whole edit format
|
||||
|
||||
@@ -12,11 +12,12 @@ Every LLM has limits on how many tokens it can process for each request:
|
||||
- Each model has limit on how many **output tokens** it can
|
||||
produce.
|
||||
|
||||
Aider will report an error if a model responds indicating that
|
||||
Aider will report an error **if a model responds** indicating that
|
||||
it has exceeded a token limit.
|
||||
The error will include suggested actions to try and
|
||||
avoid hitting token limits.
|
||||
Here's an example error:
|
||||
|
||||
Here's an example error:
|
||||
|
||||
```
|
||||
Model gpt-3.5-turbo has hit a token limit!
|
||||
@@ -33,6 +34,11 @@ To reduce output tokens:
|
||||
For more info: https://aider.chat/docs/token-limits.html
|
||||
```
|
||||
|
||||
{: .note }
|
||||
Aider never *enforces* token limits, it only *reports* token limit errors
|
||||
from the API provider.
|
||||
The token counts that aider reports are *estimates*.
|
||||
|
||||
## Input tokens & context window size
|
||||
|
||||
The most common problem is trying to send too much data to a
|
||||
|
||||
@@ -3,7 +3,14 @@ parent: Usage
|
||||
nav_order: 50
|
||||
description: Control aider with in-chat commands like /add, /model, etc.
|
||||
---
|
||||
|
||||
# In-chat commands
|
||||
{: .no_toc }
|
||||
|
||||
- TOC
|
||||
{:toc}
|
||||
|
||||
## Slash commands
|
||||
|
||||
Aider supports commands from within the chat, which all start with `/`.
|
||||
|
||||
@@ -22,8 +29,10 @@ cog.out(get_help_md())
|
||||
| **/code** | Ask for changes to your code |
|
||||
| **/commit** | Commit edits to the repo made outside the chat (commit message optional) |
|
||||
| **/copy** | Copy the last assistant message to the clipboard |
|
||||
| **/copy-context** | Copy the current chat context as markdown, suitable to paste into a web UI |
|
||||
| **/diff** | Display the diff of changes since the last message |
|
||||
| **/drop** | Remove files from the chat session to free up context space |
|
||||
| **/editor** | Open an editor to write a prompt |
|
||||
| **/exit** | Exit the application |
|
||||
| **/git** | Run a git command (output excluded from chat) |
|
||||
| **/help** | Ask questions about aider |
|
||||
@@ -34,9 +43,10 @@ cog.out(get_help_md())
|
||||
| **/map-refresh** | Force a refresh of the repository map |
|
||||
| **/model** | Switch to a new LLM |
|
||||
| **/models** | Search the list of available models |
|
||||
| **/multiline-mode** | Toggle multiline mode (swaps behavior of Enter and Meta+Enter) |
|
||||
| **/paste** | Paste image/text from the clipboard into the chat. Optionally provide a name for the image. |
|
||||
| **/quit** | Exit the application |
|
||||
| **/read-only** | Add files to the chat that are for reference, not to be edited |
|
||||
| **/read-only** | Add files to the chat that are for reference only, or turn added files to read-only |
|
||||
| **/report** | Report a problem by opening a GitHub Issue |
|
||||
| **/reset** | Drop all files and clear the chat history |
|
||||
| **/run** | Run a shell command and optionally add the output to the chat (alias: !) |
|
||||
@@ -69,8 +79,10 @@ The interactive prompt is built with [prompt-toolkit](https://github.com/prompt-
|
||||
|
||||
### Emacs
|
||||
|
||||
- `Up Arrow` : Scroll back through previously sent messages.
|
||||
- `Down Arrow` : Scroll forward through previously sent messages.
|
||||
- `Up Arrow` : Move up one line in the current message.
|
||||
- `Down Arrow` : Move down one line in the current message.
|
||||
- `Ctrl-Up` : Scroll back through previously sent messages.
|
||||
- `Ctrl-Down` : Scroll forward through previously sent messages.
|
||||
- `Ctrl-A` : Move cursor to the start of the line.
|
||||
- `Ctrl-B` : Move cursor back one character.
|
||||
- `Ctrl-D` : Delete the character under the cursor.
|
||||
@@ -87,8 +99,10 @@ The interactive prompt is built with [prompt-toolkit](https://github.com/prompt-
|
||||
|
||||
To use vi/vim keybindings, run aider with the `--vim` switch.
|
||||
|
||||
- `Up Arrow` : Scroll back through previously sent messages.
|
||||
- `Down Arrow` : Scroll forward through previously sent messages.
|
||||
- `Up Arrow` : Move up one line in the current message.
|
||||
- `Down Arrow` : Move down one line in the current message.
|
||||
- `Ctrl-Up` : Scroll back through previously sent messages.
|
||||
- `Ctrl-Down` : Scroll forward through previously sent messages.
|
||||
- `Esc` : Switch to command mode.
|
||||
- `i` : Switch to insert mode.
|
||||
- `a` : Move cursor one character to the right and switch to insert mode.
|
||||
|
||||
@@ -28,6 +28,11 @@ or `aider --read CONVENTIONS.md`.
|
||||
This way it is marked as read-only, and cached if prompt caching
|
||||
is enabled.
|
||||
|
||||
## Community contributed conventions
|
||||
|
||||
You can check the [aider conventions repository](https://github.com/Aider-AI/conventions)
|
||||
to find or contribute conventions files.
|
||||
|
||||
## Always load conventions
|
||||
|
||||
You can also configure aider to always load your conventions file
|
||||
|
||||
121
aider/website/docs/usage/copypaste.md
Normal file
@@ -0,0 +1,121 @@
|
||||
---
|
||||
title: Copy/paste with web chat
|
||||
#highlight_image: /assets/browser.jpg
|
||||
parent: Usage
|
||||
nav_order: 850
|
||||
description: Aider works with LLM web chat UIs
|
||||
---
|
||||
|
||||
# Copy/paste with web chat
|
||||
|
||||
<div class="video-container">
|
||||
<video controls loop poster="/assets/copypaste.jpg">
|
||||
<source src="/assets/copypaste.mp4" type="video/mp4">
|
||||
<a href="/assets/copypaste.mp4">Aider browser UI demo video</a>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.video-container {
|
||||
position: relative;
|
||||
padding-bottom: 66.34%; /* 2160 / 3256 = 0.6634 */
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.video-container video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
## Working with an LLM web chat
|
||||
|
||||
[Aider can connect to most LLMs via API](https://aider.chat/docs/llms.html) and works best that way.
|
||||
But there are times when you may want to work with an LLM via its web chat interface:
|
||||
|
||||
- Workplace policies may limit your LLM usage to a proprietary web chat system.
|
||||
- The web chat LLM may have access to unique context or may have been specially fine tuned for your task.
|
||||
- It may be cost prohibitive to use some models via API.
|
||||
- There may not be an API available.
|
||||
|
||||
Aider has features for working with an LLM via its web chat interface.
|
||||
This allows you to use the web chat LLM as the "big brain code architect"
|
||||
while running aider with a smaller, cheaper LLM to actually make changes
|
||||
to your local files.
|
||||
|
||||
For this "file editor" part of the process
|
||||
you can run aider with many open source, free or very inexpensive LLMs.
|
||||
For example, the demo video above shows aider using DeepSeek to apply the changes
|
||||
that o1-preview is suggesting in the web chat.
|
||||
|
||||
### Copy aider's code context to your clipboard, paste into the web UI
|
||||
|
||||
The `/copy-context <instructions>` command can be used in chat to copy aider's code context to your clipboard.
|
||||
It will include:
|
||||
|
||||
- All the files which have been added to the chat via `/add`.
|
||||
- Any read only files which have been added via `/read`.
|
||||
- Aider's [repository map](https://aider.chat/docs/repomap.html) that brings in code context related to the above files from elsewhere in your git repo.
|
||||
- Some instructions to the LLM that ask it to output change instructions concisely.
|
||||
- If you include `<instructions>`, they will be copied too.
|
||||
|
||||
You can paste the context into your browser, and start interacting with the LLM web chat to
|
||||
ask for code changes.
|
||||
|
||||
### Paste the LLM's reply back into aider to edit your files
|
||||
|
||||
Once the LLM has replied, you can use the "copy response" button in the web UI to copy
|
||||
the LLM's response.
|
||||
Back in aider, you can run `/paste` and aider will edit your files
|
||||
to implement the changes suggested by the LLM.
|
||||
|
||||
You can use a cheap, efficient model like GPT-4o Mini, DeepSeek or Qwen to do these edits.
|
||||
This works best if you run aider with `--edit-format editor-diff` or `--edit-format editor-whole`.
|
||||
|
||||
### Copy/paste mode
|
||||
|
||||
Aider has a `--copy-paste` mode that streamlines this entire process:
|
||||
|
||||
- Whenever you `/add` or `/read` files, aider will automatically copy the entire, updated
|
||||
code context to your clipboard.
|
||||
You'll see "Copied code context to clipboard" whenever this happens.
|
||||
- When you copy the LLM reply to your clipboard outside aider, aider will automatically notice
|
||||
and load it into the aider chat.
|
||||
Just press ENTER to send the message
|
||||
and aider will apply the LLMs changes to your local files.
|
||||
- Aider will automatically select the best edit format for this copy/paste functionality.
|
||||
Depending on the LLM you have aider use, it will be either `editor-whole` or `editor-diff`.
|
||||
|
||||
## Terms of service
|
||||
|
||||
Be sure to review the Terms Of Service of any LLM web chat service you use with
|
||||
these features.
|
||||
These features are not intended to be used in violation of any service's Terms Of Service (TOS).
|
||||
|
||||
Aider's web chat features have been designed to be compliant with the
|
||||
terms of service of most LLM web chats.
|
||||
|
||||
There are 4 copy/paste steps involved when coding with an LLM web chat:
|
||||
|
||||
1. Copy code and context from aider.
|
||||
2. Paste the code and context into the LLM web chat.
|
||||
3. Copy the reply from the LLM web chat.
|
||||
4. Paste the LLM reply into aider.
|
||||
|
||||
Most LLM web chat TOS prohibit automating steps (2) and (3) where code
|
||||
is copied from and pasted into the web chat.
|
||||
Aider's `--copy-paste` mode leaves those as 100% manual steps for the user to complete.
|
||||
It simply streamlines steps (1) and (4) that are interactions with aider,
|
||||
and which should not be under the scope of an LLM web chat TOS.
|
||||
|
||||
If you are concerned that
|
||||
the automatic interactions with aider in steps (1) and (4) may be problematic with respect to
|
||||
your LLM web chat provider's TOS, you can forego `--copy-paste` mode.
|
||||
Instead, manually use the `/copy-context` and `/paste` commands if that
|
||||
will keep you in compliance.
|
||||
|
||||
Again, do not use these features in violation of any service's Terms Of Service.
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
parent: Usage
|
||||
nav_order: 60
|
||||
description: Using the chat, ask and help chat modes.
|
||||
description: Using the code, architect, ask and help chat modes.
|
||||
---
|
||||
|
||||
# Chat modes
|
||||
|
||||