mirror of
https://github.com/Aider-AI/aider
synced 2026-05-05 06:32:04 +02:00
Compare commits
642 Commits
v0.76.3.de
...
v0.78.1.de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2b8d36d9e | ||
|
|
8d43d4ee21 | ||
|
|
b54af5dbe3 | ||
|
|
4980e901a0 | ||
|
|
cd32311c1f | ||
|
|
b97997b009 | ||
|
|
4aad9fbdd4 | ||
|
|
ac2439e25b | ||
|
|
ddc1556ae0 | ||
|
|
0d75c4d0e3 | ||
|
|
f3a042dcdf | ||
|
|
f9e0a99064 | ||
|
|
d6906fb100 | ||
|
|
821662abcb | ||
|
|
cf496abec0 | ||
|
|
e245d39216 | ||
|
|
44f87c2c17 | ||
|
|
a6fd0de762 | ||
|
|
072ecba4c5 | ||
|
|
3ad5d75bee | ||
|
|
8679c425e0 | ||
|
|
1ec257278e | ||
|
|
ffe89362ab | ||
|
|
a82c0f9e49 | ||
|
|
413271e82a | ||
|
|
60b926b698 | ||
|
|
98be67442e | ||
|
|
8e9c75b6f8 | ||
|
|
8c65604b29 | ||
|
|
930923c211 | ||
|
|
710d540dcd | ||
|
|
ddef8c2499 | ||
|
|
c6289c2bea | ||
|
|
b624bb6fb8 | ||
|
|
4e03f4165d | ||
|
|
2f6ea2f499 | ||
|
|
8c47d1f9c0 | ||
|
|
e31be8d3c9 | ||
|
|
2069ad62d1 | ||
|
|
2993e285c8 | ||
|
|
4ee9cee52a | ||
|
|
0e555699bd | ||
|
|
aad6c63206 | ||
|
|
8c78e09f03 | ||
|
|
25d1eac0f5 | ||
|
|
26daf2cd31 | ||
|
|
280bd44ba3 | ||
|
|
c9d87fef71 | ||
|
|
649742f02a | ||
|
|
245ee84c2d | ||
|
|
76c09205d0 | ||
|
|
d365b5248c | ||
|
|
3dd91bc6f2 | ||
|
|
3dc5a48fcc | ||
|
|
bff077f855 | ||
|
|
6022b09437 | ||
|
|
62b52a78fe | ||
|
|
e33dc9355d | ||
|
|
834da07736 | ||
|
|
fe795cc2d5 | ||
|
|
593de47438 | ||
|
|
ac231e43ad | ||
|
|
aca64071c8 | ||
|
|
5c205cd753 | ||
|
|
57ce2c48b8 | ||
|
|
0937b34983 | ||
|
|
291c4eb258 | ||
|
|
a8744708a0 | ||
|
|
3010b94a64 | ||
|
|
9c4d173b1f | ||
|
|
cca155c5c6 | ||
|
|
a93e7108e6 | ||
|
|
d26df6c178 | ||
|
|
e915964d81 | ||
|
|
1304ca2425 | ||
|
|
894f6b6d1d | ||
|
|
6605a9b22a | ||
|
|
b5d963d151 | ||
|
|
8f840ae0b1 | ||
|
|
7942ca9206 | ||
|
|
a5614bfe40 | ||
|
|
eaac00ad3f | ||
|
|
6687cc9465 | ||
|
|
5b9464ed31 | ||
|
|
4c7d99b26c | ||
|
|
5bf248164a | ||
|
|
4eeae967db | ||
|
|
0ac2a85a3e | ||
|
|
71884e58d4 | ||
|
|
37b2f9617c | ||
|
|
01af14693c | ||
|
|
90e2929fc5 | ||
|
|
8f260aa544 | ||
|
|
ee72a09278 | ||
|
|
e6a422b6c2 | ||
|
|
d29aff919b | ||
|
|
5023bbe8c0 | ||
|
|
c08e3daf29 | ||
|
|
9cf194b52b | ||
|
|
1b0ba71ef0 | ||
|
|
de5ab102b7 | ||
|
|
4e2c7c3329 | ||
|
|
b62840c347 | ||
|
|
674379fe30 | ||
|
|
004ffb9f60 | ||
|
|
bed836b15a | ||
|
|
bbf219ecd2 | ||
|
|
022bf4bdcc | ||
|
|
d8ed90a2c0 | ||
|
|
e5d9d91b01 | ||
|
|
c8f6576cd7 | ||
|
|
14f140fdc5 | ||
|
|
fdbe169423 | ||
|
|
e4ec370e2a | ||
|
|
dfbdb43c31 | ||
|
|
9b8606535d | ||
|
|
0b79fd0a8e | ||
|
|
f032606f32 | ||
|
|
b652a8416d | ||
|
|
8f7b50f3df | ||
|
|
2adafad4e2 | ||
|
|
99a5862bc9 | ||
|
|
6dda54f431 | ||
|
|
8e187a913f | ||
|
|
8935c87d7a | ||
|
|
c6e544750b | ||
|
|
c14d406f59 | ||
|
|
4edfe39449 | ||
|
|
1239d77c88 | ||
|
|
7d4b0b20e8 | ||
|
|
1f42cdd762 | ||
|
|
f182b81e0f | ||
|
|
3f2256d4c4 | ||
|
|
e4b1b12b26 | ||
|
|
35477e0a5a | ||
|
|
f752c9c8a9 | ||
|
|
d5dd7b0a96 | ||
|
|
4e16eba6b0 | ||
|
|
4f129e1c9d | ||
|
|
ffbbb5539d | ||
|
|
30e5b48461 | ||
|
|
0dc31011f5 | ||
|
|
479df00a3b | ||
|
|
06f3e15ce9 | ||
|
|
2f7fde163a | ||
|
|
71d26c2ec5 | ||
|
|
acf8b40a28 | ||
|
|
318027d9e1 | ||
|
|
3116e833a7 | ||
|
|
1cb71b33fa | ||
|
|
7e76b8d0c3 | ||
|
|
e0e78cd879 | ||
|
|
82e4dcf40f | ||
|
|
22b77ad14f | ||
|
|
9b23975f09 | ||
|
|
584c3a65f5 | ||
|
|
db4d6c4419 | ||
|
|
92cb1c60d1 | ||
|
|
ca72d0ca5b | ||
|
|
ba7f245d88 | ||
|
|
ef67ba5cf4 | ||
|
|
1f630a03b9 | ||
|
|
5f71cdc497 | ||
|
|
b85226b8a5 | ||
|
|
af4acccf9f | ||
|
|
3a3bc9898d | ||
|
|
5349c99c74 | ||
|
|
68d175f1c5 | ||
|
|
352f1f31d2 | ||
|
|
c51ef714ad | ||
|
|
5ae68a3c48 | ||
|
|
d2c7e51fac | ||
|
|
d9aa3fb973 | ||
|
|
e1b79ddd69 | ||
|
|
3270a8737c | ||
|
|
cbe8d320fa | ||
|
|
78ce63e71e | ||
|
|
1bb396bea5 | ||
|
|
16304beeab | ||
|
|
d2cfd541ed | ||
|
|
8b1aaf690c | ||
|
|
f1ca8f594c | ||
|
|
78d2e0aa25 | ||
|
|
4a3d239082 | ||
|
|
94eaee8d39 | ||
|
|
471f03ab4f | ||
|
|
9df9af822c | ||
|
|
7b49623b31 | ||
|
|
12bda2b8d0 | ||
|
|
2022f214aa | ||
|
|
786738ba81 | ||
|
|
e4f1b59475 | ||
|
|
7cb302f571 | ||
|
|
8bae91cf6e | ||
|
|
44a145fc86 | ||
|
|
a1fa62adef | ||
|
|
fe247a8f6a | ||
|
|
54e70eff13 | ||
|
|
5453f4a85d | ||
|
|
f2654390e7 | ||
|
|
777903f7da | ||
|
|
2f7892561f | ||
|
|
6d79000d6c | ||
|
|
284911cd6b | ||
|
|
70b6da108c | ||
|
|
6de3b2b262 | ||
|
|
e7554c5413 | ||
|
|
2facd2ab16 | ||
|
|
20ba252c56 | ||
|
|
eba123e381 | ||
|
|
3bb57af331 | ||
|
|
aeb991fdf3 | ||
|
|
75a14380ef | ||
|
|
0aeecf4d9a | ||
|
|
447347c760 | ||
|
|
79619de045 | ||
|
|
1af423e2df | ||
|
|
92fcf9a159 | ||
|
|
d1b1cc5c14 | ||
|
|
b9514ad82a | ||
|
|
7b3411b236 | ||
|
|
915e87e88e | ||
|
|
face505f0d | ||
|
|
dada307e79 | ||
|
|
5124c512c9 | ||
|
|
89f579c1ba | ||
|
|
0035f28035 | ||
|
|
4d556d9235 | ||
|
|
dd5ef29355 | ||
|
|
ca9922ef0a | ||
|
|
b674a0a5e8 | ||
|
|
541d0e6f5c | ||
|
|
fc96e980fb | ||
|
|
1425e3e6c7 | ||
|
|
b9d3c11032 | ||
|
|
81b65e0de3 | ||
|
|
0f80f6af27 | ||
|
|
5eedf98aae | ||
|
|
8f45a2ef3d | ||
|
|
9d51d4a572 | ||
|
|
9978c8ea48 | ||
|
|
e779358429 | ||
|
|
8d663cc3d6 | ||
|
|
a98ca30438 | ||
|
|
589cb2ac79 | ||
|
|
d973be8fea | ||
|
|
41c3b59755 | ||
|
|
8bf168da47 | ||
|
|
0d85c06be2 | ||
|
|
fadede7305 | ||
|
|
a24d31fbba | ||
|
|
c9d463443a | ||
|
|
0e3d486658 | ||
|
|
574ab6bdda | ||
|
|
a172d15463 | ||
|
|
a1362b946a | ||
|
|
6ecb4c5ece | ||
|
|
63c1320f36 | ||
|
|
bf484ce4c4 | ||
|
|
1700212f30 | ||
|
|
751ca3bf75 | ||
|
|
01be8bc64e | ||
|
|
a9e8005b14 | ||
|
|
871cff6232 | ||
|
|
1de8f5ceda | ||
|
|
dd4d2420df | ||
|
|
e9b1a98314 | ||
|
|
f0f48e8e30 | ||
|
|
89b008e1eb | ||
|
|
fb3f8439e2 | ||
|
|
f0e66d2bfb | ||
|
|
65ec254c1b | ||
|
|
47c0d95bd4 | ||
|
|
55d7bed563 | ||
|
|
9a4f3b8d8e | ||
|
|
d9c5ce15f3 | ||
|
|
292908288b | ||
|
|
7fec2661fc | ||
|
|
0cee8bc6ac | ||
|
|
37d867e47e | ||
|
|
c1338fe92f | ||
|
|
1e90a679c0 | ||
|
|
ddb7b9cb8b | ||
|
|
31e1604d99 | ||
|
|
e11c32bca5 | ||
|
|
16309dc077 | ||
|
|
8a1b496cd5 | ||
|
|
99cf99e014 | ||
|
|
f2e9b06dbd | ||
|
|
6cce7c34c2 | ||
|
|
dd2efac3ae | ||
|
|
14c0e50721 | ||
|
|
68e218d002 | ||
|
|
0a026e71b7 | ||
|
|
5175a8c7ca | ||
|
|
661e0cfc71 | ||
|
|
9ff6f35330 | ||
|
|
ab5a066780 | ||
|
|
c2d649e655 | ||
|
|
f82bb65810 | ||
|
|
e76c54b18e | ||
|
|
43658055d3 | ||
|
|
0b71fded7f | ||
|
|
03d1bada2a | ||
|
|
ad76355299 | ||
|
|
c98d409f0a | ||
|
|
9084673fd7 | ||
|
|
8d7300a522 | ||
|
|
7c10600044 | ||
|
|
277da37047 | ||
|
|
f6d697ed2b | ||
|
|
f247927244 | ||
|
|
7097e62582 | ||
|
|
e577bab263 | ||
|
|
274c40793f | ||
|
|
afbe9266e7 | ||
|
|
195ed3e6b6 | ||
|
|
ed8ace7884 | ||
|
|
14761ebec2 | ||
|
|
50d8a19397 | ||
|
|
719324981d | ||
|
|
182c06107f | ||
|
|
d4d4852a0c | ||
|
|
f352fed313 | ||
|
|
5dfce2d199 | ||
|
|
6aafac544b | ||
|
|
2589c29b1c | ||
|
|
076c38526a | ||
|
|
9fd5cfa777 | ||
|
|
c01db8783d | ||
|
|
77101a96a1 | ||
|
|
46863b470c | ||
|
|
736c1f7e1e | ||
|
|
4cf9679334 | ||
|
|
89c9290602 | ||
|
|
3ba75c5a62 | ||
|
|
4ceaed7183 | ||
|
|
f310497d47 | ||
|
|
94bcaa71e6 | ||
|
|
67bdccbda6 | ||
|
|
f89dabbd0a | ||
|
|
76eee60ad5 | ||
|
|
ac4e4959eb | ||
|
|
7316635aba | ||
|
|
feb277049f | ||
|
|
35d5febd7d | ||
|
|
97a3bfca4e | ||
|
|
cf58133e06 | ||
|
|
0d1811a4ae | ||
|
|
2a8bb715f0 | ||
|
|
cf93869d3f | ||
|
|
77976a5253 | ||
|
|
5af46aaa2e | ||
|
|
679c634459 | ||
|
|
cc33fc2822 | ||
|
|
4f4b10fd86 | ||
|
|
26789115b6 | ||
|
|
87a28dcb9f | ||
|
|
1ad99f39e2 | ||
|
|
dfbeec199e | ||
|
|
41a99ec29d | ||
|
|
7cee3aa1f1 | ||
|
|
b86d8099f1 | ||
|
|
9c4a0043dd | ||
|
|
5cde755976 | ||
|
|
51aab7b656 | ||
|
|
791dc213fa | ||
|
|
8404165db3 | ||
|
|
aee52c01a3 | ||
|
|
58e16b0c48 | ||
|
|
3225ac88c0 | ||
|
|
38b8b85ec2 | ||
|
|
278f748c1c | ||
|
|
874df40303 | ||
|
|
0465d8ce80 | ||
|
|
e9b3f5fd43 | ||
|
|
c49bc2418b | ||
|
|
fd21f5195d | ||
|
|
a1aa63fa06 | ||
|
|
b0a619c714 | ||
|
|
ec648f2c6f | ||
|
|
7ac7c72e03 | ||
|
|
f1d00dbd7f | ||
|
|
f644aba7a8 | ||
|
|
ed75287c8c | ||
|
|
a035c73c41 | ||
|
|
781a619262 | ||
|
|
e08b63cc9f | ||
|
|
97ed57a252 | ||
|
|
71f1779c8c | ||
|
|
116f44cade | ||
|
|
2ebdd689ab | ||
|
|
beecc1a718 | ||
|
|
557ba2adc1 | ||
|
|
89780c1283 | ||
|
|
411e7f86c1 | ||
|
|
610fce67e1 | ||
|
|
d9350cd3ed | ||
|
|
54d6643a1f | ||
|
|
f664420628 | ||
|
|
d4d4c6de68 | ||
|
|
b4313599f8 | ||
|
|
6866f8f0a9 | ||
|
|
3cb478214b | ||
|
|
8d7b4d6446 | ||
|
|
cc6b0bcd72 | ||
|
|
831564cf48 | ||
|
|
4e59b62026 | ||
|
|
f345b9b0ff | ||
|
|
d4fb88a8c4 | ||
|
|
2cb1b6be46 | ||
|
|
feda315c2b | ||
|
|
41219a7d85 | ||
|
|
813a201b6a | ||
|
|
1bc40d48fe | ||
|
|
ddb4e51938 | ||
|
|
9ee67c343d | ||
|
|
bb816eae83 | ||
|
|
92bd446d09 | ||
|
|
a7526fa9c4 | ||
|
|
9b6ff487da | ||
|
|
9d61490743 | ||
|
|
9cce6e41fa | ||
|
|
a56dbdf502 | ||
|
|
7d5f27fa34 | ||
|
|
a61ba0db22 | ||
|
|
7f02a889e2 | ||
|
|
88d388a574 | ||
|
|
4d5a659e1e | ||
|
|
ecfcf1071d | ||
|
|
ec385d45e9 | ||
|
|
985107bb4b | ||
|
|
eb340c74ac | ||
|
|
9a16b33f00 | ||
|
|
0acebc5916 | ||
|
|
8442d9fe5f | ||
|
|
5318dd1a80 | ||
|
|
d916180ec8 | ||
|
|
6e5aa08ee0 | ||
|
|
83e115cde5 | ||
|
|
a3a92cd5dd | ||
|
|
16fc10fb0f | ||
|
|
6bba8b57d4 | ||
|
|
f45c75a137 | ||
|
|
3348df0652 | ||
|
|
3b6a01b63d | ||
|
|
a3554a95c5 | ||
|
|
6fa9af20c0 | ||
|
|
e23437dfa4 | ||
|
|
dcf9eaad77 | ||
|
|
768df05692 | ||
|
|
e0d5d35e32 | ||
|
|
a718a05414 | ||
|
|
953391d9d0 | ||
|
|
4ca229fd42 | ||
|
|
693a43efc8 | ||
|
|
f3d4c931f5 | ||
|
|
ece21315b1 | ||
|
|
318cc57ffe | ||
|
|
ba17924174 | ||
|
|
6bc9daa6ee | ||
|
|
2d8bc95bae | ||
|
|
520eb4a932 | ||
|
|
03733516cc | ||
|
|
e561130336 | ||
|
|
169fa2e7b7 | ||
|
|
6d6db996fb | ||
|
|
f8642bfd94 | ||
|
|
dfdd6bf533 | ||
|
|
91cef71048 | ||
|
|
3daf632384 | ||
|
|
dba5fb9dfa | ||
|
|
70d10a0bb2 | ||
|
|
97291b806a | ||
|
|
c583f008e9 | ||
|
|
b182eba56f | ||
|
|
de5da0e7ce | ||
|
|
f2a893c0d4 | ||
|
|
371a03c794 | ||
|
|
88e3d48be5 | ||
|
|
e8a8681a75 | ||
|
|
b541eec3b8 | ||
|
|
ce3f732645 | ||
|
|
1b3cae1ed5 | ||
|
|
024b9130a0 | ||
|
|
61a8b6020f | ||
|
|
d25877aace | ||
|
|
c3c2d4dc22 | ||
|
|
7454154599 | ||
|
|
04ecea614b | ||
|
|
084a14b640 | ||
|
|
a477759a49 | ||
|
|
d4df207612 | ||
|
|
57d492d4b8 | ||
|
|
fb7413436c | ||
|
|
2cc8105e68 | ||
|
|
a83d5ff123 | ||
|
|
a709d650df | ||
|
|
570e8eae31 | ||
|
|
22f1703bee | ||
|
|
14037eaeb8 | ||
|
|
189d64dc3d | ||
|
|
315f8093c6 | ||
|
|
a776d70e0d | ||
|
|
1ab6c70ac7 | ||
|
|
73eb8701dd | ||
|
|
a503f291e7 | ||
|
|
b54d800024 | ||
|
|
d74068464d | ||
|
|
86a5e8dbe1 | ||
|
|
24d2b683c8 | ||
|
|
9451f0abe4 | ||
|
|
544d58ddbd | ||
|
|
7c1d2d75e0 | ||
|
|
0b949f47d9 | ||
|
|
393b45dd21 | ||
|
|
6bb43555dc | ||
|
|
ba03b07602 | ||
|
|
0ac4c0b97d | ||
|
|
41e93a4d94 | ||
|
|
a0b5b19d38 | ||
|
|
65fad5ae30 | ||
|
|
a689f2116c | ||
|
|
68b5c90d95 | ||
|
|
44eb9af7bc | ||
|
|
9e824e6070 | ||
|
|
ba6bb527a7 | ||
|
|
3525eeae54 | ||
|
|
e535e01e83 | ||
|
|
3b1c81e50e | ||
|
|
89406e5b7d | ||
|
|
d5cc855c0f | ||
|
|
2ed61eaf92 | ||
|
|
865f71e2cc | ||
|
|
08a75808df | ||
|
|
c9dd37db8e | ||
|
|
7e86c8a90c | ||
|
|
b87a5496e9 | ||
|
|
9a88363437 | ||
|
|
c0b9665cfc | ||
|
|
70284ce1c2 | ||
|
|
48621dadaa | ||
|
|
e69bad57e4 | ||
|
|
f55099e969 | ||
|
|
76994facec | ||
|
|
2d843f6e79 | ||
|
|
e15518dd29 | ||
|
|
011e0fd109 | ||
|
|
5f125c1812 | ||
|
|
a6ebed8d16 | ||
|
|
849e02cbfb | ||
|
|
1ab5238405 | ||
|
|
ae6192111d | ||
|
|
59af4114dd | ||
|
|
4491b88763 | ||
|
|
92377fc390 | ||
|
|
79b8e50412 | ||
|
|
b5cd39cc50 | ||
|
|
63c2a98f3c | ||
|
|
c168f78a13 | ||
|
|
42d45b4037 | ||
|
|
c41df63629 | ||
|
|
330bb81206 | ||
|
|
d84c755ee8 | ||
|
|
a24ff28031 | ||
|
|
3a837c472e | ||
|
|
f4880e2ef3 | ||
|
|
a2e4022e31 | ||
|
|
5668b41daa | ||
|
|
c052270048 | ||
|
|
70547171ca | ||
|
|
881868bf17 | ||
|
|
e90eb39a9b | ||
|
|
9513d307a1 | ||
|
|
533e5ec03f | ||
|
|
55f63395c7 | ||
|
|
4253d98a73 | ||
|
|
0c4af58866 | ||
|
|
a5919bd27d | ||
|
|
5e40974fdd | ||
|
|
a27f4d0e04 | ||
|
|
1bb3041298 | ||
|
|
dc6040adda | ||
|
|
864725ff3d | ||
|
|
0fcbea03e5 | ||
|
|
2ce63e6ad3 | ||
|
|
d45af94cee | ||
|
|
1f874b654d | ||
|
|
a7a21757bc | ||
|
|
1bed4e8972 | ||
|
|
efcda12dda | ||
|
|
d7b4079ab5 | ||
|
|
2eb1513612 | ||
|
|
87bcbe0420 | ||
|
|
26b0c6e6da | ||
|
|
8cfbc9b827 | ||
|
|
46eee9e642 | ||
|
|
7d902d2f3e | ||
|
|
3d05007024 | ||
|
|
a2bf2e2910 | ||
|
|
9cf4286cee | ||
|
|
c9ddca3a16 | ||
|
|
06370cb096 | ||
|
|
342586519d | ||
|
|
89174bb524 | ||
|
|
1fa3bc4018 | ||
|
|
d68e2b33fb | ||
|
|
1313cd8216 | ||
|
|
7afc8c760c | ||
|
|
79f714ab16 | ||
|
|
e21bab2d17 | ||
|
|
4288cf2a39 | ||
|
|
9d570a9cb1 | ||
|
|
333ddfb37a | ||
|
|
10a5250527 | ||
|
|
fd57eccdca | ||
|
|
1432be9be6 | ||
|
|
1773bbf759 | ||
|
|
5c94624186 | ||
|
|
dc06c2fab3 | ||
|
|
f37799b39c | ||
|
|
cc84f590fe | ||
|
|
afcf3e77b5 | ||
|
|
0406dda2a6 | ||
|
|
935227f7e7 | ||
|
|
67ebb2566d | ||
|
|
1c736161c5 | ||
|
|
a348c2d013 | ||
|
|
444a95bc6c | ||
|
|
c38cdef220 | ||
|
|
5608db0892 | ||
|
|
98b3722a02 | ||
|
|
2d623ff196 | ||
|
|
703e124277 | ||
|
|
68c27f885f | ||
|
|
58cd190ca9 | ||
|
|
2c5c2b2f67 | ||
|
|
e10fe50c6f | ||
|
|
b8ad0b15e8 | ||
|
|
1b81fb0fdf | ||
|
|
10d599f26a | ||
|
|
6b76ed8098 |
45
HISTORY.md
45
HISTORY.md
@@ -1,5 +1,50 @@
|
|||||||
# Release history
|
# Release history
|
||||||
|
|
||||||
|
### Aider v0.78.0
|
||||||
|
|
||||||
|
- Added model setting validation to ignore `--reasoning-effort` and `--thinking-tokens` if the model doesn't support them.
|
||||||
|
- Added `--check-model-accepts-settings` flag (default: true) to force unsupported model settings.
|
||||||
|
- Annotated which models support reasoning_effort and thinking_tokens settings in the model settings data.
|
||||||
|
- Improved code block rendering in markdown output with better padding using NoInsetMarkdown.
|
||||||
|
- Added `--git-commit-verify` flag (default: False) to control whether git commit hooks are bypassed.
|
||||||
|
- Added support for thinking tokens for OpenRouter Sonnet 3.7.
|
||||||
|
- Fixed autocompletion for `/ask`, `/code`, and `/architect` commands, by shladnik.
|
||||||
|
- Added vi-like behavior when pressing enter in multiline-mode while in vi normal/navigation-mode, by Marco Mayer.
|
||||||
|
- Added commands to switch between model types: `/editor-model` for Editor Model, and `/weak-model` for Weak Model, by csala.
|
||||||
|
- Added AWS_PROFILE support for Bedrock models, allowing use of AWS profiles instead of explicit credentials, by lentil32.
|
||||||
|
- Enhanced `--aiderignore` argument to resolve both absolute and relative paths, by mopemope.
|
||||||
|
- Improved platform information handling to gracefully handle retrieval errors.
|
||||||
|
- Aider wrote 92% of the code in this release.
|
||||||
|
|
||||||
|
### Aider v0.77.1
|
||||||
|
|
||||||
|
- Bumped dependencies to pickup litellm fix for Ollama.
|
||||||
|
- Added support for `openrouter/google/gemma-3-27b-it` model.
|
||||||
|
- Updated exclude patterns for documentation.
|
||||||
|
|
||||||
|
### Aider v0.77.0
|
||||||
|
|
||||||
|
- Big upgrade in [programming languages supported](https://aider.chat/docs/languages.html) by adopting [tree-sitter-language-pack](https://github.com/Goldziher/tree-sitter-language-pack/).
|
||||||
|
- 130 new languages with linter support.
|
||||||
|
- 20 new languages with repo-map support.
|
||||||
|
- Added `/think-tokens` command to set thinking token budget with support for human-readable formats (8k, 10.5k, 0.5M).
|
||||||
|
- Added `/reasoning-effort` command to control model reasoning level.
|
||||||
|
- The `/think-tokens` and `/reasoning-effort` commands display current settings when called without arguments.
|
||||||
|
- Display of thinking token budget and reasoning effort in model information.
|
||||||
|
- Changed `--thinking-tokens` argument to accept string values with human-readable formats.
|
||||||
|
- Added `--auto-accept-architect` flag (default: true) to automatically accept changes from architect coder format without confirmation.
|
||||||
|
- Added support for `cohere_chat/command-a-03-2025` and `gemini/gemma-3-27b-it`
|
||||||
|
- The bare `/drop` command now preserves original read-only files provided via args.read.
|
||||||
|
- Fixed a bug where default model would be set by deprecated `--shortcut` switches even when already specified in the command line.
|
||||||
|
- Improved AutoCompleter to require 3 characters for autocompletion to reduce noise.
|
||||||
|
- Aider wrote 72% of the code in this release.
|
||||||
|
|
||||||
|
### Aider v0.76.2
|
||||||
|
|
||||||
|
- Fixed handling of JSONDecodeError when loading model cache file.
|
||||||
|
- Fixed handling of GitCommandError when retrieving git user configuration.
|
||||||
|
- Aider wrote 75% of the code in this release.
|
||||||
|
|
||||||
### Aider v0.76.1
|
### Aider v0.76.1
|
||||||
|
|
||||||
- Added ignore_permission_denied option to file watcher to prevent errors when accessing restricted files, by Yutaka Matsubara.
|
- Added ignore_permission_denied option to file watcher to prevent errors when accessing restricted files, by Yutaka Matsubara.
|
||||||
|
|||||||
187
README.md
187
README.md
@@ -1,144 +1,111 @@
|
|||||||
|
<p align="center">
|
||||||
|
<a href="https://aider.chat/"><img src="https://aider.chat/assets/logo.svg" alt="Aider Logo" width="300"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<!-- Edit README.md, not index.md -->
|
<h1 align="center">
|
||||||
|
AI Pair Programming in Your Terminal
|
||||||
|
</h1>
|
||||||
|
|
||||||
# Aider is AI pair programming in your terminal
|
|
||||||
|
|
||||||
Aider lets you pair program with LLMs,
|
<p align="center">
|
||||||
to edit code in your local git repository.
|
Aider lets you pair program with LLMs to start a new project or build on your existing codebase.
|
||||||
Start a new project or work with an existing code base.
|
</p>
|
||||||
Aider works best with Claude 3.7 Sonnet, DeepSeek R1 & Chat V3, OpenAI o1, o3-mini & GPT-4o. Aider can [connect to almost any LLM, including local models](https://aider.chat/docs/llms.html).
|
|
||||||
|
|
||||||
<!-- SCREENCAST START -->
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img
|
<img
|
||||||
src="https://aider.chat/assets/screencast.svg"
|
src="https://aider.chat/assets/screencast.svg"
|
||||||
alt="aider screencast"
|
alt="aider screencast"
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
<!-- SCREENCAST END -->
|
|
||||||
|
|
||||||
<!-- VIDEO START
|
|
||||||
<p align="center">
|
|
||||||
<video style="max-width: 100%; height: auto;" autoplay loop muted playsinline>
|
|
||||||
<source src="/assets/shell-cmds-small.mp4" type="video/mp4">
|
|
||||||
Your browser does not support the video tag.
|
|
||||||
</video>
|
|
||||||
</p>
|
|
||||||
VIDEO END -->
|
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://discord.gg/Tv2uQnR88V">
|
|
||||||
<img src="https://img.shields.io/badge/Join-Discord-blue.svg"/>
|
|
||||||
</a>
|
|
||||||
<a href="https://aider.chat/docs/install.html">
|
|
||||||
<img src="https://img.shields.io/badge/Read-Docs-green.svg"/>
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
<!--[[[cog
|
<!--[[[cog
|
||||||
# We can't "include" here.
|
from scripts.badges import get_badges_md
|
||||||
# Because this page is rendered by GitHub as the repo README
|
text = get_badges_md()
|
||||||
cog.out(open("aider/website/_includes/get-started.md").read())
|
cog.out(text)
|
||||||
]]]-->
|
]]]-->
|
||||||
|
<a href="https://github.com/Aider-AI/aider/stargazers"><img alt="GitHub Stars" title="Total number of GitHub stars the Aider project has received"
|
||||||
|
src="https://img.shields.io/github/stars/Aider-AI/aider?style=flat-square&logo=github&color=f1c40f&labelColor=555555"/></a>
|
||||||
|
<a href="https://pypi.org/project/aider-chat/"><img alt="PyPI Downloads" title="Total number of installations via pip from PyPI"
|
||||||
|
src="https://img.shields.io/badge/📦%20Installs-1.7M-2ecc71?style=flat-square&labelColor=555555"/></a>
|
||||||
|
<img alt="Tokens per week" title="Number of tokens processed weekly by Aider users"
|
||||||
|
src="https://img.shields.io/badge/📈%20Tokens%2Fweek-15B-e74c3c?style=flat-square&labelColor=555555"/>
|
||||||
|
<a href="https://openrouter.ai/"><img alt="OpenRouter Ranking" title="Aider's ranking among applications on the OpenRouter platform"
|
||||||
|
src="https://img.shields.io/badge/🏆%20OpenRouter-Top%2020-9b59b6?style=flat-square&labelColor=555555"/></a>
|
||||||
|
<a href="https://aider.chat/HISTORY.html"><img alt="Singularity" title="Percentage of the new code in Aider's last release written by Aider itself"
|
||||||
|
src="https://img.shields.io/badge/🔄%20Singularity-72%25-3498db?style=flat-square&labelColor=555555"/></a>
|
||||||
|
<!--[[[end]]]-->
|
||||||
|
</p>
|
||||||
|
|
||||||
If you already have python 3.8-3.13 installed, you can get started quickly like this:
|
## Features
|
||||||
|
|
||||||
|
- 🧠 **[Cloud and local LLMs](https://aider.chat/docs/llms.html)** - Aider works best with Claude 3.7 Sonnet, DeepSeek R1 & Chat V3, OpenAI o1, o3-mini & GPT-4o, but can connect to almost any LLM, including local models.
|
||||||
|
- 🗺️ **[Maps your codebase](https://aider.chat/docs/repomap.html)** - Aider makes a map of your entire codebase, which helps it work well in larger projects.
|
||||||
|
- `</>` **[100+ code languages](https://aider.chat/docs/languages.html)** - Aider works with most popular programming languages: python, javascript, rust, ruby, go, cpp, php, html, css, and dozens more.
|
||||||
|
- 🔀 **[Git integration](https://aider.chat/docs/git.html)** - Aider automatically commits changes with sensible commit messages. Use familiar git tools to easily diff, manage and undo AI changes.
|
||||||
|
- 🖥️ **[Use in your IDE](https://aider.chat/docs/usage/watch.html)** - Use aider from within your favorite IDE or editor. Ask for changes by adding comments to your code and aider will get to work.
|
||||||
|
- 🖼️ **[Images & web pages](https://aider.chat/docs/usage/images-urls.html)** - Add images and web pages to the chat to provide visual context, screenshots, reference docs, etc.
|
||||||
|
- 🎤 **[Voice-to-code](https://aider.chat/docs/usage/voice.html)** - Speak with aider about your code! Request new features, test cases or bug fixes using your voice and let aider implement the changes.
|
||||||
|
- ✅ **[Linting & testing](https://aider.chat/docs/usage/lint-test.html)** - Automatically lint and test your code every time aider makes changes. Aider can fix problems detected by your linters and test suites.
|
||||||
|
- 📋 **[Copy/paste to web chat](https://aider.chat/docs/usage/copypaste.html)** - Work with any LLM via its web chat interface. Aider streamlines copy/pasting code context and edits back and forth with a browser.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python -m pip install aider-install
|
python -m pip install aider-install
|
||||||
aider-install
|
aider-install
|
||||||
|
|
||||||
# Change directory into your code base
|
# Change directory into your codebase
|
||||||
cd /to/your/project
|
cd /to/your/project
|
||||||
|
|
||||||
# Work with DeepSeek via DeepSeek's API
|
# DeepSeek
|
||||||
aider --model deepseek --api-key deepseek=your-key-goes-here
|
aider --model deepseek --api-key deepseek=<key>
|
||||||
|
|
||||||
# Work with Claude 3.7 Sonnet via Anthropic's API
|
# Claude 3.7 Sonnet
|
||||||
aider --model sonnet --api-key anthropic=your-key-goes-here
|
aider --model sonnet --api-key anthropic=<key>
|
||||||
|
|
||||||
# Work with GPT-4o via OpenAI's API
|
# o3-mini
|
||||||
aider --model gpt-4o --api-key openai=your-key-goes-here
|
aider --model o3-mini --api-key openai=<key>
|
||||||
|
|
||||||
# Work with Sonnet via OpenRouter's API
|
|
||||||
aider --model openrouter/anthropic/claude-3.7-sonnet --api-key openrouter=your-key-goes-here
|
|
||||||
|
|
||||||
# Work with DeepSeek via OpenRouter's API
|
|
||||||
aider --model openrouter/deepseek/deepseek-chat --api-key openrouter=your-key-goes-here
|
|
||||||
```
|
```
|
||||||
<!--[[[end]]]-->
|
|
||||||
|
|
||||||
See the
|
See the [installation instructions](https://aider.chat/docs/install.html) and [usage documentation](https://aider.chat/docs/usage.html) for more details.
|
||||||
[installation instructions](https://aider.chat/docs/install.html)
|
|
||||||
and
|
|
||||||
[usage documentation](https://aider.chat/docs/usage.html)
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
## Features
|
## More Information
|
||||||
|
|
||||||
- Run aider with the files you want to edit: `aider <file1> <file2> ...`
|
### Documentation
|
||||||
- Ask for changes:
|
- [Installation Guide](https://aider.chat/docs/install.html)
|
||||||
- Add new features or test cases.
|
- [Usage Guide](https://aider.chat/docs/usage.html)
|
||||||
- Describe a bug.
|
- [Tutorial Videos](https://aider.chat/docs/usage/tutorials.html)
|
||||||
- Paste in an error message or GitHub issue URL.
|
|
||||||
- Refactor code.
|
|
||||||
- Update docs.
|
|
||||||
- Aider will edit your files to complete your request.
|
|
||||||
- Aider [automatically git commits](https://aider.chat/docs/git.html) changes with a sensible commit message.
|
|
||||||
- [Use aider inside your favorite editor or IDE](https://aider.chat/docs/usage/watch.html).
|
|
||||||
- Aider works with [most popular languages](https://aider.chat/docs/languages.html): python, javascript, typescript, php, html, css, and more...
|
|
||||||
- Aider can edit multiple files at once for complex requests.
|
|
||||||
- Aider uses a [map of your entire git repo](https://aider.chat/docs/repomap.html), which helps it work well in larger codebases.
|
|
||||||
- Edit files in your editor or IDE while chatting with aider,
|
|
||||||
and it will always use the latest version.
|
|
||||||
Pair program with AI.
|
|
||||||
- [Add images to the chat](https://aider.chat/docs/usage/images-urls.html) (GPT-4o, Claude 3.5 Sonnet, etc).
|
|
||||||
- [Add URLs to the chat](https://aider.chat/docs/usage/images-urls.html) and aider will read their content.
|
|
||||||
- [Code with your voice](https://aider.chat/docs/usage/voice.html).
|
|
||||||
- Aider works best with Claude 3.7 Sonnet, DeepSeek V3, o1 & GPT-4o and can [connect to almost any LLM](https://aider.chat/docs/llms.html).
|
|
||||||
|
|
||||||
|
|
||||||
## Top tier performance
|
|
||||||
|
|
||||||
[Aider has one of the top scores on SWE Bench](https://aider.chat/2024/06/02/main-swe-bench.html).
|
|
||||||
SWE Bench is a challenging software engineering benchmark where aider
|
|
||||||
solved *real* GitHub issues from popular open source
|
|
||||||
projects like django, scikitlearn, matplotlib, etc.
|
|
||||||
|
|
||||||
## More info
|
|
||||||
|
|
||||||
- [Documentation](https://aider.chat/)
|
|
||||||
- [Installation](https://aider.chat/docs/install.html)
|
|
||||||
- [Usage](https://aider.chat/docs/usage.html)
|
|
||||||
- [Tutorial videos](https://aider.chat/docs/usage/tutorials.html)
|
|
||||||
- [Connecting to LLMs](https://aider.chat/docs/llms.html)
|
- [Connecting to LLMs](https://aider.chat/docs/llms.html)
|
||||||
- [Configuration](https://aider.chat/docs/config.html)
|
- [Configuration Options](https://aider.chat/docs/config.html)
|
||||||
- [Troubleshooting](https://aider.chat/docs/troubleshooting.html)
|
- [Troubleshooting](https://aider.chat/docs/troubleshooting.html)
|
||||||
|
- [FAQ](https://aider.chat/docs/faq.html)
|
||||||
|
|
||||||
|
### Community & Resources
|
||||||
- [LLM Leaderboards](https://aider.chat/docs/leaderboards/)
|
- [LLM Leaderboards](https://aider.chat/docs/leaderboards/)
|
||||||
- [GitHub](https://github.com/Aider-AI/aider)
|
- [GitHub Repository](https://github.com/Aider-AI/aider)
|
||||||
- [Discord](https://discord.gg/Tv2uQnR88V)
|
- [Discord Community](https://discord.gg/Tv2uQnR88V)
|
||||||
- [Blog](https://aider.chat/blog/)
|
- [Blog](https://aider.chat/blog/)
|
||||||
|
|
||||||
|
## Kind Words From Users
|
||||||
|
|
||||||
## Kind words from users
|
- *"The best free open source AI coding assistant."* — [IndyDevDan](https://youtu.be/YALpX8oOn78)
|
||||||
|
- *"The best AI coding assistant so far."* — [Matthew Berman](https://www.youtube.com/watch?v=df8afeb1FY8)
|
||||||
- *The best free open source AI coding assistant.* -- [IndyDevDan](https://youtu.be/YALpX8oOn78)
|
- *"Aider ... has easily quadrupled my coding productivity."* — [SOLAR_FIELDS](https://news.ycombinator.com/item?id=36212100)
|
||||||
- *The best AI coding assistant so far.* -- [Matthew Berman](https://www.youtube.com/watch?v=df8afeb1FY8)
|
- *"It's a cool workflow... Aider's ergonomics are perfect for me."* — [qup](https://news.ycombinator.com/item?id=38185326)
|
||||||
- *Aider ... has easily quadrupled my coding productivity.* -- [SOLAR_FIELDS](https://news.ycombinator.com/item?id=36212100)
|
- *"It's really like having your senior developer live right in your Git repo - truly amazing!"* — [rappster](https://github.com/Aider-AI/aider/issues/124)
|
||||||
- *It's a cool workflow... Aider's ergonomics are perfect for me.* -- [qup](https://news.ycombinator.com/item?id=38185326)
|
- *"What an amazing tool. It's incredible."* — [valyagolev](https://github.com/Aider-AI/aider/issues/6#issue-1722897858)
|
||||||
- *It's really like having your senior developer live right in your Git repo - truly amazing!* -- [rappster](https://github.com/Aider-AI/aider/issues/124)
|
- *"Aider is such an astounding thing!"* — [cgrothaus](https://github.com/Aider-AI/aider/issues/82#issuecomment-1631876700)
|
||||||
- *What an amazing tool. It's incredible.* -- [valyagolev](https://github.com/Aider-AI/aider/issues/6#issue-1722897858)
|
- *"It was WAY faster than I would be getting off the ground and making the first few working versions."* — [Daniel Feldman](https://twitter.com/d_feldman/status/1662295077387923456)
|
||||||
- *Aider is such an astounding thing!* -- [cgrothaus](https://github.com/Aider-AI/aider/issues/82#issuecomment-1631876700)
|
- *"THANK YOU for Aider! It really feels like a glimpse into the future of coding."* — [derwiki](https://news.ycombinator.com/item?id=38205643)
|
||||||
- *It was WAY faster than I would be getting off the ground and making the first few working versions.* -- [Daniel Feldman](https://twitter.com/d_feldman/status/1662295077387923456)
|
- *"It's just amazing. It is freeing me to do things I felt were out my comfort zone before."* — [Dougie](https://discord.com/channels/1131200896827654144/1174002618058678323/1174084556257775656)
|
||||||
- *THANK YOU for Aider! It really feels like a glimpse into the future of coding.* -- [derwiki](https://news.ycombinator.com/item?id=38205643)
|
- *"This project is stellar."* — [funkytaco](https://github.com/Aider-AI/aider/issues/112#issuecomment-1637429008)
|
||||||
- *It's just amazing. It is freeing me to do things I felt were out my comfort zone before.* -- [Dougie](https://discord.com/channels/1131200896827654144/1174002618058678323/1174084556257775656)
|
- *"Amazing project, definitely the best AI coding assistant I've used."* — [joshuavial](https://github.com/Aider-AI/aider/issues/84)
|
||||||
- *This project is stellar.* -- [funkytaco](https://github.com/Aider-AI/aider/issues/112#issuecomment-1637429008)
|
- *"I absolutely love using Aider ... It makes software development feel so much lighter as an experience."* — [principalideal0](https://discord.com/channels/1131200896827654144/1133421607499595858/1229689636012691468)
|
||||||
- *Amazing project, definitely the best AI coding assistant I've used.* -- [joshuavial](https://github.com/Aider-AI/aider/issues/84)
|
- *"I have been recovering from multiple shoulder surgeries ... and have used aider extensively. It has allowed me to continue productivity."* — [codeninja](https://www.reddit.com/r/OpenAI/s/nmNwkHy1zG)
|
||||||
- *I absolutely love using Aider ... It makes software development feel so much lighter as an experience.* -- [principalideal0](https://discord.com/channels/1131200896827654144/1133421607499595858/1229689636012691468)
|
- *"I am an aider addict. I'm getting so much more work done, but in less time."* — [dandandan](https://discord.com/channels/1131200896827654144/1131200896827654149/1135913253483069470)
|
||||||
- *I have been recovering from multiple shoulder surgeries ... and have used aider extensively. It has allowed me to continue productivity.* -- [codeninja](https://www.reddit.com/r/OpenAI/s/nmNwkHy1zG)
|
- *"After wasting $100 on tokens trying to find something better, I'm back to Aider. It blows everything else out of the water hands down, there's no competition whatsoever."* — [SystemSculpt](https://discord.com/channels/1131200896827654144/1131200896827654149/1178736602797846548)
|
||||||
- *I am an aider addict. I'm getting so much more work done, but in less time.* -- [dandandan](https://discord.com/channels/1131200896827654144/1131200896827654149/1135913253483069470)
|
- *"Aider is amazing, coupled with Sonnet 3.5 it's quite mind blowing."* — [Josh Dingus](https://discord.com/channels/1131200896827654144/1133060684540813372/1262374225298198548)
|
||||||
- *After wasting $100 on tokens trying to find something better, I'm back to Aider. It blows everything else out of the water hands down, there's no competition whatsoever.* -- [SystemSculpt](https://discord.com/channels/1131200896827654144/1131200896827654149/1178736602797846548)
|
- *"Hands down, this is the best AI coding assistant tool so far."* — [IndyDevDan](https://www.youtube.com/watch?v=MPYFPvxfGZs)
|
||||||
- *Aider is amazing, coupled with Sonnet 3.5 it’s quite mind blowing.* -- [Josh Dingus](https://discord.com/channels/1131200896827654144/1133060684540813372/1262374225298198548)
|
- *"[Aider] changed my daily coding workflows. It's mind-blowing how a single Python application can change your life."* — [maledorak](https://discord.com/channels/1131200896827654144/1131200896827654149/1258453375620747264)
|
||||||
- *Hands down, this is the best AI coding assistant tool so far.* -- [IndyDevDan](https://www.youtube.com/watch?v=MPYFPvxfGZs)
|
- *"Best agent for actual dev work in existing codebases."* — [Nick Dobos](https://twitter.com/NickADobos/status/1690408967963652097?s=20)
|
||||||
- *[Aider] changed my daily coding workflows. It's mind-blowing how a single Python application can change your life.* -- [maledorak](https://discord.com/channels/1131200896827654144/1131200896827654149/1258453375620747264)
|
|
||||||
- *Best agent for actual dev work in existing codebases.* -- [Nick Dobos](https://twitter.com/NickADobos/status/1690408967963652097?s=20)
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from packaging import version
|
from packaging import version
|
||||||
|
|
||||||
__version__ = "0.76.3.dev"
|
__version__ = "0.78.1.dev"
|
||||||
safe_version = __version__
|
safe_version = __version__
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import configargparse
|
import configargparse
|
||||||
|
|
||||||
@@ -17,6 +18,15 @@ from aider.deprecated import add_deprecated_model_args
|
|||||||
from .dump import dump # noqa: F401
|
from .dump import dump # noqa: F401
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_aiderignore_path(path_str, git_root=None):
|
||||||
|
path = Path(path_str)
|
||||||
|
if path.is_absolute():
|
||||||
|
return str(path)
|
||||||
|
elif git_root:
|
||||||
|
return str(Path(git_root) / path)
|
||||||
|
return str(path)
|
||||||
|
|
||||||
|
|
||||||
def default_env_file(git_root):
|
def default_env_file(git_root):
|
||||||
return os.path.join(git_root, ".env") if git_root else ".env"
|
return os.path.join(git_root, ".env") if git_root else ".env"
|
||||||
|
|
||||||
@@ -119,7 +129,7 @@ def get_parser(default_config_files, git_root):
|
|||||||
)
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--thinking-tokens",
|
"--thinking-tokens",
|
||||||
type=int,
|
type=str,
|
||||||
help="Set the thinking token budget for models that support it (default: not set)",
|
help="Set the thinking token budget for models that support it (default: not set)",
|
||||||
)
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
@@ -148,6 +158,12 @@ def get_parser(default_config_files, git_root):
|
|||||||
const="architect",
|
const="architect",
|
||||||
help="Use architect edit format for the main chat",
|
help="Use architect edit format for the main chat",
|
||||||
)
|
)
|
||||||
|
group.add_argument(
|
||||||
|
"--auto-accept-architect",
|
||||||
|
action=argparse.BooleanOptionalAction,
|
||||||
|
default=True,
|
||||||
|
help="Enable/disable automatic acceptance of architect changes (default: True)",
|
||||||
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--weak-model",
|
"--weak-model",
|
||||||
metavar="WEAK_MODEL",
|
metavar="WEAK_MODEL",
|
||||||
@@ -175,6 +191,14 @@ def get_parser(default_config_files, git_root):
|
|||||||
default=True,
|
default=True,
|
||||||
help="Only work with models that have meta-data available (default: True)",
|
help="Only work with models that have meta-data available (default: True)",
|
||||||
)
|
)
|
||||||
|
group.add_argument(
|
||||||
|
"--check-model-accepts-settings",
|
||||||
|
action=argparse.BooleanOptionalAction,
|
||||||
|
default=True,
|
||||||
|
help=(
|
||||||
|
"Check if model accepts settings like reasoning_effort/thinking_tokens (default: True)"
|
||||||
|
),
|
||||||
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--max-chat-history-tokens",
|
"--max-chat-history-tokens",
|
||||||
type=int,
|
type=int,
|
||||||
@@ -374,9 +398,11 @@ def get_parser(default_config_files, git_root):
|
|||||||
default_aiderignore_file = (
|
default_aiderignore_file = (
|
||||||
os.path.join(git_root, ".aiderignore") if git_root else ".aiderignore"
|
os.path.join(git_root, ".aiderignore") if git_root else ".aiderignore"
|
||||||
)
|
)
|
||||||
|
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--aiderignore",
|
"--aiderignore",
|
||||||
metavar="AIDERIGNORE",
|
metavar="AIDERIGNORE",
|
||||||
|
type=lambda path_str: resolve_aiderignore_path(path_str, git_root),
|
||||||
default=default_aiderignore_file,
|
default=default_aiderignore_file,
|
||||||
help="Specify the aider ignore file (default: .aiderignore in git root)",
|
help="Specify the aider ignore file (default: .aiderignore in git root)",
|
||||||
)
|
)
|
||||||
@@ -422,6 +448,12 @@ def get_parser(default_config_files, git_root):
|
|||||||
default=False,
|
default=False,
|
||||||
help="Prefix all commit messages with 'aider: ' (default: False)",
|
help="Prefix all commit messages with 'aider: ' (default: False)",
|
||||||
)
|
)
|
||||||
|
group.add_argument(
|
||||||
|
"--git-commit-verify",
|
||||||
|
action=argparse.BooleanOptionalAction,
|
||||||
|
default=False,
|
||||||
|
help="Enable/disable git pre-commit hooks with --no-verify (default: False)",
|
||||||
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--commit",
|
"--commit",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from .base_coder import Coder
|
|||||||
class ArchitectCoder(AskCoder):
|
class ArchitectCoder(AskCoder):
|
||||||
edit_format = "architect"
|
edit_format = "architect"
|
||||||
gpt_prompts = ArchitectPrompts()
|
gpt_prompts = ArchitectPrompts()
|
||||||
|
auto_accept_architect = False
|
||||||
|
|
||||||
def reply_completed(self):
|
def reply_completed(self):
|
||||||
content = self.partial_response_content
|
content = self.partial_response_content
|
||||||
@@ -13,7 +14,7 @@ class ArchitectCoder(AskCoder):
|
|||||||
if not content or not content.strip():
|
if not content or not content.strip():
|
||||||
return
|
return
|
||||||
|
|
||||||
if not self.io.confirm_ask("Edit the files?"):
|
if not self.auto_accept_architect and not self.io.confirm_ask("Edit the files?"):
|
||||||
return
|
return
|
||||||
|
|
||||||
kwargs = dict()
|
kwargs = dict()
|
||||||
|
|||||||
@@ -207,10 +207,22 @@ class Coder:
|
|||||||
prefix = "Model"
|
prefix = "Model"
|
||||||
|
|
||||||
output = f"{prefix}: {main_model.name} with {self.edit_format} edit format"
|
output = f"{prefix}: {main_model.name} with {self.edit_format} edit format"
|
||||||
|
|
||||||
|
# Check for thinking token budget
|
||||||
|
thinking_tokens = main_model.get_thinking_tokens(main_model)
|
||||||
|
if thinking_tokens:
|
||||||
|
output += f", {thinking_tokens} think tokens"
|
||||||
|
|
||||||
|
# Check for reasoning effort
|
||||||
|
reasoning_effort = main_model.get_reasoning_effort(main_model)
|
||||||
|
if reasoning_effort:
|
||||||
|
output += f", reasoning {reasoning_effort}"
|
||||||
|
|
||||||
if self.add_cache_headers or main_model.caches_by_default:
|
if self.add_cache_headers or main_model.caches_by_default:
|
||||||
output += ", prompt cache"
|
output += ", prompt cache"
|
||||||
if main_model.info.get("supports_assistant_prefill"):
|
if main_model.info.get("supports_assistant_prefill"):
|
||||||
output += ", infinite output"
|
output += ", infinite output"
|
||||||
|
|
||||||
lines.append(output)
|
lines.append(output)
|
||||||
|
|
||||||
if self.edit_format == "architect":
|
if self.edit_format == "architect":
|
||||||
@@ -310,6 +322,7 @@ class Coder:
|
|||||||
ignore_mentions=None,
|
ignore_mentions=None,
|
||||||
file_watcher=None,
|
file_watcher=None,
|
||||||
auto_copy_context=False,
|
auto_copy_context=False,
|
||||||
|
auto_accept_architect=True,
|
||||||
):
|
):
|
||||||
# Fill in a dummy Analytics if needed, but it is never .enable()'d
|
# Fill in a dummy Analytics if needed, but it is never .enable()'d
|
||||||
self.analytics = analytics if analytics is not None else Analytics()
|
self.analytics = analytics if analytics is not None else Analytics()
|
||||||
@@ -322,6 +335,7 @@ class Coder:
|
|||||||
self.abs_root_path_cache = {}
|
self.abs_root_path_cache = {}
|
||||||
|
|
||||||
self.auto_copy_context = auto_copy_context
|
self.auto_copy_context = auto_copy_context
|
||||||
|
self.auto_accept_architect = auto_accept_architect
|
||||||
|
|
||||||
self.ignore_mentions = ignore_mentions
|
self.ignore_mentions = ignore_mentions
|
||||||
if not self.ignore_mentions:
|
if not self.ignore_mentions:
|
||||||
@@ -1016,7 +1030,13 @@ class Coder:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def get_platform_info(self):
|
def get_platform_info(self):
|
||||||
platform_text = f"- Platform: {platform.platform()}\n"
|
platform_text = ""
|
||||||
|
try:
|
||||||
|
platform_text = f"- Platform: {platform.platform()}\n"
|
||||||
|
except KeyError:
|
||||||
|
# Skip platform info if it can't be retrieved
|
||||||
|
platform_text = "- Platform information unavailable\n"
|
||||||
|
|
||||||
shell_var = "COMSPEC" if os.name == "nt" else "SHELL"
|
shell_var = "COMSPEC" if os.name == "nt" else "SHELL"
|
||||||
shell_val = os.getenv(shell_var)
|
shell_val = os.getenv(shell_var)
|
||||||
platform_text += f"- Shell: {shell_var}={shell_val}\n"
|
platform_text += f"- Shell: {shell_var}={shell_val}\n"
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ from aider import models, prompts, voice
|
|||||||
from aider.editor import pipe_editor
|
from aider.editor import pipe_editor
|
||||||
from aider.format_settings import format_settings
|
from aider.format_settings import format_settings
|
||||||
from aider.help import Help, install_help_extra
|
from aider.help import Help, install_help_extra
|
||||||
|
from aider.io import CommandCompletionException
|
||||||
from aider.llm import litellm
|
from aider.llm import litellm
|
||||||
from aider.repo import ANY_GIT_ERROR
|
from aider.repo import ANY_GIT_ERROR
|
||||||
from aider.run_cmd import run_cmd
|
from aider.run_cmd import run_cmd
|
||||||
@@ -59,6 +60,7 @@ class Commands:
|
|||||||
parser=None,
|
parser=None,
|
||||||
verbose=False,
|
verbose=False,
|
||||||
editor=None,
|
editor=None,
|
||||||
|
original_read_only_fnames=None,
|
||||||
):
|
):
|
||||||
self.io = io
|
self.io = io
|
||||||
self.coder = coder
|
self.coder = coder
|
||||||
@@ -77,11 +79,42 @@ class Commands:
|
|||||||
self.help = None
|
self.help = None
|
||||||
self.editor = editor
|
self.editor = editor
|
||||||
|
|
||||||
|
# Store the original read-only filenames provided via args.read
|
||||||
|
self.original_read_only_fnames = set(original_read_only_fnames or [])
|
||||||
|
|
||||||
def cmd_model(self, args):
|
def cmd_model(self, args):
|
||||||
"Switch to a new LLM"
|
"Switch the Main Model to a new LLM"
|
||||||
|
|
||||||
model_name = args.strip()
|
model_name = args.strip()
|
||||||
model = models.Model(model_name, weak_model=self.coder.main_model.weak_model.name)
|
model = models.Model(
|
||||||
|
model_name,
|
||||||
|
editor_model=self.coder.main_model.editor_model.name,
|
||||||
|
weak_model=self.coder.main_model.weak_model.name,
|
||||||
|
)
|
||||||
|
models.sanity_check_models(self.io, model)
|
||||||
|
raise SwitchCoder(main_model=model)
|
||||||
|
|
||||||
|
def cmd_editor_model(self, args):
|
||||||
|
"Switch the Editor Model to a new LLM"
|
||||||
|
|
||||||
|
model_name = args.strip()
|
||||||
|
model = models.Model(
|
||||||
|
self.coder.main_model.name,
|
||||||
|
editor_model=model_name,
|
||||||
|
weak_model=self.coder.main_model.weak_model.name,
|
||||||
|
)
|
||||||
|
models.sanity_check_models(self.io, model)
|
||||||
|
raise SwitchCoder(main_model=model)
|
||||||
|
|
||||||
|
def cmd_weak_model(self, args):
|
||||||
|
"Switch the Weak Model to a new LLM"
|
||||||
|
|
||||||
|
model_name = args.strip()
|
||||||
|
model = models.Model(
|
||||||
|
self.coder.main_model.name,
|
||||||
|
editor_model=self.coder.main_model.editor_model.name,
|
||||||
|
weak_model=model_name,
|
||||||
|
)
|
||||||
models.sanity_check_models(self.io, model)
|
models.sanity_check_models(self.io, model)
|
||||||
raise SwitchCoder(main_model=model)
|
raise SwitchCoder(main_model=model)
|
||||||
|
|
||||||
@@ -355,7 +388,21 @@ class Commands:
|
|||||||
|
|
||||||
def _drop_all_files(self):
|
def _drop_all_files(self):
|
||||||
self.coder.abs_fnames = set()
|
self.coder.abs_fnames = set()
|
||||||
self.coder.abs_read_only_fnames = set()
|
|
||||||
|
# When dropping all files, keep those that were originally provided via args.read
|
||||||
|
if self.original_read_only_fnames:
|
||||||
|
# Keep only the original read-only files
|
||||||
|
to_keep = set()
|
||||||
|
for abs_fname in self.coder.abs_read_only_fnames:
|
||||||
|
rel_fname = self.coder.get_rel_fname(abs_fname)
|
||||||
|
if (
|
||||||
|
abs_fname in self.original_read_only_fnames
|
||||||
|
or rel_fname in self.original_read_only_fnames
|
||||||
|
):
|
||||||
|
to_keep.add(abs_fname)
|
||||||
|
self.coder.abs_read_only_fnames = to_keep
|
||||||
|
else:
|
||||||
|
self.coder.abs_read_only_fnames = set()
|
||||||
|
|
||||||
def _clear_chat_history(self):
|
def _clear_chat_history(self):
|
||||||
self.coder.done_messages = []
|
self.coder.done_messages = []
|
||||||
@@ -822,7 +869,12 @@ class Commands:
|
|||||||
"Remove files from the chat session to free up context space"
|
"Remove files from the chat session to free up context space"
|
||||||
|
|
||||||
if not args.strip():
|
if not args.strip():
|
||||||
self.io.tool_output("Dropping all files from the chat session.")
|
if self.original_read_only_fnames:
|
||||||
|
self.io.tool_output(
|
||||||
|
"Dropping all files from the chat session except originally read-only files."
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
self.io.tool_output("Dropping all files from the chat session.")
|
||||||
self._drop_all_files()
|
self._drop_all_files()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -1065,6 +1117,15 @@ class Commands:
|
|||||||
show_announcements=False,
|
show_announcements=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def completions_ask(self):
|
||||||
|
raise CommandCompletionException()
|
||||||
|
|
||||||
|
def completions_code(self):
|
||||||
|
raise CommandCompletionException()
|
||||||
|
|
||||||
|
def completions_architect(self):
|
||||||
|
raise CommandCompletionException()
|
||||||
|
|
||||||
def cmd_ask(self, args):
|
def cmd_ask(self, args):
|
||||||
"""Ask questions about the code base without editing any files. If no prompt provided, switches to ask mode.""" # noqa
|
"""Ask questions about the code base without editing any files. If no prompt provided, switches to ask mode.""" # noqa
|
||||||
return self._generic_chat_command(args, "ask")
|
return self._generic_chat_command(args, "ask")
|
||||||
@@ -1411,6 +1472,58 @@ class Commands:
|
|||||||
if user_input.strip():
|
if user_input.strip():
|
||||||
self.io.set_placeholder(user_input.rstrip())
|
self.io.set_placeholder(user_input.rstrip())
|
||||||
|
|
||||||
|
def cmd_think_tokens(self, args):
|
||||||
|
"Set the thinking token budget (supports formats like 8096, 8k, 10.5k, 0.5M)"
|
||||||
|
model = self.coder.main_model
|
||||||
|
|
||||||
|
if not args.strip():
|
||||||
|
# Display current value if no args are provided
|
||||||
|
formatted_budget = model.get_thinking_tokens(model)
|
||||||
|
if formatted_budget is None:
|
||||||
|
self.io.tool_output("Thinking tokens are not currently set.")
|
||||||
|
else:
|
||||||
|
budget = model.extra_params["thinking"].get("budget_tokens")
|
||||||
|
self.io.tool_output(
|
||||||
|
f"Current thinking token budget: {budget:,} tokens ({formatted_budget})."
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
|
value = args.strip()
|
||||||
|
model.set_thinking_tokens(value)
|
||||||
|
|
||||||
|
formatted_budget = model.get_thinking_tokens(model)
|
||||||
|
budget = model.extra_params["thinking"].get("budget_tokens")
|
||||||
|
|
||||||
|
self.io.tool_output(f"Set thinking token budget to {budget:,} tokens ({formatted_budget}).")
|
||||||
|
self.io.tool_output()
|
||||||
|
|
||||||
|
# Output announcements
|
||||||
|
announcements = "\n".join(self.coder.get_announcements())
|
||||||
|
self.io.tool_output(announcements)
|
||||||
|
|
||||||
|
def cmd_reasoning_effort(self, args):
|
||||||
|
"Set the reasoning effort level (values: number or low/medium/high depending on model)"
|
||||||
|
model = self.coder.main_model
|
||||||
|
|
||||||
|
if not args.strip():
|
||||||
|
# Display current value if no args are provided
|
||||||
|
reasoning_value = model.get_reasoning_effort(model)
|
||||||
|
if reasoning_value is None:
|
||||||
|
self.io.tool_output("Reasoning effort is not currently set.")
|
||||||
|
else:
|
||||||
|
self.io.tool_output(f"Current reasoning effort: {reasoning_value}")
|
||||||
|
return
|
||||||
|
|
||||||
|
value = args.strip()
|
||||||
|
model.set_reasoning_effort(value)
|
||||||
|
reasoning_value = model.get_reasoning_effort(model)
|
||||||
|
self.io.tool_output(f"Set reasoning effort to {reasoning_value}")
|
||||||
|
self.io.tool_output()
|
||||||
|
|
||||||
|
# Output announcements
|
||||||
|
announcements = "\n".join(self.coder.get_announcements())
|
||||||
|
self.io.tool_output(announcements)
|
||||||
|
|
||||||
def cmd_copy_context(self, args=None):
|
def cmd_copy_context(self, args=None):
|
||||||
"""Copy the current chat context as markdown, suitable to paste into a web UI"""
|
"""Copy the current chat context as markdown, suitable to paste into a web UI"""
|
||||||
|
|
||||||
|
|||||||
@@ -121,5 +121,6 @@ def handle_deprecated_model_args(args, io):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Set the model
|
# Set the model
|
||||||
args.model = model_name
|
if not args.model:
|
||||||
|
args.model = model_name
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -10,4 +10,10 @@ exclude_website_pats = [
|
|||||||
"docs/unified-diffs.md",
|
"docs/unified-diffs.md",
|
||||||
"docs/leaderboards/index.md",
|
"docs/leaderboards/index.md",
|
||||||
"assets/**",
|
"assets/**",
|
||||||
|
".jekyll-metadata",
|
||||||
|
"Gemfile.lock",
|
||||||
|
"Gemfile",
|
||||||
|
"_config.yml",
|
||||||
|
"**/OLD/**",
|
||||||
|
"OLD/**",
|
||||||
]
|
]
|
||||||
|
|||||||
28
aider/io.py
28
aider/io.py
@@ -18,6 +18,7 @@ from prompt_toolkit.enums import EditingMode
|
|||||||
from prompt_toolkit.filters import Condition, is_searching
|
from prompt_toolkit.filters import Condition, is_searching
|
||||||
from prompt_toolkit.history import FileHistory
|
from prompt_toolkit.history import FileHistory
|
||||||
from prompt_toolkit.key_binding import KeyBindings
|
from prompt_toolkit.key_binding import KeyBindings
|
||||||
|
from prompt_toolkit.key_binding.vi_state import InputMode
|
||||||
from prompt_toolkit.keys import Keys
|
from prompt_toolkit.keys import Keys
|
||||||
from prompt_toolkit.lexers import PygmentsLexer
|
from prompt_toolkit.lexers import PygmentsLexer
|
||||||
from prompt_toolkit.output.vt100 import is_dumb_terminal
|
from prompt_toolkit.output.vt100 import is_dumb_terminal
|
||||||
@@ -68,6 +69,13 @@ def restore_multiline(func):
|
|||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
|
class CommandCompletionException(Exception):
|
||||||
|
"""Raised when a command should use the normal autocompleter instead of
|
||||||
|
command-specific completion."""
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class ConfirmGroup:
|
class ConfirmGroup:
|
||||||
preference: str = None
|
preference: str = None
|
||||||
@@ -186,14 +194,23 @@ class AutoCompleter(Completer):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if text[0] == "/":
|
if text[0] == "/":
|
||||||
yield from self.get_command_completions(document, complete_event, text, words)
|
try:
|
||||||
return
|
yield from self.get_command_completions(document, complete_event, text, words)
|
||||||
|
return
|
||||||
|
except CommandCompletionException:
|
||||||
|
# Fall through to normal completion
|
||||||
|
pass
|
||||||
|
|
||||||
candidates = self.words
|
candidates = self.words
|
||||||
candidates.update(set(self.fname_to_rel_fnames))
|
candidates.update(set(self.fname_to_rel_fnames))
|
||||||
candidates = [word if type(word) is tuple else (word, word) for word in candidates]
|
candidates = [word if type(word) is tuple else (word, word) for word in candidates]
|
||||||
|
|
||||||
last_word = words[-1]
|
last_word = words[-1]
|
||||||
|
|
||||||
|
# Only provide completions if the user has typed at least 3 characters
|
||||||
|
if len(last_word) < 3:
|
||||||
|
return
|
||||||
|
|
||||||
completions = []
|
completions = []
|
||||||
for word_match, word_insert in candidates:
|
for word_match, word_insert in candidates:
|
||||||
if word_match.lower().startswith(last_word.lower()):
|
if word_match.lower().startswith(last_word.lower()):
|
||||||
@@ -538,8 +555,11 @@ class InputOutput:
|
|||||||
@kb.add("enter", eager=True, filter=~is_searching)
|
@kb.add("enter", eager=True, filter=~is_searching)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Handle Enter key press"
|
"Handle Enter key press"
|
||||||
if self.multiline_mode:
|
if self.multiline_mode and not (
|
||||||
# In multiline mode, Enter adds a newline
|
self.editingmode == EditingMode.VI
|
||||||
|
and event.app.vi_state.input_mode == InputMode.NAVIGATION
|
||||||
|
):
|
||||||
|
# In multiline mode and if not in vi-mode or vi navigation/normal mode, Enter adds a newline
|
||||||
event.current_buffer.insert_text("\n")
|
event.current_buffer.insert_text("\n")
|
||||||
else:
|
else:
|
||||||
# In normal mode, Enter submits
|
# In normal mode, Enter submits
|
||||||
|
|||||||
@@ -778,6 +778,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||||||
weak_model=args.weak_model,
|
weak_model=args.weak_model,
|
||||||
editor_model=args.editor_model,
|
editor_model=args.editor_model,
|
||||||
editor_edit_format=args.editor_edit_format,
|
editor_edit_format=args.editor_edit_format,
|
||||||
|
verbose=args.verbose,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check if deprecated remove_reasoning is set
|
# Check if deprecated remove_reasoning is set
|
||||||
@@ -786,13 +787,40 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||||||
"Model setting 'remove_reasoning' is deprecated, please use 'reasoning_tag' instead."
|
"Model setting 'remove_reasoning' is deprecated, please use 'reasoning_tag' instead."
|
||||||
)
|
)
|
||||||
|
|
||||||
# Set reasoning effort if specified
|
# Set reasoning effort and thinking tokens if specified
|
||||||
if args.reasoning_effort is not None:
|
if args.reasoning_effort is not None:
|
||||||
main_model.set_reasoning_effort(args.reasoning_effort)
|
# Apply if check is disabled or model explicitly supports it
|
||||||
|
if not args.check_model_accepts_settings or (
|
||||||
|
main_model.accepts_settings and "reasoning_effort" in main_model.accepts_settings
|
||||||
|
):
|
||||||
|
main_model.set_reasoning_effort(args.reasoning_effort)
|
||||||
|
|
||||||
# Set thinking tokens if specified
|
|
||||||
if args.thinking_tokens is not None:
|
if args.thinking_tokens is not None:
|
||||||
main_model.set_thinking_tokens(args.thinking_tokens)
|
# Apply if check is disabled or model explicitly supports it
|
||||||
|
if not args.check_model_accepts_settings or (
|
||||||
|
main_model.accepts_settings and "thinking_tokens" in main_model.accepts_settings
|
||||||
|
):
|
||||||
|
main_model.set_thinking_tokens(args.thinking_tokens)
|
||||||
|
|
||||||
|
# Show warnings about unsupported settings that are being ignored
|
||||||
|
if args.check_model_accepts_settings:
|
||||||
|
settings_to_check = [
|
||||||
|
{"arg": args.reasoning_effort, "name": "reasoning_effort"},
|
||||||
|
{"arg": args.thinking_tokens, "name": "thinking_tokens"},
|
||||||
|
]
|
||||||
|
|
||||||
|
for setting in settings_to_check:
|
||||||
|
if setting["arg"] is not None and (
|
||||||
|
not main_model.accepts_settings
|
||||||
|
or setting["name"] not in main_model.accepts_settings
|
||||||
|
):
|
||||||
|
io.tool_warning(
|
||||||
|
f"Warning: {main_model.name} does not support '{setting['name']}', ignoring."
|
||||||
|
)
|
||||||
|
io.tool_output(
|
||||||
|
f"Use --no-check-model-accepts-settings to force the '{setting['name']}'"
|
||||||
|
" setting."
|
||||||
|
)
|
||||||
|
|
||||||
if args.copy_paste and args.edit_format is None:
|
if args.copy_paste and args.edit_format is None:
|
||||||
if main_model.edit_format in ("diff", "whole"):
|
if main_model.edit_format in ("diff", "whole"):
|
||||||
@@ -841,6 +869,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||||||
attribute_commit_message_committer=args.attribute_commit_message_committer,
|
attribute_commit_message_committer=args.attribute_commit_message_committer,
|
||||||
commit_prompt=args.commit_prompt,
|
commit_prompt=args.commit_prompt,
|
||||||
subtree_only=args.subtree_only,
|
subtree_only=args.subtree_only,
|
||||||
|
git_commit_verify=args.git_commit_verify,
|
||||||
)
|
)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
@@ -866,6 +895,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||||||
parser=parser,
|
parser=parser,
|
||||||
verbose=args.verbose,
|
verbose=args.verbose,
|
||||||
editor=args.editor,
|
editor=args.editor,
|
||||||
|
original_read_only_fnames=read_only_fnames,
|
||||||
)
|
)
|
||||||
|
|
||||||
summarizer = ChatSummary(
|
summarizer = ChatSummary(
|
||||||
@@ -920,6 +950,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||||||
chat_language=args.chat_language,
|
chat_language=args.chat_language,
|
||||||
detect_urls=args.detect_urls,
|
detect_urls=args.detect_urls,
|
||||||
auto_copy_context=args.copy_paste,
|
auto_copy_context=args.copy_paste,
|
||||||
|
auto_accept_architect=args.auto_accept_architect,
|
||||||
)
|
)
|
||||||
except UnknownEditFormat as err:
|
except UnknownEditFormat as err:
|
||||||
io.tool_error(str(err))
|
io.tool_error(str(err))
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import time
|
|||||||
|
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
from rich.live import Live
|
from rich.live import Live
|
||||||
from rich.markdown import Markdown
|
from rich.markdown import CodeBlock, Markdown
|
||||||
|
from rich.syntax import Syntax
|
||||||
from rich.text import Text
|
from rich.text import Text
|
||||||
|
|
||||||
from aider.dump import dump # noqa: F401
|
from aider.dump import dump # noqa: F401
|
||||||
@@ -46,6 +47,25 @@ The end.
|
|||||||
""" # noqa: E501
|
""" # noqa: E501
|
||||||
|
|
||||||
|
|
||||||
|
class NoInsetCodeBlock(CodeBlock):
|
||||||
|
"""A code block with syntax highlighting and no padding."""
|
||||||
|
|
||||||
|
def __rich_console__(self, console, options):
|
||||||
|
code = str(self.text).rstrip()
|
||||||
|
syntax = Syntax(code, self.lexer_name, theme=self.theme, word_wrap=True, padding=(1, 0))
|
||||||
|
yield syntax
|
||||||
|
|
||||||
|
|
||||||
|
class NoInsetMarkdown(Markdown):
|
||||||
|
"""Markdown with code blocks that have no padding."""
|
||||||
|
|
||||||
|
elements = {
|
||||||
|
**Markdown.elements,
|
||||||
|
"fence": NoInsetCodeBlock,
|
||||||
|
"code_block": NoInsetCodeBlock,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class MarkdownStream:
|
class MarkdownStream:
|
||||||
"""Streaming markdown renderer that progressively displays content with a live updating window.
|
"""Streaming markdown renderer that progressively displays content with a live updating window.
|
||||||
|
|
||||||
@@ -88,7 +108,7 @@ class MarkdownStream:
|
|||||||
# Render the markdown to a string buffer
|
# Render the markdown to a string buffer
|
||||||
string_io = io.StringIO()
|
string_io = io.StringIO()
|
||||||
console = Console(file=string_io, force_terminal=True)
|
console = Console(file=string_io, force_terminal=True)
|
||||||
markdown = Markdown(text, **self.mdargs)
|
markdown = NoInsetMarkdown(text, **self.mdargs)
|
||||||
console.print(markdown)
|
console.print(markdown)
|
||||||
output = string_io.getvalue()
|
output = string_io.getvalue()
|
||||||
|
|
||||||
@@ -186,6 +206,7 @@ if __name__ == "__main__":
|
|||||||
_text = _text * 10
|
_text = _text * 10
|
||||||
|
|
||||||
pm = MarkdownStream()
|
pm = MarkdownStream()
|
||||||
|
print("Using NoInsetMarkdown for code blocks with padding=0")
|
||||||
for i in range(6, len(_text), 5):
|
for i in range(6, len(_text), 5):
|
||||||
pm.update(_text[:i])
|
pm.update(_text[:i])
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
|
|||||||
133
aider/models.py
133
aider/models.py
@@ -116,6 +116,7 @@ class ModelSettings:
|
|||||||
reasoning_tag: Optional[str] = None
|
reasoning_tag: Optional[str] = None
|
||||||
remove_reasoning: Optional[str] = None # Deprecated alias for reasoning_tag
|
remove_reasoning: Optional[str] = None # Deprecated alias for reasoning_tag
|
||||||
system_prompt_prefix: Optional[str] = None
|
system_prompt_prefix: Optional[str] = None
|
||||||
|
accepts_settings: Optional[list] = None
|
||||||
|
|
||||||
|
|
||||||
# Load model settings from package resource
|
# Load model settings from package resource
|
||||||
@@ -230,11 +231,14 @@ model_info_manager = ModelInfoManager()
|
|||||||
|
|
||||||
|
|
||||||
class Model(ModelSettings):
|
class Model(ModelSettings):
|
||||||
def __init__(self, model, weak_model=None, editor_model=None, editor_edit_format=None):
|
def __init__(
|
||||||
|
self, model, weak_model=None, editor_model=None, editor_edit_format=None, verbose=False
|
||||||
|
):
|
||||||
# Map any alias to its canonical name
|
# Map any alias to its canonical name
|
||||||
model = MODEL_ALIASES.get(model, model)
|
model = MODEL_ALIASES.get(model, model)
|
||||||
|
|
||||||
self.name = model
|
self.name = model
|
||||||
|
self.verbose = verbose
|
||||||
|
|
||||||
self.max_chat_history_tokens = 1024
|
self.max_chat_history_tokens = 1024
|
||||||
self.weak_model = None
|
self.weak_model = None
|
||||||
@@ -292,6 +296,10 @@ class Model(ModelSettings):
|
|||||||
exact_match = True
|
exact_match = True
|
||||||
break # Continue to apply overrides
|
break # Continue to apply overrides
|
||||||
|
|
||||||
|
# Initialize accepts_settings if it's None
|
||||||
|
if self.accepts_settings is None:
|
||||||
|
self.accepts_settings = []
|
||||||
|
|
||||||
model = model.lower()
|
model = model.lower()
|
||||||
|
|
||||||
# If no exact match, try generic settings
|
# If no exact match, try generic settings
|
||||||
@@ -319,6 +327,8 @@ class Model(ModelSettings):
|
|||||||
self.use_repo_map = True
|
self.use_repo_map = True
|
||||||
self.use_temperature = False
|
self.use_temperature = False
|
||||||
self.system_prompt_prefix = "Formatting re-enabled. "
|
self.system_prompt_prefix = "Formatting re-enabled. "
|
||||||
|
if "reasoning_effort" not in self.accepts_settings:
|
||||||
|
self.accepts_settings.append("reasoning_effort")
|
||||||
return # <--
|
return # <--
|
||||||
|
|
||||||
if "/o1-mini" in model:
|
if "/o1-mini" in model:
|
||||||
@@ -340,6 +350,8 @@ class Model(ModelSettings):
|
|||||||
self.use_temperature = False
|
self.use_temperature = False
|
||||||
self.streaming = False
|
self.streaming = False
|
||||||
self.system_prompt_prefix = "Formatting re-enabled. "
|
self.system_prompt_prefix = "Formatting re-enabled. "
|
||||||
|
if "reasoning_effort" not in self.accepts_settings:
|
||||||
|
self.accepts_settings.append("reasoning_effort")
|
||||||
return # <--
|
return # <--
|
||||||
|
|
||||||
if "deepseek" in model and "v3" in model:
|
if "deepseek" in model and "v3" in model:
|
||||||
@@ -355,7 +367,6 @@ class Model(ModelSettings):
|
|||||||
self.examples_as_sys_msg = True
|
self.examples_as_sys_msg = True
|
||||||
self.use_temperature = False
|
self.use_temperature = False
|
||||||
self.reasoning_tag = "think"
|
self.reasoning_tag = "think"
|
||||||
self.reasoning_tag = "think"
|
|
||||||
return # <--
|
return # <--
|
||||||
|
|
||||||
if ("llama3" in model or "llama-3" in model) and "70b" in model:
|
if ("llama3" in model or "llama-3" in model) and "70b" in model:
|
||||||
@@ -381,6 +392,15 @@ class Model(ModelSettings):
|
|||||||
self.reminder = "sys"
|
self.reminder = "sys"
|
||||||
return # <--
|
return # <--
|
||||||
|
|
||||||
|
if "3-7-sonnet" in model:
|
||||||
|
self.edit_format = "diff"
|
||||||
|
self.use_repo_map = True
|
||||||
|
self.examples_as_sys_msg = True
|
||||||
|
self.reminder = "user"
|
||||||
|
if "thinking_tokens" not in self.accepts_settings:
|
||||||
|
self.accepts_settings.append("thinking_tokens")
|
||||||
|
return # <--
|
||||||
|
|
||||||
if "3.5-sonnet" in model or "3-5-sonnet" in model:
|
if "3.5-sonnet" in model or "3-5-sonnet" in model:
|
||||||
self.edit_format = "diff"
|
self.edit_format = "diff"
|
||||||
self.use_repo_map = True
|
self.use_repo_map = True
|
||||||
@@ -569,6 +589,21 @@ class Model(ModelSettings):
|
|||||||
|
|
||||||
model = self.name
|
model = self.name
|
||||||
res = litellm.validate_environment(model)
|
res = litellm.validate_environment(model)
|
||||||
|
|
||||||
|
# If missing AWS credential keys but AWS_PROFILE is set, consider AWS credentials valid
|
||||||
|
if res["missing_keys"] and any(
|
||||||
|
key in ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"] for key in res["missing_keys"]
|
||||||
|
):
|
||||||
|
if model.startswith("bedrock/") or model.startswith("us.anthropic."):
|
||||||
|
if os.environ.get("AWS_PROFILE"):
|
||||||
|
res["missing_keys"] = [
|
||||||
|
k
|
||||||
|
for k in res["missing_keys"]
|
||||||
|
if k not in ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"]
|
||||||
|
]
|
||||||
|
if not res["missing_keys"]:
|
||||||
|
res["keys_in_environment"] = True
|
||||||
|
|
||||||
if res["keys_in_environment"]:
|
if res["keys_in_environment"]:
|
||||||
return res
|
return res
|
||||||
if res["missing_keys"]:
|
if res["missing_keys"]:
|
||||||
@@ -602,13 +637,97 @@ class Model(ModelSettings):
|
|||||||
self.extra_params["extra_body"] = {}
|
self.extra_params["extra_body"] = {}
|
||||||
self.extra_params["extra_body"]["reasoning_effort"] = effort
|
self.extra_params["extra_body"]["reasoning_effort"] = effort
|
||||||
|
|
||||||
def set_thinking_tokens(self, num):
|
def parse_token_value(self, value):
|
||||||
"""Set the thinking token budget for models that support it"""
|
"""
|
||||||
if num is not None:
|
Parse a token value string into an integer.
|
||||||
|
Accepts formats: 8096, "8k", "10.5k", "0.5M", "10K", etc.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
value: String or int token value
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Integer token value
|
||||||
|
"""
|
||||||
|
if isinstance(value, int):
|
||||||
|
return value
|
||||||
|
|
||||||
|
if not isinstance(value, str):
|
||||||
|
return int(value) # Try to convert to int
|
||||||
|
|
||||||
|
value = value.strip().upper()
|
||||||
|
|
||||||
|
if value.endswith("K"):
|
||||||
|
multiplier = 1024
|
||||||
|
value = value[:-1]
|
||||||
|
elif value.endswith("M"):
|
||||||
|
multiplier = 1024 * 1024
|
||||||
|
value = value[:-1]
|
||||||
|
else:
|
||||||
|
multiplier = 1
|
||||||
|
|
||||||
|
# Convert to float first to handle decimal values like "10.5k"
|
||||||
|
return int(float(value) * multiplier)
|
||||||
|
|
||||||
|
def set_thinking_tokens(self, value):
|
||||||
|
"""
|
||||||
|
Set the thinking token budget for models that support it.
|
||||||
|
Accepts formats: 8096, "8k", "10.5k", "0.5M", "10K", etc.
|
||||||
|
"""
|
||||||
|
if value is not None:
|
||||||
|
num_tokens = self.parse_token_value(value)
|
||||||
self.use_temperature = False
|
self.use_temperature = False
|
||||||
if not self.extra_params:
|
if not self.extra_params:
|
||||||
self.extra_params = {}
|
self.extra_params = {}
|
||||||
self.extra_params["thinking"] = {"type": "enabled", "budget_tokens": num}
|
|
||||||
|
# OpenRouter models use 'reasoning' instead of 'thinking'
|
||||||
|
if self.name.startswith("openrouter/"):
|
||||||
|
self.extra_params["reasoning"] = {"max_tokens": num_tokens}
|
||||||
|
else:
|
||||||
|
self.extra_params["thinking"] = {"type": "enabled", "budget_tokens": num_tokens}
|
||||||
|
|
||||||
|
def get_thinking_tokens(self, model):
|
||||||
|
"""Get formatted thinking token budget if available"""
|
||||||
|
budget = None
|
||||||
|
|
||||||
|
if model.extra_params:
|
||||||
|
# Check for OpenRouter reasoning format
|
||||||
|
if (
|
||||||
|
"reasoning" in model.extra_params
|
||||||
|
and "max_tokens" in model.extra_params["reasoning"]
|
||||||
|
):
|
||||||
|
budget = model.extra_params["reasoning"]["max_tokens"]
|
||||||
|
# Check for standard thinking format
|
||||||
|
elif (
|
||||||
|
"thinking" in model.extra_params
|
||||||
|
and "budget_tokens" in model.extra_params["thinking"]
|
||||||
|
):
|
||||||
|
budget = model.extra_params["thinking"]["budget_tokens"]
|
||||||
|
|
||||||
|
if budget is not None:
|
||||||
|
# Format as xx.yK for thousands, xx.yM for millions
|
||||||
|
if budget >= 1024 * 1024:
|
||||||
|
value = budget / (1024 * 1024)
|
||||||
|
if value == int(value):
|
||||||
|
return f"{int(value)}M"
|
||||||
|
else:
|
||||||
|
return f"{value:.1f}M"
|
||||||
|
else:
|
||||||
|
value = budget / 1024
|
||||||
|
if value == int(value):
|
||||||
|
return f"{int(value)}k"
|
||||||
|
else:
|
||||||
|
return f"{value:.1f}k"
|
||||||
|
return None
|
||||||
|
|
||||||
|
def get_reasoning_effort(self, model):
|
||||||
|
"""Get reasoning effort value if available"""
|
||||||
|
if (
|
||||||
|
model.extra_params
|
||||||
|
and "extra_body" in model.extra_params
|
||||||
|
and "reasoning_effort" in model.extra_params["extra_body"]
|
||||||
|
):
|
||||||
|
return model.extra_params["extra_body"]["reasoning_effort"]
|
||||||
|
return None
|
||||||
|
|
||||||
def is_deepseek_r1(self):
|
def is_deepseek_r1(self):
|
||||||
name = self.name.lower()
|
name = self.name.lower()
|
||||||
@@ -657,6 +776,8 @@ class Model(ModelSettings):
|
|||||||
hash_object = hashlib.sha1(key)
|
hash_object = hashlib.sha1(key)
|
||||||
if "timeout" not in kwargs:
|
if "timeout" not in kwargs:
|
||||||
kwargs["timeout"] = request_timeout
|
kwargs["timeout"] = request_timeout
|
||||||
|
if self.verbose:
|
||||||
|
dump(kwargs)
|
||||||
res = litellm.completion(**kwargs)
|
res = litellm.completion(**kwargs)
|
||||||
return hash_object, res
|
return hash_object, res
|
||||||
|
|
||||||
|
|||||||
7
aider/queries/tree-sitter-language-pack/README.md
Normal file
7
aider/queries/tree-sitter-language-pack/README.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
These scm files are all adapted from the github repositories listed here:
|
||||||
|
|
||||||
|
https://github.com/Goldziher/tree-sitter-language-pack/blob/main/sources/language_definitions.json
|
||||||
|
|
||||||
|
See this URL for information on the licenses of each repo:
|
||||||
|
|
||||||
|
https://github.com/Goldziher/tree-sitter-language-pack/
|
||||||
5
aider/queries/tree-sitter-language-pack/arduino-tags.scm
Normal file
5
aider/queries/tree-sitter-language-pack/arduino-tags.scm
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
(function_declarator
|
||||||
|
declarator: (identifier) @name.definition.function) @definition.function
|
||||||
|
|
||||||
|
(call_expression
|
||||||
|
function: (identifier) @name.reference.call) @reference.call
|
||||||
9
aider/queries/tree-sitter-language-pack/c-tags.scm
Normal file
9
aider/queries/tree-sitter-language-pack/c-tags.scm
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
(struct_specifier name: (type_identifier) @name.definition.class body:(_)) @definition.class
|
||||||
|
|
||||||
|
(declaration type: (union_specifier name: (type_identifier) @name.definition.class)) @definition.class
|
||||||
|
|
||||||
|
(function_declarator declarator: (identifier) @name.definition.function) @definition.function
|
||||||
|
|
||||||
|
(type_definition declarator: (type_identifier) @name.definition.type) @definition.type
|
||||||
|
|
||||||
|
(enum_specifier name: (type_identifier) @name.definition.type) @definition.type
|
||||||
16
aider/queries/tree-sitter-language-pack/chatito-tags.scm
Normal file
16
aider/queries/tree-sitter-language-pack/chatito-tags.scm
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
; Definitions
|
||||||
|
(intent_def
|
||||||
|
(intent) @name.definition.intent) @definition.intent
|
||||||
|
|
||||||
|
(slot_def
|
||||||
|
(slot) @name.definition.slot) @definition.slot
|
||||||
|
|
||||||
|
(alias_def
|
||||||
|
(alias) @name.definition.alias) @definition.alias
|
||||||
|
|
||||||
|
; References
|
||||||
|
(slot_ref
|
||||||
|
(slot) @name.reference.slot) @reference.slot
|
||||||
|
|
||||||
|
(alias_ref
|
||||||
|
(alias) @name.reference.alias) @reference.alias
|
||||||
122
aider/queries/tree-sitter-language-pack/commonlisp-tags.scm
Normal file
122
aider/queries/tree-sitter-language-pack/commonlisp-tags.scm
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;; Function Definitions ;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(defun_header
|
||||||
|
function_name: (sym_lit) @name.definition.function) @definition.function
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;; Function Calls ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;;
|
||||||
|
;;; Basically, we consider every list literal with symbol as the
|
||||||
|
;;; first element to be a call to a function named by that element.
|
||||||
|
;;; But we must exclude some cases. Note, tree-sitter @ignore
|
||||||
|
;;; cases only work if they are declared before the cases
|
||||||
|
;;; we want to include.
|
||||||
|
|
||||||
|
;; Exclude lambda lists for function definitions
|
||||||
|
;; For example:
|
||||||
|
;;
|
||||||
|
;; (defun my-func (arg1 arg2) ...)
|
||||||
|
;;
|
||||||
|
;; do not treat (arg1 arg2) as a call of function arg1
|
||||||
|
;;
|
||||||
|
(defun_header
|
||||||
|
lambda_list: (list_lit . [(sym_lit) (package_lit)] @ignore))
|
||||||
|
|
||||||
|
;; Similar to the above, but for
|
||||||
|
;;
|
||||||
|
;; (defmethod m ((type1 param1) (type2 param2)) ...)
|
||||||
|
;;
|
||||||
|
;; where list literals having symbol as their first element
|
||||||
|
;; are nested inside the lambda list.
|
||||||
|
(defun_header
|
||||||
|
lambda_list: (list_lit (list_lit . [(sym_lit) (package_lit)] @ignore)))
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; (let ((var ...) (var2 ...)) ...)
|
||||||
|
;;
|
||||||
|
;; - exclude var, var2
|
||||||
|
;; - the same for let*, flet, labels, macrolet, symbol-macrolet
|
||||||
|
(list_lit . [(sym_lit) (package_lit)] @name.reference.call
|
||||||
|
. (list_lit (list_lit . [(sym_lit) (package_lit)] @ignore))
|
||||||
|
(#match? @name.reference.call
|
||||||
|
"(?i)^(cl:)?(let|let\\*|flet|labels|macrolet|symbol-macrolet)$")
|
||||||
|
)
|
||||||
|
|
||||||
|
;; TODO:
|
||||||
|
;; - exclude also:
|
||||||
|
;; - (defclass name (parent parent2)
|
||||||
|
;; ((slot1 ...)
|
||||||
|
;; (slot2 ...))
|
||||||
|
;; exclude the parent, slot1, slot2
|
||||||
|
;; - (flet ((func-1 (param1 param2))) ...)
|
||||||
|
;; - we already exclude func-1, but param1 is still recognized
|
||||||
|
;; as a function call - exclude it too
|
||||||
|
;; - the same for labels
|
||||||
|
;; - the same macrolet
|
||||||
|
;; - what else?
|
||||||
|
;; (that's a non-goal to completely support all macros
|
||||||
|
;; and special operators, but every one we support
|
||||||
|
;; makes the solution a little bit better)
|
||||||
|
;; - (flet ((func-1 (param1 param2))) ...)
|
||||||
|
;; - instead of simply excluding it, as we do today,
|
||||||
|
;; tag func-1 as @local.definition.function (I suppose)
|
||||||
|
;; - the same for labels, macrolet
|
||||||
|
;; - @local.scope for let, let*, flet, labels, macrolet
|
||||||
|
;; - I guess the whole span of the scope text,
|
||||||
|
;; till the closing paren, should be tagged as @local.scope;
|
||||||
|
;; Hopefully, combined with @local.definition.function
|
||||||
|
;; within the scope, the usual @reference.call within
|
||||||
|
;; that scope will refer to the local definition,
|
||||||
|
;; and there will be no need to use @local.reference.call
|
||||||
|
;; (which is more difficult to implement).
|
||||||
|
;; - When implementing, remember the scope rules differences
|
||||||
|
;; of let vs let*, flet vs labels.
|
||||||
|
|
||||||
|
|
||||||
|
;; Include all other cases - list literal with symbol as the
|
||||||
|
;; first element
|
||||||
|
(list_lit . [(sym_lit) (package_lit)] @name.reference.call) @reference.call
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;; classes
|
||||||
|
|
||||||
|
(list_lit . [(sym_lit) (package_lit)] @ignore
|
||||||
|
. [(sym_lit) (package_lit)] @name.definition.class
|
||||||
|
(#match? @ignore "(?i)^(cl:)?defclass$")
|
||||||
|
) @definition.class
|
||||||
|
|
||||||
|
(list_lit . [(sym_lit) (package_lit)] @ignore
|
||||||
|
. (quoting_lit [(sym_lit) (package_lit)] @name.reference.class)
|
||||||
|
(#match? @ignore "(?i)^(cl:)?make-instance$")
|
||||||
|
) @reference.class
|
||||||
|
|
||||||
|
;;; TODO:
|
||||||
|
;; - @reference.class for base classes
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;; TODO:
|
||||||
|
;; - Symbols referenced in defpackage
|
||||||
|
;;
|
||||||
|
;; (defpackage ...
|
||||||
|
;; (:export (symbol-a :symbol-b #:symbol-c "SYMBOL-D")))
|
||||||
|
;;
|
||||||
|
;; The goal is to allow quick navigation from the API
|
||||||
|
;; overview in the form of defpackage, to the definition
|
||||||
|
;; where user can read parameters, docstring, etc.
|
||||||
|
;; - The @name must not include the colon, or sharpsign colon, quotes,
|
||||||
|
;; just symbol-a, symbol-b, symbol-c, sybmol-d
|
||||||
|
;; - Downcase the names specified as string literals?
|
||||||
|
;; ("SYMBOL-D" -> symbol-d)
|
||||||
|
;; - We don't know if the exported symbol is a function, variable,
|
||||||
|
;; class or something else. The official doc
|
||||||
|
;; (https://tree-sitter.github.io/tree-sitter/code-navigation-systems)
|
||||||
|
;; does not even suggest a tag for variable reference.
|
||||||
|
;; (Although in practice, the `tree-sitter tags` command
|
||||||
|
;; allows any @reference.* and @definition.* tags)
|
||||||
|
;; Probably it's better to just use @reference.call for all
|
||||||
|
;; the symbols in the :export clause.
|
||||||
|
;;
|
||||||
|
;; - The same for the export function call:
|
||||||
|
;;
|
||||||
|
;; (export '(symbol-a :symbol-b #:symbol-c "SYMBOL-D"))
|
||||||
15
aider/queries/tree-sitter-language-pack/cpp-tags.scm
Normal file
15
aider/queries/tree-sitter-language-pack/cpp-tags.scm
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
(struct_specifier name: (type_identifier) @name.definition.class body:(_)) @definition.class
|
||||||
|
|
||||||
|
(declaration type: (union_specifier name: (type_identifier) @name.definition.class)) @definition.class
|
||||||
|
|
||||||
|
(function_declarator declarator: (identifier) @name.definition.function) @definition.function
|
||||||
|
|
||||||
|
(function_declarator declarator: (field_identifier) @name.definition.function) @definition.function
|
||||||
|
|
||||||
|
(function_declarator declarator: (qualified_identifier scope: (namespace_identifier) @local.scope name: (identifier) @name.definition.method)) @definition.method
|
||||||
|
|
||||||
|
(type_definition declarator: (type_identifier) @name.definition.type) @definition.type
|
||||||
|
|
||||||
|
(enum_specifier name: (type_identifier) @name.definition.type) @definition.type
|
||||||
|
|
||||||
|
(class_specifier name: (type_identifier) @name.definition.class) @definition.class
|
||||||
26
aider/queries/tree-sitter-language-pack/d-tags.scm
Normal file
26
aider/queries/tree-sitter-language-pack/d-tags.scm
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
(module_def (module_declaration (module_fqn) @name.definition.module)) @definition.module
|
||||||
|
|
||||||
|
(struct_declaration (struct) . (identifier) @name.definition.class) @definition.class
|
||||||
|
(interface_declaration (interface) . (identifier) @name.definition.interface) @definition.interface
|
||||||
|
(enum_declaration (enum) . (identifier) @name.definition.type) @definition.type
|
||||||
|
|
||||||
|
(class_declaration (class) . (identifier) @name.definition.class) @definition.class
|
||||||
|
(constructor (this) @name.definition.method) @definition.method
|
||||||
|
(destructor (this) @name.definition.method) @definition.method
|
||||||
|
(postblit (this) @name.definition.method) @definition.method
|
||||||
|
|
||||||
|
(manifest_declarator . (identifier) @name.definition.type) @definition.type
|
||||||
|
|
||||||
|
(function_declaration (identifier) @name.definition.function) @definition.function
|
||||||
|
|
||||||
|
(union_declaration (union) . (identifier) @name.definition.type) @definition.type
|
||||||
|
|
||||||
|
(anonymous_enum_declaration (enum_member . (identifier) @name.definition.constant)) @definition.constant
|
||||||
|
|
||||||
|
(enum_declaration (enum_member . (identifier) @name.definition.constant)) @definition.constant
|
||||||
|
|
||||||
|
(call_expression (identifier) @name.reference.call) @reference.call
|
||||||
|
(call_expression (type (template_instance (identifier) @name.reference.call))) @reference.call
|
||||||
|
(parameter (type (identifier) @name.reference.class) @reference.class (identifier))
|
||||||
|
|
||||||
|
(variable_declaration (type (identifier) @name.reference.class) @reference.class (declarator))
|
||||||
92
aider/queries/tree-sitter-language-pack/dart-tags.scm
Normal file
92
aider/queries/tree-sitter-language-pack/dart-tags.scm
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
|
||||||
|
(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
|
||||||
|
|
||||||
|
|
||||||
|
(new_expression
|
||||||
|
(type_identifier) @name.reference.class) @reference.class
|
||||||
|
|
||||||
|
(enum_declaration
|
||||||
|
name: (identifier) @name.definition.enum) @definition.enum
|
||||||
|
|
||||||
|
(function_signature
|
||||||
|
name: (identifier) @name.definition.function) @definition.function
|
||||||
|
|
||||||
|
(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.send))) @reference.call
|
||||||
|
|
||||||
|
(assignment_expression
|
||||||
|
left: (assignable_expression
|
||||||
|
(identifier)
|
||||||
|
(conditional_assignable_selector
|
||||||
|
"?."
|
||||||
|
(identifier) @name.reference.send))) @reference.call
|
||||||
|
|
||||||
|
((identifier) @name.reference.send
|
||||||
|
(selector
|
||||||
|
"!"?
|
||||||
|
(conditional_assignable_selector
|
||||||
|
"?." (identifier) @name.reference.send)?
|
||||||
|
(unconditional_assignable_selector
|
||||||
|
"."? (identifier) @name.reference.send)?
|
||||||
|
(argument_part
|
||||||
|
(arguments
|
||||||
|
(argument)*))?)*
|
||||||
|
(cascade_section
|
||||||
|
(cascade_selector
|
||||||
|
(identifier)) @name.reference.send
|
||||||
|
(argument_part
|
||||||
|
(arguments
|
||||||
|
(argument)*))?)?) @reference.call
|
||||||
|
|
||||||
5
aider/queries/tree-sitter-language-pack/elisp-tags.scm
Normal file
5
aider/queries/tree-sitter-language-pack/elisp-tags.scm
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
;; defun/defsubst
|
||||||
|
(function_definition name: (symbol) @name.definition.function) @definition.function
|
||||||
|
|
||||||
|
;; Treat macros as function definitions for the sake of TAGS.
|
||||||
|
(macro_definition name: (symbol) @name.definition.function) @definition.function
|
||||||
54
aider/queries/tree-sitter-language-pack/elixir-tags.scm
Normal file
54
aider/queries/tree-sitter-language-pack/elixir-tags.scm
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
; Definitions
|
||||||
|
|
||||||
|
; * modules and protocols
|
||||||
|
(call
|
||||||
|
target: (identifier) @ignore
|
||||||
|
(arguments (alias) @name.definition.module)
|
||||||
|
(#any-of? @ignore "defmodule" "defprotocol")) @definition.module
|
||||||
|
|
||||||
|
; * functions/macros
|
||||||
|
(call
|
||||||
|
target: (identifier) @ignore
|
||||||
|
(arguments
|
||||||
|
[
|
||||||
|
; zero-arity functions with no parentheses
|
||||||
|
(identifier) @name.definition.function
|
||||||
|
; regular function clause
|
||||||
|
(call target: (identifier) @name.definition.function)
|
||||||
|
; function clause with a guard clause
|
||||||
|
(binary_operator
|
||||||
|
left: (call target: (identifier) @name.definition.function)
|
||||||
|
operator: "when")
|
||||||
|
])
|
||||||
|
(#any-of? @ignore "def" "defp" "defdelegate" "defguard" "defguardp" "defmacro" "defmacrop" "defn" "defnp")) @definition.function
|
||||||
|
|
||||||
|
; References
|
||||||
|
|
||||||
|
; ignore calls to kernel/special-forms keywords
|
||||||
|
(call
|
||||||
|
target: (identifier) @ignore
|
||||||
|
(#any-of? @ignore "def" "defp" "defdelegate" "defguard" "defguardp" "defmacro" "defmacrop" "defn" "defnp" "defmodule" "defprotocol" "defimpl" "defstruct" "defexception" "defoverridable" "alias" "case" "cond" "else" "for" "if" "import" "quote" "raise" "receive" "require" "reraise" "super" "throw" "try" "unless" "unquote" "unquote_splicing" "use" "with"))
|
||||||
|
|
||||||
|
; ignore module attributes
|
||||||
|
(unary_operator
|
||||||
|
operator: "@"
|
||||||
|
operand: (call
|
||||||
|
target: (identifier) @ignore))
|
||||||
|
|
||||||
|
; * function call
|
||||||
|
(call
|
||||||
|
target: [
|
||||||
|
; local
|
||||||
|
(identifier) @name.reference.call
|
||||||
|
; remote
|
||||||
|
(dot
|
||||||
|
right: (identifier) @name.reference.call)
|
||||||
|
]) @reference.call
|
||||||
|
|
||||||
|
; * pipe into function call
|
||||||
|
(binary_operator
|
||||||
|
operator: "|>"
|
||||||
|
right: (identifier) @name.reference.call) @reference.call
|
||||||
|
|
||||||
|
; * modules
|
||||||
|
(alias) @name.reference.module @reference.module
|
||||||
19
aider/queries/tree-sitter-language-pack/elm-tags.scm
Normal file
19
aider/queries/tree-sitter-language-pack/elm-tags.scm
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
(value_declaration (function_declaration_left (lower_case_identifier) @name.definition.function)) @definition.function
|
||||||
|
|
||||||
|
(function_call_expr (value_expr (value_qid) @name.reference.function)) @reference.function
|
||||||
|
(exposed_value (lower_case_identifier) @name.reference.function) @reference.function
|
||||||
|
(type_annotation ((lower_case_identifier) @name.reference.function) (colon)) @reference.function
|
||||||
|
|
||||||
|
(type_declaration ((upper_case_identifier) @name.definition.type) ) @definition.type
|
||||||
|
|
||||||
|
(type_ref (upper_case_qid (upper_case_identifier) @name.reference.type)) @reference.type
|
||||||
|
(exposed_type (upper_case_identifier) @name.reference.type) @reference.type
|
||||||
|
|
||||||
|
(type_declaration (union_variant (upper_case_identifier) @name.definition.union)) @definition.union
|
||||||
|
|
||||||
|
(value_expr (upper_case_qid (upper_case_identifier) @name.reference.union)) @reference.union
|
||||||
|
|
||||||
|
|
||||||
|
(module_declaration
|
||||||
|
(upper_case_qid (upper_case_identifier)) @name.definition.module
|
||||||
|
) @definition.module
|
||||||
41
aider/queries/tree-sitter-language-pack/gleam-tags.scm
Normal file
41
aider/queries/tree-sitter-language-pack/gleam-tags.scm
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
; Modules
|
||||||
|
(module) @name.reference.module @reference.module
|
||||||
|
(import alias: (identifier) @name.reference.module) @reference.module
|
||||||
|
(remote_type_identifier
|
||||||
|
module: (identifier) @name.reference.module) @reference.module
|
||||||
|
((field_access
|
||||||
|
record: (identifier) @name.reference.module)
|
||||||
|
(#is-not? local)) @reference.module
|
||||||
|
|
||||||
|
; Functions
|
||||||
|
(function
|
||||||
|
name: (identifier) @name.definition.function) @definition.function
|
||||||
|
(external_function
|
||||||
|
name: (identifier) @name.definition.function) @definition.function
|
||||||
|
(unqualified_import (identifier) @name.reference.function) @reference.function
|
||||||
|
((function_call
|
||||||
|
function: (identifier) @name.reference.function) @reference.function
|
||||||
|
(#is-not? local))
|
||||||
|
((field_access
|
||||||
|
record: (identifier) @ignore
|
||||||
|
field: (label) @name.reference.function)
|
||||||
|
(#is-not? local)) @reference.function
|
||||||
|
((binary_expression
|
||||||
|
operator: "|>"
|
||||||
|
right: (identifier) @name.reference.function)
|
||||||
|
(#is-not? local)) @reference.function
|
||||||
|
|
||||||
|
; Types
|
||||||
|
(type_definition
|
||||||
|
(type_name
|
||||||
|
name: (type_identifier) @name.definition.type)) @definition.type
|
||||||
|
(type_definition
|
||||||
|
(data_constructors
|
||||||
|
(data_constructor
|
||||||
|
name: (constructor_name) @name.definition.constructor))) @definition.constructor
|
||||||
|
(external_type
|
||||||
|
(type_name
|
||||||
|
name: (type_identifier) @name.definition.type)) @definition.type
|
||||||
|
|
||||||
|
(type_identifier) @name.reference.type @reference.type
|
||||||
|
(constructor_name) @name.reference.constructor @reference.constructor
|
||||||
42
aider/queries/tree-sitter-language-pack/go-tags.scm
Normal file
42
aider/queries/tree-sitter-language-pack/go-tags.scm
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
(
|
||||||
|
(comment)* @doc
|
||||||
|
.
|
||||||
|
(function_declaration
|
||||||
|
name: (identifier) @name.definition.function) @definition.function
|
||||||
|
(#strip! @doc "^//\\s*")
|
||||||
|
(#set-adjacent! @doc @definition.function)
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
(comment)* @doc
|
||||||
|
.
|
||||||
|
(method_declaration
|
||||||
|
name: (field_identifier) @name.definition.method) @definition.method
|
||||||
|
(#strip! @doc "^//\\s*")
|
||||||
|
(#set-adjacent! @doc @definition.method)
|
||||||
|
)
|
||||||
|
|
||||||
|
(call_expression
|
||||||
|
function: [
|
||||||
|
(identifier) @name.reference.call
|
||||||
|
(parenthesized_expression (identifier) @name.reference.call)
|
||||||
|
(selector_expression field: (field_identifier) @name.reference.call)
|
||||||
|
(parenthesized_expression (selector_expression field: (field_identifier) @name.reference.call))
|
||||||
|
]) @reference.call
|
||||||
|
|
||||||
|
(type_spec
|
||||||
|
name: (type_identifier) @name.definition.type) @definition.type
|
||||||
|
|
||||||
|
(type_identifier) @name.reference.type @reference.type
|
||||||
|
|
||||||
|
(package_clause "package" (package_identifier) @name.definition.module)
|
||||||
|
|
||||||
|
(type_declaration (type_spec name: (type_identifier) @name.definition.interface type: (interface_type)))
|
||||||
|
|
||||||
|
(type_declaration (type_spec name: (type_identifier) @name.definition.class type: (struct_type)))
|
||||||
|
|
||||||
|
(import_declaration (import_spec) @name.reference.module)
|
||||||
|
|
||||||
|
(var_declaration (var_spec name: (identifier) @name.definition.variable))
|
||||||
|
|
||||||
|
(const_declaration (const_spec name: (identifier) @name.definition.constant))
|
||||||
20
aider/queries/tree-sitter-language-pack/java-tags.scm
Normal file
20
aider/queries/tree-sitter-language-pack/java-tags.scm
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
(class_declaration
|
||||||
|
name: (identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
|
(method_declaration
|
||||||
|
name: (identifier) @name.definition.method) @definition.method
|
||||||
|
|
||||||
|
(method_invocation
|
||||||
|
name: (identifier) @name.reference.method
|
||||||
|
arguments: (argument_list) @reference.call)
|
||||||
|
|
||||||
|
(interface_declaration
|
||||||
|
name: (identifier) @name.definition.interface) @definition.interface
|
||||||
|
|
||||||
|
(type_list
|
||||||
|
(type_identifier) @name.reference.interface) @reference.implementation
|
||||||
|
|
||||||
|
(object_creation_expression
|
||||||
|
type: (type_identifier) @name.reference.class) @reference.class
|
||||||
|
|
||||||
|
(superclass (type_identifier) @name.reference.class) @reference.class
|
||||||
34
aider/queries/tree-sitter-language-pack/lua-tags.scm
Normal file
34
aider/queries/tree-sitter-language-pack/lua-tags.scm
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
(function_declaration
|
||||||
|
name: [
|
||||||
|
(identifier) @name.definition.function
|
||||||
|
(dot_index_expression
|
||||||
|
field: (identifier) @name.definition.function)
|
||||||
|
]) @definition.function
|
||||||
|
|
||||||
|
(function_declaration
|
||||||
|
name: (method_index_expression
|
||||||
|
method: (identifier) @name.definition.method)) @definition.method
|
||||||
|
|
||||||
|
(assignment_statement
|
||||||
|
(variable_list .
|
||||||
|
name: [
|
||||||
|
(identifier) @name.definition.function
|
||||||
|
(dot_index_expression
|
||||||
|
field: (identifier) @name.definition.function)
|
||||||
|
])
|
||||||
|
(expression_list .
|
||||||
|
value: (function_definition))) @definition.function
|
||||||
|
|
||||||
|
(table_constructor
|
||||||
|
(field
|
||||||
|
name: (identifier) @name.definition.function
|
||||||
|
value: (function_definition))) @definition.function
|
||||||
|
|
||||||
|
(function_call
|
||||||
|
name: [
|
||||||
|
(identifier) @name.reference.call
|
||||||
|
(dot_index_expression
|
||||||
|
field: (identifier) @name.reference.call)
|
||||||
|
(method_index_expression
|
||||||
|
method: (identifier) @name.reference.method)
|
||||||
|
]) @reference.call
|
||||||
39
aider/queries/tree-sitter-language-pack/pony-tags.scm
Normal file
39
aider/queries/tree-sitter-language-pack/pony-tags.scm
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
;Class definitions @definition.class
|
||||||
|
;Function definitions @definition.function
|
||||||
|
;Interface definitions @definition.interface
|
||||||
|
;Method definitions @definition.method
|
||||||
|
;Module definitions @definition.module
|
||||||
|
;Function/method calls @reference.call
|
||||||
|
;Class reference @reference.class
|
||||||
|
;Interface implementation @reference.implementation
|
||||||
|
(
|
||||||
|
(identifier) @reference.class
|
||||||
|
(#match? @reference.class "^_*[A-Z][a-zA-Z0-9_]*$")
|
||||||
|
)
|
||||||
|
|
||||||
|
(class_definition (identifier) @name.definition.class) @definition.class
|
||||||
|
(actor_definition (identifier) @name.definition.class) @definition.class
|
||||||
|
(primitive_definition (identifier) @name.definition.class) @definition.class
|
||||||
|
(struct_definition (identifier) @name.definition.class) @definition.class
|
||||||
|
(type_alias (identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
|
(trait_definition (identifier) @name.definition.interface) @definition.interface
|
||||||
|
(interface_definition (identifier) @name.definition.interface) @definition.interface
|
||||||
|
|
||||||
|
(constructor (identifier) @name.definition.method) @definition.method
|
||||||
|
(method (identifier) @name.definition.method) @definition.method
|
||||||
|
(behavior (identifier) @name.definition.method) @definition.method
|
||||||
|
|
||||||
|
(class_definition (type) @name.reference.implementation) @reference.implementation
|
||||||
|
(actor_definition (type) @name.reference.implementation) @reference.implementation
|
||||||
|
(primitive_definition (type) @name.reference.implementation) @reference.implementation
|
||||||
|
(struct_definition (type) @name.reference.implementation) @reference.implementation
|
||||||
|
(type_alias (type) @name.reference.implementation) @reference.implementation
|
||||||
|
|
||||||
|
; calls - not catching all possible call cases of callees for capturing the method name
|
||||||
|
(call_expression callee: [(identifier) (ffi_identifier)] @name.reference.call) @reference.call
|
||||||
|
(call_expression callee: (generic_expression [(identifier) (ffi_identifier)] @name.reference.call)) @reference.call
|
||||||
|
(call_expression callee: (member_expression (identifier) @name.reference.call .)) @reference.call
|
||||||
|
(call_expression callee: (member_expression (generic_expression [(identifier) (ffi_identifier)] @name.reference.call) .)) @reference.call
|
||||||
|
; TODO: add more possible callee expressions
|
||||||
|
(call_expression) @reference.call
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
(property
|
||||||
|
(key) @name.definition.property) @definition.property
|
||||||
|
|
||||||
|
(substitution
|
||||||
|
(key) @name.reference.property) @reference.property
|
||||||
14
aider/queries/tree-sitter-language-pack/python-tags.scm
Normal file
14
aider/queries/tree-sitter-language-pack/python-tags.scm
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
(module (expression_statement (assignment left: (identifier) @name.definition.constant) @definition.constant))
|
||||||
|
|
||||||
|
(class_definition
|
||||||
|
name: (identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
|
(function_definition
|
||||||
|
name: (identifier) @name.definition.function) @definition.function
|
||||||
|
|
||||||
|
(call
|
||||||
|
function: [
|
||||||
|
(identifier) @name.reference.call
|
||||||
|
(attribute
|
||||||
|
attribute: (identifier) @name.reference.call)
|
||||||
|
]) @reference.call
|
||||||
21
aider/queries/tree-sitter-language-pack/r-tags.scm
Normal file
21
aider/queries/tree-sitter-language-pack/r-tags.scm
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
(binary_operator
|
||||||
|
lhs: (identifier) @name.definition.function
|
||||||
|
operator: "<-"
|
||||||
|
rhs: (function_definition)
|
||||||
|
) @definition.function
|
||||||
|
|
||||||
|
(binary_operator
|
||||||
|
lhs: (identifier) @name.definition.function
|
||||||
|
operator: "="
|
||||||
|
rhs: (function_definition)
|
||||||
|
) @definition.function
|
||||||
|
|
||||||
|
(call
|
||||||
|
function: (identifier) @name.reference.call
|
||||||
|
) @reference.call
|
||||||
|
|
||||||
|
(call
|
||||||
|
function: (namespace_operator
|
||||||
|
rhs: (identifier) @name.reference.call
|
||||||
|
)
|
||||||
|
) @reference.call
|
||||||
12
aider/queries/tree-sitter-language-pack/racket-tags.scm
Normal file
12
aider/queries/tree-sitter-language-pack/racket-tags.scm
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
(list
|
||||||
|
.
|
||||||
|
(symbol) @reference._define
|
||||||
|
(#match? @reference._define "^(define|define/contract)$")
|
||||||
|
.
|
||||||
|
(list
|
||||||
|
.
|
||||||
|
(symbol) @name.definition.function) @definition.function)
|
||||||
|
|
||||||
|
(list
|
||||||
|
.
|
||||||
|
(symbol) @name.reference.call)
|
||||||
64
aider/queries/tree-sitter-language-pack/ruby-tags.scm
Normal file
64
aider/queries/tree-sitter-language-pack/ruby-tags.scm
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
; Method definitions
|
||||||
|
|
||||||
|
(
|
||||||
|
(comment)* @doc
|
||||||
|
.
|
||||||
|
[
|
||||||
|
(method
|
||||||
|
name: (_) @name.definition.method) @definition.method
|
||||||
|
(singleton_method
|
||||||
|
name: (_) @name.definition.method) @definition.method
|
||||||
|
]
|
||||||
|
(#strip! @doc "^#\\s*")
|
||||||
|
(#select-adjacent! @doc @definition.method)
|
||||||
|
)
|
||||||
|
|
||||||
|
(alias
|
||||||
|
name: (_) @name.definition.method) @definition.method
|
||||||
|
|
||||||
|
(setter
|
||||||
|
(identifier) @ignore)
|
||||||
|
|
||||||
|
; Class definitions
|
||||||
|
|
||||||
|
(
|
||||||
|
(comment)* @doc
|
||||||
|
.
|
||||||
|
[
|
||||||
|
(class
|
||||||
|
name: [
|
||||||
|
(constant) @name.definition.class
|
||||||
|
(scope_resolution
|
||||||
|
name: (_) @name.definition.class)
|
||||||
|
]) @definition.class
|
||||||
|
(singleton_class
|
||||||
|
value: [
|
||||||
|
(constant) @name.definition.class
|
||||||
|
(scope_resolution
|
||||||
|
name: (_) @name.definition.class)
|
||||||
|
]) @definition.class
|
||||||
|
]
|
||||||
|
(#strip! @doc "^#\\s*")
|
||||||
|
(#select-adjacent! @doc @definition.class)
|
||||||
|
)
|
||||||
|
|
||||||
|
; Module definitions
|
||||||
|
|
||||||
|
(
|
||||||
|
(module
|
||||||
|
name: [
|
||||||
|
(constant) @name.definition.module
|
||||||
|
(scope_resolution
|
||||||
|
name: (_) @name.definition.module)
|
||||||
|
]) @definition.module
|
||||||
|
)
|
||||||
|
|
||||||
|
; Calls
|
||||||
|
|
||||||
|
(call method: (identifier) @name.reference.call) @reference.call
|
||||||
|
|
||||||
|
(
|
||||||
|
[(identifier) (constant)] @name.reference.call @reference.call
|
||||||
|
(#is-not? local)
|
||||||
|
(#not-match? @name.reference.call "^(lambda|load|require|require_relative|__FILE__|__LINE__)$")
|
||||||
|
)
|
||||||
60
aider/queries/tree-sitter-language-pack/rust-tags.scm
Normal file
60
aider/queries/tree-sitter-language-pack/rust-tags.scm
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
; ADT definitions
|
||||||
|
|
||||||
|
(struct_item
|
||||||
|
name: (type_identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
|
(enum_item
|
||||||
|
name: (type_identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
|
(union_item
|
||||||
|
name: (type_identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
|
; type aliases
|
||||||
|
|
||||||
|
(type_item
|
||||||
|
name: (type_identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
|
; method definitions
|
||||||
|
|
||||||
|
(declaration_list
|
||||||
|
(function_item
|
||||||
|
name: (identifier) @name.definition.method) @definition.method)
|
||||||
|
|
||||||
|
; function definitions
|
||||||
|
|
||||||
|
(function_item
|
||||||
|
name: (identifier) @name.definition.function) @definition.function
|
||||||
|
|
||||||
|
; trait definitions
|
||||||
|
(trait_item
|
||||||
|
name: (type_identifier) @name.definition.interface) @definition.interface
|
||||||
|
|
||||||
|
; module definitions
|
||||||
|
(mod_item
|
||||||
|
name: (identifier) @name.definition.module) @definition.module
|
||||||
|
|
||||||
|
; macro definitions
|
||||||
|
|
||||||
|
(macro_definition
|
||||||
|
name: (identifier) @name.definition.macro) @definition.macro
|
||||||
|
|
||||||
|
; references
|
||||||
|
|
||||||
|
(call_expression
|
||||||
|
function: (identifier) @name.reference.call) @reference.call
|
||||||
|
|
||||||
|
(call_expression
|
||||||
|
function: (field_expression
|
||||||
|
field: (field_identifier) @name.reference.call)) @reference.call
|
||||||
|
|
||||||
|
(macro_invocation
|
||||||
|
macro: (identifier) @name.reference.call) @reference.call
|
||||||
|
|
||||||
|
; implementations
|
||||||
|
|
||||||
|
(impl_item
|
||||||
|
trait: (type_identifier) @name.reference.implementation) @reference.implementation
|
||||||
|
|
||||||
|
(impl_item
|
||||||
|
type: (type_identifier) @name.reference.implementation
|
||||||
|
!trait) @reference.implementation
|
||||||
43
aider/queries/tree-sitter-language-pack/solidity-tags.scm
Normal file
43
aider/queries/tree-sitter-language-pack/solidity-tags.scm
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
;; Method and Function declarations
|
||||||
|
(contract_declaration (_
|
||||||
|
(function_definition
|
||||||
|
name: (identifier) @name.definition.function) @definition.method))
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(function_definition
|
||||||
|
name: (identifier) @name.definition.function) @definition.function)
|
||||||
|
|
||||||
|
;; Contract, struct, enum and interface declarations
|
||||||
|
(contract_declaration
|
||||||
|
name: (identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
|
(interface_declaration
|
||||||
|
name: (identifier) @name.definition.interface) @definition.interface
|
||||||
|
|
||||||
|
(library_declaration
|
||||||
|
name: (identifier) @name.definition.class) @definition.interface
|
||||||
|
|
||||||
|
(struct_declaration name: (identifier) @name.definition.class) @definition.class
|
||||||
|
(enum_declaration name: (identifier) @name.definition.class) @definition.class
|
||||||
|
(event_definition name: (identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
|
;; Function calls
|
||||||
|
(call_expression (expression (identifier)) @name.reference.call ) @reference.call
|
||||||
|
|
||||||
|
(call_expression
|
||||||
|
(expression (member_expression
|
||||||
|
property: (_) @name.reference.method ))) @reference.call
|
||||||
|
|
||||||
|
;; Log emit
|
||||||
|
(emit_statement name: (_) @name.reference.class) @reference.class
|
||||||
|
|
||||||
|
|
||||||
|
;; Inheritance
|
||||||
|
|
||||||
|
(inheritance_specifier
|
||||||
|
ancestor: (user_defined_type (_) @name.reference.class . )) @reference.class
|
||||||
|
|
||||||
|
|
||||||
|
;; Imports ( note that unknown is not standardised )
|
||||||
|
(import_directive
|
||||||
|
import_name: (_) @name.reference.module ) @reference.unknown
|
||||||
51
aider/queries/tree-sitter-language-pack/swift-tags.scm
Normal file
51
aider/queries/tree-sitter-language-pack/swift-tags.scm
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
(class_declaration
|
||||||
|
name: (type_identifier) @name.definition.class) @definition.class
|
||||||
|
|
||||||
|
(protocol_declaration
|
||||||
|
name: (type_identifier) @name.definition.interface) @definition.interface
|
||||||
|
|
||||||
|
(class_declaration
|
||||||
|
(class_body
|
||||||
|
[
|
||||||
|
(function_declaration
|
||||||
|
name: (simple_identifier) @name.definition.method
|
||||||
|
)
|
||||||
|
(subscript_declaration
|
||||||
|
(parameter (simple_identifier) @name.definition.method)
|
||||||
|
)
|
||||||
|
(init_declaration "init" @name.definition.method)
|
||||||
|
(deinit_declaration "deinit" @name.definition.method)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
) @definition.method
|
||||||
|
|
||||||
|
(protocol_declaration
|
||||||
|
(protocol_body
|
||||||
|
[
|
||||||
|
(protocol_function_declaration
|
||||||
|
name: (simple_identifier) @name.definition.method
|
||||||
|
)
|
||||||
|
(subscript_declaration
|
||||||
|
(parameter (simple_identifier) @name.definition.method)
|
||||||
|
)
|
||||||
|
(init_declaration "init" @name.definition.method)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
) @definition.method
|
||||||
|
|
||||||
|
(class_declaration
|
||||||
|
(class_body
|
||||||
|
[
|
||||||
|
(property_declaration
|
||||||
|
(pattern (simple_identifier) @name.definition.property)
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
) @definition.property
|
||||||
|
|
||||||
|
(property_declaration
|
||||||
|
(pattern (simple_identifier) @name.definition.property)
|
||||||
|
) @definition.property
|
||||||
|
|
||||||
|
(function_declaration
|
||||||
|
name: (simple_identifier) @name.definition.function) @definition.function
|
||||||
20
aider/queries/tree-sitter-language-pack/udev-tags.scm
Normal file
20
aider/queries/tree-sitter-language-pack/udev-tags.scm
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
(assignment
|
||||||
|
key: "LABEL"
|
||||||
|
(value
|
||||||
|
(content) @name.definition.label)) @definition.label
|
||||||
|
|
||||||
|
(assignment
|
||||||
|
key: "GOTO"
|
||||||
|
(value
|
||||||
|
(content) @name.reference.label)) @reference.label
|
||||||
|
|
||||||
|
(assignment
|
||||||
|
key: "ENV"
|
||||||
|
(env_var) @name.definition.variable) @definition.variable
|
||||||
|
|
||||||
|
(match
|
||||||
|
key: "ENV"
|
||||||
|
(env_var) @name.reference.variable) @reference.variable
|
||||||
|
|
||||||
|
(var_sub
|
||||||
|
(env_var) @name.reference.variable) @reference.variable
|
||||||
@@ -56,6 +56,7 @@ class GitRepo:
|
|||||||
attribute_commit_message_committer=False,
|
attribute_commit_message_committer=False,
|
||||||
commit_prompt=None,
|
commit_prompt=None,
|
||||||
subtree_only=False,
|
subtree_only=False,
|
||||||
|
git_commit_verify=True,
|
||||||
):
|
):
|
||||||
self.io = io
|
self.io = io
|
||||||
self.models = models
|
self.models = models
|
||||||
@@ -69,6 +70,7 @@ class GitRepo:
|
|||||||
self.attribute_commit_message_committer = attribute_commit_message_committer
|
self.attribute_commit_message_committer = attribute_commit_message_committer
|
||||||
self.commit_prompt = commit_prompt
|
self.commit_prompt = commit_prompt
|
||||||
self.subtree_only = subtree_only
|
self.subtree_only = subtree_only
|
||||||
|
self.git_commit_verify = git_commit_verify
|
||||||
self.ignore_file_cache = {}
|
self.ignore_file_cache = {}
|
||||||
|
|
||||||
if git_dname:
|
if git_dname:
|
||||||
@@ -133,7 +135,9 @@ class GitRepo:
|
|||||||
# if context:
|
# if context:
|
||||||
# full_commit_message += "\n\n# Aider chat conversation:\n\n" + context
|
# full_commit_message += "\n\n# Aider chat conversation:\n\n" + context
|
||||||
|
|
||||||
cmd = ["-m", full_commit_message, "--no-verify"]
|
cmd = ["-m", full_commit_message]
|
||||||
|
if not self.git_commit_verify:
|
||||||
|
cmd.append("--no-verify")
|
||||||
if fnames:
|
if fnames:
|
||||||
fnames = [str(self.abs_root_path(fn)) for fn in fnames]
|
fnames = [str(self.abs_root_path(fn)) for fn in fnames]
|
||||||
for fname in fnames:
|
for fname in fnames:
|
||||||
|
|||||||
@@ -196,6 +196,7 @@
|
|||||||
cache_control: true
|
cache_control: true
|
||||||
editor_model_name: anthropic/claude-3-7-sonnet-20250219
|
editor_model_name: anthropic/claude-3-7-sonnet-20250219
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: anthropic/claude-3-7-sonnet-latest
|
- name: anthropic/claude-3-7-sonnet-latest
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -209,6 +210,7 @@
|
|||||||
cache_control: true
|
cache_control: true
|
||||||
editor_model_name: anthropic/claude-3-7-sonnet-latest
|
editor_model_name: anthropic/claude-3-7-sonnet-latest
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: claude-3-7-sonnet-20250219
|
- name: claude-3-7-sonnet-20250219
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -222,6 +224,7 @@
|
|||||||
cache_control: true
|
cache_control: true
|
||||||
editor_model_name: claude-3-7-sonnet-20250219
|
editor_model_name: claude-3-7-sonnet-20250219
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: claude-3-7-sonnet-latest
|
- name: claude-3-7-sonnet-latest
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -235,6 +238,7 @@
|
|||||||
cache_control: true
|
cache_control: true
|
||||||
editor_model_name: claude-3-7-sonnet-latest
|
editor_model_name: claude-3-7-sonnet-latest
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: bedrock/anthropic.claude-3-7-sonnet-20250219-v1:0
|
- name: bedrock/anthropic.claude-3-7-sonnet-20250219-v1:0
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -248,6 +252,7 @@
|
|||||||
cache_control: true
|
cache_control: true
|
||||||
editor_model_name: bedrock/anthropic.claude-3-7-sonnet-20250219-v1:0
|
editor_model_name: bedrock/anthropic.claude-3-7-sonnet-20250219-v1:0
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0
|
- name: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -261,6 +266,7 @@
|
|||||||
cache_control: true
|
cache_control: true
|
||||||
editor_model_name: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0
|
editor_model_name: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: bedrock_converse/anthropic.claude-3-7-sonnet-20250219-v1:0
|
- name: bedrock_converse/anthropic.claude-3-7-sonnet-20250219-v1:0
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -274,6 +280,7 @@
|
|||||||
cache_control: true
|
cache_control: true
|
||||||
editor_model_name: bedrock_converse/anthropic.claude-3-7-sonnet-20250219-v1:0
|
editor_model_name: bedrock_converse/anthropic.claude-3-7-sonnet-20250219-v1:0
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: bedrock_converse/us.anthropic.claude-3-7-sonnet-20250219-v1:0
|
- name: bedrock_converse/us.anthropic.claude-3-7-sonnet-20250219-v1:0
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -287,6 +294,7 @@
|
|||||||
cache_control: true
|
cache_control: true
|
||||||
editor_model_name: bedrock_converse/us.anthropic.claude-3-7-sonnet-20250219-v1:0
|
editor_model_name: bedrock_converse/us.anthropic.claude-3-7-sonnet-20250219-v1:0
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: vertex_ai/claude-3-7-sonnet@20250219
|
- name: vertex_ai/claude-3-7-sonnet@20250219
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -297,6 +305,7 @@
|
|||||||
max_tokens: 64000
|
max_tokens: 64000
|
||||||
editor_model_name: vertex_ai/claude-3-7-sonnet@20250219
|
editor_model_name: vertex_ai/claude-3-7-sonnet@20250219
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: vertex_ai-anthropic_models/vertex_ai/claude-3-7-sonnet@20250219
|
- name: vertex_ai-anthropic_models/vertex_ai/claude-3-7-sonnet@20250219
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -307,6 +316,7 @@
|
|||||||
max_tokens: 64000
|
max_tokens: 64000
|
||||||
editor_model_name: vertex_ai-anthropic_models/vertex_ai/claude-3-7-sonnet@20250219
|
editor_model_name: vertex_ai-anthropic_models/vertex_ai/claude-3-7-sonnet@20250219
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: openrouter/anthropic/claude-3.7-sonnet
|
- name: openrouter/anthropic/claude-3.7-sonnet
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -320,6 +330,7 @@
|
|||||||
cache_control: true
|
cache_control: true
|
||||||
editor_model_name: openrouter/anthropic/claude-3.7-sonnet
|
editor_model_name: openrouter/anthropic/claude-3.7-sonnet
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: openrouter/anthropic/claude-3.7-sonnet:beta
|
- name: openrouter/anthropic/claude-3.7-sonnet:beta
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -333,6 +344,7 @@
|
|||||||
cache_control: true
|
cache_control: true
|
||||||
editor_model_name: openrouter/anthropic/claude-3.7-sonnet
|
editor_model_name: openrouter/anthropic/claude-3.7-sonnet
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["thinking_tokens"]
|
||||||
|
|
||||||
- name: bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
|
- name: bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -694,6 +706,7 @@
|
|||||||
streaming: false
|
streaming: false
|
||||||
editor_model_name: azure/gpt-4o
|
editor_model_name: azure/gpt-4o
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
|
accepts_settings: ["reasoning_effort"]
|
||||||
|
|
||||||
- name: o1-preview
|
- name: o1-preview
|
||||||
edit_format: architect
|
edit_format: architect
|
||||||
@@ -732,6 +745,7 @@
|
|||||||
editor_model_name: openrouter/openai/gpt-4o
|
editor_model_name: openrouter/openai/gpt-4o
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
system_prompt_prefix: "Formatting re-enabled. "
|
system_prompt_prefix: "Formatting re-enabled. "
|
||||||
|
accepts_settings: ["reasoning_effort"]
|
||||||
|
|
||||||
- name: openai/o1
|
- name: openai/o1
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -742,6 +756,7 @@
|
|||||||
editor_model_name: openai/gpt-4o
|
editor_model_name: openai/gpt-4o
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
system_prompt_prefix: "Formatting re-enabled. "
|
system_prompt_prefix: "Formatting re-enabled. "
|
||||||
|
accepts_settings: ["reasoning_effort"]
|
||||||
|
|
||||||
- name: o1
|
- name: o1
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -752,6 +767,7 @@
|
|||||||
editor_model_name: gpt-4o
|
editor_model_name: gpt-4o
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
system_prompt_prefix: "Formatting re-enabled. "
|
system_prompt_prefix: "Formatting re-enabled. "
|
||||||
|
accepts_settings: ["reasoning_effort"]
|
||||||
|
|
||||||
- name: openrouter/qwen/qwen-2.5-coder-32b-instruct
|
- name: openrouter/qwen/qwen-2.5-coder-32b-instruct
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -800,6 +816,7 @@
|
|||||||
editor_model_name: gpt-4o
|
editor_model_name: gpt-4o
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
system_prompt_prefix: "Formatting re-enabled. "
|
system_prompt_prefix: "Formatting re-enabled. "
|
||||||
|
accepts_settings: ["reasoning_effort"]
|
||||||
|
|
||||||
- name: o3-mini
|
- name: o3-mini
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -809,6 +826,7 @@
|
|||||||
editor_model_name: gpt-4o
|
editor_model_name: gpt-4o
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
system_prompt_prefix: "Formatting re-enabled. "
|
system_prompt_prefix: "Formatting re-enabled. "
|
||||||
|
accepts_settings: ["reasoning_effort"]
|
||||||
|
|
||||||
- name: openrouter/openai/o3-mini
|
- name: openrouter/openai/o3-mini
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -818,6 +836,7 @@
|
|||||||
editor_model_name: openrouter/openai/gpt-4o
|
editor_model_name: openrouter/openai/gpt-4o
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
system_prompt_prefix: "Formatting re-enabled. "
|
system_prompt_prefix: "Formatting re-enabled. "
|
||||||
|
accepts_settings: ["reasoning_effort"]
|
||||||
|
|
||||||
- name: openrouter/openai/o3-mini-high
|
- name: openrouter/openai/o3-mini-high
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -827,6 +846,7 @@
|
|||||||
editor_model_name: openrouter/openai/gpt-4o
|
editor_model_name: openrouter/openai/gpt-4o
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
system_prompt_prefix: "Formatting re-enabled. "
|
system_prompt_prefix: "Formatting re-enabled. "
|
||||||
|
accepts_settings: ["reasoning_effort"]
|
||||||
|
|
||||||
- name: azure/o3-mini
|
- name: azure/o3-mini
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -836,6 +856,7 @@
|
|||||||
editor_model_name: azure/gpt-4o
|
editor_model_name: azure/gpt-4o
|
||||||
editor_edit_format: editor-diff
|
editor_edit_format: editor-diff
|
||||||
system_prompt_prefix: "Formatting re-enabled. "
|
system_prompt_prefix: "Formatting re-enabled. "
|
||||||
|
accepts_settings: ["reasoning_effort"]
|
||||||
|
|
||||||
- name: gpt-4.5-preview
|
- name: gpt-4.5-preview
|
||||||
edit_format: diff
|
edit_format: diff
|
||||||
@@ -883,3 +904,18 @@
|
|||||||
max_tokens: 128000
|
max_tokens: 128000
|
||||||
top_p: 0.95
|
top_p: 0.95
|
||||||
|
|
||||||
|
- name: cohere_chat/command-a-03-2025
|
||||||
|
examples_as_sys_msg: true
|
||||||
|
|
||||||
|
- name: openrouter/cohere/command-a-03-2025
|
||||||
|
examples_as_sys_msg: true
|
||||||
|
|
||||||
|
- name: gemini/gemma-3-27b-it
|
||||||
|
use_system_prompt: false
|
||||||
|
|
||||||
|
- name: openrouter/google/gemma-3-27b-it:free
|
||||||
|
use_system_prompt: false
|
||||||
|
|
||||||
|
- name: openrouter/google/gemma-3-27b-it
|
||||||
|
use_system_prompt: false
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,13 @@ description: Release notes and stats on aider writing its own code.
|
|||||||
|
|
||||||
# Release history
|
# Release history
|
||||||
|
|
||||||
{% include blame.md %}
|
Aider writes most of its own code, usually about 70-80% of the new code in each release.
|
||||||
|
These
|
||||||
The above
|
[statistics are based on the git commit history](/docs/faq.html#how-are-the-aider-wrote-xx-of-code-stats-computed)
|
||||||
[stats are based on the git commit history](/docs/faq.html#how-are-the-aider-wrote-xx-of-code-stats-computed)
|
|
||||||
of the aider repo.
|
of the aider repo.
|
||||||
|
|
||||||
|
{% include blame.md %}
|
||||||
|
|
||||||
## Release notes
|
## Release notes
|
||||||
|
|
||||||
<!--[[[cog
|
<!--[[[cog
|
||||||
@@ -23,6 +24,51 @@ cog.out(text)
|
|||||||
]]]-->
|
]]]-->
|
||||||
|
|
||||||
|
|
||||||
|
### Aider v0.78.0
|
||||||
|
|
||||||
|
- Added model setting validation to ignore `--reasoning-effort` and `--thinking-tokens` if the model doesn't support them.
|
||||||
|
- Added `--check-model-accepts-settings` flag (default: true) to force unsupported model settings.
|
||||||
|
- Annotated which models support reasoning_effort and thinking_tokens settings in the model settings data.
|
||||||
|
- Improved code block rendering in markdown output with better padding using NoInsetMarkdown.
|
||||||
|
- Added `--git-commit-verify` flag (default: False) to control whether git commit hooks are bypassed.
|
||||||
|
- Added support for thinking tokens for OpenRouter Sonnet 3.7.
|
||||||
|
- Fixed autocompletion for `/ask`, `/code`, and `/architect` commands, by shladnik.
|
||||||
|
- Added vi-like behavior when pressing enter in multiline-mode while in vi normal/navigation-mode, by Marco Mayer.
|
||||||
|
- Added commands to switch between model types: `/editor-model` for Editor Model, and `/weak-model` for Weak Model, by csala.
|
||||||
|
- Added AWS_PROFILE support for Bedrock models, allowing use of AWS profiles instead of explicit credentials, by lentil32.
|
||||||
|
- Enhanced `--aiderignore` argument to resolve both absolute and relative paths, by mopemope.
|
||||||
|
- Improved platform information handling to gracefully handle retrieval errors.
|
||||||
|
- Aider wrote 92% of the code in this release.
|
||||||
|
|
||||||
|
### Aider v0.77.1
|
||||||
|
|
||||||
|
- Bumped dependencies to pickup litellm fix for Ollama.
|
||||||
|
- Added support for `openrouter/google/gemma-3-27b-it` model.
|
||||||
|
- Updated exclude patterns for documentation.
|
||||||
|
|
||||||
|
### Aider v0.77.0
|
||||||
|
|
||||||
|
- Big upgrade in [programming languages supported](https://aider.chat/docs/languages.html) by adopting [tree-sitter-language-pack](https://github.com/Goldziher/tree-sitter-language-pack/).
|
||||||
|
- 130 new languages with linter support.
|
||||||
|
- 20 new languages with repo-map support.
|
||||||
|
- Added `/think-tokens` command to set thinking token budget with support for human-readable formats (8k, 10.5k, 0.5M).
|
||||||
|
- Added `/reasoning-effort` command to control model reasoning level.
|
||||||
|
- The `/think-tokens` and `/reasoning-effort` commands display current settings when called without arguments.
|
||||||
|
- Display of thinking token budget and reasoning effort in model information.
|
||||||
|
- Changed `--thinking-tokens` argument to accept string values with human-readable formats.
|
||||||
|
- Added `--auto-accept-architect` flag (default: true) to automatically accept changes from architect coder format without confirmation.
|
||||||
|
- Added support for `cohere_chat/command-a-03-2025` and `gemini/gemma-3-27b-it`
|
||||||
|
- The bare `/drop` command now preserves original read-only files provided via args.read.
|
||||||
|
- Fixed a bug where default model would be set by deprecated `--shortcut` switches even when already specified in the command line.
|
||||||
|
- Improved AutoCompleter to require 3 characters for autocompletion to reduce noise.
|
||||||
|
- Aider wrote 72% of the code in this release.
|
||||||
|
|
||||||
|
### Aider v0.76.2
|
||||||
|
|
||||||
|
- Fixed handling of JSONDecodeError when loading model cache file.
|
||||||
|
- Fixed handling of GitCommandError when retrieving git user configuration.
|
||||||
|
- Aider wrote 75% of the code in this release.
|
||||||
|
|
||||||
### Aider v0.76.1
|
### Aider v0.76.1
|
||||||
|
|
||||||
- Added ignore_permission_denied option to file watcher to prevent errors when accessing restricted files, by Yutaka Matsubara.
|
- Added ignore_permission_denied option to file watcher to prevent errors when accessing restricted files, by Yutaka Matsubara.
|
||||||
|
|||||||
@@ -4017,3 +4017,161 @@
|
|||||||
gmoz22: 4
|
gmoz22: 4
|
||||||
start_tag: v0.75.0
|
start_tag: v0.75.0
|
||||||
total_lines: 1875
|
total_lines: 1875
|
||||||
|
- aider_percentage: 71.93
|
||||||
|
aider_total: 1399
|
||||||
|
end_date: '2025-03-13'
|
||||||
|
end_tag: v0.77.0
|
||||||
|
file_counts:
|
||||||
|
aider/__init__.py:
|
||||||
|
Paul Gauthier: 1
|
||||||
|
aider/args.py:
|
||||||
|
Paul Gauthier (aider): 5
|
||||||
|
aider/coders/architect_coder.py:
|
||||||
|
Paul Gauthier (aider): 2
|
||||||
|
aider/coders/base_coder.py:
|
||||||
|
Paul Gauthier (aider): 14
|
||||||
|
aider/commands.py:
|
||||||
|
Paul Gauthier: 4
|
||||||
|
Paul Gauthier (aider): 71
|
||||||
|
aider/deprecated.py:
|
||||||
|
Paul Gauthier: 2
|
||||||
|
aider/io.py:
|
||||||
|
Paul Gauthier (aider): 5
|
||||||
|
aider/main.py:
|
||||||
|
Paul Gauthier (aider): 12
|
||||||
|
aider/models.py:
|
||||||
|
Paul Gauthier (aider): 83
|
||||||
|
aider/queries/tree-sitter-language-pack/arduino-tags.scm:
|
||||||
|
Paul Gauthier: 3
|
||||||
|
Paul Gauthier (aider): 2
|
||||||
|
aider/queries/tree-sitter-language-pack/c-tags.scm:
|
||||||
|
Paul Gauthier: 4
|
||||||
|
Paul Gauthier (aider): 5
|
||||||
|
aider/queries/tree-sitter-language-pack/chatito-tags.scm:
|
||||||
|
Paul Gauthier: 11
|
||||||
|
Paul Gauthier (aider): 5
|
||||||
|
aider/queries/tree-sitter-language-pack/commonlisp-tags.scm:
|
||||||
|
Paul Gauthier: 116
|
||||||
|
Paul Gauthier (aider): 6
|
||||||
|
aider/queries/tree-sitter-language-pack/cpp-tags.scm:
|
||||||
|
Paul Gauthier: 7
|
||||||
|
Paul Gauthier (aider): 8
|
||||||
|
aider/queries/tree-sitter-language-pack/d-tags.scm:
|
||||||
|
Paul Gauthier: 9
|
||||||
|
Paul Gauthier (aider): 17
|
||||||
|
aider/queries/tree-sitter-language-pack/dart-tags.scm:
|
||||||
|
Paul Gauthier: 42
|
||||||
|
Paul Gauthier (aider): 19
|
||||||
|
aider/queries/tree-sitter-language-pack/elisp-tags.scm:
|
||||||
|
Paul Gauthier: 1
|
||||||
|
Paul Gauthier (aider): 2
|
||||||
|
aider/queries/tree-sitter-language-pack/elixir-tags.scm:
|
||||||
|
Paul Gauthier: 10
|
||||||
|
Paul Gauthier (aider): 8
|
||||||
|
aider/queries/tree-sitter-language-pack/elm-tags.scm:
|
||||||
|
Paul Gauthier: 8
|
||||||
|
Paul Gauthier (aider): 11
|
||||||
|
aider/queries/tree-sitter-language-pack/gleam-tags.scm:
|
||||||
|
Paul Gauthier: 26
|
||||||
|
Paul Gauthier (aider): 15
|
||||||
|
aider/queries/tree-sitter-language-pack/go-tags.scm:
|
||||||
|
Paul Gauthier: 14
|
||||||
|
Paul Gauthier (aider): 14
|
||||||
|
aider/queries/tree-sitter-language-pack/java-tags.scm:
|
||||||
|
Paul Gauthier: 10
|
||||||
|
Paul Gauthier (aider): 7
|
||||||
|
aider/queries/tree-sitter-language-pack/lua-tags.scm:
|
||||||
|
Paul Gauthier: 25
|
||||||
|
Paul Gauthier (aider): 9
|
||||||
|
aider/queries/tree-sitter-language-pack/pony-tags.scm:
|
||||||
|
Paul Gauthier: 20
|
||||||
|
Paul Gauthier (aider): 19
|
||||||
|
aider/queries/tree-sitter-language-pack/properties-tags.scm:
|
||||||
|
Paul Gauthier: 3
|
||||||
|
Paul Gauthier (aider): 2
|
||||||
|
aider/queries/tree-sitter-language-pack/python-tags.scm:
|
||||||
|
Paul Gauthier: 9
|
||||||
|
Paul Gauthier (aider): 5
|
||||||
|
aider/queries/tree-sitter-language-pack/r-tags.scm:
|
||||||
|
Paul Gauthier: 17
|
||||||
|
Paul Gauthier (aider): 4
|
||||||
|
aider/queries/tree-sitter-language-pack/racket-tags.scm:
|
||||||
|
Paul Gauthier: 10
|
||||||
|
Paul Gauthier (aider): 2
|
||||||
|
aider/queries/tree-sitter-language-pack/ruby-tags.scm:
|
||||||
|
Paul Gauthier: 23
|
||||||
|
Paul Gauthier (aider): 12
|
||||||
|
aider/queries/tree-sitter-language-pack/rust-tags.scm:
|
||||||
|
Paul Gauthier: 41
|
||||||
|
Paul Gauthier (aider): 14
|
||||||
|
aider/queries/tree-sitter-language-pack/solidity-tags.scm:
|
||||||
|
Paul Gauthier: 30
|
||||||
|
Paul Gauthier (aider): 13
|
||||||
|
aider/queries/tree-sitter-language-pack/swift-tags.scm:
|
||||||
|
Paul Gauthier: 39
|
||||||
|
Paul Gauthier (aider): 12
|
||||||
|
aider/queries/tree-sitter-language-pack/udev-tags.scm:
|
||||||
|
Paul Gauthier: 15
|
||||||
|
Paul Gauthier (aider): 5
|
||||||
|
aider/resources/model-settings.yml:
|
||||||
|
Paul Gauthier: 9
|
||||||
|
aider/watch.py:
|
||||||
|
Yutaka Matsubara: 4
|
||||||
|
aider/website/docs/leaderboards/index.md:
|
||||||
|
Paul Gauthier: 3
|
||||||
|
Paul Gauthier (aider): 8
|
||||||
|
scripts/redact-cast.py:
|
||||||
|
Paul Gauthier: 27
|
||||||
|
Paul Gauthier (aider): 98
|
||||||
|
scripts/tsl_pack_langs.py:
|
||||||
|
Paul Gauthier (aider): 145
|
||||||
|
scripts/versionbump.py:
|
||||||
|
Paul Gauthier (aider): 1
|
||||||
|
tests/basic/test_coder.py:
|
||||||
|
Paul Gauthier (aider): 104
|
||||||
|
tests/basic/test_commands.py:
|
||||||
|
Paul Gauthier: 2
|
||||||
|
Paul Gauthier (aider): 190
|
||||||
|
tests/basic/test_models.py:
|
||||||
|
Paul Gauthier (aider): 44
|
||||||
|
tests/basic/test_repomap.py:
|
||||||
|
Paul Gauthier: 1
|
||||||
|
Paul Gauthier (aider): 125
|
||||||
|
tests/fixtures/languages/arduino/test.ino:
|
||||||
|
Paul Gauthier (aider): 21
|
||||||
|
tests/fixtures/languages/c/test.c:
|
||||||
|
Paul Gauthier (aider): 12
|
||||||
|
tests/fixtures/languages/chatito/test.chatito:
|
||||||
|
Paul Gauthier (aider): 20
|
||||||
|
tests/fixtures/languages/commonlisp/test.lisp:
|
||||||
|
Paul Gauthier (aider): 17
|
||||||
|
tests/fixtures/languages/d/test.d:
|
||||||
|
Paul Gauthier (aider): 26
|
||||||
|
tests/fixtures/languages/dart/test.dart:
|
||||||
|
Paul Gauthier (aider): 21
|
||||||
|
tests/fixtures/languages/elm/test.elm:
|
||||||
|
Paul Gauthier (aider): 16
|
||||||
|
tests/fixtures/languages/gleam/test.gleam:
|
||||||
|
Paul Gauthier (aider): 10
|
||||||
|
tests/fixtures/languages/lua/test.lua:
|
||||||
|
Paul Gauthier (aider): 25
|
||||||
|
tests/fixtures/languages/pony/test.pony:
|
||||||
|
Paul Gauthier (aider): 8
|
||||||
|
tests/fixtures/languages/properties/test.properties:
|
||||||
|
Paul Gauthier (aider): 14
|
||||||
|
tests/fixtures/languages/r/test.r:
|
||||||
|
Paul Gauthier (aider): 17
|
||||||
|
tests/fixtures/languages/racket/test.rkt:
|
||||||
|
Paul Gauthier (aider): 8
|
||||||
|
tests/fixtures/languages/solidity/test.sol:
|
||||||
|
Paul Gauthier (aider): 21
|
||||||
|
tests/fixtures/languages/swift/test.swift:
|
||||||
|
Paul Gauthier (aider): 18
|
||||||
|
tests/fixtures/languages/udev/test.rules:
|
||||||
|
Paul Gauthier (aider): 22
|
||||||
|
grand_total:
|
||||||
|
Paul Gauthier: 542
|
||||||
|
Paul Gauthier (aider): 1399
|
||||||
|
Yutaka Matsubara: 4
|
||||||
|
start_tag: v0.76.0
|
||||||
|
total_lines: 1945
|
||||||
|
|||||||
@@ -256,4 +256,4 @@
|
|||||||
date: 2024-12-22
|
date: 2024-12-22
|
||||||
versions: 0.69.2.dev
|
versions: 0.69.2.dev
|
||||||
seconds_per_case: 12.2
|
seconds_per_case: 12.2
|
||||||
total_cost: 0.0000
|
total_cost: 0.0000
|
||||||
|
|||||||
@@ -727,4 +727,56 @@
|
|||||||
date: 2025-03-07
|
date: 2025-03-07
|
||||||
versions: 0.75.3.dev
|
versions: 0.75.3.dev
|
||||||
seconds_per_case: 137.4
|
seconds_per_case: 137.4
|
||||||
total_cost: 0
|
total_cost: 0
|
||||||
|
|
||||||
|
- dirname: 2025-03-14-23-40-00--cmda-quality-whole2
|
||||||
|
test_cases: 225
|
||||||
|
model: command-a-03-2025-quality
|
||||||
|
edit_format: whole
|
||||||
|
commit_hash: a1aa63f
|
||||||
|
pass_rate_1: 2.2
|
||||||
|
pass_rate_2: 12.0
|
||||||
|
pass_num_1: 5
|
||||||
|
pass_num_2: 27
|
||||||
|
percent_cases_well_formed: 99.6
|
||||||
|
error_outputs: 2
|
||||||
|
num_malformed_responses: 1
|
||||||
|
num_with_malformed_responses: 1
|
||||||
|
user_asks: 215
|
||||||
|
lazy_comments: 0
|
||||||
|
syntax_errors: 0
|
||||||
|
indentation_errors: 0
|
||||||
|
exhausted_context_windows: 1
|
||||||
|
test_timeouts: 4
|
||||||
|
total_tests: 225
|
||||||
|
command: OPENAI_API_BASE=https://api.cohere.ai/compatibility/v1 aider --model openai/command-a-03-2025-quality
|
||||||
|
date: 2025-03-14
|
||||||
|
versions: 0.77.1.dev
|
||||||
|
seconds_per_case: 85.1
|
||||||
|
total_cost: 0.0000
|
||||||
|
|
||||||
|
- dirname: 2025-03-15-01-21-24--gemma3-27b-or
|
||||||
|
test_cases: 225
|
||||||
|
model: gemma-3-27b-it
|
||||||
|
edit_format: whole
|
||||||
|
commit_hash: fd21f51-dirty
|
||||||
|
pass_rate_1: 1.8
|
||||||
|
pass_rate_2: 4.9
|
||||||
|
pass_num_1: 4
|
||||||
|
pass_num_2: 11
|
||||||
|
percent_cases_well_formed: 100.0
|
||||||
|
error_outputs: 3
|
||||||
|
num_malformed_responses: 0
|
||||||
|
num_with_malformed_responses: 0
|
||||||
|
user_asks: 181
|
||||||
|
lazy_comments: 0
|
||||||
|
syntax_errors: 0
|
||||||
|
indentation_errors: 0
|
||||||
|
exhausted_context_windows: 1
|
||||||
|
test_timeouts: 3
|
||||||
|
total_tests: 225
|
||||||
|
command: aider --model openrouter/google/gemma-3-27b-it
|
||||||
|
date: 2025-03-15
|
||||||
|
versions: 0.77.1.dev
|
||||||
|
seconds_per_case: 79.7
|
||||||
|
total_cost: 0.0000
|
||||||
@@ -5,21 +5,15 @@ If you already have python 3.8-3.13 installed, you can get started quickly like
|
|||||||
python -m pip install aider-install
|
python -m pip install aider-install
|
||||||
aider-install
|
aider-install
|
||||||
|
|
||||||
# Change directory into your code base
|
# Change directory into your codebase
|
||||||
cd /to/your/project
|
cd /to/your/project
|
||||||
|
|
||||||
# Work with DeepSeek via DeepSeek's API
|
# DeepSeek
|
||||||
aider --model deepseek --api-key deepseek=your-key-goes-here
|
aider --model deepseek --api-key deepseek=<key>
|
||||||
|
|
||||||
# Work with Claude 3.7 Sonnet via Anthropic's API
|
# Claude 3.7 Sonnet
|
||||||
aider --model sonnet --api-key anthropic=your-key-goes-here
|
aider --model sonnet --api-key anthropic=<key>
|
||||||
|
|
||||||
# Work with GPT-4o via OpenAI's API
|
# o3-mini
|
||||||
aider --model gpt-4o --api-key openai=your-key-goes-here
|
aider --model o3-mini --api-key openai=<key>
|
||||||
|
|
||||||
# Work with Sonnet via OpenRouter's API
|
|
||||||
aider --model openrouter/anthropic/claude-3.7-sonnet --api-key openrouter=your-key-goes-here
|
|
||||||
|
|
||||||
# Work with DeepSeek via OpenRouter's API
|
|
||||||
aider --model openrouter/deepseek/deepseek-chat --api-key openrouter=your-key-goes-here
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -5,10 +5,66 @@
|
|||||||
<meta property="og:image" content="{{ site.url }}/assets/aider.jpg">
|
<meta property="og:image" content="{{ site.url }}/assets/aider.jpg">
|
||||||
<meta property="twitter:image" content="{{ site.url }}/assets/aider-square.jpg">
|
<meta property="twitter:image" content="{{ site.url }}/assets/aider-square.jpg">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Custom site title styling -->
|
||||||
|
<style>
|
||||||
|
@font-face {
|
||||||
|
font-family: GlassTTYVT220;
|
||||||
|
src: local("Glass TTY VT220"), local("Glass TTY VT220 Medium"), url(/assets/Glass_TTY_VT220.ttf) format("truetype");
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-title {
|
||||||
|
font-size: 1.8rem;
|
||||||
|
font-weight: 700;
|
||||||
|
font-family: 'GlassTTYVT220', monospace;
|
||||||
|
color: #14b014; /* terminal green color */
|
||||||
|
text-decoration: none;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For SVG logo inside site-title */
|
||||||
|
.site-title img {
|
||||||
|
height: 1.8rem;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sidebar gradient styling to match hero section */
|
||||||
|
.side-bar {
|
||||||
|
background: linear-gradient(135deg, #ffffff 0%, rgba(20, 176, 20, 0.01) 25%, rgba(20, 176, 20, 0.04) 40%, rgba(220, 230, 255, 0.4) 60%, rgba(205, 218, 255, 0.4) 80%, #F5F6FA 100%);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="{{ site.url }}/feed.xml">
|
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="{{ site.url }}/feed.xml">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||||
<link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" as="style" type="text/css" crossorigin>
|
<link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" as="style" type="text/css" crossorigin>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<!-- Logo Progressive Enhancement for Jekyll pages -->
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const siteTitle = document.querySelector('.site-title');
|
||||||
|
if (siteTitle) {
|
||||||
|
const textContent = siteTitle.textContent; // Save the text for fallback
|
||||||
|
|
||||||
|
// Create new image element
|
||||||
|
const logoImg = new Image();
|
||||||
|
logoImg.src = '/assets/logo.svg';
|
||||||
|
logoImg.alt = 'Aider Logo';
|
||||||
|
logoImg.style.height = '1.8rem';
|
||||||
|
logoImg.style.verticalAlign = 'middle';
|
||||||
|
|
||||||
|
// Only replace if image loads successfully
|
||||||
|
logoImg.onload = function() {
|
||||||
|
siteTitle.textContent = ''; // Clear text
|
||||||
|
siteTitle.appendChild(logoImg);
|
||||||
|
};
|
||||||
|
|
||||||
|
// If image fails to load, do nothing (keep the text)
|
||||||
|
logoImg.onerror = function() {
|
||||||
|
console.log('SVG logo failed to load, keeping text fallback');
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<meta name="theme-color" content="#157878">
|
<meta name="theme-color" content="#157878">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ '/assets/icons/favicon-32x32.png' | relative_url }}">
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ '/assets/icons/favicon-32x32.png' | relative_url }}">
|
||||||
|
|||||||
228
aider/website/_includes/recording.css
Normal file
228
aider/website/_includes/recording.css
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
/* Terminal header styling */
|
||||||
|
.terminal-header {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
border-top-left-radius: 6px;
|
||||||
|
border-top-right-radius: 6px;
|
||||||
|
padding: 4px 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #c0c0c0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-buttons {
|
||||||
|
display: flex;
|
||||||
|
gap: 4px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-button {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-close {
|
||||||
|
background-color: #ff5f56;
|
||||||
|
border: 1px solid #e0443e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-minimize {
|
||||||
|
background-color: #ffbd2e;
|
||||||
|
border: 1px solid #dea123;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-expand {
|
||||||
|
background-color: #27c93f;
|
||||||
|
border: 1px solid #1aab29;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-title {
|
||||||
|
flex-grow: 1;
|
||||||
|
text-align: center;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 11px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Toast notification styling */
|
||||||
|
.toast-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
z-index: 9999;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toast-notification {
|
||||||
|
background-color: rgba(0, 0, 0, 0.7);
|
||||||
|
color: white;
|
||||||
|
padding: 12px 25px;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.3s ease-in-out;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 200px;
|
||||||
|
max-width: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Page container styling */
|
||||||
|
.page-container {
|
||||||
|
max-width: 950px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* macOS backdrop styling */
|
||||||
|
.macos-backdrop {
|
||||||
|
background: linear-gradient(135deg, #ff9966, #ff5e62, #6666ff, #0066ff);
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: clamp(5px, 5vw, 50px) clamp(5px, 2.5vw, 50px);
|
||||||
|
margin: 20px 0;
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add subtle wave animation to backdrop */
|
||||||
|
.macos-backdrop::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
|
||||||
|
opacity: 0.7;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add decorative curved lines to the backdrop */
|
||||||
|
.macos-backdrop::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-image:
|
||||||
|
radial-gradient(circle at 20% 30%, transparent 0%, transparent 60%, rgba(255,255,255,0.2) 61%, transparent 62%),
|
||||||
|
radial-gradient(circle at 80% 70%, transparent 0%, transparent 40%, rgba(255,255,255,0.2) 41%, transparent 42%),
|
||||||
|
radial-gradient(circle at 40% 90%, transparent 0%, transparent 70%, rgba(255,255,255,0.2) 71%, transparent 72%),
|
||||||
|
radial-gradient(circle at 60% 10%, transparent 0%, transparent 50%, rgba(255,255,255,0.2) 51%, transparent 52%);
|
||||||
|
background-size: 100% 100%;
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-container {
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
position: relative;
|
||||||
|
background-color: white; /* Add background color to terminal container */
|
||||||
|
z-index: 2; /* Ensure terminal appears above the backdrop effects */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Timestamp link styling */
|
||||||
|
.timestamp-link {
|
||||||
|
color: #0366d6;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timestamp-link:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Active timestamp styling */
|
||||||
|
.timestamp-active {
|
||||||
|
background-color: #f0f8ff; /* Light blue background */
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 2px 4px;
|
||||||
|
margin: -2px -4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Highlight the list item containing the active timestamp */
|
||||||
|
li.active-marker {
|
||||||
|
background-color: #f6f8fa;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 4px 8px;
|
||||||
|
margin-left: -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make list items clickable */
|
||||||
|
.transcript-item {
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.2s ease;
|
||||||
|
padding: 4px 8px;
|
||||||
|
margin-left: -8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.transcript-item:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Keyboard shortcuts styling */
|
||||||
|
.keyboard-shortcuts {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide keyboard shortcuts on devices likely without physical keyboards */
|
||||||
|
.no-physical-keyboard .keyboard-shortcuts {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.keyboard-shortcuts kbd {
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 3px;
|
||||||
|
box-shadow: 0 1px 0 rgba(0,0,0,0.2);
|
||||||
|
color: #333;
|
||||||
|
display: inline-block;
|
||||||
|
font-family: monospace;
|
||||||
|
line-height: 1;
|
||||||
|
margin: 0 2px;
|
||||||
|
padding: 3px 5px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.asciinema-player-theme-aider {
|
||||||
|
/* Foreground (default text) color */
|
||||||
|
--term-color-foreground: #444444; /* colour238 */
|
||||||
|
|
||||||
|
/* Background color */
|
||||||
|
--term-color-background: #dadada; /* colour253 */
|
||||||
|
|
||||||
|
/* Palette of 16 standard ANSI colors */
|
||||||
|
--term-color-0: #21222c;
|
||||||
|
--term-color-1: #ff5555;
|
||||||
|
--term-color-2: #50fa7b;
|
||||||
|
--term-color-3: #f1fa8c;
|
||||||
|
--term-color-4: #bd93f9;
|
||||||
|
--term-color-5: #ff79c6;
|
||||||
|
--term-color-6: #8be9fd;
|
||||||
|
--term-color-7: #f8f8f2;
|
||||||
|
--term-color-8: #6272a4;
|
||||||
|
--term-color-9: #ff6e6e;
|
||||||
|
--term-color-10: #69ff94;
|
||||||
|
--term-color-11: #ffffa5;
|
||||||
|
--term-color-12: #d6acff;
|
||||||
|
--term-color-13: #ff92df;
|
||||||
|
--term-color-14: #a4ffff;
|
||||||
|
--term-color-15: #ffffff;
|
||||||
|
}
|
||||||
428
aider/website/_includes/recording.js
Normal file
428
aider/website/_includes/recording.js
Normal file
@@ -0,0 +1,428 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
let player; // Store player reference to make it accessible to click handlers
|
||||||
|
let globalAudio; // Global audio element to be reused
|
||||||
|
|
||||||
|
// Detect if device likely has no physical keyboard
|
||||||
|
function detectNoKeyboard() {
|
||||||
|
// Check if it's a touch device (most mobile devices)
|
||||||
|
const isTouchDevice = ('ontouchstart' in window) ||
|
||||||
|
(navigator.maxTouchPoints > 0) ||
|
||||||
|
(navigator.msMaxTouchPoints > 0);
|
||||||
|
|
||||||
|
// Check common mobile user agents as additional signal
|
||||||
|
const isMobileUA = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||||
|
|
||||||
|
// If it's a touch device and has a mobile user agent, likely has no physical keyboard
|
||||||
|
if (isTouchDevice && isMobileUA) {
|
||||||
|
document.body.classList.add('no-physical-keyboard');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run detection
|
||||||
|
detectNoKeyboard();
|
||||||
|
|
||||||
|
// Parse the transcript section to create markers and convert timestamps to links
|
||||||
|
function parseTranscript() {
|
||||||
|
const markers = [];
|
||||||
|
// Find the Commentary heading
|
||||||
|
const transcriptHeading = Array.from(document.querySelectorAll('h2')).find(el => el.textContent.trim() === 'Commentary');
|
||||||
|
|
||||||
|
if (transcriptHeading) {
|
||||||
|
// Get all list items after the transcript heading
|
||||||
|
let currentElement = transcriptHeading.nextElementSibling;
|
||||||
|
|
||||||
|
while (currentElement && currentElement.tagName === 'UL') {
|
||||||
|
const listItems = currentElement.querySelectorAll('li');
|
||||||
|
|
||||||
|
listItems.forEach(item => {
|
||||||
|
const text = item.textContent.trim();
|
||||||
|
const match = text.match(/(\d+):(\d+)\s+(.*)/);
|
||||||
|
|
||||||
|
if (match) {
|
||||||
|
const minutes = parseInt(match[1], 10);
|
||||||
|
const seconds = parseInt(match[2], 10);
|
||||||
|
const timeInSeconds = minutes * 60 + seconds;
|
||||||
|
const formattedTime = `${minutes}:${seconds.toString().padStart(2, '0')}`;
|
||||||
|
const message = match[3].trim();
|
||||||
|
|
||||||
|
// Create link for the timestamp
|
||||||
|
const timeLink = document.createElement('a');
|
||||||
|
timeLink.href = '#';
|
||||||
|
timeLink.textContent = formattedTime;
|
||||||
|
timeLink.className = 'timestamp-link';
|
||||||
|
timeLink.dataset.time = timeInSeconds;
|
||||||
|
timeLink.dataset.message = message;
|
||||||
|
|
||||||
|
// Add click event to seek the player
|
||||||
|
timeLink.addEventListener('click', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
if (player && typeof player.seek === 'function') {
|
||||||
|
player.seek(timeInSeconds);
|
||||||
|
player.play();
|
||||||
|
|
||||||
|
// Also trigger toast and speech
|
||||||
|
showToast(message);
|
||||||
|
speakText(message, timeInSeconds);
|
||||||
|
|
||||||
|
// Highlight this timestamp
|
||||||
|
highlightTimestamp(timeInSeconds);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Replace text with the link + message
|
||||||
|
item.textContent = '';
|
||||||
|
item.appendChild(timeLink);
|
||||||
|
item.appendChild(document.createTextNode(' ' + message));
|
||||||
|
|
||||||
|
// Add class and click handler to the entire list item
|
||||||
|
item.classList.add('transcript-item');
|
||||||
|
item.dataset.time = timeInSeconds;
|
||||||
|
item.dataset.message = message;
|
||||||
|
|
||||||
|
item.addEventListener('click', function(e) {
|
||||||
|
// Prevent click event if the user clicked directly on the timestamp link
|
||||||
|
// This prevents double-firing of the event
|
||||||
|
if (e.target !== timeLink) {
|
||||||
|
e.preventDefault();
|
||||||
|
if (player && typeof player.seek === 'function') {
|
||||||
|
player.seek(timeInSeconds);
|
||||||
|
player.play();
|
||||||
|
|
||||||
|
// Also trigger toast and speech
|
||||||
|
showToast(message);
|
||||||
|
speakText(message, timeInSeconds);
|
||||||
|
|
||||||
|
// Highlight this timestamp
|
||||||
|
highlightTimestamp(timeInSeconds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
markers.push([timeInSeconds, message]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
currentElement = currentElement.nextElementSibling;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return markers;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse transcript and create markers
|
||||||
|
const markers = parseTranscript();
|
||||||
|
|
||||||
|
// Create player with a single call
|
||||||
|
player = AsciinemaPlayer.create(
|
||||||
|
recording_url,
|
||||||
|
document.getElementById('demo'),
|
||||||
|
{
|
||||||
|
speed: 1.25,
|
||||||
|
idleTimeLimit: 1,
|
||||||
|
theme: "aider",
|
||||||
|
poster: "npt:0:01",
|
||||||
|
markers: markers,
|
||||||
|
controls: true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Focus on the player element so keyboard shortcuts work immediately
|
||||||
|
setTimeout(() => {
|
||||||
|
// Use setTimeout to ensure the player is fully initialized
|
||||||
|
if (player && typeof player.focus === 'function') {
|
||||||
|
player.focus();
|
||||||
|
} else {
|
||||||
|
// If player doesn't have a focus method, try to find and focus the terminal element
|
||||||
|
const playerElement = document.querySelector('.asciinema-terminal');
|
||||||
|
if (playerElement) {
|
||||||
|
playerElement.focus();
|
||||||
|
} else {
|
||||||
|
// Last resort - try to find element with tabindex
|
||||||
|
const tabbableElement = document.querySelector('[tabindex]');
|
||||||
|
if (tabbableElement) {
|
||||||
|
tabbableElement.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
// Track active toast elements
|
||||||
|
let activeToast = null;
|
||||||
|
|
||||||
|
// Function to display toast notification
|
||||||
|
function showToast(text) {
|
||||||
|
// Get the appropriate container based on fullscreen state
|
||||||
|
let container = document.getElementById('toast-container');
|
||||||
|
const isFullscreen = document.fullscreenElement ||
|
||||||
|
document.webkitFullscreenElement ||
|
||||||
|
document.mozFullScreenElement ||
|
||||||
|
document.msFullscreenElement;
|
||||||
|
|
||||||
|
// If in fullscreen, check if we need to create a fullscreen toast container
|
||||||
|
if (isFullscreen) {
|
||||||
|
// Target the fullscreen element as the container parent
|
||||||
|
const fullscreenElement = document.fullscreenElement ||
|
||||||
|
document.webkitFullscreenElement ||
|
||||||
|
document.mozFullScreenElement ||
|
||||||
|
document.msFullscreenElement;
|
||||||
|
|
||||||
|
// Look for an existing fullscreen toast container
|
||||||
|
let fsContainer = fullscreenElement.querySelector('.fs-toast-container');
|
||||||
|
|
||||||
|
if (!fsContainer) {
|
||||||
|
// Create a new container for fullscreen mode
|
||||||
|
fsContainer = document.createElement('div');
|
||||||
|
fsContainer.className = 'toast-container fs-toast-container';
|
||||||
|
fsContainer.id = 'fs-toast-container';
|
||||||
|
fullscreenElement.appendChild(fsContainer);
|
||||||
|
}
|
||||||
|
|
||||||
|
container = fsContainer;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove any existing toast
|
||||||
|
if (activeToast) {
|
||||||
|
hideToast(activeToast);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create toast element
|
||||||
|
const toast = document.createElement('div');
|
||||||
|
toast.className = 'toast-notification';
|
||||||
|
toast.textContent = text;
|
||||||
|
|
||||||
|
// Add to container
|
||||||
|
container.appendChild(toast);
|
||||||
|
|
||||||
|
// Store reference to active toast
|
||||||
|
activeToast = {
|
||||||
|
element: toast,
|
||||||
|
container: container
|
||||||
|
};
|
||||||
|
|
||||||
|
// Trigger animation
|
||||||
|
setTimeout(() => {
|
||||||
|
toast.style.opacity = '1';
|
||||||
|
}, 10);
|
||||||
|
|
||||||
|
return activeToast;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to hide a toast
|
||||||
|
function hideToast(toastInfo) {
|
||||||
|
if (!toastInfo || !toastInfo.element) return;
|
||||||
|
|
||||||
|
toastInfo.element.style.opacity = '0';
|
||||||
|
setTimeout(() => {
|
||||||
|
if (toastInfo.container && toastInfo.container.contains(toastInfo.element)) {
|
||||||
|
toastInfo.container.removeChild(toastInfo.element);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If this was the active toast, clear the reference
|
||||||
|
if (activeToast === toastInfo) {
|
||||||
|
activeToast = null;
|
||||||
|
}
|
||||||
|
}, 300); // Wait for fade out animation
|
||||||
|
}
|
||||||
|
|
||||||
|
// Track if TTS is currently in progress to prevent duplicates
|
||||||
|
let ttsInProgress = false;
|
||||||
|
let currentToast = null;
|
||||||
|
|
||||||
|
// Improved browser TTS function
|
||||||
|
function useBrowserTTS(text) {
|
||||||
|
// Don't start new speech if already in progress
|
||||||
|
if (ttsInProgress) {
|
||||||
|
console.log('Speech synthesis already in progress, skipping');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('speechSynthesis' in window) {
|
||||||
|
console.log('Using browser TTS fallback');
|
||||||
|
|
||||||
|
// Set flag to prevent duplicate speech
|
||||||
|
ttsInProgress = true;
|
||||||
|
|
||||||
|
// Cancel any ongoing speech
|
||||||
|
window.speechSynthesis.cancel();
|
||||||
|
|
||||||
|
const utterance = new SpeechSynthesisUtterance(text);
|
||||||
|
utterance.rate = 1.0;
|
||||||
|
utterance.pitch = 1.0;
|
||||||
|
utterance.volume = 1.0;
|
||||||
|
|
||||||
|
// For iOS, use a shorter utterance if possible
|
||||||
|
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
|
||||||
|
utterance.text = text.length > 100 ? text.substring(0, 100) + '...' : text;
|
||||||
|
}
|
||||||
|
|
||||||
|
utterance.onstart = () => console.log('Speech started');
|
||||||
|
utterance.onend = () => {
|
||||||
|
console.log('Speech ended');
|
||||||
|
ttsInProgress = false; // Reset flag when speech completes
|
||||||
|
|
||||||
|
// Hide toast when speech ends
|
||||||
|
if (currentToast) {
|
||||||
|
hideToast(currentToast);
|
||||||
|
currentToast = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
utterance.onerror = (e) => {
|
||||||
|
console.warn('Speech error:', e);
|
||||||
|
ttsInProgress = false; // Reset flag on error
|
||||||
|
|
||||||
|
// Also hide toast on error
|
||||||
|
if (currentToast) {
|
||||||
|
hideToast(currentToast);
|
||||||
|
currentToast = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.speechSynthesis.speak(utterance);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
console.warn('SpeechSynthesis not supported');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to play pre-generated TTS audio files
|
||||||
|
function speakText(text, timeInSeconds) {
|
||||||
|
// Show the toast and keep reference
|
||||||
|
currentToast = showToast(text);
|
||||||
|
|
||||||
|
// Format time for filename (MM-SS)
|
||||||
|
const minutes = Math.floor(timeInSeconds / 60);
|
||||||
|
const seconds = timeInSeconds % 60;
|
||||||
|
const formattedTime = `${minutes.toString().padStart(2, '0')}-${seconds.toString().padStart(2, '0')}`;
|
||||||
|
|
||||||
|
// Get recording_id from the page or use default from the URL
|
||||||
|
const recordingId = typeof recording_id !== 'undefined' ? recording_id :
|
||||||
|
window.location.pathname.split('/').pop().replace('.html', '');
|
||||||
|
|
||||||
|
// Construct audio file path
|
||||||
|
const audioPath = `/assets/audio/${recordingId}/${formattedTime}.mp3`;
|
||||||
|
|
||||||
|
// Log for debugging
|
||||||
|
console.log(`Attempting to play audio: ${audioPath}`);
|
||||||
|
|
||||||
|
// Detect iOS
|
||||||
|
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||||
|
console.log(`Device is iOS: ${isIOS}`);
|
||||||
|
|
||||||
|
// Flag to track if we've already fallen back to TTS
|
||||||
|
let fallenBackToTTS = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Create or reuse audio element
|
||||||
|
if (!globalAudio) {
|
||||||
|
globalAudio = new Audio();
|
||||||
|
console.log("Created new global Audio element");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set up event handlers
|
||||||
|
globalAudio.onended = () => {
|
||||||
|
console.log('Audio playback ended');
|
||||||
|
// Hide toast when audio ends
|
||||||
|
if (currentToast) {
|
||||||
|
hideToast(currentToast);
|
||||||
|
currentToast = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
globalAudio.onerror = (e) => {
|
||||||
|
console.warn(`Audio error: ${e.type}`, e);
|
||||||
|
if (!fallenBackToTTS) {
|
||||||
|
fallenBackToTTS = true;
|
||||||
|
useBrowserTTS(text);
|
||||||
|
} else if (currentToast) {
|
||||||
|
// If we've already tried TTS and that failed too, hide the toast
|
||||||
|
hideToast(currentToast);
|
||||||
|
currentToast = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// For iOS, preload might help with subsequent plays
|
||||||
|
if (isIOS) {
|
||||||
|
globalAudio.preload = "auto";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the new source
|
||||||
|
globalAudio.src = audioPath;
|
||||||
|
|
||||||
|
// Play with proper error handling
|
||||||
|
const playPromise = globalAudio.play();
|
||||||
|
|
||||||
|
if (playPromise !== undefined) {
|
||||||
|
playPromise.catch(error => {
|
||||||
|
console.warn(`Play error: ${error.message}`);
|
||||||
|
|
||||||
|
// On iOS, a user gesture might be required
|
||||||
|
if (isIOS) {
|
||||||
|
console.log("iOS playback failed, trying SpeechSynthesis");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!fallenBackToTTS) {
|
||||||
|
fallenBackToTTS = true;
|
||||||
|
useBrowserTTS(text);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(`Exception in audio playback: ${e.message}`);
|
||||||
|
useBrowserTTS(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to highlight the active timestamp in the transcript
|
||||||
|
function highlightTimestamp(timeInSeconds) {
|
||||||
|
// Remove previous highlights
|
||||||
|
document.querySelectorAll('.timestamp-active').forEach(el => {
|
||||||
|
el.classList.remove('timestamp-active');
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelectorAll('.active-marker').forEach(el => {
|
||||||
|
el.classList.remove('active-marker');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Find the timestamp link with matching time
|
||||||
|
const timestampLinks = document.querySelectorAll('.timestamp-link');
|
||||||
|
let activeLink = null;
|
||||||
|
|
||||||
|
for (const link of timestampLinks) {
|
||||||
|
if (parseInt(link.dataset.time) === timeInSeconds) {
|
||||||
|
activeLink = link;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (activeLink) {
|
||||||
|
// Add highlight class to the link
|
||||||
|
activeLink.classList.add('timestamp-active');
|
||||||
|
|
||||||
|
// Also highlight the parent list item
|
||||||
|
const listItem = activeLink.closest('li');
|
||||||
|
if (listItem) {
|
||||||
|
listItem.classList.add('active-marker');
|
||||||
|
|
||||||
|
// No longer scrolling into view to avoid shifting focus
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add event listener with safety checks
|
||||||
|
if (player && typeof player.addEventListener === 'function') {
|
||||||
|
player.addEventListener('marker', function(event) {
|
||||||
|
try {
|
||||||
|
const { index, time, label } = event;
|
||||||
|
console.log(`marker! ${index} - ${time} - ${label}`);
|
||||||
|
|
||||||
|
// Speak the marker label (toast is now shown within speakText)
|
||||||
|
speakText(label, time);
|
||||||
|
|
||||||
|
// Highlight the corresponding timestamp in the transcript
|
||||||
|
highlightTimestamp(time);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error in marker event handler:', error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
34
aider/website/_includes/recording.md
Normal file
34
aider/website/_includes/recording.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<link rel="stylesheet" type="text/css" href="/assets/asciinema/asciinema-player.css" />
|
||||||
|
|
||||||
|
<style>
|
||||||
|
{% include recording.css %}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script src="/assets/asciinema/asciinema-player.min.js"></script>
|
||||||
|
<script>
|
||||||
|
{% include recording.js %}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="page-container">
|
||||||
|
<div class="toast-container" id="toast-container"></div>
|
||||||
|
|
||||||
|
<div class="macos-backdrop">
|
||||||
|
<div class="terminal-container">
|
||||||
|
<div class="terminal-header">
|
||||||
|
<div class="terminal-buttons">
|
||||||
|
<div class="terminal-button terminal-close"></div>
|
||||||
|
<div class="terminal-button terminal-minimize"></div>
|
||||||
|
<div class="terminal-button terminal-expand"></div>
|
||||||
|
</div>
|
||||||
|
<div class="terminal-title">aider</div>
|
||||||
|
</div>
|
||||||
|
<div id="demo"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="keyboard-shortcuts">
|
||||||
|
<kbd>Space</kbd> Play/pause —
|
||||||
|
<kbd>f</kbd> Fullscreen —
|
||||||
|
<kbd>←</kbd><kbd>→</kbd> ±5s
|
||||||
|
</div>
|
||||||
BIN
aider/website/assets/Glass_TTY_VT220.ttf
Normal file
BIN
aider/website/assets/Glass_TTY_VT220.ttf
Normal file
Binary file not shown.
2366
aider/website/assets/asciinema/asciinema-player.css
Normal file
2366
aider/website/assets/asciinema/asciinema-player.css
Normal file
File diff suppressed because it is too large
Load Diff
1
aider/website/assets/asciinema/asciinema-player.min.js
vendored
Normal file
1
aider/website/assets/asciinema/asciinema-player.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
aider/website/assets/audio/auto-accept-architect/00-01.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/00-01.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/00-11.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/00-11.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/00-40.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/00-40.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/00-48.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/00-48.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/01-00.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/01-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/01-28.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/01-28.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/01-42.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/01-42.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/02-00.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/02-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/02-05.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/02-05.mp3
Normal file
Binary file not shown.
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"00-01": "We're going to add a new feature to automatically accept edits proposed by the architect model.",
|
||||||
|
"00-11": "First, let's add the new switch.",
|
||||||
|
"00-40": "Aider figured out that it should be passed to the Coder class.",
|
||||||
|
"00-48": "Now we need to implement the functionality.",
|
||||||
|
"01-00": "Let's do some manual testing.",
|
||||||
|
"01-28": "That worked. Let's make sure we can turn it off too.",
|
||||||
|
"02-00": "Let's quickly tidy up the changes to HISTORY.",
|
||||||
|
"02-05": "All done!",
|
||||||
|
"01-42": "That worked too. Let's have aider update the HISTORY file to document the new feature."
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"00-10": "We've added files that handle the main CLI and in-chat slash commands like /drop.",
|
||||||
|
"00-20": "Let's explain the needed change to aider.",
|
||||||
|
"01-20": "Ok, let's look at the code.",
|
||||||
|
"01-30": "I'd prefer not to use \"hasattr()\", let's ask for improvements.",
|
||||||
|
"01-45": "Let's try some manual testing.",
|
||||||
|
"02-10": "Looks good. Let's check the existing test suite to ensure we didn't break anything.",
|
||||||
|
"02-19": "Let's ask aider to add tests for this.",
|
||||||
|
"02-50": "Tests look reasonable, we're done!",
|
||||||
|
"00-01": "We're going to update the /drop command to keep any read only files that were originally specified at launch."
|
||||||
|
}
|
||||||
BIN
aider/website/assets/audio/model-accepts-settings/00-01.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/00-01.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/00-25.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/00-25.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/01-30.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/01-30.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/01-45.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/01-45.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/02-00.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/02-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/03-00.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/03-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/03-45.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/03-45.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/04-45.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/04-45.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/05-00.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/05-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/05-10.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/05-10.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/06-00.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/06-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/07-43.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/07-43.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/09-20.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/09-20.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/10-20.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/10-20.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/10-41.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/10-41.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/10-55.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/10-55.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/11-28.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/11-28.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/12-00.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/12-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/12-32.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/12-32.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/12-48.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/12-48.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/13-00.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/13-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/14-30.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/14-30.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/14-45.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/14-45.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/14-59.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/14-59.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/15-09.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/15-09.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/15-34.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/15-34.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/15-44.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/15-44.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/model-accepts-settings/16-04.mp3
Normal file
BIN
aider/website/assets/audio/model-accepts-settings/16-04.mp3
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user