Compare commits

...

1688 Commits

Author SHA1 Message Date
Paul Gauthier
5c848d59b2 set version to 0.69.2.dev 2024-12-16 12:36:28 -08:00
Paul Gauthier
b1c04dece9 version bump to 0.69.1 2024-12-16 12:34:51 -08:00
Paul Gauthier
b87c7987bb copy 2024-12-16 12:29:10 -08:00
Paul Gauthier
0bef52ae7d fix: Only show AI comment help once per file add 2024-12-16 12:27:19 -08:00
Paul Gauthier (aider)
9ae04cf1ec style: Format tool output message 2024-12-16 12:13:35 -08:00
Paul Gauthier (aider)
0f7c4a8d4f feat: Add help message for first-time AI usage 2024-12-16 12:13:32 -08:00
Paul Gauthier
07353207c0 feat: Output "Use AI!" if no action triggered 2024-12-16 12:13:31 -08:00
Paul Gauthier
d89be83414 copy 2024-12-16 12:10:34 -08:00
Paul Gauthier
01382527f5 cleanup cog of toml 2024-12-16 12:08:08 -08:00
Paul Gauthier
dece2193fc Switch to MANIFEST.in to exclude aider/website/assets/ and other from whl build file 2024-12-16 12:07:02 -08:00
Paul Gauthier
d298f864fa works? 2024-12-16 11:55:24 -08:00
Paul Gauthier (aider)
ff37d8c691 feat: Add include-package-data to pyproject.toml 2024-12-16 08:28:10 -08:00
Paul Gauthier
f7f305a564 fix: Update include pattern for assets 2024-12-16 08:28:09 -08:00
Paul Gauthier (aider)
86f38e11cd feat: Add MANIFEST.in to exclude website assets 2024-12-16 08:27:02 -08:00
Paul Gauthier
0b60c48253 fixed gemini metadata keys 2024-12-15 16:00:40 -08:00
Paul Gauthier
024b9840f0 copy 2024-12-15 09:34:51 -08:00
Paul Gauthier
2f4f59d82f copy 2024-12-15 09:29:21 -08:00
Paul Gauthier
830d5ee763 copy 2024-12-15 09:27:22 -08:00
Paul Gauthier
5bc63f7a33 copy 2024-12-15 09:25:29 -08:00
Paul Gauthier
b54f970e12 copy 2024-12-15 09:16:42 -08:00
Paul Gauthier
0cc8c54152 copy 2024-12-15 09:01:13 -08:00
Paul Gauthier
241e1e27d0 copy 2024-12-15 08:50:28 -08:00
Paul Gauthier
0145e86202 Merge branch 'main' of github.com:Aider-AI/aider 2024-12-15 08:48:12 -08:00
Paul Gauthier
4d50e1e373 copy 2024-12-15 08:46:44 -08:00
Paul Gauthier
4b6ae34800 updated keys config docs 2024-12-15 08:46:20 -08:00
Paul Gauthier
2feb85e831 api keys 2024-12-15 08:40:02 -08:00
Paul Gauthier
a67ac81265 updated install instructions 2024-12-15 08:39:53 -08:00
paul-gauthier
dab536c9e8 Merge pull request #2633 from you-n-g/patch-1 2024-12-15 07:04:51 -08:00
you-n-g
64cf298521 docs: Update watch.md 2024-12-15 13:35:14 +08:00
Paul Gauthier
10b5aaa6a5 copy 2024-12-14 20:52:20 -08:00
Paul Gauthier
8c79e5ccfb copy 2024-12-14 20:09:51 -08:00
Paul Gauthier
2ef536a342 copy 2024-12-14 17:42:22 -08:00
Paul Gauthier
85b1303460 fix: Remove always-true condition for Windows env var message 2024-12-14 09:50:26 -08:00
Paul Gauthier
60aca3a241 Merge branch 'no-git' 2024-12-14 09:49:41 -08:00
Paul Gauthier
db98381a86 refactor: Move git check after env loading 2024-12-14 09:44:42 -08:00
Paul Gauthier
f62ef34715 fix: Handle missing git module gracefully 2024-12-14 09:42:54 -08:00
Paul Gauthier
f95a6c1a5a recommend aider-install 2024-12-14 09:42:32 -08:00
Paul Gauthier
65555b5dd0 copy 2024-12-13 13:43:15 -08:00
Paul Gauthier
9f6331a35e copy 2024-12-13 13:34:18 -08:00
Paul Gauthier (aider)
8c10cb6230 style: Fix linting issues in my_models.py 2024-12-13 13:22:59 -08:00
Paul Gauthier (aider)
c8894bcead feat: Conditionally add redacted model note to script 2024-12-13 13:22:55 -08:00
Paul Gauthier
edc602c33a copy 2024-12-13 12:55:33 -08:00
Paul Gauthier (aider)
abfb2ca810 fix: Correct import path for my_models in faq.md 2024-12-13 12:49:01 -08:00
Paul Gauthier (aider)
9967efe45a fix: Correct import path in cog block for model stats 2024-12-13 12:48:29 -08:00
Paul Gauthier
e77d80bda5 docs: Add FAQ about LLMs used to build aider 2024-12-13 12:48:28 -08:00
Paul Gauthier (aider)
a691d1750a style: Apply linter formatting 2024-12-13 12:34:34 -08:00
Paul Gauthier (aider)
834e2f9304 refactor: Separate data, text, and HTML formatting into functions 2024-12-13 12:34:31 -08:00
Paul Gauthier (aider)
66e5e9c1ce feat: Add percentage column to model token usage summary 2024-12-13 12:33:14 -08:00
Paul Gauthier (aider)
2d5f613984 feat: Process only last 1000 lines of analytics file 2024-12-13 12:32:28 -08:00
Paul Gauthier (aider)
868e7a278f feat: Sort model token usage by count descending 2024-12-13 12:31:38 -08:00
Paul Gauthier
f953d17889 chore: Make my_models.py executable 2024-12-13 12:31:37 -08:00
Paul Gauthier (aider)
3473969aae fix: Remove unused os import in my_models.py 2024-12-13 12:31:09 -08:00
Paul Gauthier (aider)
ec11ae7c40 style: Fix linting issues in my_models.py 2024-12-13 12:31:03 -08:00
Paul Gauthier (aider)
8217ee1bbb feat: Add script to analyze model token usage 2024-12-13 12:30:59 -08:00
Paul Gauthier
1ad3ee0aec feat: Add my_models.py script 2024-12-13 12:30:59 -08:00
Paul Gauthier (aider)
b3e9a2fede feat: Allow version arg for blame script, default to v0.1.0 2024-12-13 11:49:15 -08:00
Paul Gauthier
2f5d6bf909 feat: Take version as optional arg for blame script 2024-12-13 11:49:14 -08:00
Paul Gauthier
cd79f479e9 copy 2024-12-13 11:48:14 -08:00
Paul Gauthier
12c0f675ce copy 2024-12-13 11:46:44 -08:00
Paul Gauthier
29471b8019 set version to 0.69.1.dev 2024-12-13 11:42:00 -08:00
Paul Gauthier
cad661f0c8 version bump to 0.69.0 2024-12-13 11:40:25 -08:00
Paul Gauthier
261d770482 Merge branch 'main' of github.com:Aider-AI/aider 2024-12-13 11:39:41 -08:00
Paul Gauthier
a75c9c74fd copy 2024-12-13 11:39:37 -08:00
paul-gauthier
8b5bdf9a16 Merge pull request #2623 from damms005/patch-1
Update conventions.md to fix url
2024-12-13 10:42:54 -08:00
Damilola Emmanuel Olowookere
e35eba2d51 Update conventions.md to fix url 2024-12-13 18:36:10 +00:00
Paul Gauthier (aider)
df8c88cef4 style: Fix line length in issues.py 2024-12-13 08:46:57 -08:00
Paul Gauthier (aider)
844e12769c feat: Handle "bug" label like "enhancement" for closing 2024-12-13 08:46:53 -08:00
Paul Gauthier (aider)
b982626ac4 style: Fix line length in comment 2024-12-13 08:46:02 -08:00
Paul Gauthier (aider)
517b2b42a6 fix: Fix long lines in closing comment 2024-12-13 08:45:58 -08:00
Paul Gauthier (aider)
6778c33628 style: Apply linter fixes 2024-12-13 08:45:47 -08:00
Paul Gauthier (aider)
bc0b11e1ef feat: Add fixed enhancement issue closing 2024-12-13 08:45:43 -08:00
Paul Gauthier
6b0d4b9c93 copy 2024-12-13 08:23:42 -08:00
Paul Gauthier
7d4e4f029e copy 2024-12-13 08:13:36 -08:00
Paul Gauthier
1fbdb629ff add gemini-2.0-flash-exp metadata 2024-12-13 08:12:06 -08:00
Paul Gauthier
a437237947 copy 2024-12-13 07:37:15 -08:00
Paul Gauthier
910637c549 5% analytics 2024-12-13 06:51:50 -08:00
Paul Gauthier
e8974a3e69 copy 2024-12-12 19:08:21 -08:00
Paul Gauthier
6c98310f7f copy 2024-12-12 19:08:16 -08:00
Paul Gauthier
72aed0d26d fix: Disable complete_while_typing in prompt_session 2024-12-12 12:27:14 -08:00
Paul Gauthier
e10ef8b9e0 feat: Add instructions to /copy-context command 2024-12-12 12:08:29 -08:00
Paul Gauthier
39fa8ba831 copy 2024-12-12 07:54:54 -08:00
Paul Gauthier (aider)
8ee8279044 fix: Correct emacs auto-save gitignore pattern 2024-12-11 20:44:02 -08:00
Paul Gauthier (aider)
c3f85c3bb2 test: Fix gitignore pattern matching and add ai comment test 2024-12-11 20:43:07 -08:00
Paul Gauthier (aider)
ad59c4cbf3 test: Add comprehensive gitignore pattern tests 2024-12-11 20:43:03 -08:00
Paul Gauthier
26bc981981 chore: Add comment about testing gitignore patterns 2024-12-11 20:43:02 -08:00
Paul Gauthier
514c34b242 copy 2024-12-11 20:41:24 -08:00
Paul Gauthier (aider)
6f266c0090 fix: Skip test fixture watch files in blame script 2024-12-11 20:38:11 -08:00
Paul Gauthier
baa7352ca6 chore: Skip test fixture files in blame script 2024-12-11 20:38:11 -08:00
Paul Gauthier (aider)
fdb1c8d99a chore: Remove comment about skipping test files 2024-12-11 20:37:29 -08:00
Paul Gauthier
79f5dba094 chore: Skip test fixture files in blame script 2024-12-11 20:37:28 -08:00
Paul Gauthier
2134965f16 initial 2024-12-11 20:34:00 -08:00
Paul Gauthier
77b7a59a27 copy 2024-12-11 20:33:30 -08:00
Paul Gauthier
365e7126d0 refactor: Remove is_source_file function and check in FileWatcher 2024-12-11 20:30:47 -08:00
Paul Gauthier (aider)
d3daf9d159 feat: Add IDE, env, log, and cache patterns to ignore list 2024-12-11 20:30:17 -08:00
Paul Gauthier
8d59a519a6 chore: Add comment about gitignore patterns 2024-12-11 20:29:28 -08:00
Paul Gauthier (aider)
239262f360 style: Format gitignore patterns for readability 2024-12-11 20:28:07 -08:00
Paul Gauthier (aider)
9eb938fd6f feat: Expand gitignore patterns to include editor temp files 2024-12-11 20:28:03 -08:00
Paul Gauthier
3fcbf1a43f feat: Add text editor temp files to gitignore 2024-12-11 20:28:02 -08:00
Paul Gauthier
2b7ee271df copy 2024-12-11 20:24:08 -08:00
Paul Gauthier
11512c6281 feat: Add support for ! and ? action comments 2024-12-11 20:23:29 -08:00
Paul Gauthier (aider)
b16ba547ab test: Add assertion for line count in test_ai_comment_pattern 2024-12-11 20:21:50 -08:00
Paul Gauthier (aider)
e5b8899b4c fix: Remove extra comment in test_watch.py 2024-12-11 20:21:46 -08:00
Paul Gauthier (aider)
fee3e9e63b feat: Add test for watch_question.js fixture 2024-12-11 20:21:42 -08:00
Paul Gauthier
57a24d30b5 test: Add test for watch_question.js ai comments 2024-12-11 20:21:41 -08:00
Paul Gauthier (aider)
5a83610fb1 refactor: Update ai comment action handling to support '?' 2024-12-11 20:16:10 -08:00
Paul Gauthier
96086f12c6 fix: Correct ai comment regex to match ai? and ai! 2024-12-11 20:16:09 -08:00
Paul Gauthier
a6ee3ce07f cleanup 2024-12-11 20:12:26 -08:00
Paul Gauthier (aider)
5f36ddd425 test: Fix multiline mode tests and add toggle test 2024-12-11 20:10:30 -08:00
Paul Gauthier (aider)
bec67074e0 feat: Add tests for multiline input mode 2024-12-11 20:10:26 -08:00
Paul Gauthier (aider)
895c92cdae fix: Remove unused import buffer_has_focus 2024-12-11 20:05:04 -08:00
Paul Gauthier
7406a5bc26 refactor: Move is_searching filter to top level 2024-12-11 20:05:01 -08:00
Paul Gauthier (aider)
ef97714404 fix: Reorder imports to satisfy linter 2024-12-11 20:00:00 -08:00
Paul Gauthier (aider)
6d6daee511 fix: Use correct filter for custom enter keybinding 2024-12-11 19:59:56 -08:00
Paul Gauthier (aider)
32cd1c2a65 fix: Fix Ctrl-R reverse search enter key selection 2024-12-11 19:55:08 -08:00
Paul Gauthier
abad920a8a feat: Add gemini-2.0-flash-exp model settings 2024-12-11 19:47:44 -08:00
Paul Gauthier
e1ab49e100 copy 2024-12-11 19:43:31 -08:00
Paul Gauthier
df300e89a2 refac prompt out 2024-12-11 19:42:01 -08:00
Paul Gauthier
9a278bed21 feat: Add gemini flash model alias 2024-12-11 16:00:31 -08:00
Paul Gauthier
4a7fc084ce refactor: move watch prompt text to separate module 2024-12-11 15:07:30 -08:00
Paul Gauthier
2649e736fb chore: update model name in leaderboard to include date 2024-12-11 15:00:18 -08:00
Paul Gauthier
42ac891e28 docs: add bash syntax highlighting to code blocks in docs 2024-12-11 14:49:22 -08:00
Paul Gauthier
4dc3b9072e feat: increase retry timeout for benchmarking 2024-12-11 14:26:28 -08:00
Paul Gauthier
ae3235b099 feat: add Gemini 2.0 Flash model leaderboard entry 2024-12-11 13:55:52 -08:00
Paul Gauthier
7cc5e0d577 docs: add Yi Lightning model test results to leaderboard 2024-12-11 13:54:39 -08:00
Paul Gauthier
f6b956dc8e refactor: simplify voice command and improve installation docs 2024-12-11 13:52:33 -08:00
Paul Gauthier (aider)
fcb2bacd1e style: format benchmark.py with black 2024-12-11 13:09:52 -08:00
Paul Gauthier (aider)
a9401e921e feat: add sleep option between tests in single-threaded mode 2024-12-11 13:09:45 -08:00
Paul Gauthier
02e7e315b2 copy 2024-12-11 12:54:50 -08:00
Paul Gauthier
def72a64e0 copy 2024-12-11 12:45:56 -08:00
Paul Gauthier
46e7672197 copy 2024-12-11 12:42:19 -08:00
Paul Gauthier
2f8a5ce935 copy 2024-12-11 12:40:13 -08:00
Paul Gauthier (aider)
730e5bd831 fix: add error handling for clipboard operations in copy_context command 2024-12-11 12:10:12 -08:00
Paul Gauthier
b7984a05af copy 2024-12-11 09:51:51 -08:00
Paul Gauthier
5d4af67186 Merge branch 'main' of github.com:Aider-AI/aider 2024-12-11 07:21:18 -08:00
paul-gauthier
370e08cf4d Merge pull request #2601 from miradnanali/multiline-mode
Implement /multiline-mode, swaps Enter & Meta-Enter
2024-12-11 07:21:09 -08:00
Mir Adnan ALI
aaf7e3f943 Implement multiline-mode, swaps Enter & Meta-Enter 2024-12-11 09:09:58 -05:00
Paul Gauthier
fbde0936e7 revert 2024-12-10 11:20:25 -08:00
Paul Gauthier (aider)
af48f7bab4 fix: update artifact upload path to match Jekyll build directory 2024-12-10 11:12:23 -08:00
Paul Gauthier
61def89878 ci: downgrade upload-pages-artifact action to v3 2024-12-10 11:07:42 -08:00
Paul Gauthier (aider)
88e86cee77 chore: upgrade upload-pages-artifact action to v4 2024-12-10 11:04:46 -08:00
Paul Gauthier
acc1625406 Merge branch 'main' of github.com:Aider-AI/aider 2024-12-10 11:03:20 -08:00
Paul Gauthier
502f448053 copy 2024-12-10 09:59:56 -08:00
paul-gauthier
55b081884c Merge pull request #2592 from JeongJuhyeon/patch-1
Add '?' to set of punctuations to strip for file mentions
2024-12-10 08:41:38 -08:00
Paul Gauthier
fd67171908 copy 2024-12-10 08:21:28 -08:00
Paul Gauthier
16a53aa641 set version to 0.68.1.dev 2024-12-10 08:19:44 -08:00
Paul Gauthier
4aec676950 version bump to 0.68.0 2024-12-10 08:18:06 -08:00
Paul Gauthier
d8fff0e90a copy 2024-12-10 08:01:18 -08:00
Paul Gauthier
57ad6cc3ea Update shell cmd prompt: no multi-line, run from project root 2024-12-10 07:59:24 -08:00
Paul Gauthier
2b46a8b9c9 copy 2024-12-10 07:39:58 -08:00
Paul Gauthier
4d1a2e8c53 copy 2024-12-10 07:19:00 -08:00
Paul Gauthier
58b1409bd2 copy 2024-12-10 07:02:26 -08:00
Paul Gauthier
a2525dbf56 docs: remove deprecated label from DeepSeek model names 2024-12-10 06:59:58 -08:00
Paul Gauthier
36eb2a31b5 docs: add DeepSeek-V2.5-1210 model leaderboard results 2024-12-10 06:57:18 -08:00
Paul Gauthier
0483bfc9cb docs: add Gemini whole file edit experiment results to leaderboard 2024-12-10 06:47:41 -08:00
JeongJuhyeon
3f63a64254 Add '?' to set of punctuations to strip for file mentions 2024-12-10 22:10:00 +09:00
Paul Gauthier
16332b285f copy 2024-12-09 20:27:38 -08:00
Paul Gauthier
f7371f6faf copy 2024-12-09 20:27:32 -08:00
Paul Gauthier
92d29805f1 copy 2024-12-09 20:06:36 -08:00
Paul Gauthier
4a37d07acb fix: skip context copy when using placeholder input 2024-12-09 18:46:44 -08:00
Paul Gauthier
bb4c61e9cc copy 2024-12-09 15:38:40 -08:00
Paul Gauthier
f4e5515c82 docs: clarify read-only command description and behavior 2024-12-09 15:37:48 -08:00
Paul Gauthier (aider)
141a2df19c test: add test for bulk conversion to read-only mode 2024-12-09 15:36:03 -08:00
Paul Gauthier (aider)
e2385b4922 feat: add bulk conversion to read-only mode when no files specified 2024-12-09 15:34:59 -08:00
Paul Gauthier
9974fb50f7 feat: add auto-conversion of /added files to read-only mode 2024-12-09 15:34:57 -08:00
Paul Gauthier
c5d51d62c4 feat: add architect command and improve coder class documentation 2024-12-09 15:30:01 -08:00
Paul Gauthier
4fcbf28f91 Restore interactive shell #2415 2024-12-09 15:23:39 -08:00
Paul Gauthier
f678b664ff refactor: Move website files list to global scope 2024-12-09 15:01:12 -08:00
Paul Gauthier (aider)
4206920a7d style: fix whitespace in blame.py 2024-12-09 15:00:47 -08:00
Paul Gauthier (aider)
ad2e5ead54 refactor: extract website files into dedicated list 2024-12-09 15:00:41 -08:00
Paul Gauthier
eb72719117 chore: add website file to blame script and improve comments 2024-12-09 15:00:40 -08:00
Paul Gauthier (aider)
20b46afbf2 style: update cookie consent box colors to dark grey 2024-12-09 14:41:12 -08:00
Paul Gauthier (aider)
1925e4a7f4 feat: add cookie persistence config to consent banner 2024-12-09 14:39:19 -08:00
Paul Gauthier (aider)
1a12322354 feat: add GDPR-compliant cookie consent for PostHog analytics 2024-12-09 14:33:54 -08:00
Paul Gauthier
73f3f4ec7e feat: add analytics events for copy-paste mode and AI comments 2024-12-09 10:47:30 -08:00
Paul Gauthier (aider)
a8c42f453a style: format FileWatcher instantiation for better readability 2024-12-09 10:32:08 -08:00
Paul Gauthier (aider)
79dd0c5ba6 feat: add analytics events for file watching and AI comments 2024-12-09 10:31:59 -08:00
Paul Gauthier
89bc3b6b16 feat: add analytics event hooks to file watcher 2024-12-09 10:31:57 -08:00
Paul Gauthier (aider)
a997dd6c49 fix: use LiteLLMExceptions class instead of undefined litellm_ex 2024-12-09 07:46:09 -08:00
Paul Gauthier (aider)
6aa80d2a4c feat: handle cost calculation differently for context window vs other errors 2024-12-09 07:45:50 -08:00
Paul Gauthier
f009e8fb14 add pip as a req 2024-12-09 06:51:06 -08:00
Paul Gauthier
a8dde17155 add posthog 2024-12-09 06:50:58 -08:00
Paul Gauthier
cbcbff341b style: format voice.py and suppress syntax warnings 2024-12-08 18:14:30 -08:00
Paul Gauthier (aider)
e50992bb93 style: remove unused shutil import 2024-12-08 18:12:36 -08:00
Paul Gauthier
fa6c3068c0 refactor: simplify pip install command by using sys.executable directly 2024-12-08 18:12:30 -08:00
Paul Gauthier
dd9bdca572 copy 2024-12-08 14:44:51 -08:00
Paul Gauthier
3f7dffe47d copy 2024-12-08 14:30:31 -08:00
Paul Gauthier
c7fde14458 copy 2024-12-08 12:05:41 -08:00
Paul Gauthier
57f4186cad refactor: optimize analytics event tracking with system info as super properties 2024-12-08 11:49:12 -08:00
Paul Gauthier
fa5a6021b1 copy 2024-12-08 11:49:01 -08:00
Paul Gauthier
42ae279b91 fix: update test cases to use Model wrapper class 2024-12-07 15:09:04 -08:00
Paul Gauthier
a74cdbfc28 test: update test_sendchat to use Model class and fix assertion 2024-12-07 15:07:39 -08:00
Paul Gauthier (aider)
a56fa567dd test: update print call count assertions in sendchat tests 2024-12-07 13:44:08 -08:00
Paul Gauthier (aider)
c9c2d5ab6f test: update test assertions to check model objects instead of names 2024-12-07 13:38:57 -08:00
Paul Gauthier (aider)
ccf460c1f7 refactor: update simple_send_with_retries to use model object and handle temperature 2024-12-07 13:37:14 -08:00
Paul Gauthier
2325f542b8 copy 2024-12-07 13:04:06 -08:00
Paul Gauthier (aider)
63fdf3f3f6 style: format git blame command arguments for better readability 2024-12-07 11:54:14 -08:00
Paul Gauthier (aider)
efa83bdf34 feat: add git blame move/copy detection for better attribution 2024-12-07 11:54:10 -08:00
Paul Gauthier
5705bda818 style: Update settings section headings to use lowercase 2024-12-07 11:51:19 -08:00
Paul Gauthier
20042334ff refactor: reorganize command line arguments and improve help messages 2024-12-07 11:45:20 -08:00
Paul Gauthier (aider)
7ae9569816 docs: update deprecated OpenAI args help text to suggest --set-env 2024-12-07 11:23:05 -08:00
Paul Gauthier
cacba526b3 refactor: reorganize API key and environment settings arguments 2024-12-07 11:23:03 -08:00
Paul Gauthier
50f203cc8a cleanup 2024-12-07 11:07:59 -08:00
Paul Gauthier
3efcd154f3 refactor: consolidate API key and environment variable handling 2024-12-07 10:55:29 -08:00
Paul Gauthier (aider)
bdb08d7c78 style: format long lines in main.py 2024-12-07 10:52:27 -08:00
Paul Gauthier (aider)
f3874dd40a feat: add deprecation warnings for legacy API key arguments 2024-12-07 10:52:21 -08:00
Paul Gauthier
935c39e341 refactor: move API key handling earlier in startup sequence 2024-12-07 10:52:19 -08:00
Paul Gauthier (aider)
7ddcc30e8d style: format test_main.py line breaks 2024-12-07 08:23:58 -08:00
Paul Gauthier (aider)
13ff038e58 feat: add --api-key flag to set provider API keys as env vars 2024-12-07 08:23:50 -08:00
Paul Gauthier
1d4918dfbf refactor: Remove analytics event for invalid env var format 2024-12-07 08:11:10 -08:00
Paul Gauthier (aider)
ba14ab96da refactor: update env format test to check return value instead of SystemExit 2024-12-07 08:09:56 -08:00
Paul Gauthier
054e0820b7 refactor: Move --set-env processing after IO initialization 2024-12-07 08:09:52 -08:00
Paul Gauthier (aider)
af3d8dd6a7 style: format test_main.py with black 2024-12-07 08:08:40 -08:00
Paul Gauthier (aider)
e10d06cb47 test: add test coverage for --set-env functionality 2024-12-07 08:08:35 -08:00
Paul Gauthier (aider)
87a1469c1e style: fix string quote consistency in env setting split 2024-12-07 08:07:28 -08:00
Paul Gauthier (aider)
2492f1635c refactor: remove --set-env argument processing from main function 2024-12-07 08:07:23 -08:00
Paul Gauthier (aider)
b3305e6e19 refactor: move env var processing after IO initialization 2024-12-07 08:07:14 -08:00
Paul Gauthier (aider)
491d3e6606 style: fix string quote consistency in env setting split 2024-12-07 08:06:04 -08:00
Paul Gauthier (aider)
e41bf67f73 feat: add --set-env flag to set environment variables from command line 2024-12-07 08:05:57 -08:00
Paul Gauthier
66b99c4fa0 bumped deps to pickup litellm that supports OPENAI_ORGANIZATION 2024-12-07 07:57:29 -08:00
Paul Gauthier (aider)
f2f2645fe6 style: fix linting issues in watch.py 2024-12-07 07:54:24 -08:00
Paul Gauthier (aider)
4c77d0509a feat: add shell dotfile extensions to source file detection 2024-12-07 07:54:20 -08:00
Paul Gauthier
33d77f4355 feat: add shell script file extensions to source file detection 2024-12-07 07:54:18 -08:00
Paul Gauthier
ecf8617246 copy 2024-12-06 17:41:34 -08:00
Paul Gauthier
bec216d72a feat: add experimental Gemini model settings 2024-12-06 17:41:11 -08:00
Paul Gauthier (aider)
374e8c3307 feat: add video file exclusions to linkchecker 2024-12-06 15:12:12 -08:00
Paul Gauthier
b5eff8a9dd copy 2024-12-06 14:52:50 -08:00
Paul Gauthier (aider)
d53002a494 feat: add legend to chart showing diff and whole format patterns 2024-12-06 14:46:43 -08:00
Paul Gauthier (aider)
04662f0875 feat: add y-axis label to leaderboard charts 2024-12-06 14:45:25 -08:00
Paul Gauthier
aec92c7c17 refactor: update highlighted model name to 1206 2024-12-06 14:45:23 -08:00
Paul Gauthier (aider)
f7a7976923 feat: add red striped pattern for highlighted model with whole edit format 2024-12-06 14:43:05 -08:00
Paul Gauthier
1b50d4507f feat: update highlighted model to Qwen in leaderboard 2024-12-06 14:43:02 -08:00
Paul Gauthier (aider)
045cf887df feat: add pattern background for whole edit format bars in chart 2024-12-06 14:39:05 -08:00
Paul Gauthier (aider)
277d7c0e04 perf: cache diagonal pattern and optimize label access in chart rendering 2024-12-06 14:36:34 -08:00
Paul Gauthier (aider)
0e2c703e77 fix: add chart render call to ensure pattern reappears after row selection 2024-12-06 14:33:31 -08:00
Paul Gauthier (aider)
62b3f38f00 feat: add Patternomaly script tags for chart patterns 2024-12-06 14:31:52 -08:00
Paul Gauthier (aider)
422658293d fix: remove redundant pattern initialization and add Patternomaly script 2024-12-06 14:31:29 -08:00
Paul Gauthier (aider)
74cfd05642 feat: add edit format field and striped pattern for whole edits 2024-12-06 14:29:36 -08:00
Paul Gauthier (aider)
80586f1de3 feat: add line breaks for long x-axis labels in leaderboard chart 2024-12-06 14:22:54 -08:00
Paul Gauthier
a933177ac0 copy 2024-12-06 14:19:00 -08:00
Paul Gauthier
ade2db696b add emini-exp-1206 2024-12-06 14:14:07 -08:00
Paul Gauthier
cf266037ff copy 2024-12-06 14:10:11 -08:00
Paul Gauthier
5f14277fbf Remove -i when running shell commands, as it tosses local env 2024-12-06 13:56:57 -08:00
Paul Gauthier
b677349ec9 copy 2024-12-06 13:55:53 -08:00
Paul Gauthier
7f72d2a703 reraise EOFError to fix control-d 2024-12-06 13:55:41 -08:00
Paul Gauthier
779983cb85 feat: add missing dependency hints for Gemini and Bedrock 2024-12-06 13:43:49 -08:00
Paul Gauthier
f2d2ab51b1 copy 2024-12-06 13:27:26 -08:00
Paul Gauthier
0a54f8c4a7 copy 2024-12-06 12:25:45 -08:00
Paul Gauthier
881527ddd0 handle and test for trailing whitespace after ai 2024-12-06 12:23:27 -08:00
Paul Gauthier
cca4f894a8 style: fix indentation and remove redundant comment 2024-12-06 12:20:23 -08:00
Paul Gauthier (aider)
20dae33be5 fix: remove duplicate TreeContext parameters causing syntax error 2024-12-06 12:15:59 -08:00
Paul Gauthier (aider)
fd301c519d feat: add error handling for TreeContext with fallback to raw comments 2024-12-06 12:15:46 -08:00
Paul Gauthier
a96d87814b fix: handle ValueError in TreeContext by including raw comments 2024-12-06 12:15:45 -08:00
Paul Gauthier
2a3eefc5be copy 2024-12-06 12:09:20 -08:00
Paul Gauthier
c5dc10e3cd copy 2024-12-06 11:24:26 -08:00
Paul Gauthier
c251a93609 fix --test to automatically fix errors 2024-12-06 11:23:15 -08:00
Paul Gauthier
2df509effd added llama 3.3 70b 2024-12-06 10:47:40 -08:00
Paul Gauthier
53e0d670b3 copy 2024-12-06 09:45:41 -08:00
Paul Gauthier
ccd19d2c96 copy 2024-12-06 09:24:13 -08:00
Paul Gauthier
b69f084db9 copy 2024-12-06 09:10:35 -08:00
Paul Gauthier
9639395937 feat: improve AI comment handling and documentation 2024-12-06 08:46:52 -08:00
Paul Gauthier
117b7afd81 copy 2024-12-06 07:17:21 -08:00
Paul Gauthier
009c4dc8db copy 2024-12-06 07:02:06 -08:00
Paul Gauthier
0fdf3fc851 Merge branch 'copypaste' 2024-12-06 07:01:40 -08:00
Paul Gauthier
ffc2d91cef copy 2024-12-06 06:44:23 -08:00
Paul Gauthier
99975c8ff7 set version to 0.67.1.dev 2024-12-06 06:33:11 -08:00
Paul Gauthier
d44fd6b46d version bump to 0.67.0 2024-12-06 06:31:40 -08:00
Paul Gauthier
bd0a1426d7 copy 2024-12-06 06:31:30 -08:00
Paul Gauthier
353d144039 copy 2024-12-06 06:26:24 -08:00
Paul Gauthier
6efdf8a7f4 refactor: rename copypaste flag to copy-paste and update help text 2024-12-05 20:43:14 -08:00
Paul Gauthier
623770e24b refactor: move clipboard context functionality to commands.py 2024-12-05 20:41:40 -08:00
Paul Gauthier (aider)
402940a215 fix: store clipboard watcher instance in coder object 2024-12-05 20:36:04 -08:00
Paul Gauthier (aider)
7fea85cdcd style: reorder imports alphabetically 2024-12-05 20:35:51 -08:00
Paul Gauthier (aider)
93b3b7a184 feat: set auto-copy-context based on copypaste argument 2024-12-05 20:35:46 -08:00
Paul Gauthier
8f2a84629a refactor: move ClipboardWatcher import to top level 2024-12-05 20:35:44 -08:00
Paul Gauthier (aider)
7a1c1982f0 feat: implement auto copy context functionality 2024-12-05 20:35:04 -08:00
Paul Gauthier
75d8982b23 feat: add auto copy context feature with empty implementation 2024-12-05 20:35:02 -08:00
Paul Gauthier (aider)
87dbb56d7e style: fix trailing comma in system prompt dictionary 2024-12-05 18:57:50 -08:00
Paul Gauthier (aider)
aa217a3a43 fix: handle system reminder message construction properly 2024-12-05 18:57:47 -08:00
Paul Gauthier (aider)
22fc961dc0 fix: add empty list check before accessing last chat chunk 2024-12-05 18:57:24 -08:00
Paul Gauthier (aider)
8f57186945 style: remove trailing whitespace in editor_editblock_coder.py 2024-12-05 18:55:54 -08:00
Paul Gauthier (aider)
f8277c55a8 feat: add format_chat_markdown method to EditorEditBlockCoder 2024-12-05 18:55:50 -08:00
Paul Gauthier (aider)
6163713e34 style: fix linting issues in clipboard watcher initialization 2024-12-05 18:44:57 -08:00
Paul Gauthier (aider)
d2d5887936 feat: add clipboard watcher with --copypaste flag 2024-12-05 18:44:50 -08:00
Paul Gauthier (aider)
2a1065efc1 style: fix linting issues in copypaste.py 2024-12-05 18:43:16 -08:00
Paul Gauthier (aider)
6f36a97c4a feat: add clipboard watcher to monitor and update IO placeholder 2024-12-05 18:43:12 -08:00
Paul Gauthier
eeed79009a feat: add copypaste module for code manipulation 2024-12-05 18:43:09 -08:00
Paul Gauthier
9930057171 copy 2024-12-05 16:34:58 -08:00
Paul Gauthier (aider)
e14c84f2fb feat: add silent mode to read_text method 2024-12-05 16:22:44 -08:00
Paul Gauthier
a664c3dd47 feat: add silent mode option for read_text function 2024-12-05 16:22:42 -08:00
Paul Gauthier
73205b1f8c refactor: Move charset test to separate method in Spinner class 2024-12-05 14:57:13 -08:00
Paul Gauthier (aider)
3016d7b8f3 style: fix whitespace in utils.py 2024-12-05 14:46:37 -08:00
Paul Gauthier (aider)
beb3ddaa1f feat: add __main__ block to utils.py 2024-12-05 14:46:33 -08:00
Paul Gauthier
8db48fb4f1 refactor: simplify comment in utils.py 2024-12-05 14:46:31 -08:00
Paul Gauthier (aider)
6eb3641c1d feat: add main function with spinner demo 2024-12-05 14:45:50 -08:00
Paul Gauthier
8cfd64a7be chore: add comment for future spinner implementation 2024-12-05 14:45:47 -08:00
Paul Gauthier (aider)
e8d9ef269b style: fix linting issues in base_coder.py 2024-12-05 09:28:28 -08:00
Paul Gauthier (aider)
80f83da9b8 chore: remove debug dump() calls 2024-12-05 09:28:18 -08:00
Paul Gauthier
6b8e235f88 feat: add file watcher support to coder cloning 2024-12-05 09:28:16 -08:00
Paul Gauthier
a1d558a960 copy 2024-12-05 07:21:14 -08:00
Paul Gauthier
071ec80e2a copy 2024-12-05 07:06:43 -08:00
Paul Gauthier
995541db2e test: update GitHub Copilot model temperature test assertions 2024-12-05 07:04:17 -08:00
Paul Gauthier
9121026856 test: reorganize model test cases for better readability 2024-12-05 06:50:49 -08:00
Paul Gauthier (aider)
341419788e fix: update test to use correct temperature attribute name 2024-12-05 06:47:58 -08:00
Paul Gauthier (aider)
f8f69fadc4 style: Remove trailing whitespace in test_models.py 2024-12-05 06:47:33 -08:00
Paul Gauthier (aider)
4830d82a73 test: add temperature validation for GitHub Copilot models 2024-12-05 06:47:28 -08:00
Paul Gauthier
f3a228c79a feat: enable automatic exception capture in Posthog analytics 2024-12-04 19:55:56 -08:00
Paul Gauthier
4bf96aaca0 copy 2024-12-04 15:16:22 -08:00
Paul Gauthier
a8a026d509 copy 2024-12-04 15:10:21 -08:00
Paul Gauthier
e1fd506269 feat: add direct git diff output for pretty mode 2024-12-04 15:09:14 -08:00
Paul Gauthier
63e86b5673 copy 2024-12-04 14:27:53 -08:00
Paul Gauthier
238299c759 Add nova pro to leaderboard 2024-12-04 14:12:05 -08:00
Paul Gauthier
4e9272e31c copy 2024-12-04 14:09:01 -08:00
Paul Gauthier
8f92c32693 bumped deps to pickup litellm that supports bedrock nova 2024-12-04 14:06:27 -08:00
Paul Gauthier (aider)
699e283890 fix: add error handling for logfile writes in Analytics 2024-12-04 13:51:06 -08:00
Paul Gauthier
c51afc952c chore: add comment about ignoring OsErrors in analytics logging 2024-12-04 13:51:05 -08:00
Paul Gauthier
8fc030ba83 copy 2024-12-04 13:25:40 -08:00
Paul Gauthier
b754757c94 copy 2024-12-04 12:38:46 -08:00
Paul Gauthier (aider)
16bb40406a docs: add direct download link for watch demo video 2024-12-04 12:13:26 -08:00
Paul Gauthier (aider)
290ae04988 docs: add video demo of IDE watch mode functionality 2024-12-04 12:13:22 -08:00
Paul Gauthier
5c6f0e4d32 docs: add watch mode documentation 2024-12-04 12:13:20 -08:00
Paul Gauthier
14143243b1 test: remove mixpanel assertions from analytics tests 2024-12-04 11:58:35 -08:00
Paul Gauthier (aider)
0e2c0c78f2 style: fix indentation in analytics test file 2024-12-04 11:57:29 -08:00
Paul Gauthier
2a8e1f41d0 fix: Correct indentation in analytics test file 2024-12-04 11:57:26 -08:00
Paul Gauthier (aider)
4e1d18e206 style: remove unused Mixpanel import 2024-12-04 11:46:35 -08:00
Paul Gauthier
ff5a947a16 refactor: disable Mixpanel and add PostHog error handling 2024-12-04 11:46:27 -08:00
Paul Gauthier
26ddb1e479 prompt 2024-12-04 10:23:29 -08:00
Paul Gauthier
b2ddfd21c1 prompt 2024-12-04 10:20:18 -08:00
Paul Gauthier
efe9268bcb fix: add null check for filename in lint_edited method 2024-12-04 10:03:22 -08:00
Paul Gauthier
974e618541 refactor: remove debug prints and add lazy litellm loading verbosity flag 2024-12-04 09:38:20 -08:00
Paul Gauthier
d09d281a8d fix: update version file path and add debug logging for version checks 2024-12-04 09:09:56 -08:00
Paul Gauthier
43f3f54063 copy 2024-12-04 07:28:45 -08:00
Paul Gauthier
2b303e162c copy 2024-12-04 07:27:11 -08:00
Paul Gauthier
3947a755b1 initial 2024-12-04 07:27:09 -08:00
Paul Gauthier
0b764f4cb8 copy 2024-12-04 07:23:29 -08:00
Paul Gauthier
a0101c14a6 copy 2024-12-04 07:22:09 -08:00
Paul Gauthier
a4dcde2fc2 copy 2024-12-04 07:05:49 -08:00
Paul Gauthier (aider)
f6f5955753 style: fix whitespace in Spinner class 2024-12-04 07:04:04 -08:00
Paul Gauthier (aider)
d87f9fbd79 fix: add fallback to ASCII spinner when Unicode is not supported 2024-12-04 07:03:59 -08:00
Paul Gauthier
4c2bc47bf3 copy 2024-12-04 06:42:18 -08:00
Paul Gauthier
0d983d504b copy 2024-12-04 06:38:38 -08:00
Paul Gauthier (aider)
f26ccfa3e9 fix: preserve plus sign at end of line in chart labels 2024-12-04 06:31:56 -08:00
Paul Gauthier (aider)
1ec6ba35e0 feat: add linebreaks to x-axis labels using callback function 2024-12-04 06:25:32 -08:00
Paul Gauthier (aider)
0378ea40e7 style: fix import order and quote style 2024-12-04 06:20:01 -08:00
Paul Gauthier (aider)
656250dd33 feat: add ctrl-z support for process suspension 2024-12-04 06:19:56 -08:00
Paul Gauthier
b914fa6da8 copy 2024-12-03 19:00:41 -08:00
Paul Gauthier
db77ec43a7 copy 2024-12-03 19:00:28 -08:00
Paul Gauthier
1a9d4bfb1c initial 2024-12-03 18:51:03 -08:00
Paul Gauthier (aider)
7180cb049c feat: add QwQ to solo model color conditions in chart 2024-12-03 18:14:01 -08:00
Paul Gauthier
7e2769d8df fix: Update Qwen2.5 Coder model name in chart 2024-12-03 18:13:59 -08:00
Paul Gauthier (aider)
23faeeb5d0 style: update chart colors to include o1 models in solo category 2024-12-03 17:41:53 -08:00
Paul Gauthier (aider)
1e689a69a8 style: standardize legend text color to match chart defaults 2024-12-03 16:47:18 -08:00
Paul Gauthier (aider)
19004c0bad fix: consolidate datasets and add custom legend to prevent empty columns 2024-12-03 16:33:27 -08:00
Paul Gauthier (aider)
82059bb454 feat: add color-coded legend to chart for model types 2024-12-03 16:32:11 -08:00
Paul Gauthier (aider)
3fc846471e style: unify Qwen and Sonnet chart colors to green 2024-12-03 16:31:14 -08:00
Paul Gauthier (aider)
5379d45184 fix: correct color mapping for Qwen and Sonnet models in chart 2024-12-03 16:30:49 -08:00
Paul Gauthier
65b8bf6834 style: Update QWQ chart colors and font sizes 2024-12-03 16:30:47 -08:00
Paul Gauthier (aider)
107dfcac65 style: update Sonnet bar color to green in chart 2024-12-03 16:14:49 -08:00
Paul Gauthier (aider)
2a29d077ee feat: add distinct color for Qwen2.5 bar in chart 2024-12-03 16:11:54 -08:00
Paul Gauthier
3d7f1f39ce feat: add QWQ chart component for website visualization 2024-12-03 16:11:53 -08:00
Paul Gauthier
51c02da206 feat: add placeholder prompt when command fails with add flag 2024-12-03 08:43:54 -08:00
Paul Gauthier
16250e1b7c fix: Update model name assertion in test case 2024-12-03 08:35:38 -08:00
Paul Gauthier
3e02c5e4a8 copy 2024-12-03 08:28:32 -08:00
Paul Gauthier (aider)
40da942bfe fix: add expanduser() to properly handle tilde in paths 2024-12-03 08:25:58 -08:00
Paul Gauthier
44909912cd refactor: update GPT-4o model name to simpler format 2024-12-03 07:50:19 -08:00
Paul Gauthier
631ee98738 fix: add interactive flag to shell spawn in pexpect command 2024-12-03 07:45:46 -08:00
Paul Gauthier (aider)
0b68eea44a ci: add scheduled workflow to process GitHub issues every 12 hours 2024-12-03 06:53:40 -08:00
Paul Gauthier (aider)
47743e7f90 fix: add missing os import in test_browser.py 2024-12-02 17:56:50 -08:00
Paul Gauthier
b2da3545f9 test: disable analytics in test environment 2024-12-02 17:56:45 -08:00
Paul Gauthier
fb005dd01b fix: improve AI comment detection with case-insensitive matching 2024-12-02 08:57:50 -08:00
Paul Gauthier
5b2bd90071 fix: ensure consistent handling of "ai!" comment detection 2024-12-02 07:26:51 -08:00
Paul Gauthier
25e258e26a copy 2024-12-02 06:54:30 -08:00
Paul Gauthier (aider)
75d24974ec style: fix linting issues in watch.py 2024-12-01 18:25:23 -08:00
Paul Gauthier (aider)
981bd950da feat: add support for -- style comments in file watcher 2024-12-01 18:25:18 -08:00
Paul Gauthier
0ca1886695 refactor: add comment marker for AI-related code section 2024-12-01 18:25:17 -08:00
Paul Gauthier
bf2f9e0f7e add watchfiles dep 2024-12-01 16:44:57 -08:00
Paul Gauthier
d74f1c22ff un-format the py fixture 2024-12-01 16:27:10 -08:00
Paul Gauthier
882e09f253 copy 2024-12-01 15:57:41 -08:00
Paul Gauthier
ce05c0e13d refactor: remove unused FileWatcher import 2024-12-01 15:31:54 -08:00
Paul Gauthier (aider)
45c92f0868 style: add noqa comment to silence unused import warning 2024-12-01 15:31:38 -08:00
Paul Gauthier
e952f90b4c style: remove noqa comment from FileWatcher import 2024-12-01 15:31:28 -08:00
Paul Gauthier
97bf5e8d69 fix: improve AI comment detection accuracy in FileWatcher 2024-12-01 15:26:45 -08:00
Paul Gauthier (aider)
ee7bb71a05 style: fix import order and remove extra blank lines 2024-12-01 15:25:52 -08:00
Paul Gauthier (aider)
791cbab6f6 refactor: use get_ai_comments() instead of duplicating pattern matching 2024-12-01 15:25:47 -08:00
Paul Gauthier
e001b7fb46 fix: improve AI comment regex pattern to match end of line 2024-12-01 15:25:46 -08:00
Paul Gauthier (aider)
d8a75bef48 fix: update test to count unique AI comments instead of raw lines 2024-12-01 10:30:57 -08:00
Paul Gauthier (aider)
cfc4b79a05 style: fix whitespace in test_watch.py 2024-12-01 10:29:35 -08:00
Paul Gauthier (aider)
fb3e5c9aab test: add minimal coder instance for FileWatcher test 2024-12-01 10:29:32 -08:00
Paul Gauthier (aider)
6796d8f124 style: fix linting issues in test_watch.py 2024-12-01 10:28:32 -08:00
Paul Gauthier (aider)
154cb463e5 refactor: update test to use get_ai_comments method 2024-12-01 10:28:29 -08:00
Paul Gauthier (aider)
e9ce04ffe9 style: Fix linting issues in test_watch.py 2024-12-01 10:04:40 -08:00
Paul Gauthier (aider)
7a3fd11b6b refactor: update test to read AI comments from fixture files 2024-12-01 10:04:37 -08:00
Paul Gauthier (aider)
e885f848a6 fix: remove unused Path import from test_watch.py 2024-12-01 10:03:15 -08:00
Paul Gauthier (aider)
8343f074a2 style: fix trailing whitespace in test file 2024-12-01 10:02:57 -08:00
Paul Gauthier (aider)
cbadfd59db test: add JavaScript fixture and update comment pattern tests 2024-12-01 10:02:53 -08:00
Paul Gauthier (aider)
5d5fed62f2 style: Fix linting issues in test_watch.py 2024-12-01 10:01:59 -08:00
Paul Gauthier (aider)
c3d6484f6c test: add test cases for AI comment pattern matching 2024-12-01 10:01:53 -08:00
Paul Gauthier
315abec49c test: add watch module tests and fixtures 2024-12-01 10:01:52 -08:00
Paul Gauthier
221b382e69 refactor: improve AI comment pattern regex for better matching 2024-12-01 09:58:02 -08:00
Paul Gauthier (aider)
5fdbfef028 style: sort imports alphabetically in watch.py 2024-12-01 09:50:54 -08:00
Paul Gauthier (aider)
2cc671df75 refactor: update regex to only match ai comments at end of line 2024-12-01 09:50:50 -08:00
Paul Gauthier
ddbe2853ea refactor: improve AI comment processing in FileWatcher 2024-12-01 09:50:49 -08:00
Paul Gauthier (aider)
2ab1b4b1c2 style: fix linting issues and add missing newline 2024-12-01 09:43:47 -08:00
Paul Gauthier (aider)
c5adc92f8b chore: remove unnecessary comment from io.py 2024-12-01 09:43:43 -08:00
Paul Gauthier
96b6056411 chore: remove unused comment in io.py 2024-12-01 09:43:42 -08:00
Paul Gauthier (aider)
1108566e99 style: fix linting error by adding newline before error handling 2024-12-01 09:41:17 -08:00
Paul Gauthier (aider)
a54a5ee80d chore: remove comment from error handling block 2024-12-01 09:41:12 -08:00
Paul Gauthier
d57bc3ff01 chore: remove unused comment in io.py 2024-12-01 09:41:11 -08:00
Paul Gauthier (aider)
f02dca2dd8 style: fix linting error by adding newline before error handling 2024-12-01 09:40:25 -08:00
Paul Gauthier (aider)
ad186701d3 feat: add traceback printing for better error handling 2024-12-01 09:40:20 -08:00
Paul Gauthier
a04b9ea053 fix: handle file watcher operations only when it exists 2024-12-01 09:40:19 -08:00
Paul Gauthier
41e6fb961b feat: disable watch-files by default and update help text 2024-12-01 09:35:28 -08:00
Paul Gauthier (aider)
b2b43d2bd3 fix: only initialize FileWatcher when watch_files flag is set 2024-12-01 09:34:40 -08:00
Paul Gauthier
90339f9741 refactor: make FileWatcher initialization conditional on --watch-files flag 2024-12-01 09:34:39 -08:00
Paul Gauthier (aider)
260806053b style: fix linting issues and whitespace in args.py 2024-12-01 09:34:03 -08:00
Paul Gauthier (aider)
93c9bdcec7 feat: add --watch-files switch to control FileWatcher 2024-12-01 09:33:58 -08:00
Paul Gauthier
935832028a feat: add --watch-files switch for FileWatcher control 2024-12-01 09:33:56 -08:00
Paul Gauthier
c08f09b06b Merge branch 'main' into watch 2024-12-01 09:24:49 -08:00
Paul Gauthier
16410cf263 copy 2024-12-01 09:23:13 -08:00
Paul Gauthier
c62dde4c9c set version to 0.66.1.dev 2024-12-01 09:15:58 -08:00
Paul Gauthier
3fef1babcb version bump to 0.66.0 2024-12-01 09:14:21 -08:00
Paul Gauthier
59af7ed3bb refactor: improve file path handling and remove debug code 2024-12-01 08:27:15 -08:00
Paul Gauthier (aider)
ee4206099a chore: remove AI comment from watch.py 2024-12-01 08:26:39 -08:00
Paul Gauthier
8c1d9bffcd style: standardize AI comment format in watch.py 2024-12-01 08:26:38 -08:00
Paul Gauthier
a3a510308c style: fix indentation in comment instructions template 2024-12-01 08:26:21 -08:00
Paul Gauthier (aider)
97e292e251 chore: remove AI comment from FileWatcher class 2024-12-01 08:25:39 -08:00
Paul Gauthier
4c5aa6a326 chore: remove unused comment in FileWatcher class 2024-12-01 08:25:37 -08:00
Paul Gauthier (aider)
d1dd40590f feat: use TreeContext to show AI comments in file context 2024-12-01 08:25:06 -08:00
Paul Gauthier
c4764fa4d8 refactor: Add TODO for TreeContext-based comment rendering 2024-12-01 08:25:04 -08:00
Paul Gauthier (aider)
5dedb39048 chore: remove AI comment from FileWatcher class 2024-12-01 08:24:14 -08:00
Paul Gauthier
bc759a32e3 style: improve comment clarity in FileWatcher class 2024-12-01 08:24:13 -08:00
Paul Gauthier (aider)
dcc0841443 style: remove unused exception variable in FileWatcher 2024-12-01 08:23:51 -08:00
Paul Gauthier (aider)
9b0388d00a chore: remove AI-related comments from code 2024-12-01 08:23:36 -08:00
Paul Gauthier
99a1e42381 refactor: improve AI comment detection and file handling 2024-12-01 08:23:35 -08:00
Paul Gauthier
9b4df54432 refactor: simplify file change handling and interrupt logic 2024-12-01 08:14:18 -08:00
Paul Gauthier (aider)
aac0c0f037 feat: extend AI comment regex to match "ai!" suffix 2024-12-01 08:11:08 -08:00
Paul Gauthier
a8f20196b2 feat: extend AI comment regex to match 'ai!' suffix 2024-12-01 08:11:07 -08:00
Paul Gauthier (aider)
a8bae3fb01 style: format gitignore path loading for better readability 2024-12-01 08:09:16 -08:00
Paul Gauthier (aider)
e8ccc030c0 refactor: simplify file watcher filter function implementation 2024-12-01 08:09:13 -08:00
Paul Gauthier
aa6d9779d3 refactor: simplify gitignore filter function creation 2024-12-01 08:08:54 -08:00
Paul Gauthier (aider)
b1dbf340b8 fix: correct undefined filter_func and remove unnecessary f-string 2024-12-01 08:07:48 -08:00
Paul Gauthier (aider)
27540d16ed refactor: remove ignore_func parameter from FileWatcher.start() 2024-12-01 08:07:21 -08:00
Paul Gauthier
2e63f62215 refactor: remove unused ignore_func parameter from FileWatcher.start method 2024-12-01 08:07:20 -08:00
Paul Gauthier (aider)
633ba293a3 style: remove extra whitespace and newlines 2024-12-01 08:06:24 -08:00
Paul Gauthier (aider)
679c960ea1 refactor: move filter_func creation to FileWatcher.__init__ 2024-12-01 08:06:20 -08:00
Paul Gauthier
cf91101a48 refactor: simplify file watcher and improve AI comment handling 2024-12-01 08:06:18 -08:00
Paul Gauthier (aider)
344d90aea0 style: fix whitespace in FileWatcher class 2024-12-01 07:55:43 -08:00
Paul Gauthier (aider)
8b7fa6f845 refactor: move bang checking logic earlier in file processing flow 2024-12-01 07:55:39 -08:00
Paul Gauthier
2eb7f78248 refactor: Move bang check logic to file change detection 2024-12-01 07:55:38 -08:00
Paul Gauthier (aider)
9a5925b1ad refactor: fix has_bangs initialization and use |= operator 2024-12-01 07:54:44 -08:00
Paul Gauthier
60f2da370f fix: correct comment about AI bang operator logic 2024-12-01 07:54:42 -08:00
Paul Gauthier (aider)
7ee69628a3 refactor: update get_ai_comments to return line nums, comments and bang status 2024-12-01 07:54:11 -08:00
Paul Gauthier
a64f14db51 refactor: modify get_ai_comments to return line nums, comments and has_bang 2024-12-01 07:54:09 -08:00
Paul Gauthier (aider)
1c84fc97a1 refactor: remove try/except block and AI comment from watch.py 2024-12-01 07:52:47 -08:00
Paul Gauthier
8b371ead92 refactor: remove unnecessary try/except block in FileWatcher 2024-12-01 07:50:17 -08:00
Paul Gauthier (aider)
14417f70af style: fix linting issue in list comprehension spacing 2024-12-01 07:49:17 -08:00
Paul Gauthier (aider)
96c6d408fb refactor: simplify get_ai_comments to return only line numbers and bang status 2024-12-01 07:49:14 -08:00
Paul Gauthier
cd922e919e refactor: simplify get_ai_comments to return only line numbers and bang status 2024-12-01 07:49:11 -08:00
Paul Gauthier (aider)
c56f06fbcb style: fix string quote consistency in comment parsing 2024-12-01 07:48:39 -08:00
Paul Gauthier (aider)
21dffa26b9 refactor: rename and enhance get_ai_comments to track line numbers and bang status 2024-12-01 07:48:35 -08:00
Paul Gauthier
a131d5ad35 refactor: simplify AI comment detection and improve comment handling 2024-12-01 07:48:33 -08:00
Paul Gauthier (aider)
b5dbb1d39d refactor: simplify file content check using direct io.read_text and regex search 2024-12-01 07:28:37 -08:00
Paul Gauthier
bd3231d8dd refactor: add comment about using io.read_text for AI marker detection 2024-12-01 07:28:35 -08:00
Paul Gauthier (aider)
4d96de3514 refactor: compile regex pattern as class attribute for better performance 2024-12-01 07:26:23 -08:00
Paul Gauthier
c9df6c11c5 refactor: extract regex pattern into compiled class attribute 2024-12-01 07:26:21 -08:00
Paul Gauthier (aider)
56aaa08224 refactor: use get_ai_comment method instead of direct regex matching 2024-12-01 07:25:51 -08:00
Paul Gauthier
014aeccde6 style: add comment to use self.ai_comments() method 2024-12-01 07:25:50 -08:00
Paul Gauthier (aider)
dcfa993806 feat: implement AI comment refresh and processing in FileWatcher 2024-12-01 07:24:55 -08:00
Paul Gauthier
69688cffd6 refactor: Add placeholder for AI comments refresh in FileWatcher 2024-12-01 07:24:53 -08:00
Paul Gauthier (aider)
769a31b7e3 refactor: remove redundant encoding parameter from FileWatcher 2024-12-01 07:22:40 -08:00
Paul Gauthier (aider)
78c20a8c25 style: fix linting issues in watch.py 2024-12-01 07:22:16 -08:00
Paul Gauthier (aider)
bb1b3fdca1 refactor: replace file operations with io.read_text() 2024-12-01 07:22:12 -08:00
Paul Gauthier
f872b20a97 refactor: improve file watcher change detection and comment handling 2024-12-01 07:22:11 -08:00
Paul Gauthier (aider)
f36239712f refactor: replace global VERBOSE with instance variable in FileWatcher 2024-12-01 06:13:01 -08:00
Paul Gauthier
74108dd680 Merge branch 'main' into watch 2024-12-01 06:09:21 -08:00
Paul Gauthier
16af1751a6 copy 2024-12-01 06:09:11 -08:00
Paul Gauthier
b0e138952e libportaudio2 2024-12-01 06:06:42 -08:00
Paul Gauthier (aider)
1271c037ef ci: add PortAudio system dependency for Ubuntu tests 2024-12-01 06:06:03 -08:00
Paul Gauthier
36b59ba617 copy 2024-12-01 06:04:49 -08:00
Paul Gauthier (aider)
b671db7108 fix: correct sounddevice module mocking in voice tests 2024-11-30 19:15:58 -08:00
Paul Gauthier (aider)
9304b80b69 fix: update sounddevice mocking in voice tests 2024-11-30 19:15:40 -08:00
Paul Gauthier (aider)
03c2964364 style: Format code with black and sort imports 2024-11-30 19:15:20 -08:00
Paul Gauthier (aider)
49c78f2797 test: update voice tests to mock audio dependencies properly 2024-11-30 19:15:16 -08:00
Paul Gauthier
1a8d112055 copy 2024-11-30 18:38:40 -08:00
Paul Gauthier (aider)
7b193d693f docs: clarify Control-Up/Down for message history navigation 2024-11-30 18:23:34 -08:00
Paul Gauthier (aider)
e8fa5c36c2 feat: add ctrl-up/down bindings for history navigation 2024-11-30 18:21:47 -08:00
Paul Gauthier
c9a27ba6ac Merge branch 'main' into watch 2024-11-30 15:48:19 -08:00
Paul Gauthier (aider)
a6e162c37a refactor: remove unused Mock import from test_voice.py 2024-11-30 15:43:18 -08:00
Paul Gauthier (aider)
9c55b7a317 style: Remove extra blank line in test_voice.py 2024-11-30 15:43:13 -08:00
Paul Gauthier (aider)
4ef4e8cd72 test: remove test_record_and_transcribe test case 2024-11-30 15:43:10 -08:00
Paul Gauthier (aider)
e9942737c6 style: remove trailing whitespace in test_voice.py 2024-11-30 15:42:45 -08:00
Paul Gauthier (aider)
5c208dba41 fix: improve voice test mocking to handle async prompt behavior 2024-11-30 15:42:42 -08:00
Paul Gauthier (aider)
ba032ce60e fix: update voice tests to match expected behavior 2024-11-30 15:42:12 -08:00
Paul Gauthier (aider)
2fe0dda8af style: remove unused tempfile import from test_voice.py 2024-11-30 15:41:38 -08:00
Paul Gauthier (aider)
97daff4a10 style: format test_voice.py with black and sort imports 2024-11-30 15:41:19 -08:00
Paul Gauthier (aider)
caeceb58a5 test: add voice input device tests with mocked hardware dependencies 2024-11-30 15:41:15 -08:00
Paul Gauthier
3739d48e52 test: add basic voice tests 2024-11-30 15:41:11 -08:00
Paul Gauthier
858fdb02ec copy 2024-11-30 14:05:51 -08:00
Paul Gauthier (aider)
b0cbb071e6 style: fix line wrapping in update-history.py 2024-11-30 14:01:25 -08:00
Paul Gauthier (aider)
f222739b0d fix: preserve older entries when updating HISTORY.md 2024-11-30 14:01:21 -08:00
Paul Gauthier (aider)
a280f5d5b2 style: remove trailing whitespace in update-history.py 2024-11-30 13:59:57 -08:00
Paul Gauthier (aider)
cef333a01c feat: extract history content up to end of base version section 2024-11-30 13:59:51 -08:00
Paul Gauthier (aider)
24bd016a1a style: Fix whitespace in update-history script 2024-11-30 13:59:09 -08:00
Paul Gauthier (aider)
3c44f824cb refactor: optimize HISTORY.md processing to work with relevant portion only 2024-11-30 13:59:05 -08:00
Paul Gauthier
3ee78ef557 skip ph.shutdown for faster exit 2024-11-30 13:29:39 -08:00
Paul Gauthier
d9b1bcbdcc remove no-op vscode detection 2024-11-30 13:25:13 -08:00
Paul Gauthier
283dd0b1f1 test: refactor read-only file path handling in command tests 2024-11-30 13:18:49 -08:00
Paul Gauthier (aider)
56345ddef9 test: add cross-platform test for relative path handling in drop command 2024-11-30 13:15:19 -08:00
Paul Gauthier (aider)
4631008f8c style: fix whitespace in commands.py 2024-11-30 13:12:37 -08:00
Paul Gauthier (aider)
e2ebde75be fix: improve /drop handling of relative paths with samefile check 2024-11-30 13:12:31 -08:00
Paul Gauthier
91613fcbf7 copy 2024-11-30 13:07:58 -08:00
Paul Gauthier
0b279143cc copy 2024-11-30 13:03:28 -08:00
Paul Gauthier
ade4847c61 feat: add timeout configuration for litellm requests 2024-11-30 13:03:20 -08:00
Paul Gauthier (aider)
a3e7203331 refactor: change timeout argument type from float to int 2024-11-30 13:00:24 -08:00
Paul Gauthier (aider)
bbabd38a48 feat: add timeout option for API calls 2024-11-30 12:59:39 -08:00
Paul Gauthier
eb996c1e42 copy 2024-11-30 12:19:55 -08:00
Paul Gauthier
bf0ad4cda1 test: simplify browser flag test by removing analytics flags 2024-11-30 12:18:18 -08:00
Paul Gauthier (aider)
c32af6536a ci: add fetch-depth: 0 to all checkout actions 2024-11-30 12:16:34 -08:00
Paul Gauthier (aider)
2437f9b051 chore: update actions/checkout to v4 in pages workflow 2024-11-30 12:16:07 -08:00
Paul Gauthier
0b781174bd ci: remove redundant AIDER_ANALYTICS_LOG environment variable 2024-11-30 11:37:33 -08:00
Paul Gauthier
f448d3e2db chore: add pytest-env and remove debug dump from tests 2024-11-30 11:35:40 -08:00
Paul Gauthier (aider)
6b4222ec48 test: add verification for pytest.ini environment variables 2024-11-30 11:32:49 -08:00
Paul Gauthier
3f770cc5c0 test: remove analytics env vars and add debug dump 2024-11-30 11:32:48 -08:00
Paul Gauthier (aider)
14902f5b9a ci: add analytics env vars to GitHub Actions workflows 2024-11-30 11:25:39 -08:00
Paul Gauthier (aider)
efdeb13bf5 test: disable analytics during test execution 2024-11-30 11:24:46 -08:00
Paul Gauthier
62558291b6 test: disable analytics in test environment 2024-11-30 10:59:46 -08:00
Paul Gauthier
edb0120bbf test: add analytics flags to browser test 2024-11-30 10:58:06 -08:00
Paul Gauthier
0dbaec553f refactor: Improve version handling and cleanup version-related files 2024-11-30 10:10:03 -08:00
Paul Gauthier
295040c94c feat: add exit event tracking for Control-C and /exit commands 2024-11-30 09:53:44 -08:00
Paul Gauthier
c1c4193b1d feat: add event tracking for message sending lifecycle 2024-11-30 09:49:07 -08:00
Paul Gauthier
d17f0a9e1f copy 2024-11-30 09:45:17 -08:00
Paul Gauthier
871030dadb fix: normalize path in cmd_drop test for cross-platform compatibility 2024-11-30 09:36:21 -08:00
Paul Gauthier
0ee9b74c0f Merge branch 'main' of github.com:Aider-AI/aider 2024-11-30 09:33:06 -08:00
paul-gauthier
82929f650c Merge pull request #2497 from preynal/main
feat: ability to select audio input device
2024-11-30 09:33:00 -08:00
Paul Gauthier
37b31c46bd copy 2024-11-30 09:19:22 -08:00
Paul Gauthier
c682bd858a copy 2024-11-30 09:19:01 -08:00
Paul Gauthier
2439891ee0 better handle __version__ errors 2024-11-30 09:18:17 -08:00
Philippe de Reynal
23825cafe7 fix options diff + missing docs 2024-11-30 11:33:10 +01:00
Philippe de Reynal
a8f6f1fce2 Merge branch 'Aider-AI:main' into main 2024-11-30 11:24:58 +01:00
Philippe de Reynal
e11faadf39 feat: ability to select audio input device 2024-11-30 11:24:34 +01:00
Paul Gauthier
2c7251f4b9 copy 2024-11-29 09:23:57 -08:00
Paul Gauthier
fb9f18fc9c copy 2024-11-29 09:23:14 -08:00
Paul Gauthier (aider)
93cd3d0d8b feat: add git diff output to history update script 2024-11-29 09:23:01 -08:00
Paul Gauthier
ed2479ea82 refactor: consolidate analytics exit events in main function 2024-11-29 09:20:52 -08:00
Paul Gauthier (aider)
accde0bfd0 feat: add analytics events before each return statement in main() 2024-11-29 09:17:16 -08:00
Paul Gauthier
7b34d9e4f4 copy 2024-11-28 15:53:00 -08:00
Paul Gauthier (aider)
6af71951af style: fix whitespace in benchmark.py 2024-11-28 14:01:50 -08:00
Paul Gauthier (aider)
3eed45dc3e fix: improve benchmark directory selection based on latest .md file timestamp 2024-11-28 14:01:45 -08:00
Paul Gauthier (aider)
320b059bc7 perf: optimize benchmark dir search by filtering on timestamp first 2024-11-28 14:00:12 -08:00
Paul Gauthier
a89ce06377 fix: correct glob pattern for finding latest benchmark directory 2024-11-28 14:00:10 -08:00
Paul Gauthier
e4a1d6fe89 copy 2024-11-28 11:21:37 -08:00
Paul Gauthier
93c625bb81 Merge branch 'main' of github.com:Aider-AI/aider 2024-11-28 11:19:19 -08:00
Paul Gauthier
87f84fb82d copy 2024-11-28 11:18:30 -08:00
paul-gauthier
ce9e76a7dc Merge pull request #2489 from itlackey/benchmark/20241127
Benchmark/20241127
2024-11-28 11:01:54 -08:00
Paul Gauthier
4f3f1c5e23 better 2024-11-28 10:51:53 -08:00
itlackey
22076d401f Added ollama/granite3-dense:8b 2024-11-28 10:49:51 -06:00
itlackey
79ea82f147 Updated ollama/qwen2.5-coder:32b, added ollama/tulu3 2024-11-28 10:49:50 -06:00
Paul Gauthier
3785415632 copy 2024-11-27 17:49:35 -08:00
Paul Gauthier
35eda73ad1 Merge branch 'main' of github.com:Aider-AI/aider 2024-11-27 17:49:22 -08:00
Paul Gauthier (aider)
c8282fc8d3 style: fix whitespace in test_commands.py 2024-11-27 17:39:00 -08:00
Paul Gauthier (aider)
5030881934 test: add tests for /drop command with and without glob patterns 2024-11-27 17:38:54 -08:00
Paul Gauthier (aider)
bc1e3a7059 style: format list comprehension to single line 2024-11-27 17:35:11 -08:00
Paul Gauthier (aider)
ba17dceb4d feat: make /drop use substring matching for non-glob patterns 2024-11-27 17:35:05 -08:00
Paul Gauthier (aider)
4e689e20e9 style: add noqa comment to silence flake8 warning for FileWatcher import 2024-11-27 17:32:22 -08:00
Paul Gauthier
2f78b6f7f3 refactor: move FileWatcher initialization to main.py 2024-11-27 17:32:12 -08:00
Paul Gauthier (aider)
920917a47e feat: add .aider* to default gitignore patterns 2024-11-27 17:28:39 -08:00
Paul Gauthier
c1a7784781 fix: update file watcher to use absolute paths for changed files 2024-11-27 17:28:37 -08:00
paul-gauthier
62109f4ab1 Merge pull request #2480 from itlackey/benchmark/ollama-qwen2.5-14b 2024-11-27 16:51:50 -08:00
Paul Gauthier (aider)
c3a9c05455 fix: convert absolute paths to relative paths in file watcher 2024-11-27 16:31:48 -08:00
Paul Gauthier
333e4aa362 fix: update comment about relative filenames in FileWatcher 2024-11-27 16:31:41 -08:00
Paul Gauthier (aider)
59ce26f28a feat: update coder tracked files when AI comments detected 2024-11-27 16:31:19 -08:00
Paul Gauthier
2ff63aaebf refactor: simplify file change handling in FileWatcher 2024-11-27 16:31:18 -08:00
Paul Gauthier (aider)
8cf72a4409 refactor: simplify directory handling in FileWatcher class 2024-11-27 16:29:26 -08:00
Paul Gauthier
496b92536f feat: add input interruption on file changes in FileWatcher 2024-11-27 16:29:24 -08:00
Paul Gauthier (aider)
ac7900ecd7 style: sort imports alphabetically in main.py 2024-11-27 16:23:01 -08:00
Paul Gauthier (aider)
310832f111 feat: add FileWatcher import to fix undefined name error 2024-11-27 16:22:57 -08:00
Paul Gauthier
f69dd0ef8d fix: correct aiderignore path handling for file watching 2024-11-27 16:22:55 -08:00
Paul Gauthier (aider)
4b51bb2334 feat: add aiderignore support to FileWatcher initialization 2024-11-27 16:22:08 -08:00
Paul Gauthier
0d4f9f00ee refactor: Improve FileWatcher initialization with gitignore handling 2024-11-27 16:22:07 -08:00
Paul Gauthier (aider)
4a0100271f refactor: conditionally use git root and gitignore in FileWatcher initialization 2024-11-27 16:19:55 -08:00
Paul Gauthier
52a467806a feat: add gitignore support to FileWatcher initialization 2024-11-27 16:19:53 -08:00
Paul Gauthier (aider)
0fedecff58 refactor: move gitignores from FileWatcher.start() to constructor 2024-11-27 16:16:02 -08:00
Paul Gauthier
da4cb0aa62 refactor: move gitignore handling from start() to FileWatcher constructor 2024-11-27 16:16:00 -08:00
Paul Gauthier
3b8a771909 refactor: Move FileWatcher initialization to __init__ method 2024-11-27 16:15:08 -08:00
Paul Gauthier (aider)
f9bcfa14e0 refactor: update file watcher to use class-based implementation 2024-11-27 16:13:42 -08:00
Paul Gauthier (aider)
11c2eab967 style: fix code formatting and whitespace 2024-11-27 16:13:07 -08:00
Paul Gauthier (aider)
094d2e12a4 refactor: create FileWatcher class to encapsulate file watching logic 2024-11-27 16:13:00 -08:00
Paul Gauthier
af195a610c refactor: consolidate file watching code into dedicated class 2024-11-27 16:12:59 -08:00
Paul Gauthier
f7a05cf077 Merge branch 'main' into watch 2024-11-27 15:55:01 -08:00
Paul Gauthier
d54fbd6592 copy 2024-11-27 15:23:13 -08:00
Paul Gauthier
41b0868165 Merge branch 'main' into watch 2024-11-27 15:04:26 -08:00
Paul Gauthier
a1f5bfb746 copy 2024-11-27 09:36:17 -08:00
Paul Gauthier
3ab1018c66 copy 2024-11-27 09:29:35 -08:00
Paul Gauthier
62e96372fa bumped deps to pickup grep-ast 0.4.1 and disable Dart 2024-11-27 09:29:22 -08:00
Paul Gauthier
945d10f554 add event for repo size 2024-11-27 09:27:23 -08:00
Paul Gauthier
f44e5ae5f9 cleanup 2024-11-27 07:46:47 -08:00
Paul Gauthier
a67b665846 copy 2024-11-27 07:37:33 -08:00
Paul Gauthier
8fb23b414c rename 2024-11-27 07:18:21 -08:00
Paul Gauthier (aider)
f5100626a8 refactor: update language file extensions and paths in test code 2024-11-27 07:18:04 -08:00
Paul Gauthier (aider)
9ab46fade7 style: fix linting issues in test_repomap.py 2024-11-27 07:11:49 -08:00
Paul Gauthier (aider)
2ce01b157b refactor: simplify language test map and read from fixture files 2024-11-27 07:11:45 -08:00
itlackey
f714e42e11 Added qwen2.5-coder:14b running via ollama 2024-11-27 09:11:33 -06:00
Paul Gauthier (aider)
447b7af573 refactor: use fixture file for Java test instead of embedded code 2024-11-27 07:10:38 -08:00
Paul Gauthier (aider)
ec2b635a1a refactor: use fixture files for C, C++, and Elixir test content 2024-11-27 07:09:28 -08:00
Paul Gauthier (aider)
7465b4bf91 refactor: move TypeScript and TSX test code to fixture files 2024-11-27 07:06:50 -08:00
Paul Gauthier (aider)
4580fac6fa refactor: move test code samples to fixture files 2024-11-27 07:05:36 -08:00
Paul Gauthier (aider)
8c218e9edc refactor: move remaining language examples to fixture files 2024-11-27 07:05:10 -08:00
Paul Gauthier (aider)
44ceb8f1a0 style: Fix import order and add proper line spacing 2024-11-27 07:04:29 -08:00
Paul Gauthier (aider)
642c1c50fb refactor: move remaining test examples to fixture files 2024-11-27 07:04:23 -08:00
Paul Gauthier (aider)
4de8c25a3f refactor: move language examples to fixture files 2024-11-27 07:03:20 -08:00
Paul Gauthier
565f08a8e9 refactor: clean up test cases and remove redundant language examples 2024-11-27 07:03:18 -08:00
Paul Gauthier (aider)
a85ae206c9 refactor: add initial language test fixtures for C, C++, Elixir and Java 2024-11-27 06:59:58 -08:00
Paul Gauthier (aider)
9e9b5e8d46 feat: enhance language test snippets with comprehensive examples 2024-11-27 06:58:15 -08:00
Paul Gauthier
b623141a8f refactor: reorder test language cases in repomap tests 2024-11-27 06:58:13 -08:00
Paul Gauthier (aider)
631cdc37c4 test: enhance C# test case with more language features and symbols 2024-11-27 06:56:16 -08:00
Paul Gauthier
8d50bc0ef1 fix: correct key symbol in TypeScript test from UserGreeting to UserProps 2024-11-27 06:56:15 -08:00
Paul Gauthier (aider)
ae395fbb8f test: enhance TSX test fixture with more symbols and hooks 2024-11-27 06:54:37 -08:00
Paul Gauthier (aider)
10877a99f1 test: enhance Rust test snippet with trait and struct examples 2024-11-27 06:53:41 -08:00
Paul Gauthier (aider)
0faff91c72 test: enhance Python test case with class and type annotations 2024-11-27 06:52:31 -08:00
Paul Gauthier (aider)
00f79fecd0 test: enhance OCaml test case with module and type definitions 2024-11-27 06:51:53 -08:00
Paul Gauthier (aider)
203128d935 test: enhance Java test case with interface and implementation 2024-11-27 06:51:22 -08:00
Paul Gauthier
4f6e52aed0 test: add assertion for minimum result length in repomap test 2024-11-27 06:51:20 -08:00
Paul Gauthier (aider)
7bc7b2e3da style: Fix line length violations in test_repomap.py 2024-11-27 06:48:17 -08:00
Paul Gauthier (aider)
27f0ca3b08 feat: enhance JavaScript test snippet with class and module exports 2024-11-27 06:48:12 -08:00
Paul Gauthier
2337b2bb3e test: refactor repo map language test to run each language separately 2024-11-27 06:48:10 -08:00
Paul Gauthier (aider)
48ea13e130 style: format code with black and add trailing commas 2024-11-27 06:23:25 -08:00
Paul Gauthier (aider)
5c73ab26c0 test: add key symbol checks for each language parser 2024-11-27 06:23:21 -08:00
Paul Gauthier
947e4ce71d copy 2024-11-26 20:43:09 -08:00
Paul Gauthier (aider)
200295e3ee fix: add error handling for input history file permissions 2024-11-26 20:41:59 -08:00
Paul Gauthier (aider)
ded5fe5ec0 style: remove trailing whitespace in analytics.py 2024-11-26 20:37:34 -08:00
Paul Gauthier (aider)
7dffa943fa fix: handle analytics file access errors gracefully 2024-11-26 20:37:29 -08:00
Paul Gauthier
f702f67e27 copy 2024-11-26 20:28:48 -08:00
Paul Gauthier
a64956406d fix: improve PDF support detection and update model suggestions 2024-11-26 20:26:44 -08:00
Paul Gauthier
9c8bde2cff copy 2024-11-26 20:13:33 -08:00
Paul Gauthier
70a282ebf1 copy 2024-11-26 20:11:12 -08:00
Paul Gauthier (aider)
415652d38e style: reorder subprocess args to keep cwd consistent 2024-11-26 19:55:07 -08:00
Paul Gauthier (aider)
1a745e4fa9 fix: set cwd to repo root for shell commands in cmd_run 2024-11-26 19:53:09 -08:00
Paul Gauthier (aider)
973e86df27 fix: use cwd=root when executing shell commands 2024-11-26 19:52:46 -08:00
Paul Gauthier (aider)
1f2917681f feat: add cwd parameter to run_cmd for directory control 2024-11-26 19:52:06 -08:00
Paul Gauthier (aider)
28d1feacf5 refactor: simplify image file processing to use provided filenames directly 2024-11-26 19:49:53 -08:00
Paul Gauthier (aider)
cf4ef8605d style: remove trailing whitespace in base_coder.py 2024-11-26 19:48:48 -08:00
Paul Gauthier (aider)
4be3728273 feat: add image file support for read-only files 2024-11-26 19:48:42 -08:00
Paul Gauthier (aider)
34b8c3f47c fix: add dummy message to prevent empty cur_messages in test 2024-11-26 19:46:51 -08:00
Paul Gauthier (aider)
309893fd1e test: verify image file presence in LLM messages for read-only command 2024-11-26 19:45:01 -08:00
Paul Gauthier
705eb06e8d copy 2024-11-26 17:28:15 -08:00
Paul Gauthier
5cfcf255e9 fix: override PDF support detection for Claude 3.5 Sonnet 2024-11-26 17:27:05 -08:00
Paul Gauthier
b8f36c8277 feat: add PDF file support and refactor image handling 2024-11-26 17:19:28 -08:00
Paul Gauthier (aider)
73c1dc697f style: remove trailing whitespace in base_coder.py 2024-11-26 17:16:50 -08:00
Paul Gauthier (aider)
a9c4647461 feat: add support for both images and PDFs based on model capabilities 2024-11-26 17:16:43 -08:00
Paul Gauthier
aaeaa24153 feat: add PDF support and improve image handling in chat messages 2024-11-26 17:16:41 -08:00
Paul Gauthier
59a7494770 Merge branch 'main' into watch 2024-11-26 16:03:06 -08:00
Paul Gauthier
b2232cda7b refactor: modify check_for_urls to return modified input string 2024-11-26 15:04:19 -08:00
Paul Gauthier (aider)
3ba4aca268 refactor: improve error handling for .gitignore file operations 2024-11-26 15:01:50 -08:00
Paul Gauthier (aider)
f45533e20b style: fix line length and whitespace in gitignore handling 2024-11-26 15:00:38 -08:00
Paul Gauthier (aider)
2e7c5d6cfa fix: handle permission error when writing to .gitignore 2024-11-26 15:00:33 -08:00
Paul Gauthier
476acc7715 copy 2024-11-26 14:23:18 -08:00
Paul Gauthier
ab3b50296c copy 2024-11-26 14:12:16 -08:00
Paul Gauthier
60c29b2839 copy 2024-11-26 13:36:48 -08:00
Paul Gauthier
7972f5f4bc copy 2024-11-26 12:37:58 -08:00
Paul Gauthier
83a6865eb3 set version to 0.65.2.dev 2024-11-26 12:37:24 -08:00
Paul Gauthier
29a9b650ed version bump to 0.65.1 2024-11-26 12:35:54 -08:00
Paul Gauthier
dd48b740f9 test: update Claude model name tests to use 3.5 version 2024-11-26 12:33:58 -08:00
Paul Gauthier
401ce7a63d copy 2024-11-26 12:32:08 -08:00
Paul Gauthier
8218d085f7 fix: update Claude 3 model aliases to 3.5 versions 2024-11-26 12:31:54 -08:00
Paul Gauthier
abb3c936f7 refactor: simplify input interruption using placeholder variable 2024-11-26 10:58:22 -08:00
Paul Gauthier
0cb5aca81e Merge branch 'main' into watch 2024-11-26 10:47:38 -08:00
Paul Gauthier (aider)
554d274fff style: fix string quote consistency in blame.py 2024-11-26 10:47:04 -08:00
Paul Gauthier (aider)
13318219db feat: add YAML update capability to blame.py for --all-since 2024-11-26 10:46:55 -08:00
Paul Gauthier (aider)
474944fe74 style: fix string quote consistency in blame.py 2024-11-26 10:45:12 -08:00
Paul Gauthier (aider)
d1a49cd9ce feat: add YAML update capability to blame.py for --all-since 2024-11-26 10:45:08 -08:00
Paul Gauthier
139d89d817 Merge branch 'main' into watch 2024-11-26 10:30:25 -08:00
Paul Gauthier
61759f984c copy 2024-11-26 09:16:46 -08:00
Paul Gauthier
a73e77a819 set version to 0.65.1.dev 2024-11-26 08:57:36 -08:00
Paul Gauthier
b5f1659382 version bump to 0.65.0 2024-11-26 08:55:57 -08:00
Paul Gauthier
beb6722f57 copy 2024-11-26 08:04:17 -08:00
Paul Gauthier
a052b89152 copy 2024-11-26 07:42:16 -08:00
Paul Gauthier
95b391350f bumped deps 2024-11-26 07:41:31 -08:00
Paul Gauthier
5773eac03f copy 2024-11-26 07:37:56 -08:00
Paul Gauthier (aider)
da4ace2875 style: Fix string quote consistency in update-history.py 2024-11-26 07:31:36 -08:00
Paul Gauthier (aider)
e507c5b502 feat: add aider contribution percentage to history updates 2024-11-26 07:31:32 -08:00
Paul Gauthier (aider)
722c2c2668 style: fix linting errors in test_repomap.py 2024-11-26 07:28:02 -08:00
Paul Gauthier (aider)
8e7bfef9f1 test: add Dart language support to repo map tests 2024-11-26 07:27:57 -08:00
Paul Gauthier
1811f0d0d5 Merge branch 'main' of github.com:Aider-AI/aider 2024-11-26 07:27:32 -08:00
paul-gauthier
6b9d534fe2 Merge pull request #2236 from malkoG/support-dart
Add dart support
2024-11-26 07:26:43 -08:00
Paul Gauthier (aider)
dc4562a845 feat: add docs update step after aider in update-history script 2024-11-26 07:10:32 -08:00
Paul Gauthier
c15af63bc9 copy 2024-11-26 07:10:03 -08:00
Paul Gauthier
5b68c2c7d9 fix test 2024-11-26 07:09:49 -08:00
Paul Gauthier (aider)
b70e0bd1f6 test: update invalid edit format test to check return code instead of SystemExit 2024-11-26 07:07:11 -08:00
Paul Gauthier (aider)
743f0f5540 test: add test for invalid edit format handling 2024-11-26 07:06:28 -08:00
Paul Gauthier (aider)
e647a5b733 feat: add tests for UnknownEditFormat exception handling 2024-11-26 07:04:43 -08:00
Paul Gauthier (aider)
df1d259e42 style: Fix linting issues in test_coder.py 2024-11-26 07:04:21 -08:00
Paul Gauthier (aider)
e3efab7fbf test: add UnknownEditFormat exception tests 2024-11-26 07:04:15 -08:00
Paul Gauthier (aider)
cd79f7f4b0 fix: import UnknownEditFormat exception from base_coder module 2024-11-26 07:03:26 -08:00
Paul Gauthier (aider)
5d175745bf fix: handle None values in valid_formats list generation 2024-11-26 07:02:34 -08:00
Paul Gauthier (aider)
e648bac74b fix: remove circular import of UnknownEditFormat in base_coder.py 2024-11-26 07:01:55 -08:00
Paul Gauthier (aider)
e5c0ebd0a0 style: fix import order in base_coder.py 2024-11-26 07:01:21 -08:00
Paul Gauthier (aider)
608a43402c refactor: move UnknownEditFormat exception to base_coder.py 2024-11-26 07:01:14 -08:00
Paul Gauthier (aider)
75bc2dd564 feat: add custom UnknownEditFormat exception with documentation link 2024-11-26 07:00:16 -08:00
Paul Gauthier
bbd81c3cf7 copy 2024-11-26 06:56:36 -08:00
Paul Gauthier
301eb7c74d copy 2024-11-26 06:50:18 -08:00
Paul Gauthier
a756039f27 copy 2024-11-26 06:49:28 -08:00
Paul Gauthier (aider)
b4d1b71ee7 test: add test for skipping duplicate basename file mentions 2024-11-26 06:46:53 -08:00
Paul Gauthier (aider)
8d85a4754d style: fix line wrapping in base_coder.py 2024-11-26 06:46:08 -08:00
Paul Gauthier (aider)
a1b48049a9 feat: skip files with duplicate basenames in file mentions 2024-11-26 06:46:01 -08:00
Paul Gauthier
6789844c1f copy 2024-11-26 06:42:42 -08:00
Paul Gauthier
c602a839ca better update history script 2024-11-26 06:42:36 -08:00
Paul Gauthier
01c7793e90 revert changes to get_ident_filename_matches() 2024-11-26 06:41:08 -08:00
Paul Gauthier (aider)
47b013b034 docs: update changelog with recent improvements and features 2024-11-26 06:38:59 -08:00
Paul Gauthier
dc2047804a docs: update changelog with URL detection and model alias features 2024-11-26 06:38:57 -08:00
Paul Gauthier (aider)
885e5cbd7c style: fix whitespace in base_coder.py 2024-11-26 06:33:37 -08:00
Paul Gauthier (aider)
635a5196e8 fix: exclude files with same name as existing chat or read-only files 2024-11-26 06:33:29 -08:00
Paul Gauthier
cbd339190b refactor: simplify file name matching logic in get_all_relative_files 2024-11-26 06:33:28 -08:00
Paul Gauthier (aider)
266093189d style: fix linting issues in get_ident_filename_matches 2024-11-26 06:26:26 -08:00
Paul Gauthier (aider)
62b02d4370 fix: remove incorrect file name filtering in get_ident_filename_matches 2024-11-26 06:25:15 -08:00
Paul Gauthier (aider)
8546a1dc86 docs: add main branch changes to release history 2024-11-26 06:25:00 -08:00
Paul Gauthier
ae98bf237f docs: remove unreleased changes from history file 2024-11-26 06:24:59 -08:00
Paul Gauthier (aider)
0398deb005 test: add tests for filename matching with existing and read-only files 2024-11-26 06:24:11 -08:00
Paul Gauthier (aider)
3a1492977b fix: skip suggesting files with same name as existing chat files 2024-11-26 06:22:57 -08:00
Paul Gauthier (aider)
ef40a456e8 docs: add main branch section with latest changes to history 2024-11-26 06:20:04 -08:00
Paul Gauthier
583b78c0c1 docs: update release history to remove unreleased changes 2024-11-26 06:20:03 -08:00
Paul Gauthier (aider)
c0988de581 docs: update release history with v0.64.1 and v0.64.2 changes 2024-11-26 06:17:06 -08:00
Paul Gauthier
34a190e29b docs: remove v0.64.2 release notes 2024-11-26 06:17:04 -08:00
Paul Gauthier (aider)
0940598708 docs: add v0.64.2 release notes to history 2024-11-26 06:12:13 -08:00
Paul Gauthier (aider)
7e6cbb3efa style: format update-history.py with black 2024-11-26 06:10:07 -08:00
Paul Gauthier (aider)
7dc4e00c75 feat: dynamically determine base version for history updates 2024-11-26 06:10:03 -08:00
Paul Gauthier (aider)
8a598eacaf style: format update-history.py with black 2024-11-26 06:09:44 -08:00
Paul Gauthier (aider)
8592fad9cd feat: add script to automate history updates from git diffs 2024-11-26 06:09:41 -08:00
Paul Gauthier
fa72a89d35 feat: add script to update history file 2024-11-26 06:09:38 -08:00
Paul Gauthier
5e99c51d93 copy 2024-11-26 06:01:46 -08:00
Paul Gauthier (aider)
905976e765 feat: add verbose and trace flags for Jekyll debugging 2024-11-26 05:59:52 -08:00
Paul Gauthier
3ebd47d3db copy 2024-11-25 21:12:01 -08:00
Paul Gauthier
bf4c7c475a copy 2024-11-25 21:08:27 -08:00
Paul Gauthier (aider)
bf38371971 test: add test cases for model name aliases 2024-11-25 21:06:29 -08:00
Paul Gauthier
18460f4f91 copy 2024-11-25 21:05:59 -08:00
Paul Gauthier (aider)
f94e3e6aba feat: add cog script to auto-generate model aliases docs 2024-11-25 21:03:35 -08:00
Paul Gauthier
1647da2942 docs: add frontmatter to model aliases documentation 2024-11-25 21:03:34 -08:00
Paul Gauthier (aider)
86e2cdb1fb docs: add documentation for model aliases configuration 2024-11-25 21:01:11 -08:00
Paul Gauthier
764702a377 docs: add model aliases configuration documentation 2024-11-25 21:01:10 -08:00
Paul Gauthier (aider)
837a97ffdf style: fix string quote consistency in alias split 2024-11-25 20:56:10 -08:00
Paul Gauthier (aider)
217e9b96d8 feat: add command-line model alias support via --alias flag 2024-11-25 20:56:04 -08:00
Paul Gauthier (aider)
524274fcf4 refactor: consolidate model aliases into central dictionary 2024-11-25 20:54:24 -08:00
Paul Gauthier
6d5f576b92 refactor: simplify model aliases to only include Claude-3 variants 2024-11-25 20:54:23 -08:00
Paul Gauthier (aider)
445f9fa7df feat: add model name aliases with canonical mapping 2024-11-25 20:51:37 -08:00
Paul Gauthier (aider)
2ff3a23606 fix: add num_ctx parameter to run_test_real function 2024-11-25 19:21:08 -08:00
Paul Gauthier (aider)
c5ce57ea7f style: fix linting issues in benchmark.py 2024-11-25 19:20:49 -08:00
Paul Gauthier (aider)
351b8e50f0 feat: add --num-ctx flag to override model context window size 2024-11-25 19:20:43 -08:00
Paul Gauthier
68be6c5742 copy 2024-11-25 19:11:18 -08:00
Paul Gauthier
7a34a2dfa9 ask 2.5% of users to opt-in to analytics 2024-11-25 19:09:59 -08:00
Paul Gauthier
49ce9e1209 copy 2024-11-25 18:42:28 -08:00
Paul Gauthier (aider)
c84e192324 style: remove extra blank line in test_coder.py 2024-11-25 18:42:09 -08:00
Paul Gauthier (aider)
d696673f07 test: remove shell command testing from URL detection test 2024-11-25 18:42:03 -08:00
Paul Gauthier (aider)
2957d463c9 test: add assertion for suggest_shell_commands flag 2024-11-25 18:41:21 -08:00
Paul Gauthier (aider)
af48e50898 test: add tests for URL detection functionality in Coder class 2024-11-25 18:39:49 -08:00
Paul Gauthier (aider)
f4b964a4b8 test: add tests for --[no-]detect-urls CLI option 2024-11-25 18:39:10 -08:00
Paul Gauthier
a79ce7a151 fix: remove duplicate detect_urls parameter and add to coder initialization 2024-11-25 18:38:34 -08:00
Paul Gauthier (aider)
21bb83c55a fix: remove duplicate detect_urls parameter in Coder class 2024-11-25 18:36:25 -08:00
Paul Gauthier (aider)
7122ceb16c feat: add --detect-urls flag to control URL detection behavior 2024-11-25 18:34:05 -08:00
Paul Gauthier
f9bcfe341c ignore .gitattributes 2024-11-25 15:09:46 -08:00
Paul Gauthier
13c5bfdd88 copy 2024-11-25 09:05:52 -08:00
Paul Gauthier
bf79c2cb99 copy 2024-11-25 08:28:42 -08:00
Paul Gauthier
325cdfcf57 refactor: Update Ollama model detection and context window documentation 2024-11-24 16:14:34 -08:00
Paul Gauthier
7d14d4ade9 copy 2024-11-24 15:23:47 -08:00
Paul Gauthier
1b7d12194e copy 2024-11-24 15:23:42 -08:00
Paul Gauthier (aider)
91f238aded style: Organize imports and remove unused import 2024-11-24 15:20:47 -08:00
Paul Gauthier (aider)
78ff489995 feat: Add ModelSettings import to main.py 2024-11-24 15:20:43 -08:00
Paul Gauthier (aider)
ff791439e2 fix: Import fields and ModelSettings to resolve flake8 errors 2024-11-24 15:20:35 -08:00
Paul Gauthier
3f8b2d6b99 refactor: Improve model info output with detailed settings display 2024-11-24 15:20:24 -08:00
Paul Gauthier
4dcbce58ed copy 2024-11-24 14:55:02 -08:00
Paul Gauthier
0427deb897 copy 2024-11-24 14:54:19 -08:00
Paul Gauthier
f3eb3409e3 copy 2024-11-24 14:54:12 -08:00
Paul Gauthier
86619052ca copy 2024-11-24 14:52:01 -08:00
Paul Gauthier
0c59d3234e copy 2024-11-24 12:03:21 -08:00
Paul Gauthier
939d7ea3fb copy 2024-11-24 12:02:48 -08:00
Paul Gauthier
dc8761763d copy 2024-11-24 07:56:12 -08:00
Paul Gauthier
4894914db1 copy 2024-11-24 07:50:19 -08:00
Paul Gauthier
aee94a0584 copy 2024-11-24 07:14:09 -08:00
Paul Gauthier (aider)
c550422168 feat: Add x-axis label "Provider: quantization" to chart 2024-11-24 07:13:14 -08:00
Paul Gauthier (aider)
cebd9cabb3 feat: Add real-time filtering to chart based on search input 2024-11-24 07:12:39 -08:00
Paul Gauthier (aider)
3f16652d56 feat: Escape colons in model names with quotes in YAML file 2024-11-24 07:06:41 -08:00
Paul Gauthier
2ebf48ca71 feat: Update quant.yml with refined model descriptions and new test results 2024-11-24 07:06:39 -08:00
Paul Gauthier
c2f184f5bb copy 2024-11-24 06:21:58 -08:00
Paul Gauthier
e56651e5c0 copy 2024-11-23 20:27:43 -08:00
Paul Gauthier
1d09e96127 copy 2024-11-23 20:19:11 -08:00
Paul Gauthier
73de0ea8be copy 2024-11-23 20:18:19 -08:00
Paul Gauthier
757eac0579 copy 2024-11-23 18:39:20 -08:00
Paul Gauthier
bb78e2f57f default Ollama num_ctx to 8k 2024-11-23 18:14:30 -08:00
Paul Gauthier
92579243c5 copy 2024-11-23 18:13:58 -08:00
Paul Gauthier (aider)
8d0ba40d67 feat: Sort chart data by pass rate in descending order 2024-11-23 17:48:34 -08:00
Paul Gauthier
ff8c1aace9 copy 2024-11-23 15:32:09 -08:00
Paul Gauthier
cf74dc9b48 copy 2024-11-23 15:30:28 -08:00
Paul Gauthier (aider)
e63df83091 refactor: Consolidate subprocess.call mock in test_pipe_editor 2024-11-23 14:23:26 -08:00
Paul Gauthier
14522dbbcd copy 2024-11-23 14:20:58 -08:00
Paul Gauthier
91daea9e01 simplify if 2024-11-23 14:15:36 -08:00
Paul Gauthier (aider)
12b789fc4e fix: Handle Mixpanel connection errors by disabling tracking 2024-11-23 14:14:11 -08:00
Paul Gauthier
baa13351a6 refactor: Improve model registration and settings handling 2024-11-23 12:57:24 -08:00
Paul Gauthier
8f83204f0f Merge branch 'main' of github.com:Aider-AI/aider 2024-11-23 12:37:26 -08:00
paul-gauthier
80f5b60e1d Merge pull request #2440 from ivanfioravanti/main
MLX 4bit and 8bit diff added
2024-11-23 12:36:18 -08:00
Paul Gauthier
54525f6696 Merge branch 'main' of github.com:Aider-AI/aider 2024-11-23 12:35:36 -08:00
Ivan Fioravanti
3dc50216b5 Merge branch 'Aider-AI:main' into main 2024-11-23 19:52:23 +01:00
ivanfioravanti
324430a696 quant.yml mlx-community/Qwen2.5-Coder-32B-Instruct-8bit added 2024-11-23 19:51:48 +01:00
paul-gauthier
65d7957610 Update modes.md 2024-11-23 09:36:43 -08:00
paul-gauthier
6ac4993cf2 Update modes.md 2024-11-23 09:36:26 -08:00
ivanfioravanti
100744a952 Article updated to reflect change in mlx test 2024-11-23 17:34:01 +01:00
ivanfioravanti
3a331e55dc mlx 4bit diff 2024-11-23 17:32:08 +01:00
Paul Gauthier
a57f81ba5f copy 2024-11-23 07:02:58 -08:00
Paul Gauthier
ca0b55fbbf copy 2024-11-23 06:53:54 -08:00
Paul Gauthier
38a3cf98dd gemini 2024-11-22 19:45:52 -08:00
Paul Gauthier
1234ad92e5 gemini-exp-1114 2024-11-22 19:43:26 -08:00
Paul Gauthier
488edc24ce gemini-exp-1121 2024-11-22 19:42:11 -08:00
Paul Gauthier
307c23631a copy 2024-11-22 17:20:38 -08:00
Paul Gauthier
83d2241883 copy 2024-11-22 16:40:47 -08:00
Paul Gauthier
f9126416e8 copy 2024-11-22 16:38:02 -08:00
Paul Gauthier
4e9ae16cb3 copy 2024-11-22 15:42:10 -08:00
Paul Gauthier
ef8bfdffa7 Merge branch 'main' of github.com:Aider-AI/aider 2024-11-22 15:41:27 -08:00
paul-gauthier
bfb090331f Merge pull request #2432 from ivanfioravanti/main 2024-11-22 15:40:42 -08:00
Paul Gauthier
5506d0f25b fixed xai docs 2024-11-22 14:21:00 -08:00
Ivan Fioravanti
6ebd2d0883 mlx Qwen2.5-Coder-32B-Instruct-4bit added to quant blog
mlx Qwen2.5-Coder-32B-Instruct-4bit added to quant blog
2024-11-22 22:24:13 +01:00
Paul Gauthier
a16dcaba4e copy 2024-11-22 11:38:14 -08:00
Paul Gauthier
f06452c6c5 copy 2024-11-22 10:56:33 -08:00
Paul Gauthier (aider)
6a0a97cb41 feat: Add host.docker.internal gateway to enable Ollama server access from container 2024-11-22 10:07:47 -08:00
Paul Gauthier
711102b438 copy 2024-11-22 09:39:23 -08:00
Paul Gauthier (aider)
6d53eb0aaa style: Increase canvas height for taller graph aspect ratio 2024-11-22 07:40:46 -08:00
Paul Gauthier
0ccf04a2c5 copy 2024-11-22 07:32:25 -08:00
Paul Gauthier
070ce35b44 copy 2024-11-22 07:32:00 -08:00
Paul Gauthier
a8296e5de5 copy 2024-11-22 07:29:50 -08:00
Paul Gauthier (aider)
d17f25e975 feat: Add interactive table with quantization model performance data 2024-11-22 07:17:23 -08:00
Paul Gauthier
23095ada85 docs: Update Qwen 2.5 Coder 32B Instruct model comparison with Hyperbolic labs API 2024-11-22 07:16:01 -08:00
Paul Gauthier
f9ef161991 copy 2024-11-22 07:07:41 -08:00
Paul Gauthier
28004bae2f copy 2024-11-22 07:06:43 -08:00
Paul Gauthier
17aef7be7d copy 2024-11-22 06:09:32 -08:00
Paul Gauthier
ebba8f5110 fix ollama models included in quant blog 2024-11-22 06:01:01 -08:00
Paul Gauthier
dbd7f51f5c fix ollama models included in quant blog 2024-11-22 05:56:03 -08:00
Paul Gauthier
fbadfcfa7c refactor: Remove unnecessary input logging and history tracking in pipe_editor command 2024-11-21 18:37:51 -08:00
Paul Gauthier
2c12234604 refactor: Update input handling to set and use placeholder text 2024-11-21 18:34:24 -08:00
Paul Gauthier (aider)
13cb6a315c style: Apply linter formatting to io.py 2024-11-21 18:32:03 -08:00
Paul Gauthier (aider)
48e7376002 feat: Add placeholder functionality to input prompts 2024-11-21 18:31:57 -08:00
Paul Gauthier
60d82eddee added Qwen2 72B Instruct to over time 2024-11-21 16:49:24 -08:00
Paul Gauthier (aider)
30ee89c7e9 style: Fix linting issues in over_time.py 2024-11-21 16:45:11 -08:00
Paul Gauthier (aider)
25bcea6aec feat: Add print of model release dates and names in sorted order 2024-11-21 16:45:07 -08:00
Paul Gauthier
488c88da91 update over time graphs 2024-11-21 14:19:31 -08:00
Paul Gauthier (aider)
8fdcd92260 feat: Update plot save paths to website assets directory 2024-11-21 14:19:05 -08:00
Paul Gauthier
781a40df52 fix: Update Gemini Pro legend label to Gemini 1.5 Pro 2024-11-21 14:19:03 -08:00
Paul Gauthier
2412c81d92 copy 2024-11-21 14:09:34 -08:00
Paul Gauthier (aider)
a7fc0f9d2e feat: Add color and legend support for Gemini Pro models 2024-11-21 14:02:27 -08:00
Paul Gauthier
9eab021a50 refactor: Modify offer_url method and release notes handling in main 2024-11-21 14:02:01 -08:00
Paul Gauthier (aider)
c189a52e5e style: Organize imports and apply linter formatting 2024-11-21 14:00:24 -08:00
Paul Gauthier (aider)
6d6d763dd3 refactor: Restructure benchmark plotting script for improved maintainability 2024-11-21 14:00:20 -08:00
Paul Gauthier
3cfbaa0ed6 copy 2024-11-21 13:07:18 -08:00
Paul Gauthier
e1b4571fdf set version to 0.64.2.dev 2024-11-21 12:58:23 -08:00
Paul Gauthier
08027ea9c4 version bump to 0.64.1 2024-11-21 12:56:49 -08:00
Paul Gauthier
d0528a00c1 copy 2024-11-21 12:55:10 -08:00
Paul Gauthier
7ae6a2ba9a disable o1 streaming on openrouter 2024-11-21 12:54:23 -08:00
Paul Gauthier
ad0e5c4770 copy 2024-11-21 12:53:21 -08:00
Paul Gauthier
51b181d5fb set version to 0.64.1.dev 2024-11-21 12:37:05 -08:00
Paul Gauthier
2785b0a857 version bump to 0.64.0 2024-11-21 12:35:35 -08:00
Paul Gauthier
45a113ff9e copy 2024-11-21 12:34:12 -08:00
Paul Gauthier
cee59c2ca3 chore: Ignore .DS_Store files in exclude patterns 2024-11-21 12:32:22 -08:00
Paul Gauthier
5cb9b242e2 debug 2024-11-21 12:25:17 -08:00
Paul Gauthier
1ed48de928 wip 2024-11-21 12:22:55 -08:00
Paul Gauthier
c4e4bc71ed debug 2024-11-21 12:12:18 -08:00
Paul Gauthier
ed0763706b debug 2024-11-21 12:11:28 -08:00
Paul Gauthier
1c79d517fc refactor: Update subprocess.run with text, shell, and encoding parameters 2024-11-21 12:09:28 -08:00
Paul Gauthier
1a7a2f3088 copy 2024-11-21 11:48:29 -08:00
Paul Gauthier
4199789786 copy 2024-11-21 11:47:47 -08:00
Paul Gauthier
c9b0941d1f copy 2024-11-21 11:41:12 -08:00
Paul Gauthier (aider)
3d544136d2 style: Increase font sizes for chart labels and title 2024-11-21 11:40:02 -08:00
Paul Gauthier
8448eff1eb copy 2024-11-21 11:38:41 -08:00
Paul Gauthier (aider)
a3dde4599a refactor: Improve chart label handling by splitting model names on newline 2024-11-21 11:14:01 -08:00
Paul Gauthier
3d7440c673 refactor: Modify chart labels to include additional text 2024-11-21 11:13:48 -08:00
Paul Gauthier
8f41006eba refactor: Simplify model label processing in quant-chart.js 2024-11-21 11:11:22 -08:00
Paul Gauthier (aider)
7d1379fe9f fix: Handle line breaks in x-axis labels for chart rendering 2024-11-21 11:08:23 -08:00
Paul Gauthier (aider)
ced4f9f0d9 feat: Add chart title, y-axis label, and remove legend 2024-11-21 11:06:52 -08:00
Paul Gauthier (aider)
7fba332f58 feat: Add quantization performance chart using Chart.js and quant.yml data 2024-11-21 10:57:03 -08:00
Paul Gauthier
8eda09533d init 2024-11-21 10:55:20 -08:00
Paul Gauthier
6c42ee4edf copy 2024-11-21 10:53:28 -08:00
Paul Gauthier
3053595bfe added qwen models 2024-11-21 10:52:10 -08:00
Paul Gauthier (aider)
6cf78d1a3f feat: Implement case-insensitive search in leaderboard filtering 2024-11-21 10:41:59 -08:00
Paul Gauthier (aider)
6c0ee9d917 feat: Enhance leaderboard search to support multi-word queries 2024-11-21 10:41:35 -08:00
Paul Gauthier
50051dbfd5 copy 2024-11-21 10:34:01 -08:00
Paul Gauthier (aider)
30a8c5e12e feat: Update leaderboard charts to filter bars based on search input 2024-11-21 10:32:32 -08:00
Paul Gauthier
4498549783 refactor: Add .js file extension to blame script file filter 2024-11-21 10:31:59 -08:00
Paul Gauthier (aider)
2ce3fedbfc fix: Correct table selector for refactoring leaderboard search 2024-11-21 10:31:43 -08:00
Paul Gauthier (aider)
8e10be665c fix: Remove raw tags from leaderboard script includes 2024-11-21 10:30:41 -08:00
Paul Gauthier (aider)
80636cb8aa feat: Add raw filter to JavaScript includes in leaderboard index.md 2024-11-21 10:29:18 -08:00
Paul Gauthier (aider)
1b893da07d refactor: Move JavaScript to separate files and use Jekyll includes 2024-11-21 10:28:09 -08:00
Paul Gauthier
2f8aa3471b feat: Add leaderboard JavaScript component 2024-11-21 10:24:56 -08:00
Paul Gauthier (aider)
92a6957f0b refactor: Move refactoring search box above its table 2024-11-21 10:22:57 -08:00
Paul Gauthier (aider)
d7248b11e5 feat: Add live search functionality to leaderboard tables 2024-11-21 10:21:39 -08:00
Paul Gauthier
6f4ed00105 copy 2024-11-21 10:15:28 -08:00
Paul Gauthier (aider)
347b299bbc refactor: Enforce strict parsing of multiline input start with { or {tag} 2024-11-21 10:10:45 -08:00
Paul Gauthier (aider)
614d297f22 fix: Use strip("\r\n") for precise line ending removal 2024-11-21 10:10:14 -08:00
Paul Gauthier (aider)
59d0fe00c3 refactor: Improve multi-line input handling with strict closing tag validation 2024-11-21 10:09:36 -08:00
Paul Gauthier
d6ebdff28f copy 2024-11-21 10:07:53 -08:00
Paul Gauthier
0ec16d0eab copy 2024-11-21 10:07:01 -08:00
Paul Gauthier
3906894fde Merge branch 'main' of github.com:Aider-AI/aider 2024-11-21 10:02:06 -08:00
Paul Gauthier
a43772b21d refactor: Remove unused file_editor function from editor module 2024-11-21 10:01:08 -08:00
Paul Gauthier (aider)
cd81c2619b refactor: Remove unused file_editor import and mock in test_editor.py 2024-11-21 09:58:53 -08:00
Paul Gauthier (aider)
5abadc31a3 style: Remove extra blank lines in test_editor.py 2024-11-21 09:58:39 -08:00
Paul Gauthier (aider)
87654b698b test: Update tests for editor functionality changes 2024-11-21 09:58:35 -08:00
Paul Gauthier (aider)
2a1d2ef294 refactor: Update editor discovery to support custom editor and remove AIDER_EDITOR 2024-11-21 09:55:15 -08:00
Paul Gauthier (aider)
2a387707ef feat: Add --editor switch to specify editor for /editor command 2024-11-21 09:52:14 -08:00
paul-gauthier
ce68062290 Merge pull request #2417 from caetanominuzzo/fix-typo-in-base_coder
fix: Correct typo in base_coder by removing duplicate 'in'
2024-11-21 09:36:34 -08:00
caetanominuzzo
1b9073b085 fix: Correct typo in base_coder by removing duplicate 'in'
This corrects a grammatical error in the system prompt within `base_coder.py`. The `language` variable was previously set as:

    language = "in the same language they are using"

Which resulted in the prompt:

    "Always reply to the user IN IN the same language they are using."
2024-11-21 14:19:39 -03:00
paul-gauthier
e94961a14f Merge pull request #2414 from thehunmonkgroup/editor-doc 2024-11-21 07:37:22 -08:00
Chad Phillips
d4e77b3be4 add documentation for /editor configuration 2024-11-21 09:46:25 -05:00
Paul Gauthier
b96b36d5ea refactor: Remove unnecessary assert_newlines check for updated lines 2024-11-21 06:42:04 -08:00
Paul Gauthier
72d559a92c fix: Remove duplicate assert_newlines call on original lines 2024-11-21 06:39:39 -08:00
Paul Gauthier (aider)
9a7bdcb6db style: Fix linter warnings in test_commands.py 2024-11-21 06:36:11 -08:00
Paul Gauthier (aider)
2e4cf48e7e test: Update cmd_run test to check cur_messages instead of return value 2024-11-21 06:36:05 -08:00
Paul Gauthier
b78f8abeb4 copy 2024-11-21 06:34:08 -08:00
Paul Gauthier (aider)
7aa4e44317 fix: Correct line/lines pluralization in command output messages 2024-11-21 06:30:52 -08:00
Paul Gauthier
2619b92131 fix: Add period to output message for consistency 2024-11-21 06:30:50 -08:00
Paul Gauthier (aider)
28be59582f refactor: Simplify cmd_run to use confirm_ask and add output to cur_messages 2024-11-21 06:28:41 -08:00
Paul Gauthier
f96cc03587 feat: Add opt-in analytics and improve output logging method 2024-11-21 06:25:10 -08:00
Paul Gauthier (aider)
cbd35b0e87 feat: Implement line count for command output in chat 2024-11-21 06:23:34 -08:00
Paul Gauthier
443acbe4b5 fix: Correct command output confirmation logic in base coder 2024-11-21 06:23:32 -08:00
Paul Gauthier
1f0d26e8c7 better over time plot 2024-11-20 20:19:44 -08:00
Paul Gauthier
8302e9d0dd improved over time plot 2024-11-20 20:16:35 -08:00
Paul Gauthier (aider)
c797af020a refactor: Update fontsize to use LABEL_FONT_SIZE constant in over_time.py 2024-11-20 20:13:46 -08:00
Paul Gauthier (aider)
1c85afa320 feat: Add LABEL_FONT_SIZE constant for dot label font size 2024-11-20 20:13:33 -08:00
Paul Gauthier
eb5317f8e5 fix: Adjust annotation vertical offset for brown color in over_time plot 2024-11-20 20:13:30 -08:00
Paul Gauthier (aider)
8b860615b8 style: Increase font size for scatter plot dot labels 2024-11-20 20:10:40 -08:00
Paul Gauthier (aider)
c15ac341e2 refactor: Remove Opus and Llama model variants from legend labels 2024-11-20 20:07:52 -08:00
Paul Gauthier (aider)
c2c7ee1047 feat: Change Opus label to "Opus" in legend 2024-11-20 20:06:48 -08:00
Paul Gauthier (aider)
72c46ccec6 feat: Add labels for Claude 3 Opus, Sonnet, and O1 Preview models 2024-11-20 20:06:04 -08:00
Paul Gauthier (aider)
dd3bfaee01 style: Format code with consistent indentation and line breaks 2024-11-20 20:05:24 -08:00
Paul Gauthier (aider)
03206ad90e feat: Add line labels directly on first points instead of using legend 2024-11-20 20:05:18 -08:00
Paul Gauthier (aider)
2e00307190 feat: Add color and legend label for o1-preview models 2024-11-20 20:03:49 -08:00
Paul Gauthier (aider)
b3e29ab20e style: Apply linter formatting to benchmark code 2024-11-20 20:02:52 -08:00
Paul Gauthier (aider)
5504ac535b feat: Add simplified model names for legend labels 2024-11-20 20:02:48 -08:00
Paul Gauthier (aider)
4b3dd7f4ea style: Apply linter formatting to over_time.py 2024-11-20 19:59:43 -08:00
Paul Gauthier (aider)
8edf9540d5 feat: Add legend to plot and remove point labels 2024-11-20 19:59:38 -08:00
Paul Gauthier
1c62ecd1b5 style: Adjust x-axis label rotation angle for better readability 2024-11-20 19:59:36 -08:00
Paul Gauthier
7cf3d9f3ce style: Increase annotation font size in benchmark plot 2024-11-20 19:45:42 -08:00
Paul Gauthier
9b5a703307 updated models-over-time 2024-11-20 19:40:59 -08:00
Paul Gauthier (aider)
370993cbed style: Rotate point labels by 45 degrees in benchmark plot 2024-11-20 18:47:30 -08:00
Paul Gauthier
ddc538cdfa refactor: Adjust plot figure size and y-axis limits for better visualization 2024-11-20 18:47:28 -08:00
Paul Gauthier (aider)
062dc43c87 style: Make graph aspect ratio square 2024-11-20 18:43:18 -08:00
Paul Gauthier (aider)
7d9b986c04 feat: Add cyan color and line for Mistral models in visualization 2024-11-20 18:38:06 -08:00
Paul Gauthier
bd2b9a12ed style: Change Qwen model color from purple to darkblue 2024-11-20 18:38:04 -08:00
Paul Gauthier (aider)
2b55707738 feat: Add purple color and line for Qwen models in visualization 2024-11-20 18:35:25 -08:00
Paul Gauthier (aider)
093540507e feat: Add pink color and line for Haiku models in benchmark visualization 2024-11-20 18:33:54 -08:00
Paul Gauthier (aider)
8f1dcfda07 feat: Add brown color for DeepSeek models in benchmark visualization 2024-11-20 18:31:46 -08:00
Paul Gauthier
16b319174b refactor: Simplify model color detection logic for Sonnet models 2024-11-20 18:31:44 -08:00
Paul Gauthier (aider)
35115f5707 feat: Add orange color for Claude 3 Sonnet models in benchmark visualization 2024-11-20 18:30:09 -08:00
Paul Gauthier
e9e51db9c7 improve precision, tests 2024-11-20 18:20:18 -08:00
Paul Gauthier (aider)
ec39f018e2 test: Update test_is_uuid_in_percentage with full-length UUIDs 2024-11-20 17:58:52 -08:00
Paul Gauthier
59f4a3bcc7 test: Update UUID percentage threshold test case 2024-11-20 17:58:50 -08:00
Paul Gauthier (aider)
1a8949eea3 fix: Correct UUID percentage calculation in analytics method 2024-11-20 17:58:18 -08:00
Paul Gauthier
fa85bdceed fix: Correct sampling logic by changing <= to < in UUID comparison 2024-11-20 17:58:16 -08:00
Paul Gauthier (aider)
6b703244ec fix: Correct percentage calculation in is_uuid_in_percentage method 2024-11-20 17:56:07 -08:00
Paul Gauthier (aider)
1a1cb0d3f1 fix: Correct percentage calculation in UUID sampling method 2024-11-20 17:55:40 -08:00
Paul Gauthier (aider)
95c9863d0a style: Fix linter formatting in analytics module 2024-11-20 17:54:22 -08:00
Paul Gauthier (aider)
82187f6a71 refactor: Extract UUID percentage testing logic into a separate method with tests 2024-11-20 17:54:16 -08:00
Paul Gauthier (aider)
75f52a1324 refactor: Improve user sampling logic with configurable percentage 2024-11-20 17:52:52 -08:00
Paul Gauthier
6e076a40a9 refactor: Modify analytics sampling logic to use 1% of users 2024-11-20 17:52:50 -08:00
Paul Gauthier
ded60036cb copy 2024-11-20 17:43:51 -08:00
Paul Gauthier
539a6cde63 feat: Enhance analytics opt-in logic with user sampling and explicit control 2024-11-20 16:22:01 -08:00
Paul Gauthier
3a28e74d89 copy 2024-11-20 16:03:51 -08:00
Paul Gauthier
c93f3faed9 cleanup openrouter/qwen/qwen-2.5-coder-32b-instruct in resources 2024-11-20 15:33:00 -08:00
Paul Gauthier
1aaa3d9279 gpt-4o-2024-11-20 2024-11-20 15:31:47 -08:00
Paul Gauthier
a06a9ed7d8 show the /editor message 2024-11-20 15:31:32 -08:00
Paul Gauthier
18a88596a6 Added gpt-4o-2024-11-20 2024-11-20 11:33:16 -08:00
Paul Gauthier (aider)
2ac077603b feat: Update add_to_input_history to immediately update prompt session history 2024-11-20 08:16:55 -08:00
Paul Gauthier (aider)
3bb8b163b8 feat: Update HISTORY.md with new release notes entries 2024-11-20 08:09:53 -08:00
Paul Gauthier (aider)
aac45097ca fix: Save empty dict to cache file on download failure 2024-11-20 07:57:56 -08:00
Paul Gauthier (aider)
788956e86d refactor: Update cache TTL in ModelInfoManager even on download failure 2024-11-20 07:56:28 -08:00
Paul Gauthier
e917424f5d copy 2024-11-20 07:13:15 -08:00
Paul Gauthier
1f6a5d04d9 chore: Update edit leaderboard with new Mistral model performance data 2024-11-20 07:09:38 -08:00
Paul Gauthier (aider)
dba844c7f9 style: Format code with linter 2024-11-19 17:45:44 -08:00
Paul Gauthier (aider)
09c11ef8ad test: Add --yes flag to prevent EOFError in test cases 2024-11-19 17:45:40 -08:00
Paul Gauthier
ff21669bb5 copy 2024-11-19 17:42:34 -08:00
Paul Gauthier
a059ca2537 refactor: Improve release notes display logic and user interaction flow 2024-11-19 17:41:57 -08:00
Paul Gauthier
f4531b9434 docs: Add release notes URL and section in HISTORY.md 2024-11-19 17:38:17 -08:00
Paul Gauthier (aider)
05b350ac4b style: Fix linter formatting in main.py 2024-11-19 17:37:19 -08:00
Paul Gauthier (aider)
cfba315a85 fix: Replace utils.open_url with webbrowser.open to resolve AttributeError 2024-11-19 17:37:14 -08:00
Paul Gauthier
12188b6684 refactor: Simplify release notes display logic in main function 2024-11-19 17:37:13 -08:00
Paul Gauthier (aider)
725b2fc16f style: Apply linter formatting to main.py 2024-11-19 17:33:22 -08:00
Paul Gauthier (aider)
90a28e31e8 feat: Add --show-release-notes option to control release notes display 2024-11-19 17:33:16 -08:00
Paul Gauthier
c057b00e08 refactor: Move release notes offer after announcements in main function 2024-11-19 17:33:13 -08:00
Paul Gauthier (aider)
b0c0104ba3 feat: Implement release notes URL offer on first run 2024-11-19 17:30:30 -08:00
Paul Gauthier
855b184e91 feat: Add TODO for displaying release notes on first run 2024-11-19 17:30:29 -08:00
Paul Gauthier (aider)
bc88242dc0 refactor: Move version check to main and pass to check_and_load_imports 2024-11-19 17:27:02 -08:00
Paul Gauthier (aider)
6357cd623f style: Apply linter formatting to main.py 2024-11-19 17:25:02 -08:00
Paul Gauthier (aider)
d3e7d20e30 refactor: Extract version checking logic into separate function 2024-11-19 17:24:57 -08:00
Paul Gauthier
7b568c2df3 copy 2024-11-19 17:22:08 -08:00
Paul Gauthier
2bff0522e8 refactor: Restructure file mention check and interrupt handling in base coder 2024-11-19 16:37:02 -08:00
Paul Gauthier (aider)
77e180171c style: Break long comment into two lines for flake8 compliance 2024-11-19 14:48:22 -08:00
Paul Gauthier (aider)
1e8fc97ba4 style: Apply linter formatting to test_models.py 2024-11-19 14:48:11 -08:00
Paul Gauthier (aider)
a799851832 fix: Resolve temporary file permission issues in test_models.py 2024-11-19 14:48:06 -08:00
Paul Gauthier
2c81105bfc copy 2024-11-19 14:33:21 -08:00
Paul Gauthier
bf99ac56a0 copy 2024-11-19 12:45:56 -08:00
Paul Gauthier
8bfb47948a copy 2024-11-19 12:45:00 -08:00
Paul Gauthier (aider)
b8c41198a3 docs: Add documentation links to v0.63.3 release notes 2024-11-19 12:43:17 -08:00
Paul Gauthier (aider)
fe138ac05b feat: Update HISTORY.md with v0.63.3 release details 2024-11-19 12:42:44 -08:00
Paul Gauthier
bed62fdcb5 chore: Update HISTORY.md for Aider v0.63.2 release 2024-11-19 12:42:41 -08:00
Paul Gauthier
f068df0297 copy 2024-11-19 12:40:09 -08:00
Paul Gauthier
6a05e34d20 copy 2024-11-19 12:37:16 -08:00
Paul Gauthier (aider)
8b69b9c6a4 docs: Add documentation for new multiline tag input method 2024-11-19 12:36:55 -08:00
Paul Gauthier (aider)
10192296fe style: Format code with linter 2024-11-19 12:34:47 -08:00
Paul Gauthier (aider)
7b98db2f7d fix: Escape f-string brace in multiline input tag handling 2024-11-19 12:34:43 -08:00
Paul Gauthier (aider)
81696c2e7a feat: Add support for optional multiline input tags with matching closing tag 2024-11-19 12:34:25 -08:00
Paul Gauthier
16a4f823bd refactor: Move pipe_editor import and return user input in cmd_editor method 2024-11-19 12:30:41 -08:00
Paul Gauthier
39bbfc56a4 copy 2024-11-19 12:30:30 -08:00
Paul Gauthier (aider)
308c49b2d8 fix: Modify discover_editor to dynamically check platform system 2024-11-19 12:26:37 -08:00
Paul Gauthier (aider)
53e46a9251 refactor: Remove unused platform import from test_editor.py 2024-11-19 12:26:06 -08:00
Paul Gauthier (aider)
6075b3dc33 style: Reorder imports and add whitespace in test_editor.py 2024-11-19 12:25:50 -08:00
Paul Gauthier (aider)
860a828973 test: Add comprehensive tests for editor module functionality 2024-11-19 12:25:46 -08:00
Paul Gauthier
033eaa36c6 test: Add test_editor.py for basic editor functionality 2024-11-19 12:25:44 -08:00
Paul Gauthier
b3566f5449 Merge branch 'main' of github.com:Aider-AI/aider 2024-11-19 12:23:12 -08:00
paul-gauthier
f1306d3301 Merge pull request #2234 from thehunmonkgroup/main
add /editor command
2024-11-19 12:22:37 -08:00
Paul Gauthier
cc18441435 refactor: Update model settings name from "aider/extra" to "aider/extra_params" 2024-11-19 12:15:11 -08:00
Paul Gauthier (aider)
7e787d93e6 docs: Add documentation for aider/extra_params pseudo-model settings 2024-11-19 12:10:28 -08:00
Paul Gauthier
b08f444e74 docs: Remove default and override settings section from documentation 2024-11-19 12:10:26 -08:00
Paul Gauthier (aider)
09c1acdbe2 fix: Update model settings override name to match test configuration 2024-11-19 12:07:42 -08:00
Paul Gauthier (aider)
7a4a956eff fix: Remove unexpected skip_name argument in _copy_fields() method 2024-11-19 12:07:08 -08:00
Paul Gauthier (aider)
aabbf5a72f refactor: Remove unused import and add ANTHROPIC_BETA_HEADER import 2024-11-19 12:06:29 -08:00
Paul Gauthier (aider)
5ed44bb174 style: Format test_models.py with consistent whitespace and trailing commas 2024-11-19 12:06:19 -08:00
Paul Gauthier (aider)
92cf2cbd47 test: Implement TODOs in test_aider_extra_model_settings 2024-11-19 12:06:15 -08:00
Paul Gauthier
34aff6c786 test: Update model settings test to check extra parameters 2024-11-19 12:06:13 -08:00
Paul Gauthier (aider)
11f10e586a fix: Remove unused functools.wraps import 2024-11-19 12:03:14 -08:00
Paul Gauthier (aider)
a31feae2bd style: Apply linter formatting to models.py 2024-11-19 12:02:49 -08:00
Paul Gauthier (aider)
3517d58f01 feat: Implement deep merge for extra model settings with nested dict support 2024-11-19 12:02:44 -08:00
Paul Gauthier
9d13fadd41 refactor: Simplify model settings configuration and remove tracking decorator 2024-11-19 12:02:42 -08:00
Paul Gauthier (aider)
c1febce528 fix: Remove unused imports and add missing register_models import 2024-11-19 11:50:12 -08:00
Paul Gauthier (aider)
e0aadbd961 style: Format code with linter and improve readability 2024-11-19 11:50:01 -08:00
Paul Gauthier (aider)
7b9a76c5ea refactor: Use temporary YAML file for model settings in test_default_and_override_settings 2024-11-19 11:49:57 -08:00
Paul Gauthier
6133fa8384 test: Update test cases with new edit_format value 2024-11-19 11:49:55 -08:00
Paul Gauthier (aider)
67cc215ed3 style: Apply linter formatting to models.py 2024-11-19 11:45:37 -08:00
Paul Gauthier (aider)
ea4ad2ea4d feat: Add track_init_fields decorator to track explicitly set fields in ModelSettings 2024-11-19 11:45:32 -08:00
Paul Gauthier
847454a4f7 fix: Remove debug dump statement in ModelSettings initialization 2024-11-19 11:45:31 -08:00
Paul Gauthier (aider)
8cba1fdd71 feat: Track and copy only explicitly set fields in ModelSettings 2024-11-19 10:11:44 -08:00
Paul Gauthier
e56112739c refactor: Add debug dump calls for edit_format in Model initialization 2024-11-19 10:11:42 -08:00
Paul Gauthier (aider)
76988b746f refactor: Remove unused call import and rename loop variable 2024-11-19 10:05:01 -08:00
Paul Gauthier (aider)
32eb365a0b style: Reorder imports in test_models.py 2024-11-19 10:04:45 -08:00
Paul Gauthier (aider)
2c5feddad5 test: Add imports for ModelSettings and MODEL_SETTINGS 2024-11-19 10:04:41 -08:00
Paul Gauthier (aider)
210500ff3e style: Apply linter formatting to test_models.py 2024-11-19 10:04:23 -08:00
Paul Gauthier (aider)
7c8f10e832 test: Add tests for default and override model settings 2024-11-19 10:04:19 -08:00
Paul Gauthier (aider)
644da2f9e4 docs: Add documentation for aider/default and aider/override model settings 2024-11-19 10:03:26 -08:00
Paul Gauthier (aider)
2a80d9c555 feat: Apply generic model settings when no exact model match found 2024-11-19 10:02:25 -08:00
Paul Gauthier
76f8791f3c refactor: Restructure model settings application with early returns and simplified logic 2024-11-19 10:02:24 -08:00
Paul Gauthier (aider)
c51a013109 refactor: Extract field copying logic into reusable _copy_fields method 2024-11-19 10:00:23 -08:00
Paul Gauthier (aider)
88c2f95ea5 style: Format code with linter 2024-11-19 09:59:27 -08:00
Paul Gauthier (aider)
062fa7de78 refactor: Enhance model settings configuration with default and override handling 2024-11-19 09:59:22 -08:00
Paul Gauthier
d6c1a41e8d feat: Add Timeout exception to handle API provider timeouts 2024-11-19 09:27:16 -08:00
Paul Gauthier
20ab5f9326 copy 2024-11-19 06:52:15 -08:00
Paul Gauthier
ab5a8b24a5 updated blame 2024-11-18 13:56:46 -08:00
Paul Gauthier (aider)
21a28623ca feat: Explicitly include specific markdown files in blame script 2024-11-18 13:46:43 -08:00
Paul Gauthier (aider)
06a5fec612 feat: Include .md files from aider/website/share/ in blame statistics 2024-11-18 13:45:50 -08:00
Paul Gauthier (aider)
46ecb8a663 feat: Enhance share page security with markdown sanitization and error handling 2024-11-18 13:40:15 -08:00
Paul Gauthier (aider)
3c9c6eef6e feat: Add URL validation and Content Security Policy to share page 2024-11-18 13:37:02 -08:00
Paul Gauthier
72734de376 copy 2024-11-18 13:28:47 -08:00
Paul Gauthier
a20ea09a6e refactor: Remove redundant streaming=False from model settings 2024-11-18 13:28:14 -08:00
Paul Gauthier (aider)
4bd7bce232 docs: Add example of using .aiderignore to focus on specific directories in monorepo 2024-11-18 13:22:55 -08:00
Paul Gauthier
8adf42216d copy 2024-11-18 07:47:30 -08:00
Paul Gauthier (aider)
5f40aaabb5 style: Lint and clean up code formatting in issues.py script 2024-11-18 07:46:28 -08:00
Paul Gauthier (aider)
5295abbb83 style: Move #noqa comments to triple-quoted strings in issues.py 2024-11-18 07:46:23 -08:00
Paul Gauthier
201abe1524 refactor: Improve code formatting and add noqa comment in issues.py script 2024-11-18 07:46:00 -08:00
Paul Gauthier (aider)
6d26051d11 style: Reformat long string literals using parentheses 2024-11-18 07:44:54 -08:00
Paul Gauthier (aider)
4613bf78d5 feat: Add BOT_SUFFIX to issue comment templates 2024-11-18 07:44:50 -08:00
Paul Gauthier
1f8fdc6f5c refactor: Update issue script comments and add bot suffix 2024-11-18 07:44:48 -08:00
Paul Gauthier
abf804cf10 set version to 0.63.3.dev 2024-11-18 07:30:21 -08:00
Paul Gauthier
d7a195706f version bump to 0.63.2 2024-11-18 07:29:05 -08:00
Paul Gauthier
569370109a copy 2024-11-18 07:11:46 -08:00
Paul Gauthier
eae3f04c83 copy 2024-11-18 06:57:35 -08:00
Paul Gauthier (aider)
ee0987f331 feat: Update HISTORY.md with recent changes since v0.63.1 2024-11-18 06:57:04 -08:00
Paul Gauthier (aider)
bdafa842bd fix: Add missing time import for time.sleep() in write_text method 2024-11-15 16:23:37 -08:00
Paul Gauthier (aider)
76c7c2562c style: Format code with linter for improved readability 2024-11-15 16:23:26 -08:00
Paul Gauthier (aider)
f7de2234f2 fix: Handle different OSError types in write_text method 2024-11-15 16:23:21 -08:00
Paul Gauthier
c725c45726 Merge branch 'main' of github.com:Aider-AI/aider 2024-11-15 16:22:23 -08:00
paul-gauthier
383bef456d Merge pull request #2381 from mark-asymbl/write_text_file_lock_fix
Added io.py write_text exponential backoff to gracefully handle transient file locks
2024-11-15 16:21:40 -08:00
mw
7f48f3d01d Added write_text exponential backoff to
Discord thread ID: 1306776889762906123

Resolve issue where Aider fails to write multiple, consecutive changes to a single file due to Visual Studio briefly locking a file for writing after it was edited. Presumably VS is doing some sort of processing, such as for IntelliSense, behind the scenes. This solution is applicable to other, similar editor/IDE behaviors.
2024-11-15 15:04:25 -08:00
Paul Gauthier
0bf17a48f7 copy 2024-11-15 07:42:17 -08:00
Paul Gauthier (aider)
c127f8f2f0 chore: Update HISTORY.md with v0.63.1 and v0.63.2 release notes 2024-11-15 07:37:14 -08:00
Paul Gauthier
d4d5d15e18 fix: Handle missing litellm_provider in fuzzy model matching 2024-11-15 06:14:15 -08:00
Paul Gauthier
b254afa498 refactor: Modify model metadata file loading to prioritize resource file 2024-11-15 05:33:59 -08:00
Paul Gauthier
0ce5a94c15 bumped deps 2024-11-15 05:29:29 -08:00
Paul Gauthier
38a5405c65 copy 2024-11-14 15:30:49 -08:00
Paul Gauthier
ecef784686 Merge branch 'main' of github.com:Aider-AI/aider 2024-11-14 15:27:51 -08:00
Paul Gauthier
e82b2c12b4 cleanup 2024-11-14 15:27:40 -08:00
Paul Gauthier (aider)
3c26ced8db style: Apply linter formatting to main.py 2024-11-14 15:18:54 -08:00
Paul Gauthier (aider)
2681a41abb refactor: Expand read-only file paths to include all files in directories 2024-11-14 15:18:47 -08:00
Paul Gauthier
805deb1002 feat: Add comment to expand read-only directory files 2024-11-14 15:18:45 -08:00
Paul Gauthier
6b792de802 copy 2024-11-14 15:15:23 -08:00
paul-gauthier
26f8e34dcb Merge pull request #2369 from josx/fix_contrib_pytest_filename 2024-11-14 07:33:53 -08:00
José Luis Di Biase
e0c1b2458c fix: typo pytest filename 2024-11-14 12:27:12 -03:00
Paul Gauthier
66f94d2141 set version to 0.63.2.dev 2024-11-14 06:56:43 -08:00
Paul Gauthier
503a9a0038 version bump to 0.63.1 2024-11-14 06:55:05 -08:00
Paul Gauthier
d8a5bc3ae9 Revert "Merge branch 'issue2283'"
This reverts commit e1a1e43c3a, reversing
changes made to c538817b61.
2024-11-14 06:53:21 -08:00
Paul Gauthier (aider)
94c3957d92 fix: Add error handling for git.ignored() method 2024-11-14 06:48:35 -08:00
Paul Gauthier
266350b8ce fix: Handle potential git errors in git_ignored_file method 2024-11-14 06:48:33 -08:00
Paul Gauthier
fedaede3b0 Merge branch 'main' into watch 2024-11-14 06:47:58 -08:00
Paul Gauthier (aider)
721d852cc7 feat: Add vertical spacing div to improve FAQ anchor link behavior 2024-11-13 16:23:50 -08:00
Paul Gauthier
ffbf205aba docs: Add explanation for aider code stats computation 2024-11-13 16:20:07 -08:00
Paul Gauthier
e1a1e43c3a Merge branch 'issue2283' 2024-11-13 13:43:30 -08:00
Paul Gauthier
c538817b61 updated blame 2024-11-13 13:43:05 -08:00
Paul Gauthier
71d85d2771 fix: Update Qwen 2.5 Coder 32b model configuration condition 2024-11-13 13:40:35 -08:00
Paul Gauthier
69f4d5fca7 set version to 0.63.1.dev 2024-11-13 13:37:03 -08:00
Paul Gauthier
bb31fc5301 version bump to 0.63.0 2024-11-13 13:35:36 -08:00
Paul Gauthier
87ce51e314 copy 2024-11-13 13:32:20 -08:00
Paul Gauthier
33555ca2ea refactor: Simplify file display logic and label formatting 2024-11-13 13:31:38 -08:00
Paul Gauthier (aider)
6fc3776c0c style: Fix linter warnings in io.py 2024-11-13 13:27:11 -08:00
Paul Gauthier (aider)
8a05f05bd4 refactor: Improve file list display logic with line-based spacing 2024-11-13 13:27:06 -08:00
Paul Gauthier (aider)
0dff51920e feat: Conditionally print blank line between file sections based on file count 2024-11-13 13:26:09 -08:00
Paul Gauthier
262f217d04 style: Shorten file list labels for cleaner display 2024-11-13 13:26:08 -08:00
Paul Gauthier (aider)
8b9154bab0 feat: Add labels to read-only and editable files columns 2024-11-13 13:24:51 -08:00
Paul Gauthier (aider)
533613d92b fix: Remove unused repo variable in test_cmd_add_gitignored_file 2024-11-13 13:22:57 -08:00
Paul Gauthier
20d87e1136 refactor: Remove unnecessary .gitignore commit in test setup 2024-11-13 13:22:45 -08:00
Paul Gauthier (aider)
1450c4194e test: Add test to verify cmd_add respects .gitignore files 2024-11-13 13:20:52 -08:00
Paul Gauthier
bc82baa968 refactor: Reorder git ignored file check to handle non-git repos 2024-11-13 13:18:09 -08:00
Paul Gauthier
218623be28 feat: Add git_ignored_file method to check files against gitignore 2024-11-13 13:12:25 -08:00
Paul Gauthier
ea1a4ecdc6 fix: Handle empty content in reply_completed method 2024-11-13 12:57:45 -08:00
Paul Gauthier
6acbff3c11 fix: Handle empty content in ArchitectCoder reply_completed method 2024-11-13 12:57:38 -08:00
Paul Gauthier
153021efcf fix: Handle OSError in get_rel_repo_dir method for edge cases 2024-11-13 12:51:27 -08:00
Paul Gauthier
fef1b59b42 refactor: Restructure file mention check and interrupt handling in base coder 2024-11-13 12:50:17 -08:00
Paul Gauthier
733b11b7d4 copy 2024-11-13 12:40:43 -08:00
Paul Gauthier
400514ff10 fix: Remove hardcoded reminder and add Qwen 2.5 coder model configuration 2024-11-13 12:36:28 -08:00
Paul Gauthier
bbfac316fc feat: Add model metadata for Qwen 2.5 Coder 32B Instruct model 2024-11-13 12:24:32 -08:00
Paul Gauthier
7d0b67f70e copy 2024-11-12 19:12:19 -08:00
Paul Gauthier
d0f1b38848 feat: Add Qwen 2.5 Coder 32B model settings and improve model loading robustness 2024-11-12 19:10:48 -08:00
Paul Gauthier
4d4b5bc366 chore: Remove model-metadata.json file 2024-11-12 18:38:59 -08:00
Paul Gauthier
1f39c7ef0d refactor: Improve model info retrieval logic in ModelInfoManager 2024-11-12 18:37:33 -08:00
Paul Gauthier (aider)
2e97fcc47f fix: Remove double-counting of cached tokens in token calculation 2024-11-11 17:19:11 -08:00
Paul Gauthier
550c8322c4 copy 2024-11-11 15:54:38 -08:00
Paul Gauthier (aider)
2467e23033 feat: Add vertex_ai/gemini-pro-experimental model with diff-fenced edit mode 2024-11-11 15:53:53 -08:00
Paul Gauthier
0e53198c59 do not swallow litellm.get_model_info() exceptions #2318 2024-11-11 15:15:24 -08:00
Paul Gauthier
94ff9dc0a4 Merge branch 'main' into watch 2024-11-11 14:51:38 -08:00
Paul Gauthier
44063590e2 copy 2024-11-11 10:30:23 -08:00
Paul Gauthier
557f25bf80 copy 2024-11-11 10:30:00 -08:00
paul-gauthier
190531543f Merge pull request #2335 from Hambaobao/qwen2.5-coder-32b-diff-results
Add diff format evaluation results of Qwen2.5-Coder-32B-Instruct.
2024-11-11 10:29:16 -08:00
Paul Gauthier
acfb7c3a89 fix: Handle git repo initialization errors gracefully 2024-11-11 09:56:19 -08:00
Paul Gauthier
94a6d3bc7e fix: Handle case when current working directory is inaccessible in git setup 2024-11-11 09:55:23 -08:00
Paul Gauthier (aider)
5751bcd382 refactor: Move Path.cwd() call to top of setup_git and add OSError handling 2024-11-11 09:54:43 -08:00
Paul Gauthier
21b88c0e65 refactor: Update language reply prompts to use {language} placeholder 2024-11-11 09:38:30 -08:00
Paul Gauthier
f66b916d4b feat: Add language configuration for user communication in prompts 2024-11-11 09:36:23 -08:00
柏枫
bd9c43a48d Add evaluation results for Qwen2.5-Coder-32B-Instruct using the diff format. 2024-11-12 01:23:19 +08:00
Paul Gauthier
352b91f342 copy 2024-11-11 08:46:08 -08:00
Paul Gauthier
be6e3254ea copy 2024-11-11 08:45:42 -08:00
paul-gauthier
dd1ee209ab Merge pull request #2334 from Hambaobao/qwen2.5-coder-series-results
Add Evaluation Results of Qwen2.5-Coder Series.
2024-11-11 08:43:51 -08:00
柏枫
c0b1101a52 Add evaluation results of Qwen2.5-Coder series. 2024-11-11 20:18:30 +08:00
Paul Gauthier
52c49fc8fd feat: Add option to return web scrape content instead of printing 2024-11-08 14:27:59 -08:00
Paul Gauthier
77cb64958e refactor: Modify URL scraping and message handling in commands 2024-11-08 14:23:55 -08:00
Paul Gauthier (aider)
b3d13e44b2 refactor: Modify cmd_web to add scraped content to cur_messages as assistant reply 2024-11-08 14:21:59 -08:00
Paul Gauthier
9dd7b795ca fix: Handle NotFoundError in send chat test with single print call 2024-11-08 14:18:23 -08:00
Paul Gauthier (aider)
7a8399571a fix: Handle non-retryable errors by returning None in simple_send_with_retries 2024-11-08 10:03:49 -08:00
Paul Gauthier (aider)
d0e85d9c2c style: Apply linter formatting to sendchat.py and test_sendchat.py 2024-11-08 10:02:54 -08:00
Paul Gauthier (aider)
14d02bc843 fix: Handle None response and update InvalidRequestError test 2024-11-08 10:02:48 -08:00
Paul Gauthier (aider)
b79c09cf58 refactor: Remove unused CACHE import from test_sendchat.py 2024-11-08 10:01:45 -08:00
Paul Gauthier (aider)
c9dfe5daff style: Organize imports and format code in test_sendchat.py 2024-11-08 10:01:16 -08:00
Paul Gauthier (aider)
092e7f6b3c test: Add comprehensive tests for sendchat module functionality 2024-11-08 10:01:11 -08:00
Paul Gauthier (aider)
203634314c style: Format code with linter 2024-11-08 10:00:33 -08:00
Paul Gauthier (aider)
c472e6e160 fix: Update test_exceptions.py to provide required arguments for litellm exceptions 2024-11-08 10:00:30 -08:00
Paul Gauthier (aider)
86d9275375 refactor: Remove unused pytest import from test_exceptions.py 2024-11-08 09:59:44 -08:00
Paul Gauthier (aider)
9db6780af6 style: Sort imports and add whitespace in test_exceptions.py 2024-11-08 09:59:30 -08:00
Paul Gauthier (aider)
e10205ff69 test: Add comprehensive tests for LiteLLMExceptions module 2024-11-08 09:59:25 -08:00
Paul Gauthier
9f539436b8 test: Add test_exceptions.py to basic test suite 2024-11-08 09:59:23 -08:00
Paul Gauthier
acd75e1083 copy 2024-11-08 09:58:21 -08:00
Paul Gauthier
f30225db90 removing buggy close-stale.yml workflow 2024-11-08 09:58:06 -08:00
Paul Gauthier (aider)
007305962a style: Remove unnecessary line breaks in comment_url assignment 2024-11-08 09:56:20 -08:00
Paul Gauthier (aider)
8065e38797 style: Wrap long comment_url line to fix flake8 line length error 2024-11-08 09:56:15 -08:00
Paul Gauthier (aider)
34dc684867 style: Remove unnecessary line breaks in comment_url assignment 2024-11-08 09:56:06 -08:00
Paul Gauthier (aider)
7edc9603d0 fix: Break long line to resolve flake8 line length error 2024-11-08 09:55:59 -08:00
Paul Gauthier (aider)
479d476878 style: Format code with consistent indentation and line breaks 2024-11-08 09:55:42 -08:00
Paul Gauthier (aider)
92bbec1852 feat: Add function to process and close stale issues after 7 days of inactivity 2024-11-08 09:55:37 -08:00
Paul Gauthier
d406636878 refactor: Improve issue output formatting and message clarity 2024-11-08 09:55:35 -08:00
Paul Gauthier (aider)
6362199363 fix: Reorder stale label and comment operations in handle_stale_issues 2024-11-08 09:25:11 -08:00
Paul Gauthier
22dbcb7590 refactor: Update stale issue comment text for clarity and conciseness 2024-11-08 09:25:09 -08:00
Paul Gauthier (aider)
cefea38ee5 feat: Add issue URL to stale issue output for easier navigation 2024-11-08 09:17:55 -08:00
Paul Gauthier (aider)
d44cd01493 refactor: Add noqa comment to stale comment line to resolve flake8 warning 2024-11-08 09:11:41 -08:00
Paul Gauthier (aider)
e578655653 style: Format Python code with linter 2024-11-08 09:11:24 -08:00
Paul Gauthier (aider)
434dc27557 feat: Add stale issue detection for question-labeled issues with no activity 2024-11-08 09:11:19 -08:00
Paul Gauthier
d4a88d08e4 Merge branch 'main' into watch 2024-11-07 13:44:51 -08:00
Paul Gauthier
79af39bd2c fix: Change tool_output to tool_warning for error message logging 2024-11-07 13:22:28 -08:00
Paul Gauthier (aider)
20d5a9fd4b style: Run linter to clean up whitespace in test_sendchat.py 2024-11-07 13:09:52 -08:00
Paul Gauthier (aider)
80e57ca074 fix: Remove unused import of httpx in test_sendchat.py 2024-11-07 13:09:50 -08:00
Paul Gauthier
8a3c95d8dd feat: Add LiteLLMExceptions loading in test for send chat functionality 2024-11-07 13:09:47 -08:00
Paul Gauthier
4941a360cb fix: Restore import of LiteLLMExceptions in base_coder.py 2024-11-07 13:02:17 -08:00
Paul Gauthier (aider)
9e7219c4d6 style: Run linter to clean up code formatting in sendchat.py 2024-11-07 13:02:10 -08:00
Paul Gauthier (aider)
4d96728709 fix: Remove unused import of 'backoff' in sendchat.py 2024-11-07 13:02:07 -08:00
Paul Gauthier
816fd5e65c refactor: Simplify error handling and remove unused retry exceptions code 2024-11-07 13:02:04 -08:00
Paul Gauthier (aider)
8d4175536f style: fix linting issues and whitespace in exceptions.py 2024-11-07 12:45:32 -08:00
Paul Gauthier (aider)
bba9ca3d5a feat: add get_ex_info method to lookup exception info 2024-11-07 12:45:29 -08:00
Paul Gauthier
8bc9ebf2aa feat: add LiteLLM exception handling with ExInfo dataclass 2024-11-07 12:45:27 -08:00
Paul Gauthier (aider)
dad335b8b6 refactor: remove unused comment from LiteLLMExceptions class 2024-11-07 12:19:45 -08:00
Paul Gauthier
62e93d4002 feat: add custom exceptions module 2024-11-07 12:19:41 -08:00
Paul Gauthier
728f4a0f81 copy 2024-11-07 11:54:53 -08:00
Paul Gauthier
0cafd6ee4b Merge branch 'main' of github.com:Aider-AI/aider 2024-11-07 11:50:28 -08:00
Paul Gauthier
2962e51dac test: Add webbrowser patching to TestCoder and fix argument order in test_sanity_check_repo 2024-11-07 11:48:17 -08:00
Paul Gauthier (aider)
cf5733b237 style: fix import order in test_sanity_check_repo.py 2024-11-07 11:47:39 -08:00
Paul Gauthier (aider)
c96e3326bc fix: update test to check for offer_url instead of confirm_ask 2024-11-07 11:47:35 -08:00
Paul Gauthier
1cd373c0a5 test: fix git index version test to use offer_url instead of confirm_ask 2024-11-07 11:47:33 -08:00
Paul Gauthier
ae970cf2da fix: Update webbrowser patch to use correct module path 2024-11-07 11:35:40 -08:00
Paul Gauthier
d43a01f182 cleanup 2024-11-07 11:29:47 -08:00
Paul Gauthier
42aac55b82 use offer_url 2024-11-07 11:29:05 -08:00
Paul Gauthier
a66f31dc87 bugfix 2024-11-07 11:28:52 -08:00
Paul Gauthier (aider)
64c48f2151 refactor: remove unused webbrowser import 2024-11-07 11:23:02 -08:00
Paul Gauthier (aider)
9eead8a904 style: Fix comment formatting and whitespace 2024-11-07 10:30:45 -08:00
Paul Gauthier (aider)
7761bccffe refactor: replace confirm_ask/webbrowser.open with io.offer_url 2024-11-07 10:30:41 -08:00
Paul Gauthier
a848933875 chore: add TODO comment for refactoring URL handling 2024-11-07 10:30:38 -08:00
Paul Gauthier (aider)
e475f3d752 refactor: move webbrowser import to io.py and remove from base_coder.py 2024-11-07 10:26:54 -08:00
Paul Gauthier (aider)
4d24dbc661 style: fix linting issues in io.py header comment 2024-11-07 10:26:41 -08:00
Paul Gauthier (aider)
0368c3fae9 refactor: extract URL opening functionality into dedicated io.offer_url method 2024-11-07 10:26:33 -08:00
Paul Gauthier
2cf93ccb54 refactor: simplify URL opening confirmation prompt 2024-11-07 10:26:31 -08:00
paul-gauthier
3d72cafea4 Merge pull request #2284 from Mushoz/main 2024-11-07 06:07:47 -08:00
Jaap Buurman
af0466ea83 Added Qwen2.5-7b-coder with the updated weights
The Qwen team still calls it Qwen2.5, but as can be seen from the
benchmarks the difference in performance compared to the old weights
is pretty substantial. The GGUF version of this model made by Bartowski
calls it 2.5.1 to differentiate it from the earlier version of the
same model.
2024-11-07 13:18:24 +01:00
Paul Gauthier
c84f2996ec copy 2024-11-06 20:13:38 -08:00
Paul Gauthier
add9b83d3b copy 2024-11-06 20:13:31 -08:00
Paul Gauthier
5411fb6fd4 Merge branch 'main' of github.com:Aider-AI/aider 2024-11-06 20:13:02 -08:00
paul-gauthier
49fc1b40e5 Merge pull request #2277 from lattwood/lattwood/bedrock_claude_feature_parity
Add Sonnet & Haiku ModelSettings for Bedrock
2024-11-06 09:03:18 -08:00
Logan Attwood
daef2eecdd Add Sonnet & Haiku ModelSettings for Bedrock 2024-11-06 12:28:24 -04:00
Paul Gauthier
1520422cc3 copy 2024-11-05 15:39:17 -08:00
Paul Gauthier
c7530085a6 set version to 0.62.2.dev 2024-11-05 12:41:44 -08:00
Paul Gauthier
bf43c567d8 version bump to 0.62.1 2024-11-05 12:40:17 -08:00
Paul Gauthier
b81f3e4f8d style: reorder chart canvas elements in blame.md 2024-11-05 12:11:14 -08:00
Paul Gauthier
97051b9d40 refactor: Replace GitTemporaryDirectory with ChdirTemporaryDirectory 2024-11-05 11:54:27 -08:00
Paul Gauthier
90730845de style: fix indentation in test_editblock.py 2024-11-05 11:43:04 -08:00
Paul Gauthier (aider)
f7c0c433c3 refactor: add mock for sendchat.simple_send_with_retries in test 2024-11-05 11:42:31 -08:00
Paul Gauthier
538752d0cf test: add mock for sendchat.simple_send_with_retries in editblock test 2024-11-05 11:42:30 -08:00
Paul Gauthier
c71a92ac84 fix: handle empty original content when creating new files 2024-11-05 09:14:01 -08:00
Paul Gauthier
85f23b3408 copy 2024-11-05 09:06:56 -08:00
Paul Gauthier
44cab0a4d7 refactor: update Claude model references to use 3.5-haiku-20241022 2024-11-05 09:01:35 -08:00
Paul Gauthier (aider)
33db8ee0c3 feat: enable repo map for Claude 3.5 Haiku models 2024-11-05 08:49:56 -08:00
Paul Gauthier
da4b3770c0 refactor: set use_repo_map=True for Claude 3.5 Haiku models 2024-11-05 08:49:53 -08:00
Paul Gauthier
12698998b9 feat: add verbose output for file processing in RepoMap 2024-11-05 08:48:06 -08:00
Paul Gauthier
6177856baf refactor: simplify issues script by removing redundant flag 2024-11-05 08:45:48 -08:00
Paul Gauthier (aider)
54b9c46b96 style: Fix whitespace in issues.py script 2024-11-05 07:04:15 -08:00
Paul Gauthier (aider)
2dd83e7dbe feat: exclude pull requests from unlabeled issues search 2024-11-05 07:04:11 -08:00
Paul Gauthier (aider)
17351e8f91 refactor: extract issue handling into dedicated functions 2024-11-05 07:02:24 -08:00
Paul Gauthier
e8c153f72f docs: add refactoring comments for issue handling functions 2024-11-05 07:02:22 -08:00
Paul Gauthier
7fc7ea6aba Merge branch 'main' into watch 2024-11-05 07:01:17 -08:00
Paul Gauthier (aider)
ddfd1276c5 style: Format issues.py with black linter 2024-11-05 06:58:44 -08:00
Paul Gauthier (aider)
46251c6a1c feat: add function to find unlabeled issues with paul-gauthier comments 2024-11-05 06:58:40 -08:00
Paul Gauthier
e699968be5 copy 2024-11-05 06:53:13 -08:00
Paul Gauthier
389b58b75b fix: remove premature return after disabling analytics 2024-11-05 06:52:50 -08:00
Paul Gauthier
a7cf34dea4 copy 2024-11-04 15:40:21 -08:00
Paul Gauthier
e601682706 updated blame 2024-11-04 13:00:42 -08:00
Paul Gauthier
55f16dc0b5 copy 2024-11-04 12:53:10 -08:00
Paul Gauthier
775011033f set version to 0.62.1.dev 2024-11-04 12:50:13 -08:00
Paul Gauthier
8ffe21a2dd version bump to 0.62.0 2024-11-04 12:48:44 -08:00
Paul Gauthier
73d63ef5ce copy 2024-11-04 12:37:21 -08:00
Paul Gauthier
e12b1a9184 copy 2024-11-04 12:36:46 -08:00
Paul Gauthier
d099a95b92 copy 2024-11-04 12:36:38 -08:00
Paul Gauthier
496ed90439 copy 2024-11-04 12:17:02 -08:00
Paul Gauthier (aider)
7883db1834 feat: add --haiku flag for claude-3-5-haiku model selection 2024-11-04 12:14:23 -08:00
Paul Gauthier
0cfc23b1a8 refactor: remove unused haiku formatting option 2024-11-04 12:14:22 -08:00
Paul Gauthier (aider)
d33104aec1 refactor: move haiku flag next to sonnet flag in args 2024-11-04 12:13:27 -08:00
Paul Gauthier
711b2a431c chore: add comment about sonnet flag placement 2024-11-04 12:13:25 -08:00
Paul Gauthier (aider)
09d21b5951 feat: add --haiku flag to format responses as haikus 2024-11-04 12:13:05 -08:00
Paul Gauthier
d9193387cc feat: add haiku command line argument placeholder 2024-11-04 12:13:04 -08:00
Paul Gauthier
d5330ae2f3 refactor: update highlight model constant in leaderboard chart 2024-11-04 12:12:32 -08:00
Paul Gauthier (aider)
571c1b47b5 refactor: extract Haiku model name to constant 2024-11-04 12:11:48 -08:00
Paul Gauthier (aider)
0c9d4dd123 fix: update Chart.js scales config and add null checks for labels 2024-11-04 12:09:47 -08:00
Paul Gauthier (aider)
7d79408683 feat: add distinct color for 3.5 Haiku models in leaderboard chart 2024-11-04 12:08:05 -08:00
Paul Gauthier
e6d4c3558b add 3.5 haiku to leaderboard 2024-11-04 11:40:37 -08:00
Paul Gauthier
3be2109964 fix: update Claude 3.5 Haiku models to use diff mode instead of whole 2024-11-04 11:33:40 -08:00
Paul Gauthier
ce37ff26b5 refactor: remove redundant examples_as_sys_msg flag from Claude 3.5 models 2024-11-04 11:32:41 -08:00
Paul Gauthier
03bbdb010f add haiku metadata 2024-11-04 11:18:55 -08:00
Paul Gauthier (aider)
0bde1da42c feat: add Claude 3.5 Haiku model and provider variants 2024-11-04 10:46:55 -08:00
Paul Gauthier
987cb3bca9 feat: add claude-3-haiku model configuration 2024-11-04 10:46:54 -08:00
Paul Gauthier
0b11024967 copy 2024-11-04 10:35:37 -08:00
Paul Gauthier (aider)
dfaaedb466 style: remove empty line at start of main.py 2024-11-04 10:34:27 -08:00
Paul Gauthier (aider)
8bc0d5544d feat: add --apply-clipboard-edits switch for direct clipboard editing 2024-11-04 10:34:21 -08:00
Paul Gauthier
c67e63bc09 feat: add clipboard edit mode via --apply-clipboard-edits flag 2024-11-04 10:34:19 -08:00
Paul Gauthier
129f5fae76 cleanup 2024-11-04 09:09:45 -08:00
Paul Gauthier
966a613ffe fix: handle non-existent files in EditBlockCoder #2233 2024-11-04 09:08:00 -08:00
Paul Gauthier (aider)
96ad107c19 style: add newline before error message in io.py 2024-11-04 09:05:28 -08:00
Paul Gauthier (aider)
ebdc126b00 feat: add traceback printing for file read errors 2024-11-04 09:05:24 -08:00
Paul Gauthier
5e1be966ed chore: add comment about printing traceback stack in error handling 2024-11-04 09:05:23 -08:00
Chad Phillips
8801fda972 formatting fixes 2024-11-04 10:10:37 -06:00
malkoG
a8a3e2401b Update languages.md for dart support 2024-11-04 13:22:22 +09:00
malkoG
a7f59a2e2b Add tags.scm for dart 2024-11-04 12:38:27 +09:00
Chad Phillips
d8e9da35d6 add /editor command
Opens an editor for constructing a user prompt, using the currently defined chat mode.

The editor is determined as follows:

Look for the following environment variables, in order:

1. AIDER_EDITOR
2. VISUAL
3. EDITOR

If none of these are defined, use the following defaults:

Windows: notepad
OS X: vim
*nix: vi

If an editor is not found, a RuntimeError is raised.

Any arguments passed after the /editor command are inserted as content.

The temporary file used for editing has an .md extension, which can be leveraged for syntax highlighting.

NOTE: The editor used MUST block the process until the editor is closed -- the default editors all do this.
2024-11-03 20:18:57 -05:00
Paul Gauthier
b57ad6929c Merge branch 'main' into watch 2024-11-01 11:27:29 -07:00
Paul Gauthier
0022c1a67e copy 2024-11-01 11:26:39 -07:00
Paul Gauthier
6a0380b8c0 copy 2024-11-01 09:46:27 -07:00
Paul Gauthier
305b4fee87 set version to 0.61.1.dev 2024-11-01 09:40:02 -07:00
Paul Gauthier
9e18fc55d3 version bump to 0.61.0 2024-11-01 09:38:46 -07:00
Paul Gauthier
ebc9a30cc6 copy 2024-11-01 09:23:37 -07:00
Paul Gauthier
f53f5927df Show friendly API error messages 2024-11-01 09:20:31 -07:00
Paul Gauthier (aider)
78a8d19ac5 fix: pass exception objects directly to check_and_open_urls 2024-11-01 09:12:50 -07:00
Paul Gauthier
bfa9dce1e0 refactor: improve API error messages and display format 2024-11-01 09:12:49 -07:00
Paul Gauthier (aider)
3b2f1f1e66 style: format long error messages with line breaks 2024-11-01 09:09:03 -07:00
Paul Gauthier (aider)
b2bcca967f refactor: update check_and_open_urls to handle exceptions with friendly messages 2024-11-01 09:08:57 -07:00
Paul Gauthier
929aeb22bf refactor: Update check_and_open_urls to handle exceptions with user-friendly messages 2024-11-01 09:08:56 -07:00
Paul Gauthier
66ad186edd start /save commands with /drop 2024-11-01 09:04:55 -07:00
Paul Gauthier
c098354a67 copy 2024-11-01 09:03:44 -07:00
Paul Gauthier (aider)
d67d319b31 style: fix whitespace and line spacing issues 2024-11-01 08:12:17 -07:00
Paul Gauthier (aider)
93639039d4 feat: disable spinner when stdout is not a tty 2024-11-01 08:12:13 -07:00
Paul Gauthier
789535cb85 feat: disable spinner animation when stdout is not a tty 2024-11-01 08:12:11 -07:00
Paul Gauthier
d8e1e823e7 update deps with chained constraints 2024-10-31 16:04:37 -07:00
Paul Gauthier (aider)
5b9fe6fee0 refactor: convert pip-compile script to use loop for requirements compilation 2024-10-31 16:03:12 -07:00
Paul Gauthier (aider)
91bc8cddf3 fix: add dependency constraints between requirements files 2024-10-31 16:02:33 -07:00
Paul Gauthier
392162ae84 copy 2024-10-31 15:33:17 -07:00
Paul Gauthier
0c4e4a123a pin pillow<11 to avoid regressing streamlit to ancient 1.22 2024-10-31 15:31:58 -07:00
Paul Gauthier (aider)
27711010a0 refactor: update --gui/--browser to use BooleanOptionalAction 2024-10-31 15:01:29 -07:00
Paul Gauthier
401967c27f refactor: convert browser flag to boolean argument 2024-10-31 15:01:26 -07:00
Paul Gauthier (aider)
d1b25b9a72 fix: remove duplicate test_cmd_read_only_with_image_file method 2024-10-31 15:00:21 -07:00
Paul Gauthier
df478e1f8f copy 2024-10-31 14:59:52 -07:00
Paul Gauthier (aider)
a459f0e130 test: add test for read-only command with image files 2024-10-31 14:59:46 -07:00
Paul Gauthier (aider)
66b6788990 test: add test for image file handling in read command 2024-10-31 14:59:22 -07:00
Paul Gauthier (aider)
624f9122ab style: fix whitespace in commands.py 2024-10-31 14:58:29 -07:00
Paul Gauthier (aider)
704350286c feat: allow /read command to work with images for vision models 2024-10-31 14:58:23 -07:00
Paul Gauthier (aider)
ec40ff5987 feat: prevent adding image files with /read command 2024-10-31 14:57:44 -07:00
Paul Gauthier
af7aaad903 fix: handle RecursionError during tree traversal in linter 2024-10-31 14:55:54 -07:00
Paul Gauthier
3794cf941f feat: add support for claude-3-5-sonnet-latest model 2024-10-31 14:53:50 -07:00
Paul Gauthier
72c1f25005 refactor: Move StringIO import to top of file 2024-10-31 14:49:16 -07:00
Paul Gauthier (aider)
c13536e641 style: move rich.columns import to top of file 2024-10-31 14:48:12 -07:00
Paul Gauthier (aider)
7a9988c060 style: fix linting issues in io.py 2024-10-31 14:45:35 -07:00
Paul Gauthier (aider)
b9939d4bd9 refactor: improve file list display with section headers 2024-10-31 14:45:31 -07:00
Paul Gauthier (aider)
b71a3148cf style: fix import order in io.py 2024-10-31 14:43:29 -07:00
Paul Gauthier (aider)
42abdb0a41 feat: add compact file listing using rich Columns when pretty=True 2024-10-31 14:43:25 -07:00
Paul Gauthier
4c39e92773 copy 2024-10-31 14:39:27 -07:00
Paul Gauthier
b7f7204c4e copy 2024-10-31 14:29:53 -07:00
Paul Gauthier
550d274941 copy 2024-10-31 14:23:18 -07:00
Paul Gauthier
5a974483b9 Merge branch 'main' into watch 2024-10-31 14:19:37 -07:00
Paul Gauthier (aider)
8f73c15f48 feat: skip analytics update in check mode 2024-10-31 14:16:34 -07:00
Paul Gauthier
17330e53c3 refactor: Improve error handling and URL processing in chat functionality 2024-10-31 14:13:36 -07:00
Paul Gauthier (aider)
3fcd79e165 style: fix line length and comment formatting 2024-10-31 14:03:33 -07:00
Paul Gauthier (aider)
750b12282f refactor: strip trailing punctuation from URLs before displaying 2024-10-31 14:03:27 -07:00
Paul Gauthier
94c5ff2fd2 refactor: simplify URL pattern matching and cleanup commented code 2024-10-31 14:03:26 -07:00
Paul Gauthier
85ad2826da test: add debug dump of URL pattern regex 2024-10-31 14:02:05 -07:00
Paul Gauthier
15c62e3e43 fix: improve URL pattern to handle trailing commas in links 2024-10-31 14:01:41 -07:00
Paul Gauthier (aider)
fea7134064 style: fix comment spacing and remove commented code 2024-10-31 14:01:28 -07:00
Paul Gauthier (aider)
da706d9eb8 fix: update URL regex to strip trailing punctuation 2024-10-31 14:01:21 -07:00
Paul Gauthier
9a37c0491d refactor: improve URL handling and error reporting in base coder 2024-10-31 14:01:20 -07:00
Paul Gauthier (aider)
1d3d6a589f style: remove unused Optional import 2024-10-31 13:52:50 -07:00
Paul Gauthier (aider)
c5a439e4e8 style: sort imports alphabetically in base_coder.py 2024-10-31 13:52:41 -07:00
Paul Gauthier (aider)
2b7584b651 refactor: extract URL checking logic into separate method 2024-10-31 13:52:37 -07:00
Paul Gauthier (aider)
1ef60b5a40 refactor: add URL checking function with browser open option 2024-10-31 13:52:24 -07:00
Paul Gauthier
b79321da51 chore: add TODO comments for URL handling refactoring 2024-10-31 13:52:22 -07:00
Paul Gauthier (aider)
6829b29ef4 feat: add error base class hierarchy to retry exception messages 2024-10-31 13:50:12 -07:00
Paul Gauthier
a9c0d20347 chore: add comment about error base class inspection 2024-10-31 13:50:11 -07:00
Paul Gauthier (aider)
25a906950c refactor: move webbrowser import to top of file 2024-10-31 13:48:28 -07:00
Paul Gauthier
740534dcff refactor: Move webbrowser import to top of file 2024-10-31 13:48:27 -07:00
Paul Gauthier (aider)
de65d86122 style: fix string quotes and line wrapping in error URL handling 2024-10-31 13:48:08 -07:00
Paul Gauthier (aider)
98bf9bd26d feat: add URL detection and viewer for error messages 2024-10-31 13:48:01 -07:00
Paul Gauthier
ade615c445 chore: Add TODO comment for URL handling in error messages 2024-10-31 13:48:00 -07:00
Paul Gauthier
d959e1c60d test: fix analytics disable test assertion for better clarity 2024-10-31 13:31:43 -07:00
Paul Gauthier (aider)
8d2f66fe34 test: add temp_data_dir fixture to all analytics tests 2024-10-31 13:28:31 -07:00
Paul Gauthier (aider)
66dc8dbccd style: remove unused MagicMock import 2024-10-31 13:22:59 -07:00
Paul Gauthier (aider)
b228bcab8c style: Fix linting issues in test_analytics.py 2024-10-31 13:22:50 -07:00
Paul Gauthier (aider)
ccbf1482c1 test: add comprehensive test suite for Analytics class 2024-10-31 13:22:47 -07:00
Paul Gauthier
f9a0946472 test: add basic analytics test suite 2024-10-31 13:22:45 -07:00
Paul Gauthier
faa80b7699 updated deps 2024-10-31 13:21:56 -07:00
Paul Gauthier
1eb2c724a5 copy 2024-10-31 13:15:33 -07:00
Paul Gauthier
c43e7f998e copy 2024-10-31 13:11:00 -07:00
Paul Gauthier
3e2454b84b cleanup 2024-10-31 11:49:17 -07:00
Paul Gauthier
2817766cf5 cleanup 2024-10-31 11:44:24 -07:00
Paul Gauthier
ba7656bc1c cleanup 2024-10-31 11:37:18 -07:00
Paul Gauthier
c14392a35a copy 2024-10-31 11:33:27 -07:00
Paul Gauthier
6bfb258473 copy 2024-10-31 11:31:32 -07:00
Paul Gauthier
1e872599fd copy 2024-10-31 11:02:04 -07:00
Paul Gauthier
c08b7f9c22 Merge branch 'main' into mixpanel 2024-10-31 10:09:36 -07:00
Paul Gauthier
6e4ccf8715 copy 2024-10-31 10:09:33 -07:00
Paul Gauthier (aider)
e4913669d4 refactor: simplify event method to use main_model attributes 2024-10-31 10:08:43 -07:00
Paul Gauthier
8e098752bd refactor: Use main_model attributes for weak and editor models in analytics 2024-10-31 10:08:41 -07:00
Paul Gauthier (aider)
6867dab89c style: remove trailing whitespace in analytics.py 2024-10-31 10:06:52 -07:00
Paul Gauthier (aider)
09a9fac91e refactor: extract model redaction logic and add model params 2024-10-31 10:05:10 -07:00
Paul Gauthier
2fd1681fab refactor: add weak_model and editor_model args to analytics event method 2024-10-31 10:05:08 -07:00
Paul Gauthier
ece91dc724 copy 2024-10-31 09:57:22 -07:00
Paul Gauthier
01bf154151 copy 2024-10-31 09:53:04 -07:00
Paul Gauthier
b5916981b3 copy 2024-10-30 20:19:47 -07:00
Paul Gauthier
a68b87272b copy 2024-10-30 20:19:08 -07:00
Paul Gauthier (aider)
88b55df1c6 chore: add privacy policy to update-docs script 2024-10-30 20:18:41 -07:00
Paul Gauthier (aider)
676c017eb1 feat: add git-based last updated date to privacy policy 2024-10-30 20:17:53 -07:00
Paul Gauthier
139b8a2d4a docs: add privacy policy document 2024-10-30 20:17:15 -07:00
Paul Gauthier
24c68928d6 feat: Add analytics tracking for model warnings 2024-10-30 14:34:27 -07:00
Paul Gauthier
f957111141 feat: Add model info manager import to analytics module 2024-10-30 14:30:14 -07:00
Paul Gauthier
e94e60b1d2 refactor: improve model name redaction in analytics and model info handling 2024-10-30 14:29:29 -07:00
Paul Gauthier (aider)
a565a63436 style: Fix import formatting in test_models.py 2024-10-30 13:21:47 -07:00
Paul Gauthier (aider)
a045bda171 refactor: update test to use ModelInfoManager instead of get_model_info 2024-10-30 13:21:43 -07:00
Paul Gauthier (aider)
a3d78e0944 style: split long URL string constant into multiple lines 2024-10-30 13:21:21 -07:00
Paul Gauthier
8082cbed98 refactor: rename get_model_flexible to get_model_from_cached_json_db 2024-10-30 13:21:19 -07:00
Paul Gauthier (aider)
aba8b5d00a style: fix linting issues and whitespace in models.py 2024-10-30 13:17:54 -07:00
Paul Gauthier (aider)
3d5a4d9303 refactor: encapsulate model info functionality into ModelInfoManager class 2024-10-30 13:17:49 -07:00
Paul Gauthier
a899b0e27e refactor: Extract model info handling into a dedicated class 2024-10-30 13:17:47 -07:00
Paul Gauthier
267872b7e4 feat: add opt-in analytics collection with privacy notice 2024-10-30 13:15:57 -07:00
Paul Gauthier (aider)
bd59a8debf refactor: extract analytics disable logic into dedicated method 2024-10-30 12:25:18 -07:00
Paul Gauthier
c0e137889c style: Update analytics refactoring comment with method name 2024-10-30 12:25:17 -07:00
Paul Gauthier
5b84b901b2 chore: add TODO comment for analytics refactoring 2024-10-30 12:24:39 -07:00
Paul Gauthier (aider)
059883abf7 feat: add asked_opt_in tracking to analytics 2024-10-30 12:17:17 -07:00
Paul Gauthier
0b622a6fd7 chore: add comment for analytics opt-in tracking implementation 2024-10-30 12:17:15 -07:00
Paul Gauthier
97989dd51a Merge branch 'main' into mixpanel 2024-10-30 12:06:38 -07:00
Paul Gauthier (aider)
d81c421bfe test: mock webbrowser.open in test setup 2024-10-30 12:04:43 -07:00
Paul Gauthier (aider)
bce586f510 fix: remove unused webbrowser import in test file 2024-10-30 12:00:12 -07:00
Paul Gauthier (aider)
a70b364842 style: fix import order and quote style in test file 2024-10-30 11:59:52 -07:00
Paul Gauthier (aider)
920e8da57c test: mock webbrowser.open in git index version test 2024-10-30 11:59:48 -07:00
Paul Gauthier (aider)
71a8b286dc style: fix linting issues in test_sanity_check_repo.py 2024-10-30 11:59:25 -07:00
Paul Gauthier (aider)
ee4decc50b fix: add missing urls import in test_sanity_check_repo.py 2024-10-30 11:59:21 -07:00
Paul Gauthier (aider)
63330aa833 style: fix line wrapping in test file 2024-10-30 11:59:08 -07:00
Paul Gauthier (aider)
15a0eb976f test: update git index version test to check confirm_ask call 2024-10-30 11:59:04 -07:00
Paul Gauthier
4f52ad385a copy 2024-10-30 11:52:09 -07:00
Paul Gauthier
cd1496f91b copy 2024-10-30 11:51:49 -07:00
Paul Gauthier (aider)
31babf39cd style: fix comment spacing in sanity_check_repo function 2024-10-30 11:42:50 -07:00
Paul Gauthier (aider)
fe3dbba1d9 feat: add browser URL launch with user confirmation prompt 2024-10-30 11:42:46 -07:00
Paul Gauthier
763724ed4e docs: add comment about prompting user for URL opening 2024-10-30 11:42:44 -07:00
Paul Gauthier
9e0e68caf9 copy 2024-10-30 11:41:39 -07:00
Paul Gauthier
52f697e513 style: remove extra blank line before main block 2024-10-30 11:41:11 -07:00
Paul Gauthier (aider)
aeca62bcf6 fix: remove unused import of urls module 2024-10-30 11:41:04 -07:00
Paul Gauthier
7e574bc214 refactor: improve documentation URL handling and error messages 2024-10-30 11:40:56 -07:00
Paul Gauthier (aider)
e9beb1336c style: fix line length in model warnings confirmation prompt 2024-10-30 11:34:24 -07:00
Paul Gauthier (aider)
4ac8386313 feat: add browser launch for model warnings documentation 2024-10-30 11:34:19 -07:00
Paul Gauthier
f0233455d2 feat: update model warning prompt to offer documentation link 2024-10-30 11:34:18 -07:00
Paul Gauthier
5c28dd039c pip compile 2024-10-30 09:41:57 -07:00
Paul Gauthier
26d1ab7a5f copy 2024-10-30 09:40:54 -07:00
Paul Gauthier
068fb38a5d Merge branch 'main' into mixpanel 2024-10-30 09:40:01 -07:00
Paul Gauthier
53e7eba00b copy 2024-10-30 06:39:48 -07:00
Paul Gauthier
854d908fe0 refactor: improve chat history file error handling and messaging 2024-10-30 06:37:59 -07:00
Paul Gauthier
ea3359fb4b test: adjust warning count assertion in model test 2024-10-30 06:33:31 -07:00
Paul Gauthier (aider)
55a2ba4bd6 style: Fix comment formatting in test_models.py 2024-10-30 06:32:22 -07:00
Paul Gauthier (aider)
20ca9c84c7 test: add warning message debug print in model test 2024-10-30 06:32:18 -07:00
Paul Gauthier
0d86124b15 test: add comment about tool warning args inspection 2024-10-30 06:32:17 -07:00
Paul Gauthier
554fa98c48 fix: simplify version check for dev mode 2024-10-30 06:30:11 -07:00
Paul Gauthier (aider)
eb92fa4f88 fix: handle TypeError when checking __version__ for dev mode 2024-10-30 06:26:50 -07:00
Paul Gauthier
0424e4b00a refactor: improve SQLite error handling and logging in tags cache 2024-10-29 15:09:22 -07:00
Paul Gauthier (aider)
adca062081 feat: improve SQLite error handling with original exception details 2024-10-29 15:05:16 -07:00
Paul Gauthier
ef0fcb8f38 refactor: Improve SQLite cache error handling and import organization 2024-10-29 15:04:00 -07:00
Paul Gauthier (aider)
0feed0047c style: fix whitespace and formatting in repomap.py 2024-10-29 14:59:55 -07:00
Paul Gauthier (aider)
7f027ff6e5 feat: add auto-recovery for corrupted tags cache 2024-10-29 14:59:50 -07:00
Paul Gauthier (aider)
e25a46c892 fix: wrap TAGS_CACHE length check in try/except block for SQLite errors 2024-10-29 14:58:00 -07:00
Paul Gauthier (aider)
68916b1186 feat: add error handling for SQLite tags cache operations 2024-10-29 14:55:43 -07:00
Paul Gauthier
e9771588e4 copy 2024-10-29 14:48:39 -07:00
Paul Gauthier
e1d55c82b1 refactor: Improve edit handling with dry run and path resolution 2024-10-29 14:31:12 -07:00
Paul Gauthier (aider)
5b6be29c1c chore: remove obsolete comment about path variable 2024-10-29 14:28:39 -07:00
Paul Gauthier
28d9f6f8da refactor: add dry run mode to apply_edits method 2024-10-29 14:28:38 -07:00
Paul Gauthier (aider)
3ccae4eff7 style: fix line length in test_commands.py 2024-10-29 14:19:53 -07:00
Paul Gauthier (aider)
3ad240a10e fix: normalize path separators in save/load tests for Windows compatibility 2024-10-29 14:19:47 -07:00
Paul Gauthier
87a31a583a refactor: remove unused comment in EditBlockCoder 2024-10-29 14:11:13 -07:00
Paul Gauthier (aider)
7553104433 refactor: handle updated edits array returned from apply_edits 2024-10-29 14:10:21 -07:00
Paul Gauthier
f9604633e6 fix: handle updated edits array in apply_edits return value 2024-10-29 14:10:19 -07:00
Paul Gauthier (aider)
eb9a73bdb0 fix: strip whitespace from file paths before resolving in test commands 2024-10-29 14:04:19 -07:00
Paul Gauthier (aider)
d75e75190d style: Fix regex string formatting in test commands 2024-10-29 14:03:46 -07:00
Paul Gauthier (aider)
94a49e601c refactor: use regex to normalize /add command spaces in tests 2024-10-29 14:03:40 -07:00
Paul Gauthier (aider)
3df3d86295 style: fix linting issues in test_commands.py 2024-10-29 14:02:43 -07:00
Paul Gauthier (aider)
63f8979f2b fix: normalize whitespace in command text assertions 2024-10-29 14:02:37 -07:00
Paul Gauthier
ad94e49ef5 test: fix failing test cases for save and load commands 2024-10-29 14:02:35 -07:00
Paul Gauthier
b40ff2a601 fix: improve o1 model detection with startswith check 2024-10-29 14:00:56 -07:00
Paul Gauthier
a4be01b474 refactor: move --load command execution before message processing 2024-10-29 13:59:41 -07:00
Paul Gauthier
c5dc44a73f style: simplify command execution output message 2024-10-29 13:59:04 -07:00
Paul Gauthier (aider)
358cbc9388 feat: add filename autocompletion to /load and /save commands 2024-10-29 13:58:25 -07:00
Paul Gauthier
2e5fa9dea4 style: align /add commands in history file for better readability 2024-10-29 13:58:23 -07:00
Paul Gauthier
717592463e feat: add --load option to execute commands from file on launch 2024-10-29 13:54:42 -07:00
Paul Gauthier (aider)
347a9f2a6d feat: add --load argument to execute commands from file 2024-10-29 13:53:19 -07:00
Paul Gauthier
d288122fab chore: add comment for load command implementation 2024-10-29 13:53:17 -07:00
Paul Gauthier (aider)
d1cf3d4600 refactor: conditionally set cursor shape only in vi mode 2024-10-29 13:50:40 -07:00
Paul Gauthier
5188872791 style: add comment about vi mode cursor config 2024-10-29 13:50:38 -07:00
Paul Gauthier
a57a06e8c7 Merge branch 'main' of github.com:Aider-AI/aider 2024-10-29 13:49:50 -07:00
Paul Gauthier (aider)
347ad34038 fix: update file path comparison in commands test to handle macOS prefix 2024-10-29 13:48:16 -07:00
Paul Gauthier (aider)
ccdd333ba3 fix: update test to use os.path.samefile for path comparison 2024-10-29 13:45:03 -07:00
Paul Gauthier (aider)
56f3220d4c fix: handle macOS /private/ prefix in file path tests 2024-10-29 13:21:31 -07:00
Paul Gauthier (aider)
26a85c2047 style: fix line length in test_commands.py 2024-10-29 13:20:49 -07:00
Paul Gauthier (aider)
f800ce1e5a test: use os.path.samefile for file path comparison in save/load test 2024-10-29 13:20:44 -07:00
Paul Gauthier
d4103cc271 chore: Remove unused comment in test file 2024-10-29 13:20:42 -07:00
Paul Gauthier (aider)
c3ba3b6f48 style: fix whitespace and comment formatting in test_commands.py 2024-10-29 13:19:15 -07:00
Paul Gauthier (aider)
be54df4084 refactor: improve path comparison in command tests using os.path.samefile 2024-10-29 13:19:09 -07:00
Paul Gauthier
d06c6f8557 style: improve clarity of comment in test_commands.py 2024-10-29 13:18:53 -07:00
Paul Gauthier
a876561ea0 test: add comment about parsing text in session file test 2024-10-29 13:17:50 -07:00
Paul Gauthier (aider)
6dc0b8d853 fix: use absolute paths for read-only files outside repo root 2024-10-29 13:14:37 -07:00
Paul Gauthier (aider)
460311d49e style: fix line continuation formatting in test file 2024-10-29 13:11:50 -07:00
Paul Gauthier (aider)
94396070e8 test: add test for saving and loading multiple external files 2024-10-29 13:11:44 -07:00
Paul Gauthier (aider)
4a3cb8dc95 fix: use platform-agnostic paths in test_commands.py 2024-10-29 13:11:00 -07:00
Paul Gauthier
f9005451fa test: add comment about Windows path separator issue in test_commands.py 2024-10-29 13:10:58 -07:00
paul-gauthier
16e292b1fd Merge pull request #2180 from kAIto47802/fix-o1-system-prompt 2024-10-29 13:03:35 -07:00
Paul Gauthier (aider)
7d37793765 style: fix linting issues by removing extra blank line 2024-10-29 12:54:12 -07:00
Paul Gauthier (aider)
9e9c162a16 style: fix indentation in test_cmd_save_and_load_with_external_file 2024-10-29 12:54:05 -07:00
Paul Gauthier (aider)
8d6db81a40 style: fix linting issues in test_commands.py 2024-10-29 12:53:27 -07:00
Paul Gauthier (aider)
425bd8932b test: add save/load test with external read-only file 2024-10-29 12:53:22 -07:00
Paul Gauthier
38820701be test: add comment for read-only file test case 2024-10-29 12:53:20 -07:00
Paul Gauthier
1bc74676ff copy 2024-10-29 12:49:16 -07:00
Paul Gauthier (aider)
0c37f002c9 style: remove extra newlines and fix trailing comma 2024-10-29 12:48:21 -07:00
Paul Gauthier (aider)
18c41b6128 refactor: move test_cmd_save_and_load to test_commands.py 2024-10-29 12:48:11 -07:00
Paul Gauthier
5876af4e94 test: add test for cmd_save and cmd_load functionality 2024-10-29 12:48:08 -07:00
Paul Gauthier (aider)
e1d145013a style: remove trailing newline in test_commands.py 2024-10-29 12:46:37 -07:00
Paul Gauthier (aider)
143eeff4da test: add tests for cmd_save and cmd_load commands 2024-10-29 12:46:31 -07:00
Paul Gauthier
3a7e4bac34 test: add TODO comment for cmd_save and cmd_load test coverage 2024-10-29 12:46:29 -07:00
Paul Gauthier (aider)
f5ca162576 style: fix whitespace and comment formatting 2024-10-29 12:43:56 -07:00
Paul Gauthier (aider)
dbefa6b010 feat: add /save command to store chat session file list 2024-10-29 12:43:51 -07:00
Paul Gauthier
79cdff6163 feat: add /save command to persist added files for /load 2024-10-29 12:43:49 -07:00
Paul Gauthier (aider)
b111fc357c fix: use IO encoding and handle decode errors in cmd_load 2024-10-29 12:42:33 -07:00
Paul Gauthier
2af48e159c feat: add encoding hint for file loading in commands 2024-10-29 12:42:31 -07:00
Paul Gauthier (aider)
6cec44e402 style: fix string quotes and whitespace in commands.py 2024-10-29 12:41:10 -07:00
Paul Gauthier (aider)
fc6c01a9a5 feat: add command to load and execute commands from file 2024-10-29 12:41:01 -07:00
Paul Gauthier
01439875af feat: add comment for future cmd_load implementation 2024-10-29 12:40:57 -07:00
kAIto47802
fcdf998fac Fix o1 settings 2024-10-29 08:47:24 +09:00
Paul Gauthier
34f34879c9 Merge branch 'main' into watch 2024-10-28 15:13:20 -07:00
Paul Gauthier
ed4ad45e3d copy 2024-10-28 15:12:06 -07:00
Paul Gauthier
907c1dbe2b refactor: split error and retry messages in simple_send_with_retries 2024-10-28 15:10:27 -07:00
Paul Gauthier (aider)
3baad86afd refactor: consolidate error and retry messages into single print statement 2024-10-28 15:09:22 -07:00
Paul Gauthier (aider)
0351924628 test: update print call count assertions in sendchat tests 2024-10-28 15:09:11 -07:00
Paul Gauthier
29250f82ed test: fix print call count assertions in sendchat tests 2024-10-28 15:07:50 -07:00
Paul Gauthier
a819bf1d64 test: fix assertion errors in sendchat retry tests 2024-10-28 15:07:11 -07:00
Paul Gauthier (aider)
bc515cf74a refactor: add retry loop to simple_send_with_retries function 2024-10-28 15:05:07 -07:00
Paul Gauthier
f9c45432e6 refactor: Move retry logic from base_coder to sendchat module 2024-10-28 15:05:06 -07:00
Paul Gauthier
54d55c857b refactor: update retry exceptions to use openai instead of litellm 2024-10-28 14:40:42 -07:00
Paul Gauthier
8e2a4b47d6 fix: update litellm exception imports and error handling 2024-10-28 14:29:42 -07:00
Paul Gauthier (aider)
513f06be46 refactor: move retry_exceptions import to top of test file 2024-10-28 14:28:49 -07:00
Paul Gauthier
0fb79917ff test: add test for retry_exceptions function call 2024-10-28 14:28:48 -07:00
Paul Gauthier (aider)
cd133f95ee style: fix linting issues with whitespace and line breaks 2024-10-28 14:27:26 -07:00
Paul Gauthier (aider)
3d66b53791 test: add basic test for retry_exceptions function 2024-10-28 14:27:20 -07:00
Paul Gauthier
bf63e7045b refactor: simplify litellm exception imports 2024-10-28 14:27:19 -07:00
Paul Gauthier
5c4b75909e refac 2024-10-26 07:31:28 -07:00
Paul Gauthier (aider)
41f126cad7 chore: disable verbose mode in watch.py 2024-10-25 16:23:45 -07:00
Paul Gauthier
c26d7d23b5 fix: improve regex pattern for AI comment detection 2024-10-25 16:23:44 -07:00
Paul Gauthier (aider)
4298ae00a9 style: fix linting issue in watch.py comment spacing 2024-10-25 16:21:25 -07:00
Paul Gauthier (aider)
47296e4294 fix: correct regex pattern for AI comment detection 2024-10-25 16:21:21 -07:00
Paul Gauthier
f6daab0728 feat: add support for inline AI comments in code files 2024-10-25 16:21:20 -07:00
Paul Gauthier (aider)
25dd9f1f35 style: fix linting issues and whitespace in watch.py 2024-10-25 16:20:57 -07:00
Paul Gauthier (aider)
130aedc474 fix: update regex pattern to match standalone "#ai" comments 2024-10-25 16:20:53 -07:00
Paul Gauthier
e958f40bd9 refactor: simplify file change processing and enable verbose mode 2024-10-25 16:20:52 -07:00
Paul Gauthier (aider)
ed2a2d7dc3 style: fix linting issues and format code 2024-10-25 16:10:56 -07:00
Paul Gauthier (aider)
0890b32425 refactor: move file change processing logic from io.py to watch.py 2024-10-25 16:10:49 -07:00
Paul Gauthier
2e5981ecb3 fix: extract AI comment content without prefix in file watcher 2024-10-25 16:10:48 -07:00
Paul Gauthier (aider)
ec00bb988c style: format nested list comprehension for better readability 2024-10-25 16:09:17 -07:00
Paul Gauthier (aider)
14a62586cc feat: add special handling for comments containing exclamation marks 2024-10-25 16:09:13 -07:00
Paul Gauthier
a8fe84acc7 fix: update changed_files handling to use dict keys instead of direct list 2024-10-25 16:09:12 -07:00
Paul Gauthier (aider)
144ba783a8 style: fix linting issues in watch.py 2024-10-25 16:05:55 -07:00
Paul Gauthier (aider)
8d81ef811e refactor: return full match including prefix in get_ai_comment function 2024-10-25 16:05:51 -07:00
Paul Gauthier
3d8ec25a33 fix: update AI comment extraction to include full match 2024-10-25 16:05:50 -07:00
Paul Gauthier (aider)
77f636f949 style: fix linting issues in watch.py 2024-10-25 16:03:42 -07:00
Paul Gauthier (aider)
aa86f02b1a feat: collect all AI comments from files instead of just first one 2024-10-25 16:03:39 -07:00
Paul Gauthier
05daab24a2 fix: update regex pattern for AI comment detection 2024-10-25 16:03:37 -07:00
Paul Gauthier (aider)
0960663811 style: add spacing between functions in watch.py 2024-10-25 16:00:59 -07:00
Paul Gauthier (aider)
150cc56b35 feat: add AI comment extraction from changed files 2024-10-25 16:00:55 -07:00
Paul Gauthier
7a9091fcae refactor: disable verbose mode and add comment for changed_file handling 2024-10-25 16:00:53 -07:00
Paul Gauthier (aider)
e6215d969d style: fix linting issues in watch.py 2024-10-25 15:58:45 -07:00
Paul Gauthier (aider)
9f1b8347f5 refactor: simplify regex pattern for matching AI comments 2024-10-25 15:58:41 -07:00
Paul Gauthier
311e1568d9 feat: improve file watching with verbose debug output and error handling 2024-10-25 15:58:39 -07:00
Paul Gauthier
c2dadd8054 Merge branch 'main' into watch 2024-10-25 15:54:31 -07:00
Paul Gauthier
e2dff0a74b #2120 2024-10-25 15:47:30 -07:00
Paul Gauthier
88bdfd6548 cleanup 2024-10-25 15:11:02 -07:00
Paul Gauthier (aider)
70edb62a6b feat: pass encoding parameter to watch_source_files function 2024-10-25 13:24:06 -07:00
Paul Gauthier
6c2e0ccce5 refactor: remove interrupted_partial_input parameter from InputOutput class 2024-10-25 13:24:05 -07:00
Paul Gauthier (aider)
fc6e0dfa65 style: fix linting issues in watch.py 2024-10-25 13:23:49 -07:00
Paul Gauthier (aider)
54aebb7d98 feat: add encoding param to watch_source_files with error handling 2024-10-25 13:23:46 -07:00
Paul Gauthier (aider)
378c67d51f fix: update regex pattern to use word boundary instead of word character 2024-10-25 13:22:38 -07:00
Paul Gauthier (aider)
d535035bdd style: fix string quotes in regex pattern 2024-10-25 13:22:17 -07:00
Paul Gauthier (aider)
43790db48e feat: add AI marker detection in source file watcher 2024-10-25 13:22:13 -07:00
Paul Gauthier
d957adf062 refactor: remove debug dump() call from watch_source_files function 2024-10-25 13:22:11 -07:00
Paul Gauthier (aider)
ff8f3eb8c2 style: fix linting issues in io.py 2024-10-25 13:17:58 -07:00
Paul Gauthier (aider)
88c54c918c feat: store partial input when interrupting prompt 2024-10-25 13:17:54 -07:00
Paul Gauthier
1261a335f4 refactor: improve file change handling in input loop 2024-10-25 13:17:53 -07:00
Paul Gauthier (aider)
7587d76fd1 refactor: simplify file watcher thread cleanup by removing timeout 2024-10-25 12:59:09 -07:00
Paul Gauthier
8e81300f37 fix: improve error handling in input interruption flow 2024-10-25 12:59:07 -07:00
Paul Gauthier (aider)
a999020038 style: fix line length in watch_files function 2024-10-25 12:56:25 -07:00
Paul Gauthier (aider)
bc4664d62c feat: pass gitignore path to watch_source_files function 2024-10-25 12:56:20 -07:00
Paul Gauthier
6a1754aa6a feat: add file change monitoring with gitignore support 2024-10-25 12:56:19 -07:00
Paul Gauthier (aider)
da7bb312c2 style: remove extra blank lines in io.py 2024-10-25 12:52:45 -07:00
Paul Gauthier (aider)
5b7f813f81 feat: add watch_source_files import to io.py 2024-10-25 12:52:41 -07:00
Paul Gauthier
923d9a0df2 fix: move file watcher cleanup to correct finally block 2024-10-25 12:52:39 -07:00
Paul Gauthier
c16224b37a wip 2024-10-25 12:49:52 -07:00
Paul Gauthier (aider)
01b5bdc829 style: fix indentation in get_input method 2024-10-25 12:48:54 -07:00
Paul Gauthier
5a0d66141f fix: change /edit to /add command for file changes 2024-10-25 12:48:53 -07:00
Paul Gauthier (aider)
8e873e7450 feat: return edit command when input interrupted by file change 2024-10-25 12:47:06 -07:00
Paul Gauthier (aider)
add3fa43c6 style: format watch_source_files function signature 2024-10-25 12:43:37 -07:00
Paul Gauthier (aider)
b985a8d47a feat: add clean shutdown for file watcher thread 2024-10-25 12:43:31 -07:00
Paul Gauthier (aider)
3db3150a7e feat: add input interruption from background threads 2024-10-25 12:33:07 -07:00
Paul Gauthier
17ce2a3cad Merge branch 'main' into watch 2024-10-25 10:59:02 -07:00
Paul Gauthier (aider)
bf60e58d5b fix: use os.path.join for cross-platform path handling in tests 2024-10-25 10:57:04 -07:00
Paul Gauthier
e3a3a55dd5 fix: make file paths portable for Windows compatibility in tests 2024-10-25 10:57:03 -07:00
Paul Gauthier
e239304d89 refactor: simplify file change output format 2024-10-25 10:53:10 -07:00
Paul Gauthier
893f3f343f refactor: optimize file path handling in watch_source_files function 2024-10-25 10:51:09 -07:00
Paul Gauthier
5918a18dee ignore emacs tmp files 2024-10-25 10:50:35 -07:00
Paul Gauthier (aider)
c08dcff56d style: fix linting issues in watch.py 2024-10-25 09:55:54 -07:00
Paul Gauthier (aider)
f33cd4e419 refactor: improve path handling in watch_source_files filter function 2024-10-25 09:55:50 -07:00
Paul Gauthier
a625426a28 fix: improve path handling in file watcher filter function 2024-10-25 09:55:49 -07:00
Paul Gauthier (aider)
24e66337ff style: fix line length in watch.py by wrapping function call 2024-10-25 09:51:55 -07:00
Paul Gauthier (aider)
d06f1ecf19 feat: add optional ignore function to watch_source_files 2024-10-25 09:51:52 -07:00
Paul Gauthier (aider)
9c6831c360 style: format argparse argument for better readability 2024-10-25 09:47:53 -07:00
Paul Gauthier (aider)
64ec0708c4 feat: support multiple gitignore files in file watcher 2024-10-25 09:47:50 -07:00
Paul Gauthier (aider)
34aa1e8de0 fix: handle paths outside watched directory in file watcher 2024-10-25 09:46:59 -07:00
Paul Gauthier (aider)
b0f31d8296 refactor: remove unused sys import from watch.py 2024-10-25 09:43:04 -07:00
Paul Gauthier (aider)
e5fe5199a3 style: fix import order and whitespace per linting rules 2024-10-25 09:42:51 -07:00
Paul Gauthier (aider)
45e95d1d00 feat: add gitignore support to file watcher 2024-10-25 09:42:47 -07:00
Paul Gauthier (aider)
21876e72fe style: Format watch.py with black and add newlines between functions 2024-10-25 09:41:33 -07:00
Paul Gauthier (aider)
81903598a8 feat: add file watcher for source code files with # or // comments 2024-10-25 09:41:30 -07:00
Paul Gauthier
290500ae17 feat: add file watcher module for monitoring changes 2024-10-25 09:41:27 -07:00
Paul Gauthier
1ed2eefff4 copy 2024-10-25 09:38:10 -07:00
Paul Gauthier
df65e87ef3 test: update InputOutput initialization with fancy_input param in tests 2024-10-25 09:24:52 -07:00
Paul Gauthier
ddb876d2fe only glob, not rglob for /read 2024-10-25 09:22:50 -07:00
Paul Gauthier
a080581329 refactor: improve file path handling with glob and rglob 2024-10-25 07:49:19 -07:00
Paul Gauthier (aider)
f70a82791b fix: handle absolute paths and globs in cmd_read_only 2024-10-25 07:43:31 -07:00
Paul Gauthier
5d3a60228c fix: use Path.rglob instead of glob.glob for recursive file matching 2024-10-25 07:43:29 -07:00
Paul Gauthier
fd820dbfe2 Merge branch 'main' of github.com:Aider-AI/aider 2024-10-25 07:41:02 -07:00
paul-gauthier
b911ceaa61 Merge pull request #2126 from webkonstantin/fix-read-only-from-working-dir
fix: Impossible to /read-only from another working directory
2024-10-25 07:40:57 -07:00
Paul Gauthier
9edf9b4186 refactor: extract get_rel_fname function for path resolution 2024-10-25 07:36:29 -07:00
Paul Gauthier
be74259df6 fix: add missing AnthropicError exception to retry list 2024-10-25 07:31:39 -07:00
Paul Gauthier
29293cc8ac fix: update import path for AnthropicError in retry_exceptions 2024-10-25 07:07:36 -07:00
Paul Gauthier
9e7995b730 bump deps 2024-10-25 06:55:47 -07:00
Konstantin L
ba9fdaa755 fix: Impossible to /read-only from another working directory 2024-10-25 10:59:23 +02:00
Paul Gauthier
dde2dee304 fix last test 2024-10-24 14:31:41 -07:00
Paul Gauthier (aider)
55a99143c2 test: set fancy_input=False in all InputOutput() test instances 2024-10-24 14:31:11 -07:00
Paul Gauthier
ba2bee61de test: fix confirm_ask_yes_no test by disabling fancy input 2024-10-24 14:31:09 -07:00
Paul Gauthier (aider)
5fd8fb15b9 fix: add fancy_input=False to all InputOutput test initializations 2024-10-24 14:27:53 -07:00
Paul Gauthier
8908a48b68 copy 2024-10-24 14:25:08 -07:00
Paul Gauthier (aider)
43fbda0faf feat: add --fancy-input flag to control input history and completion 2024-10-24 14:24:09 -07:00
Paul Gauthier (aider)
97a9c65125 feat: add fancy_input parameter to InputOutput class initialization 2024-10-24 14:23:24 -07:00
Paul Gauthier
8a63b1b3ce refactor: rename pretty flag to fancy_input for clarity 2024-10-24 14:23:22 -07:00
Paul Gauthier
3c658ac66f feat: set default reminder to "user" for gpt-4-1106-preview model 2024-10-24 14:08:51 -07:00
Paul Gauthier
055d529947 remove accepts_images 2024-10-24 14:08:06 -07:00
Paul Gauthier (aider)
9507f3c008 refactor: use main_model.info["supports_vision"] instead of accepts_images 2024-10-24 14:05:17 -07:00
Paul Gauthier
e0a1eefe0a copy 2024-10-24 14:01:00 -07:00
Paul Gauthier
ea37ba8346 set version to 0.60.2.dev 2024-10-24 13:59:43 -07:00
Paul Gauthier
8ea789c29d version bump to 0.60.1 2024-10-24 13:58:28 -07:00
Paul Gauthier
901e4397cb copy 2024-10-24 13:49:27 -07:00
Paul Gauthier (aider)
bcf781da73 feat: sort file lists alphabetically in format_files_for_input 2024-10-24 13:48:32 -07:00
Paul Gauthier
a68178fd1b refactor: sort files in format_files_for_input method 2024-10-24 13:48:31 -07:00
Paul Gauthier (aider)
e18b8b0a29 style: fix indentation in commands.py 2024-10-24 13:46:32 -07:00
Paul Gauthier (aider)
62ff822ee8 refactor: collect and sort expanded filenames before processing 2024-10-24 13:46:27 -07:00
Paul Gauthier
c9993dccc8 fix: remove stray comment and add sorting note in cmd_read 2024-10-24 13:46:25 -07:00
Paul Gauthier (aider)
6181fe5efa feat: sort filenames in cmd_read_only for consistent behavior 2024-10-24 13:44:52 -07:00
Paul Gauthier
dd6124fa64 refactor: sort filenames in cmd_read to match cmd_add behavior 2024-10-24 13:44:51 -07:00
Paul Gauthier (aider)
239302a219 feat: sort filenames before adding to chat 2024-10-24 13:43:01 -07:00
Paul Gauthier
e0949bff69 feat: sort filenames before adding them to chat 2024-10-24 13:42:59 -07:00
Paul Gauthier
e0c603c764 copy 2024-10-24 13:38:50 -07:00
Paul Gauthier
8f62f99db7 feat: add image support for Claude 3 models 2024-10-24 13:38:21 -07:00
Paul Gauthier (aider)
b46de7127d style: format Python code with black linter 2024-10-24 12:34:04 -07:00
Paul Gauthier (aider)
e9627cb3c6 feat: add --yes flag to auto-close duplicate issues without prompting 2024-10-24 12:34:01 -07:00
Paul Gauthier
eb8fdf483e feat: add --yes flag to issues script 2024-10-24 12:33:59 -07:00
Paul Gauthier
a6d5fa9cda copy 2024-10-22 14:40:14 -07:00
Paul Gauthier
1bef71f57a copy 2024-10-22 14:40:05 -07:00
Paul Gauthier
63c393e269 copy 2024-10-22 14:23:37 -07:00
Paul Gauthier
1efb0ba53e added new sonnet and o1 models to refac leaderboard 2024-10-22 14:17:36 -07:00
Paul Gauthier
4a3e6ef1e5 update sonnet model names since they are in litellm json now 2024-10-22 12:53:26 -07:00
Paul Gauthier (aider)
a800d219c7 feat: add ModelSettings for Claude 3.5 Sonnet v2 on Vertex AI 2024-10-22 12:51:21 -07:00
Paul Gauthier
7f962b5bb0 feat: add Claude 3.5 Sonnet model settings 2024-10-22 12:51:19 -07:00
Paul Gauthier
57642cf96c copy 2024-10-22 12:21:25 -07:00
Paul Gauthier
0aad7b46f6 cleaner logic for load/save analytics.json 2024-08-16 11:28:13 -07:00
Paul Gauthier
62d8190733 copy 2024-08-16 11:04:54 -07:00
Paul Gauthier
4759297b67 disabled -> permanently_disabled 2024-08-16 11:03:14 -07:00
Paul Gauthier
607a9a8c86 track -> enable 2024-08-16 10:59:44 -07:00
Paul Gauthier
96b67ab26c copy 2024-08-16 10:45:14 -07:00
Paul Gauthier
93b8cb9cec Merge branch 'main' into mixpanel 2024-08-16 10:42:55 -07:00
Paul Gauthier (aider)
7b6ad16fdb fix: Preserve existing UUID when marking analytics as disabled 2024-08-13 14:22:39 -07:00
Paul Gauthier (aider)
b722572a28 style: format analytics.py file 2024-08-13 13:03:54 -07:00
Paul Gauthier (aider)
46489f1a46 feat: Add PostHog analytics integration 2024-08-13 13:03:51 -07:00
Paul Gauthier
d7a29c42b7 Merge branch 'main' into mixpanel 2024-08-13 13:01:43 -07:00
Paul Gauthier (aider)
1ebe5f8bd5 feat: add edit_format to event() call 2024-08-13 10:04:28 -07:00
Paul Gauthier
26fe63b7ac cleanup 2024-08-13 10:04:05 -07:00
Paul Gauthier
d2435c2e00 copy 2024-08-13 10:02:54 -07:00
Paul Gauthier
4d04a35e73 Merge branch 'main' into mixpanel 2024-08-13 09:52:50 -07:00
Paul Gauthier
cabad84521 tweak 2024-08-13 08:12:23 -07:00
Paul Gauthier
aeadf2f139 fix: Disable analytics by default and provide option to enable 2024-08-13 08:08:05 -07:00
Paul Gauthier
4ebbfa01b7 share last 1k analytics logs 2024-08-13 07:50:28 -07:00
Paul Gauthier
960b456e70 cleanup 2024-08-13 07:50:06 -07:00
Paul Gauthier (aider)
329514289d fix: Initialize Analytics instance with track=False if analytics is None 2024-08-13 07:45:35 -07:00
Paul Gauthier (aider)
03f14dfe47 feat: Create Analytics instance with track=False if analytics is None 2024-08-13 07:45:19 -07:00
Paul Gauthier (aider)
1c321df457 feat: Move analytics arguments to their own section 2024-08-13 07:23:46 -07:00
Paul Gauthier
8a21eb7804 handle new vars that accumulate tokens/costs for infinite output 2024-08-13 07:23:01 -07:00
Paul Gauthier
c1d4adbebf added mixpanel dep 2024-08-13 07:18:26 -07:00
Paul Gauthier
ef933c207b Merge branch 'main' into mixpanel 2024-08-13 07:17:13 -07:00
Paul Gauthier
08aaae4d36 initial 2024-08-13 07:16:35 -07:00
Paul Gauthier
f52265362f Merge branch 'main' into mixpanel 2024-08-13 07:09:34 -07:00
Paul Gauthier (aider)
00aa43d964 fix: Move imports to the top of the file in aider/analytics.py 2024-08-12 20:44:56 -07:00
Paul Gauthier (aider)
84489f16b5 refactor: Refactor data file name and mkdir operations 2024-08-12 20:44:42 -07:00
Paul Gauthier
e07194bbeb fix: Rename uuid_file to data_file for consistency 2024-08-12 20:44:41 -07:00
Paul Gauthier (aider)
1567d3e3d1 fix: Remove duplicate get_or_create_uuid method 2024-08-12 20:41:59 -07:00
Paul Gauthier (aider)
eca7a57138 style: Format code with linter 2024-08-12 20:41:17 -07:00
Paul Gauthier (aider)
64df0ad590 feat: Add --analytics-disable option to disable analytics tracking 2024-08-12 20:41:10 -07:00
Paul Gauthier
5a28d499a8 fix: Update the path for the Mixpanel UUID file 2024-08-12 20:41:09 -07:00
Paul Gauthier
4bad876f66 fix: Add event tracking for interactive help command 2024-08-12 20:36:51 -07:00
Paul Gauthier (aider)
1a8763d989 feat: Add --analytics-log argument and pass it to Analytics 2024-08-12 18:27:40 -07:00
Paul Gauthier (aider)
13eaf5e5ce style: Fix formatting in analytics.py 2024-08-12 18:26:11 -07:00
Paul Gauthier (aider)
82250db8af feat: Add logfile support to Analytics class 2024-08-12 18:26:08 -07:00
Paul Gauthier
85fa78f5a6 fix: Correct command execution logic 2024-08-12 18:23:51 -07:00
Paul Gauthier (aider)
9ed732959e fix: Remove unnecessary slice from event name in Commands.run 2024-08-12 18:22:51 -07:00
Paul Gauthier (aider)
860a36fe6c refactor: Extract command name from matching_commands[0][1:] 2024-08-12 18:22:36 -07:00
Paul Gauthier (aider)
01a9a8ffc4 feat: add event logging for command usage 2024-08-12 18:22:05 -07:00
Paul Gauthier
aa840f0e28 be careful logging main_models that are not in the model db 2024-08-12 18:20:35 -07:00
Paul Gauthier (aider)
a7a626423c fix: Remove properties argument from event method in Analytics class 2024-08-12 18:08:02 -07:00
Paul Gauthier
c2c9b60ea6 feat: Add main_model parameter to event method in analytics.py 2024-08-12 18:08:01 -07:00
Paul Gauthier (aider)
a6282818db fix: Add early return if self.mp is not set 2024-08-12 16:23:12 -07:00
Paul Gauthier (aider)
f563544761 style: Fix linter issues in analytics.py 2024-08-12 16:21:49 -07:00
Paul Gauthier (aider)
48a344bc6d feat: Add system information to all events 2024-08-12 16:21:46 -07:00
Paul Gauthier
f110e8c8db fix: Update Mixpanel project token 2024-08-12 16:21:45 -07:00
Paul Gauthier (aider)
65c0608d5c style: format code 2024-08-12 16:17:17 -07:00
Paul Gauthier (aider)
57ce0dca67 feat: add self.event() to calculate_and_show_tokens_and_cost 2024-08-12 16:17:11 -07:00
Paul Gauthier
4129065d6c fix: Add event attribute to Coder class 2024-08-12 16:17:10 -07:00
Paul Gauthier (aider)
d59fd508c2 style: Apply linter formatting to analytics.py 2024-08-12 16:16:42 -07:00
Paul Gauthier (aider)
62a5cf8dee feat: Handle numeric values in event properties 2024-08-12 16:16:39 -07:00
Paul Gauthier (aider)
6ec4e60058 feat: Add kwargs support to event() method 2024-08-12 16:14:11 -07:00
Paul Gauthier
087b3d4ffb feat: Rename track_event to event in aider/analytics.py 2024-08-12 16:14:10 -07:00
Paul Gauthier (aider)
7d3585bafe style: Fix formatting and linting issues in analytics.py 2024-08-12 16:11:23 -07:00
Paul Gauthier (aider)
1a49974f98 feat: add aider version number to all events 2024-08-12 16:11:20 -07:00
Paul Gauthier
b11c17dbd4 feat: Add optional analytics tracking 2024-08-12 16:10:20 -07:00
Paul Gauthier
474ac62391 feat: Add analytics field to Coder class 2024-08-12 16:08:58 -07:00
Paul Gauthier (aider)
6ee8a74d47 style: format code with linter 2024-08-12 16:07:15 -07:00
Paul Gauthier (aider)
121dd908a6 feat: Add Mixpanel project token to Analytics class 2024-08-12 16:07:12 -07:00
Paul Gauthier
2e1ac25ce2 feat: Add analytics module with Mixpanel integration 2024-08-12 16:07:11 -07:00
Paul Gauthier
b49ee06f23 feat: Add analytics.py module 2024-08-12 16:05:06 -07:00
187 changed files with 14238 additions and 3947 deletions

View File

@@ -1,24 +0,0 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
permissions:
issues: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue has been labelled stale because it has been open for 2 weeks with no activity. Remove stale label or add a comment to keep this issue open. Otherwise, it will be closed in 7 days.'
close-issue-message: 'This issue was closed because it has been stalled for 3 weeks with no activity. Feel free to add a comment here and we can re-open it. Or feel free to file a new issue any time.'
days-before-stale: 14
days-before-close: 7
stale-issue-label: 'stale'
stale-pr-label: 'stale'
only-labels: 'question'
days-before-pr-stale: -1
days-before-pr-close: -1

View File

@@ -24,6 +24,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

View File

@@ -12,6 +12,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

29
.github/workflows/issues.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Process GitHub Issues
on:
schedule:
- cron: '0 */12 * * *' # Run every 12 hours
workflow_dispatch: # Allow manual triggers
jobs:
process-issues:
runs-on: ubuntu-latest
permissions:
issues: write # Required to modify issues
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests python-dotenv tqdm
- name: Run issues script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python scripts/issues.py --yes

View File

@@ -36,7 +36,9 @@ jobs:
working-directory: aider/website
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
@@ -82,4 +84,4 @@ jobs:
- name: Run linkchecker
run: |
linkchecker https://aider.chat
linkchecker --ignore-url='.+\.(mp4|mov|avi)' https://aider.chat

View File

@@ -12,6 +12,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5

View File

@@ -25,12 +25,19 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libportaudio2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@@ -38,5 +45,7 @@ jobs:
pip install .
- name: Run tests
env:
AIDER_ANALYTICS: false
run: |
pytest

View File

@@ -25,6 +25,8 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
@@ -38,6 +40,8 @@ jobs:
pip install .
- name: Run tests
env:
AIDER_ANALYTICS: false
run: |
pytest

5
.gitignore vendored
View File

@@ -11,4 +11,7 @@ _site
.jekyll-cache/
.jekyll-metadata
aider/__version__.py
.venv/
aider/_version.py
.venv/
.#*
.gitattributes

View File

@@ -187,8 +187,8 @@ pytest
You can also run specific test files or test cases by providing the file path or test name:
```
pytest aider/tests/test_coder.py
pytest aider/tests/test_coder.py::TestCoder::test_specific_case
pytest tests/basic/test_coder.py
pytest tests/basic/test_coder.py::TestCoder::test_specific_case
```
#### Continuous Integration

View File

@@ -1,7 +1,198 @@
# Release history
### v0.59.0
### Aider v0.69.0
- [Watch files](https://aider.chat/docs/usage/watch.html) improvements:
- Use `# ... AI?` comments to trigger aider and ask questions about your code.
- Now watches *all* files, not just certain source files.
- Use `# AI comments`, `// AI comments`, or `-- AI comments` to give aider instructions in any text file.
- Full support for Gemini Flash 2.0 Exp:
- `aider --model flash` or `aider --model gemini/gemini-2.0-flash-exp`
- [New `--multiline` flag and `/multiline-mode` command](https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages) makes ENTER a soft newline and META-ENTER send the message, by @miradnanali.
- `/copy-context <instructions>` now takes optional "instructions" when [copying code context to the clipboard](https://aider.chat/docs/usage/copypaste.html#copy-aiders-code-context-to-your-clipboard-paste-into-the-web-ui).
- Improved clipboard error handling with helpful requirements install info.
- Ask 5% of users if they want to opt-in to analytics.
- `/voice` now lets you edit the transcribed text before sending.
- Disabled auto-complete in Y/N prompts.
- Aider wrote 68% of the code in this release.
### Aider v0.68.0
- [Aider works with LLM web chat UIs](https://aider.chat/docs/usage/copypaste.html).
- New `--copy-paste` mode.
- New `/copy-context` command.
- [Set API keys and other environment variables for all providers from command line or yaml conf file](https://aider.chat/docs/config/aider_conf.html#storing-llm-keys).
- New `--api-key provider=key` setting.
- New `--set-env VAR=value` setting.
- Added bash and zsh support to `--watch-files`.
- Better error messages when missing dependencies for Gemini and Bedrock models.
- Control-D now properly exits the program.
- Don't count token costs when API provider returns a hard error.
- Bugfix so watch files works with files that don't have tree-sitter support.
- Bugfix so o1 models can be used as weak model.
- Updated shell command prompt.
- Added docstrings for all Coders.
- Reorganized command line arguments with improved help messages and grouping.
- Use the exact `sys.python` for self-upgrades.
- Added experimental Gemini models.
- Aider wrote 71% of the code in this release.
### Aider v0.67.0
- [Use aider in your IDE or editor](https://aider.chat/docs/usage/watch.html).
- Run `aider --watch-files` and it will watch for instructions you add to your source files.
- One-liner `# ...` or `// ...` comments that start or end with "AI" are instructions to aider.
- When aider sees "AI!" it reads and follows all the instructions in AI comments.
- Support for new Amazon Bedrock Nova models.
- When `/run` or `/test` have non-zero exit codes, pre-fill "Fix that" into the next message prompt.
- `/diff` now invokes `git diff` to use your preferred diff tool.
- Added Ctrl-Z support for process suspension.
- Spinner now falls back to ASCII art if fancy symbols throw unicode errors.
- `--read` now expands `~` home dirs.
- Enabled exception capture in analytics.
- [Aider wrote 61% of the code in this release.](https://aider.chat/HISTORY.html)
### Aider v0.66.0
- PDF support for Sonnet and Gemini models.
- Added `--voice-input-device` to select audio input device for voice recording, by @preynal.
- Added `--timeout` option to configure API call timeouts.
- Set cwd to repo root when running shell commands.
- Added Ctrl-Up/Down keyboard shortcuts for per-message history navigation.
- Improved error handling for failed .gitignore file operations.
- Improved error handling for input history file permissions.
- Improved error handling for analytics file access.
- Removed spurious warning about disabling pretty in VSCode.
- Removed broken support for Dart.
- Bugfix when scraping URLs found in chat messages.
- Better handling of __version__ import errors.
- Improved `/drop` command to support substring matching for non-glob patterns.
- Aider wrote 82% of the code in this release.
### Aider v0.65.1
- Bugfix to `--alias`.
### Aider v0.65.0
- Added `--alias` config to define [custom model aliases](https://aider.chat/docs/config/model-aliases.html).
- Added `--[no-]detect-urls` flag to disable detecting and offering to scrape URLs found in the chat.
- Ollama models now default to an 8k context window.
- Added [RepoMap support for Dart language](https://aider.chat/docs/languages.html) by @malkoG.
- Ask 2.5% of users if they want to opt-in to [analytics](https://aider.chat/docs/more/analytics.html).
- Skip suggesting files that share names with files already in chat.
- `/editor` returns and prefill the file content into the prompt, so you can use `/editor` to compose messages that start with `/commands`, etc.
- Enhanced error handling for analytics.
- Improved handling of UnknownEditFormat exceptions with helpful documentation links.
- Bumped dependencies to pick up grep-ast 0.4.0 for Dart language support.
- Aider wrote 81% of the code in this release.
### Aider v0.64.1
- Disable streaming for o1 on OpenRouter.
### Aider v0.64.0
- Added [`/editor` command](https://aider.chat/docs/usage/commands.html) to open system editor for writing prompts, by @thehunmonkgroup.
- Full support for `gpt-4o-2024-11-20`.
- Stream o1 models by default.
- `/run` and suggested shell commands are less mysterious and now confirm that they "Added XX lines of output to the chat."
- Ask 1% of users if they want to opt-in to [analytics](https://aider.chat/docs/more/analytics.html).
- Added support for [optional multiline input tags](https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages) with matching closing tags.
- Improved [model settings configuration](https://aider.chat/docs/config/adv-model-settings.html#global-extra-params) with support for global `extra_params` for `litellm.completion()`.
- Architect mode now asks to add files suggested by the LLM.
- Fixed bug in fuzzy model name matching.
- Added Timeout exception to handle API provider timeouts.
- Added `--show-release-notes` to control release notes display on first run of new version.
- Save empty dict to cache file on model metadata download failure, to delay retry.
- Improved error handling and code formatting.
- Aider wrote 74% of the code in this release.
### Aider v0.63.2
- Fixed bug in fuzzy model name matching when litellm provider info is missing.
- Modified model metadata file loading to allow override of resource file.
- Allow recursive loading of dirs using `--read`.
- Updated dependency versions to pick up litellm fix for ollama models.
- Added exponential backoff retry when writing files to handle editor file locks.
- Updated Qwen 2.5 Coder 32B model configuration.
### Aider v0.63.1
- Fixed bug in git ignored file handling.
- Improved error handling for git operations.
### Aider v0.63.0
- Support for Qwen 2.5 Coder 32B.
- `/web` command just adds the page to the chat, without triggering an LLM response.
- Improved prompting for the user's preferred chat language.
- Improved handling of LiteLLM exceptions.
- Bugfix for double-counting tokens when reporting cache stats.
- Bugfix for the LLM creating new files.
- Other small bug fixes.
- Aider wrote 55% of the code in this release.
### Aider v0.62.0
- Full support for Claude 3.5 Haiku
- Scored 75% on [aider's code editing leaderboard](https://aider.chat/docs/leaderboards/).
- Almost as good as Sonnet at much lower cost.
- Launch with `--haiku` to use it.
- Easily apply file edits from ChatGPT, Claude or other web apps
- Chat with ChatGPT or Claude via their web app.
- Give it your source files and ask for the changes you want.
- Use the web app's "copy response" button to copy the entire reply from the LLM.
- Run `aider --apply-clipboard-edits file-to-edit.js`.
- Aider will edit your file with the LLM's changes.
- Bugfix for creating new files.
- Aider wrote 84% of the code in this release.
### Aider v0.61.0
- Load and save aider slash-commands to files:
- `/save <fname>` command will make a file of `/add` and `/read-only` commands that recreate the current file context in the chat.
- `/load <fname>` will replay the commands in the file.
- You can use `/load` to run any arbitrary set of slash-commands, not just `/add` and `/read-only`.
- Use `--load <fname>` to run a list of commands on launch, before the interactive chat begins.
- Anonymous, opt-in [analytics](https://aider.chat/docs/more/analytics.html) with no personal data sharing.
- Aider follows litellm's `supports_vision` attribute to enable image support for models.
- Bugfix for when diff mode flexibly handles the model using the wrong filename.
- Displays filenames in sorted order for `/add` and `/read-only`.
- New `--no-fancy-input` switch disables prompt toolkit input, now still available with `--no-pretty`.
- Override browser config with `--no-browser` or `--no-gui`.
- Offer to open documentation URLs when errors occur.
- Properly support all o1 models, regardless of provider.
- Improved layout of filenames above input prompt.
- Better handle corrupted repomap tags cache.
- Improved handling of API errors, especially when accessing the weak model.
- Aider wrote 68% of the code in this release.
### Aider v0.60.1
- Enable image support for Sonnet 10/22.
- Display filenames in sorted order.
### Aider v0.60.0
- Full support for Sonnet 10/22, the new SOTA model on aider's code editing benchmark.
- Aider uses Sonnet 10/22 by default.
- Improved formatting of added and read-only files above chat prompt, by @jbellis.
- Improved support for o1 models by more flexibly parsing their nonconforming code edit replies.
- Corrected diff edit format prompt that only the first match is replaced.
- Stronger whole edit format prompt asking for clean file names.
- Now offers to add `.env` to the `.gitignore` file.
- Ships with a small model metadata json file to handle models not yet updated in litellm.
- Model settings for o1 models on azure.
- Bugfix to properly include URLs in `/help` RAG results.
- Aider wrote 49% of the code in this release.
### Aider v0.59.1
- Check for obsolete `yes: true` in yaml config, show helpful error.
- Model settings for openrouter/anthropic/claude-3.5-sonnet:beta
### Aider v0.59.0
- Improvements to `/read-only`:
- Now supports shell-style auto-complete of the full file system.

14
MANIFEST.in Normal file
View File

@@ -0,0 +1,14 @@
# This needs to sync with aider/help_pats.py
global-exclude .DS_Store
recursive-exclude aider/website/examples *
recursive-exclude aider/website/_posts *
exclude aider/website/HISTORY.md
exclude aider/website/docs/benchmarks*.md
exclude aider/website/docs/ctags.md
exclude aider/website/docs/unified-diffs.md
exclude aider/website/docs/leaderboards/index.md
recursive-exclude aider/website/assets *
recursive-exclude aider/website *.js
recursive-exclude aider/website *.html
recursive-exclude aider/website *.yml

View File

@@ -43,28 +43,27 @@ VIDEO END -->
cog.out(open("aider/website/_includes/get-started.md").read())
]]]-->
You can get started quickly like this:
You can get started quickly like this, with python 3.8-3.13:
```
python -m pip install -U aider-chat
```bash
python -m pip install aider-install
aider-install
# Change directory into a git repo
# Change directory into your code base
cd /to/your/git/repo
# Work with Claude 3.5 Sonnet on your repo
export ANTHROPIC_API_KEY=your-key-goes-here
aider
aider --model sonnet --anthropic-api-key your-key-goes-here
# Work with GPT-4o on your repo
export OPENAI_API_KEY=your-key-goes-here
aider
aider --model gpt-4o --openai-api-key your-key-goes-here
```
<!--[[[end]]]-->
See the
[installation instructions](https://aider.chat/docs/install.html)
and other
[documentation](https://aider.chat/docs/usage.html)
and
[usage documentation](https://aider.chat/docs/usage.html)
for more details.
## Features

View File

@@ -1,6 +1,20 @@
from packaging import version
__version__ = "0.69.2.dev"
safe_version = __version__
try:
from aider.__version__ import __version__
from aider._version import __version__
except Exception:
__version__ = "0.60.1.dev"
__version__ = safe_version + "+import"
if type(__version__) is not str:
__version__ = safe_version + "+type"
else:
try:
if version.parse(__version__) < version.parse(safe_version):
__version__ = safe_version + "+less"
except Exception:
__version__ = safe_version + "+parse"
__all__ = [__version__]

230
aider/analytics.py Normal file
View File

@@ -0,0 +1,230 @@
import json
import platform
import sys
import time
import uuid
from pathlib import Path
from mixpanel import MixpanelException
from posthog import Posthog
from aider import __version__
from aider.dump import dump # noqa: F401
from aider.models import model_info_manager
mixpanel_project_token = "6da9a43058a5d1b9f3353153921fb04d"
posthog_project_api_key = "phc_99T7muzafUMMZX15H8XePbMSreEUzahHbtWjy3l5Qbv"
posthog_host = "https://us.i.posthog.com"
class Analytics:
# providers
mp = None
ph = None
# saved
user_id = None
permanently_disable = None
asked_opt_in = None
# ephemeral
logfile = None
def __init__(self, logfile=None, permanently_disable=False):
self.logfile = logfile
self.get_or_create_uuid()
if self.permanently_disable or permanently_disable or not self.asked_opt_in:
self.disable(permanently_disable)
def enable(self):
if not self.user_id:
self.disable(False)
return
if self.permanently_disable:
self.disable(True)
return
if not self.asked_opt_in:
self.disable(False)
return
# self.mp = Mixpanel(mixpanel_project_token)
self.ph = Posthog(
project_api_key=posthog_project_api_key,
host=posthog_host,
on_error=self.posthog_error,
enable_exception_autocapture=True,
super_properties=self.get_system_info(), # Add system info to all events
)
def disable(self, permanently):
self.mp = None
self.ph = None
if permanently:
self.asked_opt_in = True
self.permanently_disable = True
self.save_data()
def need_to_ask(self, args_analytics):
if args_analytics is False:
return False
could_ask = not self.asked_opt_in and not self.permanently_disable
if not could_ask:
return False
if args_analytics is True:
return True
assert args_analytics is None, args_analytics
if not self.user_id:
return False
PERCENT = 5
return self.is_uuid_in_percentage(self.user_id, PERCENT)
def is_uuid_in_percentage(self, uuid_str, percent):
"""Check if a UUID string falls within the first X percent of the UUID space.
Args:
uuid_str: UUID string to test
percent: Percentage threshold (0-100)
Returns:
bool: True if UUID falls within the first X percent
"""
if not (0 <= percent <= 100):
raise ValueError("Percentage must be between 0 and 100")
if not uuid_str:
return False
# Convert percentage to hex threshold (1% = "04...", 10% = "1a...", etc)
# Using first 6 hex digits
if percent == 0:
return False
threshold = format(int(0xFFFFFF * percent / 100), "06x")
return uuid_str[:6] <= threshold
def get_data_file_path(self):
try:
data_file = Path.home() / ".aider" / "analytics.json"
data_file.parent.mkdir(parents=True, exist_ok=True)
return data_file
except OSError:
# If we can't create/access the directory, just disable analytics
self.disable(permanently=False)
return None
def get_or_create_uuid(self):
self.load_data()
if self.user_id:
return
self.user_id = str(uuid.uuid4())
self.save_data()
def load_data(self):
data_file = self.get_data_file_path()
if not data_file:
return
if data_file.exists():
try:
data = json.loads(data_file.read_text())
self.permanently_disable = data.get("permanently_disable")
self.user_id = data.get("uuid")
self.asked_opt_in = data.get("asked_opt_in", False)
except (json.decoder.JSONDecodeError, OSError):
self.disable(permanently=False)
def save_data(self):
data_file = self.get_data_file_path()
if not data_file:
return
data = dict(
uuid=self.user_id,
permanently_disable=self.permanently_disable,
asked_opt_in=self.asked_opt_in,
)
try:
data_file.write_text(json.dumps(data, indent=4))
except OSError:
# If we can't write the file, just disable analytics
self.disable(permanently=False)
def get_system_info(self):
return {
"python_version": sys.version.split()[0],
"os_platform": platform.system(),
"os_release": platform.release(),
"machine": platform.machine(),
"aider_version": __version__,
}
def _redact_model_name(self, model):
if not model:
return None
info = model_info_manager.get_model_from_cached_json_db(model.name)
if info:
return model.name
elif "/" in model.name:
return model.name.split("/")[0] + "/REDACTED"
return None
def posthog_error(self):
"""disable posthog if we get an error"""
print("X" * 100)
# https://github.com/PostHog/posthog-python/blob/9e1bb8c58afaa229da24c4fb576c08bb88a75752/posthog/consumer.py#L86
# https://github.com/Aider-AI/aider/issues/2532
self.ph = None
def event(self, event_name, main_model=None, **kwargs):
if not self.mp and not self.ph and not self.logfile:
return
properties = {}
if main_model:
properties["main_model"] = self._redact_model_name(main_model)
properties["weak_model"] = self._redact_model_name(main_model.weak_model)
properties["editor_model"] = self._redact_model_name(main_model.editor_model)
properties.update(kwargs)
# Handle numeric values
for key, value in properties.items():
if isinstance(value, (int, float)):
properties[key] = value
else:
properties[key] = str(value)
if self.mp:
try:
self.mp.track(self.user_id, event_name, dict(properties))
except MixpanelException:
self.mp = None # Disable mixpanel on connection errors
if self.ph:
self.ph.capture(self.user_id, event_name, dict(properties))
if self.logfile:
log_entry = {
"event": event_name,
"properties": properties,
"user_id": self.user_id,
"time": int(time.time()),
}
try:
with open(self.logfile, "a") as f:
json.dump(log_entry, f)
f.write("\n")
except OSError:
pass # Ignore OS errors when writing to logfile

View File

@@ -28,22 +28,10 @@ def get_parser(default_config_files, git_root):
config_file_parser_class=configargparse.YAMLConfigFileParser,
auto_env_var_prefix="AIDER_",
)
group = parser.add_argument_group("Main")
group = parser.add_argument_group("Main model")
group.add_argument(
"files", metavar="FILE", nargs="*", help="files to edit with an LLM (optional)"
)
group.add_argument(
"--openai-api-key",
metavar="OPENAI_API_KEY",
env_var="OPENAI_API_KEY",
help="Specify the OpenAI API key",
)
group.add_argument(
"--anthropic-api-key",
metavar="ANTHROPIC_API_KEY",
env_var="ANTHROPIC_API_KEY",
help="Specify the Anthropic API key",
)
group.add_argument(
"--model",
metavar="MODEL",
@@ -58,7 +46,7 @@ def get_parser(default_config_files, git_root):
const=opus_model,
help=f"Use {opus_model} model for the main chat",
)
sonnet_model = "anthropic/claude-3-5-sonnet-20241022"
sonnet_model = "claude-3-5-sonnet-20241022"
group.add_argument(
"--sonnet",
action="store_const",
@@ -66,6 +54,14 @@ def get_parser(default_config_files, git_root):
const=sonnet_model,
help=f"Use {sonnet_model} model for the main chat",
)
haiku_model = "claude-3-5-haiku-20241022"
group.add_argument(
"--haiku",
action="store_const",
dest="model",
const=haiku_model,
help=f"Use {haiku_model} model for the main chat",
)
gpt_4_model = "gpt-4-0613"
group.add_argument(
"--4",
@@ -75,7 +71,7 @@ def get_parser(default_config_files, git_root):
const=gpt_4_model,
help=f"Use {gpt_4_model} model for the main chat",
)
gpt_4o_model = "gpt-4o-2024-08-06"
gpt_4o_model = "gpt-4o"
group.add_argument(
"--4o",
action="store_const",
@@ -136,43 +132,59 @@ def get_parser(default_config_files, git_root):
)
##########
group = parser.add_argument_group("Model Settings")
group = parser.add_argument_group("API Keys and settings")
group.add_argument(
"--openai-api-key",
help="Specify the OpenAI API key",
)
group.add_argument(
"--anthropic-api-key",
help="Specify the Anthropic API key",
)
group.add_argument(
"--openai-api-base",
help="Specify the api base url",
)
group.add_argument(
"--openai-api-type",
help="(deprecated, use --set-env OPENAI_API_TYPE=<value>)",
)
group.add_argument(
"--openai-api-version",
help="(deprecated, use --set-env OPENAI_API_VERSION=<value>)",
)
group.add_argument(
"--openai-api-deployment-id",
help="(deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)",
)
group.add_argument(
"--openai-organization-id",
help="(deprecated, use --set-env OPENAI_ORGANIZATION=<value>)",
)
group.add_argument(
"--set-env",
action="append",
metavar="ENV_VAR_NAME=value",
help="Set an environment variable (to control API settings, can be used multiple times)",
default=[],
)
group.add_argument(
"--api-key",
action="append",
metavar="PROVIDER=KEY",
help=(
"Set an API key for a provider (eg: --api-key provider=<key> sets"
" PROVIDER_API_KEY=<key>)"
),
default=[],
)
group = parser.add_argument_group("Model settings")
group.add_argument(
"--list-models",
"--models",
metavar="MODEL",
help="List known models which match the (partial) MODEL name",
)
group.add_argument(
"--openai-api-base",
metavar="OPENAI_API_BASE",
env_var="OPENAI_API_BASE",
help="Specify the api base url",
)
group.add_argument(
"--openai-api-type",
metavar="OPENAI_API_TYPE",
env_var="OPENAI_API_TYPE",
help="Specify the api_type",
)
group.add_argument(
"--openai-api-version",
metavar="OPENAI_API_VERSION",
env_var="OPENAI_API_VERSION",
help="Specify the api_version",
)
group.add_argument(
"--openai-api-deployment-id",
metavar="OPENAI_API_DEPLOYMENT_ID",
env_var="OPENAI_API_DEPLOYMENT_ID",
help="Specify the deployment_id",
)
group.add_argument(
"--openai-organization-id",
metavar="OPENAI_ORGANIZATION_ID",
env_var="OPENAI_ORGANIZATION_ID",
help="Specify the OpenAI organization ID",
)
group.add_argument(
"--model-settings-file",
metavar="MODEL_SETTINGS_FILE",
@@ -185,12 +197,24 @@ def get_parser(default_config_files, git_root):
default=".aider.model.metadata.json",
help="Specify a file with context window and costs for unknown models",
)
group.add_argument(
"--alias",
action="append",
metavar="ALIAS:MODEL",
help="Add a model alias (can be used multiple times)",
)
group.add_argument(
"--verify-ssl",
action=argparse.BooleanOptionalAction,
default=True,
help="Verify the SSL cert when connecting to models (default: True)",
)
group.add_argument(
"--timeout",
type=int,
default=None,
help="Timeout in seconds for API calls (default: None)",
)
group.add_argument(
"--edit-format",
"--chat-mode",
@@ -241,17 +265,9 @@ def get_parser(default_config_files, git_root):
" If unspecified, defaults to the model's max_chat_history_tokens."
),
)
# This is a duplicate of the argument in the preparser and is a no-op by this time of
# argument parsing, but it's here so that the help is displayed as expected.
group.add_argument(
"--env-file",
metavar="ENV_FILE",
default=default_env_file(git_root),
help="Specify the .env file to load (default: .env in git root)",
)
##########
group = parser.add_argument_group("Cache Settings")
group = parser.add_argument_group("Cache settings")
group.add_argument(
"--cache-prompts",
action=argparse.BooleanOptionalAction,
@@ -266,7 +282,7 @@ def get_parser(default_config_files, git_root):
)
##########
group = parser.add_argument_group("Repomap Settings")
group = parser.add_argument_group("Repomap settings")
group.add_argument(
"--map-tokens",
type=int,
@@ -323,7 +339,7 @@ def get_parser(default_config_files, git_root):
)
##########
group = parser.add_argument_group("Output Settings")
group = parser.add_argument_group("Output settings")
group.add_argument(
"--dark-mode",
action="store_true",
@@ -422,7 +438,7 @@ def get_parser(default_config_files, git_root):
)
##########
group = parser.add_argument_group("Git Settings")
group = parser.add_argument_group("Git settings")
group.add_argument(
"--git",
action=argparse.BooleanOptionalAction,
@@ -509,6 +525,12 @@ def get_parser(default_config_files, git_root):
help="Skip the sanity check for the git repository (default: False)",
default=False,
)
group.add_argument(
"--watch-files",
action=argparse.BooleanOptionalAction,
default=False,
help="Enable/disable watching files for ai coding comments (default: False)",
)
group = parser.add_argument_group("Fixing and committing")
group.add_argument(
"--lint",
@@ -545,12 +567,157 @@ def get_parser(default_config_files, git_root):
group.add_argument(
"--test",
action="store_true",
help="Run tests and fix problems found",
help="Run tests, fix problems found and then exit",
default=False,
)
##########
group = parser.add_argument_group("Other Settings")
group = parser.add_argument_group("Analytics")
group.add_argument(
"--analytics",
action=argparse.BooleanOptionalAction,
default=None,
help="Enable/disable analytics for current session (default: random)",
)
group.add_argument(
"--analytics-log",
metavar="ANALYTICS_LOG_FILE",
help="Specify a file to log analytics events",
)
group.add_argument(
"--analytics-disable",
action="store_true",
help="Permanently disable analytics",
default=False,
)
#########
group = parser.add_argument_group("Upgrading")
group.add_argument(
"--just-check-update",
action="store_true",
help="Check for updates and return status in the exit code",
default=False,
)
group.add_argument(
"--check-update",
action=argparse.BooleanOptionalAction,
help="Check for new aider versions on launch",
default=True,
)
group.add_argument(
"--show-release-notes",
action=argparse.BooleanOptionalAction,
help="Show release notes on first run of new version (default: None, ask user)",
default=None,
)
group.add_argument(
"--install-main-branch",
action="store_true",
help="Install the latest version from the main branch",
default=False,
)
group.add_argument(
"--upgrade",
"--update",
action="store_true",
help="Upgrade aider to the latest version from PyPI",
default=False,
)
group.add_argument(
"--version",
action="version",
version=f"%(prog)s {__version__}",
help="Show the version number and exit",
)
##########
group = parser.add_argument_group("Modes")
group.add_argument(
"--message",
"--msg",
"-m",
metavar="COMMAND",
help=(
"Specify a single message to send the LLM, process reply then exit (disables chat mode)"
),
)
group.add_argument(
"--message-file",
"-f",
metavar="MESSAGE_FILE",
help=(
"Specify a file containing the message to send the LLM, process reply, then exit"
" (disables chat mode)"
),
)
group.add_argument(
"--gui",
"--browser",
action=argparse.BooleanOptionalAction,
help="Run aider in your browser (default: False)",
default=False,
)
group.add_argument(
"--copy-paste",
action=argparse.BooleanOptionalAction,
default=False,
help="Enable automatic copy/paste of chat between aider and web UI (default: False)",
)
group.add_argument(
"--apply",
metavar="FILE",
help="Apply the changes from the given file instead of running the chat (debug)",
)
group.add_argument(
"--apply-clipboard-edits",
action="store_true",
help="Apply clipboard contents as edits using the main model's editor format",
default=False,
)
group.add_argument(
"--exit",
action="store_true",
help="Do all startup activities then exit before accepting user input (debug)",
default=False,
)
group.add_argument(
"--show-repo-map",
action="store_true",
help="Print the repo map and exit (debug)",
default=False,
)
group.add_argument(
"--show-prompts",
action="store_true",
help="Print the system prompts and exit (debug)",
default=False,
)
##########
group = parser.add_argument_group("Voice settings")
group.add_argument(
"--voice-format",
metavar="VOICE_FORMAT",
default="wav",
choices=["wav", "mp3", "webm"],
help="Audio format for voice recording (default: wav). webm and mp3 require ffmpeg",
)
group.add_argument(
"--voice-language",
metavar="VOICE_LANGUAGE",
default="en",
help="Specify the language for voice using ISO 639-1 code (default: auto)",
)
group.add_argument(
"--voice-input-device",
metavar="VOICE_INPUT_DEVICE",
default=None,
help="Specify the input device name for voice recording",
)
######
group = parser.add_argument_group("Other settings")
group.add_argument(
"--file",
action="append",
@@ -575,42 +742,6 @@ def get_parser(default_config_files, git_root):
default=None,
help="Specify the language to use in the chat (default: None, uses system settings)",
)
group.add_argument(
"--version",
action="version",
version=f"%(prog)s {__version__}",
help="Show the version number and exit",
)
group.add_argument(
"--just-check-update",
action="store_true",
help="Check for updates and return status in the exit code",
default=False,
)
group.add_argument(
"--check-update",
action=argparse.BooleanOptionalAction,
help="Check for new aider versions on launch",
default=True,
)
group.add_argument(
"--install-main-branch",
action="store_true",
help="Install the latest version from the main branch",
default=False,
)
group.add_argument(
"--upgrade",
"--update",
action="store_true",
help="Upgrade aider to the latest version from PyPI",
default=False,
)
group.add_argument(
"--apply",
metavar="FILE",
help="Apply the changes from the given file instead of running the chat (debug)",
)
group.add_argument(
"--yes-always",
action="store_true",
@@ -625,40 +756,9 @@ def get_parser(default_config_files, git_root):
default=False,
)
group.add_argument(
"--show-repo-map",
action="store_true",
help="Print the repo map and exit (debug)",
default=False,
)
group.add_argument(
"--show-prompts",
action="store_true",
help="Print the system prompts and exit (debug)",
default=False,
)
group.add_argument(
"--exit",
action="store_true",
help="Do all startup activities then exit before accepting user input (debug)",
default=False,
)
group.add_argument(
"--message",
"--msg",
"-m",
metavar="COMMAND",
help=(
"Specify a single message to send the LLM, process reply then exit (disables chat mode)"
),
)
group.add_argument(
"--message-file",
"-f",
metavar="MESSAGE_FILE",
help=(
"Specify a file containing the message to send the LLM, process reply, then exit"
" (disables chat mode)"
),
"--load",
metavar="LOAD_FILE",
help="Load and execute /commands from a file on launch",
)
group.add_argument(
"--encoding",
@@ -675,12 +775,13 @@ def get_parser(default_config_files, git_root):
" or home directory)"
),
)
# This is a duplicate of the argument in the preparser and is a no-op by this time of
# argument parsing, but it's here so that the help is displayed as expected.
group.add_argument(
"--gui",
"--browser",
action="store_true",
help="Run aider in your browser",
default=False,
"--env-file",
metavar="ENV_FILE",
default=default_env_file(git_root),
help="Specify the .env file to load (default: .env in git root)",
)
group.add_argument(
"--suggest-shell-commands",
@@ -688,21 +789,27 @@ def get_parser(default_config_files, git_root):
default=True,
help="Enable/disable suggesting shell commands (default: True)",
)
##########
group = parser.add_argument_group("Voice Settings")
group.add_argument(
"--voice-format",
metavar="VOICE_FORMAT",
default="wav",
choices=["wav", "mp3", "webm"],
help="Audio format for voice recording (default: wav). webm and mp3 require ffmpeg",
"--fancy-input",
action=argparse.BooleanOptionalAction,
default=True,
help="Enable/disable fancy input with history and completion (default: True)",
)
group.add_argument(
"--voice-language",
metavar="VOICE_LANGUAGE",
default="en",
help="Specify the language for voice using ISO 639-1 code (default: auto)",
"--multiline",
action=argparse.BooleanOptionalAction,
default=False,
help="Enable/disable multi-line input mode with Meta-Enter to submit (default: False)",
)
group.add_argument(
"--detect-urls",
action=argparse.BooleanOptionalAction,
default=True,
help="Enable/disable detection and offering to add URLs to chat (default: True)",
)
group.add_argument(
"--editor",
help="Specify which editor to use for the /editor command",
)
return parser

View File

@@ -10,6 +10,9 @@ class ArchitectCoder(AskCoder):
def reply_completed(self):
content = self.partial_response_content
if not content or not content.strip():
return
if not self.io.confirm_ask("Edit the files?"):
return

View File

@@ -13,7 +13,7 @@ Just show the changes needed.
DO NOT show the entire updated function/file/etc!
Always reply in the same language as the change request.
Always reply to the user in {language}.
"""
example_messages = []

View File

@@ -6,7 +6,7 @@ from .base_prompts import CoderPrompts
class AskPrompts(CoderPrompts):
main_system = """Act as an expert code analyst.
Answer questions about the supplied code.
Always reply to the user in the same language they are using.
Always reply to the user in {language}.
"""
example_messages = []

View File

@@ -17,9 +17,12 @@ from collections import defaultdict
from datetime import datetime
from json.decoder import JSONDecodeError
from pathlib import Path
from typing import List
from aider import __version__, models, prompts, urls, utils
from aider.analytics import Analytics
from aider.commands import Commands
from aider.exceptions import LiteLLMExceptions
from aider.history import ChatSummary
from aider.io import ConfirmGroup, InputOutput
from aider.linter import Linter
@@ -27,13 +30,22 @@ from aider.llm import litellm
from aider.repo import ANY_GIT_ERROR, GitRepo
from aider.repomap import RepoMap
from aider.run_cmd import run_cmd
from aider.sendchat import RETRY_TIMEOUT, retry_exceptions, send_completion
from aider.sendchat import RETRY_TIMEOUT, send_completion
from aider.utils import format_content, format_messages, format_tokens, is_image_file
from ..dump import dump # noqa: F401
from .chat_chunks import ChatChunks
class UnknownEditFormat(ValueError):
def __init__(self, edit_format, valid_formats):
self.edit_format = edit_format
self.valid_formats = valid_formats
super().__init__(
f"Unknown edit format {edit_format}. Valid formats are: {', '.join(valid_formats)}"
)
class MissingAPIKeyError(ValueError):
pass
@@ -88,8 +100,10 @@ class Coder:
cache_warming_thread = None
num_cache_warming_pings = 0
suggest_shell_commands = True
detect_urls = True
ignore_mentions = None
chat_language = None
file_watcher = None
@classmethod
def create(
@@ -140,8 +154,9 @@ class Coder:
aider_commit_hashes=from_coder.aider_commit_hashes,
commands=from_coder.commands.clone(),
total_cost=from_coder.total_cost,
ignore_mentions=from_coder.ignore_mentions,
file_watcher=from_coder.file_watcher,
)
use_kwargs.update(update) # override to complete the switch
use_kwargs.update(kwargs) # override passed kwargs
@@ -153,11 +168,15 @@ class Coder:
res.original_kwargs = dict(kwargs)
return res
raise ValueError(f"Unknown edit format {edit_format}")
valid_formats = [
str(c.edit_format)
for c in coders.__all__
if hasattr(c, "edit_format") and c.edit_format is not None
]
raise UnknownEditFormat(edit_format, valid_formats)
def clone(self, **kwargs):
new_coder = Coder.create(from_coder=self, **kwargs)
new_coder.ignore_mentions = self.ignore_mentions
return new_coder
def get_announcements(self):
@@ -229,6 +248,9 @@ class Coder:
if self.done_messages:
lines.append("Restored previous conversation history.")
if self.io.multiline_mode:
lines.append("Multiline mode: Enabled. Enter inserts newline, Alt-Enter submits text")
return lines
def __init__(
@@ -258,20 +280,39 @@ class Coder:
commands=None,
summarizer=None,
total_cost=0.0,
analytics=None,
map_refresh="auto",
cache_prompts=False,
num_cache_warming_pings=0,
suggest_shell_commands=True,
chat_language=None,
detect_urls=True,
ignore_mentions=None,
file_watcher=None,
auto_copy_context=False,
):
# Fill in a dummy Analytics if needed, but it is never .enable()'d
self.analytics = analytics if analytics is not None else Analytics()
self.event = self.analytics.event
self.chat_language = chat_language
self.commit_before_message = []
self.aider_commit_hashes = set()
self.rejected_urls = set()
self.abs_root_path_cache = {}
self.ignore_mentions = set()
self.auto_copy_context = auto_copy_context
self.ignore_mentions = ignore_mentions
if not self.ignore_mentions:
self.ignore_mentions = set()
self.file_watcher = file_watcher
if self.file_watcher:
self.file_watcher.coder = self
self.suggest_shell_commands = suggest_shell_commands
self.detect_urls = detect_urls
self.num_cache_warming_pings = num_cache_warming_pings
@@ -347,6 +388,9 @@ class Coder:
for fname in fnames:
fname = Path(fname)
if self.repo and self.repo.git_ignored_file(fname):
self.io.tool_warning(f"Skipping {fname} that matches gitignore spec.")
if self.repo and self.repo.ignored_file(fname):
self.io.tool_warning(f"Skipping {fname} that matches aiderignore spec.")
continue
@@ -637,6 +681,8 @@ class Coder:
def get_readonly_files_messages(self):
readonly_messages = []
# Handle non-image files
read_only_content = self.get_read_only_files_content()
if read_only_content:
readonly_messages += [
@@ -648,6 +694,15 @@ class Coder:
content="Ok, I will use these files as references.",
),
]
# Handle image files
images_message = self.get_images_message(self.abs_read_only_fnames)
if images_message is not None:
readonly_messages += [
images_message,
dict(role="assistant", content="Ok, I will use these images as references."),
]
return readonly_messages
def get_chat_files_messages(self):
@@ -669,7 +724,7 @@ class Coder:
dict(role="assistant", content=files_reply),
]
images_message = self.get_images_message()
images_message = self.get_images_message(self.abs_fnames)
if images_message is not None:
chat_files_messages += [
images_message,
@@ -678,23 +733,42 @@ class Coder:
return chat_files_messages
def get_images_message(self):
if not self.main_model.accepts_images:
def get_images_message(self, fnames):
supports_images = self.main_model.info.get("supports_vision")
supports_pdfs = self.main_model.info.get("supports_pdf_input") or self.main_model.info.get(
"max_pdf_size_mb"
)
# https://github.com/BerriAI/litellm/pull/6928
supports_pdfs = supports_pdfs or "claude-3-5-sonnet-20241022" in self.main_model.name
if not (supports_images or supports_pdfs):
return None
image_messages = []
for fname, content in self.get_abs_fnames_content():
if is_image_file(fname):
with open(fname, "rb") as image_file:
encoded_string = base64.b64encode(image_file.read()).decode("utf-8")
mime_type, _ = mimetypes.guess_type(fname)
if mime_type and mime_type.startswith("image/"):
image_url = f"data:{mime_type};base64,{encoded_string}"
rel_fname = self.get_rel_fname(fname)
image_messages += [
{"type": "text", "text": f"Image file: {rel_fname}"},
{"type": "image_url", "image_url": {"url": image_url, "detail": "high"}},
]
for fname in fnames:
if not is_image_file(fname):
continue
mime_type, _ = mimetypes.guess_type(fname)
if not mime_type:
continue
with open(fname, "rb") as image_file:
encoded_string = base64.b64encode(image_file.read()).decode("utf-8")
image_url = f"data:{mime_type};base64,{encoded_string}"
rel_fname = self.get_rel_fname(fname)
if mime_type.startswith("image/") and supports_images:
image_messages += [
{"type": "text", "text": f"Image file: {rel_fname}"},
{"type": "image_url", "image_url": {"url": image_url, "detail": "high"}},
]
elif mime_type == "application/pdf" and supports_pdfs:
image_messages += [
{"type": "text", "text": f"PDF file: {rel_fname}"},
{"type": "image_url", "image_url": image_url},
]
if not image_messages:
return None
@@ -713,6 +787,7 @@ class Coder:
self.lint_outcome = None
self.test_outcome = None
self.shell_commands = []
self.message_cost = 0
if self.repo:
self.commit_before_message.append(self.repo.get_head_commit_sha())
@@ -723,9 +798,10 @@ class Coder:
self.io.user_input(with_message)
self.run_one(with_message, preproc)
return self.partial_response_content
while True:
try:
if not self.io.placeholder:
self.copy_context()
user_message = self.get_input()
self.run_one(user_message, preproc)
self.show_undo_hint()
@@ -734,6 +810,10 @@ class Coder:
except EOFError:
return
def copy_context(self):
if self.auto_copy_context:
self.commands.cmd_copy_context()
def get_input(self):
inchat_files = self.get_inchat_relative_files()
read_only_files = [self.get_rel_fname(fname) for fname in self.abs_read_only_fnames]
@@ -756,7 +836,7 @@ class Coder:
return self.commands.run(inp)
self.check_for_file_mentions(inp)
self.check_for_urls(inp)
inp = self.check_for_urls(inp)
return inp
@@ -782,23 +862,43 @@ class Coder:
self.num_reflections += 1
message = self.reflected_message
def check_for_urls(self, inp):
def check_and_open_urls(self, exc, friendly_msg=None):
"""Check exception for URLs, offer to open in a browser, with user-friendly error msgs."""
text = str(exc)
if friendly_msg:
self.io.tool_warning(text)
self.io.tool_error(f"{friendly_msg}")
else:
self.io.tool_error(text)
url_pattern = re.compile(r"(https?://[^\s/$.?#].[^\s]*)")
urls = list(set(url_pattern.findall(text))) # Use set to remove duplicates
for url in urls:
url = url.rstrip(".',\"")
self.io.offer_url(url)
return urls
def check_for_urls(self, inp: str) -> List[str]:
"""Check input for URLs and offer to add them to the chat."""
if not self.detect_urls:
return inp
url_pattern = re.compile(r"(https?://[^\s/$.?#].[^\s]*[^\s,.])")
urls = list(set(url_pattern.findall(inp))) # Use set to remove duplicates
added_urls = []
group = ConfirmGroup(urls)
for url in urls:
if url not in self.rejected_urls:
url = url.rstrip(".',\"")
if self.io.confirm_ask(
"Add URL to the chat?", subject=url, group=group, allow_never=True
):
inp += "\n\n"
inp += self.commands.cmd_web(url)
added_urls.append(url)
inp += self.commands.cmd_web(url, return_content=True)
else:
self.rejected_urls.add(url)
return added_urls
return inp
def keyboard_interrupt(self):
now = time.time()
@@ -806,6 +906,7 @@ class Coder:
thresh = 2 # seconds
if self.last_keyboard_interrupt and now - self.last_keyboard_interrupt < thresh:
self.io.tool_warning("\n\n^C KeyboardInterrupt")
self.event("exit", reason="Control-C")
sys.exit()
self.io.tool_warning("\n\n^C again to exit")
@@ -929,12 +1030,18 @@ class Coder:
platform=platform_text
)
if self.chat_language:
language = self.chat_language
else:
language = "the same language they are using"
prompt = prompt.format(
fence=self.fence,
lazy_prompt=lazy_prompt,
platform=platform_text,
shell_cmd_prompt=shell_cmd_prompt,
shell_cmd_reminder=shell_cmd_reminder,
language=language,
)
return prompt
@@ -1018,18 +1125,21 @@ class Coder:
# add the reminder anyway
total_tokens = 0
final = chunks.cur[-1]
if chunks.cur:
final = chunks.cur[-1]
else:
final = None
max_input_tokens = self.main_model.info.get("max_input_tokens") or 0
# Add the reminder prompt if we still have room to include it.
if (
max_input_tokens is None
not max_input_tokens
or total_tokens < max_input_tokens
and self.gpt_prompts.system_reminder
):
if self.main_model.reminder == "sys":
chunks.reminder = reminder_message
elif self.main_model.reminder == "user" and final["role"] == "user":
elif self.main_model.reminder == "user" and final and final["role"] == "user":
# stuff it into the user message
new_content = (
final["content"]
@@ -1101,6 +1211,8 @@ class Coder:
return chunks
def send_message(self, inp):
self.event("message_send_starting")
self.cur_messages += [
dict(role="user", content=inp),
]
@@ -1120,6 +1232,8 @@ class Coder:
retry_delay = 0.125
litellm_ex = LiteLLMExceptions()
self.usage_report = None
exhausted = False
interrupted = False
@@ -1128,24 +1242,37 @@ class Coder:
try:
yield from self.send(messages, functions=self.functions)
break
except retry_exceptions() as err:
self.io.tool_warning(str(err))
retry_delay *= 2
if retry_delay > RETRY_TIMEOUT:
except litellm_ex.exceptions_tuple() as err:
ex_info = litellm_ex.get_ex_info(err)
if ex_info.name == "ContextWindowExceededError":
exhausted = True
break
should_retry = ex_info.retry
if should_retry:
retry_delay *= 2
if retry_delay > RETRY_TIMEOUT:
should_retry = False
if not should_retry:
self.mdstream = None
self.check_and_open_urls(err, ex_info.description)
break
err_msg = str(err)
if ex_info.description:
self.io.tool_warning(err_msg)
self.io.tool_error(ex_info.description)
else:
self.io.tool_error(err_msg)
self.io.tool_output(f"Retrying in {retry_delay:.1f} seconds...")
time.sleep(retry_delay)
continue
except KeyboardInterrupt:
interrupted = True
break
except litellm.ContextWindowExceededError:
# The input is overflowing the context window!
exhausted = True
break
except litellm.exceptions.BadRequestError as br_err:
self.io.tool_error(f"BadRequestError: {br_err}")
return
except FinishReasonLength:
# We hit the output limit!
if not self.main_model.info.get("supports_assistant_prefill"):
@@ -1161,9 +1288,11 @@ class Coder:
dict(role="assistant", content=self.multi_response_content, prefix=True)
)
except Exception as err:
self.io.tool_error(f"Unexpected error: {err}")
self.mdstream = None
lines = traceback.format_exception(type(err), err, err.__traceback__)
self.io.tool_error("".join(lines))
self.io.tool_warning("".join(lines))
self.io.tool_error(str(err))
self.event("message_send_exception", exception=str(err))
return
finally:
if self.mdstream:
@@ -1193,10 +1322,19 @@ class Coder:
else:
content = ""
try:
self.reply_completed()
except KeyboardInterrupt:
interrupted = True
if not interrupted:
add_rel_files_message = self.check_for_file_mentions(content)
if add_rel_files_message:
if self.reflected_message:
self.reflected_message += "\n\n" + add_rel_files_message
else:
self.reflected_message = add_rel_files_message
return
try:
self.reply_completed()
except KeyboardInterrupt:
interrupted = True
if interrupted:
content += "\n^C KeyboardInterrupt"
@@ -1247,13 +1385,6 @@ class Coder:
self.update_cur_messages()
return
add_rel_files_message = self.check_for_file_mentions(content)
if add_rel_files_message:
if self.reflected_message:
self.reflected_message += "\n\n" + add_rel_files_message
else:
self.reflected_message = add_rel_files_message
def reply_completed(self):
pass
@@ -1296,9 +1427,7 @@ class Coder:
res.append("- Ask for smaller changes in each request.")
res.append("- Break your code into smaller source files.")
if "diff" not in self.main_model.edit_format:
res.append(
"- Use a stronger model like gpt-4o, sonnet or opus that can return diffs."
)
res.append("- Use a stronger model that can return diffs.")
if input_tokens >= max_input_tokens or total_tokens >= max_input_tokens:
res.append("")
@@ -1308,15 +1437,15 @@ class Coder:
res.append("- Use /clear to clear the chat history.")
res.append("- Break your code into smaller source files.")
res.append("")
res.append(f"For more info: {urls.token_limits}")
res = "".join([line + "\n" for line in res])
self.io.tool_error(res)
self.io.offer_url(urls.token_limits)
def lint_edited(self, fnames):
res = ""
for fname in fnames:
if not fname:
continue
errors = self.linter.lint(self.abs_root_path(fname))
if errors:
@@ -1345,7 +1474,7 @@ class Coder:
words = set(word for word in content.split())
# drop sentence punctuation from the end
words = set(word.rstrip(",.!;:") for word in words)
words = set(word.rstrip(",.!;:?") for word in words)
# strip away all kinds of quotes
quotes = "".join(['"', "'", "`"])
@@ -1353,9 +1482,18 @@ class Coder:
addable_rel_fnames = self.get_addable_relative_files()
# Get basenames of files already in chat or read-only
existing_basenames = {os.path.basename(f) for f in self.get_inchat_relative_files()} | {
os.path.basename(self.get_rel_fname(f)) for f in self.abs_read_only_fnames
}
mentioned_rel_fnames = set()
fname_to_rel_fnames = {}
for rel_fname in addable_rel_fnames:
# Skip files that share a basename with files already in chat
if os.path.basename(rel_fname) in existing_basenames:
continue
normalized_rel_fname = rel_fname.replace("\\", "/")
normalized_words = set(word.replace("\\", "/") for word in words)
if normalized_rel_fname in normalized_words:
@@ -1425,6 +1563,16 @@ class Coder:
yield from self.show_send_output_stream(completion)
else:
self.show_send_output(completion)
# Calculate costs for successful responses
self.calculate_and_show_tokens_and_cost(messages, completion)
except LiteLLMExceptions().exceptions_tuple() as err:
ex_info = LiteLLMExceptions().get_ex_info(err)
if ex_info.name == "ContextWindowExceededError":
# Still calculate costs for context window errors
self.calculate_and_show_tokens_and_cost(messages, completion)
raise
except KeyboardInterrupt as kbi:
self.keyboard_interrupt()
raise kbi
@@ -1442,8 +1590,6 @@ class Coder:
if args:
self.io.ai_output(json.dumps(args, indent=4))
self.calculate_and_show_tokens_and_cost(messages, completion)
def show_send_output(self, completion):
if self.verbose:
print(completion)
@@ -1556,7 +1702,6 @@ class Coder:
completion.usage, "cache_creation_input_tokens"
):
self.message_tokens_sent += prompt_tokens
self.message_tokens_sent += cache_hit_tokens
self.message_tokens_sent += cache_write_tokens
else:
self.message_tokens_sent += prompt_tokens
@@ -1638,11 +1783,27 @@ class Coder:
self.usage_report = tokens_report + sep + cost_report
def show_usage_report(self):
if self.usage_report:
self.io.tool_output(self.usage_report)
self.message_cost = 0.0
self.message_tokens_sent = 0
self.message_tokens_received = 0
if not self.usage_report:
return
self.io.tool_output(self.usage_report)
prompt_tokens = self.message_tokens_sent
completion_tokens = self.message_tokens_received
self.event(
"message_send",
main_model=self.main_model,
edit_format=self.edit_format,
prompt_tokens=prompt_tokens,
completion_tokens=completion_tokens,
total_tokens=prompt_tokens + completion_tokens,
cost=self.message_cost,
total_cost=self.total_cost,
)
self.message_cost = 0.0
self.message_tokens_sent = 0
self.message_tokens_received = 0
def get_multi_response_content(self, final=False):
cur = self.multi_response_content or ""
@@ -1717,6 +1878,10 @@ class Coder:
self.check_for_dirty_commit(path)
return True
if self.repo and self.repo.git_ignored_file(path):
self.io.tool_warning(f"Skipping edits to {path} that matches gitignore spec.")
return
if not Path(full_path).exists():
if not self.io.confirm_ask("Create new file?", subject=path):
self.io.tool_output(f"Skipping edits to {path}")
@@ -1811,8 +1976,10 @@ class Coder:
edited = set()
try:
edits = self.get_edits()
edits = self.apply_edits_dry_run(edits)
edits = self.prepare_to_edit(edits)
edited = set(edit[0] for edit in edits)
self.apply_edits(edits)
except ValueError as err:
self.num_malformed_responses += 1
@@ -1940,6 +2107,9 @@ class Coder:
def apply_edits(self, edits):
return
def apply_edits_dry_run(self, edits):
return edits
def run_shell_commands(self):
if not self.suggest_shell_commands:
return ""
@@ -1981,13 +2151,14 @@ class Coder:
self.io.tool_output(f"Running {command}")
# Add the command to input history
self.io.add_to_input_history(f"/run {command.strip()}")
exit_status, output = run_cmd(command, error_print=self.io.tool_error)
exit_status, output = run_cmd(command, error_print=self.io.tool_error, cwd=self.root)
if output:
accumulated_output += f"Output from {command}\n{output}\n"
if accumulated_output.strip() and not self.io.confirm_ask(
if accumulated_output.strip() and self.io.confirm_ask(
"Add command output to the chat?", allow_never=True
):
accumulated_output = ""
return accumulated_output
num_lines = len(accumulated_output.strip().splitlines())
line_plural = "line" if num_lines == 1 else "lines"
self.io.tool_output(f"Added {num_lines} {line_plural} of output to the chat.")
return accumulated_output

View File

@@ -35,29 +35,47 @@ class EditBlockCoder(Coder):
return edits
def apply_edits(self, edits):
def apply_edits_dry_run(self, edits):
return self.apply_edits(edits, dry_run=True)
def apply_edits(self, edits, dry_run=False):
failed = []
passed = []
updated_edits = []
for edit in edits:
path, original, updated = edit
full_path = self.abs_root_path(path)
content = self.io.read_text(full_path)
new_content = do_replace(full_path, content, original, updated, self.fence)
if not new_content:
new_content = None
if Path(full_path).exists():
content = self.io.read_text(full_path)
new_content = do_replace(full_path, content, original, updated, self.fence)
# If the edit failed, and
# this is not a "create a new file" with an empty original...
# https://github.com/Aider-AI/aider/issues/2258
if not new_content and original.strip():
# try patching any of the other files in the chat
for full_path in self.abs_fnames:
content = self.io.read_text(full_path)
new_content = do_replace(full_path, content, original, updated, self.fence)
if new_content:
path = self.get_rel_fname(full_path)
break
updated_edits.append((path, original, updated))
if new_content:
self.io.write_text(full_path, new_content)
if not dry_run:
self.io.write_text(full_path, new_content)
passed.append(edit)
else:
failed.append(edit)
if dry_run:
return updated_edits
if not failed:
return

View File

@@ -11,7 +11,7 @@ Respect and use existing conventions, libraries, etc that are already present in
Take requests for changes to the supplied code.
If the request is ambiguous, ask questions.
Always reply to the user in the same language they are using.
Always reply to the user in {language}.
Once you understand the request you MUST:
@@ -35,7 +35,9 @@ ONLY EVER RETURN CODE IN A *SEARCH/REPLACE BLOCK*!
Just suggest shell commands this way, not example code.
Only suggest complete shell commands that are ready to execute, without placeholders.
Only suggest at most a few shell commands at a time, not more than 1-3.
Only suggest at most a few shell commands at a time, not more than 1-3, one per line.
Do not suggest multi-line shell commands.
All shell commands will run from the root directory of the user's project.
Use the appropriate shell based on the user's system info:
{platform}

View File

@@ -3,5 +3,6 @@ from .editor_editblock_prompts import EditorEditBlockPrompts
class EditorEditBlockCoder(EditBlockCoder):
"A coder that uses search/replace blocks, focused purely on editing files."
edit_format = "editor-diff"
gpt_prompts = EditorEditBlockPrompts()

View File

@@ -3,5 +3,6 @@ from .wholefile_coder import WholeFileCoder
class EditorWholeFileCoder(WholeFileCoder):
"A coder that operates on entire files, focused purely on editing files."
edit_format = "editor-whole"
gpt_prompts = EditorWholeFilePrompts()

View File

@@ -3,7 +3,11 @@
import sys
from pathlib import Path
import git
try:
import git
except ImportError:
git = None
from diff_match_patch import diff_match_patch
from tqdm import tqdm

View File

@@ -12,7 +12,7 @@ Respect and use existing conventions, libraries, etc that are already present in
Take requests for changes to the supplied code.
If the request is ambiguous, ask questions.
Always reply to the user in the same language they are using.
Always reply to the user in {language}.
For each file that needs to be changed, write out the changes similar to a unified diff like `diff -U0` would produce.
"""

View File

@@ -8,7 +8,7 @@ class WholeFilePrompts(CoderPrompts):
Take requests for changes to the supplied code.
If the request is ambiguous, ask questions.
Always reply to the user in the same language they are using.
Always reply to the user in {language}.
{lazy_prompt}
Once you understand the request you MUST:

View File

@@ -14,6 +14,7 @@ from prompt_toolkit.completion import Completion, PathCompleter
from prompt_toolkit.document import Document
from aider import models, prompts, voice
from aider.editor import pipe_editor
from aider.format_settings import format_settings
from aider.help import Help, install_help_extra
from aider.llm import litellm
@@ -42,10 +43,20 @@ class Commands:
verify_ssl=self.verify_ssl,
args=self.args,
parser=self.parser,
verbose=self.verbose,
editor=self.editor,
)
def __init__(
self, io, coder, voice_language=None, verify_ssl=True, args=None, parser=None, verbose=False
self,
io,
coder,
voice_language=None,
verify_ssl=True,
args=None,
parser=None,
verbose=False,
editor=None,
):
self.io = io
self.coder = coder
@@ -60,6 +71,7 @@ class Commands:
self.voice_language = voice_language
self.help = None
self.editor = editor
def cmd_model(self, args):
"Switch to a new LLM"
@@ -91,6 +103,13 @@ class Commands:
("help", "Get help about using aider (usage, config, troubleshoot)."),
("ask", "Ask questions about your code without making any changes."),
("code", "Ask for changes to your code (using the best edit format)."),
(
"architect",
(
"Work with an architect model to design code changes, and an editor to make"
" them."
),
),
]
)
@@ -139,7 +158,7 @@ class Commands:
else:
self.io.tool_output("Please provide a partial model name to search for.")
def cmd_web(self, args):
def cmd_web(self, args, return_content=False):
"Scrape a webpage, convert to markdown and send in a message"
url = args.strip()
@@ -158,11 +177,16 @@ class Commands:
)
content = self.scraper.scrape(url) or ""
content = f"{url}:\n\n" + content
content = f"Here is the content of {url}:\n\n" + content
if return_content:
return content
self.io.tool_output("... done.")
self.io.tool_output("... added to chat.")
return content
self.coder.cur_messages += [
dict(role="user", content=content),
dict(role="assistant", content="Ok."),
]
def is_command(self, inp):
return inp[0] in "/!"
@@ -223,6 +247,7 @@ class Commands:
def run(self, inp):
if inp.startswith("!"):
self.coder.event("command_run")
return self.do_run("run", inp[1:])
res = self.matching_commands(inp)
@@ -230,9 +255,13 @@ class Commands:
return
matching_commands, first_word, rest_inp = res
if len(matching_commands) == 1:
return self.do_run(matching_commands[0][1:], rest_inp)
command = matching_commands[0][1:]
self.coder.event(f"command_{command}")
return self.do_run(command, rest_inp)
elif first_word in matching_commands:
return self.do_run(first_word[1:], rest_inp)
command = first_word[1:]
self.coder.event(f"command_{command}")
return self.do_run(command, rest_inp)
elif len(matching_commands) > 1:
self.io.tool_error(f"Ambiguous command: {', '.join(matching_commands)}")
else:
@@ -568,6 +597,10 @@ class Commands:
self.io.tool_output(f"Diff since {commit_before_message[:7]}...")
if self.coder.pretty:
run_cmd(f"git diff {commit_before_message}")
return
diff = self.coder.repo.diff_commits(
self.coder.pretty,
commit_before_message,
@@ -724,7 +757,7 @@ class Commands:
except OSError as e:
self.io.tool_error(f"Error creating file {fname}: {e}")
for matched_file in all_matched_files:
for matched_file in sorted(all_matched_files):
abs_file_path = self.coder.abs_root_path(matched_file)
if not abs_file_path.startswith(self.coder.root) and not is_image_file(matched_file):
@@ -733,6 +766,10 @@ class Commands:
)
continue
if self.coder.repo and self.coder.repo.git_ignored_file(matched_file):
self.io.tool_error(f"Can't add {matched_file} which is in gitignore")
continue
if abs_file_path in self.coder.abs_fnames:
self.io.tool_error(f"{matched_file} is already in the chat as an editable file")
continue
@@ -748,7 +785,9 @@ class Commands:
f"Cannot add {matched_file} as it's not part of the repository"
)
else:
if is_image_file(matched_file) and not self.coder.main_model.accepts_images:
if is_image_file(matched_file) and not self.coder.main_model.info.get(
"supports_vision"
):
self.io.tool_error(
f"Cannot add image file {matched_file} as the"
f" {self.coder.main_model.name} does not support images."
@@ -759,7 +798,8 @@ class Commands:
self.io.tool_error(f"Unable to read {matched_file}")
else:
self.coder.abs_fnames.add(abs_file_path)
self.io.tool_output(f"Added {matched_file} to the chat")
fname = self.coder.get_rel_fname(abs_file_path)
self.io.tool_output(f"Added {fname} to the chat")
self.coder.check_added_files()
def completions_drop(self):
@@ -782,15 +822,33 @@ class Commands:
# Expand tilde in the path
expanded_word = os.path.expanduser(word)
# Handle read-only files separately, without glob_filtered_to_repo
read_only_matched = [f for f in self.coder.abs_read_only_fnames if expanded_word in f]
# Handle read-only files with substring matching and samefile check
read_only_matched = []
for f in self.coder.abs_read_only_fnames:
if expanded_word in f:
read_only_matched.append(f)
continue
if read_only_matched:
for matched_file in read_only_matched:
self.coder.abs_read_only_fnames.remove(matched_file)
self.io.tool_output(f"Removed read-only file {matched_file} from the chat")
# Try samefile comparison for relative paths
try:
abs_word = os.path.abspath(expanded_word)
if os.path.samefile(abs_word, f):
read_only_matched.append(f)
except (FileNotFoundError, OSError):
continue
matched_files = self.glob_filtered_to_repo(expanded_word)
for matched_file in read_only_matched:
self.coder.abs_read_only_fnames.remove(matched_file)
self.io.tool_output(f"Removed read-only file {matched_file} from the chat")
# For editable files, use glob if word contains glob chars, otherwise use substring
if any(c in expanded_word for c in "*?[]"):
matched_files = self.glob_filtered_to_repo(expanded_word)
else:
# Use substring matching like we do for read-only files
matched_files = [
self.coder.get_rel_fname(f) for f in self.coder.abs_fnames if expanded_word in f
]
if not matched_files:
matched_files.append(expanded_word)
@@ -850,9 +908,8 @@ class Commands:
def cmd_run(self, args, add_on_nonzero_exit=False):
"Run a shell command and optionally add the output to the chat (alias: !)"
exit_status, combined_output = run_cmd(
args, verbose=self.verbose, error_print=self.io.tool_error
args, verbose=self.verbose, error_print=self.io.tool_error, cwd=self.coder.root
)
instructions = None
if combined_output is None:
return
@@ -860,44 +917,34 @@ class Commands:
if add_on_nonzero_exit:
add = exit_status != 0
else:
self.io.tool_output()
response = self.io.prompt_ask(
"Add the output to the chat?\n(Y)es/(n)o/message with instructions:",
).strip()
self.io.tool_output()
if response.lower() in ["yes", "y"]:
add = True
elif response.lower() in ["no", "n"]:
add = False
else:
add = True
instructions = response
if response.strip():
self.io.user_input(response, log_only=True)
self.io.add_to_input_history(response)
add = self.io.confirm_ask("Add command output to the chat?")
if add:
for line in combined_output.splitlines():
self.io.tool_output(line, log_only=True)
num_lines = len(combined_output.strip().splitlines())
line_plural = "line" if num_lines == 1 else "lines"
self.io.tool_output(f"Added {num_lines} {line_plural} of output to the chat.")
msg = prompts.run_output.format(
command=args,
output=combined_output,
)
if instructions:
msg = instructions + "\n\n" + msg
self.coder.cur_messages += [
dict(role="user", content=msg),
dict(role="assistant", content="Ok."),
]
return msg
if add and exit_status != 0:
self.io.placeholder = "Fix that"
def cmd_exit(self, args):
"Exit the application"
self.coder.event("exit", reason="/exit")
sys.exit()
def cmd_quit(self, args):
"Exit the application"
sys.exit()
self.cmd_exit(args)
def cmd_ls(self, args):
"List all known files and indicate which are included in the chat session"
@@ -961,6 +1008,7 @@ class Commands:
self.basic_help()
return
self.coder.event("interactive help")
from aider.coders import Coder
if not self.help:
@@ -1068,43 +1116,23 @@ class Commands:
self.io.tool_error("To use /voice you must provide an OpenAI API key.")
return
try:
self.voice = voice.Voice(audio_format=self.args.voice_format)
self.voice = voice.Voice(
audio_format=self.args.voice_format, device_name=self.args.voice_input_device
)
except voice.SoundDeviceError:
self.io.tool_error(
"Unable to import `sounddevice` and/or `soundfile`, is portaudio installed?"
)
return
history_iter = self.io.get_input_history()
history = []
size = 0
for line in history_iter:
if line.startswith("/"):
continue
if line in history:
continue
if size + len(line) > 1024:
break
size += len(line)
history.append(line)
history.reverse()
history = "\n".join(history)
try:
text = self.voice.record_and_transcribe(history, language=self.voice_language)
text = self.voice.record_and_transcribe(None, language=self.voice_language)
except litellm.OpenAIError as err:
self.io.tool_error(f"Unable to use OpenAI whisper model: {err}")
return
if text:
self.io.add_to_input_history(text)
self.io.print()
self.io.user_input(text, log_only=False)
self.io.print()
return text
self.io.placeholder = text
def cmd_paste(self, args):
"""Paste image/text from the clipboard into the chat.\
@@ -1157,31 +1185,52 @@ class Commands:
self.io.tool_error(f"Error processing clipboard content: {e}")
def cmd_read_only(self, args):
"Add files to the chat that are for reference, not to be edited"
"Add files to the chat that are for reference only, or turn added files to read-only"
if not args.strip():
self.io.tool_error("Please provide filenames or directories to read.")
# Convert all files in chat to read-only
for fname in list(self.coder.abs_fnames):
self.coder.abs_fnames.remove(fname)
self.coder.abs_read_only_fnames.add(fname)
rel_fname = self.coder.get_rel_fname(fname)
self.io.tool_output(f"Converted {rel_fname} to read-only")
return
filenames = parse_quoted_filenames(args)
all_paths = []
# First collect all expanded paths
for pattern in filenames:
# Expand tilde for home directory
expanded_pattern = expanduser(pattern)
if os.path.isabs(expanded_pattern):
# For absolute paths, glob it
matches = list(glob.glob(expanded_pattern))
else:
# For relative paths and globs, use glob from the root directory
matches = list(Path(self.coder.root).glob(expanded_pattern))
expanded_paths = glob.glob(expanded_pattern, recursive=True)
if not expanded_paths:
if not matches:
self.io.tool_error(f"No matches found for: {pattern}")
continue
else:
all_paths.extend(matches)
for path in expanded_paths:
abs_path = self.coder.abs_root_path(path)
if os.path.isfile(abs_path):
self._add_read_only_file(abs_path, path)
elif os.path.isdir(abs_path):
self._add_read_only_directory(abs_path, path)
else:
self.io.tool_error(f"Not a file or directory: {abs_path}")
# Then process them in sorted order
for path in sorted(all_paths):
abs_path = self.coder.abs_root_path(path)
if os.path.isfile(abs_path):
self._add_read_only_file(abs_path, path)
elif os.path.isdir(abs_path):
self._add_read_only_directory(abs_path, path)
else:
self.io.tool_error(f"Not a file or directory: {abs_path}")
def _add_read_only_file(self, abs_path, original_name):
if is_image_file(original_name) and not self.coder.main_model.info.get("supports_vision"):
self.io.tool_error(
f"Cannot add image file {original_name} as the"
f" {self.coder.main_model.name} does not support images."
)
return
if abs_path in self.coder.abs_read_only_fnames:
self.io.tool_error(f"{original_name} is already in the chat as a read-only file")
return
@@ -1235,6 +1284,67 @@ class Commands:
output = f"{announcements}\n{settings}"
self.io.tool_output(output)
def completions_raw_load(self, document, complete_event):
return self.completions_raw_read_only(document, complete_event)
def cmd_load(self, args):
"Load and execute commands from a file"
if not args.strip():
self.io.tool_error("Please provide a filename containing commands to load.")
return
try:
with open(args.strip(), "r", encoding=self.io.encoding, errors="replace") as f:
commands = f.readlines()
except FileNotFoundError:
self.io.tool_error(f"File not found: {args}")
return
except Exception as e:
self.io.tool_error(f"Error reading file: {e}")
return
for cmd in commands:
cmd = cmd.strip()
if not cmd or cmd.startswith("#"):
continue
self.io.tool_output(f"\nExecuting: {cmd}")
self.run(cmd)
def completions_raw_save(self, document, complete_event):
return self.completions_raw_read_only(document, complete_event)
def cmd_save(self, args):
"Save commands to a file that can reconstruct the current chat session's files"
if not args.strip():
self.io.tool_error("Please provide a filename to save the commands to.")
return
try:
with open(args.strip(), "w", encoding=self.io.encoding) as f:
f.write("/drop\n")
# Write commands to add editable files
for fname in sorted(self.coder.abs_fnames):
rel_fname = self.coder.get_rel_fname(fname)
f.write(f"/add {rel_fname}\n")
# Write commands to add read-only files
for fname in sorted(self.coder.abs_read_only_fnames):
# Use absolute path for files outside repo root, relative path for files inside
if Path(fname).is_relative_to(self.coder.root):
rel_fname = self.coder.get_rel_fname(fname)
f.write(f"/read-only {rel_fname}\n")
else:
f.write(f"/read-only {fname}\n")
self.io.tool_output(f"Saved commands to {args.strip()}")
except Exception as e:
self.io.tool_error(f"Error saving commands to file: {e}")
def cmd_multiline_mode(self, args):
"Toggle multiline mode (swaps behavior of Enter and Meta+Enter)"
self.io.toggle_multiline_mode()
def cmd_copy(self, args):
"Copy the last assistant message to the clipboard"
all_messages = self.coder.done_messages + self.coder.cur_messages
@@ -1276,6 +1386,57 @@ class Commands:
report_github_issue(issue_text, title=title, confirm=False)
def cmd_editor(self, initial_content=""):
"Open an editor to write a prompt"
user_input = pipe_editor(initial_content, suffix="md", editor=self.editor)
if user_input.strip():
self.io.set_placeholder(user_input.rstrip())
def cmd_copy_context(self, args=None):
"""Copy the current chat context as markdown, suitable to paste into a web UI"""
chunks = self.coder.format_chat_chunks()
markdown = ""
# Only include specified chunks in order
for messages in [chunks.repo, chunks.readonly_files, chunks.chat_files]:
for msg in messages:
# Only include user messages
if msg["role"] != "user":
continue
content = msg["content"]
# Handle image/multipart content
if isinstance(content, list):
for part in content:
if part.get("type") == "text":
markdown += part["text"] + "\n\n"
else:
markdown += content + "\n\n"
args = args or ""
markdown += f"""
Just tell me how to edit the files to make the changes.
Don't give me back entire files.
Just show me the edits I need to make.
{args}
"""
try:
pyperclip.copy(markdown)
self.io.tool_output("Copied code context to clipboard.")
except pyperclip.PyperclipException as e:
self.io.tool_error(f"Failed to copy to clipboard: {str(e)}")
self.io.tool_output(
"You may need to install xclip or xsel on Linux, or pbcopy on macOS."
)
except Exception as e:
self.io.tool_error(f"An unexpected error occurred while copying to clipboard: {str(e)}")
def expand_subdir(file_path):
if file_path.is_file():

72
aider/copypaste.py Normal file
View File

@@ -0,0 +1,72 @@
import threading
import time
import pyperclip
class ClipboardWatcher:
"""Watches clipboard for changes and updates IO placeholder"""
def __init__(self, io, verbose=False):
self.io = io
self.verbose = verbose
self.stop_event = None
self.watcher_thread = None
self.last_clipboard = None
self.io.clipboard_watcher = self
def start(self):
"""Start watching clipboard for changes"""
self.stop_event = threading.Event()
self.last_clipboard = pyperclip.paste()
def watch_clipboard():
while not self.stop_event.is_set():
try:
current = pyperclip.paste()
if current != self.last_clipboard:
self.last_clipboard = current
self.io.interrupt_input()
self.io.placeholder = current
if len(current.splitlines()) > 1:
self.io.placeholder = "\n" + self.io.placeholder + "\n"
time.sleep(0.5)
except Exception as e:
if self.verbose:
from aider.dump import dump
dump(f"Clipboard watcher error: {e}")
continue
self.watcher_thread = threading.Thread(target=watch_clipboard, daemon=True)
self.watcher_thread.start()
def stop(self):
"""Stop watching clipboard for changes"""
if self.stop_event:
self.stop_event.set()
if self.watcher_thread:
self.watcher_thread.join()
self.watcher_thread = None
self.stop_event = None
def main():
"""Example usage of the clipboard watcher"""
from aider.io import InputOutput
io = InputOutput()
watcher = ClipboardWatcher(io, verbose=True)
try:
watcher.start()
while True:
time.sleep(1)
except KeyboardInterrupt:
print("\nStopped watching clipboard")
watcher.stop()
if __name__ == "__main__":
main()

View File

@@ -50,7 +50,6 @@ def diff_partial_update(lines_orig, lines_updated, final=False, fname=None):
# dump(lines_orig)
# dump(lines_updated)
assert_newlines(lines_orig)
assert_newlines(lines_orig)
num_orig_lines = len(lines_orig)

146
aider/editor.py Normal file
View File

@@ -0,0 +1,146 @@
"""
Editor module for handling system text editor interactions.
This module provides functionality to:
- Discover and launch the system's configured text editor
- Create and manage temporary files for editing
- Handle editor preferences from environment variables
- Support cross-platform editor operations
"""
import os
import platform
import shlex
import subprocess
import tempfile
from rich.console import Console
DEFAULT_EDITOR_NIX = "vi"
DEFAULT_EDITOR_OS_X = "vim"
DEFAULT_EDITOR_WINDOWS = "notepad"
console = Console()
def print_status_message(success, message, style=None):
"""
Print a status message with appropriate styling.
:param success: Whether the operation was successful
:param message: The message to display
:param style: Optional style override. If None, uses green for success and red for failure
"""
if style is None:
style = "bold green" if success else "bold red"
console.print(message, style=style)
print("")
def write_temp_file(
input_data="",
suffix=None,
prefix=None,
dir=None,
):
"""
Create a temporary file with the given input data.
:param input_data: Content to write to the temporary file
:param suffix: Optional file extension (without the dot)
:param prefix: Optional prefix for the temporary filename
:param dir: Optional directory to create the file in
:return: Path to the created temporary file
:raises: OSError if file creation or writing fails
"""
kwargs = {"prefix": prefix, "dir": dir}
if suffix:
kwargs["suffix"] = f".{suffix}"
fd, filepath = tempfile.mkstemp(**kwargs)
try:
with os.fdopen(fd, "w") as f:
f.write(input_data)
except Exception:
os.close(fd)
raise
return filepath
def get_environment_editor(default=None):
"""
Fetches the preferred editor from the environment variables.
This function checks the following environment variables in order to
determine the user's preferred editor:
- VISUAL
- EDITOR
:param default: The default editor to return if no environment variable is set.
:type default: str or None
:return: The preferred editor as specified by environment variables or the default value.
:rtype: str or None
"""
editor = os.environ.get("VISUAL", os.environ.get("EDITOR", default))
return editor
def discover_editor(editor_override=None):
"""
Discovers and returns the appropriate editor command as a list of arguments.
Handles cases where the editor command includes arguments, including quoted arguments
with spaces (e.g. 'vim -c "set noswapfile"').
:return: A list of command parts ready for subprocess execution
:rtype: list[str]
"""
system = platform.system()
if system == "Windows":
default_editor = DEFAULT_EDITOR_WINDOWS
elif system == "Darwin":
default_editor = DEFAULT_EDITOR_OS_X
else:
default_editor = DEFAULT_EDITOR_NIX
if editor_override:
editor = editor_override
else:
editor = get_environment_editor(default_editor)
try:
return shlex.split(editor)
except ValueError as e:
raise RuntimeError(f"Invalid editor command format '{editor}': {e}")
def pipe_editor(input_data="", suffix=None, editor=None):
"""
Opens the system editor with optional input data and returns the edited content.
This function creates a temporary file with the provided input data, opens it in
the system editor, waits for the user to make changes and close the editor, then
reads and returns the modified content. The temporary file is deleted afterwards.
:param input_data: Initial content to populate the editor with
:type input_data: str
:param suffix: Optional file extension for the temporary file (e.g. '.txt', '.md')
:type suffix: str or None
:return: The edited content after the editor is closed
:rtype: str
"""
filepath = write_temp_file(input_data, suffix)
command_parts = discover_editor(editor)
command_parts.append(filepath)
subprocess.call(command_parts)
with open(filepath, "r") as f:
output_data = f.read()
try:
os.remove(filepath)
except PermissionError:
print_status_message(
False,
(
f"WARNING: Unable to delete temporary file {filepath!r}. You may need to delete it"
" manually."
),
)
return output_data

90
aider/exceptions.py Normal file
View File

@@ -0,0 +1,90 @@
from dataclasses import dataclass
@dataclass
class ExInfo:
name: str
retry: bool
description: str
EXCEPTIONS = [
ExInfo("APIConnectionError", True, None),
ExInfo("APIError", True, None),
ExInfo("APIResponseValidationError", True, None),
ExInfo(
"AuthenticationError",
False,
"The API provider is not able to authenticate you. Check your API key.",
),
ExInfo("AzureOpenAIError", True, None),
ExInfo("BadRequestError", False, None),
ExInfo("BudgetExceededError", True, None),
ExInfo(
"ContentPolicyViolationError",
True,
"The API provider has refused the request due to a safety policy about the content.",
),
ExInfo("ContextWindowExceededError", False, None), # special case handled in base_coder
ExInfo("InternalServerError", True, "The API provider's servers are down or overloaded."),
ExInfo("InvalidRequestError", True, None),
ExInfo("JSONSchemaValidationError", True, None),
ExInfo("NotFoundError", False, None),
ExInfo("OpenAIError", True, None),
ExInfo(
"RateLimitError",
True,
"The API provider has rate limited you. Try again later or check your quotas.",
),
ExInfo("RouterRateLimitError", True, None),
ExInfo("ServiceUnavailableError", True, "The API provider's servers are down or overloaded."),
ExInfo("UnprocessableEntityError", True, None),
ExInfo("UnsupportedParamsError", True, None),
ExInfo(
"Timeout",
True,
"The API provider timed out without returning a response. They may be down or overloaded.",
),
]
class LiteLLMExceptions:
exceptions = dict()
def __init__(self):
self._load()
def _load(self, strict=False):
import litellm
for var in dir(litellm):
if not var.endswith("Error"):
continue
ex_info = None
for exi in EXCEPTIONS:
if var == exi.name:
ex_info = exi
break
if strict and not ex_info:
raise ValueError(f"{var} is in litellm but not in aider's exceptions list")
ex = getattr(litellm, var)
self.exceptions[ex] = ex_info
def exceptions_tuple(self):
return tuple(self.exceptions)
def get_ex_info(self, ex):
"""Return the ExInfo for a given exception instance"""
import litellm
if ex.__class__ is litellm.APIConnectionError:
if "google.auth" in str(ex):
return ExInfo(
"APIConnectionError", False, "You need to: pip install google-generativeai"
)
if "boto3" in str(ex):
return ExInfo("APIConnectionError", False, "You need to: pip install boto3")
return self.exceptions.get(ex.__class__, ExInfo(None, None, None))

View File

@@ -1,4 +1,7 @@
# This needs to sync with MANIFEST.in
exclude_website_pats = [
"**/.DS_Store",
"examples/**",
"_posts/**",
"HISTORY.md",

View File

@@ -108,9 +108,7 @@ class ChatSummary:
for model in self.models:
try:
summary = simple_send_with_retries(
model.name, summarize_messages, extra_params=model.extra_params
)
summary = simple_send_with_retries(model, summarize_messages)
if summary is not None:
summary = prompts.summary_prefix + summary
return [dict(role="user", content=summary)]

View File

@@ -1,20 +1,27 @@
import base64
import os
import signal
import time
import webbrowser
from collections import defaultdict
from dataclasses import dataclass
from datetime import datetime
from io import StringIO
from pathlib import Path
from prompt_toolkit.completion import Completer, Completion, ThreadedCompleter
from prompt_toolkit.cursor_shapes import ModalCursorShapeConfig
from prompt_toolkit.enums import EditingMode
from prompt_toolkit.filters import Condition, is_searching
from prompt_toolkit.history import FileHistory
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit.keys import Keys
from prompt_toolkit.lexers import PygmentsLexer
from prompt_toolkit.shortcuts import CompleteStyle, PromptSession
from prompt_toolkit.styles import Style
from pygments.lexers import MarkdownLexer, guess_lexer_for_filename
from pygments.token import Token
from rich.columns import Columns
from rich.console import Console
from rich.markdown import Markdown
from rich.style import Style as RichStyle
@@ -169,6 +176,7 @@ class AutoCompleter(Completer):
class InputOutput:
num_error_outputs = 0
num_user_asks = 0
clipboard_watcher = None
def __init__(
self,
@@ -192,9 +200,15 @@ class InputOutput:
dry_run=False,
llm_history_file=None,
editingmode=EditingMode.EMACS,
fancy_input=True,
file_watcher=None,
multiline_mode=False,
):
self.placeholder = None
self.interrupted = False
self.never_prompts = set()
self.editingmode = editingmode
self.multiline_mode = multiline_mode
no_color = os.environ.get("NO_COLOR")
if no_color is not None and no_color != "":
pretty = False
@@ -234,15 +248,16 @@ class InputOutput:
self.append_chat_history(f"\n# aider chat started at {current_time}\n\n")
self.prompt_session = None
if self.pretty:
if fancy_input:
# Initialize PromptSession
session_kwargs = {
"input": self.input,
"output": self.output,
"lexer": PygmentsLexer(MarkdownLexer),
"editing_mode": self.editingmode,
"cursor": ModalCursorShapeConfig(),
}
if self.editingmode == EditingMode.VI:
session_kwargs["cursor"] = ModalCursorShapeConfig()
if self.input_history_file is not None:
session_kwargs["history"] = FileHistory(self.input_history_file)
try:
@@ -254,6 +269,8 @@ class InputOutput:
else:
self.console = Console(force_terminal=False, no_color=True) # non-pretty
self.file_watcher = file_watcher
def _get_style(self):
style_dict = {}
if not self.pretty:
@@ -307,7 +324,7 @@ class InputOutput:
self.tool_error(f"{filename}: {e}")
return
def read_text(self, filename):
def read_text(self, filename, silent=False):
if is_image_file(filename):
return self.read_image(filename)
@@ -315,27 +332,53 @@ class InputOutput:
with open(str(filename), "r", encoding=self.encoding) as f:
return f.read()
except OSError as err:
self.tool_error(f"{filename}: unable to read: {err}")
if not silent:
self.tool_error(f"{filename}: unable to read: {err}")
return
except FileNotFoundError:
self.tool_error(f"{filename}: file not found error")
if not silent:
self.tool_error(f"{filename}: file not found error")
return
except IsADirectoryError:
self.tool_error(f"{filename}: is a directory")
if not silent:
self.tool_error(f"{filename}: is a directory")
return
except UnicodeError as e:
self.tool_error(f"{filename}: {e}")
self.tool_error("Use --encoding to set the unicode encoding.")
if not silent:
self.tool_error(f"{filename}: {e}")
self.tool_error("Use --encoding to set the unicode encoding.")
return
def write_text(self, filename, content):
def write_text(self, filename, content, max_retries=5, initial_delay=0.1):
"""
Writes content to a file, retrying with progressive backoff if the file is locked.
:param filename: Path to the file to write.
:param content: Content to write to the file.
:param max_retries: Maximum number of retries if a file lock is encountered.
:param initial_delay: Initial delay (in seconds) before the first retry.
"""
if self.dry_run:
return
try:
with open(str(filename), "w", encoding=self.encoding) as f:
f.write(content)
except OSError as err:
self.tool_error(f"Unable to write file {filename}: {err}")
delay = initial_delay
for attempt in range(max_retries):
try:
with open(str(filename), "w", encoding=self.encoding) as f:
f.write(content)
return # Successfully wrote the file
except PermissionError as err:
if attempt < max_retries - 1:
time.sleep(delay)
delay *= 2 # Exponential backoff
else:
self.tool_error(
f"Unable to write file {filename} after {max_retries} attempts: {err}"
)
raise
except OSError as err:
self.tool_error(f"Unable to write file {filename}: {err}")
raise
def rule(self):
if self.pretty:
@@ -344,6 +387,13 @@ class InputOutput:
else:
print()
def interrupt_input(self):
if self.prompt_session and self.prompt_session.app:
# Store any partial input before interrupting
self.placeholder = self.prompt_session.app.current_buffer.text
self.interrupted = True
self.prompt_session.app.exit()
def get_input(
self,
root,
@@ -359,11 +409,13 @@ class InputOutput:
show = ""
if rel_fnames:
rel_read_only_fnames = [
os.path.relpath(fname, root) for fname in (abs_read_only_fnames or [])
get_rel_fname(fname, root) for fname in (abs_read_only_fnames or [])
]
show = self.format_files_for_input(rel_fnames, rel_read_only_fnames)
if edit_format:
show += edit_format
if self.multiline_mode:
show += (" " if edit_format else "") + "multi"
show += "> "
inp = ""
@@ -382,16 +434,51 @@ class InputOutput:
)
)
def suspend_to_bg(event):
"""Suspend currently running application."""
event.app.suspend_to_background()
kb = KeyBindings()
@kb.add(Keys.ControlZ, filter=Condition(lambda: hasattr(signal, "SIGTSTP")))
def _(event):
"Suspend to background with ctrl-z"
suspend_to_bg(event)
@kb.add("c-space")
def _(event):
"Ignore Ctrl when pressing space bar"
event.current_buffer.insert_text(" ")
@kb.add("escape", "c-m", eager=True)
@kb.add("c-up")
def _(event):
event.current_buffer.insert_text("\n")
"Navigate backward through history"
event.current_buffer.history_backward()
@kb.add("c-down")
def _(event):
"Navigate forward through history"
event.current_buffer.history_forward()
@kb.add("enter", eager=True, filter=~is_searching)
def _(event):
"Handle Enter key press"
if self.multiline_mode:
# In multiline mode, Enter adds a newline
event.current_buffer.insert_text("\n")
else:
# In normal mode, Enter submits
event.current_buffer.validate_and_handle()
@kb.add("escape", "enter", eager=True, filter=~is_searching) # This is Alt+Enter
def _(event):
"Handle Alt+Enter key press"
if self.multiline_mode:
# In multiline mode, Alt+Enter submits
event.current_buffer.validate_and_handle()
else:
# In normal mode, Alt+Enter adds a newline
event.current_buffer.insert_text("\n")
while True:
if multiline_input:
@@ -399,8 +486,20 @@ class InputOutput:
try:
if self.prompt_session:
# Use placeholder if set, then clear it
default = self.placeholder or ""
self.placeholder = None
self.interrupted = False
if not multiline_input:
if self.file_watcher:
self.file_watcher.start()
if self.clipboard_watcher:
self.clipboard_watcher.start()
line = self.prompt_session.prompt(
show,
default=default,
completer=completer_instance,
reserve_space_for_menu=4,
complete_style=CompleteStyle.MULTI_COLUMN,
@@ -409,17 +508,63 @@ class InputOutput:
)
else:
line = input(show)
# Check if we were interrupted by a file change
if self.interrupted:
line = line or ""
if self.file_watcher:
cmd = self.file_watcher.process_changes()
return cmd
except EOFError:
raise
except Exception as err:
import traceback
self.tool_error(str(err))
self.tool_error(traceback.format_exc())
return ""
except UnicodeEncodeError as err:
self.tool_error(str(err))
return ""
finally:
if self.file_watcher:
self.file_watcher.stop()
if self.clipboard_watcher:
self.clipboard_watcher.stop()
if line and line[0] == "{" and not multiline_input:
multiline_input = True
inp += line[1:] + "\n"
if line.strip("\r\n") and not multiline_input:
stripped = line.strip("\r\n")
if stripped == "{":
multiline_input = True
multiline_tag = None
inp += ""
elif stripped[0] == "{":
# Extract tag if it exists (only alphanumeric chars)
tag = "".join(c for c in stripped[1:] if c.isalnum())
if stripped == "{" + tag:
multiline_input = True
multiline_tag = tag
inp += ""
else:
inp = line
break
else:
inp = line
break
continue
elif line and line[-1] == "}" and multiline_input:
inp += line[:-1] + "\n"
break
elif multiline_input and line.strip():
if multiline_tag:
# Check if line is exactly "tag}"
if line.strip("\r\n") == f"{multiline_tag}}}":
break
else:
inp += line + "\n"
# Check if line is exactly "}"
elif line.strip("\r\n") == "}":
break
else:
inp += line + "\n"
elif multiline_input:
inp += line + "\n"
else:
@@ -433,10 +578,13 @@ class InputOutput:
def add_to_input_history(self, inp):
if not self.input_history_file:
return
FileHistory(self.input_history_file).append_string(inp)
# Also add to the in-memory history if it exists
if hasattr(self, "session") and hasattr(self.session, "history"):
self.session.history.append_string(inp)
try:
FileHistory(self.input_history_file).append_string(inp)
# Also add to the in-memory history if it exists
if self.prompt_session and self.prompt_session.history:
self.prompt_session.history.append_string(inp)
except OSError as err:
self.tool_warning(f"Unable to write to input history file: {err}")
def get_input_history(self):
if not self.input_history_file:
@@ -453,14 +601,17 @@ class InputOutput:
log_file.write(f"{role.upper()} {timestamp}\n")
log_file.write(content + "\n")
def display_user_input(self, inp):
if self.pretty and self.user_input_color:
style = dict(style=self.user_input_color)
else:
style = dict()
self.console.print(Text(inp), **style)
def user_input(self, inp, log_only=True):
if not log_only:
if self.pretty and self.user_input_color:
style = dict(style=self.user_input_color)
else:
style = dict()
self.console.print(Text(inp), **style)
self.display_user_input(inp)
prefix = "####"
if inp:
@@ -480,6 +631,15 @@ class InputOutput:
hist = "\n" + content.strip() + "\n\n"
self.append_chat_history(hist)
def offer_url(self, url, prompt="Open URL for more info?", allow_never=True):
"""Offer to open a URL in the browser, returns True if opened."""
if url in self.never_prompts:
return False
if self.confirm_ask(prompt, subject=url, allow_never=allow_never):
webbrowser.open(url)
return True
return False
def confirm_ask(
self,
question,
@@ -489,6 +649,9 @@ class InputOutput:
group=None,
allow_never=False,
):
# Temporarily disable multiline mode for yes/no prompts
orig_multiline = self.multiline_mode
self.multiline_mode = False
self.num_user_asks += 1
question_id = (question, subject)
@@ -546,6 +709,7 @@ class InputOutput:
res = self.prompt_session.prompt(
question,
style=style,
complete_while_typing=False,
)
else:
res = input(question)
@@ -586,9 +750,15 @@ class InputOutput:
hist = f"{question.strip()} {res}"
self.append_chat_history(hist, linebreak=True, blockquote=True)
# Restore original multiline mode
self.multiline_mode = orig_multiline
return is_yes
def prompt_ask(self, question, default="", subject=None):
# Temporarily disable multiline mode for prompts
orig_multiline = self.multiline_mode
self.multiline_mode = False
self.num_user_asks += 1
if subject:
@@ -612,6 +782,9 @@ class InputOutput:
if self.yes in (True, False):
self.tool_output(hist)
# Restore original multiline mode
self.multiline_mode = orig_multiline
return res
def _tool_message(self, message="", strip=True, color=None):
@@ -674,9 +847,25 @@ class InputOutput:
self.console.print(show_resp)
def set_placeholder(self, placeholder):
"""Set a one-time placeholder text for the next input prompt."""
self.placeholder = placeholder
def print(self, message=""):
print(message)
def toggle_multiline_mode(self):
"""Toggle between normal and multiline input modes"""
self.multiline_mode = not self.multiline_mode
if self.multiline_mode:
self.tool_output(
"Multiline mode: Enabled. Enter inserts newline, Alt-Enter submits text"
)
else:
self.tool_output(
"Multiline mode: Disabled. Alt-Enter inserts newline, Enter submits text"
)
def append_chat_history(self, text, linebreak=False, blockquote=False, strip=True):
if blockquote:
if strip:
@@ -692,22 +881,55 @@ class InputOutput:
try:
with self.chat_history_file.open("a", encoding=self.encoding, errors="ignore") as f:
f.write(text)
except (PermissionError, OSError):
self.tool_error(
f"Warning: Unable to write to chat history file {self.chat_history_file}."
" Permission denied."
)
except (PermissionError, OSError) as err:
print(f"Warning: Unable to write to chat history file {self.chat_history_file}.")
print(err)
self.chat_history_file = None # Disable further attempts to write
def format_files_for_input(self, rel_fnames, rel_read_only_fnames):
read_only_files = []
for full_path in rel_read_only_fnames or []:
read_only_files.append(f"{full_path} (read only)")
if not self.pretty:
read_only_files = []
for full_path in sorted(rel_read_only_fnames or []):
read_only_files.append(f"{full_path} (read only)")
editable_files = []
for full_path in rel_fnames:
if full_path in rel_read_only_fnames:
continue
editable_files.append(f"{full_path}")
editable_files = []
for full_path in sorted(rel_fnames):
if full_path in rel_read_only_fnames:
continue
editable_files.append(f"{full_path}")
return "\n".join(read_only_files + editable_files) + "\n"
return "\n".join(read_only_files + editable_files) + "\n"
output = StringIO()
console = Console(file=output, force_terminal=False)
read_only_files = sorted(rel_read_only_fnames or [])
editable_files = [f for f in sorted(rel_fnames) if f not in rel_read_only_fnames]
if read_only_files:
files_with_label = ["Readonly:"] + read_only_files
read_only_output = StringIO()
Console(file=read_only_output, force_terminal=False).print(Columns(files_with_label))
read_only_lines = read_only_output.getvalue().splitlines()
console.print(Columns(files_with_label))
if editable_files:
files_with_label = editable_files
if read_only_files:
files_with_label = ["Editable:"] + editable_files
editable_output = StringIO()
Console(file=editable_output, force_terminal=False).print(Columns(files_with_label))
editable_lines = editable_output.getvalue().splitlines()
if len(read_only_lines) > 1 or len(editable_lines) > 1:
console.print()
console.print(Columns(files_with_label))
return output.getvalue()
def get_rel_fname(fname, root):
try:
return os.path.relpath(fname, root)
except ValueError:
return fname

View File

@@ -49,11 +49,11 @@ class Linter:
try:
process = subprocess.Popen(
cmd,
cwd=self.root,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding=self.encoding,
errors="replace",
cwd=self.root,
)
except OSError as err:
print(f"Unable to execute lint command: {err}")
@@ -152,12 +152,12 @@ class Linter:
try:
result = subprocess.run(
flake8_cmd,
cwd=self.root,
capture_output=True,
text=True,
check=False,
encoding=self.encoding,
errors="replace",
cwd=self.root,
)
errors = result.stdout + result.stderr
except Exception as e:
@@ -221,7 +221,12 @@ def basic_lint(fname, code):
tree = parser.parse(bytes(code, "utf-8"))
errors = traverse_tree(tree.root_node)
try:
errors = traverse_tree(tree.root_node)
except RecursionError:
print(f"Unable to lint {fname} due to RecursionError")
return
if not errors:
return

View File

@@ -13,6 +13,8 @@ os.environ["LITELLM_MODE"] = "PRODUCTION"
# `import litellm` takes 1.5 seconds, defer it!
VERBOSE = False
class LazyLiteLLM:
_lazy_module = None
@@ -27,6 +29,9 @@ class LazyLiteLLM:
if self._lazy_module is not None:
return
if VERBOSE:
print("Loading litellm...")
self._lazy_module = importlib.import_module("litellm")
self._lazy_module.suppress_debug_info = True

View File

@@ -5,24 +5,35 @@ import re
import sys
import threading
import traceback
import webbrowser
from dataclasses import fields
from pathlib import Path
import git
try:
import git
except ImportError:
git = None
import importlib_resources
from dotenv import load_dotenv
from prompt_toolkit.enums import EditingMode
from aider import __version__, models, urls, utils
from aider.analytics import Analytics
from aider.args import get_parser
from aider.coders import Coder
from aider.coders.base_coder import UnknownEditFormat
from aider.commands import Commands, SwitchCoder
from aider.copypaste import ClipboardWatcher
from aider.format_settings import format_settings, scrub_sensitive_info
from aider.history import ChatSummary
from aider.io import InputOutput
from aider.llm import litellm # noqa: F401; properly init litellm on launch
from aider.models import ModelSettings
from aider.repo import ANY_GIT_ERROR, GitRepo
from aider.report import report_uncaught_exceptions
from aider.versioncheck import check_version, install_from_main_branch, install_upgrade
from aider.watch import FileWatcher
from .dump import dump # noqa: F401
@@ -86,15 +97,28 @@ def make_new_repo(git_root, io):
def setup_git(git_root, io):
if git is None:
return
try:
cwd = Path.cwd()
except OSError:
cwd = None
repo = None
if git_root:
repo = git.Repo(git_root)
elif Path.cwd() == Path.home():
try:
repo = git.Repo(git_root)
except ANY_GIT_ERROR:
pass
elif cwd == Path.home():
io.tool_warning("You should probably run aider in a directory, not your home dir.")
return
elif io.confirm_ask("No git repo found, create one to track aider's changes (recommended)?"):
git_root = str(Path.cwd().resolve())
elif cwd and io.confirm_ask(
"No git repo found, create one to track aider's changes (recommended)?"
):
git_root = str(cwd.resolve())
repo = make_new_repo(git_root, io)
if not repo:
@@ -142,13 +166,17 @@ def check_gitignore(git_root, io, ask=True):
gitignore_file = Path(git_root) / ".gitignore"
if gitignore_file.exists():
content = io.read_text(gitignore_file)
if content is None:
try:
content = io.read_text(gitignore_file)
if content is None:
return
existing_lines = content.splitlines()
for pat in patterns:
if pat not in existing_lines:
patterns_to_add.append(pat)
except OSError as e:
io.tool_error(f"Error when trying to read {gitignore_file}: {e}")
return
existing_lines = content.splitlines()
for pat in patterns:
if pat not in existing_lines:
patterns_to_add.append(pat)
else:
content = ""
patterns_to_add = patterns
@@ -162,9 +190,17 @@ def check_gitignore(git_root, io, ask=True):
if content and not content.endswith("\n"):
content += "\n"
content += "\n".join(patterns_to_add) + "\n"
io.write_text(gitignore_file, content)
io.tool_output(f"Added {', '.join(patterns_to_add)} to .gitignore")
try:
io.write_text(gitignore_file, content)
io.tool_output(f"Added {', '.join(patterns_to_add)} to .gitignore")
except OSError as e:
io.tool_error(f"Error when trying to write to {gitignore_file}: {e}")
io.tool_output(
"Try running with appropriate permissions or manually add these patterns to .gitignore:"
)
for pattern in patterns_to_add:
io.tool_output(f" {pattern}")
def check_streamlit_install(io):
@@ -194,7 +230,10 @@ def launch_gui(args):
"--server.runOnSave=false",
]
if "-dev" in __version__:
# https://github.com/Aider-AI/aider/issues/2193
is_dev = "-dev" in str(__version__)
if is_dev:
print("Watching for file changes.")
else:
st_args += [
@@ -318,14 +357,16 @@ def load_dotenv_files(git_root, dotenv_fname, encoding="utf-8"):
def register_litellm_models(git_root, model_metadata_fname, io, verbose=False):
model_metatdata_files = generate_search_path_list(
".aider.model.metadata.json", git_root, model_metadata_fname
)
model_metatdata_files = []
# Add the resource file path
resource_metadata = importlib_resources.files("aider.resources").joinpath("model-metadata.json")
model_metatdata_files.append(str(resource_metadata))
model_metatdata_files += generate_search_path_list(
".aider.model.metadata.json", git_root, model_metadata_fname
)
try:
model_metadata_files_loaded = models.register_litellm_models(model_metatdata_files)
if len(model_metadata_files_loaded) > 0 and verbose:
@@ -362,7 +403,7 @@ def sanity_check_repo(repo, io):
io.tool_error("Aider only works with git repos with version number 1 or 2.")
io.tool_output("You may be able to convert your repo: git update-index --index-version=2")
io.tool_output("Or run aider --no-git to proceed without using git.")
io.tool_output(urls.git_index_version)
io.offer_url(urls.git_index_version, "Open documentation url for more info?")
return False
io.tool_error("Unable to read git repository, it may be corrupt?")
@@ -376,7 +417,9 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
if argv is None:
argv = sys.argv[1:]
if force_git_root:
if git is None:
git_root = None
elif force_git_root:
git_root = force_git_root
else:
git_root = get_git_root()
@@ -423,6 +466,13 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
# Parse again to include any arguments that might have been defined in .env
args = parser.parse_args(argv)
if git is None:
args.git = False
if args.analytics_disable:
analytics = Analytics(permanently_disable=True)
print("Analytics have been permanently disabled.")
if not args.verify_ssl:
import httpx
@@ -431,6 +481,10 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
litellm._lazy_module.client_session = httpx.Client(verify=False)
litellm._lazy_module.aclient_session = httpx.AsyncClient(verify=False)
if args.timeout:
litellm._load_litellm()
litellm._lazy_module.request_timeout = args.timeout
if args.dark_mode:
args.user_input_color = "#32FF32"
args.tool_error_color = "#FF3333"
@@ -472,6 +526,8 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
encoding=args.encoding,
llm_history_file=args.llm_history_file,
editingmode=editing_mode,
fancy_input=args.fancy_input,
multiline_mode=args.multiline,
)
io = get_io(args.pretty)
@@ -483,10 +539,82 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
io = get_io(False)
io.tool_warning("Terminal does not support pretty output (UnicodeDecodeError)")
# Process any environment variables set via --set-env
if args.set_env:
for env_setting in args.set_env:
try:
name, value = env_setting.split("=", 1)
os.environ[name.strip()] = value.strip()
except ValueError:
io.tool_error(f"Invalid --set-env format: {env_setting}")
io.tool_output("Format should be: ENV_VAR_NAME=value")
return 1
# Process any API keys set via --api-key
if args.api_key:
for api_setting in args.api_key:
try:
provider, key = api_setting.split("=", 1)
env_var = f"{provider.strip().upper()}_API_KEY"
os.environ[env_var] = key.strip()
except ValueError:
io.tool_error(f"Invalid --api-key format: {api_setting}")
io.tool_output("Format should be: provider=key")
return 1
if args.anthropic_api_key:
os.environ["ANTHROPIC_API_KEY"] = args.anthropic_api_key
if args.openai_api_key:
os.environ["OPENAI_API_KEY"] = args.openai_api_key
if args.openai_api_base:
os.environ["OPENAI_API_BASE"] = args.openai_api_base
if args.openai_api_version:
io.tool_warning(
"--openai-api-version is deprecated, use --set-env OPENAI_API_VERSION=<value>"
)
os.environ["OPENAI_API_VERSION"] = args.openai_api_version
if args.openai_api_type:
io.tool_warning("--openai-api-type is deprecated, use --set-env OPENAI_API_TYPE=<value>")
os.environ["OPENAI_API_TYPE"] = args.openai_api_type
if args.openai_organization_id:
io.tool_warning(
"--openai-organization-id is deprecated, use --set-env OPENAI_ORGANIZATION=<value>"
)
os.environ["OPENAI_ORGANIZATION"] = args.openai_organization_id
analytics = Analytics(logfile=args.analytics_log, permanently_disable=args.analytics_disable)
if args.analytics is not False:
if analytics.need_to_ask(args.analytics):
io.tool_output(
"Aider respects your privacy and never collects your code, chat messages, keys or"
" personal info."
)
io.tool_output(f"For more info: {urls.analytics}")
disable = not io.confirm_ask(
"Allow collection of anonymous analytics to help improve aider?"
)
analytics.asked_opt_in = True
if disable:
analytics.disable(permanently=True)
io.tool_output("Analytics have been permanently disabled.")
analytics.save_data()
io.tool_output()
# This is a no-op if the user has opted out
analytics.enable()
analytics.event("launched")
if args.gui and not return_coder:
if not check_streamlit_install(io):
analytics.event("exit", reason="Streamlit not installed")
return
analytics.event("gui session")
launch_gui(argv)
analytics.event("exit", reason="GUI session ended")
return
if args.verbose:
@@ -495,7 +623,14 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
all_files = args.files + (args.file or [])
fnames = [str(Path(fn).resolve()) for fn in all_files]
read_only_fnames = [str(Path(fn).resolve()) for fn in (args.read or [])]
read_only_fnames = []
for fn in args.read or []:
path = Path(fn).expanduser().resolve()
if path.is_dir():
read_only_fnames.extend(str(f) for f in path.rglob("*") if f.is_file())
else:
read_only_fnames.append(str(path))
if len(all_files) > 1:
good = True
for fname in all_files:
@@ -506,6 +641,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
io.tool_output(
"Provide either a single directory of a git repo, or a list of one or more files."
)
analytics.event("exit", reason="Invalid directory input")
return 1
git_dname = None
@@ -516,26 +652,31 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
fnames = []
else:
io.tool_error(f"{all_files[0]} is a directory, but --no-git selected.")
analytics.event("exit", reason="Directory with --no-git")
return 1
# We can't know the git repo for sure until after parsing the args.
# If we guessed wrong, reparse because that changes things like
# the location of the config.yml and history files.
if args.git and not force_git_root:
if args.git and not force_git_root and git is not None:
right_repo_root = guessed_wrong_repo(io, git_root, fnames, git_dname)
if right_repo_root:
analytics.event("exit", reason="Recursing with correct repo")
return main(argv, input, output, right_repo_root, return_coder=return_coder)
if args.just_check_update:
update_available = check_version(io, just_check=True, verbose=args.verbose)
analytics.event("exit", reason="Just checking update")
return 0 if not update_available else 1
if args.install_main_branch:
success = install_from_main_branch(io)
analytics.event("exit", reason="Installed main branch")
return 0 if success else 1
if args.upgrade:
success = install_upgrade(io)
analytics.event("exit", reason="Upgrade completed")
return 0 if success else 1
if args.check_update:
@@ -543,6 +684,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
if args.list_models:
models.print_matching_models(io, args.list_models)
analytics.event("exit", reason="Listed models")
return 0
if args.git:
@@ -558,29 +700,29 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
cmd_line = scrub_sensitive_info(args, cmd_line)
io.tool_output(cmd_line, log_only=True)
check_and_load_imports(io, verbose=args.verbose)
if args.anthropic_api_key:
os.environ["ANTHROPIC_API_KEY"] = args.anthropic_api_key
if args.openai_api_key:
os.environ["OPENAI_API_KEY"] = args.openai_api_key
if args.openai_api_base:
os.environ["OPENAI_API_BASE"] = args.openai_api_base
if args.openai_api_version:
os.environ["OPENAI_API_VERSION"] = args.openai_api_version
if args.openai_api_type:
os.environ["OPENAI_API_TYPE"] = args.openai_api_type
if args.openai_organization_id:
os.environ["OPENAI_ORGANIZATION"] = args.openai_organization_id
is_first_run = is_first_run_of_new_version(io, verbose=args.verbose)
check_and_load_imports(io, is_first_run, verbose=args.verbose)
register_models(git_root, args.model_settings_file, io, verbose=args.verbose)
register_litellm_models(git_root, args.model_metadata_file, io, verbose=args.verbose)
# Process any command line aliases
if args.alias:
for alias_def in args.alias:
# Split on first colon only
parts = alias_def.split(":", 1)
if len(parts) != 2:
io.tool_error(f"Invalid alias format: {alias_def}")
io.tool_output("Format should be: alias:model-name")
analytics.event("exit", reason="Invalid alias format error")
return 1
alias, model = parts
models.MODEL_ALIASES[alias.strip()] = model.strip()
if not args.model:
args.model = "gpt-4o-2024-08-06"
if os.environ.get("ANTHROPIC_API_KEY"):
args.model = "anthropic/claude-3-5-sonnet-20241022"
args.model = "claude-3-5-sonnet-20241022"
main_model = models.Model(
args.model,
@@ -589,23 +731,36 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
editor_edit_format=args.editor_edit_format,
)
if args.copy_paste and args.edit_format is None:
if main_model.edit_format in ("diff", "whole"):
main_model.edit_format = "editor-" + main_model.edit_format
if args.verbose:
io.tool_output("Model info:")
io.tool_output("Model metadata:")
io.tool_output(json.dumps(main_model.info, indent=4))
io.tool_output("Model settings:")
for attr in sorted(fields(ModelSettings), key=lambda x: x.name):
val = getattr(main_model, attr.name)
val = json.dumps(val, indent=4)
io.tool_output(f"{attr.name}: {val}")
lint_cmds = parse_lint_cmds(args.lint_cmd, io)
if lint_cmds is None:
analytics.event("exit", reason="Invalid lint command format")
return 1
if args.show_model_warnings:
problem = models.sanity_check_models(io, main_model)
if problem:
analytics.event("model warning", main_model=main_model)
io.tool_output("You can skip this check with --no-show-model-warnings")
io.tool_output()
try:
if not io.confirm_ask("Proceed anyway?"):
return 1
io.offer_url(urls.model_warnings, "Open documentation url for more info?")
io.tool_output()
except KeyboardInterrupt:
analytics.event("exit", reason="Keyboard interrupt during model warnings")
return 1
repo = None
@@ -629,10 +784,22 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
if not args.skip_sanity_check_repo:
if not sanity_check_repo(repo, io):
analytics.event("exit", reason="Repository sanity check failed")
return 1
if repo:
analytics.event("repo", num_files=len(repo.get_tracked_files()))
else:
analytics.event("no-repo")
commands = Commands(
io, None, verify_ssl=args.verify_ssl, args=args, parser=parser, verbose=args.verbose
io,
None,
verify_ssl=args.verify_ssl,
args=args,
parser=parser,
verbose=args.verbose,
editor=args.editor,
)
summarizer = ChatSummary(
@@ -673,20 +840,46 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
test_cmd=args.test_cmd,
commands=commands,
summarizer=summarizer,
analytics=analytics,
map_refresh=args.map_refresh,
cache_prompts=args.cache_prompts,
map_mul_no_files=args.map_multiplier_no_files,
num_cache_warming_pings=args.cache_keepalive_pings,
suggest_shell_commands=args.suggest_shell_commands,
chat_language=args.chat_language,
detect_urls=args.detect_urls,
auto_copy_context=args.copy_paste,
)
except UnknownEditFormat as err:
io.tool_error(str(err))
io.offer_url(urls.edit_formats, "Open documentation about edit formats?")
analytics.event("exit", reason="Unknown edit format")
return 1
except ValueError as err:
io.tool_error(str(err))
analytics.event("exit", reason="ValueError during coder creation")
return 1
if return_coder:
analytics.event("exit", reason="Returning coder object")
return coder
ignores = []
if git_root:
ignores.append(str(Path(git_root) / ".gitignore"))
if args.aiderignore:
ignores.append(args.aiderignore)
if args.watch_files:
file_watcher = FileWatcher(
coder, gitignores=ignores, verbose=args.verbose, analytics=analytics
)
coder.file_watcher = file_watcher
if args.copy_paste:
analytics.event("copy-paste mode")
ClipboardWatcher(coder.io, verbose=args.verbose)
coder.show_announcements()
if args.show_prompts:
@@ -695,6 +888,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
]
messages = coder.format_messages().all_messages()
utils.show_messages(messages)
analytics.event("exit", reason="Showed prompts")
return
if args.lint:
@@ -703,10 +897,11 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
if args.test:
if not args.test_cmd:
io.tool_error("No --test-cmd provided.")
analytics.event("exit", reason="No test command provided")
return 1
test_errors = coder.commands.cmd_test(args.test_cmd)
if test_errors:
coder.run(test_errors)
coder.commands.cmd_test(args.test_cmd)
if io.placeholder:
coder.run(io.placeholder)
if args.commit:
if args.dry_run:
@@ -715,27 +910,41 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
coder.commands.cmd_commit()
if args.lint or args.test or args.commit:
analytics.event("exit", reason="Completed lint/test/commit")
return
if args.show_repo_map:
repo_map = coder.get_repo_map()
if repo_map:
io.tool_output(repo_map)
analytics.event("exit", reason="Showed repo map")
return
if args.apply:
content = io.read_text(args.apply)
if content is None:
analytics.event("exit", reason="Failed to read apply content")
return
coder.partial_response_content = content
coder.apply_updates()
analytics.event("exit", reason="Applied updates")
return
if "VSCODE_GIT_IPC_HANDLE" in os.environ:
args.pretty = False
io.tool_output("VSCode terminal detected, pretty output has been disabled.")
if args.apply_clipboard_edits:
args.edit_format = main_model.editor_edit_format
args.message = "/paste"
io.tool_output('Use /help <question> for help, run "aider --help" to see cmd line args')
if args.show_release_notes is True:
io.tool_output(f"Opening release notes: {urls.release_notes}")
io.tool_output()
webbrowser.open(urls.release_notes)
elif args.show_release_notes is None and is_first_run:
io.tool_output()
io.offer_url(
urls.release_notes,
"Would you like to see what's new in this version?",
allow_never=False,
)
if git_root and Path.cwd().resolve() != Path(git_root).resolve():
io.tool_warning(
@@ -746,6 +955,9 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
io.tool_output(f"Cur working dir: {Path.cwd()}")
io.tool_output(f"Git working dir: {git_root}")
if args.load:
commands.cmd_load(args.load)
if args.message:
io.add_to_input_history(args.message)
io.tool_output()
@@ -753,6 +965,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
coder.run(with_message=args.message)
except SwitchCoder:
pass
analytics.event("exit", reason="Completed --message")
return
if args.message_file:
@@ -762,18 +975,26 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
coder.run(with_message=message_from_file)
except FileNotFoundError:
io.tool_error(f"Message file not found: {args.message_file}")
analytics.event("exit", reason="Message file not found")
return 1
except IOError as e:
io.tool_error(f"Error reading message file: {e}")
analytics.event("exit", reason="Message file IO error")
return 1
analytics.event("exit", reason="Completed --message-file")
return
if args.exit:
analytics.event("exit", reason="Exit flag set")
return
analytics.event("cli session", main_model=main_model, edit_format=main_model.edit_format)
while True:
try:
coder.run()
analytics.event("exit", reason="Completed main CLI coder.run")
return
except SwitchCoder as switch:
kwargs = dict(io=io, from_coder=coder)
@@ -787,10 +1008,15 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
coder.show_announcements()
def check_and_load_imports(io, verbose=False):
def is_first_run_of_new_version(io, verbose=False):
"""Check if this is the first run of a new version/executable combination"""
installs_file = Path.home() / ".aider" / "installs.json"
key = (__version__, sys.executable)
# Never show notes for .dev versions
if ".dev" in __version__:
return False
if verbose:
io.tool_output(
f"Checking imports for version {__version__} and executable {sys.executable}"
@@ -808,7 +1034,26 @@ def check_and_load_imports(io, verbose=False):
if verbose:
io.tool_output("Installs file does not exist, creating new dictionary")
if str(key) not in installs:
is_first_run = str(key) not in installs
if is_first_run:
installs[str(key)] = True
installs_file.parent.mkdir(parents=True, exist_ok=True)
with open(installs_file, "w") as f:
json.dump(installs, f, indent=4)
return is_first_run
except Exception as e:
io.tool_warning(f"Error checking version: {e}")
if verbose:
io.tool_output(f"Full exception details: {traceback.format_exc()}")
return True # Safer to assume it's a first run if we hit an error
def check_and_load_imports(io, is_first_run, verbose=False):
try:
if is_first_run:
if verbose:
io.tool_output(
"First run for this version and executable, loading imports synchronously"
@@ -818,13 +1063,9 @@ def check_and_load_imports(io, verbose=False):
except Exception as err:
io.tool_error(str(err))
io.tool_output("Error loading required imports. Did you install aider properly?")
io.tool_output("https://aider.chat/docs/install/install.html")
io.offer_url(urls.install_properly, "Open documentation url for more info?")
sys.exit(1)
installs[str(key)] = True
installs_file.parent.mkdir(parents=True, exist_ok=True)
with open(installs_file, "w") as f:
json.dump(installs, f, indent=4)
if verbose:
io.tool_output("Imports loaded and installs file updated")
else:
@@ -833,8 +1074,9 @@ def check_and_load_imports(io, verbose=False):
thread = threading.Thread(target=load_slow_imports)
thread.daemon = True
thread.start()
except Exception as e:
io.tool_warning(f"Error in checking imports: {e}")
io.tool_warning(f"Error in loading imports: {e}")
if verbose:
io.tool_output(f"Full exception details: {traceback.format_exc()}")

View File

@@ -13,12 +13,11 @@ import json5
import yaml
from PIL import Image
from aider import urls
from aider.dump import dump # noqa: F401
from aider.llm import litellm
DEFAULT_MODEL_NAME = "gpt-4o"
ANTHROPIC_BETA_HEADER = "prompt-caching-2024-07-31"
ANTHROPIC_BETA_HEADER = "prompt-caching-2024-07-31,pdfs-2024-09-25"
OPENAI_MODELS = """
gpt-4
@@ -53,6 +52,7 @@ ANTHROPIC_MODELS = """
claude-2
claude-2.1
claude-3-haiku-20240307
claude-3-5-haiku-20241022
claude-3-opus-20240229
claude-3-sonnet-20240229
claude-3-5-sonnet-20240620
@@ -61,6 +61,24 @@ claude-3-5-sonnet-20241022
ANTHROPIC_MODELS = [ln.strip() for ln in ANTHROPIC_MODELS.splitlines() if ln.strip()]
# Mapping of model aliases to their canonical names
MODEL_ALIASES = {
# Claude models
"sonnet": "claude-3-5-sonnet-20241022",
"haiku": "claude-3-5-haiku-20241022",
"opus": "claude-3-opus-20240229",
# GPT models
"4": "gpt-4-0613",
"4o": "gpt-4o",
"4-turbo": "gpt-4-1106-preview",
"35turbo": "gpt-3.5-turbo",
"35-turbo": "gpt-3.5-turbo",
"3": "gpt-3.5-turbo",
# Other models
"deepseek": "deepseek/deepseek-coder",
"flash": "gemini/gemini-2.0-flash-exp",
}
@dataclass
class ModelSettings:
@@ -70,7 +88,6 @@ class ModelSettings:
weak_model_name: Optional[str] = None
use_repo_map: bool = False
send_undo_reply: bool = False
accepts_images: bool = False
lazy: bool = False
reminder: str = "user"
examples_as_sys_msg: bool = False
@@ -126,7 +143,6 @@ MODEL_SETTINGS = [
"udiff",
weak_model_name="gpt-4o-mini",
use_repo_map=True,
accepts_images=True,
lazy=True,
reminder="sys",
),
@@ -135,7 +151,6 @@ MODEL_SETTINGS = [
"udiff",
weak_model_name="gpt-4o-mini",
use_repo_map=True,
accepts_images=True,
lazy=True,
reminder="sys",
),
@@ -144,7 +159,6 @@ MODEL_SETTINGS = [
"diff",
weak_model_name="gpt-4o-mini",
use_repo_map=True,
accepts_images=True,
lazy=True,
reminder="sys",
editor_edit_format="editor-diff",
@@ -154,7 +168,6 @@ MODEL_SETTINGS = [
"diff",
weak_model_name="gpt-4o-mini",
use_repo_map=True,
accepts_images=True,
lazy=True,
reminder="sys",
),
@@ -163,7 +176,22 @@ MODEL_SETTINGS = [
"diff",
weak_model_name="gpt-4o-mini",
use_repo_map=True,
accepts_images=True,
lazy=True,
reminder="sys",
),
ModelSettings(
"gpt-4o-2024-11-20",
"diff",
weak_model_name="gpt-4o-mini",
use_repo_map=True,
lazy=True,
reminder="sys",
),
ModelSettings(
"openai/gpt-4o-2024-11-20",
"diff",
weak_model_name="gpt-4o-mini",
use_repo_map=True,
lazy=True,
reminder="sys",
),
@@ -172,7 +200,6 @@ MODEL_SETTINGS = [
"diff",
weak_model_name="gpt-4o-mini",
use_repo_map=True,
accepts_images=True,
lazy=True,
reminder="sys",
editor_edit_format="editor-diff",
@@ -181,7 +208,6 @@ MODEL_SETTINGS = [
"gpt-4o-mini",
"whole",
weak_model_name="gpt-4o-mini",
accepts_images=True,
lazy=True,
reminder="sys",
),
@@ -189,7 +215,6 @@ MODEL_SETTINGS = [
"openai/gpt-4o-mini",
"whole",
weak_model_name="openai/gpt-4o-mini",
accepts_images=True,
lazy=True,
reminder="sys",
),
@@ -215,7 +240,6 @@ MODEL_SETTINGS = [
"diff",
weak_model_name="gpt-4o-mini",
use_repo_map=True,
accepts_images=True,
reminder="sys",
),
ModelSettings(
@@ -244,29 +268,28 @@ MODEL_SETTINGS = [
ModelSettings(
"claude-3-opus-20240229",
"diff",
weak_model_name="claude-3-haiku-20240307",
weak_model_name="claude-3-5-haiku-20241022",
use_repo_map=True,
),
ModelSettings(
"openrouter/anthropic/claude-3-opus",
"diff",
weak_model_name="openrouter/anthropic/claude-3-haiku",
weak_model_name="openrouter/anthropic/claude-3-5-haiku",
use_repo_map=True,
),
ModelSettings(
"claude-3-sonnet-20240229",
"whole",
weak_model_name="claude-3-haiku-20240307",
weak_model_name="claude-3-5-haiku-20241022",
),
ModelSettings(
"claude-3-5-sonnet-20240620",
"diff",
weak_model_name="claude-3-haiku-20240307",
weak_model_name="claude-3-5-haiku-20241022",
editor_model_name="claude-3-5-sonnet-20240620",
editor_edit_format="editor-diff",
use_repo_map=True,
examples_as_sys_msg=True,
accepts_images=True,
extra_params={
"extra_headers": {
"anthropic-beta": ANTHROPIC_BETA_HEADER,
@@ -279,7 +302,7 @@ MODEL_SETTINGS = [
ModelSettings(
"anthropic/claude-3-5-sonnet-20240620",
"diff",
weak_model_name="claude-3-haiku-20240307",
weak_model_name="anthropic/claude-3-5-haiku-20241022",
editor_model_name="anthropic/claude-3-5-sonnet-20240620",
editor_edit_format="editor-diff",
use_repo_map=True,
@@ -296,7 +319,7 @@ MODEL_SETTINGS = [
ModelSettings(
"anthropic/claude-3-5-sonnet-20241022",
"diff",
weak_model_name="claude-3-haiku-20240307",
weak_model_name="anthropic/claude-3-5-haiku-20241022",
editor_model_name="anthropic/claude-3-5-sonnet-20241022",
editor_edit_format="editor-diff",
use_repo_map=True,
@@ -310,6 +333,57 @@ MODEL_SETTINGS = [
cache_control=True,
reminder="user",
),
ModelSettings(
"bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0",
"diff",
weak_model_name="bedrock/anthropic.claude-3-5-haiku-20241022-v1:0",
editor_model_name="bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0",
editor_edit_format="editor-diff",
use_repo_map=True,
examples_as_sys_msg=True,
extra_params={
"extra_headers": {
"anthropic-beta": ANTHROPIC_BETA_HEADER,
},
"max_tokens": 8192,
},
cache_control=True,
reminder="user",
),
ModelSettings(
"anthropic/claude-3-5-sonnet-latest",
"diff",
weak_model_name="anthropic/claude-3-5-haiku-20241022",
editor_model_name="anthropic/claude-3-5-sonnet-20241022",
editor_edit_format="editor-diff",
use_repo_map=True,
examples_as_sys_msg=True,
extra_params={
"extra_headers": {
"anthropic-beta": ANTHROPIC_BETA_HEADER,
},
"max_tokens": 8192,
},
cache_control=True,
reminder="user",
),
ModelSettings(
"claude-3-5-sonnet-20241022",
"diff",
weak_model_name="claude-3-5-haiku-20241022",
editor_model_name="claude-3-5-sonnet-20241022",
editor_edit_format="editor-diff",
use_repo_map=True,
examples_as_sys_msg=True,
extra_params={
"extra_headers": {
"anthropic-beta": ANTHROPIC_BETA_HEADER,
},
"max_tokens": 8192,
},
cache_control=True,
reminder="user",
),
ModelSettings(
"anthropic/claude-3-haiku-20240307",
"whole",
@@ -322,6 +396,52 @@ MODEL_SETTINGS = [
},
cache_control=True,
),
ModelSettings(
"anthropic/claude-3-5-haiku-20241022",
"diff",
weak_model_name="anthropic/claude-3-5-haiku-20241022",
use_repo_map=True,
extra_params={
"extra_headers": {
"anthropic-beta": ANTHROPIC_BETA_HEADER,
},
},
cache_control=True,
),
ModelSettings(
"bedrock/anthropic.claude-3-5-haiku-20241022-v1:0",
"diff",
weak_model_name="bedrock/anthropic.claude-3-5-haiku-20241022-v1:0",
use_repo_map=True,
extra_params={
"extra_headers": {
"anthropic-beta": ANTHROPIC_BETA_HEADER,
},
},
cache_control=True,
),
ModelSettings(
"claude-3-5-haiku-20241022",
"diff",
weak_model_name="claude-3-5-haiku-20241022",
use_repo_map=True,
examples_as_sys_msg=True,
extra_params={
"extra_headers": {
"anthropic-beta": ANTHROPIC_BETA_HEADER,
},
},
cache_control=True,
),
ModelSettings(
"vertex_ai/claude-3-5-haiku@20241022",
"diff",
weak_model_name="vertex_ai/claude-3-5-haiku@20241022",
use_repo_map=True,
extra_params={
"max_tokens": 4096,
},
),
ModelSettings(
"claude-3-haiku-20240307",
"whole",
@@ -337,12 +457,11 @@ MODEL_SETTINGS = [
ModelSettings(
"openrouter/anthropic/claude-3.5-sonnet",
"diff",
weak_model_name="openrouter/anthropic/claude-3-haiku",
weak_model_name="openrouter/anthropic/claude-3-5-haiku",
editor_model_name="openrouter/anthropic/claude-3.5-sonnet",
editor_edit_format="editor-diff",
use_repo_map=True,
examples_as_sys_msg=True,
accepts_images=True,
extra_params={
"max_tokens": 8192,
},
@@ -352,12 +471,11 @@ MODEL_SETTINGS = [
ModelSettings(
"openrouter/anthropic/claude-3.5-sonnet:beta",
"diff",
weak_model_name="openrouter/anthropic/claude-3-haiku:beta",
weak_model_name="openrouter/anthropic/claude-3-5-haiku:beta",
editor_model_name="openrouter/anthropic/claude-3.5-sonnet:beta",
editor_edit_format="editor-diff",
use_repo_map=True,
examples_as_sys_msg=True,
accepts_images=True,
extra_params={
"max_tokens": 8192,
},
@@ -369,12 +487,24 @@ MODEL_SETTINGS = [
ModelSettings(
"vertex_ai/claude-3-5-sonnet@20240620",
"diff",
weak_model_name="vertex_ai/claude-3-haiku@20240307",
weak_model_name="vertex_ai/claude-3-5-haiku@20241022",
editor_model_name="vertex_ai/claude-3-5-sonnet@20240620",
editor_edit_format="editor-diff",
use_repo_map=True,
examples_as_sys_msg=True,
accepts_images=True,
extra_params={
"max_tokens": 8192,
},
reminder="user",
),
ModelSettings(
"vertex_ai/claude-3-5-sonnet-v2@20241022",
"diff",
weak_model_name="vertex_ai/claude-3-5-haiku@20241022",
editor_model_name="vertex_ai/claude-3-5-sonnet-v2@20241022",
editor_edit_format="editor-diff",
use_repo_map=True,
examples_as_sys_msg=True,
extra_params={
"max_tokens": 8192,
},
@@ -383,13 +513,13 @@ MODEL_SETTINGS = [
ModelSettings(
"vertex_ai/claude-3-opus@20240229",
"diff",
weak_model_name="vertex_ai/claude-3-haiku@20240307",
weak_model_name="vertex_ai/claude-3-5-haiku@20241022",
use_repo_map=True,
),
ModelSettings(
"vertex_ai/claude-3-sonnet@20240229",
"whole",
weak_model_name="vertex_ai/claude-3-haiku@20240307",
weak_model_name="vertex_ai/claude-3-5-haiku@20241022",
),
# Cohere
ModelSettings(
@@ -454,12 +584,38 @@ MODEL_SETTINGS = [
"diff-fenced",
use_repo_map=True,
),
ModelSettings(
"gemini/gemini-exp-1206",
"diff",
use_repo_map=True,
),
ModelSettings(
"gemini/gemini-exp-1114",
"diff",
use_repo_map=True,
),
ModelSettings(
"gemini/gemini-exp-1121",
"diff",
use_repo_map=True,
),
ModelSettings(
"vertex_ai/gemini-pro-experimental",
"diff-fenced",
use_repo_map=True,
),
ModelSettings(
"gemini/gemini-1.5-flash-exp-0827",
"whole",
use_repo_map=False,
send_undo_reply=False,
),
ModelSettings(
"gemini/gemini-2.0-flash-exp",
"diff",
use_repo_map=True,
send_undo_reply=False,
),
ModelSettings(
"deepseek/deepseek-chat",
"diff",
@@ -514,7 +670,6 @@ MODEL_SETTINGS = [
"diff",
weak_model_name="openrouter/openai/gpt-4o-mini",
use_repo_map=True,
accepts_images=True,
lazy=True,
reminder="sys",
editor_edit_format="editor-diff",
@@ -529,7 +684,6 @@ MODEL_SETTINGS = [
reminder="user",
use_system_prompt=False,
use_temperature=False,
streaming=False,
),
ModelSettings(
"azure/o1-mini",
@@ -541,7 +695,6 @@ MODEL_SETTINGS = [
reminder="user",
use_system_prompt=False,
use_temperature=False,
streaming=False,
),
ModelSettings(
"o1-mini",
@@ -553,7 +706,6 @@ MODEL_SETTINGS = [
reminder="user",
use_system_prompt=False,
use_temperature=False,
streaming=False,
),
ModelSettings(
"openai/o1-preview",
@@ -565,7 +717,6 @@ MODEL_SETTINGS = [
reminder="user",
use_system_prompt=False,
use_temperature=False,
streaming=False,
),
ModelSettings(
"azure/o1-preview",
@@ -577,7 +728,6 @@ MODEL_SETTINGS = [
reminder="user",
use_system_prompt=False,
use_temperature=False,
streaming=False,
),
ModelSettings(
"o1-preview",
@@ -589,7 +739,6 @@ MODEL_SETTINGS = [
reminder="user",
use_system_prompt=False,
use_temperature=False,
streaming=False,
),
ModelSettings(
"openrouter/openai/o1-mini",
@@ -615,88 +764,114 @@ MODEL_SETTINGS = [
use_temperature=False,
streaming=False,
),
ModelSettings(
"openrouter/qwen/qwen-2.5-coder-32b-instruct",
"diff",
weak_model_name="openrouter/qwen/qwen-2.5-coder-32b-instruct",
editor_model_name="openrouter/qwen/qwen-2.5-coder-32b-instruct",
editor_edit_format="editor-diff",
use_repo_map=True,
),
]
model_info_url = (
"https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json"
)
class ModelInfoManager:
MODEL_INFO_URL = (
"https://raw.githubusercontent.com/BerriAI/litellm/main/"
"model_prices_and_context_window.json"
)
CACHE_TTL = 60 * 60 * 24 # 24 hours
def __init__(self):
self.cache_dir = Path.home() / ".aider" / "caches"
self.cache_file = self.cache_dir / "model_prices_and_context_window.json"
self.content = None
self._load_cache()
def get_model_flexible(model, content):
info = content.get(model, dict())
if info:
return info
pieces = model.split("/")
if len(pieces) == 2:
info = content.get(pieces[1])
if info and info.get("litellm_provider") == pieces[0]:
return info
return dict()
def get_model_info(model):
if not litellm._lazy_module:
cache_dir = Path.home() / ".aider" / "caches"
cache_file = cache_dir / "model_prices_and_context_window.json"
def _load_cache(self):
try:
cache_dir.mkdir(parents=True, exist_ok=True)
use_cache = True
self.cache_dir.mkdir(parents=True, exist_ok=True)
if self.cache_file.exists():
cache_age = time.time() - self.cache_file.stat().st_mtime
if cache_age < self.CACHE_TTL:
self.content = json.loads(self.cache_file.read_text())
except OSError:
# If we can't create the cache directory, we'll skip using the cache
use_cache = False
if use_cache:
current_time = time.time()
cache_age = (
current_time - cache_file.stat().st_mtime if cache_file.exists() else float("inf")
)
if cache_age < 60 * 60 * 24:
try:
content = json.loads(cache_file.read_text())
res = get_model_flexible(model, content)
if res:
return res
except Exception as ex:
print(str(ex))
import requests
pass
def _update_cache(self):
try:
response = requests.get(model_info_url, timeout=5)
import requests
response = requests.get(self.MODEL_INFO_URL, timeout=5)
if response.status_code == 200:
content = response.json()
if use_cache:
try:
cache_file.write_text(json.dumps(content, indent=4))
except OSError:
# If we can't write to the cache file, we'll just skip caching
pass
res = get_model_flexible(model, content)
if res:
return res
self.content = response.json()
try:
self.cache_file.write_text(json.dumps(self.content, indent=4))
except OSError:
pass
except Exception as ex:
print(str(ex))
try:
# Save empty dict to cache file on failure
self.cache_file.write_text("{}")
except OSError:
pass
def get_model_from_cached_json_db(self, model):
if not self.content:
self._update_cache()
if not self.content:
return dict()
info = self.content.get(model, dict())
if info:
return info
pieces = model.split("/")
if len(pieces) == 2:
info = self.content.get(pieces[1])
if info and info.get("litellm_provider") == pieces[0]:
return info
# If all else fails, do it the slow way...
try:
info = litellm.get_model_info(model)
return info
except Exception:
return dict()
def get_model_info(self, model):
cached_info = self.get_model_from_cached_json_db(model)
litellm_info = None
if litellm._lazy_module or not cached_info:
try:
litellm_info = litellm.get_model_info(model)
except Exception as ex:
if "model_prices_and_context_window.json" not in str(ex):
print(str(ex))
if litellm_info:
return litellm_info
return cached_info
model_info_manager = ModelInfoManager()
class Model(ModelSettings):
def __init__(self, model, weak_model=None, editor_model=None, editor_edit_format=None):
# Map any alias to its canonical name
model = MODEL_ALIASES.get(model, model)
self.name = model
self.max_chat_history_tokens = 1024
self.weak_model = None
self.editor_model = None
# Find the extra settings
self.extra_model_settings = next(
(ms for ms in MODEL_SETTINGS if ms.name == "aider/extra_params"), None
)
self.info = self.get_model_info(model)
# Are all needed keys/params available?
@@ -722,19 +897,46 @@ class Model(ModelSettings):
self.get_editor_model(editor_model, editor_edit_format)
def get_model_info(self, model):
return get_model_info(model)
return model_info_manager.get_model_info(model)
def _copy_fields(self, source):
"""Helper to copy fields from a ModelSettings instance to self"""
for field in fields(ModelSettings):
val = getattr(source, field.name)
setattr(self, field.name, val)
def configure_model_settings(self, model):
# Look for exact model match
exact_match = False
for ms in MODEL_SETTINGS:
# direct match, or match "provider/<model>"
if model == ms.name:
for field in fields(ModelSettings):
val = getattr(ms, field.name)
setattr(self, field.name, val)
return # <--
self._copy_fields(ms)
exact_match = True
break # Continue to apply overrides
model = model.lower()
# If no exact match, try generic settings
if not exact_match:
self.apply_generic_model_settings(model)
# Apply override settings last if they exist
if self.extra_model_settings and self.extra_model_settings.extra_params:
# Initialize extra_params if it doesn't exist
if not self.extra_params:
self.extra_params = {}
# Deep merge the extra_params dicts
for key, value in self.extra_model_settings.extra_params.items():
if isinstance(value, dict) and isinstance(self.extra_params.get(key), dict):
# For nested dicts, merge recursively
self.extra_params[key] = {**self.extra_params[key], **value}
else:
# For non-dict values, simply update
self.extra_params[key] = value
def apply_generic_model_settings(self, model):
if ("llama3" in model or "llama-3" in model) and "70b" in model:
self.edit_format = "diff"
self.use_repo_map = True
@@ -756,16 +958,37 @@ class Model(ModelSettings):
if "gpt-3.5" in model or "gpt-4" in model:
self.reminder = "sys"
return # <--
if "3.5-sonnet" in model or "3-5-sonnet" in model:
self.edit_format = "diff"
self.use_repo_map = True
self.examples_as_sys_msg = True
self.reminder = None
self.reminder = "user"
return # <--
if model.startswith("o1-") or "/o1-" in model:
self.use_system_prompt = False
self.use_temperature = False
return # <--
if (
"qwen" in model
and "coder" in model
and ("2.5" in model or "2-5" in model)
and "32b" in model
):
self.edit_format = "diff"
self.editor_edit_format = "editor-diff"
self.use_repo_map = True
if model.startswith("ollama/") or model.startswith("ollama_chat/"):
self.extra_params = dict(num_ctx=8 * 1024)
return # <--
# use the defaults
if self.edit_format == "diff":
self.use_repo_map = True
return # <--
def __str__(self):
return self.name
@@ -922,6 +1145,9 @@ def register_models(model_settings_fnames):
if not os.path.exists(model_settings_fname):
continue
if not Path(model_settings_fname).read_text().strip():
continue
try:
with open(model_settings_fname, "r") as model_settings_file:
model_settings_list = yaml.safe_load(model_settings_file)
@@ -949,8 +1175,14 @@ def register_litellm_models(model_fnames):
continue
try:
with open(model_fname, "r") as model_def_file:
model_def = json5.load(model_def_file)
data = Path(model_fname).read_text()
if not data.strip():
continue
model_def = json5.loads(data)
if not model_def:
continue
# only load litellm if we have actual data
litellm._load_litellm()
litellm.register_model(model_def)
except Exception as e:
@@ -1000,10 +1232,10 @@ def sanity_check_model(io, model):
status = "Set" if value else "Not set"
io.tool_output(f"- {key}: {status}")
if platform.system() == "Windows" or True:
if platform.system() == "Windows":
io.tool_output(
"If you just set these environment variables using `setx` you may need to restart"
" your terminal or command prompt for the changes to take effect."
"Note: You may need to restart your terminal or command prompt for `setx` to take"
" effect."
)
elif not model.keys_in_environment:
@@ -1022,9 +1254,6 @@ def sanity_check_model(io, model):
for match in possible_matches:
io.tool_output(f"- {match}")
if show:
io.tool_output(f"For more info, see: {urls.model_warnings}")
return show
@@ -1036,7 +1265,10 @@ def fuzzy_match_models(name):
model = model.lower()
if attrs.get("mode") != "chat":
continue
provider = (attrs["litellm_provider"] + "/").lower()
provider = attrs.get("litellm_provider", "").lower()
if not provider:
continue
provider += "/"
if model.startswith(provider):
fq_model = model

View File

@@ -0,0 +1,91 @@
(class_definition
name: (identifier) @name.definition.class) @definition.class
(method_signature
(function_signature)) @definition.method
(type_alias
(type_identifier) @name.definition.type) @definition.type
(method_signature
(getter_signature
name: (identifier) @name.definition.method)) @definition.method
(method_signature
(setter_signature
name: (identifier) @name.definition.method)) @definition.method
(method_signature
(function_signature
name: (identifier) @name.definition.method)) @definition.method
(method_signature
(factory_constructor_signature
(identifier) @name.definition.method)) @definition.method
(method_signature
(constructor_signature
name: (identifier) @name.definition.method)) @definition.method
(method_signature
(operator_signature)) @definition.method
(method_signature) @definition.method
(mixin_declaration
(mixin)
(identifier) @name.definition.mixin) @definition.mixin
(extension_declaration
name: (identifier) @name.definition.extension) @definition.extension
(enum_declaration
name: (identifier) @name.definition.enum) @definition.enum
(function_signature
name: (identifier) @name.definition.function) @definition.function
(new_expression
(type_identifier) @name.reference.class) @reference.class
(initialized_variable_definition
name: (identifier)
value: (identifier) @name.reference.class
value: (selector
"!"?
(argument_part
(arguments
(argument)*))?)?) @reference.class
(assignment_expression
left: (assignable_expression
(identifier)
(unconditional_assignable_selector
"."
(identifier) @name.reference.call))) @reference.call
(assignment_expression
left: (assignable_expression
(identifier)
(conditional_assignable_selector
"?."
(identifier) @name.reference.call))) @reference.call
((identifier) @name
(selector
"!"?
(conditional_assignable_selector
"?." (identifier) @name.reference.call)?
(unconditional_assignable_selector
"."? (identifier) @name.reference.call)?
(argument_part
(arguments
(argument)*))?)*
(cascade_section
(cascade_selector
(identifier)) @name.reference.call
(argument_part
(arguments
(argument)*))?)?) @reference.call

View File

@@ -2,7 +2,17 @@ import os
import time
from pathlib import Path, PurePosixPath
import git
try:
import git
ANY_GIT_ERROR = [
git.exc.ODBError,
git.exc.GitError,
]
except ImportError:
git = None
ANY_GIT_ERROR = []
import pathspec
from aider import prompts, utils
@@ -10,15 +20,14 @@ from aider.sendchat import simple_send_with_retries
from .dump import dump # noqa: F401
ANY_GIT_ERROR = (
git.exc.ODBError,
git.exc.GitError,
ANY_GIT_ERROR += [
OSError,
IndexError,
BufferError,
TypeError,
ValueError,
)
]
ANY_GIT_ERROR = tuple(ANY_GIT_ERROR)
class GitRepo:
@@ -169,7 +178,7 @@ class GitRepo:
def get_rel_repo_dir(self):
try:
return os.path.relpath(self.repo.git_dir, os.getcwd())
except ValueError:
except (ValueError, OSError):
return self.repo.git_dir
def get_commit_message(self, diffs, context):
@@ -192,9 +201,7 @@ class GitRepo:
max_tokens = model.info.get("max_input_tokens") or 0
if max_tokens and num_tokens > max_tokens:
continue
commit_message = simple_send_with_retries(
model.name, messages, extra_params=model.extra_params
)
commit_message = simple_send_with_retries(model, messages)
if commit_message:
break
@@ -331,6 +338,15 @@ class GitRepo:
lines,
)
def git_ignored_file(self, path):
if not self.repo:
return
try:
if self.repo.ignored(path):
return True
except ANY_GIT_ERROR:
return False
def ignored_file(self, fname):
self.refresh_aider_ignore()

View File

@@ -2,6 +2,7 @@ import colorsys
import math
import os
import random
import shutil
import sqlite3
import sys
import time
@@ -27,7 +28,7 @@ from tree_sitter_languages import get_language, get_parser # noqa: E402
Tag = namedtuple("Tag", "rel_fname fname line name kind".split())
SQLITE_ERRORS = (sqlite3.OperationalError, sqlite3.DatabaseError)
SQLITE_ERRORS = (sqlite3.OperationalError, sqlite3.DatabaseError, OSError)
class RepoMap:
@@ -166,13 +167,52 @@ class RepoMap:
# Just return the full fname.
return fname
def tags_cache_error(self, original_error=None):
"""Handle SQLite errors by trying to recreate cache, falling back to dict if needed"""
if self.verbose and original_error:
self.io.tool_warning(f"Tags cache error: {str(original_error)}")
if isinstance(getattr(self, "TAGS_CACHE", None), dict):
return
path = Path(self.root) / self.TAGS_CACHE_DIR
# Try to recreate the cache
try:
# Delete existing cache dir
if path.exists():
shutil.rmtree(path)
# Try to create new cache
new_cache = Cache(path)
# Test that it works
test_key = "test"
new_cache[test_key] = "test"
_ = new_cache[test_key]
del new_cache[test_key]
# If we got here, the new cache works
self.TAGS_CACHE = new_cache
return
except SQLITE_ERRORS as e:
# If anything goes wrong, warn and fall back to dict
self.io.tool_warning(
f"Unable to use tags cache at {path}, falling back to memory cache"
)
if self.verbose:
self.io.tool_warning(f"Cache recreation error: {str(e)}")
self.TAGS_CACHE = dict()
def load_tags_cache(self):
path = Path(self.root) / self.TAGS_CACHE_DIR
try:
self.TAGS_CACHE = Cache(path)
except SQLITE_ERRORS:
self.io.tool_warning(f"Unable to use tags cache, delete {path} to resolve.")
self.TAGS_CACHE = dict()
except SQLITE_ERRORS as e:
self.tags_cache_error(e)
def save_tags_cache(self):
pass
@@ -190,9 +230,18 @@ class RepoMap:
return []
cache_key = fname
val = self.TAGS_CACHE.get(cache_key) # Issue #1308
try:
val = self.TAGS_CACHE.get(cache_key) # Issue #1308
except SQLITE_ERRORS as e:
self.tags_cache_error(e)
val = self.TAGS_CACHE.get(cache_key)
if val is not None and val.get("mtime") == file_mtime:
return self.TAGS_CACHE[cache_key]["data"]
try:
return self.TAGS_CACHE[cache_key]["data"]
except SQLITE_ERRORS as e:
self.tags_cache_error(e)
return self.TAGS_CACHE[cache_key]["data"]
# miss!
data = list(self.get_tags_raw(fname, rel_fname))
@@ -201,8 +250,9 @@ class RepoMap:
try:
self.TAGS_CACHE[cache_key] = {"mtime": file_mtime, "data": data}
self.save_tags_cache()
except SQLITE_ERRORS:
pass
except SQLITE_ERRORS as e:
self.tags_cache_error(e)
self.TAGS_CACHE[cache_key] = {"mtime": file_mtime, "data": data}
return data
@@ -302,7 +352,13 @@ class RepoMap:
# https://networkx.org/documentation/stable/_modules/networkx/algorithms/link_analysis/pagerank_alg.html#pagerank
personalize = 100 / len(fnames)
if len(fnames) - len(self.TAGS_CACHE) > 100:
try:
cache_size = len(self.TAGS_CACHE)
except SQLITE_ERRORS as e:
self.tags_cache_error(e)
cache_size = len(self.TAGS_CACHE)
if len(fnames) - cache_size > 100:
self.io.tool_output(
"Initial repo scan can be slow in larger repos, but only happens once."
)
@@ -312,6 +368,8 @@ class RepoMap:
showing_bar = False
for fname in fnames:
if self.verbose:
self.io.tool_output(f"Processing {fname}")
if progress and not showing_bar:
progress()

View File

@@ -1,18 +1,38 @@
{
"anthropic/claude-3-5-sonnet-20241022": {
"vertex_ai-language-models/gemini-2.0-flash-exp": {
"max_tokens": 8192,
"max_input_tokens": 200000,
"max_input_tokens": 1048576,
"max_output_tokens": 8192,
"input_cost_per_token": 0.000003,
"output_cost_per_token": 0.000015,
"cache_creation_input_token_cost": 0.00000375,
"cache_read_input_token_cost": 0.0000003,
"litellm_provider": "anthropic",
"max_images_per_prompt": 3000,
"max_videos_per_prompt": 10,
"max_video_length": 1,
"max_audio_length_hours": 8.4,
"max_audio_per_prompt": 1,
"max_pdf_size_mb": 30,
"litellm_provider": "vertex_ai-language-models",
"mode": "chat",
"supports_system_messages": true,
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_prompt_caching": true
}
"supports_response_schema": true,
"source": "https://cloud.google.com/vertex-ai/generative-ai/docs/gemini-v2"
},
"gemini/gemini-2.0-flash-exp": {
"max_tokens": 8192,
"max_input_tokens": 1048576,
"max_output_tokens": 8192,
"max_images_per_prompt": 3000,
"max_videos_per_prompt": 10,
"max_video_length": 1,
"max_audio_length_hours": 8.4,
"max_audio_per_prompt": 1,
"max_pdf_size_mb": 30,
"litellm_provider": "gemini",
"mode": "chat",
"supports_system_messages": true,
"supports_function_calling": true,
"supports_vision": true,
"supports_response_schema": true,
"source": "https://cloud.google.com/vertex-ai/generative-ai/docs/gemini-v2"
},
}

View File

@@ -8,12 +8,12 @@ import pexpect
import psutil
def run_cmd(command, verbose=False, error_print=None):
def run_cmd(command, verbose=False, error_print=None, cwd=None):
try:
if sys.stdin.isatty() and hasattr(pexpect, "spawn") and platform.system() != "Windows":
return run_cmd_pexpect(command, verbose)
return run_cmd_pexpect(command, verbose, cwd)
return run_cmd_subprocess(command, verbose)
return run_cmd_subprocess(command, verbose, cwd)
except OSError as e:
error_message = f"Error occurred while running command '{command}': {str(e)}"
if error_print is None:
@@ -39,7 +39,7 @@ def get_windows_parent_process_name():
return None
def run_cmd_subprocess(command, verbose=False):
def run_cmd_subprocess(command, verbose=False, cwd=None):
if verbose:
print("Using run_cmd_subprocess:", command)
@@ -69,6 +69,7 @@ def run_cmd_subprocess(command, verbose=False):
errors="replace",
bufsize=0, # Set bufsize to 0 for unbuffered output
universal_newlines=True,
cwd=cwd,
)
output = []
@@ -85,7 +86,7 @@ def run_cmd_subprocess(command, verbose=False):
return 1, str(e)
def run_cmd_pexpect(command, verbose=False):
def run_cmd_pexpect(command, verbose=False, cwd=None):
"""
Run a shell command interactively using pexpect, capturing all output.
@@ -112,12 +113,12 @@ def run_cmd_pexpect(command, verbose=False):
# Use the shell from SHELL environment variable
if verbose:
print("Running pexpect.spawn with shell:", shell)
child = pexpect.spawn(shell, args=["-c", command], encoding="utf-8")
child = pexpect.spawn(shell, args=["-i", "-c", command], encoding="utf-8", cwd=cwd)
else:
# Fall back to spawning the command directly
if verbose:
print("Running pexpect.spawn without shell.")
child = pexpect.spawn(command, encoding="utf-8")
child = pexpect.spawn(command, encoding="utf-8", cwd=cwd)
# Transfer control to the user, capturing output
child.interact(output_filter=output_callback)

View File

@@ -1,9 +1,9 @@
import hashlib
import json
import backoff
import time
from aider.dump import dump # noqa: F401
from aider.exceptions import LiteLLMExceptions
from aider.llm import litellm
# from diskcache import Cache
@@ -16,38 +16,6 @@ CACHE = None
RETRY_TIMEOUT = 60
def retry_exceptions():
import httpx
return (
httpx.ConnectError,
httpx.RemoteProtocolError,
httpx.ReadTimeout,
litellm.exceptions.APIConnectionError,
litellm.exceptions.APIError,
litellm.exceptions.RateLimitError,
litellm.exceptions.ServiceUnavailableError,
litellm.exceptions.Timeout,
litellm.exceptions.InternalServerError,
litellm.llms.anthropic.chat.AnthropicError,
)
def lazy_litellm_retry_decorator(func):
def wrapper(*args, **kwargs):
decorated_func = backoff.on_exception(
backoff.expo,
retry_exceptions(),
max_time=RETRY_TIMEOUT,
on_backoff=lambda details: print(
f"{details.get('exception', 'Exception')}\nRetry in {details['wait']:.1f} seconds."
),
)(func)
return decorated_func(*args, **kwargs)
return wrapper
def send_completion(
model_name,
messages,
@@ -56,8 +24,6 @@ def send_completion(
temperature=0,
extra_params=None,
):
from aider.llm import litellm
kwargs = dict(
model=model_name,
messages=messages,
@@ -90,18 +56,43 @@ def send_completion(
return hash_object, res
@lazy_litellm_retry_decorator
def simple_send_with_retries(model_name, messages, extra_params=None):
try:
kwargs = {
"model_name": model_name,
"messages": messages,
"functions": None,
"stream": False,
"extra_params": extra_params,
}
def simple_send_with_retries(model, messages):
litellm_ex = LiteLLMExceptions()
_hash, response = send_completion(**kwargs)
return response.choices[0].message.content
except (AttributeError, litellm.exceptions.BadRequestError):
return
retry_delay = 0.125
while True:
try:
kwargs = {
"model_name": model.name,
"messages": messages,
"functions": None,
"stream": False,
"temperature": None if not model.use_temperature else 0,
"extra_params": model.extra_params,
}
_hash, response = send_completion(**kwargs)
if not response or not hasattr(response, "choices") or not response.choices:
return None
return response.choices[0].message.content
except litellm_ex.exceptions_tuple() as err:
ex_info = litellm_ex.get_ex_info(err)
print(str(err))
if ex_info.description:
print(ex_info.description)
should_retry = ex_info.retry
if should_retry:
retry_delay *= 2
if retry_delay > RETRY_TIMEOUT:
should_retry = False
if not should_retry:
return None
print(f"Retrying in {retry_delay:.1f} seconds...")
time.sleep(retry_delay)
continue
except AttributeError:
return None

View File

@@ -10,3 +10,7 @@ llms = "https://aider.chat/docs/llms.html"
large_repos = "https://aider.chat/docs/faq.html#can-i-use-aider-in-a-large-mono-repo"
github_issues = "https://github.com/Aider-AI/aider/issues/new"
git_index_version = "https://github.com/Aider-AI/aider/issues/211"
install_properly = "https://aider.chat/docs/troubleshooting/imports.html"
analytics = "https://aider.chat/docs/more/analytics.html"
release_notes = "https://aider.chat/HISTORY.html#release-notes"
edit_formats = "https://aider.chat/docs/more/edit-formats.html"

View File

@@ -2,18 +2,15 @@ import itertools
import os
import platform
import shlex
import shutil
import subprocess
import sys
import tempfile
import time
from pathlib import Path
import git
from aider.dump import dump # noqa: F401
IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".webp"}
IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".webp", ".pdf"}
class IgnorantTemporaryDirectory:
@@ -74,6 +71,8 @@ class GitTemporaryDirectory(ChdirTemporaryDirectory):
def make_repo(path=None):
import git
if not path:
path = "."
repo = git.Repo.init(path)
@@ -194,25 +193,9 @@ def split_chat_history_markdown(text, include_tool=False):
return messages
# Copied from pip, MIT license
# https://github.com/pypa/pip/blob/b989e6ef04810bbd4033a3683020bd4ddcbdb627/src/pip/_internal/utils/entrypoints.py#L73
def get_best_invocation_for_this_python() -> str:
"""Try to figure out the best way to invoke the current Python."""
exe = sys.executable
exe_name = os.path.basename(exe)
# Try to use the basename, if it's the first executable.
found_executable = shutil.which(exe_name)
if found_executable and os.path.samefile(found_executable, exe):
return exe_name
# Use the full executable name, because we couldn't find something simpler.
return exe
def get_pip_install(args):
cmd = [
get_best_invocation_for_this_python(),
sys.executable,
"-m",
"pip",
"install",
@@ -268,15 +251,34 @@ def run_install(cmd):
class Spinner:
spinner_chars = itertools.cycle(["", "", "", "", "", "", "", "", "", ""])
unicode_spinner = ["", "", "", "", "", "", "", "", "", ""]
ascii_spinner = ["|", "/", "-", "\\"]
def __init__(self, text):
self.text = text
self.start_time = time.time()
self.last_update = 0
self.visible = False
self.is_tty = sys.stdout.isatty()
self.tested = False
def test_charset(self):
if self.tested:
return
self.tested = True
# Try unicode first, fall back to ascii if needed
try:
# Test if we can print unicode characters
print(self.unicode_spinner[0], end="", flush=True)
print("\r", end="", flush=True)
self.spinner_chars = itertools.cycle(self.unicode_spinner)
except UnicodeEncodeError:
self.spinner_chars = itertools.cycle(self.ascii_spinner)
def step(self):
if not self.is_tty:
return
current_time = time.time()
if not self.visible and current_time - self.start_time >= 0.5:
self.visible = True
@@ -289,10 +291,11 @@ class Spinner:
if not self.visible:
return
self.test_charset()
print(f"\r{self.text} {next(self.spinner_chars)}\r{self.text} ", end="", flush=True)
def end(self):
if self.visible:
if self.visible and self.is_tty:
print("\r" + " " * (len(self.text) + 3))
@@ -378,3 +381,15 @@ def printable_shell_command(cmd_list):
return subprocess.list2cmdline(cmd_list)
else:
return shlex.join(cmd_list)
def main():
spinner = Spinner("Running spinner...")
for _ in range(40): # 40 steps * 0.25 seconds = 10 seconds
time.sleep(0.25)
spinner.step()
spinner.end()
if __name__ == "__main__":
main()

View File

@@ -14,6 +14,8 @@ from .dump import dump # noqa: F401
warnings.filterwarnings(
"ignore", message="Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work"
)
warnings.filterwarnings("ignore", category=SyntaxWarning)
from pydub import AudioSegment # noqa
@@ -34,7 +36,7 @@ class Voice:
threshold = 0.15
def __init__(self, audio_format="wav"):
def __init__(self, audio_format="wav", device_name=None):
if sf is None:
raise SoundDeviceError
try:
@@ -42,6 +44,29 @@ class Voice:
import sounddevice as sd
self.sd = sd
devices = sd.query_devices()
if device_name:
# Find the device with matching name
device_id = None
for i, device in enumerate(devices):
if device_name in device["name"]:
device_id = i
break
if device_id is None:
available_inputs = [d["name"] for d in devices if d["max_input_channels"] > 0]
raise ValueError(
f"Device '{device_name}' not found. Available input devices:"
f" {available_inputs}"
)
print(f"Using input device: {device_name} (ID: {device_id})")
self.device_id = device_id
else:
self.device_id = None
except (OSError, ModuleNotFoundError):
raise SoundDeviceError
if audio_format not in ["wav", "mp3", "webm"]:
@@ -93,7 +118,7 @@ class Voice:
temp_wav = tempfile.mktemp(suffix=".wav")
try:
sample_rate = int(self.sd.query_devices(None, "input")["default_samplerate"])
sample_rate = int(self.sd.query_devices(self.device_id, "input")["default_samplerate"])
except (TypeError, ValueError):
sample_rate = 16000 # fallback to 16kHz if unable to query device
except self.sd.PortAudioError:
@@ -104,7 +129,9 @@ class Voice:
self.start_time = time.time()
try:
with self.sd.InputStream(samplerate=sample_rate, channels=1, callback=self.callback):
with self.sd.InputStream(
samplerate=sample_rate, channels=1, callback=self.callback, device=self.device_id
):
prompt(self.get_prompt, refresh_interval=0.1)
except self.sd.PortAudioError as err:
raise SoundDeviceError(f"Error accessing audio input device: {err}")

278
aider/watch.py Normal file
View File

@@ -0,0 +1,278 @@
import re
import threading
from pathlib import Path
from typing import Optional
from grep_ast import TreeContext
from pathspec import PathSpec
from pathspec.patterns import GitWildMatchPattern
from watchfiles import watch
from aider.dump import dump # noqa
from aider.watch_prompts import watch_ask_prompt, watch_code_prompt
def load_gitignores(gitignore_paths: list[Path]) -> Optional[PathSpec]:
"""Load and parse multiple .gitignore files into a single PathSpec"""
if not gitignore_paths:
return None
patterns = [
".aider*",
".git",
# Common editor backup/temp files
"*~", # Emacs/vim backup
"*.bak", # Generic backup
"*.swp", # Vim swap
"*.swo", # Vim swap
"\\#*\\#", # Emacs auto-save
".#*", # Emacs lock files
"*.tmp", # Generic temp files
"*.temp", # Generic temp files
"*.orig", # Merge conflict originals
"*.pyc", # Python bytecode
"__pycache__/", # Python cache dir
".DS_Store", # macOS metadata
"Thumbs.db", # Windows thumbnail cache
# IDE files
".idea/", # JetBrains IDEs
".vscode/", # VS Code
"*.sublime-*", # Sublime Text
".project", # Eclipse
".settings/", # Eclipse
"*.code-workspace", # VS Code workspace
# Environment files
".env", # Environment variables
".venv/", # Python virtual environments
"node_modules/", # Node.js dependencies
"vendor/", # Various dependencies
# Logs and caches
"*.log", # Log files
".cache/", # Cache directories
".pytest_cache/", # Python test cache
"coverage/", # Code coverage reports
] # Always ignore
for path in gitignore_paths:
if path.exists():
with open(path) as f:
patterns.extend(f.readlines())
return PathSpec.from_lines(GitWildMatchPattern, patterns) if patterns else None
class FileWatcher:
"""Watches source files for changes and AI comments"""
# Compiled regex pattern for AI comments
ai_comment_pattern = re.compile(r"(?:#|//|--) *(ai\b.*|ai\b.*|.*\bai[?!]?) *$", re.IGNORECASE)
def __init__(self, coder, gitignores=None, verbose=False, analytics=None):
self.coder = coder
self.io = coder.io
self.root = Path(coder.root)
self.verbose = verbose
self.analytics = analytics
self.stop_event = None
self.watcher_thread = None
self.changed_files = set()
self.gitignores = gitignores
self.gitignore_spec = load_gitignores(
[Path(g) for g in self.gitignores] if self.gitignores else []
)
coder.io.file_watcher = self
def filter_func(self, change_type, path):
"""Filter function for the file watcher"""
path_obj = Path(path)
path_abs = path_obj.absolute()
if not path_abs.is_relative_to(self.root.absolute()):
return False
rel_path = path_abs.relative_to(self.root)
if self.verbose:
dump(rel_path)
if self.gitignore_spec and self.gitignore_spec.match_file(str(rel_path)):
return False
if self.verbose:
dump("ok", rel_path)
# Check if file contains AI markers
try:
comments, _, _ = self.get_ai_comments(str(path_abs))
return bool(comments)
except Exception:
return
def start(self):
"""Start watching for file changes"""
self.stop_event = threading.Event()
self.changed_files = set()
def watch_files():
try:
for changes in watch(
str(self.root), watch_filter=self.filter_func, stop_event=self.stop_event
):
if not changes:
continue
changed_files = {str(Path(change[1])) for change in changes}
self.changed_files.update(changed_files)
self.io.interrupt_input()
return
except Exception as e:
if self.verbose:
dump(f"File watcher error: {e}")
raise e
self.watcher_thread = threading.Thread(target=watch_files, daemon=True)
self.watcher_thread.start()
def stop(self):
"""Stop watching for file changes"""
if self.stop_event:
self.stop_event.set()
if self.watcher_thread:
self.watcher_thread.join()
self.watcher_thread = None
self.stop_event = None
def process_changes(self):
"""Get any detected file changes"""
has_action = None
added = False
for fname in self.changed_files:
_, _, action = self.get_ai_comments(fname)
if action in ("!", "?"):
has_action = action
if fname in self.coder.abs_fnames:
continue
if self.analytics:
self.analytics.event("ai-comments file-add")
self.coder.abs_fnames.add(fname)
rel_fname = self.coder.get_rel_fname(fname)
if not added:
self.io.tool_output()
added = True
self.io.tool_output(f"Added {rel_fname} to the chat")
if not has_action:
if added:
self.io.tool_output(
"End your comment with AI! to request changes or AI? to ask questions"
)
return ""
if self.analytics:
self.analytics.event("ai-comments execute")
self.io.tool_output("Processing your request...")
if has_action == "!":
res = watch_code_prompt
elif has_action == "?":
res = watch_ask_prompt
# Refresh all AI comments from tracked files
for fname in self.coder.abs_fnames:
line_nums, comments, _action = self.get_ai_comments(fname)
if not line_nums:
continue
code = self.io.read_text(fname)
if not code:
continue
rel_fname = self.coder.get_rel_fname(fname)
res += f"\n{rel_fname}:\n"
# Convert comment line numbers to line indices (0-based)
lois = [ln - 1 for ln, _ in zip(line_nums, comments) if ln > 0]
try:
context = TreeContext(
rel_fname,
code,
color=False,
line_number=False,
child_context=False,
last_line=False,
margin=0,
mark_lois=True,
loi_pad=3,
show_top_of_file_parent_scope=False,
)
context.lines_of_interest = set()
context.add_lines_of_interest(lois)
context.add_context()
res += context.format()
except ValueError:
for ln, comment in zip(line_nums, comments):
res += f" Line {ln}: {comment}\n"
return res
def get_ai_comments(self, filepath):
"""Extract AI comment line numbers, comments and action status from a file"""
line_nums = []
comments = []
has_action = None # None, "!" or "?"
content = self.io.read_text(filepath, silent=True)
for i, line in enumerate(content.splitlines(), 1):
if match := self.ai_comment_pattern.search(line):
comment = match.group(0).strip()
if comment:
line_nums.append(i)
comments.append(comment)
comment = comment.lower()
comment = comment.lstrip("/#-")
comment = comment.strip()
if comment.startswith("ai!") or comment.endswith("ai!"):
has_action = "!"
elif comment.startswith("ai?") or comment.endswith("ai?"):
has_action = "?"
if not line_nums:
return None, None, None
return line_nums, comments, has_action
def main():
"""Example usage of the file watcher"""
import argparse
parser = argparse.ArgumentParser(description="Watch source files for changes")
parser.add_argument("directory", help="Directory to watch")
parser.add_argument(
"--gitignore",
action="append",
help="Path to .gitignore file (can be specified multiple times)",
)
args = parser.parse_args()
directory = args.directory
print(f"Watching source files in {directory}...")
# Example ignore function that ignores files with "test" in the name
def ignore_test_files(path):
return "test" in path.name.lower()
watcher = FileWatcher(directory, gitignores=args.gitignore)
try:
watcher.start()
while True:
if changes := watcher.get_changes():
for file in sorted(changes.keys()):
print(file)
watcher.changed_files = None
except KeyboardInterrupt:
print("\nStopped watching files")
watcher.stop()
if __name__ == "__main__":
main()

11
aider/watch_prompts.py Normal file
View File

@@ -0,0 +1,11 @@
watch_code_prompt = """
Find the "AI" comments below (marked with █) in the code files I've shared with you.
They contain your instructions.
Make the requested changes.
Be sure to remove all these "AI" comments from the code!
"""
watch_ask_prompt = """/ask
Find the "AI" comments below (marked with █) in the code files I've shared with you.
They contain your questions you need to answer and other instructions.
"""

View File

@@ -1,7 +1,6 @@
---
title: Release history
parent: More info
nav_order: 999
nav_order: 925
highlight_image: /assets/blame.jpg
description: Release notes and stats on aider writing its own code.
---
@@ -10,6 +9,12 @@ description: Release notes and stats on aider writing its own code.
{% include blame.md %}
The above
[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.
## Release notes
<!--[[[cog
# This page is a copy of HISTORY.md, adding the front matter above.
text = open("HISTORY.md").read()
@@ -18,8 +23,199 @@ cog.out(text)
]]]-->
### Aider v0.69.0
### v0.59.0
- [Watch files](https://aider.chat/docs/usage/watch.html) improvements:
- Use `# ... AI?` comments to trigger aider and ask questions about your code.
- Now watches *all* files, not just certain source files.
- Use `# AI comments`, `// AI comments`, or `-- AI comments` to give aider instructions in any text file.
- Full support for Gemini Flash 2.0 Exp:
- `aider --model flash` or `aider --model gemini/gemini-2.0-flash-exp`
- [New `--multiline` flag and `/multiline-mode` command](https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages) makes ENTER a soft newline and META-ENTER send the message, by @miradnanali.
- `/copy-context <instructions>` now takes optional "instructions" when [copying code context to the clipboard](https://aider.chat/docs/usage/copypaste.html#copy-aiders-code-context-to-your-clipboard-paste-into-the-web-ui).
- Improved clipboard error handling with helpful requirements install info.
- Ask 5% of users if they want to opt-in to analytics.
- `/voice` now lets you edit the transcribed text before sending.
- Disabled auto-complete in Y/N prompts.
- Aider wrote 68% of the code in this release.
### Aider v0.68.0
- [Aider works with LLM web chat UIs](https://aider.chat/docs/usage/copypaste.html).
- New `--copy-paste` mode.
- New `/copy-context` command.
- [Set API keys and other environment variables for all providers from command line or yaml conf file](https://aider.chat/docs/config/aider_conf.html#storing-llm-keys).
- New `--api-key provider=key` setting.
- New `--set-env VAR=value` setting.
- Added bash and zsh support to `--watch-files`.
- Better error messages when missing dependencies for Gemini and Bedrock models.
- Control-D now properly exits the program.
- Don't count token costs when API provider returns a hard error.
- Bugfix so watch files works with files that don't have tree-sitter support.
- Bugfix so o1 models can be used as weak model.
- Updated shell command prompt.
- Added docstrings for all Coders.
- Reorganized command line arguments with improved help messages and grouping.
- Use the exact `sys.python` for self-upgrades.
- Added experimental Gemini models.
- Aider wrote 71% of the code in this release.
### Aider v0.67.0
- [Use aider in your IDE or editor](https://aider.chat/docs/usage/watch.html).
- Run `aider --watch-files` and it will watch for instructions you add to your source files.
- One-liner `# ...` or `// ...` comments that start or end with "AI" are instructions to aider.
- When aider sees "AI!" it reads and follows all the instructions in AI comments.
- Support for new Amazon Bedrock Nova models.
- When `/run` or `/test` have non-zero exit codes, pre-fill "Fix that" into the next message prompt.
- `/diff` now invokes `git diff` to use your preferred diff tool.
- Added Ctrl-Z support for process suspension.
- Spinner now falls back to ASCII art if fancy symbols throw unicode errors.
- `--read` now expands `~` home dirs.
- Enabled exception capture in analytics.
- [Aider wrote 61% of the code in this release.](https://aider.chat/HISTORY.html)
### Aider v0.66.0
- PDF support for Sonnet and Gemini models.
- Added `--voice-input-device` to select audio input device for voice recording, by @preynal.
- Added `--timeout` option to configure API call timeouts.
- Set cwd to repo root when running shell commands.
- Added Ctrl-Up/Down keyboard shortcuts for per-message history navigation.
- Improved error handling for failed .gitignore file operations.
- Improved error handling for input history file permissions.
- Improved error handling for analytics file access.
- Removed spurious warning about disabling pretty in VSCode.
- Removed broken support for Dart.
- Bugfix when scraping URLs found in chat messages.
- Better handling of __version__ import errors.
- Improved `/drop` command to support substring matching for non-glob patterns.
- Aider wrote 82% of the code in this release.
### Aider v0.65.1
- Bugfix to `--alias`.
### Aider v0.65.0
- Added `--alias` config to define [custom model aliases](https://aider.chat/docs/config/model-aliases.html).
- Added `--[no-]detect-urls` flag to disable detecting and offering to scrape URLs found in the chat.
- Ollama models now default to an 8k context window.
- Added [RepoMap support for Dart language](https://aider.chat/docs/languages.html) by @malkoG.
- Ask 2.5% of users if they want to opt-in to [analytics](https://aider.chat/docs/more/analytics.html).
- Skip suggesting files that share names with files already in chat.
- `/editor` returns and prefill the file content into the prompt, so you can use `/editor` to compose messages that start with `/commands`, etc.
- Enhanced error handling for analytics.
- Improved handling of UnknownEditFormat exceptions with helpful documentation links.
- Bumped dependencies to pick up grep-ast 0.4.0 for Dart language support.
- Aider wrote 81% of the code in this release.
### Aider v0.64.1
- Disable streaming for o1 on OpenRouter.
### Aider v0.64.0
- Added [`/editor` command](https://aider.chat/docs/usage/commands.html) to open system editor for writing prompts, by @thehunmonkgroup.
- Full support for `gpt-4o-2024-11-20`.
- Stream o1 models by default.
- `/run` and suggested shell commands are less mysterious and now confirm that they "Added XX lines of output to the chat."
- Ask 1% of users if they want to opt-in to [analytics](https://aider.chat/docs/more/analytics.html).
- Added support for [optional multiline input tags](https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages) with matching closing tags.
- Improved [model settings configuration](https://aider.chat/docs/config/adv-model-settings.html#global-extra-params) with support for global `extra_params` for `litellm.completion()`.
- Architect mode now asks to add files suggested by the LLM.
- Fixed bug in fuzzy model name matching.
- Added Timeout exception to handle API provider timeouts.
- Added `--show-release-notes` to control release notes display on first run of new version.
- Save empty dict to cache file on model metadata download failure, to delay retry.
- Improved error handling and code formatting.
- Aider wrote 74% of the code in this release.
### Aider v0.63.2
- Fixed bug in fuzzy model name matching when litellm provider info is missing.
- Modified model metadata file loading to allow override of resource file.
- Allow recursive loading of dirs using `--read`.
- Updated dependency versions to pick up litellm fix for ollama models.
- Added exponential backoff retry when writing files to handle editor file locks.
- Updated Qwen 2.5 Coder 32B model configuration.
### Aider v0.63.1
- Fixed bug in git ignored file handling.
- Improved error handling for git operations.
### Aider v0.63.0
- Support for Qwen 2.5 Coder 32B.
- `/web` command just adds the page to the chat, without triggering an LLM response.
- Improved prompting for the user's preferred chat language.
- Improved handling of LiteLLM exceptions.
- Bugfix for double-counting tokens when reporting cache stats.
- Bugfix for the LLM creating new files.
- Other small bug fixes.
- Aider wrote 55% of the code in this release.
### Aider v0.62.0
- Full support for Claude 3.5 Haiku
- Scored 75% on [aider's code editing leaderboard](https://aider.chat/docs/leaderboards/).
- Almost as good as Sonnet at much lower cost.
- Launch with `--haiku` to use it.
- Easily apply file edits from ChatGPT, Claude or other web apps
- Chat with ChatGPT or Claude via their web app.
- Give it your source files and ask for the changes you want.
- Use the web app's "copy response" button to copy the entire reply from the LLM.
- Run `aider --apply-clipboard-edits file-to-edit.js`.
- Aider will edit your file with the LLM's changes.
- Bugfix for creating new files.
- Aider wrote 84% of the code in this release.
### Aider v0.61.0
- Load and save aider slash-commands to files:
- `/save <fname>` command will make a file of `/add` and `/read-only` commands that recreate the current file context in the chat.
- `/load <fname>` will replay the commands in the file.
- You can use `/load` to run any arbitrary set of slash-commands, not just `/add` and `/read-only`.
- Use `--load <fname>` to run a list of commands on launch, before the interactive chat begins.
- Anonymous, opt-in [analytics](https://aider.chat/docs/more/analytics.html) with no personal data sharing.
- Aider follows litellm's `supports_vision` attribute to enable image support for models.
- Bugfix for when diff mode flexibly handles the model using the wrong filename.
- Displays filenames in sorted order for `/add` and `/read-only`.
- New `--no-fancy-input` switch disables prompt toolkit input, now still available with `--no-pretty`.
- Override browser config with `--no-browser` or `--no-gui`.
- Offer to open documentation URLs when errors occur.
- Properly support all o1 models, regardless of provider.
- Improved layout of filenames above input prompt.
- Better handle corrupted repomap tags cache.
- Improved handling of API errors, especially when accessing the weak model.
- Aider wrote 68% of the code in this release.
### Aider v0.60.1
- Enable image support for Sonnet 10/22.
- Display filenames in sorted order.
### Aider v0.60.0
- Full support for Sonnet 10/22, the new SOTA model on aider's code editing benchmark.
- Aider uses Sonnet 10/22 by default.
- Improved formatting of added and read-only files above chat prompt, by @jbellis.
- Improved support for o1 models by more flexibly parsing their nonconforming code edit replies.
- Corrected diff edit format prompt that only the first match is replaced.
- Stronger whole edit format prompt asking for clean file names.
- Now offers to add `.env` to the `.gitignore` file.
- Ships with a small model metadata json file to handle models not yet updated in litellm.
- Model settings for o1 models on azure.
- Bugfix to properly include URLs in `/help` RAG results.
- Aider wrote 49% of the code in this release.
### Aider v0.59.1
- Check for obsolete `yes: true` in yaml config, show helpful error.
- Model settings for openrouter/anthropic/claude-3.5-sonnet:beta
### Aider v0.59.0
- Improvements to `/read-only`:
- Now supports shell-style auto-complete of the full file system.

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
- dirname: 2024-05-01-20-05-59--direct-opus-filenames-outside-fence
test_cases: 133
model: claude-3-opus-20240229
released: 2024-02-29
_released: 2024-02-29
edit_format: diff
commit_hash: f4b1797-dirty, f4b1797
pass_rate_1: 53.4
@@ -20,7 +20,7 @@
versions: 0.30.2-dev
seconds_per_case: 32.4
total_cost: 13.8395
- dirname: 2024-03-06-16-42-00--claude3-sonnet-whole
test_cases: 133
model: claude-3-sonnet-20240229
@@ -43,10 +43,11 @@
versions: 0.25.1-dev
seconds_per_case: 23.1
total_cost: 0.0000
- dirname: 2024-05-03-20-47-24--gemini-1.5-pro-diff-fenced
test_cases: 133
model: gemini-1.5-pro-latest
released: 2024-05-03
model: gemini-1.5-pro-001
edit_format: diff-fenced
commit_hash: 3a48dfb, 5d32dd7
pass_rate_1: 45.9
@@ -88,7 +89,7 @@
versions: 0.33.1-dev
seconds_per_case: 6.5
total_cost: 0.5032
- dirname: 2023-11-06-21-23-59--gpt-3.5-turbo-0301
test_cases: 133
model: gpt-3.5-turbo-0301
@@ -111,7 +112,7 @@
versions: 0.16.4-dev
seconds_per_case: 6.5
total_cost: 0.4822
- dirname: 2023-11-07-02-41-07--gpt-3.5-turbo-0613
test_cases: 133
model: gpt-3.5-turbo-0613
@@ -155,7 +156,7 @@
versions: 0.30.2-dev
seconds_per_case: 5.3
total_cost: 0.3261
- dirname: 2024-01-25-23-37-15--jan-exercism-gpt-4-0125-preview-udiff
test_cases: 133
model: gpt-4-0125-preview
@@ -178,7 +179,7 @@
versions: 0.22.1-dev
seconds_per_case: 44.8
total_cost: 14.6428
- dirname: 2024-05-04-15-07-30--redo-gpt-4-0314-diff-reminder-rules
test_cases: 133
model: gpt-4-0314
@@ -201,7 +202,7 @@
versions: 0.31.2-dev
seconds_per_case: 19.8
total_cost: 16.2689
- dirname: 2023-12-16-21-24-28--editblock-gpt-4-0613-actual-main
test_cases: 133
model: gpt-4-0613
@@ -228,7 +229,7 @@
- dirname: 2024-05-08-21-16-03--may-gpt-4-1106-preview-udiff
test_cases: 133
model: gpt-4-1106-preview
released: 2023-11-06
released: 2023-11-06
edit_format: udiff
commit_hash: 87664dc
pass_rate_1: 51.9
@@ -247,7 +248,7 @@
versions: 0.33.1-dev
seconds_per_case: 20.4
total_cost: 6.6061
- dirname: 2024-05-01-02-09-20--gpt-4-turbo-examples
test_cases: 133
model: gpt-4-turbo-2024-04-09 (udiff)
@@ -270,11 +271,11 @@
versions: 0.30.2-dev
seconds_per_case: 22.8
total_cost: 6.3337
- dirname: 2024-05-03-22-24-48--openrouter--llama3-diff-examples-sys-msg
test_cases: 132
model: llama3-70b-8192
released: 2024-04-18
_released: 2024-04-18
edit_format: diff
commit_hash: b5bb453
pass_rate_1: 38.6
@@ -293,11 +294,11 @@
versions: 0.31.2-dev
seconds_per_case: 14.5
total_cost: 0.4311
- dirname: 2024-05-06-18-31-08--command-r-plus-whole-final
test_cases: 133
model: command-r-plus
released: 2024-04-04
_released: 2024-04-04
edit_format: whole
commit_hash: fc3a43e-dirty
pass_rate_1: 21.8
@@ -316,11 +317,11 @@
versions: 0.31.2-dev
seconds_per_case: 22.9
total_cost: 2.7494
- dirname: 2024-05-07-20-32-37--qwen1.5-110b-chat-whole
test_cases: 133
model: qwen1.5-110b-chat
released: 2024-02-04
released: 2024-02-04
edit_format: whole
commit_hash: 70b1c0c
pass_rate_1: 30.8
@@ -339,7 +340,7 @@
versions: 0.31.2-dev
seconds_per_case: 46.9
total_cost: 0.0000
- dirname: 2024-05-07-20-57-04--wizardlm-2-8x22b-whole
test_cases: 133
model: WizardLM-2 8x22B
@@ -384,7 +385,7 @@
versions: 0.34.1-dev
seconds_per_case: 6.0
total_cost: 0.0000
- dirname: 2024-04-12-22-18-20--gpt-4-turbo-2024-04-09-plain-diff
test_cases: 33
model: gpt-4-turbo-2024-04-09 (diff)
@@ -410,6 +411,7 @@
- dirname: 2024-06-08-22-37-55--qwen2-72b-instruct-whole
test_cases: 133
model: Qwen2 72B Instruct
released: 2024-06-08
edit_format: whole
commit_hash: 02c7335-dirty, 1a97498-dirty
pass_rate_1: 44.4
@@ -568,7 +570,7 @@
versions: 0.42.1-dev
seconds_per_case: 17.6
total_cost: 3.6346
- dirname: 2024-07-01-21-41-48--haiku-whole
test_cases: 133
model: claude-3-haiku-20240307
@@ -623,7 +625,7 @@
commit_hash: d31eef3-dirty
pass_rate_1: 40.6
pass_rate_2: 55.6
released: 2024-07-18
_released: 2024-07-18
percent_cases_well_formed: 100.0
error_outputs: 1
num_malformed_responses: 0
@@ -642,7 +644,7 @@
- dirname: 2024-07-19-08-57-13--openrouter-deepseek-chat-v2-0628
test_cases: 133
model: DeepSeek Chat V2 0628 (deprecated)
model: DeepSeek Chat V2 0628
edit_format: diff
commit_hash: 96ff06e-dirty
pass_rate_1: 60.9
@@ -671,7 +673,7 @@
commit_hash: f7ce78b-dirty
pass_rate_1: 46.6
pass_rate_2: 63.9
released: 2024-07-23
_released: 2024-07-23
percent_cases_well_formed: 92.5
error_outputs: 84
num_malformed_responses: 19
@@ -691,6 +693,7 @@
- dirname: 2024-07-24-06-30-29--llama-405b-whole
test_cases: 133
model: llama-3.1-405b-instruct (whole)
_released: 2024-07-23
edit_format: whole
commit_hash: a362dea-dirty
pass_rate_1: 48.9
@@ -698,7 +701,6 @@
percent_cases_well_formed: 100.0
error_outputs: 0
num_malformed_responses: 0
released: 2024-07-23
num_with_malformed_responses: 0
user_asks: 0
lazy_comments: 0
@@ -714,7 +716,7 @@
- dirname: 2024-07-24-07-10-58--deepseek-coder2-0724-diff-direct
test_cases: 133
model: DeepSeek Coder V2 0724 (deprecated)
model: DeepSeek Coder V2 0724
edit_format: diff
commit_hash: 89965bf
pass_rate_1: 57.9
@@ -770,7 +772,7 @@
percent_cases_well_formed: 100.0
error_outputs: 27
num_malformed_responses: 0
released: 2024-07-23
_released: 2024-07-23
num_with_malformed_responses: 0
user_asks: 23
lazy_comments: 8
@@ -796,7 +798,7 @@
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 0
released: 2024-07-23
_released: 2024-07-23
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
@@ -835,6 +837,7 @@
- dirname: 2024-08-28-07-10-50--gemini-1.5-pro-exp-0827-diff-fenced
test_cases: 133
model: gemini-1.5-pro-exp-0827
released: 2024-08-27
edit_format: diff-fenced
commit_hash: d8adc75
pass_rate_1: 54.9
@@ -946,7 +949,7 @@
versions: 0.54.13.dev
seconds_per_case: 8.3
total_cost: 0.0000
released: 2024-09-04
_released: 2024-09-04
- dirname: 2024-09-04-16-17-33--yi-coder-9b-chat-q4_0-whole
test_cases: 133
@@ -973,6 +976,7 @@
- dirname: 2024-09-05-14-50-11--deepseek-sep5-no-shell
test_cases: 133
released: 2024-09-05
model: DeepSeek V2.5
edit_format: diff
commit_hash: 1279c86
@@ -1112,6 +1116,7 @@
- dirname: 2024-09-21-16-45-11--o1-preview-flex-sr-markers
test_cases: 133
model: o1-preview
_released: 2024-09-12
edit_format: diff
commit_hash: 5493654-dirty
pass_rate_1: 57.9
@@ -1131,7 +1136,7 @@
versions: 0.56.1.dev
seconds_per_case: 80.9
total_cost: 63.9190
- dirname: 2024-09-19-16-58-29--qwen2.5-coder:7b-instruct-q8_0
test_cases: 133
model: qwen2.5-coder:7b-instruct-q8_0
@@ -1154,7 +1159,7 @@
versions: 0.56.0
seconds_per_case: 9.3
total_cost: 0.0000
- dirname: 2024-09-20-20-20-19--qwen-2.5-72b-instruct-diff
test_cases: 133
model: qwen-2.5-72b-instruct (bf16)
@@ -1204,6 +1209,7 @@
- dirname: 2024-09-24-16-26-45--gemini-1.5-pro-002-diff-fenced
test_cases: 133
model: gemini-1.5-pro-002
released: 2024-09-24
edit_format: diff-fenced
commit_hash: 6b5fe9b, 3edcd71
pass_rate_1: 49.6
@@ -1226,7 +1232,7 @@
- dirname: 2024-09-24-16-33-23--gemini-1.5-flash-002-whole
test_cases: 133
model: gemini-1.5-flash-002
model: gemini-1.5-flash-002 (0924)
edit_format: whole
commit_hash: 3edcd71
pass_rate_1: 37.6
@@ -1458,7 +1464,7 @@
versions: 0.58.1.dev
seconds_per_case: 63.7
total_cost: 0.0000
- dirname: 2024-10-01-16-50-09--hermes3-whole-4
test_cases: 133
model: ollama/hermes3
@@ -1477,6 +1483,7 @@
- dirname: 2024-10-04-16-30-08--chatgpt-4o-latest-diff-oct4
test_cases: 133
model: openai/chatgpt-4o-latest
released: 2024-10-04
edit_format: diff
commit_hash: af10953
pass_rate_1: 56.4
@@ -1592,6 +1599,7 @@
- dirname: 2024-10-22-17-45-28--sonnet-1022-diff-fixed-model-settings
test_cases: 133
model: claude-3-5-sonnet-20241022
released: 2024-10-22
edit_format: diff
commit_hash: 3b14eb9
pass_rate_1: 69.2
@@ -1610,4 +1618,566 @@
date: 2024-10-22
versions: 0.59.2.dev
seconds_per_case: 18.6
total_cost: 0.0000
- dirname: 2024-11-04-19-19-32--haiku35-diff-ex-as-sys-false
test_cases: 133
model: claude-3-5-haiku-20241022
released: 2024-10-22
edit_format: diff
commit_hash: 03bbdb0-dirty
pass_rate_1: 61.7
pass_rate_2: 75.2
percent_cases_well_formed: 95.5
error_outputs: 11
num_malformed_responses: 11
num_with_malformed_responses: 6
user_asks: 1
lazy_comments: 1
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 2
command: aider --model anthropic/claude-3-5-haiku-20241022
date: 2024-11-04
versions: 0.61.1.dev
seconds_per_case: 18.4
total_cost: 0.0000
- dirname: 2024-11-07-06-15-36--Qwen2.5.1-Coder-7B-Instruct-GGUF:Q8_0-32k-whole
test_cases: 133
model: ollama/Qwen2.5.1-Coder-7B-Instruct-GGUF:Q8_0-32k
edit_format: whole
commit_hash: e76704e
pass_rate_1: 52.6
pass_rate_2: 63.9
percent_cases_well_formed: 100.0
error_outputs: 0
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 4
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 1
command: aider --model ollama/Qwen2.5.1-Coder-7B-Instruct-GGUF:Q8_0-32k
date: 2024-11-07
versions: 0.59.2.dev
seconds_per_case: 18.2
total_cost: 0.0000
- dirname: 2024-10-29-00-29-09--Qwen2.5-Coder-0.5B-Instruct
test_cases: 133
model: Qwen2.5-Coder-0.5B-Instruct
edit_format: whole
commit_hash: 58bd375
pass_rate_1: 14.3
pass_rate_2: 14.3
percent_cases_well_formed: 100.0
error_outputs: 20
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 45
lazy_comments: 0
syntax_errors: 2
indentation_errors: 0
exhausted_context_windows: 20
test_timeouts: 2
command: aider --model openai/Qwen2.5-Coder-0.5B-Instruct
date: 2024-10-29
versions: 0.59.2.dev
seconds_per_case: 16.0
total_cost: 0.0000
- dirname: 2024-11-11-19-37-01--Qwen2.5-Coder-1.5B-Instruct
test_cases: 133
model: Qwen2.5-Coder-1.5B-Instruct
edit_format: whole
commit_hash: bb5681c
pass_rate_1: 28.6
pass_rate_2: 31.6
percent_cases_well_formed: 100.0
error_outputs: 5
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 13
lazy_comments: 2
syntax_errors: 1
indentation_errors: 0
exhausted_context_windows: 5
test_timeouts: 2
command: aider --model openai/Qwen2.5-Coder-1.5B-Instruct
date: 2024-11-11
versions: 0.59.2.dev
seconds_per_case: 27.4
total_cost: 0.0000
- dirname: 2024-11-04-02-25-32--Qwen2.5-Coder-3B-Instruct
test_cases: 133
model: Qwen2.5-Coder-3B-Instruct
edit_format: whole
commit_hash: 0ba3647
pass_rate_1: 33.8
pass_rate_2: 39.1
percent_cases_well_formed: 100.0
error_outputs: 4
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 3
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 4
test_timeouts: 6
command: aider --model openai/Qwen2.5-Coder-3B-Instruct
date: 2024-11-04
versions: 0.59.2.dev
seconds_per_case: 18.7
total_cost: 0.0000
- dirname: 2024-10-16-16-20-59--Qwen2.5-Coder-7B-Instruct
test_cases: 133
model: Qwen2.5-Coder-7B-Instruct
edit_format: whole
commit_hash: 92fe979-dirty
pass_rate_1: 51.9
pass_rate_2: 57.9
percent_cases_well_formed: 100.0
error_outputs: 2
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 2
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 2
test_timeouts: 5
command: aider --model openai/Qwen2.5-Coder-7B-Instruct
date: 2024-10-16
versions: 0.59.2.dev
seconds_per_case: 10.5
total_cost: 0.0000
- dirname: 2024-10-29-11-53-39--Qwen2.5-Coder-14B-Instruct
test_cases: 133
model: Qwen2.5-Coder-14B-Instruct
edit_format: whole
commit_hash: 58bd375
pass_rate_1: 58.6
pass_rate_2: 69.2
percent_cases_well_formed: 100.0
error_outputs: 3
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 2
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 3
test_timeouts: 0
command: aider --model openai/Qwen2.5-Coder-14B-Instruct
date: 2024-10-29
versions: 0.59.2.dev
seconds_per_case: 18.3
total_cost: 0.0000
- dirname: 2024-11-09-11-09-15--Qwen2.5-Coder-32B-Instruct
test_cases: 133
model: Qwen2.5-Coder-32B-Instruct
released: 2024-11-12
edit_format: diff
commit_hash: ec9982a
pass_rate_1: 59.4
pass_rate_2: 71.4
percent_cases_well_formed: 94.7
error_outputs: 17
num_malformed_responses: 17
num_with_malformed_responses: 7
user_asks: 1
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 3
command: aider --model openai/hf:Qwen/Qwen2.5-Coder-32B-Instruct --openai-api-base https://glhf.chat/api/openai/v1
date: 2024-11-09
versions: 0.59.2.dev
seconds_per_case: 22.5
total_cost: 0.0000
- dirname: 2024-11-20-14-57-11--mistral-2411-direct-diff
test_cases: 133
model: Mistral Large (2411)
released: 2024-11-18
edit_format: diff
commit_hash: dba844c
pass_rate_1: 46.6
pass_rate_2: 65.4
percent_cases_well_formed: 96.2
error_outputs: 8
num_malformed_responses: 8
num_with_malformed_responses: 5
user_asks: 5
lazy_comments: 0
syntax_errors: 0
indentation_errors: 1
exhausted_context_windows: 0
test_timeouts: 1
command: aider --model mistral/mistral-large-latest
date: 2024-11-20
versions: 0.63.3.dev
seconds_per_case: 24.9
total_cost: 3.2334
- dirname: 2024-11-20-19-28-30--gpt-4o-2024-11-20
test_cases: 133
model: gpt-4o-2024-11-20
released: 2024-11-20
edit_format: diff
commit_hash: 2ac0776-dirty
pass_rate_1: 58.6
pass_rate_2: 71.4
percent_cases_well_formed: 99.2
error_outputs: 1
num_malformed_responses: 1
num_with_malformed_responses: 1
user_asks: 4
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 5
command: aider --model openai/gpt-4o-2024-11-20
date: 2024-11-20
versions: 0.63.3.dev
seconds_per_case: 6.0
total_cost: 0.0000
- dirname: 2024-09-20-21-47-17--qwen2.5-32b-instruct-q8_0-whole
test_cases: 133
model: ollama/qwen2.5:32b-instruct-q8_0
edit_format: whole
commit_hash: 2753ac6
pass_rate_1: 46.6
pass_rate_2: 58.6
percent_cases_well_formed: 100.0
error_outputs: 0
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 1
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 2
command: aider --model ollama/qwen2.5:32b-instruct-q8_0
date: 2024-09-20
versions: 0.56.1.dev
seconds_per_case: 1763.7
total_cost: 0.0000
- dirname: 2024-11-20-15-17-37--qwen25-32b-or-diff
test_cases: 133
model: openrouter/qwen/qwen-2.5-coder-32b-instruct
edit_format: diff
commit_hash: e917424
pass_rate_1: 49.6
pass_rate_2: 65.4
percent_cases_well_formed: 84.2
error_outputs: 43
num_malformed_responses: 31
num_with_malformed_responses: 21
user_asks: 43
lazy_comments: 0
syntax_errors: 2
indentation_errors: 2
exhausted_context_windows: 12
test_timeouts: 2
command: aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct
date: 2024-11-20
versions: 0.63.3.dev
seconds_per_case: 40.7
total_cost: 0.1497
- dirname: 2024-11-21-17-46-36--gemini-exp-1121-diff
test_cases: 133
model: gemini-exp-1121
released: 2024-11-21
edit_format: diff
commit_hash: e94961a
pass_rate_1: 46.6
pass_rate_2: 57.9
percent_cases_well_formed: 83.5
error_outputs: 101
num_malformed_responses: 101
num_with_malformed_responses: 22
user_asks: 5
lazy_comments: 0
syntax_errors: 0
indentation_errors: 2
exhausted_context_windows: 0
test_timeouts: 3
command: aider --model gemini/gemini-exp-1121
date: 2024-11-21
versions: 0.63.3.dev
seconds_per_case: 60.3
total_cost: 0.0000
- dirname: 2024-11-15-20-33-31--gemini-exp-1114-diff
test_cases: 133
model: gemini-exp-1114
released: 2024-11-14
edit_format: diff
commit_hash: 0bf17a4
pass_rate_1: 50.4
pass_rate_2: 60.9
percent_cases_well_formed: 85.7
error_outputs: 70
num_malformed_responses: 70
num_with_malformed_responses: 19
user_asks: 2
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 4
command: aider --model gemini/gemini-exp-1114
date: 2024-11-15
versions: 0.63.2.dev
seconds_per_case: 38.6
- dirname: 2024-11-27-07-41-51--qwen2.5-coder-14b-whole-1
test_cases: 133
model: ollama/qwen2.5-coder:14b
edit_format: whole
commit_hash: 200295e
pass_rate_1: 53.4
pass_rate_2: 61.7
percent_cases_well_formed: 98.5
error_outputs: 4
num_malformed_responses: 4
num_with_malformed_responses: 2
user_asks: 48
lazy_comments: 0
syntax_errors: 2
indentation_errors: 2
exhausted_context_windows: 0
test_timeouts: 2
command: aider --model ollama/qwen2.5-coder:14b
date: 2024-11-27
versions: 0.65.2.dev
seconds_per_case: 58.0
total_cost: 0.0000
- dirname: 2024-11-28-07-42-56--qwen2.5-coder-32b-whole-4
test_cases: 133
model: ollama/qwen2.5-coder:32b
edit_format: whole
commit_hash: 200295e
pass_rate_1: 58.6
pass_rate_2: 72.9
percent_cases_well_formed: 100.0
num_malformed_responses: 0
num_with_malformed_responses: 0
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
command: aider --model ollama/qwen2.5-coder:32b
date: 2024-11-28
versions: 0.65.2.dev
seconds_per_case: 147.5
total_cost: 0.0000
- dirname: 2024-11-28-13-14-00--tulu3-whole-2
test_cases: 133
model: ollama/tulu3
edit_format: whole
commit_hash: 200295e
pass_rate_1: 21.8
pass_rate_2: 26.3
percent_cases_well_formed: 100.0
error_outputs: 0
num_malformed_responses: 0
num_with_malformed_responses: 0
exhausted_context_windows: 0
command: aider --model ollama/tulu3
date: 2024-11-28
versions: 0.65.2.dev
seconds_per_case: 35.8
total_cost: 0.0000
- dirname: 2024-11-28-14-41-46--granite3-dense-8b-whole-1
test_cases: 133
model: ollama/granite3-dense:8b
edit_format: whole
commit_hash: 200295e
pass_rate_1: 17.3
pass_rate_2: 20.3
percent_cases_well_formed: 78.9
exhausted_context_windows: 0
command: aider --model ollama/granite3-dense:8b
date: 2024-11-28
versions: 0.65.2.dev
seconds_per_case: 38.1
total_cost: 0.0000
- dirname: 2024-12-04-13-53-03--nova-whole
test_cases: 133
model: Nova Pro
edit_format: whole
commit_hash: 699e283
pass_rate_1: 44.4
pass_rate_2: 54.1
percent_cases_well_formed: 100.0
error_outputs: 0
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 7
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 4
command: aider --model bedrock/us.amazon.nova-pro-v1:0
date: 2024-12-04
versions: 0.66.1.dev
seconds_per_case: 8.7
total_cost: 0.0000
- dirname: 2024-12-06-18-27-47--llama33-diff
test_cases: 133
model: llama-3.3-70b-instruct
edit_format: diff
commit_hash: 53e0d67
pass_rate_1: 42.1
pass_rate_2: 59.4
percent_cases_well_formed: 88.7
error_outputs: 33
num_malformed_responses: 33
num_with_malformed_responses: 15
user_asks: 3
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 3
command: aider --model openrouter/meta-llama/llama-3.3-70b-instruct
date: 2024-12-06
versions: 0.67.1.dev
seconds_per_case: 20.2
total_cost: 0.0000
- dirname: 2024-12-06-21-35-50--gemini-exp-1206-diff
test_cases: 133
model: gemini-exp-1206 (diff)
edit_format: diff
commit_hash: f2d2ab5
pass_rate_1: 55.6
pass_rate_2: 69.2
percent_cases_well_formed: 84.2
error_outputs: 68
num_malformed_responses: 68
num_with_malformed_responses: 21
user_asks: 5
lazy_comments: 0
syntax_errors: 2
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 0
command: aider --model gemini/gemini-exp-1206
date: 2024-12-06
versions: 0.67.1.dev
seconds_per_case: 32.1
total_cost: 0.0000
- dirname: 2024-12-08-21-39-06--gemini-exp-1206-whole
test_cases: 133
model: gemini-exp-1206 (whole)
edit_format: whole
commit_hash: f2d2ab5
pass_rate_1: 60.9
pass_rate_2: 80.5
percent_cases_well_formed: 100.0
error_outputs: 0
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 1
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 3
command: aider --model gemini/gemini-exp-1206
date: 2024-12-08
versions: 0.67.1.dev
seconds_per_case: 64.2
total_cost: 0.0000
- dirname: 2024-12-10-14-45-21--deepseek-1210-diff
test_cases: 133
model: DeepSeek-V2.5-1210
edit_format: diff
commit_hash: 16332b2
pass_rate_1: 58.6
pass_rate_2: 72.2
percent_cases_well_formed: 99.2
error_outputs: 1
num_malformed_responses: 1
num_with_malformed_responses: 1
user_asks: 2
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 2
command: aider --model deepseek/deepseek-chat
date: 2024-12-10
versions: 0.67.1.dev
seconds_per_case: 32.7
total_cost: 0.1106
- dirname: 2024-12-11-00-37-08--yi-test
test_cases: 133
model: yi-lightning
edit_format: whole
commit_hash: e909a3d-dirty
pass_rate_1: 49.6
pass_rate_2: 65.4
percent_cases_well_formed: 97.0
error_outputs: 304
num_malformed_responses: 5
num_with_malformed_responses: 4
user_asks: 34
lazy_comments: 2
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 2
command: aider --model openai/yi-lightning
date: 2024-12-11
versions: 0.67.1.dev
seconds_per_case: 57.8
total_cost: 0.0000
- dirname: 2024-12-11-21-07-00--gemini-2-flash-diff
test_cases: 133
model: gemini-2.0-flash-exp
edit_format: diff
commit_hash: fcb2bac-dirty, 02e7e31-dirty
pass_rate_1: 56.4
pass_rate_2: 69.9
percent_cases_well_formed: 97.0
error_outputs: 10
num_malformed_responses: 6
num_with_malformed_responses: 4
user_asks: 8
lazy_comments: 0
syntax_errors: 1
indentation_errors: 0
exhausted_context_windows: 2
test_timeouts: 1
command: aider --model gemini/gemini-2.0-flash-exp
date: 2024-12-11
versions: 0.68.1.dev
seconds_per_case: 7.3
total_cost: 0.0000

View File

@@ -0,0 +1,322 @@
- dirname: 2024-11-09-11-09-15--Qwen2.5-Coder-32B-Instruct
test_cases: 133
model: "HuggingFace via GLHF: BF16"
released: 2024-11-12
edit_format: diff
commit_hash: ec9982a
pass_rate_1: 59.4
pass_rate_2: 71.4
percent_cases_well_formed: 94.7
error_outputs: 17
num_malformed_responses: 17
num_with_malformed_responses: 7
user_asks: 1
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 3
command: aider --model openai/hf:Qwen/Qwen2.5-Coder-32B-Instruct --openai-api-base https://glhf.chat/api/openai/v1
date: 2024-11-09
versions: 0.59.2.dev
seconds_per_case: 22.5
total_cost: 0.0000
- dirname: 2024-11-22-18-56-13--ollama-qwen2.5-coder:32b-instruct-fp16
test_cases: 132
model: "Ollama: fp16"
edit_format: diff
commit_hash: f06452c-dirty, 6a0a97c-dirty, 4e9ae16-dirty, 5506d0f-dirty
pass_rate_1: 58.3
pass_rate_2: 71.4
percent_cases_well_formed: 90.2
error_outputs: 27
num_malformed_responses: 26
num_with_malformed_responses: 13
user_asks: 2
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 0
command: aider --model ollama/qwen2.5-coder:32b-instruct-fp16
date: 2024-11-22
versions: 0.64.2.dev
seconds_per_case: 119.6
total_cost: 0.0000
- dirname: 2024-11-22-14-53-26--hyperbolic-qwen25coder32binstruct
test_cases: 133
model: "Hyperbolic: BF16"
edit_format: diff
commit_hash: f9ef161, 17aef7b-dirty
pass_rate_1: 57.9
pass_rate_2: 69.2
percent_cases_well_formed: 91.7
error_outputs: 30
num_malformed_responses: 29
num_with_malformed_responses: 11
user_asks: 9
lazy_comments: 0
syntax_errors: 4
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 2
command: aider --model openai/Qwen/Qwen2.5-Coder-32B-Instruct --openai-api-base https://api.hyperbolic.xyz/v1/
date: 2024-11-22
versions: 0.64.2.dev
seconds_per_case: 33.2
total_cost: 0.0000
- dirname: 2024-11-22-17-53-35--qwen25-coder-32b-Instruct-4bit
test_cases: 133
model: "mlx-community: 4bit"
edit_format: diff
commit_hash: a16dcab-dirty
pass_rate_1: 60.2
pass_rate_2: 72.2
percent_cases_well_formed: 88.7
error_outputs: 31
num_malformed_responses: 30
num_with_malformed_responses: 15
user_asks: 6
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 1
test_timeouts: 0
command: aider --model openai/mlx-community/Qwen2.5-Coder-32B-Instruct-4bit
date: 2024-11-23
versions: 0.64.2.dev
seconds_per_case: 53.4
total_cost: 0.0000
- dirname: 2024-11-23-15-07-20--qwen25-coder-32b-Instruct-8bit
test_cases: 133
model: "mlx-community: 8bit"
edit_format: diff
commit_hash: a16dcab-dirty
pass_rate_1: 59.4
pass_rate_2: 72.2
percent_cases_well_formed: 92.5
error_outputs: 20
num_malformed_responses: 15
num_with_malformed_responses: 10
user_asks: 7
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 5
test_timeouts: 2
command: aider --model openai/mlx-community/Qwen2.5-Coder-32B-Instruct-8bit
date: 2024-11-23
versions: 0.64.2.dev
seconds_per_case: 98.4
total_cost: 0.0000
- dirname: 2024-11-24-22-18-18--or-all-or-fixed-blank-messages2
test_cases: 133
model: "OpenRouter: multiple"
edit_format: diff
commit_hash: 0c59d32
pass_rate_1: 57.1
pass_rate_2: 67.7
percent_cases_well_formed: 95.5
error_outputs: 56
num_malformed_responses: 10
num_with_malformed_responses: 6
user_asks: 14
lazy_comments: 0
syntax_errors: 6
indentation_errors: 0
exhausted_context_windows: 3
test_timeouts: 1
command: aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct
date: 2024-11-24
versions: 0.64.2.dev
seconds_per_case: 21.2
total_cost: 0.1420
- dirname: 2024-11-23-21-08-53--ollama-qwen2.5-coder:32b-instruct-q4_K_M-8kctx
test_cases: 133
model: "Ollama: q4_K_M"
edit_format: diff
commit_hash: baa1335-dirty, e63df83-dirty, ff8c1aa-dirty
pass_rate_1: 54.9
pass_rate_2: 66.9
percent_cases_well_formed: 94.0
error_outputs: 21
num_malformed_responses: 21
num_with_malformed_responses: 8
user_asks: 5
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 3
command: aider --model ollama/qwen2.5-coder:32b-instruct-q4_K_M
date: 2024-11-23
versions: 0.64.2.dev
seconds_per_case: 35.7
total_cost: 0.0000
- dirname: 2024-11-24-02-23-32--deepinfra-qwen-diff
test_cases: 133
model: "Deepinfra: BF16"
edit_format: diff
commit_hash: bb78e2f
pass_rate_1: 58.6
pass_rate_2: 72.2
percent_cases_well_formed: 94.7
error_outputs: 15
num_malformed_responses: 13
num_with_malformed_responses: 7
user_asks: 3
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 2
test_timeouts: 3
command: aider --model deepinfra/Qwen/Qwen2.5-Coder-32B-Instruct
date: 2024-11-24
versions: 0.64.2.dev
seconds_per_case: 17.5
total_cost: 0.0000
- dirname: 2024-11-24-04-12-58--fireworks-qwen-diff
test_cases: 133
model: "Fireworks: unknown"
edit_format: diff
commit_hash: 757eac0
pass_rate_1: 57.9
pass_rate_2: 72.2
percent_cases_well_formed: 94.0
error_outputs: 23
num_malformed_responses: 19
num_with_malformed_responses: 8
user_asks: 8
lazy_comments: 0
syntax_errors: 6
indentation_errors: 0
exhausted_context_windows: 4
test_timeouts: 1
command: aider --model fireworks_ai/accounts/fireworks/models/qwen2p5-coder-32b-instruct
date: 2024-11-24
versions: 0.64.2.dev
seconds_per_case: 10.4
total_cost: 0.5759
- dirname: 2024-11-24-02-04-59--ollama-qwen2.5-coder:32b-instruct-q2_K-8kctx
test_cases: 133
model: "Ollama: q2_K"
edit_format: diff
commit_hash: 757eac0, bb78e2f, 8d0ba40-dirty, 1d09e96
pass_rate_1: 48.9
pass_rate_2: 61.7
percent_cases_well_formed: 91.7
error_outputs: 32
num_malformed_responses: 32
num_with_malformed_responses: 11
user_asks: 8
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 1
command: aider --model ollama/qwen2.5-coder:32b-instruct-q2_K
date: 2024-11-24
versions: 0.64.2.dev
seconds_per_case: 97.8
total_cost: 0.0000
- dirname: 2024-11-24-14-56-49--qwen25-32b-or-fireworks
test_cases: 133
model: "Fireworks via OpenRouter: unknown"
edit_format: diff
commit_hash: c2f184f
pass_rate_1: 55.6
pass_rate_2: 67.7
percent_cases_well_formed: 94.0
error_outputs: 39
num_malformed_responses: 24
num_with_malformed_responses: 8
user_asks: 13
lazy_comments: 0
syntax_errors: 1
indentation_errors: 1
exhausted_context_windows: 7
test_timeouts: 4
command: aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct
date: 2024-11-24
versions: 0.64.2.dev
seconds_per_case: 16.1
total_cost: 0.1391
- dirname: 2024-11-24-22-03-19--or-hyperbolic-or-fixed-blank-messages2
test_cases: 133
model: "Hyperbolic via OpenRouter: BF16"
edit_format: diff
commit_hash: 0c59d32
pass_rate_1: 55.6
pass_rate_2: 68.4
percent_cases_well_formed: 89.5
error_outputs: 28
num_malformed_responses: 24
num_with_malformed_responses: 14
user_asks: 29
lazy_comments: 0
syntax_errors: 1
indentation_errors: 0
exhausted_context_windows: 4
test_timeouts: 1
command: aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct
date: 2024-11-24
versions: 0.64.2.dev
seconds_per_case: 41.5
total_cost: 0.1402
- dirname: 2024-11-24-15-00-50--qwen25-32b-or-deepinfra
test_cases: 133
model: "Deepinfra via OpenRouter: BF16"
edit_format: diff
commit_hash: c2f184f
pass_rate_1: 57.1
pass_rate_2: 69.9
percent_cases_well_formed: 89.5
error_outputs: 35
num_malformed_responses: 31
num_with_malformed_responses: 14
user_asks: 11
lazy_comments: 0
syntax_errors: 1
indentation_errors: 1
exhausted_context_windows: 4
test_timeouts: 1
command: aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct
date: 2024-11-24
versions: 0.64.2.dev
seconds_per_case: 28.5
total_cost: 0.1390
- dirname: 2024-11-26-03-15-06--ollama-qwen2.5-coder:32b-instruct-fp16-2kctx
test_cases: 132
model: "Ollama: fp16, 2k ctx"
edit_format: diff
commit_hash: 68be6c5-dirty, 554d274, 2ff3a23, 2ff3a23-dirty, 61759f9, dd48b74, 3ebd47d-dirty
pass_rate_1: 43.2
pass_rate_2: 51.9
percent_cases_well_formed: 46.2
error_outputs: 171
num_malformed_responses: 165
num_with_malformed_responses: 71
user_asks: 97
lazy_comments: 2
syntax_errors: 4
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 0
command: "aider --model ollama/qwen2.5-coder:32b-instruct-fp16 # num_ctx: 2048"
date: 2024-11-26
versions: 0.64.2.dev,0.65.1.dev
seconds_per_case: 188.6
total_cost: 0.0000

170
aider/website/_data/qwq.yml Normal file
View File

@@ -0,0 +1,170 @@
- dirname: 2024-11-28-21-38-50--architect-qwq-haiku-whole
test_cases: 133
model: QwQ + Haiku
edit_format: architect
commit_hash: e4a1d6f
editor_model: claude-3-5-haiku-20241022
editor_edit_format: editor-whole
pass_rate_1: 54.1
pass_rate_2: 71.4
percent_cases_well_formed: 100.0
error_outputs: 4
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 196
lazy_comments: 4
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 0
command: aider --model openrouter/qwen/qwq-32b-preview --editor-model claude-3-5-haiku-20241022 --edit-format editor-whole
date: 2024-11-28
versions: 0.65.2.dev
seconds_per_case: 154.7
total_cost: 1.4196
- dirname: 2024-11-28-19-24-35--architect-qwq-deepseek-whole
test_cases: 133
model: QwQ + DeepSeek V2.5
edit_format: architect
commit_hash: e4a1d6f
editor_model: deepseek/deepseek-chat
editor_edit_format: editor-whole
pass_rate_1: 55.6
pass_rate_2: 67.7
percent_cases_well_formed: 100.0
error_outputs: 3
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 193
lazy_comments: 2
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 0
command: aider --model openrouter/qwen/qwq-32b-preview --editor-model deepseek/deepseek-chat --edit-format editor-whole
date: 2024-11-28
versions: 0.65.2.dev
seconds_per_case: 170.3
total_cost: 0.1558
- dirname: 2024-11-09-11-09-15--Qwen2.5-Coder-32B-Instruct
test_cases: 133
model: Qwen2.5 Coder 32B-I
released: 2024-11-12
edit_format: diff
commit_hash: ec9982a
pass_rate_1: 59.4
pass_rate_2: 71.4
percent_cases_well_formed: 94.7
error_outputs: 17
num_malformed_responses: 17
num_with_malformed_responses: 7
user_asks: 1
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 3
command: aider --model openai/hf:Qwen/Qwen2.5-Coder-32B-Instruct --openai-api-base https://glhf.chat/api/openai/v1 (via GLHF)
date: 2024-11-09
versions: 0.59.2.dev
seconds_per_case: 22.5
total_cost: 0.0000
- dirname: 2024-12-04-00-10-39--architect-qwq-qwen
test_cases: 132
model: QwQ + Qwen2.5 Coder 32B-I
edit_format: architect
commit_hash: 51c02da
editor_model: openrouter/qwen/qwen-2.5-coder-32b-instruct
editor_edit_format: editor-whole
pass_rate_1: 58.3
pass_rate_2: 73.6
percent_cases_well_formed: 100.0
error_outputs: 3
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 186
lazy_comments: 5
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 0
command: aider --model openrouter/qwen/qwq-32b-preview --editor-model openrouter/qwen/qwen-2.5-coder-32b-instruct --editor-edit-format editor-whole
date: 2024-12-04
versions: 0.66.1.dev
seconds_per_case: 144.1
total_cost: 0.1444
- dirname: 2024-12-04-00-42-05--qwq-alone-whole
test_cases: 133
model: QwQ
edit_format: whole
commit_hash: 19004c0
pass_rate_1: 33.1
pass_rate_2: 42.1
percent_cases_well_formed: 91.0
error_outputs: 28
num_malformed_responses: 12
num_with_malformed_responses: 12
user_asks: 119
lazy_comments: 2
syntax_errors: 22
indentation_errors: 9
exhausted_context_windows: 2
test_timeouts: 1
command: aider --model openrouter/qwen/qwq-32b-preview
date: 2024-12-04
versions: 0.66.1.dev
seconds_per_case: 414.3
total_cost: 0.0000
- dirname: 2024-09-12-19-57-35--o1-mini-whole
test_cases: 133
model: o1-mini
edit_format: whole
commit_hash: 36fa773-dirty, 291b456
pass_rate_1: 49.6
pass_rate_2: 70.7
percent_cases_well_formed: 90.0
error_outputs: 0
num_malformed_responses: 0
num_with_malformed_responses: 0
user_asks: 17
lazy_comments: 0
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 1
command: aider --model o1-mini
date: 2024-09-12
versions: 0.56.1.dev
seconds_per_case: 103.0
total_cost: 5.3725
- dirname: 2024-09-21-16-45-11--o1-preview-flex-sr-markers
test_cases: 133
model: o1-preview
_released: 2024-09-12
edit_format: diff
commit_hash: 5493654-dirty
pass_rate_1: 57.9
pass_rate_2: 79.7
percent_cases_well_formed: 93.2
error_outputs: 11
num_malformed_responses: 11
num_with_malformed_responses: 9
user_asks: 3
lazy_comments: 0
syntax_errors: 10
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 1
command: aider --model o1-preview
date: 2024-09-21
versions: 0.56.1.dev
seconds_per_case: 80.9
total_cost: 63.9190

View File

@@ -145,7 +145,7 @@
- dirname: 2024-07-01-18-30-33--refac-claude-3.5-sonnet-diff-not-lazy
test_cases: 89
model: claude-3.5-sonnet (diff)
model: claude-3.5-sonnet-20240620
edit_format: diff
commit_hash: 7396e38-dirty
pass_rate_1: 64.0
@@ -229,4 +229,70 @@
date: 2024-09-05
versions: 0.55.1.dev
seconds_per_case: 225.4
total_cost: 1.0338
total_cost: 1.0338
- dirname: 2024-10-22-19-57-27--refac-openrouter-sonnet-1022
test_cases: 89
model: claude-3-5-sonnet-20241022
edit_format: diff
commit_hash: 4a3e6ef
pass_rate_1: 92.1
percent_cases_well_formed: 91.0
error_outputs: 13
num_malformed_responses: 12
num_with_malformed_responses: 8
user_asks: 14
lazy_comments: 2
syntax_errors: 0
indentation_errors: 0
exhausted_context_windows: 0
test_timeouts: 0
command: aider --sonnet
date: 2024-10-22
versions: 0.60.1.dev
seconds_per_case: 32.5
total_cost: 8.4644
- dirname: 2024-10-22-20-03-10--refac-o1mini
test_cases: 89
model: o1-mini
edit_format: diff
commit_hash: 4a3e6ef-dirty
pass_rate_1: 44.9
percent_cases_well_formed: 29.2
error_outputs: 151
num_malformed_responses: 150
num_with_malformed_responses: 63
user_asks: 28
lazy_comments: 2
syntax_errors: 5
indentation_errors: 4
exhausted_context_windows: 1
test_timeouts: 0
command: aider --model o1-mini
date: 2024-10-22
versions: 0.60.1.dev
seconds_per_case: 115.3
total_cost: 29.0492
- dirname: 2024-10-22-20-26-36--refac-o1preview
test_cases: 89
model: o1-preview
edit_format: diff
commit_hash: 4a3e6ef-dirty
pass_rate_1: 75.3
percent_cases_well_formed: 57.3
error_outputs: 75
num_malformed_responses: 74
num_with_malformed_responses: 38
user_asks: 19
lazy_comments: 2
syntax_errors: 2
indentation_errors: 3
exhausted_context_windows: 1
test_timeouts: 0
command: aider --model o1-preview
date: 2024-10-22
versions: 0.60.1.dev
seconds_per_case: 231.7
total_cost: 120.9850

View File

@@ -1,5 +1,5 @@
<canvas id="linesChart" width="800" height="360" style="margin-top: 20px"></canvas>
<canvas id="blameChart" width="800" height="360" style="margin-top: 20px"></canvas>
<canvas id="linesChart" width="800" height="360" style="margin-top: 20px"></canvas>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/moment"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-moment"></script>

View File

@@ -0,0 +1,185 @@
document.addEventListener('DOMContentLoaded', function () {
var ctx = document.getElementById('editChart').getContext('2d');
const blueDiagonalPattern = pattern.draw('diagonal', 'rgba(54, 162, 235, 0.2)');
const redDiagonalPattern = pattern.draw('diagonal', 'rgba(255, 99, 132, 0.2)');
let displayedData = [];
const HIGHTLIGHT_MODEL = 'no no no';
var leaderboardData = {
labels: [],
datasets: [{
label: 'Percent completed correctly',
data: [],
backgroundColor: function(context) {
const row = allData[context.dataIndex];
if (row && row.edit_format === 'whole') {
return diagonalPattern;
}
const label = leaderboardData.labels[context.dataIndex] || '';
return (label && label.includes(HIGHTLIGHT_MODEL)) ? 'rgba(255, 99, 132, 0.2)' : 'rgba(54, 162, 235, 0.2)';
},
borderColor: function(context) {
const label = context.chart.data.labels[context.dataIndex] || '';
return (label && label.includes(HIGHTLIGHT_MODEL)) ? 'rgba(255, 99, 132, 1)' : 'rgba(54, 162, 235, 1)';
},
borderWidth: 1
}]
};
var allData = [];
{% for row in edit_sorted %}
allData.push({
model: '{{ row.model }}',
pass_rate_2: {{ row.pass_rate_2 }},
percent_cases_well_formed: {{ row.percent_cases_well_formed }},
edit_format: '{{ row.edit_format }}'
});
{% endfor %}
function updateChart() {
var selectedRows = document.querySelectorAll('tr.selected');
var showAll = selectedRows.length === 0;
displayedData = [];
leaderboardData.labels = [];
leaderboardData.datasets[0].data = [];
allData.forEach(function(row, index) {
var rowElement = document.getElementById('edit-row-' + index);
if (showAll) {
rowElement.classList.remove('selected');
}
if (showAll || rowElement.classList.contains('selected')) {
displayedData.push(row);
leaderboardData.labels.push(row.model);
leaderboardData.datasets[0].data.push(row.pass_rate_2);
}
});
leaderboardChart.update();
leaderboardChart.render();
}
// Use displayedData in the backgroundColor callback instead of allData
leaderboardData.datasets[0].backgroundColor = function(context) {
const row = displayedData[context.dataIndex];
const label = leaderboardData.labels[context.dataIndex] || '';
if (label && label.includes(HIGHTLIGHT_MODEL)) {
if (row && row.edit_format === 'whole') return redDiagonalPattern;
else return 'rgba(255, 99, 132, 0.2)';
} else if (row && row.edit_format === 'whole') {
return blueDiagonalPattern;
} else {
return 'rgba(54, 162, 235, 0.2)';
}
};
var tableBody = document.querySelector('table tbody');
allData.forEach(function(row, index) {
var tr = tableBody.children[index];
tr.id = 'edit-row-' + index;
tr.style.cursor = 'pointer';
tr.onclick = function() {
this.classList.toggle('selected');
updateChart();
};
});
var leaderboardChart = new Chart(ctx, {
type: 'bar',
data: leaderboardData,
options: {
plugins: {
legend: {
display: true,
labels: {
generateLabels: function(chart) {
return [
{
text: 'Diff-like format',
fillStyle: 'rgba(54, 162, 235, 0.2)',
strokeStyle: 'rgba(54, 162, 235, 1)',
lineWidth: 1
},
{
text: 'Whole format',
fillStyle: blueDiagonalPattern,
strokeStyle: 'rgba(54, 162, 235, 1)',
lineWidth: 1
}
];
}
}
}
},
scales: {
y: {
beginAtZero: true,
title: {
display: true,
text: 'Percent completed correctly'
}
},
x: {
ticks: {
callback: function(value, index) {
const label = this.getLabelForValue(value);
if (label.length <= "claude-3-5-sonnet".length) {
return label;
}
// Find all possible split positions
const splitPositions = [];
for (let i = 0; i < label.length; i++) {
if (label[i] === '-' || label[i] === ' ') {
splitPositions.push(i);
}
}
if (splitPositions.length === 0) {
return label;
}
// Find split position closest to middle
const middle = label.length / 2;
const splitIndex = splitPositions.reduce((closest, current) => {
return Math.abs(current - middle) < Math.abs(closest - middle) ? current : closest;
});
return [
label.slice(0, splitIndex),
label.slice(splitIndex + 1)
];
}
}
}
}
}
});
updateChart();
// Add search functionality for edit table
document.getElementById('editSearchInput').addEventListener('keyup', function() {
var searchWords = this.value.toLowerCase().split(' ').filter(word => word.length > 0);
var tableBody = document.querySelector('table:first-of-type tbody');
var rows = tableBody.getElementsByTagName('tr');
displayedData = [];
leaderboardData.labels = [];
leaderboardData.datasets[0].data = [];
for (var i = 0; i < rows.length; i++) {
var rowText = rows[i].textContent;
if (searchWords.every(word => rowText.toLowerCase().includes(word))) {
rows[i].style.display = '';
displayedData.push(allData[i]);
leaderboardData.labels.push(allData[i].model);
leaderboardData.datasets[0].data.push(allData[i].pass_rate_2);
} else {
rows[i].style.display = 'none';
}
}
leaderboardChart.update();
});
});

View File

@@ -1,6 +0,0 @@
{: .tip }
All API keys can be stored in a
[.env file](/docs/config/dotenv.html).
Only OpenAI and Anthropic keys can be stored in the
[YAML config file](/docs/config/aider_conf.html).

View File

@@ -1,17 +1,16 @@
You can get started quickly like this:
You can get started quickly like this, with python 3.8-3.13:
```
python -m pip install -U aider-chat
```bash
python -m pip install aider-install
aider-install
# Change directory into a git repo
# Change directory into your code base
cd /to/your/git/repo
# Work with Claude 3.5 Sonnet on your repo
export ANTHROPIC_API_KEY=your-key-goes-here
aider
aider --model sonnet --anthropic-api-key your-key-goes-here
# Work with GPT-4o on your repo
export OPENAI_API_KEY=your-key-goes-here
aider
aider --model gpt-4o --openai-api-key your-key-goes-here
```

View File

@@ -18,3 +18,63 @@
<link rel="mask-icon" href="{{ '/assets/icons/safari-pinned-tab.svg' | relative_url }}" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<!-- Cookie Consent -->
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
<script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script>
<script>
window.addEventListener('load', function(){
window.cookieconsent.initialise({
palette: {
popup: {
background: "#333333",
text: "#ffffff"
},
button: {
background: "#ffffff",
text: "#333333"
}
},
type: "opt-in",
position: "bottom-left",
showLink: false,
dismissOnScroll: true,
cookie: {
name: 'cookieconsent_status',
path: '/',
domain: 'aider.chat',
expiryDays: 365
},
content: {
message: "This website uses analytics cookies to help us understand how you use the site.",
dismiss: "Decline",
allow: "Accept",
link: "Learn more",
href: "https://aider.chat/docs/legal/privacy.html"
},
onInitialise: function(status) {
var type = this.options.type;
var didConsent = this.hasConsented();
if (didConsent) {
initPostHog();
}
},
onStatusChange: function(status, chosenBefore) {
var type = this.options.type;
var didConsent = this.hasConsented();
if (didConsent) {
initPostHog();
}
}
})
});
// PostHog initialization function
function initPostHog() {
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init capture register register_once register_for_session unregister unregister_for_session getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey getNextSurveyStep identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty createPersonProfile opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing clear_opt_in_out_capturing debug".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
posthog.init('phc_99T7muzafUMMZX15H8XePbMSreEUzahHbtWjy3l5Qbv', {
api_host:'https://us.i.posthog.com',
person_profiles: 'identified_only'
})
}
</script>

View File

@@ -0,0 +1,4 @@
{: .tip :}
See the
[API key configuration docs](/docs/config/api-keys.html)
for information on how to configure and store your API keys.

View File

View File

@@ -1,5 +1,22 @@
You can send long, multi-line messages in the chat in a few ways:
- Paste a multi-line message directly into the chat.
- Enter `{` alone on the first line to start a multiline message and `}` alone on the last line to end it.
- Or, start with `{tag` (where "tag" is any sequence of letters/numbers) and end with `tag}`. This is useful when you need to include closing braces `}` in your message.
- Use Meta-ENTER to start a new line without sending the message (Esc+ENTER in some environments).
- Use `/paste` to paste text from the clipboard into the chat.
- Use the `/editor` command to open your editor to create the next chat message. See [editor configuration docs](/docs/config/editor.html) for more info.
- Use multiline-mode, which swaps the function of Meta-Enter and Enter, so that Enter inserts a newline, and Meta-Enter submits your command. To enable multiline mode:
- Use the `/multiline-mode` command to toggle it during a session.
- Use the `--multiline` switch.
Example with a tag:
```
{python
def hello():
print("Hello}") # Note: contains a brace
python}
```
{: .note }
People often ask for SHIFT-ENTER to be a soft-newline.
Unfortunately there is no portable way to detect that keystroke in terminals.

View File

@@ -0,0 +1,95 @@
document.addEventListener('DOMContentLoaded', function () {
var ctx = document.getElementById('quantChart').getContext('2d');
var allData = [];
{% for row in site.data.quant %}
allData.push({
model: '{{ row.model }}',
pass_rate_2: {{ row.pass_rate_2 }}
});
{% endfor %}
// Sort data by pass_rate_2 in descending order
allData.sort((a, b) => b.pass_rate_2 - a.pass_rate_2);
var chart;
function updateChart(filterText) {
var filteredData = allData.filter(row =>
row.model.toLowerCase().includes(filterText.toLowerCase())
);
var chartData = {
labels: filteredData.map(row => row.model),
datasets: [{
label: 'Percent completed correctly',
data: filteredData.map(row => row.pass_rate_2),
backgroundColor: 'rgba(54, 162, 235, 0.2)',
borderColor: 'rgba(54, 162, 235, 1)',
borderWidth: 1
}]
};
if (chart) {
chart.data = chartData;
chart.update();
} else {
chart = new Chart(ctx, {
type: 'bar',
data: chartData,
options: {
plugins: {
legend: {
display: false
},
title: {
display: true,
text: 'Aider code editing benchmark',
font: {
size: 16
}
}
},
scales: {
y: {
beginAtZero: true,
title: {
display: true,
text: 'Percent completed correctly',
font: {
size: 14
}
},
ticks: {
font: {
size: 16
}
}
},
x: {
ticks: {
font: {
size: 16
}
},
title: {
display: true,
text: 'Provider: quantization',
font: {
size: 14
}
}
}
}
}
});
}
}
// Initial chart render
updateChart('');
// Connect search input to chart filtering
document.getElementById('quantSearchInput').addEventListener('keyup', function() {
updateChart(this.value);
});
});

View File

@@ -0,0 +1,120 @@
document.addEventListener('DOMContentLoaded', function () {
var ctx = document.getElementById('qwqChart').getContext('2d');
var allData = [];
{% for row in site.data.qwq %}
allData.push({
model: '{{ row.model }}',
pass_rate_2: {{ row.pass_rate_2 }}
});
{% endfor %}
// Sort data by pass_rate_2 in descending order
allData.sort((a, b) => b.pass_rate_2 - a.pass_rate_2);
var chart;
function updateChart(filterText) {
var filteredData = allData.filter(row =>
row.model.toLowerCase().includes(filterText.toLowerCase())
);
var chartData = {
labels: filteredData.map(row => row.model),
datasets: [{
data: filteredData.map(row => row.pass_rate_2),
backgroundColor: filteredData.map(row =>
(row.model === 'Qwen2.5 Coder 32B-I' || row.model === 'Sonnet (SOTA)' || row.model === 'o1-mini' || row.model === 'o1-preview' || row.model === 'QwQ')
? 'rgba(75, 192, 192, 0.2)' // Green for solo models
: 'rgba(54, 162, 235, 0.2)' // Blue for architect+editor
),
borderColor: filteredData.map(row =>
(row.model === 'Qwen2.5 Coder 32B-I' || row.model === 'Sonnet (SOTA)' || row.model === 'o1-mini' || row.model === 'o1-preview' || row.model === 'QwQ')
? 'rgba(75, 192, 192, 1)' // Green border for solo models
: 'rgba(54, 162, 235, 1)' // Blue border for architect+editor
),
borderWidth: 1
}]
};
if (chart) {
chart.data = chartData;
chart.update();
} else {
chart = new Chart(ctx, {
type: 'bar',
data: chartData,
options: {
plugins: {
legend: {
display: true,
position: 'top',
labels: {
font: {
size: 14
},
generateLabels: function(chart) {
return [
{
text: 'Solo model',
fillStyle: 'rgba(75, 192, 192, 0.2)',
strokeStyle: 'rgba(75, 192, 192, 1)',
lineWidth: 1,
fontColor: '#666'
},
{
text: 'Architect + Editor',
fillStyle: 'rgba(54, 162, 235, 0.2)',
strokeStyle: 'rgba(54, 162, 235, 1)',
lineWidth: 1,
fontColor: '#666'
}
];
}
}
}
},
scales: {
y: {
beginAtZero: true,
title: {
display: true,
text: 'Aider code editing benchmark (%)',
font: {
size: 18
}
},
ticks: {
font: {
size: 16
}
}
},
x: {
ticks: {
font: {
size: 16
},
callback: function(value, index) {
const label = this.getLabelForValue(value);
if (label.includes(" + ")) {
const parts = label.split(" + ");
return [parts[0] + " +", parts[1]];
}
return label;
}
}
}
}
}
});
}
}
// Initial chart render
updateChart('');
// Connect search input to chart filtering
document.getElementById('qwqSearchInput').addEventListener('keyup', function() {
updateChart(this.value);
});
});

View File

@@ -0,0 +1,90 @@
document.addEventListener('DOMContentLoaded', function () {
var ctx = document.getElementById('refacChart').getContext('2d');
var leaderboardData = {
labels: [],
datasets: [{
label: 'Percent completed correctly',
data: [],
backgroundColor: 'rgba(54, 162, 235, 0.2)',
borderColor: 'rgba(54, 162, 235, 1)',
borderWidth: 1
}]
};
var allData = [];
{% for row in refac_sorted %}
allData.push({
model: '{{ row.model }}',
pass_rate_1: {{ row.pass_rate_1 }},
percent_cases_well_formed: {{ row.percent_cases_well_formed }}
});
{% endfor %}
function updateChart() {
var selectedRows = document.querySelectorAll('tr.selected');
var showAll = selectedRows.length === 0;
leaderboardData.labels = [];
leaderboardData.datasets[0].data = [];
allData.forEach(function(row, index) {
var rowElement = document.getElementById('refac-row-' + index);
if (showAll) {
rowElement.classList.remove('selected');
}
if (showAll || rowElement.classList.contains('selected')) {
leaderboardData.labels.push(row.model);
leaderboardData.datasets[0].data.push(row.pass_rate_1);
}
});
leaderboardChart.update();
}
var tableBody = document.querySelectorAll('table tbody')[1];
allData.forEach(function(row, index) {
var tr = tableBody.children[index];
tr.id = 'refac-row-' + index;
tr.style.cursor = 'pointer';
tr.onclick = function() {
this.classList.toggle('selected');
updateChart();
};
});
var leaderboardChart = new Chart(ctx, {
type: 'bar',
data: leaderboardData,
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
updateChart();
// Add search functionality for refactoring table
document.getElementById('refacSearchInput').addEventListener('keyup', function() {
var searchWords = this.value.toLowerCase().split(' ').filter(word => word.length > 0);
var tableBody = document.querySelectorAll('table tbody')[1];
var rows = tableBody.getElementsByTagName('tr');
leaderboardData.labels = [];
leaderboardData.datasets[0].data = [];
for (var i = 0; i < rows.length; i++) {
var rowText = rows[i].textContent;
if (searchWords.every(word => rowText.toLowerCase().includes(word))) {
rows[i].style.display = '';
leaderboardData.labels.push(allData[i].model);
leaderboardData.datasets[0].data.push(allData[i].pass_rate_1);
} else {
rows[i].style.display = 'none';
}
}
leaderboardChart.update();
});
});

View File

@@ -1,6 +1,6 @@
To use aider with pipx on replit, you can run these commands in the replit shell:
```
```bash
pip install pipx
pipx run aider-chat ...normal aider args...
```

View File

@@ -1,12 +0,0 @@
Aider has special support for providing
OpenAI and Anthropic API keys
via
[command line switches](/docs/config/options.html)
and
[yaml config file](/docs/config/aider_conf.html).
*All other LLM providers* must
have their keys and settings
specified in environment variables.
This can be done in your shell,
or by using a
[.env file](/docs/config/dotenv.html).

View File

@@ -1,7 +0,0 @@
{: .tip }
Using a Python
[virtual environment](https://docs.python.org/3/library/venv.html){:target="_blank"}
is recommended.
Or, you could
[use pipx to install aider](/docs/install/pipx.html)
once for your whole system.

View File

@@ -1,6 +1,6 @@
---
title: Aider has written 7% of its own code
excerpt: Aider has written 7% of its own code, via 600+ commits that inserted 4.8K and deleted 1.5K lines of code.
title: Aider has written 7% of its own code (outdated, now 70%)
excerpt: This article is quite out dated. Aider is currently writing about 70% of the new code in each release.
highlight_image: /assets/self-assembly.jpg
nav_exclude: true
---
@@ -8,10 +8,17 @@ nav_exclude: true
<p class="post-date">{{ page.date | date: "%B %d, %Y" }}</p>
{% endif %}
# Aider has written 7% of its own code
# Aider has written 7% of its own code (outdated, now 70%)
[![self assembly](/assets/self-assembly.jpg)](https://aider.chat/assets/self-assembly.jpg)
{: .note }
This article is quite old and outdated.
Aider is currently writing about 70% of the new code
in each release.
See
[aider's release history](/HISTORY.html) for the latest statistics.
The
[aider git repo](https://github.com/Aider-AI/aider)
currently contains about 4K commits and 14K lines of code.

View File

@@ -0,0 +1,194 @@
---
title: Details matter with open source models
excerpt: Open source LLMs are becoming very powerful, but pay attention to how you (or your provider) are serving the model. It can affect code editing skill.
highlight_image: /assets/quantization.jpg
draft: false
nav_exclude: true
---
{% if page.date %}
<p class="post-date">{{ page.date | date: "%B %d, %Y" }}</p>
{% endif %}
# Details matter with open source models
{: .no_toc }
<canvas id="quantChart" width="800" height="600" style="margin: 20px 0"></canvas>
Open source models like Qwen 2.5 32B Instruct are performing very well on
aider's code editing benchmark, rivaling closed source frontier models.
But pay attention to how your model is being served and quantized,
as it can impact code editing skill.
Open source models are often available at a variety of quantizations,
and can be served with different token limits.
These details matter when working with code.
The graph above and table below compares different versions of the Qwen 2.5 Coder 32B Instruct model,
served both locally and from a variety of cloud providers.
- The [HuggingFace BF16 weights](https://huggingface.co/Qwen/Qwen2.5-Coder-32B-Instruct) served via [glhf.chat](https://glhf.chat).
- [4bit and 8bit quants for mlx](https://t.co/cwX3DYX35D).
- The results from [OpenRouter's mix of providers](https://openrouter.ai/qwen/qwen-2.5-coder-32b-instruct/providers) which serve the model with different levels of quantization.
- Results from OpenRouter's providers, both served via OpenRouter and directly to their own APIs.
- Ollama locally serving different quantizations from the [Ollama model library](https://ollama.com/library/qwen2.5-coder:32b-instruct-q4_K_M) with 8k+
context windows.
- An Ollama fp16 quantization served with Ollama's default 2k context window.
### Pitfalls and details
This benchmarking effort highlighted a number of pitfalls and details specific to open source
models which
can have a significant impact on their ability to correctly edit code:
- **Quantization** -- Open source models are often available at dozens of different quantizations.
Most seem to only modestly decrease code editing skill, but stronger quantizations
do have a real impact.
- **Context window** -- Cloud providers can decide how large a context window to accept,
and they often choose differently. Ollama's local API server
defaults to a tiny 2k context window,
and silently discards data that exceeds it. Such a small window has
catastrophic effects on performance, without throwing obvious hard errors.
- **Output token limits** -- Open source models are often served with wildly
differing output token limits. This has a direct impact on how much code the
model can write or edit in a response.
- **Buggy cloud providers** -- While benchmarking Qwen 2.5 Coder 32B Instruct
and DeepSeek V2.5, I discovered
multiple cloud providers with broken or buggy API endpoints.
They seemed
to be returning results different from expected based on the advertised
quantization and context sizes.
The harm caused to the code editing benchmark varied from serious
to catastrophic.
One provider scored 0.5% on the benchmark with DeepSeek V2.5, a highly capable model.
Closed source, proprietary models don't typically have these issues.
They are owned and operated by the organization that created them,
and typically served with specific, predictable context window and output token limits.
Their quantization level is usually unknown, but fixed and unchanging for all users.
### Conclusions
The best versions of the Qwen model rival GPT-4o, while the worst performing
quantization is more like the older GPT-4 Turbo when served competently.
Even an otherwise excellent fp16 quantization falls to GPT-3.5 Turbo levels of performance
if run with Ollama's default 2k context window.
### Sections
{: .no_toc }
- TOC
{:toc}
## Benchmark results
{: .note :}
These are results from single benchmark runs, so expect normal variance of +/- 1-2%.
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
{% include quant-chart.js %}
</script>
<input type="text" id="quantSearchInput" placeholder="Search..." style="width: 100%; max-width: 800px; margin: 10px auto; padding: 8px; display: block; border: 1px solid #ddd; border-radius: 4px;">
<table style="width: 100%; max-width: 800px; margin: auto; border-collapse: collapse; box-shadow: 0 2px 4px rgba(0,0,0,0.1); font-size: 14px;">
<thead style="background-color: #f2f2f2;">
<tr>
<th style="padding: 8px; text-align: left;">Model</th>
<th style="padding: 8px; text-align: center;">Percent completed correctly</th>
<th style="padding: 8px; text-align: center;">Percent using correct edit format</th>
<th style="padding: 8px; text-align: left;">Command</th>
<th style="padding: 8px; text-align: center;">Edit format</th>
</tr>
</thead>
<tbody>
{% assign quant_sorted = site.data.quant | sort: 'pass_rate_2' | reverse %}
{% for row in quant_sorted %}
<tr style="border-bottom: 1px solid #ddd;">
<td style="padding: 8px;">{{ row.model }}</td>
<td style="padding: 8px; text-align: center;">{{ row.pass_rate_2 }}%</td>
<td style="padding: 8px; text-align: center;">{{ row.percent_cases_well_formed }}%</td>
<td style="padding: 8px;"><code>{{ row.command }}</code></td>
<td style="padding: 8px; text-align: center;">{{ row.edit_format }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<style>
tr.selected {
color: #0056b3;
}
table {
table-layout: fixed;
}
td, th {
word-wrap: break-word;
overflow-wrap: break-word;
}
td:nth-child(3), td:nth-child(4) {
font-size: 12px;
}
</style>
<script>
document.getElementById('quantSearchInput').addEventListener('keyup', function() {
var input = this.value.toLowerCase();
var rows = document.querySelectorAll('tbody tr');
rows.forEach(function(row) {
var text = row.textContent.toLowerCase();
if(text.includes(input)) {
row.style.display = '';
row.classList.add('selected');
} else {
row.style.display = 'none';
row.classList.remove('selected');
}
});
});
</script>
## Setting Ollama's context window size
[Ollama uses a 2k context window by default](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-specify-the-context-window-size),
which is very small for working with aider.
Unlike most other LLM servers, Ollama does not throw an error if you submit
a request that exceeds the context window.
Instead, it just silently truncates the request by discarding the "oldest" messages
in the chat to make it fit within the context window.
Except for the single 2k context result,
all of the Ollama results above were collected with at least an 8k context window.
An 8k window is large enough to attempt all the coding problems in the benchmark.
Aider sets Ollama's context window to 8k by default, starting in aider v0.65.0.
You can change the Ollama server's context window with a
[`.aider.model.settings.yml` file](https://aider.chat/docs/config/adv-model-settings.html#model-settings)
like this:
```
- name: ollama/qwen2.5-coder:32b-instruct-fp16
extra_params:
num_ctx: 8192
```
## Choosing providers with OpenRouter
OpenRouter allows you to ignore specific providers in your
[preferences](https://openrouter.ai/settings/preferences).
This can be used to limit your OpenRouter requests to be
served by only your preferred providers.
## Notes
This article went through many revisions as I received feedback from
numerous members of the community.
Here are some of the noteworthy learnings and changes:
- The first version of this article included incorrect Ollama models.
- Earlier Ollama results used the too small default 2k context window,
artificially harming the benchmark results.
- The benchmark results appear to have uncovered a problem in the way
OpenRouter was communicating with Hyperbolic.
They fixed the issue 11/24/24, shortly after it was pointed out.

View File

@@ -0,0 +1,140 @@
---
title: QwQ is a code architect, not an editor
excerpt: QwQ is reasoning model like o1, and needs to be used as an architect with another model as editor.
highlight_image: /assets/qwq.jpg
draft: false
nav_exclude: true
---
{% if page.date %}
<p class="post-date">{{ page.date | date: "%B %d, %Y" }}</p>
{% endif %}
# QwQ is a code architect, not an editor
{: .no_toc }
<canvas id="qwqChart" width="800" height="500" style="margin: 20px 0"></canvas>
QwQ 32B Preview is a "reasoning" model, which spends a lot of tokens thinking before
rendering a final response.
This is similar to OpenAI's o1 models, which are most effective with aider
[when paired as an architect with a traditional LLM as an editor](https://aider.chat/2024/09/26/architect.html).
In this mode, the reasoning model acts as an "architect" to propose a solution to the
coding problem without regard for how to actually make edits to the source files.
The "editor" model receives that proposal, and focuses solely on how to
edit the existing source code to implement it.
Used alone without being paired with an editor,
QwQ was unable to comply with even the simplest
[editing format](https://aider.chat/docs/more/edit-formats.html).
It was not able to reliably edit source code files.
As a result, QwQ's solo score on the benchmark was quite underwhelming
(and far worse than the o1 models performing solo).
QwQ is based on
Qwen 2.5 Coder 32B Instruct,
and does better when paired with it as an architect + editor combo.
Though this provided only a modest benchmark improvement over just using Qwen alone,
and comes with a fairly high cost in terms of latency.
Each request must wait for QwQ to return all its thinking text
and the final solution proposal.
And then one must wait for Qwen to turn that large
response into actual file edits.
Pairing QwQ with other sensible editor models performed the same or worse than
just using Qwen 2.5 Coder 32B Instruct alone.
QwQ+Qwen seems to be the best way to use QwQ, achieving a score of 74%.
That is well below the
SOTA results for this benchmark: Sonnet alone scores 84%, and
o1-preview + o1-mini as architect + editor scores 85%.
## QwQ specific editing formats
I spent some time experimenting with a variety of custom editing formats
for QwQ.
In particular, I tried to parse the QwQ response and discard the long
sections of "thinking" and retain only the "final" solution.
None of this custom work seemed to translate
into any significant improvement in the benchmark results.
## Results
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
{% include qwq-chart.js %}
</script>
<table style="width: 100%; max-width: 800px; margin: auto; border-collapse: collapse; box-shadow: 0 2px 4px rgba(0,0,0,0.1); font-size: 14px;">
<thead style="background-color: #f2f2f2;">
<tr>
<th style="padding: 8px; text-align: left;">Model</th>
<th style="padding: 8px; text-align: center;">Percent completed correctly</th>
<th style="padding: 8px; text-align: center;">Percent using correct edit format</th>
<th style="padding: 8px; text-align: left;">Command</th>
<th style="padding: 8px; text-align: center;">Edit format</th>
</tr>
</thead>
<tbody>
{% assign qwq_sorted = site.data.qwq | sort: 'pass_rate_2' | reverse %}
{% for row in qwq_sorted %}
<tr style="border-bottom: 1px solid #ddd;">
<td style="padding: 8px;">{{ row.model }}</td>
<td style="padding: 8px; text-align: center;">{{ row.pass_rate_2 }}%</td>
<td style="padding: 8px; text-align: center;">{{ row.percent_cases_well_formed }}%</td>
<td style="padding: 8px;"><code>{{ row.command }}</code></td>
<td style="padding: 8px; text-align: center;">{{ row.edit_format }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<style>
tr.selected {
color: #0056b3;
}
table {
table-layout: fixed;
}
td, th {
word-wrap: break-word;
overflow-wrap: break-word;
}
td:nth-child(3), td:nth-child(4) {
font-size: 12px;
}
</style>
<script>
document.getElementById('qwqSearchInput').addEventListener('keyup', function() {
var input = this.value.toLowerCase();
var rows = document.querySelectorAll('tbody tr');
rows.forEach(function(row) {
var text = row.textContent.toLowerCase();
if(text.includes(input)) {
row.style.display = '';
row.classList.add('selected');
} else {
row.style.display = 'none';
row.classList.remove('selected');
}
});
});
</script>
## Open source model caveats
As discussed in a recent blog post,
[details matter with open source models](https://aider.chat/2024/11/21/quantization.html).
For clarity, new benchmark runs for this article were
performed against OpenRouter's endpoints for
QwQ 32B Preview and Qwen 2.5 Coder 32B Instruct.
For the other models, the benchmark was direct to their providers' APIs.
Having recently done extensive testing of OpenRouter's Qwen 2.5 Coder 32B Instruct endpoint,
it seems reliable.
The provider Mancer was blocked due to the small context window it provides.
For QwQ 32B Preview, Fireworks was blocked because of its small context window.

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 103 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -14,14 +14,8 @@
## show this help message and exit
#help: xxx
#######
# Main:
## Specify the OpenAI API key
#openai-api-key: xxx
## Specify the Anthropic API key
#anthropic-api-key: xxx
#############
# Main model:
## Specify the model to use for the main chat
#model: xxx
@@ -29,13 +23,16 @@
## Use claude-3-opus-20240229 model for the main chat
#opus: false
## Use anthropic/claude-3-5-sonnet-20241022 model for the main chat
## Use claude-3-5-sonnet-20241022 model for the main chat
#sonnet: false
## Use claude-3-5-haiku-20241022 model for the main chat
#haiku: false
## Use gpt-4-0613 model for the main chat
#4: false
## Use gpt-4o-2024-08-06 model for the main chat
## Use gpt-4o model for the main chat
#4o: false
## Use gpt-4o-mini model for the main chat
@@ -56,36 +53,72 @@
## Use o1-preview model for the main chat
#o1-preview: false
#################
# Model Settings:
########################
# API Keys and settings:
## List known models which match the (partial) MODEL name
#list-models: xxx
## Specify the OpenAI API key
#openai-api-key: xxx
## Specify the Anthropic API key
#anthropic-api-key: xxx
## Specify the api base url
#openai-api-base: xxx
## Specify the api_type
## (deprecated, use --set-env OPENAI_API_TYPE=<value>)
#openai-api-type: xxx
## Specify the api_version
## (deprecated, use --set-env OPENAI_API_VERSION=<value>)
#openai-api-version: xxx
## Specify the deployment_id
## (deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)
#openai-api-deployment-id: xxx
## Specify the OpenAI organization ID
## (deprecated, use --set-env OPENAI_ORGANIZATION=<value>)
#openai-organization-id: xxx
## Set an environment variable (to control API settings, can be used multiple times)
#set-env: xxx
## Specify multiple values like this:
#set-env:
# - xxx
# - yyy
# - zzz
## Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
#api-key: xxx
## Specify multiple values like this:
#api-key:
# - xxx
# - yyy
# - zzz
#################
# Model settings:
## List known models which match the (partial) MODEL name
#list-models: xxx
## Specify a file with aider model settings for unknown models
#model-settings-file: .aider.model.settings.yml
## Specify a file with context window and costs for unknown models
#model-metadata-file: .aider.model.metadata.json
## Add a model alias (can be used multiple times)
#alias: xxx
## Specify multiple values like this:
#alias:
# - xxx
# - yyy
# - zzz
## Verify the SSL cert when connecting to models (default: True)
#verify-ssl: true
## Timeout in seconds for API calls (default: None)
#timeout: xxx
## Specify what edit format the LLM should use (default depends on model)
#edit-format: xxx
@@ -107,11 +140,8 @@
## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.
#max-chat-history-tokens: xxx
## Specify the .env file to load (default: .env in git root)
#env-file: .env
#################
# Cache Settings:
# Cache settings:
## Enable caching of prompts (default: False)
#cache-prompts: false
@@ -120,7 +150,7 @@
#cache-keepalive-pings: false
###################
# Repomap Settings:
# Repomap settings:
## Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)
#map-tokens: xxx
@@ -147,7 +177,7 @@
#llm-history-file: xxx
##################
# Output Settings:
# Output settings:
## Use colors suitable for a dark terminal background (default: False)
#dark-mode: false
@@ -195,7 +225,7 @@
#show-diffs: false
###############
# Git Settings:
# Git settings:
## Enable/disable looking for a git repo (default: True)
#git: true
@@ -239,6 +269,9 @@
## Skip the sanity check for the git repository (default: False)
#skip-sanity-check-repo: false
## Enable/disable watching files for ai coding comments (default: False)
#watch-files: false
########################
# Fixing and committing:
@@ -262,11 +295,86 @@
## Enable/disable automatic testing after changes (default: False)
#auto-test: false
## Run tests and fix problems found
## Run tests, fix problems found and then exit
#test: false
############
# Analytics:
## Enable/disable analytics for current session (default: random)
#analytics: xxx
## Specify a file to log analytics events
#analytics-log: xxx
## Permanently disable analytics
#analytics-disable: false
############
# Upgrading:
## Check for updates and return status in the exit code
#just-check-update: false
## Check for new aider versions on launch
#check-update: true
## Show release notes on first run of new version (default: None, ask user)
#show-release-notes: xxx
## Install the latest version from the main branch
#install-main-branch: false
## Upgrade aider to the latest version from PyPI
#upgrade: false
## Show the version number and exit
#version: xxx
########
# Modes:
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
#message: xxx
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
#message-file: xxx
## Run aider in your browser (default: False)
#gui: false
## Enable automatic copy/paste of chat between aider and web UI (default: False)
#copy-paste: false
## Apply the changes from the given file instead of running the chat (debug)
#apply: xxx
## Apply clipboard contents as edits using the main model's editor format
#apply-clipboard-edits: false
## Do all startup activities then exit before accepting user input (debug)
#exit: false
## Print the repo map and exit (debug)
#show-repo-map: false
## Print the system prompts and exit (debug)
#show-prompts: false
#################
# Other Settings:
# Voice settings:
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
#voice-format: wav
## Specify the language for voice using ISO 639-1 code (default: auto)
#voice-language: en
## Specify the input device name for voice recording
#voice-input-device: xxx
#################
# Other settings:
## specify a file to edit (can be used multiple times)
#file: xxx
@@ -290,44 +398,14 @@
## Specify the language to use in the chat (default: None, uses system settings)
#chat-language: xxx
## Show the version number and exit
#version: xxx
## Check for updates and return status in the exit code
#just-check-update: false
## Check for new aider versions on launch
#check-update: true
## Install the latest version from the main branch
#install-main-branch: false
## Upgrade aider to the latest version from PyPI
#upgrade: false
## Apply the changes from the given file instead of running the chat (debug)
#apply: xxx
## Always say yes to every confirmation
#yes-always: false
## Enable verbose output
#verbose: false
## Print the repo map and exit (debug)
#show-repo-map: false
## Print the system prompts and exit (debug)
#show-prompts: false
## Do all startup activities then exit before accepting user input (debug)
#exit: false
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
#message: xxx
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
#message-file: xxx
## Load and execute /commands from a file on launch
#load: xxx
## Specify the encoding for input and output (default: utf-8)
#encoding: utf-8
@@ -335,17 +413,20 @@
## Specify the config file (default: search for .aider.conf.yml in git root, cwd or home directory)
#config: xxx
## Run aider in your browser
#gui: false
## Specify the .env file to load (default: .env in git root)
#env-file: .env
## Enable/disable suggesting shell commands (default: True)
#suggest-shell-commands: true
#################
# Voice Settings:
## Enable/disable fancy input with history and completion (default: True)
#fancy-input: true
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
#voice-format: wav
## Enable/disable multi-line input mode with Meta-Enter to submit (default: False)
#multiline: false
## Specify the language for voice using ISO 639-1 code (default: auto)
#voice-language: en
## Enable/disable detection and offering to add URLs to chat (default: True)
#detect-urls: true
## Specify which editor to use for the /editor command
#editor: xxx

View File

@@ -18,14 +18,8 @@
##...
#######
# Main:
## Specify the OpenAI API key
#OPENAI_API_KEY=
## Specify the Anthropic API key
#ANTHROPIC_API_KEY=
#############
# Main model:
## Specify the model to use for the main chat
#AIDER_MODEL=
@@ -33,13 +27,16 @@
## Use claude-3-opus-20240229 model for the main chat
#AIDER_OPUS=
## Use anthropic/claude-3-5-sonnet-20241022 model for the main chat
## Use claude-3-5-sonnet-20241022 model for the main chat
#AIDER_SONNET=
## Use claude-3-5-haiku-20241022 model for the main chat
#AIDER_HAIKU=
## Use gpt-4-0613 model for the main chat
#AIDER_4=
## Use gpt-4o-2024-08-06 model for the main chat
## Use gpt-4o model for the main chat
#AIDER_4O=
## Use gpt-4o-mini model for the main chat
@@ -60,36 +57,57 @@
## Use o1-preview model for the main chat
#AIDER_O1_PREVIEW=
########################
# API Keys and settings:
## Specify the OpenAI API key
#AIDER_OPENAI_API_KEY=
## Specify the Anthropic API key
#AIDER_ANTHROPIC_API_KEY=
## Specify the api base url
#AIDER_OPENAI_API_BASE=
## (deprecated, use --set-env OPENAI_API_TYPE=<value>)
#AIDER_OPENAI_API_TYPE=
## (deprecated, use --set-env OPENAI_API_VERSION=<value>)
#AIDER_OPENAI_API_VERSION=
## (deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)
#AIDER_OPENAI_API_DEPLOYMENT_ID=
## (deprecated, use --set-env OPENAI_ORGANIZATION=<value>)
#AIDER_OPENAI_ORGANIZATION_ID=
## Set an environment variable (to control API settings, can be used multiple times)
#AIDER_SET_ENV=
## Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
#AIDER_API_KEY=
#################
# Model Settings:
# Model settings:
## List known models which match the (partial) MODEL name
#AIDER_LIST_MODELS=
## Specify the api base url
#OPENAI_API_BASE=
## Specify the api_type
#OPENAI_API_TYPE=
## Specify the api_version
#OPENAI_API_VERSION=
## Specify the deployment_id
#OPENAI_API_DEPLOYMENT_ID=
## Specify the OpenAI organization ID
#OPENAI_ORGANIZATION_ID=
## Specify a file with aider model settings for unknown models
#AIDER_MODEL_SETTINGS_FILE=.aider.model.settings.yml
## Specify a file with context window and costs for unknown models
#AIDER_MODEL_METADATA_FILE=.aider.model.metadata.json
## Add a model alias (can be used multiple times)
#AIDER_ALIAS=
## Verify the SSL cert when connecting to models (default: True)
#AIDER_VERIFY_SSL=true
## Timeout in seconds for API calls (default: None)
#AIDER_TIMEOUT=
## Specify what edit format the LLM should use (default depends on model)
#AIDER_EDIT_FORMAT=
@@ -111,11 +129,8 @@
## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.
#AIDER_MAX_CHAT_HISTORY_TOKENS=
## Specify the .env file to load (default: .env in git root)
#AIDER_ENV_FILE=.env
#################
# Cache Settings:
# Cache settings:
## Enable caching of prompts (default: False)
#AIDER_CACHE_PROMPTS=false
@@ -124,7 +139,7 @@
#AIDER_CACHE_KEEPALIVE_PINGS=false
###################
# Repomap Settings:
# Repomap settings:
## Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)
#AIDER_MAP_TOKENS=
@@ -151,7 +166,7 @@
#AIDER_LLM_HISTORY_FILE=
##################
# Output Settings:
# Output settings:
## Use colors suitable for a dark terminal background (default: False)
#AIDER_DARK_MODE=false
@@ -199,7 +214,7 @@
#AIDER_SHOW_DIFFS=false
###############
# Git Settings:
# Git settings:
## Enable/disable looking for a git repo (default: True)
#AIDER_GIT=true
@@ -243,6 +258,9 @@
## Skip the sanity check for the git repository (default: False)
#AIDER_SKIP_SANITY_CHECK_REPO=false
## Enable/disable watching files for ai coding comments (default: False)
#AIDER_WATCH_FILES=false
########################
# Fixing and committing:
@@ -261,11 +279,83 @@
## Enable/disable automatic testing after changes (default: False)
#AIDER_AUTO_TEST=false
## Run tests and fix problems found
## Run tests, fix problems found and then exit
#AIDER_TEST=false
############
# Analytics:
## Enable/disable analytics for current session (default: random)
#AIDER_ANALYTICS=
## Specify a file to log analytics events
#AIDER_ANALYTICS_LOG=
## Permanently disable analytics
#AIDER_ANALYTICS_DISABLE=false
############
# Upgrading:
## Check for updates and return status in the exit code
#AIDER_JUST_CHECK_UPDATE=false
## Check for new aider versions on launch
#AIDER_CHECK_UPDATE=true
## Show release notes on first run of new version (default: None, ask user)
#AIDER_SHOW_RELEASE_NOTES=
## Install the latest version from the main branch
#AIDER_INSTALL_MAIN_BRANCH=false
## Upgrade aider to the latest version from PyPI
#AIDER_UPGRADE=false
########
# Modes:
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
#AIDER_MESSAGE=
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
#AIDER_MESSAGE_FILE=
## Run aider in your browser (default: False)
#AIDER_GUI=false
## Enable automatic copy/paste of chat between aider and web UI (default: False)
#AIDER_COPY_PASTE=false
## Apply the changes from the given file instead of running the chat (debug)
#AIDER_APPLY=
## Apply clipboard contents as edits using the main model's editor format
#AIDER_APPLY_CLIPBOARD_EDITS=false
## Do all startup activities then exit before accepting user input (debug)
#AIDER_EXIT=false
## Print the repo map and exit (debug)
#AIDER_SHOW_REPO_MAP=false
## Print the system prompts and exit (debug)
#AIDER_SHOW_PROMPTS=false
#################
# Other Settings:
# Voice settings:
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
#AIDER_VOICE_FORMAT=wav
## Specify the language for voice using ISO 639-1 code (default: auto)
#AIDER_VOICE_LANGUAGE=en
## Specify the input device name for voice recording
#AIDER_VOICE_INPUT_DEVICE=
#################
# Other settings:
## specify a file to edit (can be used multiple times)
#AIDER_FILE=
@@ -279,56 +369,32 @@
## Specify the language to use in the chat (default: None, uses system settings)
#AIDER_CHAT_LANGUAGE=
## Check for updates and return status in the exit code
#AIDER_JUST_CHECK_UPDATE=false
## Check for new aider versions on launch
#AIDER_CHECK_UPDATE=true
## Install the latest version from the main branch
#AIDER_INSTALL_MAIN_BRANCH=false
## Upgrade aider to the latest version from PyPI
#AIDER_UPGRADE=false
## Apply the changes from the given file instead of running the chat (debug)
#AIDER_APPLY=
## Always say yes to every confirmation
#AIDER_YES_ALWAYS=
## Enable verbose output
#AIDER_VERBOSE=false
## Print the repo map and exit (debug)
#AIDER_SHOW_REPO_MAP=false
## Print the system prompts and exit (debug)
#AIDER_SHOW_PROMPTS=false
## Do all startup activities then exit before accepting user input (debug)
#AIDER_EXIT=false
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
#AIDER_MESSAGE=
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
#AIDER_MESSAGE_FILE=
## Load and execute /commands from a file on launch
#AIDER_LOAD=
## Specify the encoding for input and output (default: utf-8)
#AIDER_ENCODING=utf-8
## Run aider in your browser
#AIDER_GUI=false
## Specify the .env file to load (default: .env in git root)
#AIDER_ENV_FILE=.env
## Enable/disable suggesting shell commands (default: True)
#AIDER_SUGGEST_SHELL_COMMANDS=true
#################
# Voice Settings:
## Enable/disable fancy input with history and completion (default: True)
#AIDER_FANCY_INPUT=true
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
#AIDER_VOICE_FORMAT=wav
## Enable/disable multi-line input mode with Meta-Enter to submit (default: False)
#AIDER_MULTILINE=false
## Specify the language for voice using ISO 639-1 code (default: auto)
#AIDER_VOICE_LANGUAGE=en
## Enable/disable detection and offering to add URLs to chat (default: True)
#AIDER_DETECT_URLS=true
## Specify which editor to use for the /editor command
#AIDER_EDITOR=

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

View File

@@ -40,5 +40,5 @@ Using an `.env` file:
AIDER_DARK_MODE=true
```
{% include env-keys-tip.md %}
{% include keys.md %}

View File

@@ -11,6 +11,13 @@ description: Configuring advanced settings for LLMs.
In most cases, you can safely ignore aider's warning about unknown context
window size and model costs.
{: .note }
Aider never *enforces* token limits, it only *reports* token limit errors
from the API provider.
You probably don't need to
configure aider with the proper token limits
for unusual models.
But, you can register context window limits and costs for models that aren't known
to aider. Create a `.aider.model.metadata.json` file in one of these locations:
@@ -39,13 +46,19 @@ The json file should be a dictionary with an entry for each model, as follows:
}
```
See
[litellm's model_prices_and_context_window.json file](https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json) for more examples.
{: .tip }
Use a fully qualified model name with a `provider/` at the front
in the `.aider.model.metadata.json` file.
For example, use `deepseek/deepseek-chat`, not just `deepseek-chat`.
That prefix should match the `litellm_provider` field.
### Contribute model metadata
Aider relies on
[litellm's model_prices_and_context_window.json file](https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json)
for model metadata.
Consider submitting a PR to that file to add missing models.
## Model settings
@@ -55,8 +68,10 @@ These model settings are pre-configured for most popular models.
But it can sometimes be helpful to override them or add settings for
a model that aider doesn't know about.
To do that,
create a `.aider.model.settings.yml` file in one of these locations:
### Configuration file locations
You can override or add settings for any model by creating a `.aider.model.settings.yml` file in one of these locations:
- Your home directory.
- The root if your git repo.
@@ -66,9 +81,31 @@ create a `.aider.model.settings.yml` file in one of these locations:
If the files above exist, they will be loaded in that order.
Files loaded last will take priority.
The yaml file should be a a list of dictionary objects for each model.
For example, below are all the pre-configured model settings
to give a sense for the settings which are supported.
The yaml file should be a list of dictionary objects for each model.
### Global extra params
You can use the special model name `aider/extra_params` to define
`extra_params` that will be passed to `litellm.completion()` for all models.
Only the `extra_params` dict is used from this special model name.
For example:
```yaml
- name: aider/extra_params
extra_params:
extra_headers:
Custom-Header: value
max_tokens: 8192
```
These settings will be merged with any model-specific settings, with the
`aider/extra_params` settings taking precedence for any direct conflicts.
### Example model settings
Below are all the pre-configured model settings to give a sense for the settings which are supported.
You can also look at the `ModelSettings` class in
[models.py](https://github.com/Aider-AI/aider/blob/main/aider/models.py)
@@ -81,8 +118,7 @@ cog.out(get_model_settings_as_yaml())
cog.out("```\n")
]]]-->
```yaml
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -98,8 +134,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -115,8 +150,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -132,8 +166,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -149,8 +182,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -166,8 +198,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: true
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: udiff
editor_edit_format: null
@@ -183,8 +214,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: true
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: udiff
editor_edit_format: null
@@ -200,8 +230,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: true
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -217,8 +246,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: true
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -234,8 +262,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: true
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -251,8 +278,39 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: true
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: false
extra_params: null
lazy: true
name: gpt-4o-2024-11-20
reminder: sys
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: false
extra_params: null
lazy: true
name: openai/gpt-4o-2024-11-20
reminder: sys
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -268,8 +326,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: true
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -285,8 +342,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: true
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -302,8 +358,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: openai/gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: udiff
editor_edit_format: null
@@ -319,8 +374,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: udiff
editor_edit_format: null
@@ -336,8 +390,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: true
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -353,8 +406,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -370,8 +422,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -387,8 +438,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -404,8 +454,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -420,9 +469,8 @@ cog.out("```\n")
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: claude-3-haiku-20240307
- accepts_images: false
cache_control: false
weak_model_name: claude-3-5-haiku-20241022
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -437,9 +485,8 @@ cog.out("```\n")
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: openrouter/anthropic/claude-3-haiku
- accepts_images: false
cache_control: false
weak_model_name: openrouter/anthropic/claude-3-5-haiku
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -454,9 +501,8 @@ cog.out("```\n")
use_repo_map: false
use_system_prompt: true
use_temperature: true
weak_model_name: claude-3-haiku-20240307
- accepts_images: true
cache_control: true
weak_model_name: claude-3-5-haiku-20241022
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -464,7 +510,7 @@ cog.out("```\n")
examples_as_sys_msg: true
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
max_tokens: 8192
lazy: false
name: claude-3-5-sonnet-20240620
@@ -474,9 +520,8 @@ cog.out("```\n")
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: claude-3-haiku-20240307
- accepts_images: false
cache_control: true
weak_model_name: claude-3-5-haiku-20241022
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -484,7 +529,7 @@ cog.out("```\n")
examples_as_sys_msg: true
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
max_tokens: 8192
lazy: false
name: anthropic/claude-3-5-sonnet-20240620
@@ -494,9 +539,8 @@ cog.out("```\n")
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: claude-3-haiku-20240307
- accepts_images: false
cache_control: true
weak_model_name: anthropic/claude-3-5-haiku-20241022
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -504,7 +548,7 @@ cog.out("```\n")
examples_as_sys_msg: true
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
max_tokens: 8192
lazy: false
name: anthropic/claude-3-5-sonnet-20241022
@@ -514,9 +558,65 @@ cog.out("```\n")
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: claude-3-haiku-20240307
- accepts_images: false
cache_control: true
weak_model_name: anthropic/claude-3-5-haiku-20241022
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
editor_model_name: bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
examples_as_sys_msg: true
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
max_tokens: 8192
lazy: false
name: bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: bedrock/anthropic.claude-3-5-haiku-20241022-v1:0
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
editor_model_name: anthropic/claude-3-5-sonnet-20241022
examples_as_sys_msg: true
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
max_tokens: 8192
lazy: false
name: anthropic/claude-3-5-sonnet-latest
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: anthropic/claude-3-5-haiku-20241022
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
editor_model_name: claude-3-5-sonnet-20241022
examples_as_sys_msg: true
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
max_tokens: 8192
lazy: false
name: claude-3-5-sonnet-20241022
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: claude-3-5-haiku-20241022
- cache_control: true
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -524,7 +624,7 @@ cog.out("```\n")
examples_as_sys_msg: true
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
lazy: false
name: anthropic/claude-3-haiku-20240307
reminder: user
@@ -534,8 +634,78 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: anthropic/claude-3-haiku-20240307
- accepts_images: false
cache_control: true
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: false
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
lazy: false
name: anthropic/claude-3-5-haiku-20241022
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: anthropic/claude-3-5-haiku-20241022
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: false
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
lazy: false
name: bedrock/anthropic.claude-3-5-haiku-20241022-v1:0
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: bedrock/anthropic.claude-3-5-haiku-20241022-v1:0
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: true
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
lazy: false
name: claude-3-5-haiku-20241022
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: claude-3-5-haiku-20241022
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: false
extra_params:
max_tokens: 4096
lazy: false
name: vertex_ai/claude-3-5-haiku@20241022
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: vertex_ai/claude-3-5-haiku@20241022
- cache_control: true
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -543,7 +713,7 @@ cog.out("```\n")
examples_as_sys_msg: true
extra_params:
extra_headers:
anthropic-beta: prompt-caching-2024-07-31
anthropic-beta: prompt-caching-2024-07-31,pdfs-2024-09-25
lazy: false
name: claude-3-haiku-20240307
reminder: user
@@ -553,8 +723,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: claude-3-haiku-20240307
- accepts_images: true
cache_control: true
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -570,9 +739,8 @@ cog.out("```\n")
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: openrouter/anthropic/claude-3-haiku
- accepts_images: true
cache_control: true
weak_model_name: openrouter/anthropic/claude-3-5-haiku
- cache_control: true
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -588,9 +756,8 @@ cog.out("```\n")
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: openrouter/anthropic/claude-3-haiku:beta
- accepts_images: true
cache_control: false
weak_model_name: openrouter/anthropic/claude-3-5-haiku:beta
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -606,9 +773,25 @@ cog.out("```\n")
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: vertex_ai/claude-3-haiku@20240307
- accepts_images: false
cache_control: false
weak_model_name: vertex_ai/claude-3-5-haiku@20241022
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
editor_model_name: vertex_ai/claude-3-5-sonnet-v2@20241022
examples_as_sys_msg: true
extra_params:
max_tokens: 8192
lazy: false
name: vertex_ai/claude-3-5-sonnet-v2@20241022
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: vertex_ai/claude-3-5-haiku@20241022
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -623,9 +806,8 @@ cog.out("```\n")
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: vertex_ai/claude-3-haiku@20240307
- accepts_images: false
cache_control: false
weak_model_name: vertex_ai/claude-3-5-haiku@20241022
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -640,9 +822,8 @@ cog.out("```\n")
use_repo_map: false
use_system_prompt: true
use_temperature: true
weak_model_name: vertex_ai/claude-3-haiku@20240307
- accepts_images: false
cache_control: false
weak_model_name: vertex_ai/claude-3-5-haiku@20241022
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -658,8 +839,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: command-r-plus
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -675,8 +855,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: command-r-08-2024
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -692,8 +871,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: command-r-plus-08-2024
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -709,8 +887,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: groq/llama3-8b-8192
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -726,8 +903,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: openrouter/meta-llama/llama-3-70b-instruct
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -743,8 +919,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -760,8 +935,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff-fenced
editor_edit_format: null
@@ -777,8 +951,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff-fenced
editor_edit_format: null
@@ -794,8 +967,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff-fenced
editor_edit_format: null
@@ -811,8 +983,71 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: false
extra_params: null
lazy: false
name: gemini/gemini-exp-1206
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: null
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: false
extra_params: null
lazy: false
name: gemini/gemini-exp-1114
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: null
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: false
extra_params: null
lazy: false
name: gemini/gemini-exp-1121
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: null
- cache_control: false
caches_by_default: false
edit_format: diff-fenced
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: false
extra_params: null
lazy: false
name: vertex_ai/gemini-pro-experimental
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: null
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: null
@@ -828,8 +1063,23 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
editor_model_name: null
examples_as_sys_msg: false
extra_params: null
lazy: false
name: gemini/gemini-2.0-flash-exp
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: null
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -846,8 +1096,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: true
edit_format: diff
editor_edit_format: null
@@ -864,8 +1113,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -882,8 +1130,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: true
edit_format: diff
editor_edit_format: null
@@ -900,8 +1147,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: null
@@ -917,8 +1163,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: null
- accepts_images: true
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -934,8 +1179,7 @@ cog.out("```\n")
use_system_prompt: true
use_temperature: true
weak_model_name: openrouter/openai/gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: editor-diff
@@ -946,13 +1190,12 @@ cog.out("```\n")
name: openai/o1-mini
reminder: user
send_undo_reply: false
streaming: false
streaming: true
use_repo_map: true
use_system_prompt: false
use_temperature: false
weak_model_name: openai/gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: editor-diff
@@ -963,13 +1206,12 @@ cog.out("```\n")
name: azure/o1-mini
reminder: user
send_undo_reply: false
streaming: false
streaming: true
use_repo_map: true
use_system_prompt: false
use_temperature: false
weak_model_name: azure/gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: editor-diff
@@ -980,13 +1222,12 @@ cog.out("```\n")
name: o1-mini
reminder: user
send_undo_reply: false
streaming: false
streaming: true
use_repo_map: true
use_system_prompt: false
use_temperature: false
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -997,13 +1238,12 @@ cog.out("```\n")
name: openai/o1-preview
reminder: user
send_undo_reply: false
streaming: false
streaming: true
use_repo_map: true
use_system_prompt: false
use_temperature: false
weak_model_name: openai/gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -1014,13 +1254,12 @@ cog.out("```\n")
name: azure/o1-preview
reminder: user
send_undo_reply: false
streaming: false
streaming: true
use_repo_map: true
use_system_prompt: false
use_temperature: false
weak_model_name: azure/gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: architect
editor_edit_format: editor-diff
@@ -1031,13 +1270,12 @@ cog.out("```\n")
name: o1-preview
reminder: user
send_undo_reply: false
streaming: false
streaming: true
use_repo_map: true
use_system_prompt: false
use_temperature: false
weak_model_name: gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: whole
editor_edit_format: editor-diff
@@ -1053,8 +1291,7 @@ cog.out("```\n")
use_system_prompt: false
use_temperature: false
weak_model_name: openrouter/openai/gpt-4o-mini
- accepts_images: false
cache_control: false
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
@@ -1070,6 +1307,22 @@ cog.out("```\n")
use_system_prompt: false
use_temperature: false
weak_model_name: openrouter/openai/gpt-4o-mini
- cache_control: false
caches_by_default: false
edit_format: diff
editor_edit_format: editor-diff
editor_model_name: openrouter/qwen/qwen-2.5-coder-32b-instruct
examples_as_sys_msg: false
extra_params: null
lazy: false
name: openrouter/qwen/qwen-2.5-coder-32b-instruct
reminder: user
send_undo_reply: false
streaming: true
use_repo_map: true
use_system_prompt: true
use_temperature: true
weak_model_name: openrouter/qwen/qwen-2.5-coder-32b-instruct
```
<!--[[[end]]]-->

View File

@@ -15,11 +15,7 @@ load whichever is found first.
- The root of your git repo.
- Your home directory.
## Storing LLM keys
{% include special-keys.md %}
{% include env-keys-tip.md %}
{% include keys.md %}
## A note on lists
@@ -70,14 +66,8 @@ cog.outl("```")
## show this help message and exit
#help: xxx
#######
# Main:
## Specify the OpenAI API key
#openai-api-key: xxx
## Specify the Anthropic API key
#anthropic-api-key: xxx
#############
# Main model:
## Specify the model to use for the main chat
#model: xxx
@@ -85,13 +75,16 @@ cog.outl("```")
## Use claude-3-opus-20240229 model for the main chat
#opus: false
## Use anthropic/claude-3-5-sonnet-20241022 model for the main chat
## Use claude-3-5-sonnet-20241022 model for the main chat
#sonnet: false
## Use claude-3-5-haiku-20241022 model for the main chat
#haiku: false
## Use gpt-4-0613 model for the main chat
#4: false
## Use gpt-4o-2024-08-06 model for the main chat
## Use gpt-4o model for the main chat
#4o: false
## Use gpt-4o-mini model for the main chat
@@ -112,36 +105,72 @@ cog.outl("```")
## Use o1-preview model for the main chat
#o1-preview: false
#################
# Model Settings:
########################
# API Keys and settings:
## List known models which match the (partial) MODEL name
#list-models: xxx
## Specify the OpenAI API key
#openai-api-key: xxx
## Specify the Anthropic API key
#anthropic-api-key: xxx
## Specify the api base url
#openai-api-base: xxx
## Specify the api_type
## (deprecated, use --set-env OPENAI_API_TYPE=<value>)
#openai-api-type: xxx
## Specify the api_version
## (deprecated, use --set-env OPENAI_API_VERSION=<value>)
#openai-api-version: xxx
## Specify the deployment_id
## (deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)
#openai-api-deployment-id: xxx
## Specify the OpenAI organization ID
## (deprecated, use --set-env OPENAI_ORGANIZATION=<value>)
#openai-organization-id: xxx
## Set an environment variable (to control API settings, can be used multiple times)
#set-env: xxx
## Specify multiple values like this:
#set-env:
# - xxx
# - yyy
# - zzz
## Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
#api-key: xxx
## Specify multiple values like this:
#api-key:
# - xxx
# - yyy
# - zzz
#################
# Model settings:
## List known models which match the (partial) MODEL name
#list-models: xxx
## Specify a file with aider model settings for unknown models
#model-settings-file: .aider.model.settings.yml
## Specify a file with context window and costs for unknown models
#model-metadata-file: .aider.model.metadata.json
## Add a model alias (can be used multiple times)
#alias: xxx
## Specify multiple values like this:
#alias:
# - xxx
# - yyy
# - zzz
## Verify the SSL cert when connecting to models (default: True)
#verify-ssl: true
## Timeout in seconds for API calls (default: None)
#timeout: xxx
## Specify what edit format the LLM should use (default depends on model)
#edit-format: xxx
@@ -163,11 +192,8 @@ cog.outl("```")
## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.
#max-chat-history-tokens: xxx
## Specify the .env file to load (default: .env in git root)
#env-file: .env
#################
# Cache Settings:
# Cache settings:
## Enable caching of prompts (default: False)
#cache-prompts: false
@@ -176,7 +202,7 @@ cog.outl("```")
#cache-keepalive-pings: false
###################
# Repomap Settings:
# Repomap settings:
## Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)
#map-tokens: xxx
@@ -203,7 +229,7 @@ cog.outl("```")
#llm-history-file: xxx
##################
# Output Settings:
# Output settings:
## Use colors suitable for a dark terminal background (default: False)
#dark-mode: false
@@ -251,7 +277,7 @@ cog.outl("```")
#show-diffs: false
###############
# Git Settings:
# Git settings:
## Enable/disable looking for a git repo (default: True)
#git: true
@@ -295,6 +321,9 @@ cog.outl("```")
## Skip the sanity check for the git repository (default: False)
#skip-sanity-check-repo: false
## Enable/disable watching files for ai coding comments (default: False)
#watch-files: false
########################
# Fixing and committing:
@@ -318,11 +347,86 @@ cog.outl("```")
## Enable/disable automatic testing after changes (default: False)
#auto-test: false
## Run tests and fix problems found
## Run tests, fix problems found and then exit
#test: false
############
# Analytics:
## Enable/disable analytics for current session (default: random)
#analytics: xxx
## Specify a file to log analytics events
#analytics-log: xxx
## Permanently disable analytics
#analytics-disable: false
############
# Upgrading:
## Check for updates and return status in the exit code
#just-check-update: false
## Check for new aider versions on launch
#check-update: true
## Show release notes on first run of new version (default: None, ask user)
#show-release-notes: xxx
## Install the latest version from the main branch
#install-main-branch: false
## Upgrade aider to the latest version from PyPI
#upgrade: false
## Show the version number and exit
#version: xxx
########
# Modes:
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
#message: xxx
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
#message-file: xxx
## Run aider in your browser (default: False)
#gui: false
## Enable automatic copy/paste of chat between aider and web UI (default: False)
#copy-paste: false
## Apply the changes from the given file instead of running the chat (debug)
#apply: xxx
## Apply clipboard contents as edits using the main model's editor format
#apply-clipboard-edits: false
## Do all startup activities then exit before accepting user input (debug)
#exit: false
## Print the repo map and exit (debug)
#show-repo-map: false
## Print the system prompts and exit (debug)
#show-prompts: false
#################
# Other Settings:
# Voice settings:
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
#voice-format: wav
## Specify the language for voice using ISO 639-1 code (default: auto)
#voice-language: en
## Specify the input device name for voice recording
#voice-input-device: xxx
#################
# Other settings:
## specify a file to edit (can be used multiple times)
#file: xxx
@@ -346,44 +450,14 @@ cog.outl("```")
## Specify the language to use in the chat (default: None, uses system settings)
#chat-language: xxx
## Show the version number and exit
#version: xxx
## Check for updates and return status in the exit code
#just-check-update: false
## Check for new aider versions on launch
#check-update: true
## Install the latest version from the main branch
#install-main-branch: false
## Upgrade aider to the latest version from PyPI
#upgrade: false
## Apply the changes from the given file instead of running the chat (debug)
#apply: xxx
## Always say yes to every confirmation
#yes-always: false
## Enable verbose output
#verbose: false
## Print the repo map and exit (debug)
#show-repo-map: false
## Print the system prompts and exit (debug)
#show-prompts: false
## Do all startup activities then exit before accepting user input (debug)
#exit: false
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
#message: xxx
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
#message-file: xxx
## Load and execute /commands from a file on launch
#load: xxx
## Specify the encoding for input and output (default: utf-8)
#encoding: utf-8
@@ -391,19 +465,22 @@ cog.outl("```")
## Specify the config file (default: search for .aider.conf.yml in git root, cwd or home directory)
#config: xxx
## Run aider in your browser
#gui: false
## Specify the .env file to load (default: .env in git root)
#env-file: .env
## Enable/disable suggesting shell commands (default: True)
#suggest-shell-commands: true
#################
# Voice Settings:
## Enable/disable fancy input with history and completion (default: True)
#fancy-input: true
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
#voice-format: wav
## Enable/disable multi-line input mode with Meta-Enter to submit (default: False)
#multiline: false
## Specify the language for voice using ISO 639-1 code (default: auto)
#voice-language: en
## Enable/disable detection and offering to add URLs to chat (default: True)
#detect-urls: true
## Specify which editor to use for the /editor command
#editor: xxx
```
<!--[[[end]]]-->

View File

@@ -0,0 +1,68 @@
---
parent: Configuration
nav_order: 5
description: Setting API keys for API providers.
---
# API Keys
### OpenAI and Anthropic
Aider has special support for providing
OpenAI and Anthropic API keys
via dedicated switches and configuration options.
Settings keys for other providers works a bit differently, see below.
You can set OpenAI and Anthropic API keys via
[command line switches](/docs/config/options.html#api-keys-and-settings)
`--openai-api-key` and `--anthropic-api-key`.
You can also set those API keys via special entries in the
[yaml config file](/docs/config/aider_conf.html), like this:
```yaml
openai-api-key: <key>
anthropic-api-key: <key>
```
You can also store them in environment variables or a
[.env file](/docs/config/dotenv.html), which also works
for every API provider:
```
OPENAI_API_KEY=<key>
ANTHROPIC_API_KEY=<key>
```
All other LLM providers can use one of these other methods to set their API keys.
### API keys on the command line
{: .no_toc }
Use `--api-key provider=<key>` which has the effect of setting the environment variable `PROVIDER_API_KEY=<key>`. So `--api-key gemini=xxx` would set `GEMINI_API_KEY=xxx`.
### API keys in .aider.conf.yml
{: .no_toc }
You can also set API keys in the
[`.aider.conf.yml` file](/docs/config/aider_conf.html)
via the `api-key` entry:
```
api-key:
- gemini=foo # Sets env var GEMINI_API_KEY=foo
- openrouter=bar # Sets env var OPENROUTER_API_KEY=bar
- deepseek=baz # Sets env var DEEPSEEK_API_KEY=baz
```
### API keys in a .env file
{: .no_toc }
The [.env file](/docs/config/dotenv.html)
is a great place to set API keys and other provider API environment variables:
```bash
GEMINI_API_KEY=foo
OPENROUTER_API_KEY=bar
DEEPSEEK_API_KEY=baz
```

View File

@@ -1,6 +1,6 @@
---
parent: Configuration
nav_order: 900
nav_order: 20
description: Using a .env file to store LLM API keys for aider.
---
@@ -20,9 +20,7 @@ Aider will look for a `.env` file in these locations:
If the files above exist, they will be loaded in that order. Files loaded last will take priority.
## Storing LLM keys
{% include special-keys.md %}
{% include keys.md %}
## Sample .env file
@@ -60,14 +58,8 @@ cog.outl("```")
##...
#######
# Main:
## Specify the OpenAI API key
#OPENAI_API_KEY=
## Specify the Anthropic API key
#ANTHROPIC_API_KEY=
#############
# Main model:
## Specify the model to use for the main chat
#AIDER_MODEL=
@@ -75,13 +67,16 @@ cog.outl("```")
## Use claude-3-opus-20240229 model for the main chat
#AIDER_OPUS=
## Use anthropic/claude-3-5-sonnet-20241022 model for the main chat
## Use claude-3-5-sonnet-20241022 model for the main chat
#AIDER_SONNET=
## Use claude-3-5-haiku-20241022 model for the main chat
#AIDER_HAIKU=
## Use gpt-4-0613 model for the main chat
#AIDER_4=
## Use gpt-4o-2024-08-06 model for the main chat
## Use gpt-4o model for the main chat
#AIDER_4O=
## Use gpt-4o-mini model for the main chat
@@ -102,36 +97,57 @@ cog.outl("```")
## Use o1-preview model for the main chat
#AIDER_O1_PREVIEW=
########################
# API Keys and settings:
## Specify the OpenAI API key
#AIDER_OPENAI_API_KEY=
## Specify the Anthropic API key
#AIDER_ANTHROPIC_API_KEY=
## Specify the api base url
#AIDER_OPENAI_API_BASE=
## (deprecated, use --set-env OPENAI_API_TYPE=<value>)
#AIDER_OPENAI_API_TYPE=
## (deprecated, use --set-env OPENAI_API_VERSION=<value>)
#AIDER_OPENAI_API_VERSION=
## (deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)
#AIDER_OPENAI_API_DEPLOYMENT_ID=
## (deprecated, use --set-env OPENAI_ORGANIZATION=<value>)
#AIDER_OPENAI_ORGANIZATION_ID=
## Set an environment variable (to control API settings, can be used multiple times)
#AIDER_SET_ENV=
## Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
#AIDER_API_KEY=
#################
# Model Settings:
# Model settings:
## List known models which match the (partial) MODEL name
#AIDER_LIST_MODELS=
## Specify the api base url
#OPENAI_API_BASE=
## Specify the api_type
#OPENAI_API_TYPE=
## Specify the api_version
#OPENAI_API_VERSION=
## Specify the deployment_id
#OPENAI_API_DEPLOYMENT_ID=
## Specify the OpenAI organization ID
#OPENAI_ORGANIZATION_ID=
## Specify a file with aider model settings for unknown models
#AIDER_MODEL_SETTINGS_FILE=.aider.model.settings.yml
## Specify a file with context window and costs for unknown models
#AIDER_MODEL_METADATA_FILE=.aider.model.metadata.json
## Add a model alias (can be used multiple times)
#AIDER_ALIAS=
## Verify the SSL cert when connecting to models (default: True)
#AIDER_VERIFY_SSL=true
## Timeout in seconds for API calls (default: None)
#AIDER_TIMEOUT=
## Specify what edit format the LLM should use (default depends on model)
#AIDER_EDIT_FORMAT=
@@ -153,11 +169,8 @@ cog.outl("```")
## Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.
#AIDER_MAX_CHAT_HISTORY_TOKENS=
## Specify the .env file to load (default: .env in git root)
#AIDER_ENV_FILE=.env
#################
# Cache Settings:
# Cache settings:
## Enable caching of prompts (default: False)
#AIDER_CACHE_PROMPTS=false
@@ -166,7 +179,7 @@ cog.outl("```")
#AIDER_CACHE_KEEPALIVE_PINGS=false
###################
# Repomap Settings:
# Repomap settings:
## Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)
#AIDER_MAP_TOKENS=
@@ -193,7 +206,7 @@ cog.outl("```")
#AIDER_LLM_HISTORY_FILE=
##################
# Output Settings:
# Output settings:
## Use colors suitable for a dark terminal background (default: False)
#AIDER_DARK_MODE=false
@@ -241,7 +254,7 @@ cog.outl("```")
#AIDER_SHOW_DIFFS=false
###############
# Git Settings:
# Git settings:
## Enable/disable looking for a git repo (default: True)
#AIDER_GIT=true
@@ -285,6 +298,9 @@ cog.outl("```")
## Skip the sanity check for the git repository (default: False)
#AIDER_SKIP_SANITY_CHECK_REPO=false
## Enable/disable watching files for ai coding comments (default: False)
#AIDER_WATCH_FILES=false
########################
# Fixing and committing:
@@ -303,11 +319,83 @@ cog.outl("```")
## Enable/disable automatic testing after changes (default: False)
#AIDER_AUTO_TEST=false
## Run tests and fix problems found
## Run tests, fix problems found and then exit
#AIDER_TEST=false
############
# Analytics:
## Enable/disable analytics for current session (default: random)
#AIDER_ANALYTICS=
## Specify a file to log analytics events
#AIDER_ANALYTICS_LOG=
## Permanently disable analytics
#AIDER_ANALYTICS_DISABLE=false
############
# Upgrading:
## Check for updates and return status in the exit code
#AIDER_JUST_CHECK_UPDATE=false
## Check for new aider versions on launch
#AIDER_CHECK_UPDATE=true
## Show release notes on first run of new version (default: None, ask user)
#AIDER_SHOW_RELEASE_NOTES=
## Install the latest version from the main branch
#AIDER_INSTALL_MAIN_BRANCH=false
## Upgrade aider to the latest version from PyPI
#AIDER_UPGRADE=false
########
# Modes:
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
#AIDER_MESSAGE=
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
#AIDER_MESSAGE_FILE=
## Run aider in your browser (default: False)
#AIDER_GUI=false
## Enable automatic copy/paste of chat between aider and web UI (default: False)
#AIDER_COPY_PASTE=false
## Apply the changes from the given file instead of running the chat (debug)
#AIDER_APPLY=
## Apply clipboard contents as edits using the main model's editor format
#AIDER_APPLY_CLIPBOARD_EDITS=false
## Do all startup activities then exit before accepting user input (debug)
#AIDER_EXIT=false
## Print the repo map and exit (debug)
#AIDER_SHOW_REPO_MAP=false
## Print the system prompts and exit (debug)
#AIDER_SHOW_PROMPTS=false
#################
# Other Settings:
# Voice settings:
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
#AIDER_VOICE_FORMAT=wav
## Specify the language for voice using ISO 639-1 code (default: auto)
#AIDER_VOICE_LANGUAGE=en
## Specify the input device name for voice recording
#AIDER_VOICE_INPUT_DEVICE=
#################
# Other settings:
## specify a file to edit (can be used multiple times)
#AIDER_FILE=
@@ -321,60 +409,34 @@ cog.outl("```")
## Specify the language to use in the chat (default: None, uses system settings)
#AIDER_CHAT_LANGUAGE=
## Check for updates and return status in the exit code
#AIDER_JUST_CHECK_UPDATE=false
## Check for new aider versions on launch
#AIDER_CHECK_UPDATE=true
## Install the latest version from the main branch
#AIDER_INSTALL_MAIN_BRANCH=false
## Upgrade aider to the latest version from PyPI
#AIDER_UPGRADE=false
## Apply the changes from the given file instead of running the chat (debug)
#AIDER_APPLY=
## Always say yes to every confirmation
#AIDER_YES_ALWAYS=
## Enable verbose output
#AIDER_VERBOSE=false
## Print the repo map and exit (debug)
#AIDER_SHOW_REPO_MAP=false
## Print the system prompts and exit (debug)
#AIDER_SHOW_PROMPTS=false
## Do all startup activities then exit before accepting user input (debug)
#AIDER_EXIT=false
## Specify a single message to send the LLM, process reply then exit (disables chat mode)
#AIDER_MESSAGE=
## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
#AIDER_MESSAGE_FILE=
## Load and execute /commands from a file on launch
#AIDER_LOAD=
## Specify the encoding for input and output (default: utf-8)
#AIDER_ENCODING=utf-8
## Run aider in your browser
#AIDER_GUI=false
## Specify the .env file to load (default: .env in git root)
#AIDER_ENV_FILE=.env
## Enable/disable suggesting shell commands (default: True)
#AIDER_SUGGEST_SHELL_COMMANDS=true
#################
# Voice Settings:
## Enable/disable fancy input with history and completion (default: True)
#AIDER_FANCY_INPUT=true
## Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
#AIDER_VOICE_FORMAT=wav
## Enable/disable multi-line input mode with Meta-Enter to submit (default: False)
#AIDER_MULTILINE=false
## Specify the language for voice using ISO 639-1 code (default: auto)
#AIDER_VOICE_LANGUAGE=en
## Enable/disable detection and offering to add URLs to chat (default: True)
#AIDER_DETECT_URLS=true
## Specify which editor to use for the /editor command
#AIDER_EDITOR=
```
<!--[[[end]]]-->

View File

@@ -0,0 +1,127 @@
---
parent: Configuration
nav_order: 100
description: How to configure a custom editor for aider's /editor command
---
# Editor configuration
Aider allows you to configure your preferred text editor for use with the `/editor` command. The editor must be capable of running in "blocking mode", meaning the command line will wait until you close the editor before proceeding.
## Using `--editor`
You can specify the text editor with the `--editor` switch or using
`editor:` in aider's
[yaml config file](https://aider.chat/docs/config/aider_conf.html).
## Environment variables
Aider checks the following environment variables in order to determine which editor to use:
1. `AIDER_EDITOR`
2. `VISUAL`
3. `EDITOR`
## Default behavior
If no editor is configured, aider will use these platform-specific defaults:
- Windows: `notepad`
- macOS: `vim`
- Linux/Unix: `vi`
## Using a custom editor
You can set your preferred editor in your shell's configuration file (e.g., `.bashrc`, `.zshrc`):
```bash
export AIDER_EDITOR=vim
```
## Popular Editors by Platform
### macOS
1. **vim**
```bash
export AIDER_EDITOR=vim
```
2. **Emacs**
```bash
export AIDER_EDITOR=emacs
```
3. **VSCode**
```bash
export AIDER_EDITOR="code --wait"
```
4. **Sublime Text**
```bash
export AIDER_EDITOR="subl --wait"
```
5. **BBEdit**
```bash
export AIDER_EDITOR="bbedit --wait"
```
### Linux
1. **vim**
```bash
export AIDER_EDITOR=vim
```
2. **Emacs**
```bash
export AIDER_EDITOR=emacs
```
3. **nano**
```bash
export AIDER_EDITOR=nano
```
4. **VSCode**
```bash
export AIDER_EDITOR="code --wait"
```
5. **Sublime Text**
```bash
export AIDER_EDITOR="subl --wait"
```
### Windows
1. **Notepad**
```bat
set AIDER_EDITOR=notepad
```
2. **VSCode**
```bat
set AIDER_EDITOR="code --wait"
```
3. **Notepad++**
```bat
set AIDER_EDITOR="notepad++ -multiInst -notabbar -nosession -noPlugin -waitForClose"
```
## Editor command arguments
Some editors require specific command-line arguments to operate in blocking mode. The `--wait` flag (or equivalent) is commonly used to make the editor block until the file is closed.
## Troubleshooting
If you encounter issues with your editor not blocking (returning to the prompt immediately), verify that:
1. Your editor supports blocking mode
2. You've included the necessary command-line arguments for blocking mode
3. The editor command is properly quoted if it contains spaces or special characters, e.g.:
```bash
export AIDER_EDITOR="code --wait"
```

View File

@@ -0,0 +1,73 @@
---
parent: Configuration
nav_order: 1000
description: Assign convenient short names to models.
---
# Model Aliases
Model aliases allow you to create shorthand names for models you frequently use. This is particularly useful for models with long names or when you want to standardize model usage across your team.
## Command Line Usage
You can define aliases when launching aider using the `--alias` option:
```bash
aider --alias "fast:gpt-3.5-turbo" --alias "smart:gpt-4"
```
Multiple aliases can be defined by using the `--alias` option multiple times. Each alias definition should be in the format `alias:model-name`.
## Configuration File
You can also define aliases in your [`.aider.conf.yml` file](https://aider.chat/docs/config/aider_conf.html):
```yaml
alias:
- "fast:gpt-3.5-turbo"
- "smart:gpt-4"
- "hacker:claude-3-sonnet-20240229"
```
## Using Aliases
Once defined, you can use the alias instead of the full model name:
```bash
aider --model fast # Uses gpt-3.5-turbo
aider --model smart # Uses gpt-4
```
## Built-in Aliases
Aider includes some built-in aliases for convenience:
<!--[[[cog
import cog
from aider.models import MODEL_ALIASES
for alias, model in sorted(MODEL_ALIASES.items()):
cog.outl(f"- `{alias}`: {model}")
]]]-->
- `3`: gpt-3.5-turbo
- `35-turbo`: gpt-3.5-turbo
- `35turbo`: gpt-3.5-turbo
- `4`: gpt-4-0613
- `4-turbo`: gpt-4-1106-preview
- `4o`: gpt-4o
- `deepseek`: deepseek/deepseek-coder
- `flash`: gemini/gemini-2.0-flash-exp
- `haiku`: claude-3-5-haiku-20241022
- `opus`: claude-3-opus-20240229
- `sonnet`: claude-3-5-sonnet-20241022
<!--[[[end]]]-->
## Priority
If the same alias is defined in multiple places, the priority is:
1. Command line aliases (highest priority)
2. Configuration file aliases
3. Built-in aliases (lowest priority)
This allows you to override built-in aliases with your own preferences.

View File

@@ -13,10 +13,7 @@ or review them below.
- TOC
{:toc}
## LLM keys
{: .no_toc }
{% include special-keys.md %}
{% include keys.md %}
## Usage summary
@@ -25,18 +22,19 @@ from aider.args import get_md_help
cog.out(get_md_help())
]]]-->
```
usage: aider [-h] [--openai-api-key] [--anthropic-api-key] [--model]
[--opus] [--sonnet] [--4] [--4o] [--mini] [--4-turbo]
[--35turbo] [--deepseek] [--o1-mini] [--o1-preview]
[--list-models] [--openai-api-base] [--openai-api-type]
[--openai-api-version] [--openai-api-deployment-id]
[--openai-organization-id] [--model-settings-file]
[--model-metadata-file]
[--verify-ssl | --no-verify-ssl] [--edit-format]
[--architect] [--weak-model] [--editor-model]
[--editor-edit-format]
usage: aider [-h] [--model] [--opus] [--sonnet] [--haiku] [--4]
[--4o] [--mini] [--4-turbo] [--35turbo] [--deepseek]
[--o1-mini] [--o1-preview] [--openai-api-key]
[--anthropic-api-key] [--openai-api-base]
[--openai-api-type] [--openai-api-version]
[--openai-api-deployment-id] [--openai-organization-id]
[--set-env] [--api-key] [--list-models]
[--model-settings-file] [--model-metadata-file]
[--alias] [--verify-ssl | --no-verify-ssl] [--timeout]
[--edit-format] [--architect] [--weak-model]
[--editor-model] [--editor-edit-format]
[--show-model-warnings | --no-show-model-warnings]
[--max-chat-history-tokens] [--env-file]
[--max-chat-history-tokens]
[--cache-prompts | --no-cache-prompts]
[--cache-keepalive-pings] [--map-tokens]
[--map-refresh] [--map-multiplier-no-files]
@@ -59,18 +57,27 @@ usage: aider [-h] [--openai-api-key] [--anthropic-api-key] [--model]
[--attribute-commit-message-author | --no-attribute-commit-message-author]
[--attribute-commit-message-committer | --no-attribute-commit-message-committer]
[--commit] [--commit-prompt] [--dry-run | --no-dry-run]
[--skip-sanity-check-repo] [--lint] [--lint-cmd]
[--auto-lint | --no-auto-lint] [--test-cmd]
[--auto-test | --no-auto-test] [--test] [--file]
[--read] [--vim] [--chat-language] [--version]
[--just-check-update]
[--skip-sanity-check-repo]
[--watch-files | --no-watch-files] [--lint]
[--lint-cmd] [--auto-lint | --no-auto-lint]
[--test-cmd] [--auto-test | --no-auto-test] [--test]
[--analytics | --no-analytics] [--analytics-log]
[--analytics-disable] [--just-check-update]
[--check-update | --no-check-update]
[--install-main-branch] [--upgrade] [--apply]
[--yes-always] [-v] [--show-repo-map] [--show-prompts]
[--exit] [--message] [--message-file] [--encoding] [-c]
[--gui]
[--show-release-notes | --no-show-release-notes]
[--install-main-branch] [--upgrade] [--version]
[--message] [--message-file]
[--gui | --no-gui | --browser | --no-browser]
[--copy-paste | --no-copy-paste] [--apply]
[--apply-clipboard-edits] [--exit] [--show-repo-map]
[--show-prompts] [--voice-format] [--voice-language]
[--voice-input-device] [--file] [--read] [--vim]
[--chat-language] [--yes-always] [-v] [--load]
[--encoding] [-c] [--env-file]
[--suggest-shell-commands | --no-suggest-shell-commands]
[--voice-format] [--voice-language]
[--fancy-input | --no-fancy-input]
[--multiline | --no-multiline]
[--detect-urls | --no-detect-urls] [--editor]
```
@@ -82,15 +89,7 @@ Aliases:
- `-h`
- `--help`
## Main:
### `--openai-api-key OPENAI_API_KEY`
Specify the OpenAI API key
Environment variable: `OPENAI_API_KEY`
### `--anthropic-api-key ANTHROPIC_API_KEY`
Specify the Anthropic API key
Environment variable: `ANTHROPIC_API_KEY`
## Main model:
### `--model MODEL`
Specify the model to use for the main chat
@@ -101,9 +100,13 @@ Use claude-3-opus-20240229 model for the main chat
Environment variable: `AIDER_OPUS`
### `--sonnet`
Use anthropic/claude-3-5-sonnet-20241022 model for the main chat
Use claude-3-5-sonnet-20241022 model for the main chat
Environment variable: `AIDER_SONNET`
### `--haiku`
Use claude-3-5-haiku-20241022 model for the main chat
Environment variable: `AIDER_HAIKU`
### `--4`
Use gpt-4-0613 model for the main chat
Environment variable: `AIDER_4`
@@ -112,7 +115,7 @@ Aliases:
- `-4`
### `--4o`
Use gpt-4o-2024-08-06 model for the main chat
Use gpt-4o model for the main chat
Environment variable: `AIDER_4O`
### `--mini`
@@ -144,7 +147,47 @@ Environment variable: `AIDER_O1_MINI`
Use o1-preview model for the main chat
Environment variable: `AIDER_O1_PREVIEW`
## Model Settings:
## API Keys and settings:
### `--openai-api-key VALUE`
Specify the OpenAI API key
Environment variable: `AIDER_OPENAI_API_KEY`
### `--anthropic-api-key VALUE`
Specify the Anthropic API key
Environment variable: `AIDER_ANTHROPIC_API_KEY`
### `--openai-api-base VALUE`
Specify the api base url
Environment variable: `AIDER_OPENAI_API_BASE`
### `--openai-api-type VALUE`
(deprecated, use --set-env OPENAI_API_TYPE=<value>)
Environment variable: `AIDER_OPENAI_API_TYPE`
### `--openai-api-version VALUE`
(deprecated, use --set-env OPENAI_API_VERSION=<value>)
Environment variable: `AIDER_OPENAI_API_VERSION`
### `--openai-api-deployment-id VALUE`
(deprecated, use --set-env OPENAI_API_DEPLOYMENT_ID=<value>)
Environment variable: `AIDER_OPENAI_API_DEPLOYMENT_ID`
### `--openai-organization-id VALUE`
(deprecated, use --set-env OPENAI_ORGANIZATION=<value>)
Environment variable: `AIDER_OPENAI_ORGANIZATION_ID`
### `--set-env ENV_VAR_NAME=value`
Set an environment variable (to control API settings, can be used multiple times)
Default: []
Environment variable: `AIDER_SET_ENV`
### `--api-key PROVIDER=KEY`
Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
Default: []
Environment variable: `AIDER_API_KEY`
## Model settings:
### `--list-models MODEL`
List known models which match the (partial) MODEL name
@@ -153,26 +196,6 @@ Aliases:
- `--list-models MODEL`
- `--models MODEL`
### `--openai-api-base OPENAI_API_BASE`
Specify the api base url
Environment variable: `OPENAI_API_BASE`
### `--openai-api-type OPENAI_API_TYPE`
Specify the api_type
Environment variable: `OPENAI_API_TYPE`
### `--openai-api-version OPENAI_API_VERSION`
Specify the api_version
Environment variable: `OPENAI_API_VERSION`
### `--openai-api-deployment-id OPENAI_API_DEPLOYMENT_ID`
Specify the deployment_id
Environment variable: `OPENAI_API_DEPLOYMENT_ID`
### `--openai-organization-id OPENAI_ORGANIZATION_ID`
Specify the OpenAI organization ID
Environment variable: `OPENAI_ORGANIZATION_ID`
### `--model-settings-file MODEL_SETTINGS_FILE`
Specify a file with aider model settings for unknown models
Default: .aider.model.settings.yml
@@ -183,6 +206,10 @@ Specify a file with context window and costs for unknown models
Default: .aider.model.metadata.json
Environment variable: `AIDER_MODEL_METADATA_FILE`
### `--alias ALIAS:MODEL`
Add a model alias (can be used multiple times)
Environment variable: `AIDER_ALIAS`
### `--verify-ssl`
Verify the SSL cert when connecting to models (default: True)
Default: True
@@ -191,6 +218,10 @@ Aliases:
- `--verify-ssl`
- `--no-verify-ssl`
### `--timeout VALUE`
Timeout in seconds for API calls (default: None)
Environment variable: `AIDER_TIMEOUT`
### `--edit-format EDIT_FORMAT`
Specify what edit format the LLM should use (default depends on model)
Environment variable: `AIDER_EDIT_FORMAT`
@@ -226,12 +257,7 @@ Aliases:
Soft limit on tokens for chat history, after which summarization begins. If unspecified, defaults to the model's max_chat_history_tokens.
Environment variable: `AIDER_MAX_CHAT_HISTORY_TOKENS`
### `--env-file ENV_FILE`
Specify the .env file to load (default: .env in git root)
Default: .env
Environment variable: `AIDER_ENV_FILE`
## Cache Settings:
## Cache settings:
### `--cache-prompts`
Enable caching of prompts (default: False)
@@ -246,7 +272,7 @@ Number of times to ping at 5min intervals to keep prompt cache warm (default: 0)
Default: 0
Environment variable: `AIDER_CACHE_KEEPALIVE_PINGS`
## Repomap Settings:
## Repomap settings:
### `--map-tokens VALUE`
Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)
@@ -286,7 +312,7 @@ Aliases:
Log the conversation with the LLM to this file (for example, .aider.llm.history)
Environment variable: `AIDER_LLM_HISTORY_FILE`
## Output Settings:
## Output settings:
### `--dark-mode`
Use colors suitable for a dark terminal background (default: False)
@@ -364,7 +390,7 @@ Show diffs when committing changes (default: False)
Default: False
Environment variable: `AIDER_SHOW_DIFFS`
## Git Settings:
## Git settings:
### `--git`
Enable/disable looking for a git repo (default: True)
@@ -462,6 +488,14 @@ Skip the sanity check for the git repository (default: False)
Default: False
Environment variable: `AIDER_SKIP_SANITY_CHECK_REPO`
### `--watch-files`
Enable/disable watching files for ai coding comments (default: False)
Default: False
Environment variable: `AIDER_WATCH_FILES`
Aliases:
- `--watch-files`
- `--no-watch-files`
## Fixing and committing:
### `--lint`
@@ -496,11 +530,142 @@ Aliases:
- `--no-auto-test`
### `--test`
Run tests and fix problems found
Run tests, fix problems found and then exit
Default: False
Environment variable: `AIDER_TEST`
## Other Settings:
## Analytics:
### `--analytics`
Enable/disable analytics for current session (default: random)
Environment variable: `AIDER_ANALYTICS`
Aliases:
- `--analytics`
- `--no-analytics`
### `--analytics-log ANALYTICS_LOG_FILE`
Specify a file to log analytics events
Environment variable: `AIDER_ANALYTICS_LOG`
### `--analytics-disable`
Permanently disable analytics
Default: False
Environment variable: `AIDER_ANALYTICS_DISABLE`
## Upgrading:
### `--just-check-update`
Check for updates and return status in the exit code
Default: False
Environment variable: `AIDER_JUST_CHECK_UPDATE`
### `--check-update`
Check for new aider versions on launch
Default: True
Environment variable: `AIDER_CHECK_UPDATE`
Aliases:
- `--check-update`
- `--no-check-update`
### `--show-release-notes`
Show release notes on first run of new version (default: None, ask user)
Environment variable: `AIDER_SHOW_RELEASE_NOTES`
Aliases:
- `--show-release-notes`
- `--no-show-release-notes`
### `--install-main-branch`
Install the latest version from the main branch
Default: False
Environment variable: `AIDER_INSTALL_MAIN_BRANCH`
### `--upgrade`
Upgrade aider to the latest version from PyPI
Default: False
Environment variable: `AIDER_UPGRADE`
Aliases:
- `--upgrade`
- `--update`
### `--version`
Show the version number and exit
## Modes:
### `--message COMMAND`
Specify a single message to send the LLM, process reply then exit (disables chat mode)
Environment variable: `AIDER_MESSAGE`
Aliases:
- `--message COMMAND`
- `--msg COMMAND`
- `-m COMMAND`
### `--message-file MESSAGE_FILE`
Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
Environment variable: `AIDER_MESSAGE_FILE`
Aliases:
- `--message-file MESSAGE_FILE`
- `-f MESSAGE_FILE`
### `--gui`
Run aider in your browser (default: False)
Default: False
Environment variable: `AIDER_GUI`
Aliases:
- `--gui`
- `--no-gui`
- `--browser`
- `--no-browser`
### `--copy-paste`
Enable automatic copy/paste of chat between aider and web UI (default: False)
Default: False
Environment variable: `AIDER_COPY_PASTE`
Aliases:
- `--copy-paste`
- `--no-copy-paste`
### `--apply FILE`
Apply the changes from the given file instead of running the chat (debug)
Environment variable: `AIDER_APPLY`
### `--apply-clipboard-edits`
Apply clipboard contents as edits using the main model's editor format
Default: False
Environment variable: `AIDER_APPLY_CLIPBOARD_EDITS`
### `--exit`
Do all startup activities then exit before accepting user input (debug)
Default: False
Environment variable: `AIDER_EXIT`
### `--show-repo-map`
Print the repo map and exit (debug)
Default: False
Environment variable: `AIDER_SHOW_REPO_MAP`
### `--show-prompts`
Print the system prompts and exit (debug)
Default: False
Environment variable: `AIDER_SHOW_PROMPTS`
## Voice settings:
### `--voice-format VOICE_FORMAT`
Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
Default: wav
Environment variable: `AIDER_VOICE_FORMAT`
### `--voice-language VOICE_LANGUAGE`
Specify the language for voice using ISO 639-1 code (default: auto)
Default: en
Environment variable: `AIDER_VOICE_LANGUAGE`
### `--voice-input-device VOICE_INPUT_DEVICE`
Specify the input device name for voice recording
Environment variable: `AIDER_VOICE_INPUT_DEVICE`
## Other settings:
### `--file FILE`
specify a file to edit (can be used multiple times)
@@ -519,39 +684,6 @@ Environment variable: `AIDER_VIM`
Specify the language to use in the chat (default: None, uses system settings)
Environment variable: `AIDER_CHAT_LANGUAGE`
### `--version`
Show the version number and exit
### `--just-check-update`
Check for updates and return status in the exit code
Default: False
Environment variable: `AIDER_JUST_CHECK_UPDATE`
### `--check-update`
Check for new aider versions on launch
Default: True
Environment variable: `AIDER_CHECK_UPDATE`
Aliases:
- `--check-update`
- `--no-check-update`
### `--install-main-branch`
Install the latest version from the main branch
Default: False
Environment variable: `AIDER_INSTALL_MAIN_BRANCH`
### `--upgrade`
Upgrade aider to the latest version from PyPI
Default: False
Environment variable: `AIDER_UPGRADE`
Aliases:
- `--upgrade`
- `--update`
### `--apply FILE`
Apply the changes from the given file instead of running the chat (debug)
Environment variable: `AIDER_APPLY`
### `--yes-always`
Always say yes to every confirmation
Environment variable: `AIDER_YES_ALWAYS`
@@ -564,35 +696,9 @@ Aliases:
- `-v`
- `--verbose`
### `--show-repo-map`
Print the repo map and exit (debug)
Default: False
Environment variable: `AIDER_SHOW_REPO_MAP`
### `--show-prompts`
Print the system prompts and exit (debug)
Default: False
Environment variable: `AIDER_SHOW_PROMPTS`
### `--exit`
Do all startup activities then exit before accepting user input (debug)
Default: False
Environment variable: `AIDER_EXIT`
### `--message COMMAND`
Specify a single message to send the LLM, process reply then exit (disables chat mode)
Environment variable: `AIDER_MESSAGE`
Aliases:
- `--message COMMAND`
- `--msg COMMAND`
- `-m COMMAND`
### `--message-file MESSAGE_FILE`
Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
Environment variable: `AIDER_MESSAGE_FILE`
Aliases:
- `--message-file MESSAGE_FILE`
- `-f MESSAGE_FILE`
### `--load LOAD_FILE`
Load and execute /commands from a file on launch
Environment variable: `AIDER_LOAD`
### `--encoding VALUE`
Specify the encoding for input and output (default: utf-8)
@@ -605,13 +711,10 @@ Aliases:
- `-c CONFIG_FILE`
- `--config CONFIG_FILE`
### `--gui`
Run aider in your browser
Default: False
Environment variable: `AIDER_GUI`
Aliases:
- `--gui`
- `--browser`
### `--env-file ENV_FILE`
Specify the .env file to load (default: .env in git root)
Default: .env
Environment variable: `AIDER_ENV_FILE`
### `--suggest-shell-commands`
Enable/disable suggesting shell commands (default: True)
@@ -621,15 +724,31 @@ Aliases:
- `--suggest-shell-commands`
- `--no-suggest-shell-commands`
## Voice Settings:
### `--fancy-input`
Enable/disable fancy input with history and completion (default: True)
Default: True
Environment variable: `AIDER_FANCY_INPUT`
Aliases:
- `--fancy-input`
- `--no-fancy-input`
### `--voice-format VOICE_FORMAT`
Audio format for voice recording (default: wav). webm and mp3 require ffmpeg
Default: wav
Environment variable: `AIDER_VOICE_FORMAT`
### `--multiline`
Enable/disable multi-line input mode with Meta-Enter to submit (default: False)
Default: False
Environment variable: `AIDER_MULTILINE`
Aliases:
- `--multiline`
- `--no-multiline`
### `--voice-language VOICE_LANGUAGE`
Specify the language for voice using ISO 639-1 code (default: auto)
Default: en
Environment variable: `AIDER_VOICE_LANGUAGE`
### `--detect-urls`
Enable/disable detection and offering to add URLs to chat (default: True)
Default: True
Environment variable: `AIDER_DETECT_URLS`
Aliases:
- `--detect-urls`
- `--no-detect-urls`
### `--editor VALUE`
Specify which editor to use for the /editor command
Environment variable: `AIDER_EDITOR`
<!--[[[end]]]-->

View File

@@ -30,7 +30,7 @@ current chat to build a compact
Adding a bunch of files that are mostly irrelevant to the
task at hand will often distract or confuse the LLM.
The LLM will give worse coding results, and sometimese even fail to correctly edit files.
Addings extra files will also increase the token costs on your OpenAI invoice.
Addings extra files will also increase your token costs.
Again, it's usually best to just add the files to the chat that will need to be modified.
If you still wish to add lots of files to the chat, you can:
@@ -60,6 +60,23 @@ directory you start in.
You can also create a `.aiderignore` file to tell aider
to ignore parts of the repo that aren't relevant to your task.
This file conforms to `.gitignore` syntax and conventions.
For example, to focus only on specific directories in a monorepo,
you could create a `.aiderignore` file with:
```
# Ignore everything
/*
# Allow specific directories and their contents
!foo/
!bar/
!baz/
# Allow nested files under these directories
!foo/**
!bar/**
!baz/**
```
You can use `--aiderignore <filename>` to name a specific file
to use for ignore patterns.
@@ -150,10 +167,12 @@ python -m aider
## Can I change the system prompts that aider uses?
Aider is set up to support different system prompts and edit formats
The most convenient way to add custom instructions is to use a
[conventions file](https://aider.chat/docs/usage/conventions.html).
But, aider is set up to support different actual system prompts and edit formats
in a modular way. If you look in the `aider/coders` subdirectory, you'll
see there's a base coder with base prompts, and then there are
a number of
@@ -190,6 +209,69 @@ all the raw information being sent to/from the LLM in the conversation.
You can also refer to the
[instructions for installing a development version of aider](https://aider.chat/docs/install/optional.html#install-the-development-version-of-aider).
## What LLMs do you use to build aider?
Aider writes a lot of its own code, usually about 70% of the new code in each
release.
People often ask which LLMs I use with aider, when writing aider.
Below is a table showing the models I have used recently,
extracted from the
[public log](https://github.com/aider-ai/aider/blob/main/aider/website/assets/sample-analytics.jsonl)
of my
[aider analytics](https://aider.chat/docs/more/analytics.html).
<!--[[[cog
import sys
sys.path.append(".")
import scripts.my_models as my_models
stats = my_models.collect_model_stats()
html = my_models.format_html_table(stats)
cog.out(html)
]]]-->
<style>
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px; text-align: left; border-bottom: 1px solid #ddd; }
th { background-color: #f2f2f2; }
tr:hover { background-color: #f5f5f5; }
.right { text-align: right; }
</style>
<table>
<tr><th>Model Name</th><th class='right'>Total Tokens</th><th class='right'>Percent</th></tr>
<tr><td>claude-3-5-sonnet-20241022</td><td class='right'>1,630,102</td><td class='right'>88.9%</td></tr>
<tr><td>o1-preview</td><td class='right'>83,782</td><td class='right'>4.6%</td></tr>
<tr><td>gemini/REDACTED</td><td class='right'>82,572</td><td class='right'>4.5%</td></tr>
<tr><td>deepseek/deepseek-coder</td><td class='right'>24,628</td><td class='right'>1.3%</td></tr>
<tr><td>gpt-4o</td><td class='right'>9,243</td><td class='right'>0.5%</td></tr>
<tr><td>gpt-4o-mini</td><td class='right'>3,420</td><td class='right'>0.2%</td></tr>
<tr><td>mistral/REDACTED</td><td class='right'>620</td><td class='right'>0.0%</td></tr>
</table>
{: .note :}
Some models show as REDACTED, because they are new or unpopular models.
Aider's analytics only records the names of "well known" LLMs.
<!--[[[end]]]-->
## How are the "aider wrote xx% of code" stats computed?
[Aider is tightly integrated with git](/docs/git.html) so all
of aider's code changes are committed to the repo with proper attribution.
The
[stats are computed](https://github.com/Aider-AI/aider/blob/main/scripts/blame.py)
by doing something like `git blame` on the repo,
and counting up who wrote all the new lines of code in each release.
Only lines in source code files are counted, not documentation or prompt files.
## Why is the LLM speaking to me in an unexpected language?
Aider goes to some effort to prompt the model to use the language that is configured
for your system.
But LLMs aren't fully reliable, and they sometimes decide to speak in
an unexpected language.
Claude is especially fond of speaking French.
You can explicitly set the language that aider tells the model to use with
`--chat-language <language>`.
But the LLM may not comply.
## Can I share my aider chat transcript?
@@ -213,6 +295,15 @@ This will give you a URL like this, which shows the chat history like you'd see
https://aider.chat/share/?mdurl=https://gist.github.com/Aider-AI/2087ab8b64034a078c0a209440ac8be0
```
## Can I edit files myself while aider is running?
Yes. Aider always reads the latest copy of files from the file
system when you send each message.
While you're waiting for aider's reply to complete, it's probably unwise to
edit files that you've added to the chat.
Your edits and aider's edits might conflict.
## What is Aider AI LLC?
Aider AI LLC is the company behind the aider AI coding tool.
@@ -220,3 +311,7 @@ Aider is
[open source and available on GitHub](https://github.com/Aider-AI/aider)
under an
[Apache 2.0 license](https://github.com/Aider-AI/aider/blob/main/LICENSE.txt).
<div style="height:80vh"></div>

View File

@@ -1,6 +1,6 @@
---
parent: More info
nav_order: 800
nav_order: 100
description: Aider is tightly integrated with git.
---
@@ -22,9 +22,16 @@ This keeps your edits separate from aider's edits, and makes sure you never lose
## In-chat commands
Aider also allows you to use in-chat commands to `/diff` or `/undo` the last change.
To do more complex management of your git history, you cat use raw `git` commands,
either by using `/git` within the chat, or with standard git tools outside of aider.
Aider also allows you to use
[in-chat commands](/docs/usage/commands.html)
to perform git operations:
- `/diff` will show all the file changes since the last message you sent.
- `/undo` will undo and discard the last change.
- `/commit` to commit all dirty changes with a sensible commit message.
- `/git` will let you run raw git commands to do more complex management of your git history.
You can also manage your git history outside of aider with your preferred git tools.
## Disabling git integration
@@ -36,6 +43,8 @@ While it is not recommended, you can disable aider's use of git in a few ways:
## Commit messages
Aider sends the `--weak-model` a copy of the diffs and the chat history
and asks it to produce a commit message.
By default, aider creates commit messages which follow
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
@@ -45,6 +54,7 @@ with the `--commit-prompt` option.
You can place that on the command line, or
[configure it via a config file or environment variables](https://aider.chat/docs/config.html).
## Commit attribution
Aider marks commits that it either authored or committed.

View File

@@ -5,41 +5,84 @@ nav_order: 20
description: How to install and get started pair programming with aider.
---
# Quick start
# Installation
{: .no_toc }
## Get started quickly with aider-install
{% include get-started.md %}
Or see the
[full installation instructions](/docs/install/install.html)
for more details,
or the
[usage instructions](https://aider.chat/docs/usage.html) to start coding with aider.
If needed,
aider-install will automatically install a separate version of python3.12 to use with aider.
There are some [optional install steps](/docs/install/optional.html) you could consider.
See the [usage instructions](https://aider.chat/docs/usage.html) to start coding with aider.
## Install with uv
A recommended way to install aider is with uv:
```bash
python -m pip install uv # If you need to install uv
uv tool install --python python3.12 aider-chat
```
You can use uv to install aider with your existing python versions 3.8-3.13.
If needed,
uv will automatically install a separate version of python3.12 to use with aider.
Also see the
[docs on other methods for installing uv itself](https://docs.astral.sh/uv/getting-started/installation/).
## Install with pipx
A recommended way to install aider is with pipx:
```bash
python -m pip install pipx # If you need to install pipx
pipx install aider-chat
```
You can use pipx to install aider with python versions 3.9-3.12.
Also see the
[docs on other methods for installing pipx itself](https://pipx.pypa.io/stable/installation/).
## Install with pip
You can directly install aider with pip, but one of the above
methods is usually safer.
If you do install with pip, you should consider
using a
[virtual environment](https://docs.python.org/3/library/venv.html)
to keep aider's dependencies separated.
You can use pip to install aider with python versions 3.9-3.12.
```bash
# Install aider
python -m pip install -U --upgrade-strategy only-if-needed aider-chat
# To work with GPT-4o:
aider --4o --openai-api-key sk-xxx...
# To work with Claude 3.5 Sonnet:
aider --sonnet --anthropic-api-key sk-xxx...
```
{% include python-m-aider.md %}
<div class="video-container">
<video controls poster="/assets/install.jpg">
<source src="/assets/install.mp4" type="video/mp4">
<a href="/assets/install.mp4">Installing aider</a>
</video>
</div>
## Installing with package managers
<style>
.video-container {
position: relative;
padding-bottom: 76.2711864407%;
height: 0;
overflow: hidden;
}
.video-container video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
It's best to install aider using aider-install, uv or pipx as described above.
While aider is available in a number of system package managers,
they often install aider with incorrect dependencies.
## Next steps...
There are some [optional install steps](/docs/install/optional.html) you could consider.
See the [usage instructions](https://aider.chat/docs/usage.html) to start coding with aider.

View File

@@ -8,9 +8,9 @@ nav_order: 900
You can use aider in GitHub Codespaces via the built-in Terminal pane.
See below for an example,
but you can see the
but you can just follow the
[main install instructions](/docs/install.html)
for all the details.
inside your codespace terminal.
<div class="video-container">

View File

@@ -1,66 +0,0 @@
---
parent: Installation
nav_order: 10
---
# Installing aider
{: .no_toc }
- TOC
{:toc}
## Install git
Make sure you have git installed.
Here are
[instructions for installing git in various environments](https://github.com/git-guides/install-git).
## Get your API key
To work with OpenAI's models like GPT-4o or GPT-3.5 you need a paid
[OpenAI API key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key).
Note that this is different than being a "ChatGPT Plus" subscriber.
To work with Anthropic's models like Claude 3.5 Sonnet you need a paid
[Anthropic API key](https://docs.anthropic.com/claude/reference/getting-started-with-the-api).
{% include venv-pipx.md %}
## Mac/Linux install
```
# Install aider
python -m pip install -U --upgrade-strategy only-if-needed aider-chat
# To work with GPT-4o:
$ aider --4o --openai-api-key sk-xxx...
# To work with Claude 3.5 Sonnet:
$ aider --sonnet --anthropic-api-key sk-xxx...
```
## Windows install
```
# Install aider
python -m pip install -U --upgrade-strategy only-if-needed aider-chat
# To work with GPT-4o:
$ aider --4o --openai-api-key sk-xxx...
# To work with Claude 3.5 Sonnet:
$ aider --sonnet --anthropic-api-key sk-xxx...
```
{% include python-m-aider.md %}
## Working with other LLMs
{% include works-best.md %}
## You are done!
There are some [optional install steps](/docs/install/optional.html) you could consider.
See the [usage instructions](https://aider.chat/docs/usage.html) to start coding with aider.

View File

@@ -11,10 +11,29 @@ The steps below are completely optional.
- TOC
{:toc}
## Install git
## Store your api keys
Aider works best if you have git installed.
Here are
[instructions for installing git in various environments](https://github.com/git-guides/install-git).
You can [store your api keys in a .env file](/docs/config/dotenv.html)
## Get your API key
To work with OpenAI's models like GPT-4o or o1-preview you need a paid
[OpenAI API key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key).
Note that this is different than being a "ChatGPT Plus" subscriber.
To work with Anthropic's models like Claude 3.5 Sonnet you need a paid
[Anthropic API key](https://docs.anthropic.com/claude/reference/getting-started-with-the-api).
### Working with other LLMs
{% include works-best.md %}
### Store your api keys
You can [store your api keys in configuration or env files](/docs/config/api-keys.html)
and they will be loaded automatically whenever you run aider.
## Enable Playwright
@@ -53,14 +72,19 @@ Installing PortAudio is completely optional, but can usually be accomplished lik
- For Windows, there is no need to install PortAudio.
- For Mac, do `brew install portaudio`
- For Linux, do `sudo apt-get install libportaudio2`
- Some linux environments may also need `sudo apt install libasound2-plugins`
## Add aider to your editor
## Add aider to your IDE/editor
Other projects have integrated aider into some IDE/editors.
You can use
[aider's `--watch-files` mode](https://aider.chat/docs/usage/watch.html)
to integrate with any IDE or editor.
Other projects have made plugins for various IDE/editors.
It's not clear if they are tracking the latest
versions of aider,
so it may be best to just run the latest
aider in a terminal alongside your editor.
aider in a terminal alongside your editor and use `--watch-files`.
### NeoVim
@@ -70,9 +94,9 @@ aider in a terminal alongside your editor.
### VS Code
joshuavial also confirmed that aider works inside a VS Code terminal window.
Aider detects if it is running inside VSCode and turns off pretty/color output,
since the VSCode terminal doesn't seem to support it well.
You can run aider inside a VS Code terminal window.
There are a number of 3rd party
[aider plugins for VSCode](https://marketplace.visualstudio.com/search?term=aider%20-kodu&target=VSCode&category=All%20categories&sortBy=Relevance).
### Other editors
@@ -84,15 +108,8 @@ please let me know by opening a
## Install the development version of aider
If you want the very latest development version of aider
you can install directly from GitHub:
you can install it like this:
```
python -m pip install --upgrade git+https://github.com/Aider-AI/aider.git
aider --install-main-branch
```
If you've git cloned the aider repository already, you can install "live" from your local copy. This is mostly useful if you are developing aider and want your current modifications to take effect immediately.
```
python -m pip install -e .
```

View File

@@ -1,33 +0,0 @@
---
parent: Installation
nav_order: 100
---
# Install with pipx
If you are using aider to work on a python project, sometimes your project will require
specific versions of python packages which conflict with the versions that aider
requires.
If this happens, the `python -m pip install` command may return errors like these:
```
aider-chat 0.23.0 requires somepackage==X.Y.Z, but you have somepackage U.W.V which is incompatible.
```
You can avoid this problem by installing aider using `pipx`,
which will install it globally on your system
within its own python environment.
This way you can use aider to work on any python project,
even if that project has conflicting dependencies.
Install [pipx](https://pipx.pypa.io/stable/) then just do:
```
pipx install aider-chat
```
## pipx on replit
{% include replit-pipx.md %}

View File

@@ -0,0 +1,8 @@
---
parent: Installation
nav_order: 900
---
### Replit
{% include replit-pipx.md %}

Some files were not shown because too many files have changed in this diff Show More