From e35eba2d51456b19520f3d1353c072f9093598d8 Mon Sep 17 00:00:00 2001 From: Damilola Emmanuel Olowookere Date: Fri, 13 Dec 2024 18:36:10 +0000 Subject: [PATCH 001/102] Update conventions.md to fix url --- aider/website/docs/usage/conventions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/website/docs/usage/conventions.md b/aider/website/docs/usage/conventions.md index 8430b8e20c0..e32feb5ef1a 100644 --- a/aider/website/docs/usage/conventions.md +++ b/aider/website/docs/usage/conventions.md @@ -30,7 +30,7 @@ is enabled. ## Community contributed conventions -You can check the [aider conventions repository[(https://github.com/Aider-AI/conventions) +You can check the [aider conventions repository](https://github.com/Aider-AI/conventions) to find or contribute conventions files. ## Always load conventions From a75c9c74fd4e9e95556b9f25218987a6f2b065e9 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 11:39:37 -0800 Subject: [PATCH 002/102] copy --- HISTORY.md | 2 +- aider/website/HISTORY.md | 2 +- aider/website/assets/sample-analytics.jsonl | 106 ++++++++++---------- 3 files changed, 55 insertions(+), 55 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 3f8ef5fa66e..928a4a9f58e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,6 @@ # Release history -### main branch +### Aider v0.69.0 - [Watch files](https://aider.chat/docs/usage/watch.html) improvements: - Use `# ... AI?` comments to trigger aider and ask questions about your code. diff --git a/aider/website/HISTORY.md b/aider/website/HISTORY.md index fcb8a91e879..9e4bcf74869 100644 --- a/aider/website/HISTORY.md +++ b/aider/website/HISTORY.md @@ -23,7 +23,7 @@ cog.out(text) ]]]--> -### main branch +### Aider v0.69.0 - [Watch files](https://aider.chat/docs/usage/watch.html) improvements: - Use `# ... AI?` comments to trigger aider and ask questions about your code. diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 5e3b644b32e..d4bcbe55edc 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,56 +1,3 @@ -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733695130} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 6798, "completion_tokens": 324, "total_tokens": 7122, "cost": 0.025254, "total_cost": 0.076677}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733695141} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733695162} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 7158, "completion_tokens": 187, "total_tokens": 7345, "cost": 0.024279000000000002, "total_cost": 0.10095599999999999}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733695169} -{"event": "command_clear", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733695204} -{"event": "command_model", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733695210} -{"event": "command_editor", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733695215} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733695243} -{"event": "message_send", "properties": {"main_model": "o1-preview", "weak_model": "gpt-4o-mini", "editor_model": "gpt-4o", "edit_format": "ask", "prompt_tokens": 6453, "completion_tokens": 495, "total_tokens": 6948, "cost": 0.126495, "total_cost": 0.227451}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733695280} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733697093} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733697093} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733697093} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733697983} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733709491} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733709492} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733709492} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733709492} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733710343} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733710344} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733710350} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5751, "completion_tokens": 100, "total_tokens": 5851, "cost": 0.018753000000000002, "total_cost": 0.018753000000000002}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733710354} -{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733710357} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733710465} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733710466} -{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733710470} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754551} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754551} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754551} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754554} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754563} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754565} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754595} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754595} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2174, "completion_tokens": 198, "total_tokens": 2372, "cost": 0.009492, "total_cost": 0.009492}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754602} -{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754611} -{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754611} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754620} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754621} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754621} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754623} -{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754641} -{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754641} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754990} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754990} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733754990} -{"event": "exit", "properties": {"reason": "Completed main CLI coder.run"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755004} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755025} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755025} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755025} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755030} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755037} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755037} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 1536, "completion_tokens": 278, "total_tokens": 1814, "cost": 0.008778000000000001, "total_cost": 0.008778000000000001}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755045} {"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755403} {"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755404} {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 1758, "completion_tokens": 592, "total_tokens": 2350, "cost": 0.014154, "total_cost": 0.022932}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755417} @@ -998,3 +945,56 @@ {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734106476} {"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734106476} {"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734106476} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734107079} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734107080} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734107080} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734107990} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734107992} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734107992} +{"event": "command_tokens", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734107992} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108004} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108004} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108014} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108016} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108016} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108227} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108229} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108229} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108265} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108265} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108282} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 4371, "completion_tokens": 941, "total_tokens": 5312, "cost": 0.027228000000000002, "total_cost": 0.027228000000000002}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108288} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108312} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 7385, "completion_tokens": 182, "total_tokens": 7567, "cost": 0.024885, "total_cost": 0.05211300000000001}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108319} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108320} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 7775, "completion_tokens": 861, "total_tokens": 8636, "cost": 0.03624, "total_cost": 0.08835300000000001}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108342} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108351} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8453, "completion_tokens": 227, "total_tokens": 8680, "cost": 0.028763999999999998, "total_cost": 0.11711700000000001}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108357} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108380} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8751, "completion_tokens": 1483, "total_tokens": 10234, "cost": 0.048498, "total_cost": 0.165615}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108412} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108822} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108822} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734108822} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734111461} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734111463} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734111465} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734111465} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734111476} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734111476} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734111476} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734111476} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 6454, "completion_tokens": 320, "total_tokens": 6774, "cost": 0.024162000000000003, "total_cost": 0.024162000000000003}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734111486} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734111491} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734112463} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734112466} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734112466} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734112478} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734112478} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116151} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116153} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116153} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116167} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116167} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116167} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116167} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 6362, "completion_tokens": 320, "total_tokens": 6682, "cost": 0.023885999999999998, "total_cost": 0.023885999999999998}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116176} From cad661f0c8f8fe6be49497250fc6c9216e8a9c2d Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 11:40:25 -0800 Subject: [PATCH 003/102] version bump to 0.69.0 --- aider/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/__init__.py b/aider/__init__.py index ee4f19d9564..4db6b9eee8c 100644 --- a/aider/__init__.py +++ b/aider/__init__.py @@ -1,6 +1,6 @@ from packaging import version -__version__ = "0.68.1.dev" +__version__ = "0.69.0" safe_version = __version__ try: From 29471b8019cb7b39484444a9222fd85d39be571f Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 11:42:00 -0800 Subject: [PATCH 004/102] set version to 0.69.1.dev --- aider/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/__init__.py b/aider/__init__.py index 4db6b9eee8c..fd94a76a92e 100644 --- a/aider/__init__.py +++ b/aider/__init__.py @@ -1,6 +1,6 @@ from packaging import version -__version__ = "0.69.0" +__version__ = "0.69.1.dev" safe_version = __version__ try: From 12c0f675ce9486d285dadbbc572a8b13a464d215 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 11:46:44 -0800 Subject: [PATCH 005/102] copy --- HISTORY.md | 2 +- aider/website/HISTORY.md | 2 +- aider/website/assets/sample-analytics.jsonl | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 928a4a9f58e..46ec12b0b48 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -14,7 +14,7 @@ - Ask 5% of users if they want to opt-in to analytics. - `/voice` now lets you edit the transcribed text before sending. - Disabled auto-complete in Y/N prompts. -- Aider wrote 60% of the code in this release. +- Aider wrote 68% of the code in this release. ### Aider v0.68.0 diff --git a/aider/website/HISTORY.md b/aider/website/HISTORY.md index 9e4bcf74869..73d930589f3 100644 --- a/aider/website/HISTORY.md +++ b/aider/website/HISTORY.md @@ -37,7 +37,7 @@ cog.out(text) - Ask 5% of users if they want to opt-in to analytics. - `/voice` now lets you edit the transcribed text before sending. - Disabled auto-complete in Y/N prompts. -- Aider wrote 60% of the code in this release. +- Aider wrote 68% of the code in this release. ### Aider v0.68.0 diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index d4bcbe55edc..c5eb7f20fde 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,6 +1,3 @@ -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755403} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755404} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 1758, "completion_tokens": 592, "total_tokens": 2350, "cost": 0.014154, "total_cost": 0.022932}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755417} {"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755493} {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2163, "completion_tokens": 617, "total_tokens": 2780, "cost": 0.015744, "total_cost": 0.038676}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755506} {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733755942} @@ -998,3 +995,6 @@ {"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116167} {"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116167} {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 6362, "completion_tokens": 320, "total_tokens": 6682, "cost": 0.023885999999999998, "total_cost": 0.023885999999999998}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734116176} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734118899} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734118899} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734118899} From cd79f479e9ac04c0916fea66889b0d2ec472ac54 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 11:48:14 -0800 Subject: [PATCH 006/102] copy --- aider/website/_data/blame.yml | 79 ++++++++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 16 deletions(-) diff --git a/aider/website/_data/blame.yml b/aider/website/_data/blame.yml index 99b22455977..c6d9162724d 100644 --- a/aider/website/_data/blame.yml +++ b/aider/website/_data/blame.yml @@ -3252,8 +3252,8 @@ Philippe de Reynal: 30 start_tag: v0.65.0 total_lines: 703 -- aider_percentage: 65.29 - aider_total: 457 +- aider_percentage: 67.86 + aider_total: 437 end_date: '2024-12-06' end_tag: v0.67.0 file_counts: @@ -3314,18 +3314,12 @@ tests/browser/test_browser.py: Paul Gauthier: 2 Paul Gauthier (aider): 1 - tests/fixtures/watch.js: - Paul Gauthier: 19 - Paul Gauthier (aider): 16 - tests/fixtures/watch.py: - Paul Gauthier: 17 - Paul Gauthier (aider): 4 grand_total: - Paul Gauthier: 243 - Paul Gauthier (aider): 457 + Paul Gauthier: 207 + Paul Gauthier (aider): 437 start_tag: v0.66.0 - total_lines: 700 -- aider_percentage: 71.21 + total_lines: 644 +- aider_percentage: 71.57 aider_total: 428 end_date: '2024-12-10' end_tag: v0.68.0 @@ -3403,10 +3397,63 @@ Paul Gauthier (aider): 1 tests/basic/test_watch.py: Paul Gauthier: 1 - tests/fixtures/watch.js: - Paul Gauthier: 3 grand_total: - Paul Gauthier: 173 + Paul Gauthier: 170 Paul Gauthier (aider): 428 start_tag: v0.67.0 - total_lines: 601 + total_lines: 598 +- aider_percentage: 67.87 + aider_total: 207 + end_date: '2024-12-13' + end_tag: v0.69.0 + file_counts: + .github/workflows/pages.yml: + Paul Gauthier: 2 + aider/__init__.py: + Paul Gauthier: 1 + aider/analytics.py: + Paul Gauthier: 2 + aider/args.py: + Mir Adnan ALI: 3 + Paul Gauthier: 1 + aider/coders/base_coder.py: + JeongJuhyeon: 1 + Mir Adnan ALI: 3 + aider/commands.py: + Mir Adnan ALI: 4 + Paul Gauthier: 5 + Paul Gauthier (aider): 3 + aider/io.py: + Mir Adnan ALI: 37 + Paul Gauthier: 8 + Paul Gauthier (aider): 3 + aider/main.py: + Mir Adnan ALI: 1 + aider/models.py: + Paul Gauthier: 7 + aider/watch.py: + Paul Gauthier: 7 + Paul Gauthier (aider): 47 + aider/website/docs/leaderboards/index.md: + Paul Gauthier: 1 + benchmark/benchmark.py: + Paul Gauthier: 7 + Paul Gauthier (aider): 7 + scripts/blame.py: + Paul Gauthier (aider): 1 + scripts/issues.py: + Paul Gauthier (aider): 58 + scripts/update-history.py: + Paul Gauthier: 3 + tests/basic/test_io.py: + Paul Gauthier (aider): 20 + tests/basic/test_watch.py: + Paul Gauthier: 5 + Paul Gauthier (aider): 68 + grand_total: + JeongJuhyeon: 1 + Mir Adnan ALI: 48 + Paul Gauthier: 49 + Paul Gauthier (aider): 207 + start_tag: v0.68.0 + total_lines: 305 From 2f5d6bf909e03a32c6b06305cfc56920ad87b2e9 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 11:49:14 -0800 Subject: [PATCH 007/102] feat: Take version as optional arg for blame script --- scripts/update-blame.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/update-blame.sh b/scripts/update-blame.sh index 4615ed2fdbc..6d557e40981 100755 --- a/scripts/update-blame.sh +++ b/scripts/update-blame.sh @@ -3,4 +3,5 @@ # exit when any command fails set -e +# take a version as an optional command line arg; use v0.1.0 if not provided AI! ./scripts/blame.py v0.1.0 --all --output aider/website/_data/blame.yml From b3e9a2fedeca6ec7b88561fb2ba73a37382e7e0f Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 11:49:15 -0800 Subject: [PATCH 008/102] feat: Allow version arg for blame script, default to v0.1.0 --- scripts/update-blame.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/update-blame.sh b/scripts/update-blame.sh index 6d557e40981..d4796b355ab 100755 --- a/scripts/update-blame.sh +++ b/scripts/update-blame.sh @@ -3,5 +3,6 @@ # exit when any command fails set -e -# take a version as an optional command line arg; use v0.1.0 if not provided AI! -./scripts/blame.py v0.1.0 --all --output aider/website/_data/blame.yml +# Use first argument as version if provided, otherwise default to v0.1.0 +VERSION=${1:-v0.1.0} +./scripts/blame.py "$VERSION" --all --output aider/website/_data/blame.yml From 1ad3ee0aecb000b876e12197e0bedf791027da84 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 12:30:59 -0800 Subject: [PATCH 009/102] feat: Add my_models.py script --- scripts/my_models.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 scripts/my_models.py diff --git a/scripts/my_models.py b/scripts/my_models.py new file mode 100644 index 00000000000..e69de29bb2d From 8217ee1bbb31b76e03ef1da9bc80db099e75473c Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 12:30:59 -0800 Subject: [PATCH 010/102] feat: Add script to analyze model token usage --- scripts/my_models.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/scripts/my_models.py b/scripts/my_models.py index e69de29bb2d..1f42fa6b25b 100644 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 + +import json +import os +from collections import defaultdict +from pathlib import Path + +# Get the analytics file path +analytics_path = Path.home() / '.aider' / 'analytics.jsonl' + +# Dictionary to store model stats +model_stats = defaultdict(int) + +# Read and process the file +with open(analytics_path) as f: + for line in f: + try: + event = json.loads(line) + # Check if this is a message_send event + if event['event'] == 'message_send': + properties = event['properties'] + main_model = properties.get('main_model') + total_tokens = properties.get('total_tokens', 0) + if main_model: + model_stats[main_model] += total_tokens + except json.JSONDecodeError: + continue + +# Print results +print("\nModel Token Usage Summary:") +print("-" * 60) +print(f"{'Model Name':<40} {'Total Tokens':>15}") +print("-" * 60) + +for model, tokens in sorted(model_stats.items()): + print(f"{model:<40} {tokens:>15,}") + +print("-" * 60) +print(f"{'TOTAL':<40} {sum(model_stats.values()):>15,}") From ec11ae7c4078b2c6c0ffce4a289ea983cc313df9 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 12:31:03 -0800 Subject: [PATCH 011/102] style: Fix linting issues in my_models.py --- scripts/my_models.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/my_models.py b/scripts/my_models.py index 1f42fa6b25b..155a24989d0 100644 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -6,7 +6,7 @@ from pathlib import Path # Get the analytics file path -analytics_path = Path.home() / '.aider' / 'analytics.jsonl' +analytics_path = Path.home() / ".aider" / "analytics.jsonl" # Dictionary to store model stats model_stats = defaultdict(int) @@ -17,10 +17,10 @@ try: event = json.loads(line) # Check if this is a message_send event - if event['event'] == 'message_send': - properties = event['properties'] - main_model = properties.get('main_model') - total_tokens = properties.get('total_tokens', 0) + if event["event"] == "message_send": + properties = event["properties"] + main_model = properties.get("main_model") + total_tokens = properties.get("total_tokens", 0) if main_model: model_stats[main_model] += total_tokens except json.JSONDecodeError: From 3473969aae629eec73400895ea68e8e7222899f4 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 12:31:09 -0800 Subject: [PATCH 012/102] fix: Remove unused os import in my_models.py --- scripts/my_models.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/my_models.py b/scripts/my_models.py index 155a24989d0..18fa48b2562 100644 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import json -import os from collections import defaultdict from pathlib import Path From f953d1788928707ae22a62efee550aefd178a0f9 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 12:31:37 -0800 Subject: [PATCH 013/102] chore: Make my_models.py executable --- scripts/my_models.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/my_models.py diff --git a/scripts/my_models.py b/scripts/my_models.py old mode 100644 new mode 100755 From 868e7a278f28282ba3de5cbd83642c93ea21a792 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 12:31:38 -0800 Subject: [PATCH 014/102] feat: Sort model token usage by count descending --- scripts/my_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/my_models.py b/scripts/my_models.py index 18fa48b2562..ae86a6cc3cb 100755 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -31,7 +31,7 @@ print(f"{'Model Name':<40} {'Total Tokens':>15}") print("-" * 60) -for model, tokens in sorted(model_stats.items()): +for model, tokens in sorted(model_stats.items(), key=lambda x: x[1], reverse=True): print(f"{model:<40} {tokens:>15,}") print("-" * 60) From 2d5f613984ed71eea7e0049c236b437ac08df713 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 12:32:28 -0800 Subject: [PATCH 015/102] feat: Process only last 1000 lines of analytics file --- scripts/my_models.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/my_models.py b/scripts/my_models.py index ae86a6cc3cb..e93484944d1 100755 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import json -from collections import defaultdict +from collections import defaultdict, deque from pathlib import Path # Get the analytics file path @@ -10,9 +10,14 @@ # Dictionary to store model stats model_stats = defaultdict(int) -# Read and process the file +# Number of lines to process from the end +N = 1000 + +# Read and process the last N lines of the file with open(analytics_path) as f: - for line in f: + # Get last N lines using deque + lines = deque(f, N) + for line in lines: try: event = json.loads(line) # Check if this is a message_send event From 66e5e9c1ce69e273f83b460f35515bc271b03f27 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 12:33:14 -0800 Subject: [PATCH 016/102] feat: Add percentage column to model token usage summary --- scripts/my_models.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/my_models.py b/scripts/my_models.py index e93484944d1..7e38b3d1904 100755 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -30,14 +30,18 @@ except json.JSONDecodeError: continue +# Calculate total for percentages +total_tokens = sum(model_stats.values()) + # Print results print("\nModel Token Usage Summary:") -print("-" * 60) -print(f"{'Model Name':<40} {'Total Tokens':>15}") -print("-" * 60) +print("-" * 80) +print(f"{'Model Name':<40} {'Total Tokens':>15} {'Percent':>10}") +print("-" * 80) for model, tokens in sorted(model_stats.items(), key=lambda x: x[1], reverse=True): - print(f"{model:<40} {tokens:>15,}") + percentage = (tokens / total_tokens) * 100 if total_tokens > 0 else 0 + print(f"{model:<40} {tokens:>15,} {percentage:>9.1f}%") -print("-" * 60) -print(f"{'TOTAL':<40} {sum(model_stats.values()):>15,}") +print("-" * 80) +print(f"{'TOTAL':<40} {total_tokens:>15,} {100:>9.1f}%") From 834e2f9304e964f146f2311e1487773530b0ecd8 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 12:34:31 -0800 Subject: [PATCH 017/102] refactor: Separate data, text, and HTML formatting into functions --- scripts/my_models.py | 126 +++++++++++++++++++++++++++++-------------- 1 file changed, 85 insertions(+), 41 deletions(-) diff --git a/scripts/my_models.py b/scripts/my_models.py index 7e38b3d1904..444b03bbbd8 100755 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -4,44 +4,88 @@ from collections import defaultdict, deque from pathlib import Path -# Get the analytics file path -analytics_path = Path.home() / ".aider" / "analytics.jsonl" - -# Dictionary to store model stats -model_stats = defaultdict(int) - -# Number of lines to process from the end -N = 1000 - -# Read and process the last N lines of the file -with open(analytics_path) as f: - # Get last N lines using deque - lines = deque(f, N) - for line in lines: - try: - event = json.loads(line) - # Check if this is a message_send event - if event["event"] == "message_send": - properties = event["properties"] - main_model = properties.get("main_model") - total_tokens = properties.get("total_tokens", 0) - if main_model: - model_stats[main_model] += total_tokens - except json.JSONDecodeError: - continue - -# Calculate total for percentages -total_tokens = sum(model_stats.values()) - -# Print results -print("\nModel Token Usage Summary:") -print("-" * 80) -print(f"{'Model Name':<40} {'Total Tokens':>15} {'Percent':>10}") -print("-" * 80) - -for model, tokens in sorted(model_stats.items(), key=lambda x: x[1], reverse=True): - percentage = (tokens / total_tokens) * 100 if total_tokens > 0 else 0 - print(f"{model:<40} {tokens:>15,} {percentage:>9.1f}%") - -print("-" * 80) -print(f"{'TOTAL':<40} {total_tokens:>15,} {100:>9.1f}%") + +def collect_model_stats(n_lines=1000): + """Collect model usage statistics from the analytics file.""" + analytics_path = Path.home() / ".aider" / "analytics.jsonl" + model_stats = defaultdict(int) + + with open(analytics_path) as f: + lines = deque(f, n_lines) + for line in lines: + try: + event = json.loads(line) + if event["event"] == "message_send": + properties = event["properties"] + main_model = properties.get("main_model") + total_tokens = properties.get("total_tokens", 0) + if main_model: + model_stats[main_model] += total_tokens + except json.JSONDecodeError: + continue + + return model_stats + + +def format_text_table(model_stats): + """Format model statistics as a text table.""" + total_tokens = sum(model_stats.values()) + lines = [] + + lines.append("\nModel Token Usage Summary:") + lines.append("-" * 80) + lines.append(f"{'Model Name':<40} {'Total Tokens':>15} {'Percent':>10}") + lines.append("-" * 80) + + for model, tokens in sorted(model_stats.items(), key=lambda x: x[1], reverse=True): + percentage = (tokens / total_tokens) * 100 if total_tokens > 0 else 0 + lines.append(f"{model:<40} {tokens:>15,} {percentage:>9.1f}%") + + lines.append("-" * 80) + lines.append(f"{'TOTAL':<40} {total_tokens:>15,} {100:>9.1f}%") + + return "\n".join(lines) + + +def format_html_table(model_stats): + """Format model statistics as an HTML table.""" + total_tokens = sum(model_stats.values()) + + html = [ + "", + "", + "", + "", + "", + "

Model Token Usage Summary

", + "", + "" + ] + + for model, tokens in sorted(model_stats.items(), key=lambda x: x[1], reverse=True): + percentage = (tokens / total_tokens) * 100 if total_tokens > 0 else 0 + html.append( + f"" + f"" + f"" + ) + + html.append( + f"" + f"" + f"" + ) + + html.extend(["
Model NameTotal TokensPercent
{model}{tokens:,}{percentage:.1f}%
TOTAL{total_tokens:,}100.0%
", "", ""]) + return "\n".join(html) + + +if __name__ == "__main__": + stats = collect_model_stats() + print(format_text_table(stats)) From a691d1750a7aa54989b25e599ee5bdf4767f51ac Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 12:34:34 -0800 Subject: [PATCH 018/102] style: Apply linter formatting --- scripts/my_models.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/scripts/my_models.py b/scripts/my_models.py index 444b03bbbd8..390153b9b4e 100755 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -31,7 +31,7 @@ def format_text_table(model_stats): """Format model statistics as a text table.""" total_tokens = sum(model_stats.values()) lines = [] - + lines.append("\nModel Token Usage Summary:") lines.append("-" * 80) lines.append(f"{'Model Name':<40} {'Total Tokens':>15} {'Percent':>10}") @@ -43,14 +43,14 @@ def format_text_table(model_stats): lines.append("-" * 80) lines.append(f"{'TOTAL':<40} {total_tokens:>15,} {100:>9.1f}%") - + return "\n".join(lines) def format_html_table(model_stats): """Format model statistics as an HTML table.""" total_tokens = sum(model_stats.values()) - + html = [ "", "", @@ -65,9 +65,12 @@ def format_html_table(model_stats): "", "

Model Token Usage Summary

", "", - "" + ( + "Percent" + ), ] - + for model, tokens in sorted(model_stats.items(), key=lambda x: x[1], reverse=True): percentage = (tokens / total_tokens) * 100 if total_tokens > 0 else 0 html.append( @@ -75,13 +78,13 @@ def format_html_table(model_stats): f"" f"" ) - + html.append( - f"" + "" f"" - f"" + "" ) - + html.extend(["
Model NameTotal TokensPercent
Model NameTotal Tokens
{tokens:,}{percentage:.1f}%
TOTAL
TOTAL{total_tokens:,}100.0%
100.0%
", "", ""]) return "\n".join(html) From e77d80bda5a73141e3dc09fc38393320d642e167 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 12:48:28 -0800 Subject: [PATCH 019/102] docs: Add FAQ about LLMs used to build aider --- aider/website/docs/faq.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index 4921f4326eb..42c828579a1 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -209,6 +209,23 @@ 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 LLM models I use with aider, when writing aider. +Below is a table showing the models I use, +extracted from the [public log of my aider analytics](https://github.com/aider-ai/aider/blob/main/aider/website/assets/sample-analytics.jsonl). + + + + + ## How are the "aider wrote xx% of code" stats computed? From 9967efe45a06979355a514a17eaa9ab56b6fe1fe Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 12:48:29 -0800 Subject: [PATCH 020/102] fix: Correct import path in cog block for model stats --- aider/website/docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index 42c828579a1..88defee43b1 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -218,7 +218,7 @@ Below is a table showing the models I use, extracted from the [public log of my aider analytics](https://github.com/aider-ai/aider/blob/main/aider/website/assets/sample-analytics.jsonl). - + + + + + + + + + +
Model NameTotal TokensPercent
claude-3-5-sonnet-202410221,687,07489.4%
gemini/REDACTED82,5724.4%
o1-preview79,3174.2%
deepseek/deepseek-coder24,6281.3%
gpt-4o9,2430.5%
gpt-4o-mini3,4200.2%
+{: .note :} +Some models show as REDACTED, because they are new or unpopular models. +Aider's analytics only records the names of "well known" LLMs. ## How are the "aider wrote xx% of code" stats computed? diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/scripts/my_models.py b/scripts/my_models.py index 390153b9b4e..f0818667f10 100755 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -52,8 +52,6 @@ def format_html_table(model_stats): total_tokens = sum(model_stats.values()) html = [ - "", - "", "", - "", - "", - "

Model Token Usage Summary

", "", ( "{percentage:.1f}%" ) - html.append( - "" - f"" - "" - ) - - html.extend(["
Model NameTotal Tokens
TOTAL{total_tokens:,}100.0%
", "", ""]) + html.extend([""]) return "\n".join(html) diff --git a/scripts/update-docs.sh b/scripts/update-docs.sh index cfcf5779dc4..62218c3c508 100755 --- a/scripts/update-docs.sh +++ b/scripts/update-docs.sh @@ -20,6 +20,7 @@ cog $ARG \ aider/website/HISTORY.md \ aider/website/docs/usage/commands.md \ aider/website/docs/languages.md \ + aider/website/docs/faq.md \ aider/website/docs/config/dotenv.md \ aider/website/docs/config/options.md \ aider/website/docs/config/aider_conf.md \ From c8894bcead2bc8c01ab7fecbb5eb434077aa0ab8 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 13:22:55 -0800 Subject: [PATCH 023/102] feat: Conditionally add redacted model note to script --- aider/website/docs/faq.md | 4 ---- scripts/my_models.py | 12 +++++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index f0ae0da90e5..34983cb4cd0 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -246,10 +246,6 @@ tr:hover { background-color: #f5f5f5; } -{: .note :} -Some models show as REDACTED, because they are new or unpopular models. -Aider's analytics only records the names of "well known" LLMs. - ## How are the "aider wrote xx% of code" stats computed? [Aider is tightly integrated with git](/docs/git.html) so all diff --git a/scripts/my_models.py b/scripts/my_models.py index f0818667f10..3bbfb4c7873 100755 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -74,7 +74,17 @@ def format_html_table(model_stats): f"{percentage:.1f}%" ) - html.extend([""]) + html.append("") + + # Add note about redacted models if any are present + if any("REDACTED" in model for model in model_stats.keys()): + html.extend([ + "", + "{: .note :}", + "Some models show as REDACTED, because they are new or unpopular models.", + "Aider's analytics only records the names of \"well known\" LLMs." + ]) + return "\n".join(html) From 8c10cb623038be46556c27dbaaa4c55d4895cdd3 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 13:22:59 -0800 Subject: [PATCH 024/102] style: Fix linting issues in my_models.py --- scripts/my_models.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/my_models.py b/scripts/my_models.py index 3bbfb4c7873..82b41ddb29d 100755 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -78,12 +78,14 @@ def format_html_table(model_stats): # Add note about redacted models if any are present if any("REDACTED" in model for model in model_stats.keys()): - html.extend([ - "", - "{: .note :}", - "Some models show as REDACTED, because they are new or unpopular models.", - "Aider's analytics only records the names of \"well known\" LLMs." - ]) + html.extend( + [ + "", + "{: .note :}", + "Some models show as REDACTED, because they are new or unpopular models.", + 'Aider\'s analytics only records the names of "well known" LLMs.', + ] + ) return "\n".join(html) From 9f6331a35ecc416b8d54034f28279ea6922945c0 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 13:34:18 -0800 Subject: [PATCH 025/102] copy --- aider/website/assets/sample-analytics.jsonl | 4 ++-- aider/website/docs/faq.md | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 6b09ce2413d..3d9637acda3 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,5 +1,3 @@ -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2406, "completion_tokens": 389, "total_tokens": 2795, "cost": 0.013053, "total_cost": 0.013053}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783537} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783565} {"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783565} {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2831, "completion_tokens": 1036, "total_tokens": 3867, "cost": 0.024033, "total_cost": 0.037086}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783588} {"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783603} @@ -998,3 +996,5 @@ {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 7130, "completion_tokens": 235, "total_tokens": 7365, "cost": 0.024915, "total_cost": 0.243099}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734122920} {"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734122935} {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 9305, "completion_tokens": 137, "total_tokens": 9442, "cost": 0.029970000000000004, "total_cost": 0.273069}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734122940} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734124965} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8786, "completion_tokens": 288, "total_tokens": 9074, "cost": 0.030678, "total_cost": 0.303747}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734124974} diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index 34983cb4cd0..5205d161feb 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -218,7 +218,7 @@ 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](http://127.0.0.1:4000/docs/more/analytics.html). +[aider analytics](http://aider.chat/docs/more/analytics.html). ## How are the "aider wrote xx% of code" stats computed? From 65555b5dd02f518d054786e2c8a6f827d3b8de5a Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 13 Dec 2024 13:43:15 -0800 Subject: [PATCH 026/102] copy --- aider/website/docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index 5205d161feb..0f7dbfdee94 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -218,7 +218,7 @@ 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](http://aider.chat/docs/more/analytics.html). +[aider analytics](https://aider.chat/docs/more/analytics.html). diff --git a/aider/models.py b/aider/models.py index 53e507795a6..f703c140a80 100644 --- a/aider/models.py +++ b/aider/models.py @@ -1234,8 +1234,8 @@ def sanity_check_model(io, model): 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: diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 3d9637acda3..839ce802da3 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,74 +1,3 @@ -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783565} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2831, "completion_tokens": 1036, "total_tokens": 3867, "cost": 0.024033, "total_cost": 0.037086}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783588} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783603} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 6032, "completion_tokens": 1432, "total_tokens": 7464, "cost": 0.039576, "total_cost": 0.07666200000000001}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783632} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783720} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783720} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 5669, "completion_tokens": 323, "total_tokens": 5992, "cost": 0.021852000000000003, "total_cost": 0.09851400000000002}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783729} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783752} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8145, "completion_tokens": 246, "total_tokens": 8391, "cost": 0.028125, "total_cost": 0.12663900000000003}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783758} -{"event": "command_undo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783787} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783928} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783928} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 6302, "completion_tokens": 302, "total_tokens": 6604, "cost": 0.023436, "total_cost": 0.15007500000000001}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783937} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783942} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8754, "completion_tokens": 175, "total_tokens": 8929, "cost": 0.028887, "total_cost": 0.178962}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783948} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783948} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5854, "completion_tokens": 273, "total_tokens": 6127, "cost": 0.021657000000000003, "total_cost": 0.20061900000000002}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733783957} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784007} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784009} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 4118, "completion_tokens": 219, "total_tokens": 4337, "cost": 0.015639, "total_cost": 0.216258}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784016} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784058} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784059} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 4358, "completion_tokens": 184, "total_tokens": 4542, "cost": 0.015834, "total_cost": 0.23209200000000002}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784063} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784065} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 6678, "completion_tokens": 156, "total_tokens": 6834, "cost": 0.022373999999999998, "total_cost": 0.254466}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784071} -{"event": "command_clear", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784187} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784206} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784206} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2755, "completion_tokens": 232, "total_tokens": 2987, "cost": 0.011745, "total_cost": 0.26621100000000003}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784213} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784253} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784253} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 3014, "completion_tokens": 296, "total_tokens": 3310, "cost": 0.013482000000000001, "total_cost": 0.279693}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784261} -{"event": "command_clear", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784264} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784302} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784302} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2777, "completion_tokens": 197, "total_tokens": 2974, "cost": 0.011286000000000001, "total_cost": 0.29097900000000004}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784308} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784314} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5135, "completion_tokens": 125, "total_tokens": 5260, "cost": 0.01728, "total_cost": 0.30825900000000006}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784318} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784337} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784337} -{"event": "command_clear", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784347} -{"event": "command_diff", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784368} -{"event": "command_undo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784388} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784565} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784640} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784640} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733784640} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785193} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785193} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785193} -{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785215} -{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785215} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785226} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5683, "completion_tokens": 402, "total_tokens": 6085, "cost": 0.023079000000000002, "total_cost": 0.023079000000000002}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785238} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785263} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785267} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785267} -{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733785272} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786091} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786091} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786092} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786096} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786106} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786107} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786107} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786109} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786227} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786227} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2329, "completion_tokens": 589, "total_tokens": 2918, "cost": 0.015822000000000003, "total_cost": 0.015822000000000003}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786243} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786266} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 4759, "completion_tokens": 599, "total_tokens": 5358, "cost": 0.023261999999999998, "total_cost": 0.039084}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786285} {"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786363} {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786366} {"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786366} @@ -998,3 +927,74 @@ {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 9305, "completion_tokens": 137, "total_tokens": 9442, "cost": 0.029970000000000004, "total_cost": 0.273069}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734122940} {"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734124965} {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8786, "completion_tokens": 288, "total_tokens": 9074, "cost": 0.030678, "total_cost": 0.303747}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734124974} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734127729} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734127729} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143107} +{"event": "model warning", "properties": {"main_model": "mistral/REDACTED", "weak_model": "gemini/REDACTED", "editor_model": "mistral/REDACTED"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143109} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143112} +{"event": "cli session", "properties": {"main_model": "mistral/REDACTED", "weak_model": "gemini/REDACTED", "editor_model": "mistral/REDACTED", "edit_format": "whole"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143112} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143114} +{"event": "message_send", "properties": {"main_model": "mistral/REDACTED", "weak_model": "gemini/REDACTED", "editor_model": "mistral/REDACTED", "edit_format": "whole", "prompt_tokens": 593, "completion_tokens": 27, "total_tokens": 620, "cost": 0, "total_cost": 0.0}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143116} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143499} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143510} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143512} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143512} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143521} +{"event": "command_editor", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143530} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143595} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143595} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 3564, "completion_tokens": 399, "total_tokens": 3963, "cost": 0.016677, "total_cost": 0.016677}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143609} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143652} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143654} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143654} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143655} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143655} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 3557, "completion_tokens": 147, "total_tokens": 3704, "cost": 0.012876, "total_cost": 0.012876}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143662} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143698} +{"event": "model warning", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143710} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143714} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143715} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143716} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143717} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 3563, "completion_tokens": 403, "total_tokens": 3966, "cost": 0.016734, "total_cost": 0.016734}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143740} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143744} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5842, "completion_tokens": 331, "total_tokens": 6173, "cost": 0.022491, "total_cost": 0.039224999999999996}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734143754} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734144684} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734145597} +{"event": "model warning", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734145599} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734145602} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734145602} +{"event": "command_editor", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734145607} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734145730} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734145730} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 3569, "completion_tokens": 411, "total_tokens": 3980, "cost": 0.016871999999999998, "total_cost": 0.016871999999999998}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734145750} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734145757} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5932, "completion_tokens": 393, "total_tokens": 6325, "cost": 0.023691, "total_cost": 0.040563}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734145767} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734146569} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183379} +{"event": "model warning", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183381} +{"event": "repo", "properties": {"num_files": 409}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183384} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183384} +{"event": "command_editor", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183391} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183474} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183474} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2498, "completion_tokens": 314, "total_tokens": 2812, "cost": 0.012204, "total_cost": 0.012204}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183483} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183499} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5000, "completion_tokens": 266, "total_tokens": 5266, "cost": 0.01899, "total_cost": 0.031194}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183507} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183760} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734183760} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734185006} +{"event": "model warning", "properties": {"main_model": "vertex_ai/REDACTED", "weak_model": "gemini/REDACTED", "editor_model": "vertex_ai/REDACTED"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734185008} +{"event": "exit", "properties": {"reason": "Keyboard interrupt during model warnings"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734185010} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734185028} +{"event": "model warning", "properties": {"main_model": "openrouter/REDACTED", "weak_model": "gemini/REDACTED", "editor_model": "openrouter/REDACTED"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734185029} +{"event": "exit", "properties": {"reason": "Keyboard interrupt during model warnings"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734185030} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198163} +{"event": "repo", "properties": {"num_files": 411}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198165} +{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198174} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198278} +{"event": "repo", "properties": {"num_files": 411}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198279} +{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198282} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198621} +{"event": "repo", "properties": {"num_files": 411}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198623} +{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198626} diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index 0f7dbfdee94..dd37f59a14b 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -237,12 +237,13 @@ tr:hover { background-color: #f5f5f5; } - - - + + + +
Model NameTotal TokensPercent
claude-3-5-sonnet-202410221,693,35389.5%
gemini/REDACTED82,5724.4%
o1-preview79,3174.2%
claude-3-5-sonnet-202410221,637,56389.1%
gemini/REDACTED82,5724.5%
o1-preview79,3174.3%
deepseek/deepseek-coder24,6281.3%
gpt-4o9,2430.5%
gpt-4o-mini3,4200.2%
mistral/REDACTED6200.0%
{: .note :} diff --git a/aider/website/index.md b/aider/website/index.md index 178050f20ee..329df8bd2d0 100644 --- a/aider/website/index.md +++ b/aider/website/index.md @@ -73,18 +73,17 @@ cog.out(open("aider/website/_includes/get-started.md").read()) You can get started quickly like this: ```bash -python -m pip install -U aider-chat +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 --anthropic-api-key=your-key-goes-here # Work with GPT-4o on your repo -export OPENAI_API_KEY=your-key-goes-here -aider +aider --openai-api-key=your-key-goes-here ``` From 8c79e5ccfb05a9492b4c37cbb864c43630fbab33 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 14 Dec 2024 20:09:51 -0800 Subject: [PATCH 032/102] copy --- aider/website/_includes/get-started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/website/_includes/get-started.md b/aider/website/_includes/get-started.md index 1dba32ccfba..080978eb7ac 100644 --- a/aider/website/_includes/get-started.md +++ b/aider/website/_includes/get-started.md @@ -9,8 +9,8 @@ aider-install cd /to/your/git/repo # Work with Claude 3.5 Sonnet on your repo -aider --anthropic-api-key=your-key-goes-here +aider --anthropic-api-key your-key-goes-here # Work with GPT-4o on your repo -aider --openai-api-key=your-key-goes-here +aider --openai-api-key your-key-goes-here ``` From 10b5aaa6a54c2e87cacf3d2e972d4393a272cd90 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 14 Dec 2024 20:52:20 -0800 Subject: [PATCH 033/102] copy --- README.md | 4 +-- aider/website/_includes/get-started.md | 4 +-- aider/website/_includes/venv-pipx.md | 8 ++--- aider/website/assets/sample-analytics.jsonl | 6 ++-- aider/website/docs/install/install.md | 35 ++++++++++----------- aider/website/index.md | 4 +-- 6 files changed, 27 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 4bfd7101b6f..f5d2f53f93b 100644 --- a/README.md +++ b/README.md @@ -53,10 +53,10 @@ aider-install cd /to/your/git/repo # Work with Claude 3.5 Sonnet on your repo -aider --anthropic-api-key=your-key-goes-here +aider --model sonnet --anthropic-api-key your-key-goes-here # Work with GPT-4o on your repo -aider --openai-api-key=your-key-goes-here +aider --model gpt-4o --openai-api-key your-key-goes-here ``` diff --git a/aider/website/_includes/get-started.md b/aider/website/_includes/get-started.md index 080978eb7ac..bcc074270ea 100644 --- a/aider/website/_includes/get-started.md +++ b/aider/website/_includes/get-started.md @@ -9,8 +9,8 @@ aider-install cd /to/your/git/repo # Work with Claude 3.5 Sonnet on your repo -aider --anthropic-api-key your-key-goes-here +aider --model sonnet --anthropic-api-key your-key-goes-here # Work with GPT-4o on your repo -aider --openai-api-key your-key-goes-here +aider --model gpt-4o --openai-api-key your-key-goes-here ``` diff --git a/aider/website/_includes/venv-pipx.md b/aider/website/_includes/venv-pipx.md index a1fa2fd5ed4..bb344dbd889 100644 --- a/aider/website/_includes/venv-pipx.md +++ b/aider/website/_includes/venv-pipx.md @@ -1,9 +1,5 @@ {: .tip } -The best way to install aider is with +Other recommended ways to install aider are via [pipx](/docs/install/pipx.html) or -[uv](/docs/install/uv.html) -once for your whole system. -Or, using a python -[virtual environment](https://docs.python.org/3/library/venv.html){:target="_blank"} -is recommended. +[uv](/docs/install/uv.html). diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 839ce802da3..2c3b0b73e70 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,6 +1,3 @@ -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786363} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786366} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786366} {"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786366} {"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786369} {"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786379} @@ -998,3 +995,6 @@ {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198621} {"event": "repo", "properties": {"num_files": 411}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198623} {"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734198626} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734227059} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734227059} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734227059} diff --git a/aider/website/docs/install/install.md b/aider/website/docs/install/install.md index 56295f8dab0..afe31cb4eba 100644 --- a/aider/website/docs/install/install.md +++ b/aider/website/docs/install/install.md @@ -6,29 +6,10 @@ nav_order: 10 # Installing aider {: .no_toc } -- TOC -{:toc} - ## Python version Aider currently works with python 3.9-3.12. -## 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 @@ -59,6 +40,22 @@ aider --sonnet --anthropic-api-key sk-xxx... {% include python-m-aider.md %} +## 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). + + ## Working with other LLMs {% include works-best.md %} diff --git a/aider/website/index.md b/aider/website/index.md index 329df8bd2d0..3f98613708c 100644 --- a/aider/website/index.md +++ b/aider/website/index.md @@ -80,10 +80,10 @@ aider-install cd /to/your/git/repo # Work with Claude 3.5 Sonnet on your repo -aider --anthropic-api-key=your-key-goes-here +aider --model sonnet --anthropic-api-key your-key-goes-here # Work with GPT-4o on your repo -aider --openai-api-key=your-key-goes-here +aider --model gpt-4o --openai-api-key your-key-goes-here ``` From 64cf298521786c7e5c930b62ee8834e8082ef160 Mon Sep 17 00:00:00 2001 From: you-n-g Date: Sun, 15 Dec 2024 13:35:14 +0800 Subject: [PATCH 034/102] docs: Update watch.md --- aider/website/docs/usage/watch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/website/docs/usage/watch.md b/aider/website/docs/usage/watch.md index c167b5eecec..aa3f73b60e7 100644 --- a/aider/website/docs/usage/watch.md +++ b/aider/website/docs/usage/watch.md @@ -37,7 +37,7 @@ description: Aider can run in your browser, not just on the command line. If you run aider with `--watch-files`, it will watch all files in your repo and look for any AI coding instructions you add using your favorite IDE or text editor. -Specifically, aider looks for one-liner comments (# ... or // ...) that either start or end with `AI`, `AI!` or `AI?1 like these: +Specifically, aider looks for one-liner comments (# ... or // ...) that either start or end with `AI`, `AI!` or `AI?` like these: ```python # Make a snake game. AI! From a67ac81265fe21029e91a804afa4c9d843931160 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 08:39:53 -0800 Subject: [PATCH 035/102] updated install instructions --- README.md | 6 +- aider/website/_includes/conflicts.md | 2 +- aider/website/_includes/get-started.md | 2 +- aider/website/_includes/special-keys.md | 48 --------- aider/website/_includes/venv-pipx.md | 5 - aider/website/docs/install.md | 101 ++++++++++++------ aider/website/docs/install/install.md | 67 ------------ aider/website/docs/install/optional.md | 23 +++- aider/website/docs/install/pipx.md | 24 ----- aider/website/docs/install/uv.md | 18 ---- .../docs/troubleshooting/aider-not-found.md | 7 +- aider/website/docs/troubleshooting/imports.md | 34 ++---- 12 files changed, 104 insertions(+), 233 deletions(-) delete mode 100644 aider/website/_includes/venv-pipx.md delete mode 100644 aider/website/docs/install/install.md delete mode 100644 aider/website/docs/install/pipx.md delete mode 100644 aider/website/docs/install/uv.md diff --git a/README.md b/README.md index f5d2f53f93b..18e9e731e39 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,9 @@ aider --model gpt-4o --openai-api-key your-key-goes-here See the -[installation instructions](https://aider.chat/docs/install.html) -and other -[documentation](https://aider.chat/docs/usage.html) +[installation instructions](https://aider.chat/docs/install/install.html) +and +[usage documentation](https://aider.chat/docs/usage.html) for more details. ## Features diff --git a/aider/website/_includes/conflicts.md b/aider/website/_includes/conflicts.md index 8a624d73c18..c5f0658f43b 100644 --- a/aider/website/_includes/conflicts.md +++ b/aider/website/_includes/conflicts.md @@ -9,7 +9,7 @@ or If you are using aider to work on a python project, sometimes your project will require specific versions of python packages which conflict with the versions that aider requires. -If this happens, the `python -m pip install aide-chat` command may return errors like these: +If this happens, the `python -m pip install aider-chat` command may return errors like these: ``` aider-chat 0.23.0 requires somepackage==X.Y.Z, but you have somepackage U.W.V which is incompatible. diff --git a/aider/website/_includes/get-started.md b/aider/website/_includes/get-started.md index bcc074270ea..65c666e8384 100644 --- a/aider/website/_includes/get-started.md +++ b/aider/website/_includes/get-started.md @@ -1,5 +1,5 @@ -You can get started quickly like this: +You can get started quickly like this, with python 3.8-3.13: ```bash python -m pip install aider-install diff --git a/aider/website/_includes/special-keys.md b/aider/website/_includes/special-keys.md index 24e97bf74e2..8b137891791 100644 --- a/aider/website/_includes/special-keys.md +++ b/aider/website/_includes/special-keys.md @@ -1,49 +1 @@ -Aider has special support for providing -OpenAI and Anthropic API keys -via dedicated -[command line switches](/docs/config/options.html#api-keys-and-settings) -`--openai-api-key` and `--anthropic-api-key`. - -You can also set those API keys via special entries in the -[yaml config file](/docs/config/aider_conf.html), like this: - -```yaml -openai-api-key: -anthropic-api-key: -``` - -All other LLM providers can use one of the following methods to set their -keys: - -### API keys on the command line -{: .no_toc } - -Use `--api-key provider=` which has the effect of setting the environment variable `PROVIDER_API_KEY=`. So `--api-key gemini=xxx` would set `GEMINI_API_KEY=xxx`. - -### API keys in a .env file -{: .no_toc } - -The [.env file](/docs/config/dotenv.html) -is a great place to set API keys and other provider API environment variables: - -```bash -GEMINI_API_KEY=foo -OPENROUTER_API_KEY=bar -DEEPSEEK_API_KEY=baz -``` - -### API keys in .aider.conf.yml -{: .no_toc } - -Or you can set API keys in the -[`.aider.conf.yml` file](/docs/config/aider_conf.html) -via the `api-key` entry: - -``` -api-key: -- gemini=foo # Sets env var GEMINI_API_KEY=foo -- openrouter=bar # Sets env var OPENROUTER_API_KEY=bar -- deepseek=baz # Sets env var DEEPSEEK_API_KEY=baz -``` - diff --git a/aider/website/_includes/venv-pipx.md b/aider/website/_includes/venv-pipx.md deleted file mode 100644 index bb344dbd889..00000000000 --- a/aider/website/_includes/venv-pipx.md +++ /dev/null @@ -1,5 +0,0 @@ -{: .tip } -Other recommended ways to install aider are via -[pipx](/docs/install/pipx.html) -or -[uv](/docs/install/uv.html). diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index abb509a33e4..e70d4885620 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -5,41 +5,78 @@ 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. - -{% include venv-pipx.md %} - -
- -
- - +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, it will automatically install 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/). + + +### pipx on replit + +{% include replit-pipx.md %} + +## 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 %} +## 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. diff --git a/aider/website/docs/install/install.md b/aider/website/docs/install/install.md deleted file mode 100644 index afe31cb4eba..00000000000 --- a/aider/website/docs/install/install.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -parent: Installation -nav_order: 10 ---- - -# Installing aider -{: .no_toc } - -## Python version - -Aider currently works with python 3.9-3.12. - -{% include venv-pipx.md %} - -## Mac/Linux install - -```bash -# Install aider -python -m pip install -U --upgrade-strategy only-if-needed aider-chat - -# To work with GPT-4o: -aider --4o --openai-api-key sk-xxx... - -# To work with Claude 3.5 Sonnet: -aider --sonnet --anthropic-api-key sk-xxx... -``` - -## Windows install - -```bash -# Install aider -python -m pip install -U --upgrade-strategy only-if-needed aider-chat - -# To work with GPT-4o: -aider --4o --openai-api-key sk-xxx... - -# To work with Claude 3.5 Sonnet: -aider --sonnet --anthropic-api-key sk-xxx... -``` - -{% include python-m-aider.md %} - -## 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). - - -## 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. - diff --git a/aider/website/docs/install/optional.md b/aider/website/docs/install/optional.md index 8e4285873d1..34584cb0fdc 100644 --- a/aider/website/docs/install/optional.md +++ b/aider/website/docs/install/optional.md @@ -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 diff --git a/aider/website/docs/install/pipx.md b/aider/website/docs/install/pipx.md deleted file mode 100644 index 4c061530ca8..00000000000 --- a/aider/website/docs/install/pipx.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -parent: Installation -nav_order: 100 ---- - -# 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 -``` - -See also the -[docs on other methods for installing pipx itself](https://pipx.pypa.io/stable/installation/). - - -## pipx on replit - -{% include replit-pipx.md %} - - -{% include conflicts.md %} diff --git a/aider/website/docs/install/uv.md b/aider/website/docs/install/uv.md deleted file mode 100644 index c8fe62b2176..00000000000 --- a/aider/website/docs/install/uv.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -parent: Installation -nav_order: 100 ---- - -# Install with uv - -A recommended way to install aider is with uv: - -```bash -python -m pip install uv # If you need to install uv -uv tool install --python python3.12 aider-chat -``` - -See also the -[docs on other methods for installing uv itself](https://docs.astral.sh/uv/getting-started/installation/). - -{% include conflicts.md %} diff --git a/aider/website/docs/troubleshooting/aider-not-found.md b/aider/website/docs/troubleshooting/aider-not-found.md index 12a610340ca..29ef7c3aab6 100644 --- a/aider/website/docs/troubleshooting/aider-not-found.md +++ b/aider/website/docs/troubleshooting/aider-not-found.md @@ -14,12 +14,11 @@ You may see an error message like this: > aider: The term 'aider' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. -Below is the most fail safe way to install and run aider in these situations: +Below is the most fail safe way to run aider in these situations: ``` -python -m pip install -U aider-chat python -m aider ``` - -{% include venv-pipx.md %} +You should also consider +[installing aider using aider-install, uv or pipx](/docs/install.html). diff --git a/aider/website/docs/troubleshooting/imports.md b/aider/website/docs/troubleshooting/imports.md index ac9e96791b9..8fa05c7e4ed 100644 --- a/aider/website/docs/troubleshooting/imports.md +++ b/aider/website/docs/troubleshooting/imports.md @@ -5,7 +5,7 @@ nav_order: 28 # Dependency versions -Aider expects to be installed via `pip` or `pipx`, which will install +Aider expects to be installed with the correct versions of all of its required dependencies. If you've been linked to this doc from a GitHub issue, @@ -13,43 +13,26 @@ or if aider is reporting `ImportErrors` it is likely that your aider install is using incorrect dependencies. -## Install with pipx +## Install with aider-install, uv or pipx If you are having dependency problems you should consider -[installing aider using pipx](/docs/install/pipx.html). +[installing aider using aider-install, uv or pipx](/docs/install.html). This will ensure that aider is installed in its own python environment, with the correct set of dependencies. -Try re-installing cleanly: - -``` -pipx uninstall aider-chat -pipx install aider-chat -``` - ## Package managers like Homebrew, AUR, ports Package managers often install aider with the wrong dependencies, leading to import errors and other problems. -The recommended way to -install aider is with -[pip](/docs/install/install.html). -Be sure to use the `--upgrade-strategy only-if-needed` switch so that the correct -versions of dependencies will be installed. - -``` -python -m pip install -U --upgrade-strategy only-if-needed aider-chat -``` +It is recommended to +[install aider using aider-install, uv or pipx](/docs/install.html). -A very safe way is to -[install aider using pipx](/docs/install/pipx.html), -which will ensure it is installed in a stand alone virtual environment. ## Dependency versions matter Aider pins its dependencies and is tested to work with those specific versions. -If you are installing aider with pip (rather than pipx), +If you are installing aider directly with pip you should be careful about upgrading or downgrading the python packages that aider uses. @@ -64,9 +47,4 @@ and sometimes introduces bugs or backwards incompatible changes. ## Replit -You can `pip install -U aider-chat` on replit. - -Or you can install aider with -pipx as follows: - {% include replit-pipx.md %} From 2feb85e831ed82cc46d687a1ecedeb7e36f3edf3 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 08:40:02 -0800 Subject: [PATCH 036/102] api keys --- aider/website/docs/config/api-keys.md | 68 +++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 aider/website/docs/config/api-keys.md diff --git a/aider/website/docs/config/api-keys.md b/aider/website/docs/config/api-keys.md new file mode 100644 index 00000000000..d31cd1b8996 --- /dev/null +++ b/aider/website/docs/config/api-keys.md @@ -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: +anthropic-api-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= +ANTHROPIC_API_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=` which has the effect of setting the environment variable `PROVIDER_API_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 +``` From 4b6ae34800316779af32fe6b346ba6782d47ebb1 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 08:46:20 -0800 Subject: [PATCH 037/102] updated keys config docs --- aider/website/_includes/env-keys-tip.md | 5 ----- aider/website/_includes/keys.md | 4 ++++ aider/website/_includes/special-keys.md | 1 - aider/website/docs/config.md | 2 +- aider/website/docs/config/aider_conf.md | 6 +----- aider/website/docs/config/dotenv.md | 6 +----- aider/website/docs/config/options.md | 4 +--- 7 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 aider/website/_includes/env-keys-tip.md create mode 100644 aider/website/_includes/keys.md delete mode 100644 aider/website/_includes/special-keys.md diff --git a/aider/website/_includes/env-keys-tip.md b/aider/website/_includes/env-keys-tip.md deleted file mode 100644 index 44b4bbc034c..00000000000 --- a/aider/website/_includes/env-keys-tip.md +++ /dev/null @@ -1,5 +0,0 @@ -{: .tip } -All API keys can be stored in a -[.env file](/docs/config/dotenv.html#storing-llm-keys) -or in a [YAML config file](/docs/config/aider_conf.html#storing-llm-keys). - diff --git a/aider/website/_includes/keys.md b/aider/website/_includes/keys.md new file mode 100644 index 00000000000..5391c21dc62 --- /dev/null +++ b/aider/website/_includes/keys.md @@ -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. diff --git a/aider/website/_includes/special-keys.md b/aider/website/_includes/special-keys.md deleted file mode 100644 index 8b137891791..00000000000 --- a/aider/website/_includes/special-keys.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/aider/website/docs/config.md b/aider/website/docs/config.md index 3b192c432a9..299ec5979eb 100644 --- a/aider/website/docs/config.md +++ b/aider/website/docs/config.md @@ -40,5 +40,5 @@ Using an `.env` file: AIDER_DARK_MODE=true ``` -{% include env-keys-tip.md %} +{% include keys.md %} diff --git a/aider/website/docs/config/aider_conf.md b/aider/website/docs/config/aider_conf.md index 42a5cb10848..6c589513ff4 100644 --- a/aider/website/docs/config/aider_conf.md +++ b/aider/website/docs/config/aider_conf.md @@ -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 diff --git a/aider/website/docs/config/dotenv.md b/aider/website/docs/config/dotenv.md index eeae55622ba..6da0f35aa09 100644 --- a/aider/website/docs/config/dotenv.md +++ b/aider/website/docs/config/dotenv.md @@ -20,11 +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 env-keys-tip.md %} +{% include keys.md %} ## Sample .env file diff --git a/aider/website/docs/config/options.md b/aider/website/docs/config/options.md index 31fd24480a6..529bfbcb819 100644 --- a/aider/website/docs/config/options.md +++ b/aider/website/docs/config/options.md @@ -13,9 +13,7 @@ or review them below. - TOC {:toc} -## LLM keys - -{% include special-keys.md %} +{% include keys.md %} ## Usage summary From 4d50e1e3736ef1f122eaa7bdacf26840ffa42671 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 08:46:44 -0800 Subject: [PATCH 038/102] copy --- README.md | 2 +- aider/website/assets/sample-analytics.jsonl | 6 +++--- aider/website/index.md | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 18e9e731e39..f2f567488eb 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ 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: ```bash python -m pip install aider-install diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 2c3b0b73e70..7673af9c8c0 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,6 +1,3 @@ -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786366} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786369} -{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786379} {"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786379} {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786386} {"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786386} @@ -998,3 +995,6 @@ {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734227059} {"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734227059} {"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734227059} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734238398} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734238398} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734238398} diff --git a/aider/website/index.md b/aider/website/index.md index 3f98613708c..f6e70a31bf8 100644 --- a/aider/website/index.md +++ b/aider/website/index.md @@ -70,7 +70,7 @@ Aider works best with GPT-4o & Claude 3.5 Sonnet and can 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: ```bash python -m pip install aider-install @@ -88,9 +88,9 @@ aider --model gpt-4o --openai-api-key your-key-goes-here See the -[installation instructions](https://aider.chat/docs/install.html) -and other -[documentation](https://aider.chat/docs/usage.html) +[installation instructions](https://aider.chat/docs/install/install.html) +and +[usage documentation](https://aider.chat/docs/usage.html) for more details. ## Features From 241e1e27d0568fb11bfed44cf23006a863c6d5bd Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 08:50:28 -0800 Subject: [PATCH 039/102] copy --- aider/website/docs/install.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index e70d4885620..2f48b897e86 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -75,6 +75,12 @@ aider --sonnet --anthropic-api-key sk-xxx... {% include python-m-aider.md %} +## Installing with package managers + +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. + ## You are done! There are some [optional install steps](/docs/install/optional.html) you could consider. From 0cc8c54152a23f282da2ba2d94fabce6597f5c91 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 09:01:13 -0800 Subject: [PATCH 040/102] copy --- README.md | 2 +- aider/website/assets/sample-analytics.jsonl | 12 ++++++------ aider/website/index.md | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f2f567488eb..2db92d292be 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ aider --model gpt-4o --openai-api-key your-key-goes-here See the -[installation instructions](https://aider.chat/docs/install/install.html) +[installation instructions](https://aider.chat/docs/install.html) and [usage documentation](https://aider.chat/docs/usage.html) for more details. diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 7673af9c8c0..744c3e04463 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,9 +1,3 @@ -{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786379} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786386} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786386} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786386} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786389} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786393} {"event": "command_diff", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786401} {"event": "command_undo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786423} {"event": "command_undo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786429} @@ -998,3 +992,9 @@ {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734238398} {"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734238398} {"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734238398} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734281266} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734281267} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734281267} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734281354} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734281354} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734281354} diff --git a/aider/website/index.md b/aider/website/index.md index f6e70a31bf8..5398fce9be8 100644 --- a/aider/website/index.md +++ b/aider/website/index.md @@ -88,7 +88,7 @@ aider --model gpt-4o --openai-api-key your-key-goes-here See the -[installation instructions](https://aider.chat/docs/install/install.html) +[installation instructions](https://aider.chat/docs/install.html) and [usage documentation](https://aider.chat/docs/usage.html) for more details. From b54f970e1290bbf581964acf45cc48e45f60874f Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 09:16:42 -0800 Subject: [PATCH 041/102] copy --- aider/website/docs/install.md | 6 +++++- aider/website/docs/install/optional.md | 9 +-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index 2f48b897e86..a531453413a 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -13,6 +13,9 @@ description: How to install and get started pair programming with aider. {% include get-started.md %} +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. @@ -26,7 +29,8 @@ 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, it will automatically install python3.12 to use with aider. +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/). diff --git a/aider/website/docs/install/optional.md b/aider/website/docs/install/optional.md index 34584cb0fdc..d1f3409149d 100644 --- a/aider/website/docs/install/optional.md +++ b/aider/website/docs/install/optional.md @@ -107,12 +107,5 @@ If you want the very latest development version of aider you can install directly from GitHub: ``` -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 . -``` - From 5bc63f7a33d41f1e0629eb46ed3921c5a7e7df1a Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 09:25:29 -0800 Subject: [PATCH 042/102] copy --- aider/website/docs/install/optional.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/aider/website/docs/install/optional.md b/aider/website/docs/install/optional.md index d1f3409149d..901274d49e7 100644 --- a/aider/website/docs/install/optional.md +++ b/aider/website/docs/install/optional.md @@ -74,13 +74,17 @@ Installing PortAudio is completely optional, but can usually be accomplished lik - 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 @@ -90,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 @@ -104,7 +108,7 @@ 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: ``` aider --install-main-branch From 830d5ee7632aba1c58804f3a49c5b64d753cc189 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 09:27:22 -0800 Subject: [PATCH 043/102] copy --- aider/website/docs/install/codespaces.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/website/docs/install/codespaces.md b/aider/website/docs/install/codespaces.md index fd0146bccba..e99175c8528 100644 --- a/aider/website/docs/install/codespaces.md +++ b/aider/website/docs/install/codespaces.md @@ -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.
From 2f4f59d82f68074b65c4a4afcef15b001e9d2201 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 09:29:21 -0800 Subject: [PATCH 044/102] copy --- aider/website/docs/install.md | 6 +----- aider/website/docs/install/replit.md | 8 ++++++++ 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 aider/website/docs/install/replit.md diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index a531453413a..9eae3dbe61c 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -50,10 +50,6 @@ Also see the [docs on other methods for installing pipx itself](https://pipx.pypa.io/stable/installation/). -### pipx on replit - -{% include replit-pipx.md %} - ## Install with pip You can directly install aider with pip, but one of the above @@ -85,7 +81,7 @@ 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. -## You are done! +## 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. diff --git a/aider/website/docs/install/replit.md b/aider/website/docs/install/replit.md new file mode 100644 index 00000000000..cb277a86dac --- /dev/null +++ b/aider/website/docs/install/replit.md @@ -0,0 +1,8 @@ +--- +parent: Installation +nav_order: 900 +--- + +### Replit + +{% include replit-pipx.md %} From 024b9840f0f80dc7a2310a1c88b3508446429fa6 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 09:34:51 -0800 Subject: [PATCH 045/102] copy --- aider/website/_includes/conflicts.md | 21 ------------------- aider/website/docs/troubleshooting/imports.md | 12 +++++++++++ 2 files changed, 12 insertions(+), 21 deletions(-) delete mode 100644 aider/website/_includes/conflicts.md diff --git a/aider/website/_includes/conflicts.md b/aider/website/_includes/conflicts.md deleted file mode 100644 index c5f0658f43b..00000000000 --- a/aider/website/_includes/conflicts.md +++ /dev/null @@ -1,21 +0,0 @@ - -## Avoid package conflicts - -You can avoid python package conflicts by installing aider using -[pipx](/docs/install/pipx.html) -or -[uv](/docs/install/uv.html). - -If you are using aider to work on a python project, sometimes your project will require -specific versions of python packages which conflict with the versions that aider -requires. -If this happens, the `python -m pip install aider-chat` command may return errors like these: - -``` -aider-chat 0.23.0 requires somepackage==X.Y.Z, but you have somepackage U.W.V which is incompatible. -``` - -which will install it globally on your system -within its own python environment. -This way you can use aider to work on any python project, -even if that project has conflicting dependencies. diff --git a/aider/website/docs/troubleshooting/imports.md b/aider/website/docs/troubleshooting/imports.md index 8fa05c7e4ed..c512b972582 100644 --- a/aider/website/docs/troubleshooting/imports.md +++ b/aider/website/docs/troubleshooting/imports.md @@ -13,6 +13,18 @@ or if aider is reporting `ImportErrors` it is likely that your aider install is using incorrect dependencies. + +## Avoid package conflicts + +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, you may see errors like these when running pip installs: + +``` +aider-chat 0.23.0 requires somepackage==X.Y.Z, but you have somepackage U.W.V which is incompatible. +``` + ## Install with aider-install, uv or pipx If you are having dependency problems you should consider From 0b60c4825377147a3c05937ae899a6c8756eb48f Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 15 Dec 2024 16:00:40 -0800 Subject: [PATCH 046/102] fixed gemini metadata keys --- aider/resources/model-metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/resources/model-metadata.json b/aider/resources/model-metadata.json index 40bc985a189..567064bc9d2 100644 --- a/aider/resources/model-metadata.json +++ b/aider/resources/model-metadata.json @@ -1,5 +1,5 @@ { - "gemini-2.0-flash-exp": { + "vertex_ai-language-models/gemini-2.0-flash-exp": { "max_tokens": 8192, "max_input_tokens": 1048576, "max_output_tokens": 8192, @@ -17,7 +17,7 @@ "supports_response_schema": true, "source": "https://cloud.google.com/vertex-ai/generative-ai/docs/gemini-v2" }, - "gemini-2.0-flash-exp": { + "gemini/gemini-2.0-flash-exp": { "max_tokens": 8192, "max_input_tokens": 1048576, "max_output_tokens": 8192, From 86f38e11cdfd67bd85e6b8712e25e23ac81c6ad0 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 16 Dec 2024 08:27:02 -0800 Subject: [PATCH 047/102] feat: Add MANIFEST.in to exclude website assets --- MANIFEST.in | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000000..3402ed70fb9 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,9 @@ +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 * +global-exclude .DS_Store From f7f305a564306cebff9852857ffa9aeb8461e8fb Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 08:28:09 -0800 Subject: [PATCH 048/102] fix: Update include pattern for assets --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1788085ae9b..9fbaf2815dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ include = ["aider*", "aider.website"] "docs/ctags.md", "docs/unified-diffs.md", "docs/leaderboards/index.md", -"assets/**", +"**/assets/**", "**/.DS_Store", # [[[end]]] ] From ff37d8c691938b7d5ef75fc60e86089445309491 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 16 Dec 2024 08:28:10 -0800 Subject: [PATCH 049/102] feat: Add include-package-data to pyproject.toml --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 9fbaf2815dd..fe2d912f9a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,9 @@ help = { file = "requirements/requirements-help.txt" } browser = { file = "requirements/requirements-browser.txt" } playwright = { file = "requirements/requirements-playwright.txt" } +[tool.setuptools] +include-package-data = true + [tool.setuptools.packages.find] include = ["aider*", "aider.website"] From d298f864fa53781806bceb864692afcfc9b4a755 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 11:55:24 -0800 Subject: [PATCH 050/102] works? --- MANIFEST.in | 1 + pyproject.toml | 19 +------------------ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 3402ed70fb9..d8b8fbb2451 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ recursive-exclude aider/website/examples * recursive-exclude aider/website/_posts * +exclude **/OLD/** exclude aider/website/HISTORY.md exclude aider/website/docs/benchmarks*.md exclude aider/website/docs/ctags.md diff --git a/pyproject.toml b/pyproject.toml index fe2d912f9a1..1ae33a2da2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,29 +42,12 @@ playwright = { file = "requirements/requirements-playwright.txt" } include-package-data = true [tool.setuptools.packages.find] -include = ["aider*", "aider.website"] +include = ["aider"] [tool.setuptools.package-data] "aider" = ["queries/*.scm"] "aider.website" = ["**/*.md"] -[tool.setuptools.exclude-package-data] -"aider.website" = [ -# [[[cog -# cog.out("\n".join(f' "{pat}",' for pat in exclude_website_pats)) -# ]]] -"examples/**", -"_posts/**", -"HISTORY.md", -"docs/benchmarks*md", -"docs/ctags.md", -"docs/unified-diffs.md", -"docs/leaderboards/index.md", -"**/assets/**", -"**/.DS_Store", -# [[[end]]] -] - [build-system] requires = ["setuptools>=68", "setuptools_scm[toml]>=8"] build-backend = "setuptools.build_meta" From dece2193fc0fe3018f22170b994a92be58c6eaa4 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:07:02 -0800 Subject: [PATCH 051/102] Switch to MANIFEST.in to exclude aider/website/assets/ and other from whl build file --- MANIFEST.in | 8 ++++++-- aider/help_pats.py | 4 +++- pyproject.toml | 4 ---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index d8b8fbb2451..ba9b75c255b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,10 +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 **/OLD/** 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 * -global-exclude .DS_Store +recursive-exclude aider/website *.js +recursive-exclude aider/website *.html +recursive-exclude aider/website *.yml diff --git a/aider/help_pats.py b/aider/help_pats.py index b86ef51f85f..5d2b14865b1 100644 --- a/aider/help_pats.py +++ b/aider/help_pats.py @@ -1,4 +1,7 @@ +# This needs to sync with MANIFEST.in + exclude_website_pats = [ + "**/.DS_Store", "examples/**", "_posts/**", "HISTORY.md", @@ -7,5 +10,4 @@ "docs/unified-diffs.md", "docs/leaderboards/index.md", "assets/**", - "**/.DS_Store", ] diff --git a/pyproject.toml b/pyproject.toml index 1ae33a2da2d..f0d892bbc4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,10 +44,6 @@ include-package-data = true [tool.setuptools.packages.find] include = ["aider"] -[tool.setuptools.package-data] -"aider" = ["queries/*.scm"] -"aider.website" = ["**/*.md"] - [build-system] requires = ["setuptools>=68", "setuptools_scm[toml]>=8"] build-backend = "setuptools.build_meta" From 01382527f51f137f2e263f646065863f622d66fd Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:08:08 -0800 Subject: [PATCH 052/102] cleanup cog of toml --- pyproject.toml | 4 ---- scripts/versionbump.py | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f0d892bbc4e..f7b25eee8a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,3 @@ -# [[[cog -# from aider.help_pats import exclude_website_pats -# ]]] -# [[[end]]] [project] name = "aider-chat" diff --git a/scripts/versionbump.py b/scripts/versionbump.py index 7e09e1af140..859cab1d724 100755 --- a/scripts/versionbump.py +++ b/scripts/versionbump.py @@ -10,15 +10,6 @@ from packaging import version -def check_cog_pyproject(): - result = subprocess.run(["cog", "--check", "pyproject.toml"], capture_output=True, text=True) - - if result.returncode != 0: - print("Error: cog --check pyproject.toml failed, updating.") - subprocess.run(["cog", "-r", "pyproject.toml"]) - sys.exit(1) - - def main(): parser = argparse.ArgumentParser(description="Bump version") parser.add_argument("new_version", help="New version in x.y.z format") @@ -82,7 +73,6 @@ def check_main_branch_up_to_date(): dry_run = args.dry_run # Perform checks before proceeding - check_cog_pyproject() check_branch() check_working_directory_clean() check_main_branch_up_to_date() From d89be8341496a76c9add28334920e79b03b03b19 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:10:34 -0800 Subject: [PATCH 053/102] copy --- aider/website/assets/sample-analytics.jsonl | 126 ++++++++++---------- aider/website/docs/faq.md | 6 +- 2 files changed, 66 insertions(+), 66 deletions(-) diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 744c3e04463..028ae098b7a 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,66 +1,3 @@ -{"event": "command_diff", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786401} -{"event": "command_undo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786423} -{"event": "command_undo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786429} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786433} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786450} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786450} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786450} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786454} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786457} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786466} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786468} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786468} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786468} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786471} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786475} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786503} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786533} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786589} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786589} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786589} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786591} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786596} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786597} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786707} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786707} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786707} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786834} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786836} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786837} -{"event": "command_chat-mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786837} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786941} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786943} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786943} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786943} -{"event": "command_chat-mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786944} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786985} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786987} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786987} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786987} -{"event": "command_chat-mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786988} -{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786990} -{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786990} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786993} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733786993} -{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787001} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787073} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787074} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787074} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787144} -{"event": "model warning", "properties": {"main_model": "openrouter/REDACTED", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "openrouter/REDACTED"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787146} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787152} -{"event": "cli session", "properties": {"main_model": "openrouter/REDACTED", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "openrouter/REDACTED", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787152} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787270} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787272} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787272} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787272} -{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787287} -{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787287} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787287} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 14206, "completion_tokens": 249, "total_tokens": 14455, "cost": 0.046353000000000005, "total_cost": 0.046353000000000005}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787295} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787304} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787304} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787304} {"event": "command_read-only", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787308} {"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787315} {"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787318} @@ -998,3 +935,66 @@ {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734281354} {"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734281354} {"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734281354} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734306938} +{"event": "exit", "properties": {"reason": "Listed models"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734306940} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307247} +{"event": "model warning", "properties": {"main_model": "None", "weak_model": "gemini/REDACTED", "editor_model": "None"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307249} +{"event": "exit", "properties": {"reason": "Keyboard interrupt during model warnings"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307253} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307266} +{"event": "repo", "properties": {"num_files": 407}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307268} +{"event": "cli session", "properties": {"main_model": "gemini/REDACTED", "weak_model": "gemini/REDACTED", "editor_model": "gemini/REDACTED", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307268} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307269} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307269} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307332} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307332} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734307332} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734309683} +{"event": "repo", "properties": {"num_files": 407}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734309685} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734309685} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734309771} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734309771} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734310052} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734310052} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 1845, "completion_tokens": 184, "total_tokens": 2029, "cost": 0.008295, "total_cost": 0.008295}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734310058} +{"event": "exit", "properties": {"reason": "Completed main CLI coder.run"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734322619} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734364658} +{"event": "repo", "properties": {"num_files": 407}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734364660} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734364660} +{"event": "command_chat-mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734364664} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734364683} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 1731, "completion_tokens": 205, "total_tokens": 1936, "cost": 0.008268, "total_cost": 0.008268}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734364689} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734364703} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 1840, "completion_tokens": 282, "total_tokens": 2122, "cost": 0.00975, "total_cost": 0.018018}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734364709} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734364782} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2152, "completion_tokens": 152, "total_tokens": 2304, "cost": 0.008736, "total_cost": 0.026754}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734364786} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734365662} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2293, "completion_tokens": 246, "total_tokens": 2539, "cost": 0.010569, "total_cost": 0.037323}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734365668} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734365701} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2552, "completion_tokens": 296, "total_tokens": 2848, "cost": 0.012096, "total_cost": 0.049419000000000005}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734365709} +{"event": "command_model", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734365938} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734365959} +{"event": "message_send", "properties": {"main_model": "o1-preview", "weak_model": "gpt-4o-mini", "editor_model": "gpt-4o", "edit_format": "ask", "prompt_tokens": 2847, "completion_tokens": 1618, "total_tokens": 4465, "cost": 0.139785, "total_cost": 0.18920399999999998}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734365986} +{"event": "command_model", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366406} +{"event": "command_code", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366412} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366412} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 6667, "completion_tokens": 162, "total_tokens": 6829, "cost": 0.022431, "total_cost": 0.211635}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366419} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366473} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 4864, "completion_tokens": 161, "total_tokens": 5025, "cost": 0.017007, "total_cost": 0.22864199999999998}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366479} +{"event": "command_code", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366484} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366484} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-haiku-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 7122, "completion_tokens": 133, "total_tokens": 7255, "cost": 0.023361, "total_cost": 0.252003}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366489} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366556} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366680} +{"event": "repo", "properties": {"num_files": 408}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366682} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366682} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366685} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366685} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 1314, "completion_tokens": 122, "total_tokens": 1436, "cost": 0.005772, "total_cost": 0.005772}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734366689} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379308} +{"event": "repo", "properties": {"num_files": 408}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379310} +{"event": "exit", "properties": {"reason": "Showed repo map"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379311} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379350} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379350} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379776} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379776} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379776} diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index dd37f59a14b..b679e16cd42 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -237,9 +237,9 @@ tr:hover { background-color: #f5f5f5; } - - - + + + From 07353207c06e148489eb89f14742879d86f0509e Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:13:31 -0800 Subject: [PATCH 054/102] feat: Output "Use AI!" if no action triggered --- aider/watch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aider/watch.py b/aider/watch.py index 45f4224fd01..27c79126499 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -157,6 +157,7 @@ def process_changes(self): self.coder.abs_fnames.add(fname) rel_fname = self.coder.get_rel_fname(fname) self.io.tool_output(f"Added {rel_fname} to the chat") + # if there has never been an "action" triggered, also output "Use AI! or AI? to trigger processing" AI! self.io.tool_output() if not has_action: From 0f7c4a8d4f538f8767d634efceec85b83732393c Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 16 Dec 2024 12:13:32 -0800 Subject: [PATCH 055/102] feat: Add help message for first-time AI usage --- aider/watch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/watch.py b/aider/watch.py index 27c79126499..3f1d955262c 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -157,7 +157,8 @@ def process_changes(self): self.coder.abs_fnames.add(fname) rel_fname = self.coder.get_rel_fname(fname) self.io.tool_output(f"Added {rel_fname} to the chat") - # if there has never been an "action" triggered, also output "Use AI! or AI? to trigger processing" AI! + if not has_action: + self.io.tool_output("Use AI! to request changes or AI? to ask questions about the code") self.io.tool_output() if not has_action: From 9ae04cf1ec0a555a523524450d40aeb76a985ca3 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 16 Dec 2024 12:13:35 -0800 Subject: [PATCH 056/102] style: Format tool output message --- aider/watch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aider/watch.py b/aider/watch.py index 3f1d955262c..9a1ac33a3d8 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -158,7 +158,9 @@ def process_changes(self): rel_fname = self.coder.get_rel_fname(fname) self.io.tool_output(f"Added {rel_fname} to the chat") if not has_action: - self.io.tool_output("Use AI! to request changes or AI? to ask questions about the code") + self.io.tool_output( + "Use AI! to request changes or AI? to ask questions about the code" + ) self.io.tool_output() if not has_action: From 0bef52ae7d36ec502a55e73ac319340b350d5812 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:27:19 -0800 Subject: [PATCH 057/102] fix: Only show AI comment help once per file add --- aider/watch.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/aider/watch.py b/aider/watch.py index 9a1ac33a3d8..016581870a7 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -145,6 +145,7 @@ 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 ("!", "?"): @@ -156,14 +157,16 @@ def process_changes(self): 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: - self.io.tool_output( - "Use AI! to request changes or AI? to ask questions about the code" - ) - self.io.tool_output() 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: From b87c7987bb07ed8f7028474aaea1b407aa122b20 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:29:10 -0800 Subject: [PATCH 058/102] copy --- aider/website/assets/sample-analytics.jsonl | 72 ++++++++++----------- aider/website/docs/faq.md | 6 +- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 028ae098b7a..376d0004663 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,39 +1,3 @@ -{"event": "command_read-only", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787308} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787315} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787318} -{"event": "command_read-only", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787319} -{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787320} -{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787320} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787345} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787347} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 27999, "completion_tokens": 386, "total_tokens": 28385, "cost": 0.089787, "total_cost": 0.13614}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787360} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787383} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787383} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787383} -{"event": "command_run", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787394} -{"event": "command_diff", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787409} -{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787452} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787452} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787457} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787458} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787459} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787464} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787464} -{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787468} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787580} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787580} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733787580} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733798797} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733798798} -{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733798804} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733799138} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733799138} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733799138} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733799143} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733799151} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 4588, "completion_tokens": 141, "total_tokens": 4729, "cost": 0.015879, "total_cost": 0.015879}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733799158} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733799213} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803464} {"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803464} {"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803464} {"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803464} @@ -998,3 +962,39 @@ {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379776} {"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379776} {"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379776} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379892} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379892} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379892} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379945} +{"event": "repo", "properties": {"num_files": 408}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379947} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734379947} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380003} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380003} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380003} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5533, "completion_tokens": 252, "total_tokens": 5785, "cost": 0.020378999999999998, "total_cost": 0.020378999999999998}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380010} +{"event": "command_diff", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380614} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380689} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380692} +{"event": "repo", "properties": {"num_files": 408}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380694} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380694} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380696} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380737} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380739} +{"event": "repo", "properties": {"num_files": 408}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380740} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380740} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380743} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380774} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380775} +{"event": "repo", "properties": {"num_files": 408}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380777} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380777} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380779} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380783} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380805} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380806} +{"event": "repo", "properties": {"num_files": 408}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380808} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380808} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380810} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380830} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380835} +{"event": "repo", "properties": {"num_files": 408}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380836} +{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380839} diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index b679e16cd42..31ed911e7ce 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -237,9 +237,9 @@ tr:hover { background-color: #f5f5f5; }
Model NameTotal TokensPercent
claude-3-5-sonnet-202410221,637,56389.1%
gemini/REDACTED82,5724.5%
o1-preview79,3174.3%
claude-3-5-sonnet-202410221,657,43189.0%
o1-preview83,7824.5%
gemini/REDACTED82,5724.4%
deepseek/deepseek-coder24,6281.3%
gpt-4o9,2430.5%
gpt-4o-mini3,4200.2%
- - - + + + From b1c04dece9cc045fac59bd634ef8885755789e80 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:34:51 -0800 Subject: [PATCH 059/102] version bump to 0.69.1 --- aider/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/__init__.py b/aider/__init__.py index fd94a76a92e..24362beadda 100644 --- a/aider/__init__.py +++ b/aider/__init__.py @@ -1,6 +1,6 @@ from packaging import version -__version__ = "0.69.1.dev" +__version__ = "0.69.1" safe_version = __version__ try: From 5c848d59b2c3a0802970103a4ee8c9dada760402 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:36:28 -0800 Subject: [PATCH 060/102] set version to 0.69.2.dev --- aider/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/__init__.py b/aider/__init__.py index 24362beadda..dc368428ff4 100644 --- a/aider/__init__.py +++ b/aider/__init__.py @@ -1,6 +1,6 @@ from packaging import version -__version__ = "0.69.1" +__version__ = "0.69.2.dev" safe_version = __version__ try: From b37d89bd08ea95ce565f11548576e0fbc4183708 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:37:10 -0800 Subject: [PATCH 061/102] copy --- aider/website/docs/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index 9eae3dbe61c..aee6e7a74dd 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -25,7 +25,7 @@ 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 +uv tool install --force --python python3.12 aider-chat ``` You can use uv to install aider with your existing python versions 3.8-3.13. From 23c95d24f18ab4a0989591e354f716e98f14ac99 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:38:01 -0800 Subject: [PATCH 062/102] copy --- aider/website/docs/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index aee6e7a74dd..4789fe799d8 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -25,7 +25,7 @@ A recommended way to install aider is with uv: ```bash python -m pip install uv # If you need to install uv -uv tool install --force --python python3.12 aider-chat +uv tool install --force --python python3.12 aider-chat@latest ``` You can use uv to install aider with your existing python versions 3.8-3.13. From ecfb133de2de267f49376b5045585b3cc189f6df Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:40:29 -0800 Subject: [PATCH 063/102] copy --- aider/website/docs/config/api-keys.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aider/website/docs/config/api-keys.md b/aider/website/docs/config/api-keys.md index d31cd1b8996..e7906723206 100644 --- a/aider/website/docs/config/api-keys.md +++ b/aider/website/docs/config/api-keys.md @@ -6,6 +6,13 @@ description: Setting API keys for API providers. # API Keys +Aider lets you specify API keys in a few ways: + +- On the command line +- As environment variables +- In a `.env` file +- In your `.aider.conf.yml` config file + ### OpenAI and Anthropic Aider has special support for providing From 47d5b6698689e578527a8b5f0c56ca553f1d1396 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:44:21 -0800 Subject: [PATCH 064/102] copy --- aider/website/docs/config/api-keys.md | 55 +++++++++++++++++---------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/aider/website/docs/config/api-keys.md b/aider/website/docs/config/api-keys.md index e7906723206..f353579f1df 100644 --- a/aider/website/docs/config/api-keys.md +++ b/aider/website/docs/config/api-keys.md @@ -13,24 +13,23 @@ Aider lets you specify API keys in a few ways: - In a `.env` file - In your `.aider.conf.yml` config file -### OpenAI and Anthropic +--- + +## 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. +#### Command line + 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: -anthropic-api-key: -``` +#### Environment variables or .env file You can also store them in environment variables or a [.env file](/docs/config/dotenv.html), which also works @@ -41,16 +40,43 @@ OPENAI_API_KEY= ANTHROPIC_API_KEY= ``` +#### Yaml config file +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: +anthropic-api-key: +``` + + +--- + +## Other API providers + All other LLM providers can use one of these other methods to set their API keys. -### API keys on the command line +#### Command line {: .no_toc } Use `--api-key provider=` which has the effect of setting the environment variable `PROVIDER_API_KEY=`. So `--api-key gemini=xxx` would set `GEMINI_API_KEY=xxx`. -### API keys in .aider.conf.yml +#### Environment variables or .env file {: .no_toc } +You can set API keys in environment variables. +The [.env file](/docs/config/dotenv.html) +is a great place to store your API keys and other provider API environment variables: + +```bash +GEMINI_API_KEY=foo +OPENROUTER_API_KEY=bar +DEEPSEEK_API_KEY=baz +``` + +#### Yaml config file + + You can also set API keys in the [`.aider.conf.yml` file](/docs/config/aider_conf.html) via the `api-key` entry: @@ -62,14 +88,3 @@ api-key: - 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 -``` From 85218d74d4305c5b52fcc287a4bf5424b0a7b694 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:47:06 -0800 Subject: [PATCH 065/102] don't block pre-commit for faq cog --- aider/website/assets/sample-analytics.jsonl | 12 ++++++------ scripts/update-docs.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 376d0004663..13b24d1f385 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,9 +1,3 @@ -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803464} -{"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803464} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803464} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803471} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803488} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803488} {"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803488} {"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803488} {"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803522} @@ -998,3 +992,9 @@ {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380835} {"event": "repo", "properties": {"num_files": 408}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380836} {"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734380839} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734381008} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734381008} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734381008} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734381366} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734381367} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734381367} diff --git a/scripts/update-docs.sh b/scripts/update-docs.sh index 62218c3c508..fdf4791b34d 100755 --- a/scripts/update-docs.sh +++ b/scripts/update-docs.sh @@ -11,6 +11,7 @@ fi if [ "$ARG" != "--check" ]; then tail -1000 ~/.aider/analytics.jsonl > aider/website/assets/sample-analytics.jsonl + cog -r aider/website/docs/faq.md fi # README.md before index.md, because index.md uses cog to include README.md @@ -20,7 +21,6 @@ cog $ARG \ aider/website/HISTORY.md \ aider/website/docs/usage/commands.md \ aider/website/docs/languages.md \ - aider/website/docs/faq.md \ aider/website/docs/config/dotenv.md \ aider/website/docs/config/options.md \ aider/website/docs/config/aider_conf.md \ From e4e16b8f77dd34e170c6838ab2a2588b994ae07c Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 16 Dec 2024 12:56:49 -0800 Subject: [PATCH 066/102] fix: Correctly select table body element --- aider/website/_includes/refactor-leaderboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/website/_includes/refactor-leaderboard.js b/aider/website/_includes/refactor-leaderboard.js index d540bde6525..a3945b63c8a 100644 --- a/aider/website/_includes/refactor-leaderboard.js +++ b/aider/website/_includes/refactor-leaderboard.js @@ -41,7 +41,7 @@ document.addEventListener('DOMContentLoaded', function () { leaderboardChart.update(); } - var tableBody = document.querySelectorAll('table tbody')[1]; + var tableBody = document.querySelector('table tbody'); allData.forEach(function(row, index) { var tr = tableBody.children[index]; tr.id = 'refac-row-' + index; @@ -69,7 +69,7 @@ document.addEventListener('DOMContentLoaded', function () { // 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 tableBody = document.querySelector('table tbody'); var rows = tableBody.getElementsByTagName('tr'); leaderboardData.labels = []; From 2627c5baaf0315c706e3a1add97369f03968feff Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 12:57:56 -0800 Subject: [PATCH 067/102] refac leaderboard --- MANIFEST.in | 2 +- .../docs/leaderboards/by-release-date.md | 10 ++++ aider/website/docs/leaderboards/index.md | 57 +------------------ aider/website/docs/leaderboards/refactor.md | 50 ++++++++++++++++ 4 files changed, 64 insertions(+), 55 deletions(-) create mode 100644 aider/website/docs/leaderboards/by-release-date.md create mode 100644 aider/website/docs/leaderboards/refactor.md diff --git a/MANIFEST.in b/MANIFEST.in index ba9b75c255b..d0d94cad790 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -7,7 +7,7 @@ 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/docs/leaderboards * recursive-exclude aider/website/assets * recursive-exclude aider/website *.js recursive-exclude aider/website *.html diff --git a/aider/website/docs/leaderboards/by-release-date.md b/aider/website/docs/leaderboards/by-release-date.md new file mode 100644 index 00000000000..78cac1ae66f --- /dev/null +++ b/aider/website/docs/leaderboards/by-release-date.md @@ -0,0 +1,10 @@ +--- +title: Scores by release date +parent: Aider LLM Leaderboards +nav_order: 200 +--- + +## LLM code editing skill by model release date + +[![connecting to many LLMs](/assets/models-over-time.svg)](https://aider.chat/assets/models-over-time.svg) + diff --git a/aider/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md index 39cf38fe380..1679c516b6c 100644 --- a/aider/website/docs/leaderboards/index.md +++ b/aider/website/docs/leaderboards/index.md @@ -2,27 +2,22 @@ highlight_image: /assets/leaderboard.jpg nav_order: 950 description: Quantitative benchmarks of LLM code editing skill. +has_children: true --- # Aider LLM Leaderboards -{: .no_toc } Aider works best with LLMs which are good at *editing* code, not just good at writing code. -To evaluate an LLM's editing skill, aider uses a pair of benchmarks that +To evaluate an LLM's editing skill, aider uses benchmarks that assess a model's ability to consistently follow the system prompt to successfully edit code. -The leaderboards below report the results from a number of popular LLMs. +The leaderboards report the results from a number of popular LLMs. While [aider can connect to almost any LLM](/docs/llms.html), it works best with models that score well on the benchmarks. -See the following sections for benchmark -results and additional information: -- TOC -{:toc} - ## Code editing leaderboard [Aider's code editing benchmark](/docs/benchmarks.html#the-benchmark) asks the LLM to edit python source files to complete 133 small coding exercises @@ -79,52 +74,6 @@ The model also has to successfully apply all its changes to the source file with } -## Code refactoring leaderboard - -[Aider's refactoring benchmark](https://github.com/Aider-AI/refactor-benchmark) asks the LLM to refactor 89 large methods from large python classes. This is a more challenging benchmark, which tests the model's ability to output long chunks of code without skipping sections or making mistakes. It was developed to provoke and measure [GPT-4 Turbo's "lazy coding" habit](/2023/12/21/unified-diffs.html). - -The refactoring benchmark requires a large context window to -work with large source files. -Therefore, results are available for fewer models. - - - -
Model NameTotal TokensPercent
claude-3-5-sonnet-202410221,657,43189.0%
o1-preview83,7824.5%
gemini/REDACTED82,5724.4%
claude-3-5-sonnet-202410221,630,10288.9%
o1-preview83,7824.6%
gemini/REDACTED82,5724.5%
deepseek/deepseek-coder24,6281.3%
gpt-4o9,2430.5%
gpt-4o-mini3,4200.2%
- - - - - - - - - - - {% assign refac_sorted = site.data.refactor_leaderboard | sort: 'pass_rate_1' | reverse %} - {% for row in refac_sorted %} - - - - - - - - {% endfor %} - -
ModelPercent completed correctlyPercent using correct edit formatCommandEdit format
{{ row.model }}{{ row.pass_rate_1 }}%{{ row.percent_cases_well_formed }}%{{ row.command }}{{ row.edit_format }}
- - - - - - - -## LLM code editing skill by model release date - -[![connecting to many LLMs](/assets/models-over-time.svg)](https://aider.chat/assets/models-over-time.svg) - ## Notes on benchmarking results diff --git a/aider/website/docs/leaderboards/refactor.md b/aider/website/docs/leaderboards/refactor.md new file mode 100644 index 00000000000..21e0d0ed83d --- /dev/null +++ b/aider/website/docs/leaderboards/refactor.md @@ -0,0 +1,50 @@ +--- +parent: Aider LLM Leaderboards +highlight_image: /assets/leaderboard.jpg +nav_order: 100 +description: Quantitative benchmark of LLM code refactoring skill. +--- + + +## Aider refactoring leaderboard + +[Aider's refactoring benchmark](https://github.com/Aider-AI/refactor-benchmark) asks the LLM to refactor 89 large methods from large python classes. This is a more challenging benchmark, which tests the model's ability to output long chunks of code without skipping sections or making mistakes. It was developed to provoke and measure [GPT-4 Turbo's "lazy coding" habit](/2023/12/21/unified-diffs.html). + +The refactoring benchmark requires a large context window to +work with large source files. +Therefore, results are available for fewer models. + + + + + + + + + + + + + + + {% assign refac_sorted = site.data.refactor_leaderboard | sort: 'pass_rate_1' | reverse %} + {% for row in refac_sorted %} + + + + + + + + {% endfor %} + +
ModelPercent completed correctlyPercent using correct edit formatCommandEdit format
{{ row.model }}{{ row.pass_rate_1 }}%{{ row.percent_cases_well_formed }}%{{ row.command }}{{ row.edit_format }}
+ + + + + + + From 1869ab94feb47cab5688766871e56743ed9d2fc6 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 13:01:25 -0800 Subject: [PATCH 068/102] copy --- aider/website/assets/sample-analytics.jsonl | 20 ++++++++++---------- aider/website/docs/faq.md | 4 ++-- aider/website/docs/leaderboards/index.md | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 13b24d1f385..2cbf381db56 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,13 +1,3 @@ -{"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803488} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803488} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803522} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803524} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803524} -{"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803524} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803524} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803533} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803534} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803534} {"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803534} {"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803535} {"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803552} @@ -998,3 +988,13 @@ {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734381366} {"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734381367} {"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734381367} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382583} +{"event": "repo", "properties": {"num_files": 408}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382585} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382585} +{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382589} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382591} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382591} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2545, "completion_tokens": 295, "total_tokens": 2840, "cost": 0.012060000000000001, "total_cost": 0.012060000000000001}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382600} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382602} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5000, "completion_tokens": 229, "total_tokens": 5229, "cost": 0.018435, "total_cost": 0.030495}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382608} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382644} diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index 31ed911e7ce..c6b4a776f0c 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -237,8 +237,8 @@ tr:hover { background-color: #f5f5f5; } - - + + diff --git a/aider/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md index 1679c516b6c..b9c6d283fd0 100644 --- a/aider/website/docs/leaderboards/index.md +++ b/aider/website/docs/leaderboards/index.md @@ -132,6 +132,6 @@ mod_dates = [get_last_modified_date(file) for file in files] latest_mod_date = max(mod_dates) cog.out(f"{latest_mod_date.strftime('%B %d, %Y.')}") ]]]--> -December 11, 2024. +December 16, 2024.

From 5e0cb8d6584bd7c17e70527d8c13f7014465c4bb Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 15:34:08 -0800 Subject: [PATCH 069/102] add install.ps1 --- MANIFEST.in | 4 + aider/website/install.ps1 | 559 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 563 insertions(+) create mode 100644 aider/website/install.ps1 diff --git a/MANIFEST.in b/MANIFEST.in index d0d94cad790..9ce82277f0e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,12 +1,16 @@ # 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/install.ps1 + recursive-exclude aider/website/docs/leaderboards * recursive-exclude aider/website/assets * recursive-exclude aider/website *.js diff --git a/aider/website/install.ps1 b/aider/website/install.ps1 new file mode 100644 index 00000000000..116b5e11840 --- /dev/null +++ b/aider/website/install.ps1 @@ -0,0 +1,559 @@ +# Licensed under the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +<# +.SYNOPSIS + +The installer for uv 0.5.9 + +.DESCRIPTION + +This script detects what platform you're on and fetches an appropriate archive from +https://github.com/astral-sh/uv/releases/download/0.5.9 +then unpacks the binaries and installs them to the first of the following locations + + $env:XDG_BIN_HOME + $env:XDG_DATA_HOME/../bin + $HOME/.local/bin + +It will then add that dir to PATH by editing your Environment.Path registry key + +.PARAMETER ArtifactDownloadUrl +The URL of the directory where artifacts can be fetched from + +.PARAMETER NoModifyPath +Don't add the install directory to PATH + +.PARAMETER Help +Print help + +#> + +param ( + [Parameter(HelpMessage = "The URL of the directory where artifacts can be fetched from")] + [string]$ArtifactDownloadUrl = 'https://github.com/astral-sh/uv/releases/download/0.5.9', + [Parameter(HelpMessage = "Don't add the install directory to PATH")] + [switch]$NoModifyPath, + [Parameter(HelpMessage = "Print Help")] + [switch]$Help +) + +$app_name = 'uv' +$app_version = '0.5.9' +if ($env:UV_INSTALLER_GHE_BASE_URL) { + $installer_base_url = $env:UV_INSTALLER_GHE_BASE_URL +} elseif ($env:UV_INSTALLER_GITHUB_BASE_URL) { + $installer_base_url = $env:UV_INSTALLER_GITHUB_BASE_URL +} else { + $installer_base_url = "https://github.com" +} +if ($env:INSTALLER_DOWNLOAD_URL) { + $ArtifactDownloadUrl = $env:INSTALLER_DOWNLOAD_URL +} else { + $ArtifactDownloadUrl = "$installer_base_url/astral-sh/uv/releases/download/0.5.9" +} + +$receipt = @" +{"binaries":["CARGO_DIST_BINS"],"binary_aliases":{},"cdylibs":["CARGO_DIST_DYLIBS"],"cstaticlibs":["CARGO_DIST_STATICLIBS"],"install_layout":"unspecified","install_prefix":"AXO_INSTALL_PREFIX","modify_path":true,"provider":{"source":"cargo-dist","version":"0.25.2-prerelease.3"},"source":{"app_name":"uv","name":"uv","owner":"astral-sh","release_type":"github"},"version":"0.5.9"} +"@ +$receipt_home = "${env:LOCALAPPDATA}\uv" + +if ($env:UV_DISABLE_UPDATE) { + $install_updater = $false +} else { + $install_updater = $true +} + +if ($NoModifyPath) { + Write-Information "-NoModifyPath has been deprecated; please set UV_NO_MODIFY_PATH=1 in the environment" +} + +if ($env:UV_NO_MODIFY_PATH) { + $NoModifyPath = $true +} + +$unmanaged_install = $env:UV_UNMANAGED_INSTALL + +if ($unmanaged_install) { + $NoModifyPath = $true + $install_updater = $false +} + +function Install-Binary($install_args) { + if ($Help) { + Get-Help $PSCommandPath -Detailed + Exit + } + + Initialize-Environment + + # Platform info injected by dist + $platforms = @{ + "aarch64-pc-windows-msvc" = @{ + "artifact_name" = "uv-x86_64-pc-windows-msvc.zip" + "bins" = @("uv.exe", "uvx.exe") + "libs" = @() + "staticlibs" = @() + "zip_ext" = ".zip" + "aliases" = @{ + } + "aliases_json" = '{}' + } + "i686-pc-windows-msvc" = @{ + "artifact_name" = "uv-i686-pc-windows-msvc.zip" + "bins" = @("uv.exe", "uvx.exe") + "libs" = @() + "staticlibs" = @() + "zip_ext" = ".zip" + "aliases" = @{ + } + "aliases_json" = '{}' + } + "x86_64-pc-windows-msvc" = @{ + "artifact_name" = "uv-x86_64-pc-windows-msvc.zip" + "bins" = @("uv.exe", "uvx.exe") + "libs" = @() + "staticlibs" = @() + "zip_ext" = ".zip" + "aliases" = @{ + } + "aliases_json" = '{}' + } + } + + $fetched = Download "$ArtifactDownloadUrl" $platforms + # FIXME: add a flag that lets the user not do this step + try { + Invoke-Installer -artifacts $fetched -platforms $platforms "$install_args" + } catch { + throw @" +We encountered an error trying to perform the installation; +please review the error messages below. + +$_ +"@ + } +} + +function Get-TargetTriple() { + try { + # NOTE: this might return X64 on ARM64 Windows, which is OK since emulation is available. + # It works correctly starting in PowerShell Core 7.3 and Windows PowerShell in Win 11 22H2. + # Ideally this would just be + # [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture + # but that gets a type from the wrong assembly on Windows PowerShell (i.e. not Core) + $a = [System.Reflection.Assembly]::LoadWithPartialName("System.Runtime.InteropServices.RuntimeInformation") + $t = $a.GetType("System.Runtime.InteropServices.RuntimeInformation") + $p = $t.GetProperty("OSArchitecture") + # Possible OSArchitecture Values: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.architecture + # Rust supported platforms: https://doc.rust-lang.org/stable/rustc/platform-support.html + switch ($p.GetValue($null).ToString()) + { + "X86" { return "i686-pc-windows-msvc" } + "X64" { return "x86_64-pc-windows-msvc" } + "Arm" { return "thumbv7a-pc-windows-msvc" } + "Arm64" { return "aarch64-pc-windows-msvc" } + } + } catch { + # The above was added in .NET 4.7.1, so Windows PowerShell in versions of Windows + # prior to Windows 10 v1709 may not have this API. + Write-Verbose "Get-TargetTriple: Exception when trying to determine OS architecture." + Write-Verbose $_ + } + + # This is available in .NET 4.0. We already checked for PS 5, which requires .NET 4.5. + Write-Verbose("Get-TargetTriple: falling back to Is64BitOperatingSystem.") + if ([System.Environment]::Is64BitOperatingSystem) { + return "x86_64-pc-windows-msvc" + } else { + return "i686-pc-windows-msvc" + } +} + +function Download($download_url, $platforms) { + $arch = Get-TargetTriple + + if (-not $platforms.ContainsKey($arch)) { + $platforms_json = ConvertTo-Json $platforms + throw "ERROR: could not find binaries for this platform. Last platform tried: $arch platform info: $platforms_json" + } + + # Lookup what we expect this platform to look like + $info = $platforms[$arch] + $zip_ext = $info["zip_ext"] + $bin_names = $info["bins"] + $lib_names = $info["libs"] + $staticlib_names = $info["staticlibs"] + $artifact_name = $info["artifact_name"] + + # Make a new temp dir to unpack things to + $tmp = New-Temp-Dir + $dir_path = "$tmp\$app_name$zip_ext" + + # Download and unpack! + $url = "$download_url/$artifact_name" + Write-Information "Downloading $app_name $app_version ($arch)" + Write-Verbose " from $url" + Write-Verbose " to $dir_path" + $wc = New-Object Net.Webclient + $wc.downloadFile($url, $dir_path) + + Write-Verbose "Unpacking to $tmp" + + # Select the tool to unpack the files with. + # + # As of windows 10(?), powershell comes with tar preinstalled, but in practice + # it only seems to support .tar.gz, and not xz/zstd. Still, we should try to + # forward all tars to it in case the user has a machine that can handle it! + switch -Wildcard ($zip_ext) { + ".zip" { + Expand-Archive -Path $dir_path -DestinationPath "$tmp"; + Break + } + ".tar.*" { + tar xf $dir_path --strip-components 1 -C "$tmp"; + Break + } + Default { + throw "ERROR: unknown archive format $zip_ext" + } + } + + # Let the next step know what to copy + $bin_paths = @() + foreach ($bin_name in $bin_names) { + Write-Verbose " Unpacked $bin_name" + $bin_paths += "$tmp\$bin_name" + } + $lib_paths = @() + foreach ($lib_name in $lib_names) { + Write-Verbose " Unpacked $lib_name" + $lib_paths += "$tmp\$lib_name" + } + $staticlib_paths = @() + foreach ($lib_name in $staticlib_names) { + Write-Verbose " Unpacked $lib_name" + $staticlib_paths += "$tmp\$lib_name" + } + + if (($null -ne $info["updater"]) -and $install_updater) { + $updater_id = $info["updater"]["artifact_name"] + $updater_url = "$download_url/$updater_id" + $out_name = "$tmp\uv-update.exe" + + $wc.downloadFile($updater_url, $out_name) + $bin_paths += $out_name + } + + return @{ + "bin_paths" = $bin_paths + "lib_paths" = $lib_paths + "staticlib_paths" = $staticlib_paths + } +} + +function Invoke-Installer($artifacts, $platforms) { + # Replaces the placeholder binary entry with the actual list of binaries + $arch = Get-TargetTriple + + if (-not $platforms.ContainsKey($arch)) { + $platforms_json = ConvertTo-Json $platforms + throw "ERROR: could not find binaries for this platform. Last platform tried: $arch platform info: $platforms_json" + } + + $info = $platforms[$arch] + + # Forces the install to occur at this path, not the default + $force_install_dir = $null + $install_layout = "unspecified" + # Check the newer app-specific variable before falling back + # to the older generic one + if (($env:UV_INSTALL_DIR)) { + $force_install_dir = $env:UV_INSTALL_DIR + $install_layout = "flat" + } elseif (($env:CARGO_DIST_FORCE_INSTALL_DIR)) { + $force_install_dir = $env:CARGO_DIST_FORCE_INSTALL_DIR + $install_layout = "flat" + } elseif ($unmanaged_install) { + $force_install_dir = $unmanaged_install + $install_layout = "flat" + } + + # Check if the install layout should be changed from `flat` to `cargo-home` + # for backwards compatible updates of applications that switched layouts. + if (($force_install_dir) -and ($install_layout -eq "flat")) { + # If the install directory is targeting the Cargo home directory, then + # we assume this application was previously installed that layout + # Note the installer passes the path with `\\` separators, but here they are + # `\` so we normalize for comparison. We don't use `Resolve-Path` because they + # may not exist. + $cargo_home = if ($env:CARGO_HOME) { $env:CARGO_HOME } else { + Join-Path $(if ($HOME) { $HOME } else { "." }) ".cargo" + } + if ($force_install_dir.Replace('\\', '\') -eq $cargo_home) { + $install_layout = "cargo-home" + } + } + + # The actual path we're going to install to + $dest_dir = $null + $dest_dir_lib = $null + # The install prefix we write to the receipt. + # For organized install methods like CargoHome, which have + # subdirectories, this is the root without `/bin`. For other + # methods, this is the same as `_install_dir`. + $receipt_dest_dir = $null + # Before actually consulting the configured install strategy, see + # if we're overriding it. + if (($force_install_dir)) { + switch ($install_layout) { + "hierarchical" { + $dest_dir = Join-Path $force_install_dir "bin" + $dest_dir_lib = Join-Path $force_install_dir "lib" + } + "cargo-home" { + $dest_dir = Join-Path $force_install_dir "bin" + $dest_dir_lib = $dest_dir + } + "flat" { + $dest_dir = $force_install_dir + $dest_dir_lib = $dest_dir + } + Default { + throw "Error: unrecognized installation layout: $install_layout" + } + } + $receipt_dest_dir = $force_install_dir + } + if (-Not $dest_dir) { + # Install to $env:XDG_BIN_HOME + $dest_dir = if (($base_dir = $env:XDG_BIN_HOME)) { + Join-Path $base_dir "" + } + $dest_dir_lib = $dest_dir + $receipt_dest_dir = $dest_dir + $install_layout = "flat" + } + if (-Not $dest_dir) { + # Install to $env:XDG_DATA_HOME/../bin + $dest_dir = if (($base_dir = $env:XDG_DATA_HOME)) { + Join-Path $base_dir "../bin" + } + $dest_dir_lib = $dest_dir + $receipt_dest_dir = $dest_dir + $install_layout = "flat" + } + if (-Not $dest_dir) { + # Install to $HOME/.local/bin + $dest_dir = if (($base_dir = $HOME)) { + Join-Path $base_dir ".local/bin" + } + $dest_dir_lib = $dest_dir + $receipt_dest_dir = $dest_dir + $install_layout = "flat" + } + + # Looks like all of the above assignments failed + if (-Not $dest_dir) { + throw "ERROR: could not find a valid path to install to; please check the installation instructions" + } + + # The replace call here ensures proper escaping is inlined into the receipt + $receipt = $receipt.Replace('AXO_INSTALL_PREFIX', $receipt_dest_dir.replace("\", "\\")) + $receipt = $receipt.Replace('"install_layout":"unspecified"', -join('"install_layout":"', $install_layout, '"')) + + $dest_dir = New-Item -Force -ItemType Directory -Path $dest_dir + $dest_dir_lib = New-Item -Force -ItemType Directory -Path $dest_dir_lib + Write-Information "Installing to $dest_dir" + # Just copy the binaries from the temp location to the install dir + foreach ($bin_path in $artifacts["bin_paths"]) { + $installed_file = Split-Path -Path "$bin_path" -Leaf + Copy-Item "$bin_path" -Destination "$dest_dir" -ErrorAction Stop + Remove-Item "$bin_path" -Recurse -Force -ErrorAction Stop + Write-Information " $installed_file" + + if (($dests = $info["aliases"][$installed_file])) { + $source = Join-Path "$dest_dir" "$installed_file" + foreach ($dest_name in $dests) { + $dest = Join-Path $dest_dir $dest_name + $null = New-Item -ItemType HardLink -Target "$source" -Path "$dest" -Force -ErrorAction Stop + } + } + } + foreach ($lib_path in $artifacts["lib_paths"]) { + $installed_file = Split-Path -Path "$lib_path" -Leaf + Copy-Item "$lib_path" -Destination "$dest_dir_lib" -ErrorAction Stop + Remove-Item "$lib_path" -Recurse -Force -ErrorAction Stop + Write-Information " $installed_file" + } + foreach ($lib_path in $artifacts["staticlib_paths"]) { + $installed_file = Split-Path -Path "$lib_path" -Leaf + Copy-Item "$lib_path" -Destination "$dest_dir_lib" -ErrorAction Stop + Remove-Item "$lib_path" -Recurse -Force -ErrorAction Stop + Write-Information " $installed_file" + } + + $formatted_bins = ($info["bins"] | ForEach-Object { '"' + $_ + '"' }) -join "," + $receipt = $receipt.Replace('"CARGO_DIST_BINS"', $formatted_bins) + $formatted_libs = ($info["libs"] | ForEach-Object { '"' + $_ + '"' }) -join "," + $receipt = $receipt.Replace('"CARGO_DIST_DYLIBS"', $formatted_libs) + $formatted_staticlibs = ($info["staticlibs"] | ForEach-Object { '"' + $_ + '"' }) -join "," + $receipt = $receipt.Replace('"CARGO_DIST_STATICLIBS"', $formatted_staticlibs) + # Also replace the aliases with the arch-specific one + $receipt = $receipt.Replace('"binary_aliases":{}', -join('"binary_aliases":', $info['aliases_json'])) + if ($NoModifyPath) { + $receipt = $receipt.Replace('"modify_path":true', '"modify_path":false') + } + + # Write the install receipt + if ($install_updater) { + $null = New-Item -Path $receipt_home -ItemType "directory" -ErrorAction SilentlyContinue + # Trying to get Powershell 5.1 (not 6+, which is fake and lies) to write utf8 is a crime + # because "Out-File -Encoding utf8" actually still means utf8BOM, so we need to pull out + # .NET's APIs which actually do what you tell them (also apparently utf8NoBOM is the + # default in newer .NETs but I'd rather not rely on that at this point). + $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False + [IO.File]::WriteAllLines("$receipt_home/uv-receipt.json", "$receipt", $Utf8NoBomEncoding) + } + + # Respect the environment, but CLI takes precedence + if ($null -eq $NoModifyPath) { + $NoModifyPath = $env:INSTALLER_NO_MODIFY_PATH + } + + Write-Information "" + Write-Information "Installing aider-chat..." + & "$dest_dir\uv.exe" tool install --force --python python3.12 aider-chat@latest + + if (-not $NoModifyPath) { + Add-Ci-Path $dest_dir + if (Add-Path $dest_dir) { + Write-Information "" + Write-Information "You need to add $dest_dir to your PATH. Either restart your system or run:" + Write-Information "" + Write-Information " set Path=$dest_dir;%Path% (cmd)" + Write-Information " `$env:Path = `"$dest_dir;`$env:Path`" (powershell)" + } + } +} + +# Attempt to do CI-specific rituals to get the install-dir on PATH faster +function Add-Ci-Path($OrigPathToAdd) { + # If GITHUB_PATH is present, then write install_dir to the file it refs. + # After each GitHub Action, the contents will be added to PATH. + # So if you put a curl | sh for this script in its own "run" step, + # the next step will have this dir on PATH. + # + # Note that GITHUB_PATH will not resolve any variables, so we in fact + # want to write the install dir and not an expression that evals to it + if (($gh_path = $env:GITHUB_PATH)) { + Write-Output "$OrigPathToAdd" | Out-File -FilePath "$gh_path" -Encoding utf8 -Append + } +} + +# Try to add the given path to PATH via the registry +# +# Returns true if the registry was modified, otherwise returns false +# (indicating it was already on PATH) +function Add-Path($OrigPathToAdd) { + Write-Verbose "Adding $OrigPathToAdd to your PATH" + $RegistryPath = "HKCU:\Environment" + $PropertyName = "Path" + $PathToAdd = $OrigPathToAdd + + $Item = if (Test-Path $RegistryPath) { + # If the registry key exists, get it + Get-Item -Path $RegistryPath + } else { + # If the registry key doesn't exist, create it + Write-Verbose "Creating $RegistryPath" + New-Item -Path $RegistryPath -Force + } + + $OldPath = "" + try { + # Try to get the old PATH value. If that fails, assume we're making it from scratch. + # Otherwise assume there's already paths in here and use a ; separator + $OldPath = $Item | Get-ItemPropertyValue -Name $PropertyName + $PathToAdd = "$PathToAdd;" + } catch { + # We'll be creating the PATH from scratch + Write-Verbose "No $PropertyName Property exists on $RegistryPath (we'll make one)" + } + + # Check if the path is already there + # + # We don't want to incorrectly match "C:\blah\" to "C:\blah\blah\", so we include the semicolon + # delimiters when searching, ensuring exact matches. To avoid corner cases we add semicolons to + # both sides of the input, allowing us to pretend we're always in the middle of a list. + Write-Verbose "Old $PropertyName Property is $OldPath" + if (";$OldPath;" -like "*;$OrigPathToAdd;*") { + # Already on path, nothing to do + Write-Verbose "install dir already on PATH, all done!" + return $false + } else { + # Actually update PATH + Write-Verbose "Actually mutating $PropertyName Property" + $NewPath = $PathToAdd + $OldPath + # We use -Force here to make the value already existing not be an error + $Item | New-ItemProperty -Name $PropertyName -Value $NewPath -PropertyType String -Force | Out-Null + return $true + } +} + +function Initialize-Environment() { + If (($PSVersionTable.PSVersion.Major) -lt 5) { + throw @" +Error: PowerShell 5 or later is required to install $app_name. +Upgrade PowerShell: + + https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell + +"@ + } + + # show notification to change execution policy: + $allowedExecutionPolicy = @('Unrestricted', 'RemoteSigned', 'ByPass') + If ((Get-ExecutionPolicy).ToString() -notin $allowedExecutionPolicy) { + throw @" +Error: PowerShell requires an execution policy in [$($allowedExecutionPolicy -join ", ")] to run $app_name. For example, to set the execution policy to 'RemoteSigned' please run: + + Set-ExecutionPolicy RemoteSigned -scope CurrentUser + +"@ + } + + # GitHub requires TLS 1.2 + If ([System.Enum]::GetNames([System.Net.SecurityProtocolType]) -notcontains 'Tls12') { + throw @" +Error: Installing $app_name requires at least .NET Framework 4.5 +Please download and install it first: + + https://www.microsoft.com/net/download + +"@ + } +} + +function New-Temp-Dir() { + [CmdletBinding(SupportsShouldProcess)] + param() + $parent = [System.IO.Path]::GetTempPath() + [string] $name = [System.Guid]::NewGuid() + New-Item -ItemType Directory -Path (Join-Path $parent $name) +} + +# PSScriptAnalyzer doesn't like how we use our params as globals, this calms it +$Null = $ArtifactDownloadUrl, $NoModifyPath, $Help +# Make Write-Information statements be visible +$InformationPreference = "Continue" + +# The default interactive handler +try { + Install-Binary "$Args" +} catch { + Write-Information $_ + exit 1 +} From 8d0c962f42aa3096012ec532696647b7061fb930 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 15:57:13 -0800 Subject: [PATCH 070/102] copy --- MANIFEST.in | 2 ++ aider/website/_includes/get-started.md | 8 ++++---- aider/website/docs/install.md | 25 +++++++++++++++++++------ 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 9ce82277f0e..9ab273215b7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,7 +9,9 @@ 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/install.ps1 +exclude aider/website/install.sh recursive-exclude aider/website/docs/leaderboards * recursive-exclude aider/website/assets * diff --git a/aider/website/_includes/get-started.md b/aider/website/_includes/get-started.md index 65c666e8384..425110d285c 100644 --- a/aider/website/_includes/get-started.md +++ b/aider/website/_includes/get-started.md @@ -1,16 +1,16 @@ -You can get started quickly like this, with python 3.8-3.13: +If you already have python 3.8-3.13 installed, you can get started quickly like this: ```bash python -m pip install aider-install aider-install # Change directory into your code base -cd /to/your/git/repo +cd /to/your/project -# Work with Claude 3.5 Sonnet on your repo +# Work with Claude 3.5 Sonnet on your code aider --model sonnet --anthropic-api-key your-key-goes-here -# Work with GPT-4o on your repo +# Work with GPT-4o on your code aider --model gpt-4o --openai-api-key your-key-goes-here ``` diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index 4789fe799d8..8333a930361 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -19,6 +19,15 @@ aider-install will automatically install a separate version of python3.12 to use 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. +## One-liner for Windows + +This one-liner will install aider, along with python3.12 if needed. +It is based on the [uv installer for Windows](https://docs.astral.sh/uv/getting-started/installation/). + +```powershell +powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex" +``` + ## Install with uv A recommended way to install aider is with uv: @@ -49,12 +58,14 @@ 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/). +## Other install methods -## Install with pip - -You can directly install aider with pip, but one of the above +You can install aider with the methods described below, but one of the above methods is usually safer. -If you do install with pip, you should consider + +#### Install with pip + +If you install with pip, you should consider using a [virtual environment](https://docs.python.org/3/library/venv.html) to keep aider's dependencies separated. @@ -75,9 +86,11 @@ aider --sonnet --anthropic-api-key sk-xxx... {% include python-m-aider.md %} -## Installing with package managers +#### Installing with package managers -It's best to install aider using aider-install, uv or pipx as described above. +It's best to install aider using one of methods +recommended above: +aider-install, the one-liner, uv or pipx. While aider is available in a number of system package managers, they often install aider with incorrect dependencies. From b4be9875b248dd7e10082a1259bdb2718c1f61be Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 15:58:29 -0800 Subject: [PATCH 071/102] copy --- aider/website/docs/install.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index 8333a930361..c251962e383 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -89,8 +89,7 @@ aider --sonnet --anthropic-api-key sk-xxx... #### Installing with package managers It's best to install aider using one of methods -recommended above: -aider-install, the one-liner, uv or pipx. +recommended above. While aider is available in a number of system package managers, they often install aider with incorrect dependencies. From ef14df5ba26861869c260d122286c6ab03aa8869 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 16:02:48 -0800 Subject: [PATCH 072/102] feat: Add install script for website --- aider/website/install.sh | 1825 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 1825 insertions(+) create mode 100644 aider/website/install.sh diff --git a/aider/website/install.sh b/aider/website/install.sh new file mode 100644 index 00000000000..98f10952af7 --- /dev/null +++ b/aider/website/install.sh @@ -0,0 +1,1825 @@ +#!/bin/sh +# shellcheck shell=dash +# +# Licensed under the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +if [ "$KSH_VERSION" = 'Version JM 93t+ 2010-03-05' ]; then + # The version of ksh93 that ships with many illumos systems does not + # support the "local" extension. Print a message rather than fail in + # subtle ways later on: + echo 'this installer does not work with this ksh93 version; please try bash!' >&2 + exit 1 +fi + +set -u + +APP_NAME="uv" +APP_VERSION="0.5.9" +# Look for GitHub Enterprise-style base URL first +if [ -n "${UV_INSTALLER_GHE_BASE_URL:-}" ]; then + INSTALLER_BASE_URL="$UV_INSTALLER_GHE_BASE_URL" +else + INSTALLER_BASE_URL="${UV_INSTALLER_GITHUB_BASE_URL:-https://github.com}" +fi +if [ -n "${INSTALLER_DOWNLOAD_URL:-}" ]; then + ARTIFACT_DOWNLOAD_URL="$INSTALLER_DOWNLOAD_URL" +else + ARTIFACT_DOWNLOAD_URL="${INSTALLER_BASE_URL}/astral-sh/uv/releases/download/0.5.9" +fi +PRINT_VERBOSE=${INSTALLER_PRINT_VERBOSE:-0} +PRINT_QUIET=${INSTALLER_PRINT_QUIET:-0} +if [ -n "${UV_NO_MODIFY_PATH:-}" ]; then + NO_MODIFY_PATH="$UV_NO_MODIFY_PATH" +else + NO_MODIFY_PATH=${INSTALLER_NO_MODIFY_PATH:-0} +fi +if [ "${UV_DISABLE_UPDATE:-0}" = "1" ]; then + INSTALL_UPDATER=0 +else + INSTALL_UPDATER=1 +fi +UNMANAGED_INSTALL="${UV_UNMANAGED_INSTALL:-}" +if [ -n "${UNMANAGED_INSTALL}" ]; then + NO_MODIFY_PATH=1 + INSTALL_UPDATER=0 +fi + +read -r RECEIPT <&2 + say_verbose " from $_url" 1>&2 + say_verbose " to $_file" 1>&2 + + ensure mkdir -p "$_dir" + + if ! downloader "$_url" "$_file"; then + say "failed to download $_url" + say "this may be a standard network error, but it may also indicate" + say "that $APP_NAME's release process is not working. When in doubt" + say "please feel free to open an issue!" + exit 1 + fi + + if [ -n "${_checksum_style:-}" ]; then + verify_checksum "$_file" "$_checksum_style" "$_checksum_value" + else + say "no checksums to verify" + fi + + # ...and then the updater, if it exists + if [ -n "$_updater_name" ] && [ "$INSTALL_UPDATER" = "1" ]; then + local _updater_url="$ARTIFACT_DOWNLOAD_URL/$_updater_name" + # This renames the artifact while doing the download, removing the + # target triple and leaving just the appname-update format + local _updater_file="$_dir/$APP_NAME-update" + + if ! downloader "$_updater_url" "$_updater_file"; then + say "failed to download $_updater_url" + say "this may be a standard network error, but it may also indicate" + say "that $APP_NAME's release process is not working. When in doubt" + say "please feel free to open an issue!" + exit 1 + fi + + # Add the updater to the list of binaries to install + _bins="$_bins $APP_NAME-update" + fi + + # unpack the archive + case "$_zip_ext" in + ".zip") + ensure unzip -q "$_file" -d "$_dir" + ;; + + ".tar."*) + ensure tar xf "$_file" --strip-components 1 -C "$_dir" + ;; + *) + err "unknown archive format: $_zip_ext" + ;; + esac + + install "$_dir" "$_bins" "$_libs" "$_staticlibs" "$_arch" "$@" + local _retval=$? + if [ "$_retval" != 0 ]; then + return "$_retval" + fi + + ignore rm -rf "$_dir" + + # Install the install receipt + if [ "$INSTALL_UPDATER" = "1" ]; then + if ! mkdir -p "$RECEIPT_HOME"; then + err "unable to create receipt directory at $RECEIPT_HOME" + else + echo "$RECEIPT" > "$RECEIPT_HOME/$APP_NAME-receipt.json" + # shellcheck disable=SC2320 + local _retval=$? + fi + else + local _retval=0 + fi + + return "$_retval" +} + +# Replaces $HOME with the variable name for display to the user, +# only if $HOME is defined. +replace_home() { + local _str="$1" + + if [ -n "${HOME:-}" ]; then + echo "$_str" | sed "s,$HOME,\$HOME," + else + echo "$_str" + fi +} + +json_binary_aliases() { + local _arch="$1" + + case "$_arch" in + "aarch64-apple-darwin") + echo '{}' + ;; + "aarch64-unknown-linux-gnu") + echo '{}' + ;; + "aarch64-unknown-linux-musl-dynamic") + echo '{}' + ;; + "aarch64-unknown-linux-musl-static") + echo '{}' + ;; + "arm-unknown-linux-gnueabihf") + echo '{}' + ;; + "arm-unknown-linux-musl-dynamiceabihf") + echo '{}' + ;; + "arm-unknown-linux-musl-staticeabihf") + echo '{}' + ;; + "armv7-unknown-linux-gnueabihf") + echo '{}' + ;; + "armv7-unknown-linux-musl-dynamiceabihf") + echo '{}' + ;; + "armv7-unknown-linux-musl-staticeabihf") + echo '{}' + ;; + "i686-pc-windows-gnu") + echo '{}' + ;; + "i686-unknown-linux-gnu") + echo '{}' + ;; + "i686-unknown-linux-musl-dynamic") + echo '{}' + ;; + "i686-unknown-linux-musl-static") + echo '{}' + ;; + "powerpc64-unknown-linux-gnu") + echo '{}' + ;; + "powerpc64le-unknown-linux-gnu") + echo '{}' + ;; + "s390x-unknown-linux-gnu") + echo '{}' + ;; + "x86_64-apple-darwin") + echo '{}' + ;; + "x86_64-pc-windows-gnu") + echo '{}' + ;; + "x86_64-unknown-linux-gnu") + echo '{}' + ;; + "x86_64-unknown-linux-musl-dynamic") + echo '{}' + ;; + "x86_64-unknown-linux-musl-static") + echo '{}' + ;; + *) + echo '{}' + ;; + esac +} + +aliases_for_binary() { + local _bin="$1" + local _arch="$2" + + case "$_arch" in + "aarch64-apple-darwin") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "aarch64-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "aarch64-unknown-linux-musl-dynamic") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "aarch64-unknown-linux-musl-static") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "arm-unknown-linux-gnueabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "arm-unknown-linux-musl-dynamiceabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "arm-unknown-linux-musl-staticeabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "armv7-unknown-linux-gnueabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "armv7-unknown-linux-musl-dynamiceabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "armv7-unknown-linux-musl-staticeabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "i686-pc-windows-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "i686-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "i686-unknown-linux-musl-dynamic") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "i686-unknown-linux-musl-static") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "powerpc64-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "powerpc64le-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "s390x-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "x86_64-apple-darwin") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "x86_64-pc-windows-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "x86_64-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "x86_64-unknown-linux-musl-dynamic") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "x86_64-unknown-linux-musl-static") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + *) + echo "" + ;; + esac +} + +select_archive_for_arch() { + local _true_arch="$1" + local _archive + + # try each archive, checking runtime conditions like libc versions + # accepting the first one that matches, as it's the best match + case "$_true_arch" in + "aarch64-apple-darwin") + _archive="uv-aarch64-apple-darwin.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-x86_64-apple-darwin.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "aarch64-pc-windows-msvc") + _archive="uv-x86_64-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-i686-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "aarch64-unknown-linux-gnu") + _archive="uv-aarch64-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "31"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-aarch64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "aarch64-unknown-linux-musl-dynamic") + _archive="uv-aarch64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "aarch64-unknown-linux-musl-static") + _archive="uv-aarch64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "arm-unknown-linux-gnueabihf") + _archive="uv-arm-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "arm-unknown-linux-musl-dynamiceabihf") + _archive="uv-arm-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "arm-unknown-linux-musl-staticeabihf") + _archive="uv-arm-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "armv7-unknown-linux-gnueabihf") + _archive="uv-armv7-unknown-linux-gnueabihf.tar.gz" + if ! check_glibc "2" "31"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-armv7-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "armv7-unknown-linux-musl-dynamiceabihf") + _archive="uv-armv7-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "armv7-unknown-linux-musl-staticeabihf") + _archive="uv-armv7-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "i686-pc-windows-gnu") + _archive="uv-i686-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "i686-pc-windows-msvc") + _archive="uv-i686-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "i686-unknown-linux-gnu") + _archive="uv-i686-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "31"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-i686-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "i686-unknown-linux-musl-dynamic") + _archive="uv-i686-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "i686-unknown-linux-musl-static") + _archive="uv-i686-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "powerpc64-unknown-linux-gnu") + _archive="uv-powerpc64-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "31"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "powerpc64le-unknown-linux-gnu") + _archive="uv-powerpc64le-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "31"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "s390x-unknown-linux-gnu") + _archive="uv-s390x-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "31"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-apple-darwin") + _archive="uv-x86_64-apple-darwin.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-pc-windows-gnu") + _archive="uv-x86_64-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-pc-windows-msvc") + _archive="uv-x86_64-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-i686-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-unknown-linux-gnu") + _archive="uv-x86_64-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "31"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-x86_64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-unknown-linux-musl-dynamic") + _archive="uv-x86_64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-unknown-linux-musl-static") + _archive="uv-x86_64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + *) + err "there isn't a download for your platform $_true_arch" + ;; + esac + err "no compatible downloads were found for your platform $_true_arch" +} + +check_glibc() { + local _min_glibc_major="$1" + local _min_glibc_series="$2" + + # Parsing version out from line 1 like: + # ldd (Ubuntu GLIBC 2.35-0ubuntu3.1) 2.35 + _local_glibc="$(ldd --version | awk -F' ' '{ if (FNR<=1) print $NF }')" + + if [ "$(echo "${_local_glibc}" | awk -F. '{ print $1 }')" = "$_min_glibc_major" ] && [ "$(echo "${_local_glibc}" | awk -F. '{ print $2 }')" -ge "$_min_glibc_series" ]; then + return 0 + else + say "System glibc version (\`${_local_glibc}') is too old; checking alternatives" >&2 + return 1 + fi +} + +# See discussion of late-bound vs early-bound for why we use single-quotes with env vars +# shellcheck disable=SC2016 +install() { + # This code needs to both compute certain paths for itself to write to, and + # also write them to shell/rc files so that they can look them up to e.g. + # add them to PATH. This requires an active distinction between paths + # and expressions that can compute them. + # + # The distinction lies in when we want env-vars to be evaluated. For instance + # if we determine that we want to install to $HOME/.myapp, which do we add + # to e.g. $HOME/.profile: + # + # * early-bound: export PATH="/home/myuser/.myapp:$PATH" + # * late-bound: export PATH="$HOME/.myapp:$PATH" + # + # In this case most people would prefer the late-bound version, but in other + # cases the early-bound version might be a better idea. In particular when using + # other env-vars than $HOME, they are more likely to be only set temporarily + # for the duration of this install script, so it's more advisable to erase their + # existence with early-bounding. + # + # This distinction is handled by "double-quotes" (early) vs 'single-quotes' (late). + # + # However if we detect that "$SOME_VAR/..." is a subdir of $HOME, we try to rewrite + # it to be '$HOME/...' to get the best of both worlds. + # + # This script has a few different variants, the most complex one being the + # CARGO_HOME version which attempts to install things to Cargo's bin dir, + # potentially setting up a minimal version if the user hasn't ever installed Cargo. + # + # In this case we need to: + # + # * Install to $HOME/.cargo/bin/ + # * Create a shell script at $HOME/.cargo/env that: + # * Checks if $HOME/.cargo/bin/ is on PATH + # * and if not prepends it to PATH + # * Edits $HOME/.profile to run $HOME/.cargo/env (if the line doesn't exist) + # + # To do this we need these 4 values: + + # The actual path we're going to install to + local _install_dir + # The directory C dynamic/static libraries install to + local _lib_install_dir + # The install prefix we write to the receipt. + # For organized install methods like CargoHome, which have + # subdirectories, this is the root without `/bin`. For other + # methods, this is the same as `_install_dir`. + local _receipt_install_dir + # Path to the an shell script that adds install_dir to PATH + local _env_script_path + # Potentially-late-bound version of install_dir to write env_script + local _install_dir_expr + # Potentially-late-bound version of env_script_path to write to rcfiles like $HOME/.profile + local _env_script_path_expr + # Forces the install to occur at this path, not the default + local _force_install_dir + # Which install layout to use - "flat" or "hierarchical" + local _install_layout="unspecified" + + # Check the newer app-specific variable before falling back + # to the older generic one + if [ -n "${UV_INSTALL_DIR:-}" ]; then + _force_install_dir="$UV_INSTALL_DIR" + _install_layout="flat" + elif [ -n "${CARGO_DIST_FORCE_INSTALL_DIR:-}" ]; then + _force_install_dir="$CARGO_DIST_FORCE_INSTALL_DIR" + _install_layout="flat" + elif [ -n "$UNMANAGED_INSTALL" ]; then + _force_install_dir="$UNMANAGED_INSTALL" + _install_layout="flat" + fi + + # Check if the install layout should be changed from `flat` to `cargo-home` + # for backwards compatible updates of applications that switched layouts. + if [ -n "${_force_install_dir:-}" ]; then + if [ "$_install_layout" = "flat" ]; then + # If the install directory is targeting the Cargo home directory, then + # we assume this application was previously installed that layout + if [ "$_force_install_dir" = "${CARGO_HOME:-${HOME:-}/.cargo}" ]; then + _install_layout="cargo-home" + fi + fi + fi + + # Before actually consulting the configured install strategy, see + # if we're overriding it. + if [ -n "${_force_install_dir:-}" ]; then + case "$_install_layout" in + "hierarchical") + _install_dir="$_force_install_dir/bin" + _lib_install_dir="$_force_install_dir/lib" + _receipt_install_dir="$_force_install_dir" + _env_script_path="$_force_install_dir/env" + _install_dir_expr="$(replace_home "$_force_install_dir/bin")" + _env_script_path_expr="$(replace_home "$_force_install_dir/env")" + ;; + "cargo-home") + _install_dir="$_force_install_dir/bin" + _lib_install_dir="$_force_install_dir/bin" + _receipt_install_dir="$_force_install_dir" + _env_script_path="$_force_install_dir/env" + _install_dir_expr="$(replace_home "$_force_install_dir/bin")" + _env_script_path_expr="$(replace_home "$_force_install_dir/env")" + ;; + "flat") + _install_dir="$_force_install_dir" + _lib_install_dir="$_force_install_dir" + _receipt_install_dir="$_install_dir" + _env_script_path="$_force_install_dir/env" + _install_dir_expr="$(replace_home "$_force_install_dir")" + _env_script_path_expr="$(replace_home "$_force_install_dir/env")" + ;; + *) + err "Unrecognized install layout: $_install_layout" + ;; + esac + fi + if [ -z "${_install_dir:-}" ]; then + _install_layout="flat" + # Install to $XDG_BIN_HOME + if [ -n "${XDG_BIN_HOME:-}" ]; then + _install_dir="$XDG_BIN_HOME" + _lib_install_dir="$_install_dir" + _receipt_install_dir="$_install_dir" + _env_script_path="$XDG_BIN_HOME/env" + _install_dir_expr="$(replace_home "$_install_dir")" + _env_script_path_expr="$(replace_home "$_env_script_path")" + fi + fi + if [ -z "${_install_dir:-}" ]; then + _install_layout="flat" + # Install to $XDG_DATA_HOME/../bin + if [ -n "${XDG_DATA_HOME:-}" ]; then + _install_dir="$XDG_DATA_HOME/../bin" + _lib_install_dir="$_install_dir" + _receipt_install_dir="$_install_dir" + _env_script_path="$XDG_DATA_HOME/../bin/env" + _install_dir_expr="$(replace_home "$_install_dir")" + _env_script_path_expr="$(replace_home "$_env_script_path")" + fi + fi + if [ -z "${_install_dir:-}" ]; then + _install_layout="flat" + # Install to $HOME/.local/bin + if [ -n "${HOME:-}" ]; then + _install_dir="$HOME/.local/bin" + _lib_install_dir="$HOME/.local/bin" + _receipt_install_dir="$_install_dir" + _env_script_path="$HOME/.local/bin/env" + _install_dir_expr='$HOME/.local/bin' + _env_script_path_expr='$HOME/.local/bin/env' + fi + fi + + if [ -z "$_install_dir_expr" ]; then + err "could not find a valid path to install to!" + fi + + # Identical to the sh version, just with a .fish file extension + # We place it down here to wait until it's been assigned in every + # path. + _fish_env_script_path="${_env_script_path}.fish" + _fish_env_script_path_expr="${_env_script_path_expr}.fish" + + # Replace the temporary cargo home with the calculated one + RECEIPT=$(echo "$RECEIPT" | sed "s,AXO_INSTALL_PREFIX,$_receipt_install_dir,") + # Also replace the aliases with the arch-specific one + RECEIPT=$(echo "$RECEIPT" | sed "s'\"binary_aliases\":{}'\"binary_aliases\":$(json_binary_aliases "$_arch")'") + # And replace the install layout + RECEIPT=$(echo "$RECEIPT" | sed "s'\"install_layout\":\"unspecified\"'\"install_layout\":\"$_install_layout\"'") + if [ "$NO_MODIFY_PATH" = "1" ]; then + RECEIPT=$(echo "$RECEIPT" | sed "s'\"modify_path\":true'\"modify_path\":false'") + fi + + say "installing to $_install_dir" + ensure mkdir -p "$_install_dir" + ensure mkdir -p "$_lib_install_dir" + + # copy all the binaries to the install dir + local _src_dir="$1" + local _bins="$2" + local _libs="$3" + local _staticlibs="$4" + local _arch="$5" + for _bin_name in $_bins; do + local _bin="$_src_dir/$_bin_name" + ensure mv "$_bin" "$_install_dir" + # unzip seems to need this chmod + ensure chmod +x "$_install_dir/$_bin_name" + for _dest in $(aliases_for_binary "$_bin_name" "$_arch"); do + ln -sf "$_install_dir/$_bin_name" "$_install_dir/$_dest" + done + say " $_bin_name" + done + # Like the above, but no aliases + for _lib_name in $_libs; do + local _lib="$_src_dir/$_lib_name" + ensure mv "$_lib" "$_lib_install_dir" + # unzip seems to need this chmod + ensure chmod +x "$_lib_install_dir/$_lib_name" + say " $_lib_name" + done + for _lib_name in $_staticlibs; do + local _lib="$_src_dir/$_lib_name" + ensure mv "$_lib" "$_lib_install_dir" + # unzip seems to need this chmod + ensure chmod +x "$_lib_install_dir/$_lib_name" + say " $_lib_name" + done + + say "everything's installed!" + + # Avoid modifying the users PATH if they are managing their PATH manually + case :$PATH: + in *:$_install_dir:*) NO_MODIFY_PATH=1 ;; + *) ;; + esac + + if [ "0" = "$NO_MODIFY_PATH" ]; then + add_install_dir_to_ci_path "$_install_dir" + add_install_dir_to_path "$_install_dir_expr" "$_env_script_path" "$_env_script_path_expr" ".profile" "sh" + exit1=$? + shotgun_install_dir_to_path "$_install_dir_expr" "$_env_script_path" "$_env_script_path_expr" ".profile .bashrc .bash_profile .bash_login" "sh" + exit2=$? + add_install_dir_to_path "$_install_dir_expr" "$_env_script_path" "$_env_script_path_expr" ".zshrc .zshenv" "sh" + exit3=$? + # This path may not exist by default + ensure mkdir -p "$HOME/.config/fish/conf.d" + exit4=$? + add_install_dir_to_path "$_install_dir_expr" "$_fish_env_script_path" "$_fish_env_script_path_expr" ".config/fish/conf.d/$APP_NAME.env.fish" "fish" + exit5=$? + + if [ "${exit1:-0}" = 1 ] || [ "${exit2:-0}" = 1 ] || [ "${exit3:-0}" = 1 ] || [ "${exit4:-0}" = 1 ] || [ "${exit5:-0}" = 1 ]; then + say "" + say "To add $_install_dir_expr to your PATH, either restart your shell or run:" + say "" + say " source $_env_script_path_expr (sh, bash, zsh)" + say " source $_fish_env_script_path_expr (fish)" + fi + fi +} + +print_home_for_script() { + local script="$1" + + local _home + case "$script" in + # zsh has a special ZDOTDIR directory, which if set + # should be considered instead of $HOME + .zsh*) + if [ -n "${ZDOTDIR:-}" ]; then + _home="$ZDOTDIR" + else + _home="$HOME" + fi + ;; + *) + _home="$HOME" + ;; + esac + + echo "$_home" +} + +add_install_dir_to_ci_path() { + # Attempt to do CI-specific rituals to get the install-dir on PATH faster + local _install_dir="$1" + + # If GITHUB_PATH is present, then write install_dir to the file it refs. + # After each GitHub Action, the contents will be added to PATH. + # So if you put a curl | sh for this script in its own "run" step, + # the next step will have this dir on PATH. + # + # Note that GITHUB_PATH will not resolve any variables, so we in fact + # want to write install_dir and not install_dir_expr + if [ -n "${GITHUB_PATH:-}" ]; then + ensure echo "$_install_dir" >> "$GITHUB_PATH" + fi +} + +add_install_dir_to_path() { + # Edit rcfiles ($HOME/.profile) to add install_dir to $PATH + # + # We do this slightly indirectly by creating an "env" shell script which checks if install_dir + # is on $PATH already, and prepends it if not. The actual line we then add to rcfiles + # is to just source that script. This allows us to blast it into lots of different rcfiles and + # have it run multiple times without causing problems. It's also specifically compatible + # with the system rustup uses, so that we don't conflict with it. + local _install_dir_expr="$1" + local _env_script_path="$2" + local _env_script_path_expr="$3" + local _rcfiles="$4" + local _shell="$5" + + if [ -n "${HOME:-}" ]; then + local _target + local _home + + # Find the first file in the array that exists and choose + # that as our target to write to + for _rcfile_relative in $_rcfiles; do + _home="$(print_home_for_script "$_rcfile_relative")" + local _rcfile="$_home/$_rcfile_relative" + + if [ -f "$_rcfile" ]; then + _target="$_rcfile" + break + fi + done + + # If we didn't find anything, pick the first entry in the + # list as the default to create and write to + if [ -z "${_target:-}" ]; then + local _rcfile_relative + _rcfile_relative="$(echo "$_rcfiles" | awk '{ print $1 }')" + _home="$(print_home_for_script "$_rcfile_relative")" + _target="$_home/$_rcfile_relative" + fi + + # `source x` is an alias for `. x`, and the latter is more portable/actually-posix. + # This apparently comes up a lot on freebsd. It's easy enough to always add + # the more robust line to rcfiles, but when telling the user to apply the change + # to their current shell ". x" is pretty easy to misread/miscopy, so we use the + # prettier "source x" line there. Hopefully people with Weird Shells are aware + # this is a thing and know to tweak it (or just restart their shell). + local _robust_line=". \"$_env_script_path_expr\"" + local _pretty_line="source \"$_env_script_path_expr\"" + + # Add the env script if it doesn't already exist + if [ ! -f "$_env_script_path" ]; then + say_verbose "creating $_env_script_path" + if [ "$_shell" = "sh" ]; then + write_env_script_sh "$_install_dir_expr" "$_env_script_path" + else + write_env_script_fish "$_install_dir_expr" "$_env_script_path" + fi + else + say_verbose "$_env_script_path already exists" + fi + + # Check if the line is already in the rcfile + # grep: 0 if matched, 1 if no match, and 2 if an error occurred + # + # Ideally we could use quiet grep (-q), but that makes "match" and "error" + # have the same behaviour, when we want "no match" and "error" to be the same + # (on error we want to create the file, which >> conveniently does) + # + # We search for both kinds of line here just to do the right thing in more cases. + if ! grep -F "$_robust_line" "$_target" > /dev/null 2>/dev/null && \ + ! grep -F "$_pretty_line" "$_target" > /dev/null 2>/dev/null + then + # If the script now exists, add the line to source it to the rcfile + # (This will also create the rcfile if it doesn't exist) + if [ -f "$_env_script_path" ]; then + local _line + # Fish has deprecated `.` as an alias for `source` and + # it will be removed in a later version. + # https://fishshell.com/docs/current/cmds/source.html + # By contrast, `.` is the traditional syntax in sh and + # `source` isn't always supported in all circumstances. + if [ "$_shell" = "fish" ]; then + _line="$_pretty_line" + else + _line="$_robust_line" + fi + say_verbose "adding $_line to $_target" + # prepend an extra newline in case the user's file is missing a trailing one + ensure echo "" >> "$_target" + ensure echo "$_line" >> "$_target" + return 1 + fi + else + say_verbose "$_install_dir already on PATH" + fi + fi +} + +shotgun_install_dir_to_path() { + # Edit rcfiles ($HOME/.profile) to add install_dir to $PATH + # (Shotgun edition - write to all provided files that exist rather than just the first) + local _install_dir_expr="$1" + local _env_script_path="$2" + local _env_script_path_expr="$3" + local _rcfiles="$4" + local _shell="$5" + + if [ -n "${HOME:-}" ]; then + local _found=false + local _home + + for _rcfile_relative in $_rcfiles; do + _home="$(print_home_for_script "$_rcfile_relative")" + local _rcfile_abs="$_home/$_rcfile_relative" + + if [ -f "$_rcfile_abs" ]; then + _found=true + add_install_dir_to_path "$_install_dir_expr" "$_env_script_path" "$_env_script_path_expr" "$_rcfile_relative" "$_shell" + fi + done + + # Fall through to previous "create + write to first file in list" behavior + if [ "$_found" = false ]; then + add_install_dir_to_path "$_install_dir_expr" "$_env_script_path" "$_env_script_path_expr" "$_rcfiles" "$_shell" + fi + fi +} + +write_env_script_sh() { + # write this env script to the given path (this cat/EOF stuff is a "heredoc" string) + local _install_dir_expr="$1" + local _env_script_path="$2" + ensure cat < "$_env_script_path" +#!/bin/sh +# add binaries to PATH if they aren't added yet +# affix colons on either side of \$PATH to simplify matching +case ":\${PATH}:" in + *:"$_install_dir_expr":*) + ;; + *) + # Prepending path in case a system-installed binary needs to be overridden + export PATH="$_install_dir_expr:\$PATH" + ;; +esac +EOF +} + +write_env_script_fish() { + # write this env script to the given path (this cat/EOF stuff is a "heredoc" string) + local _install_dir_expr="$1" + local _env_script_path="$2" + ensure cat < "$_env_script_path" +if not contains "$_install_dir_expr" \$PATH + # Prepending path in case a system-installed binary needs to be overridden + set -x PATH "$_install_dir_expr" \$PATH +end +EOF +} + +check_proc() { + # Check for /proc by looking for the /proc/self/exe link + # This is only run on Linux + if ! test -L /proc/self/exe ; then + err "fatal: Unable to find /proc/self/exe. Is /proc mounted? Installation cannot proceed without /proc." + fi +} + +get_bitness() { + need_cmd head + # Architecture detection without dependencies beyond coreutils. + # ELF files start out "\x7fELF", and the following byte is + # 0x01 for 32-bit and + # 0x02 for 64-bit. + # The printf builtin on some shells like dash only supports octal + # escape sequences, so we use those. + local _current_exe_head + _current_exe_head=$(head -c 5 /proc/self/exe ) + if [ "$_current_exe_head" = "$(printf '\177ELF\001')" ]; then + echo 32 + elif [ "$_current_exe_head" = "$(printf '\177ELF\002')" ]; then + echo 64 + else + err "unknown platform bitness" + fi +} + +is_host_amd64_elf() { + need_cmd head + need_cmd tail + # ELF e_machine detection without dependencies beyond coreutils. + # Two-byte field at offset 0x12 indicates the CPU, + # but we're interested in it being 0x3E to indicate amd64, or not that. + local _current_exe_machine + _current_exe_machine=$(head -c 19 /proc/self/exe | tail -c 1) + [ "$_current_exe_machine" = "$(printf '\076')" ] +} + +get_endianness() { + local cputype=$1 + local suffix_eb=$2 + local suffix_el=$3 + + # detect endianness without od/hexdump, like get_bitness() does. + need_cmd head + need_cmd tail + + local _current_exe_endianness + _current_exe_endianness="$(head -c 6 /proc/self/exe | tail -c 1)" + if [ "$_current_exe_endianness" = "$(printf '\001')" ]; then + echo "${cputype}${suffix_el}" + elif [ "$_current_exe_endianness" = "$(printf '\002')" ]; then + echo "${cputype}${suffix_eb}" + else + err "unknown platform endianness" + fi +} + +get_architecture() { + local _ostype + local _cputype + _ostype="$(uname -s)" + _cputype="$(uname -m)" + local _clibtype="gnu" + local _local_glibc + + if [ "$_ostype" = Linux ]; then + if [ "$(uname -o)" = Android ]; then + _ostype=Android + fi + if ldd --version 2>&1 | grep -q 'musl'; then + _clibtype="musl-dynamic" + else + # Assume all other linuxes are glibc (even if wrong, static libc fallback will apply) + _clibtype="gnu" + fi + fi + + if [ "$_ostype" = Darwin ] && [ "$_cputype" = i386 ]; then + # Darwin `uname -m` lies + if sysctl hw.optional.x86_64 | grep -q ': 1'; then + _cputype=x86_64 + fi + fi + + if [ "$_ostype" = Darwin ] && [ "$_cputype" = x86_64 ]; then + # Rosetta on aarch64 + if [ "$(sysctl -n hw.optional.arm64 2>/dev/null)" = "1" ]; then + _cputype=aarch64 + fi + fi + + if [ "$_ostype" = SunOS ]; then + # Both Solaris and illumos presently announce as "SunOS" in "uname -s" + # so use "uname -o" to disambiguate. We use the full path to the + # system uname in case the user has coreutils uname first in PATH, + # which has historically sometimes printed the wrong value here. + if [ "$(/usr/bin/uname -o)" = illumos ]; then + _ostype=illumos + fi + + # illumos systems have multi-arch userlands, and "uname -m" reports the + # machine hardware name; e.g., "i86pc" on both 32- and 64-bit x86 + # systems. Check for the native (widest) instruction set on the + # running kernel: + if [ "$_cputype" = i86pc ]; then + _cputype="$(isainfo -n)" + fi + fi + + case "$_ostype" in + + Android) + _ostype=linux-android + ;; + + Linux) + check_proc + _ostype=unknown-linux-$_clibtype + _bitness=$(get_bitness) + ;; + + FreeBSD) + _ostype=unknown-freebsd + ;; + + NetBSD) + _ostype=unknown-netbsd + ;; + + DragonFly) + _ostype=unknown-dragonfly + ;; + + Darwin) + _ostype=apple-darwin + ;; + + illumos) + _ostype=unknown-illumos + ;; + + MINGW* | MSYS* | CYGWIN* | Windows_NT) + _ostype=pc-windows-gnu + ;; + + *) + err "unrecognized OS type: $_ostype" + ;; + + esac + + case "$_cputype" in + + i386 | i486 | i686 | i786 | x86) + _cputype=i686 + ;; + + xscale | arm) + _cputype=arm + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + fi + ;; + + armv6l) + _cputype=arm + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + else + _ostype="${_ostype}eabihf" + fi + ;; + + armv7l | armv8l) + _cputype=armv7 + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + else + _ostype="${_ostype}eabihf" + fi + ;; + + aarch64 | arm64) + _cputype=aarch64 + ;; + + x86_64 | x86-64 | x64 | amd64) + _cputype=x86_64 + ;; + + mips) + _cputype=$(get_endianness mips '' el) + ;; + + mips64) + if [ "$_bitness" -eq 64 ]; then + # only n64 ABI is supported for now + _ostype="${_ostype}abi64" + _cputype=$(get_endianness mips64 '' el) + fi + ;; + + ppc) + _cputype=powerpc + ;; + + ppc64) + _cputype=powerpc64 + ;; + + ppc64le) + _cputype=powerpc64le + ;; + + s390x) + _cputype=s390x + ;; + riscv64) + _cputype=riscv64gc + ;; + loongarch64) + _cputype=loongarch64 + ;; + *) + err "unknown CPU type: $_cputype" + + esac + + # Detect 64-bit linux with 32-bit userland + if [ "${_ostype}" = unknown-linux-gnu ] && [ "${_bitness}" -eq 32 ]; then + case $_cputype in + x86_64) + # 32-bit executable for amd64 = x32 + if is_host_amd64_elf; then { + err "x32 linux unsupported" + }; else + _cputype=i686 + fi + ;; + mips64) + _cputype=$(get_endianness mips '' el) + ;; + powerpc64) + _cputype=powerpc + ;; + aarch64) + _cputype=armv7 + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + else + _ostype="${_ostype}eabihf" + fi + ;; + riscv64gc) + err "riscv64 with 32-bit userland unsupported" + ;; + esac + fi + + # treat armv7 systems without neon as plain arm + if [ "$_ostype" = "unknown-linux-gnueabihf" ] && [ "$_cputype" = armv7 ]; then + if ensure grep '^Features' /proc/cpuinfo | grep -q -v neon; then + # At least one processor does not have NEON. + _cputype=arm + fi + fi + + _arch="${_cputype}-${_ostype}" + + RETVAL="$_arch" +} + +say() { + if [ "0" = "$PRINT_QUIET" ]; then + echo "$1" + fi +} + +say_verbose() { + if [ "1" = "$PRINT_VERBOSE" ]; then + echo "$1" + fi +} + +err() { + if [ "0" = "$PRINT_QUIET" ]; then + local red + local reset + red=$(tput setaf 1 2>/dev/null || echo '') + reset=$(tput sgr0 2>/dev/null || echo '') + say "${red}ERROR${reset}: $1" >&2 + fi + exit 1 +} + +need_cmd() { + if ! check_cmd "$1" + then err "need '$1' (command not found)" + fi +} + +check_cmd() { + command -v "$1" > /dev/null 2>&1 + return $? +} + +assert_nz() { + if [ -z "$1" ]; then err "assert_nz $2"; fi +} + +# Run a command that should never fail. If the command fails execution +# will immediately terminate with an error showing the failing +# command. +ensure() { + if ! "$@"; then err "command failed: $*"; fi +} + +# This is just for indicating that commands' results are being +# intentionally ignored. Usually, because it's being executed +# as part of error handling. +ignore() { + "$@" +} + +# This wraps curl or wget. Try curl first, if not installed, +# use wget instead. +downloader() { + if check_cmd curl + then _dld=curl + elif check_cmd wget + then _dld=wget + else _dld='curl or wget' # to be used in error message of need_cmd + fi + + if [ "$1" = --check ] + then need_cmd "$_dld" + elif [ "$_dld" = curl ] + then curl -sSfL "$1" -o "$2" + elif [ "$_dld" = wget ] + then wget "$1" -O "$2" + else err "Unknown downloader" # should not reach here + fi +} + +verify_checksum() { + local _file="$1" + local _checksum_style="$2" + local _checksum_value="$3" + local _calculated_checksum + + if [ -z "$_checksum_value" ]; then + return 0 + fi + case "$_checksum_style" in + sha256) + if ! check_cmd sha256sum; then + say "skipping sha256 checksum verification (it requires the 'sha256sum' command)" + return 0 + fi + _calculated_checksum="$(sha256sum -b "$_file" | awk '{printf $1}')" + ;; + sha512) + if ! check_cmd sha512sum; then + say "skipping sha512 checksum verification (it requires the 'sha512sum' command)" + return 0 + fi + _calculated_checksum="$(sha512sum -b "$_file" | awk '{printf $1}')" + ;; + sha3-256) + if ! check_cmd openssl; then + say "skipping sha3-256 checksum verification (it requires the 'openssl' command)" + return 0 + fi + _calculated_checksum="$(openssl dgst -sha3-256 "$_file" | awk '{printf $NF}')" + ;; + sha3-512) + if ! check_cmd openssl; then + say "skipping sha3-512 checksum verification (it requires the 'openssl' command)" + return 0 + fi + _calculated_checksum="$(openssl dgst -sha3-512 "$_file" | awk '{printf $NF}')" + ;; + blake2s) + if ! check_cmd b2sum; then + say "skipping blake2s checksum verification (it requires the 'b2sum' command)" + return 0 + fi + # Test if we have official b2sum with blake2s support + local _well_known_blake2s_checksum="93314a61f470985a40f8da62df10ba0546dc5216e1d45847bf1dbaa42a0e97af" + local _test_blake2s + _test_blake2s="$(printf "can do blake2s" | b2sum -a blake2s | awk '{printf $1}')" || _test_blake2s="" + + if [ "X$_test_blake2s" = "X$_well_known_blake2s_checksum" ]; then + _calculated_checksum="$(b2sum -a blake2s "$_file" | awk '{printf $1}')" || _calculated_checksum="" + else + say "skipping blake2s checksum verification (installed b2sum doesn't support blake2s)" + return 0 + fi + ;; + blake2b) + if ! check_cmd b2sum; then + say "skipping blake2b checksum verification (it requires the 'b2sum' command)" + return 0 + fi + _calculated_checksum="$(b2sum "$_file" | awk '{printf $1}')" + ;; + false) + ;; + *) + say "skipping unknown checksum style: $_checksum_style" + return 0 + ;; + esac + + if [ "$_calculated_checksum" != "$_checksum_value" ]; then + err "checksum mismatch + want: $_checksum_value + got: $_calculated_checksum" + fi +} + +download_binary_and_run_installer "$@" || exit 1 From 9b16f2139df1608c06b9131331810376fabe43c7 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 16 Dec 2024 16:02:49 -0800 Subject: [PATCH 073/102] feat: Install aider-chat using uv after uv install --- aider/website/install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aider/website/install.sh b/aider/website/install.sh index 98f10952af7..df5041ca6ee 100644 --- a/aider/website/install.sh +++ b/aider/website/install.sh @@ -1202,6 +1202,9 @@ install() { say " source $_fish_env_script_path_expr (fish)" fi fi + + # Install aider-chat using the newly installed uv + ensure "${_install_dir}/uv" tool install --force --python python3.12 aider-chat@latest } print_home_for_script() { From ecbac76cba4231ef377e18a949e9ff28c5d85fa6 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 16:06:06 -0800 Subject: [PATCH 074/102] copy --- aider/website/docs/install.md | 24 +++++++++++++++++++++--- aider/website/install.sh | 5 ++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index c251962e383..3c4c7962122 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -19,15 +19,33 @@ aider-install will automatically install a separate version of python3.12 to use 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. -## One-liner for Windows +## One-liners -This one-liner will install aider, along with python3.12 if needed. -It is based on the [uv installer for Windows](https://docs.astral.sh/uv/getting-started/installation/). +These one-liners will install aider, along with python3.12 if needed. +They are based on the +[uv installers](https://docs.astral.sh/uv/getting-started/installation/). + +#### Windows ```powershell powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex" ``` +#### Mac and Linux + +Use curl to download the script and execute it with sh: + +```bash +$ curl -LsSf https://aider.chat/install.sh | sh +``` + +If your system doesn't have curl, you can use wget: + +```bash +$ wget -qO- https://aider.chat/install.sh | sh +``` + + ## Install with uv A recommended way to install aider is with uv: diff --git a/aider/website/install.sh b/aider/website/install.sh index df5041ca6ee..410fdefdf96 100644 --- a/aider/website/install.sh +++ b/aider/website/install.sh @@ -1172,7 +1172,7 @@ install() { say " $_lib_name" done - say "everything's installed!" + say "uv is installed!" # Avoid modifying the users PATH if they are managing their PATH manually case :$PATH: @@ -1203,6 +1203,9 @@ install() { fi fi + say "" + say "Installing aider..." + say "" # Install aider-chat using the newly installed uv ensure "${_install_dir}/uv" tool install --force --python python3.12 aider-chat@latest } From 59de835b42d64fdb85dfb56d9004fd3c618ad1d5 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 16:08:02 -0800 Subject: [PATCH 075/102] copy --- aider/website/docs/install.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index 3c4c7962122..7d02b57b231 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -36,13 +36,13 @@ powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex" Use curl to download the script and execute it with sh: ```bash -$ curl -LsSf https://aider.chat/install.sh | sh +curl -LsSf https://aider.chat/install.sh | sh ``` If your system doesn't have curl, you can use wget: ```bash -$ wget -qO- https://aider.chat/install.sh | sh +wget -qO- https://aider.chat/install.sh | sh ``` From 50c806286e0dda8198b87faa4a3d0338827828e6 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 16:12:30 -0800 Subject: [PATCH 076/102] copy --- aider/website/install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/aider/website/install.sh b/aider/website/install.sh index 410fdefdf96..e0e23482634 100644 --- a/aider/website/install.sh +++ b/aider/website/install.sh @@ -1174,6 +1174,12 @@ install() { say "uv is installed!" + say "" + say "Installing aider..." + say "" + # Install aider-chat using the newly installed uv + ensure "${_install_dir}/uv" tool install --force --python python3.12 aider-chat@latest + # Avoid modifying the users PATH if they are managing their PATH manually case :$PATH: in *:$_install_dir:*) NO_MODIFY_PATH=1 ;; @@ -1203,11 +1209,6 @@ install() { fi fi - say "" - say "Installing aider..." - say "" - # Install aider-chat using the newly installed uv - ensure "${_install_dir}/uv" tool install --force --python python3.12 aider-chat@latest } print_home_for_script() { From 2ca93cd93deefd5f18e37466b66e8b4b5282a8b2 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 16:18:50 -0800 Subject: [PATCH 077/102] copy --- aider/website/docs/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index 7d02b57b231..0e51850e0a3 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -31,7 +31,7 @@ They are based on the powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex" ``` -#### Mac and Linux +#### Mac & Linux Use curl to download the script and execute it with sh: From 410e732eb39f1bff260b0f5fc466bb97924dbbd4 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 16:21:55 -0800 Subject: [PATCH 078/102] copy --- aider/website/docs/install.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index 0e51850e0a3..cbe976ca4b0 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -48,7 +48,7 @@ wget -qO- https://aider.chat/install.sh | sh ## Install with uv -A recommended way to install aider is with uv: +You can install aider with uv: ```bash python -m pip install uv # If you need to install uv @@ -64,7 +64,7 @@ Also see the ## Install with pipx -A recommended way to install aider is with pipx: +You can install aider with pipx: ```bash python -m pip install pipx # If you need to install pipx From 81b75d178bd51fe00308151fd776e98d712d361d Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 16:27:55 -0800 Subject: [PATCH 079/102] copy --- aider/website/docs/install.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index cbe976ca4b0..a48e788c62b 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -14,14 +14,14 @@ description: How to install and get started pair programming with aider. {% include get-started.md %} If needed, -aider-install will automatically install a separate version of python3.12 to use with aider. +aider-install will automatically install a separate version of python 3.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. ## One-liners -These one-liners will install aider, along with python3.12 if needed. +These one-liners will install aider, along with python 3.12 if needed. They are based on the [uv installers](https://docs.astral.sh/uv/getting-started/installation/). @@ -55,9 +55,10 @@ python -m pip install uv # If you need to install uv uv tool install --force --python python3.12 aider-chat@latest ``` -You can use uv to install aider with your existing python versions 3.8-3.13. +This will install uv using your existing python version 3.8-3.13, +and use it to install aider. If needed, -uv will automatically install a separate version of python3.12 to use with aider. +uv will automatically install a separate python 3.12 to use with aider. Also see the [docs on other methods for installing uv itself](https://docs.astral.sh/uv/getting-started/installation/). From 9b424e0fe787cd61d635dfd4e4de8fe347bbd9c0 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 16:29:43 -0800 Subject: [PATCH 080/102] copy --- README.md | 8 +- aider/website/assets/sample-analytics.jsonl | 94 ++++++++++----------- aider/website/docs/faq.md | 6 +- aider/website/index.md | 8 +- 4 files changed, 58 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 2db92d292be..a41172ce0dd 100644 --- a/README.md +++ b/README.md @@ -43,19 +43,19 @@ VIDEO END --> cog.out(open("aider/website/_includes/get-started.md").read()) ]]]--> -You can get started quickly like this, with python 3.8-3.13: +If you already have python 3.8-3.13 installed, you can get started quickly like this: ```bash python -m pip install aider-install aider-install # Change directory into your code base -cd /to/your/git/repo +cd /to/your/project -# Work with Claude 3.5 Sonnet on your repo +# Work with Claude 3.5 Sonnet on your code aider --model sonnet --anthropic-api-key your-key-goes-here -# Work with GPT-4o on your repo +# Work with GPT-4o on your code aider --model gpt-4o --openai-api-key your-key-goes-here ``` diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 2cbf381db56..82507c3acbc 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,50 +1,3 @@ -{"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803534} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803535} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803552} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803701} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803701} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803701} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803963} -{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803963} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803963} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 31711, "completion_tokens": 404, "total_tokens": 32115, "cost": 0.101193, "total_cost": 0.101193}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803979} -{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733803979} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733804920} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733804921} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733804921} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840671} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840671} -{"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840671} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840671} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840675} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840694} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840694} -{"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840694} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840694} -{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840712} -{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840712} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840712} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff", "prompt_tokens": 13459, "completion_tokens": 291, "total_tokens": 13750, "cost": 0.044742000000000004, "total_cost": 0.044742000000000004}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840720} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840741} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff", "prompt_tokens": 13789, "completion_tokens": 316, "total_tokens": 14105, "cost": 0.046107, "total_cost": 0.09084900000000001}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840750} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840760} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840773} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff", "prompt_tokens": 22252, "completion_tokens": 131, "total_tokens": 22383, "cost": 0.06872099999999999, "total_cost": 0.15957}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840780} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840788} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840789} -{"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840789} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840789} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840792} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840797} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840833} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840836} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840836} -{"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840836} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840836} -{"event": "command_read-only", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840840} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840847} -{"event": "command_drop", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840850} -{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840852} {"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840852} {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840855} {"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840855} @@ -998,3 +951,50 @@ {"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382602} {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5000, "completion_tokens": 229, "total_tokens": 5229, "cost": 0.018435, "total_cost": 0.030495}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382608} {"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382644} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382961} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382961} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734382961} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393027} +{"event": "repo", "properties": {"num_files": 411}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393030} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393030} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393053} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393053} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 1298, "completion_tokens": 121, "total_tokens": 1419, "cost": 0.005709, "total_cost": 0.005709}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393059} +{"event": "command_clear", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393113} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393114} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393114} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 16109, "completion_tokens": 316, "total_tokens": 16425, "cost": 0.053067, "total_cost": 0.058776}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393125} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393146} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 18583, "completion_tokens": 1710, "total_tokens": 20293, "cost": 0.081399, "total_cost": 0.140175}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393175} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393268} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 18525, "completion_tokens": 650, "total_tokens": 19175, "cost": 0.065325, "total_cost": 0.2055}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393283} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393324} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 19382, "completion_tokens": 596, "total_tokens": 19978, "cost": 0.067086, "total_cost": 0.272586}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393337} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393352} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393542} +{"event": "repo", "properties": {"num_files": 411}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393544} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393544} +{"event": "command_model", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393547} +{"event": "command_model", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393555} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393562} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393562} +{"event": "message_send", "properties": {"main_model": "o1-preview", "weak_model": "gpt-4o-mini", "editor_model": "gpt-4o", "edit_format": "ask", "prompt_tokens": 16114, "completion_tokens": 599, "total_tokens": 16713, "cost": 0.27765, "total_cost": 0.27765}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393576} +{"event": "command_clear", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393595} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393619} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393620} +{"event": "message_send", "properties": {"main_model": "o1-preview", "weak_model": "gpt-4o-mini", "editor_model": "gpt-4o", "edit_format": "ask", "prompt_tokens": 16129, "completion_tokens": 688, "total_tokens": 16817, "cost": 0.283215, "total_cost": 0.560865}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393634} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393654} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393669} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393684} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393686} +{"event": "repo", "properties": {"num_files": 411}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393688} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393688} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393691} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393691} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 16132, "completion_tokens": 398, "total_tokens": 16530, "cost": 0.054366000000000005, "total_cost": 0.054366000000000005}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393703} +{"event": "command_clear", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393725} +{"event": "command_editor", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393726} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393740} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 18560, "completion_tokens": 401, "total_tokens": 18961, "cost": 0.061695, "total_cost": 0.116061}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393767} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393840} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393840} diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index c6b4a776f0c..2db40a37f08 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -237,9 +237,9 @@ tr:hover { background-color: #f5f5f5; }
Model NameTotal TokensPercent
claude-3-5-sonnet-202410221,630,10288.9%
o1-preview83,7824.6%
claude-3-5-sonnet-202410221,638,17188.9%
o1-preview83,7824.5%
gemini/REDACTED82,5724.5%
deepseek/deepseek-coder24,6281.3%
gpt-4o9,2430.5%
- - - + + + diff --git a/aider/website/index.md b/aider/website/index.md index 5398fce9be8..a5ed9b1371a 100644 --- a/aider/website/index.md +++ b/aider/website/index.md @@ -70,19 +70,19 @@ Aider works best with GPT-4o & Claude 3.5 Sonnet and can cog.out(open("aider/website/_includes/get-started.md").read()) --> -You can get started quickly like this, with python 3.8-3.13: +If you already have python 3.8-3.13 installed, you can get started quickly like this: ```bash python -m pip install aider-install aider-install # Change directory into your code base -cd /to/your/git/repo +cd /to/your/project -# Work with Claude 3.5 Sonnet on your repo +# Work with Claude 3.5 Sonnet on your code aider --model sonnet --anthropic-api-key your-key-goes-here -# Work with GPT-4o on your repo +# Work with GPT-4o on your code aider --model gpt-4o --openai-api-key your-key-goes-here ``` From f237d0f21232664953d08b4e36138ba68c43a051 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 16 Dec 2024 19:50:08 -0800 Subject: [PATCH 081/102] copy --- aider/website/docs/install.md | 7 +++++-- aider/website/docs/install/optional.md | 6 +++--- aider/website/docs/more/edit-formats.md | 20 +++++++++++++++----- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index a48e788c62b..eb18470e635 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -13,10 +13,13 @@ description: How to install and get started pair programming with aider. {% include get-started.md %} +This will install aider in its own separate python environment. If needed, -aider-install will automatically install a separate version of python 3.12 to use with aider. +aider-install will also install a separate version of python 3.12 to use with aider. + +Once aider is installed, +there are also some [optional install steps](/docs/install/optional.html). -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. ## One-liners diff --git a/aider/website/docs/install/optional.md b/aider/website/docs/install/optional.md index 901274d49e7..818f9f2c3d3 100644 --- a/aider/website/docs/install/optional.md +++ b/aider/website/docs/install/optional.md @@ -80,8 +80,8 @@ 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 +There are a number of 3rd party aider plugins for various IDE/editors. +It's not clear how well 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 and use `--watch-files`. @@ -101,7 +101,7 @@ There are a number of 3rd party ### Other editors If you are interested in creating an aider plugin for your favorite editor, -please let me know by opening a +please let us know by opening a [GitHub issue](https://github.com/Aider-AI/aider/issues). diff --git a/aider/website/docs/more/edit-formats.md b/aider/website/docs/more/edit-formats.md index 870284cc481..cabf6cc947f 100644 --- a/aider/website/docs/more/edit-formats.md +++ b/aider/website/docs/more/edit-formats.md @@ -20,7 +20,7 @@ copy of each source file that needs changes. While simple, it can be slow and costly because the LLM has to return the *entire file* even if just a few lines are edited. -The format expects the file path just before the fenced file content: +The whole format expects the file path just before the fenced file content: ```` show_greeting.py @@ -28,7 +28,7 @@ show_greeting.py import sys def greeting(name): - print(f"Hey {{name}}") + print("Hey", name) if __name__ == '__main__': greeting(sys.argv[1]) @@ -42,7 +42,7 @@ The "diff" edit format asks the LLM to specify file edits as a series of search/ This is an efficient format, because the model only needs to return parts of the file which have changes. -They are formatted using a syntax similar to the git merge conflict resolution markings, +Edits are formatted using a syntax similar to the git merge conflict resolution markings, with the file path right before a fenced block: ```` @@ -62,7 +62,7 @@ from flask import Flask The "diff-fenced" edit format is based on the diff format, but the file path is placed inside the fence. It is primarily used with the Gemini family of models, -which often fail to conform to fencing approach specified in the diff format. +which often fail to conform to the fencing approach specified in the diff format. ```` ``` @@ -84,7 +84,10 @@ This is an efficient format, because the model only needs to return parts of the which have changes. It was mainly used to the GPT-4 Turbo family of models, -to reduce their "lazy coding" tendencies with other edit formats. +because it reduced their "lazy coding" tendencies. +With other edit formats the GPT-4 Turbo models tended to elide +large sections of code and replace them with "# ... original code here ..." +style comments. ```` @@ -104,3 +107,10 @@ to reduce their "lazy coding" tendencies with other edit formats. These are streamlined versions of the diff and whole formats, intended to be used with `--editor-edit-format` when using [architect mode](/docs/usage/modes.html). +The actual edit format is the same, but aider uses a simpler prompt that +is more narrowly focused on just editing the file as opposed to +solving the coding task. +The architect model resolves the coding task and +provides plain text instructions about which file changes need to be made. +The editor interprets those instructions to produce the +syntactically correct diff or whole edits. From 49423662718cdf0408b255fb19bbd78e0ba7e654 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 08:25:03 -0800 Subject: [PATCH 082/102] feat: Add exclude_files list to blame script --- scripts/blame.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/blame.py b/scripts/blame.py index b245b3c17b3..de86481f383 100755 --- a/scripts/blame.py +++ b/scripts/blame.py @@ -18,6 +18,10 @@ "aider/website/docs/leaderboards/index.md", ] +# AI add an exclude_files list with: +aider/website/install.ps1 +aider/website/install.sh +# ..AI! def blame(start_tag, end_tag=None): commits = get_all_commit_hashes_between_tags(start_tag, end_tag) From 70312c58be4a3a0f771049f9ae5fa701f73b8978 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 08:25:04 -0800 Subject: [PATCH 083/102] feat: Add exclude_files list and filter in blame script --- scripts/blame.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/blame.py b/scripts/blame.py index de86481f383..5e9c5d72c8b 100755 --- a/scripts/blame.py +++ b/scripts/blame.py @@ -18,10 +18,10 @@ "aider/website/docs/leaderboards/index.md", ] -# AI add an exclude_files list with: -aider/website/install.ps1 -aider/website/install.sh -# ..AI! +exclude_files = [ + "aider/website/install.ps1", + "aider/website/install.sh", +] def blame(start_tag, end_tag=None): commits = get_all_commit_hashes_between_tags(start_tag, end_tag) @@ -40,6 +40,7 @@ def blame(start_tag, end_tag=None): ] files = [f for f in files if not f.endswith("prompts.py")] files = [f for f in files if not f.startswith("tests/fixtures/watch")] + files = [f for f in files if f not in exclude_files] all_file_counts = {} grand_total = defaultdict(int) From 59cf823d56f1b703e610103340f9b3ffab1cef56 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 08:25:08 -0800 Subject: [PATCH 084/102] style: Run linter on blame.py --- scripts/blame.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/blame.py b/scripts/blame.py index 5e9c5d72c8b..c76cc1bcab6 100755 --- a/scripts/blame.py +++ b/scripts/blame.py @@ -23,6 +23,7 @@ "aider/website/install.sh", ] + def blame(start_tag, end_tag=None): commits = get_all_commit_hashes_between_tags(start_tag, end_tag) commits = [commit[:hash_len] for commit in commits] From 5f6821c7e2d18db5f1744f7d911e41bc94cf6fd0 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 08:28:51 -0800 Subject: [PATCH 085/102] copy --- HISTORY.md | 6 +++++ aider/website/HISTORY.md | 6 +++++ aider/website/assets/sample-analytics.jsonl | 30 ++++++++++----------- aider/website/docs/faq.md | 4 +-- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 46ec12b0b48..7577a669527 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,11 @@ # Release history +### main branch + +- Support for running without git installed. +- Improved help messages for AI! and AI? commands. +- Aider wrote 65% of the code in this release. + ### Aider v0.69.0 - [Watch files](https://aider.chat/docs/usage/watch.html) improvements: diff --git a/aider/website/HISTORY.md b/aider/website/HISTORY.md index 73d930589f3..b9adca21e8c 100644 --- a/aider/website/HISTORY.md +++ b/aider/website/HISTORY.md @@ -23,6 +23,12 @@ cog.out(text) ]]]--> +### main branch + +- Support for running without git installed. +- Improved help messages for AI! and AI? commands. +- Aider wrote 65% of the code in this release. + ### Aider v0.69.0 - [Watch files](https://aider.chat/docs/usage/watch.html) improvements: diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index 82507c3acbc..ed73d6e1d12 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,18 +1,3 @@ -{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840852} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840855} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840855} -{"event": "copy-paste mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840855} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "editor-diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840855} -{"event": "command_ls", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840856} -{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840858} -{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733840858} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842057} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842057} -{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842061} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842634} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842634} -{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842638} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842794} {"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842794} {"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842798} {"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733844000} @@ -998,3 +983,18 @@ {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 18560, "completion_tokens": 401, "total_tokens": 18961, "cost": 0.061695, "total_cost": 0.116061}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393767} {"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393840} {"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734393840} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734395443} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734395443} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734395443} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452625} +{"event": "repo", "properties": {"num_files": 412}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452627} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452627} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452638} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452650} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452657} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5507, "completion_tokens": 276, "total_tokens": 5783, "cost": 0.020661000000000002, "total_cost": 0.020661000000000002}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452664} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452869} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452871} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452871} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 6592, "completion_tokens": 163, "total_tokens": 6755, "cost": 0.022221, "total_cost": 0.022221}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452876} +{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452877} diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index 2db40a37f08..38ef9e886fe 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -237,8 +237,8 @@ tr:hover { background-color: #f5f5f5; }
Model NameTotal TokensPercent
claude-3-5-sonnet-202410221,638,17188.9%
o1-preview83,7824.5%
gemini/REDACTED82,5724.5%
claude-3-5-sonnet-202410221,668,59987.5%
o1-preview117,3126.2%
gemini/REDACTED82,5724.3%
deepseek/deepseek-coder24,6281.3%
gpt-4o9,2430.5%
gpt-4o-mini3,4200.2%
- - + + From 154d485c9ea297dbfe6f655da3e5b2d8e09e6f41 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 08:32:12 -0800 Subject: [PATCH 086/102] feat: Add analytics config and toggle to _config.yml --- aider/website/_config.yml | 8 +++++++- aider/website/_includes/head_custom.html | 6 ++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/aider/website/_config.yml b/aider/website/_config.yml index b735e8b0ef1..cc0c90cb1b0 100644 --- a/aider/website/_config.yml +++ b/aider/website/_config.yml @@ -1,6 +1,12 @@ theme: just-the-docs url: "https://aider.chat" +# Analytics configuration +analytics: + enabled: true # Single switch to control analytics and cookie consent + posthog_key: 'phc_99T7muzafUMMZX15H8XePbMSreEUzahHbtWjy3l5Qbv' + posthog_host: 'https://us.i.posthog.com' + plugins: - jekyll-redirect-from - jekyll-sitemap @@ -45,4 +51,4 @@ callouts: note: title: Note color: yellow - \ No newline at end of file + diff --git a/aider/website/_includes/head_custom.html b/aider/website/_includes/head_custom.html index 97d607aac04..77533ab727e 100644 --- a/aider/website/_includes/head_custom.html +++ b/aider/website/_includes/head_custom.html @@ -19,6 +19,7 @@ +{% if site.analytics.enabled %} @@ -72,9 +73,10 @@ // 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 +{% endif %} From 7cd266235512f17fbd8364254edfeed148b3319a Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 08:48:47 -0800 Subject: [PATCH 087/102] disable website analytics --- aider/website/_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/website/_config.yml b/aider/website/_config.yml index cc0c90cb1b0..b34011eb3da 100644 --- a/aider/website/_config.yml +++ b/aider/website/_config.yml @@ -3,7 +3,7 @@ url: "https://aider.chat" # Analytics configuration analytics: - enabled: true # Single switch to control analytics and cookie consent + enabled: false # Single switch to control analytics and cookie consent posthog_key: 'phc_99T7muzafUMMZX15H8XePbMSreEUzahHbtWjy3l5Qbv' posthog_host: 'https://us.i.posthog.com' From 64f95af8331e13afcdac7e2ba6a2bd881763ae30 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 10:56:23 -0800 Subject: [PATCH 088/102] copy --- aider/website/docs/faq.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index 38ef9e886fe..82677511811 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -261,6 +261,31 @@ 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 does aider sometimes stop highlighting code in its replies? + +Aider displays the markdown responses that are coming back from the LLM. +Usually, the LLM will reply with code in a markdown "code block" with +triple backtick fences, like this: + +```` +Here's some code: + +``` +print("hello") +``` +```` + +But if you've added files to the chat that contain triple backticks, +aider needs to tell the LLM to use a different set of fences. +Otherwise, the LLM can't safely include your code's triple backticks +inside the code blocks that it returns with edits. +Aider will use fences like `...` in this case. + +A side effect of this is that the code that aider outputs may no +longer be properly highlighted. +You will most often notice this if you add markdown files +to you chats that contain code blocks. + ## 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 From 7f0d08ad77462dd9d36a3170d24e89168020f5fb Mon Sep 17 00:00:00 2001 From: Evan Johnson Date: Tue, 17 Dec 2024 13:18:31 -0700 Subject: [PATCH 089/102] doc that Pygments styles can be used for --code-theme --- aider/args.py | 3 ++- aider/website/docs/config/options.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/aider/args.py b/aider/args.py index 529ffffb8b6..2ba98853dae 100644 --- a/aider/args.py +++ b/aider/args.py @@ -427,7 +427,8 @@ def get_parser(default_config_files, git_root): default="default", help=( "Set the markdown code theme (default: default, other options include monokai," - " solarized-dark, solarized-light)" + " solarized-dark, solarized-light, or a Pygments builtin style," + " see https://pygments.org/styles for available themes)" ), ) group.add_argument( diff --git a/aider/website/docs/config/options.md b/aider/website/docs/config/options.md index 529bfbcb819..bee47b8b265 100644 --- a/aider/website/docs/config/options.md +++ b/aider/website/docs/config/options.md @@ -381,7 +381,7 @@ Set the background color for the current item in the completion menu (default: t Environment variable: `AIDER_COMPLETION_MENU_CURRENT_BG_COLOR` ### `--code-theme VALUE` -Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light) +Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light, or a Pygments builtin style, see [https://pygments.org/styles](https://pygments.org/styles) for available themes) Default: default Environment variable: `AIDER_CODE_THEME` From ffc2c5a26e1d515dc836d1f34f1cc314997dc820 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 12:55:24 -0800 Subject: [PATCH 090/102] refactor: Move uuid percentage check to function --- aider/analytics.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aider/analytics.py b/aider/analytics.py index f906fca22c3..113b5c63777 100644 --- a/aider/analytics.py +++ b/aider/analytics.py @@ -87,6 +87,7 @@ def need_to_ask(self, args_analytics): PERCENT = 5 return self.is_uuid_in_percentage(self.user_id, PERCENT) + # AI refactor this out of the class... def is_uuid_in_percentage(self, uuid_str, percent): """Check if a UUID string falls within the first X percent of the UUID space. @@ -107,7 +108,10 @@ def is_uuid_in_percentage(self, uuid_str, percent): # Using first 6 hex digits if percent == 0: return False + + # and make a separate function for computing the threshold AI! threshold = format(int(0xFFFFFF * percent / 100), "06x") + return uuid_str[:6] <= threshold def get_data_file_path(self): @@ -228,3 +232,9 @@ def event(self, event_name, main_model=None, **kwargs): f.write("\n") except OSError: pass # Ignore OS errors when writing to logfile + + +if __name__ == '__main__': + a = Analytics() + dump(a.user_id) + a.is_uuid_in_percentage(a.user_id, 5) From 9a770eeae9229d0a3a93f5cc11fce77a31a228e4 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 12:55:26 -0800 Subject: [PATCH 091/102] refactor: Move uuid percentage check to standalone functions --- aider/analytics.py | 65 +++++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/aider/analytics.py b/aider/analytics.py index 113b5c63777..7c1c06bfbc2 100644 --- a/aider/analytics.py +++ b/aider/analytics.py @@ -10,6 +10,43 @@ from aider import __version__ from aider.dump import dump # noqa: F401 + + +def compute_hex_threshold(percent): + """Convert percentage to 6-digit hex threshold. + + Args: + percent: Percentage threshold (0-100) + + Returns: + str: 6-digit hex threshold + """ + return format(int(0xFFFFFF * percent / 100), "06x") + + +def is_uuid_in_percentage(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 = compute_hex_threshold(percent) + return uuid_str[:6] <= threshold from aider.models import model_info_manager mixpanel_project_token = "6da9a43058a5d1b9f3353153921fb04d" @@ -85,34 +122,8 @@ def need_to_ask(self, args_analytics): return False PERCENT = 5 - return self.is_uuid_in_percentage(self.user_id, PERCENT) - - # AI refactor this out of the class... - 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 - - # and make a separate function for computing the threshold AI! - threshold = format(int(0xFFFFFF * percent / 100), "06x") + return is_uuid_in_percentage(self.user_id, PERCENT) - return uuid_str[:6] <= threshold def get_data_file_path(self): try: From 64fa058bc713bf28418b3d6111a53d3517035ee0 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 12:55:29 -0800 Subject: [PATCH 092/102] style: Apply linter fixes --- aider/analytics.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aider/analytics.py b/aider/analytics.py index 7c1c06bfbc2..78e13e7023f 100644 --- a/aider/analytics.py +++ b/aider/analytics.py @@ -14,10 +14,10 @@ def compute_hex_threshold(percent): """Convert percentage to 6-digit hex threshold. - + Args: percent: Percentage threshold (0-100) - + Returns: str: 6-digit hex threshold """ @@ -47,6 +47,8 @@ def is_uuid_in_percentage(uuid_str, percent): threshold = compute_hex_threshold(percent) return uuid_str[:6] <= threshold + + from aider.models import model_info_manager mixpanel_project_token = "6da9a43058a5d1b9f3353153921fb04d" @@ -124,7 +126,6 @@ def need_to_ask(self, args_analytics): PERCENT = 5 return is_uuid_in_percentage(self.user_id, PERCENT) - def get_data_file_path(self): try: data_file = Path.home() / ".aider" / "analytics.json" @@ -245,7 +246,7 @@ def event(self, event_name, main_model=None, **kwargs): pass # Ignore OS errors when writing to logfile -if __name__ == '__main__': +if __name__ == "__main__": a = Analytics() dump(a.user_id) a.is_uuid_in_percentage(a.user_id, 5) From 60f26cc0678e433fb68bac76a607bbbc5ffed645 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 12:55:43 -0800 Subject: [PATCH 093/102] refactor: Move is_uuid_in_percentage and fix import --- aider/analytics.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aider/analytics.py b/aider/analytics.py index 78e13e7023f..e253caff5a2 100644 --- a/aider/analytics.py +++ b/aider/analytics.py @@ -10,6 +10,7 @@ from aider import __version__ from aider.dump import dump # noqa: F401 +from aider.models import model_info_manager def compute_hex_threshold(percent): @@ -49,8 +50,6 @@ def is_uuid_in_percentage(uuid_str, percent): return uuid_str[:6] <= threshold -from aider.models import model_info_manager - mixpanel_project_token = "6da9a43058a5d1b9f3353153921fb04d" posthog_project_api_key = "phc_99T7muzafUMMZX15H8XePbMSreEUzahHbtWjy3l5Qbv" posthog_host = "https://us.i.posthog.com" From c708e8ba8e2903380d61e52e656966f389f29b98 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 13:02:07 -0800 Subject: [PATCH 094/102] refactor: Move PERCENT constant to top level --- aider/analytics.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/aider/analytics.py b/aider/analytics.py index e253caff5a2..37c3d86f0a7 100644 --- a/aider/analytics.py +++ b/aider/analytics.py @@ -12,6 +12,8 @@ from aider.dump import dump # noqa: F401 from aider.models import model_info_manager +PERCENT = 5 + def compute_hex_threshold(percent): """Convert percentage to 6-digit hex threshold. @@ -122,7 +124,6 @@ def need_to_ask(self, args_analytics): if not self.user_id: return False - PERCENT = 5 return is_uuid_in_percentage(self.user_id, PERCENT) def get_data_file_path(self): @@ -246,6 +247,4 @@ def event(self, event_name, main_model=None, **kwargs): if __name__ == "__main__": - a = Analytics() - dump(a.user_id) - a.is_uuid_in_percentage(a.user_id, 5) + dump(compute_hex_threshold(PERCENT)) From e7bec5be1d076d97dcafc3a548b158f4815cab98 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 13:23:55 -0800 Subject: [PATCH 095/102] feat: Allow setting root path for file watcher --- aider/watch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/watch.py b/aider/watch.py index 016581870a7..fcd145bb2c6 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -66,10 +66,10 @@ class FileWatcher: # 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): + def __init__(self, coder, gitignores=None, verbose=False, analytics=None, root=None): self.coder = coder self.io = coder.io - self.root = Path(coder.root) + self.root = Path(root) if root else Path(coder.root) self.verbose = verbose self.analytics = analytics self.stop_event = None From 9bebb1e9a972379234705b5e7e0b9f87dea6398c Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 13:24:49 -0800 Subject: [PATCH 096/102] fix: Pass root to FileWatcher --- aider/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/main.py b/aider/main.py index 58de4074eb3..e26ee895b9c 100644 --- a/aider/main.py +++ b/aider/main.py @@ -870,9 +870,10 @@ def get_io(pretty): if args.aiderignore: ignores.append(args.aiderignore) + # if args.subtree_only, pass root=os.cwd ai! if args.watch_files: file_watcher = FileWatcher( - coder, gitignores=ignores, verbose=args.verbose, analytics=analytics + coder, gitignores=ignores, verbose=args.verbose, analytics=analytics, ) coder.file_watcher = file_watcher From 195ae5ce4bdae12ac22c29b3c93402b1abf8c18c Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 13:24:50 -0800 Subject: [PATCH 097/102] feat: Pass cwd as root to FileWatcher when subtree_only --- aider/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/main.py b/aider/main.py index e26ee895b9c..3e47fa7230f 100644 --- a/aider/main.py +++ b/aider/main.py @@ -870,10 +870,10 @@ def get_io(pretty): if args.aiderignore: ignores.append(args.aiderignore) - # if args.subtree_only, pass root=os.cwd ai! if args.watch_files: file_watcher = FileWatcher( coder, gitignores=ignores, verbose=args.verbose, analytics=analytics, + root=str(Path.cwd()) if args.subtree_only else None, ) coder.file_watcher = file_watcher From 408a40f78b198177206b6ce2d8ba9fc27ae1f52a Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 13:24:55 -0800 Subject: [PATCH 098/102] style: Format with linter --- aider/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aider/main.py b/aider/main.py index 3e47fa7230f..4e6aa1564f3 100644 --- a/aider/main.py +++ b/aider/main.py @@ -872,7 +872,10 @@ def get_io(pretty): if args.watch_files: file_watcher = FileWatcher( - coder, gitignores=ignores, verbose=args.verbose, analytics=analytics, + coder, + gitignores=ignores, + verbose=args.verbose, + analytics=analytics, root=str(Path.cwd()) if args.subtree_only else None, ) coder.file_watcher = file_watcher From 2416a8bf960a3a455d1eaf696e3057b71b1b3cf7 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 13:30:10 -0800 Subject: [PATCH 099/102] fix: Handle empty file content in FileWatcher --- aider/watch.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aider/watch.py b/aider/watch.py index fcd145bb2c6..f1e24bcc587 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -223,6 +223,9 @@ def get_ai_comments(self, filepath): comments = [] has_action = None # None, "!" or "?" content = self.io.read_text(filepath, silent=True) + if not content: + return None, None, None + for i, line in enumerate(content.splitlines(), 1): if match := self.ai_comment_pattern.search(line): comment = match.group(0).strip() From 2124e7b2217c1d36ea177f3e91e849671aeebf86 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 13:30:30 -0800 Subject: [PATCH 100/102] copy --- aider/website/assets/sample-analytics.jsonl | 284 ++++++++++---------- aider/website/assets/sample.aider.conf.yml | 2 +- aider/website/assets/sample.env | 2 +- aider/website/docs/config/aider_conf.md | 2 +- aider/website/docs/config/dotenv.md | 2 +- aider/website/docs/config/options.md | 2 +- aider/website/docs/faq.md | 8 +- 7 files changed, 151 insertions(+), 151 deletions(-) diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index ed73d6e1d12..ea1cd11d523 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -1,145 +1,3 @@ -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842794} -{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733842798} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733844000} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733844000} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733844000} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845608} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845608} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845608} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845620} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845620} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845620} -{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845624} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845631} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845632} -{"event": "cli session", "properties": {"main_model": "gpt-4o-mini", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "gpt-4o-mini", "edit_format": "whole"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845632} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845632} -{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845647} -{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733845647} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733846535} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733846535} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733846535} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733847561} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733847561} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733847561} -{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857452} -{"event": "repo", "properties": {"num_files": 404, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857452} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857452} -{"event": "command_ask", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857463} -{"event": "message_send_starting", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857463} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 1874, "completion_tokens": 164, "total_tokens": 2038, "cost": 0.008082, "total_cost": 0.008082, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857476} -{"event": "message_send_starting", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857481} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 4169, "completion_tokens": 149, "total_tokens": 4318, "cost": 0.014742000000000002, "total_cost": 0.022824000000000004, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857484} -{"event": "command_exit", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857489} -{"event": "exit", "properties": {"reason": "/exit", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857489} -{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857657} -{"event": "repo", "properties": {"num_files": 404, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857657} -{"event": "exit", "properties": {"reason": "Completed lint/test/commit", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857662} -{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857779} -{"event": "no-repo", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857779} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857779} -{"event": "command_ask", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857808} -{"event": "message_send_starting", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857808} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 1309, "completion_tokens": 183, "total_tokens": 1492, "cost": 0.006672, "total_cost": 0.006672, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857814} -{"event": "command_web", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857827} -{"event": "command_ask", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857846} -{"event": "message_send_starting", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857847} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 6592, "completion_tokens": 296, "total_tokens": 6888, "cost": 0.024216, "total_cost": 0.030888000000000002, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857854} -{"event": "command_ask", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857871} -{"event": "message_send_starting", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857871} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 6905, "completion_tokens": 55, "total_tokens": 6960, "cost": 0.02154, "total_cost": 0.052428, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857875} -{"event": "command_tokens", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857891} -{"event": "command_drop", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857910} -{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857913} -{"event": "command_ask", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857918} -{"event": "message_send_starting", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857918} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 7577, "completion_tokens": 210, "total_tokens": 7787, "cost": 0.025881, "total_cost": 0.078309, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857925} -{"event": "message_send_starting", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857937} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 9917, "completion_tokens": 74, "total_tokens": 9991, "cost": 0.030861, "total_cost": 0.10917, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733857940} -{"event": "command_exit", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733860573} -{"event": "exit", "properties": {"reason": "/exit", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733860573} -{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.67.0"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733929876} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733929883} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733929884} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733929884} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733929886} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733929917} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733929917} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 7369, "completion_tokens": 258, "total_tokens": 7627, "cost": 0.025977, "total_cost": 0.025977}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733929925} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733939491} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733939583} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733939583} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733939583} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947758} -{"event": "repo", "properties": {"num_files": 404}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947758} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947758} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947761} -{"event": "command_editor", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947764} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947784} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947791} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 12248, "completion_tokens": 474, "total_tokens": 12722, "cost": 0.043854, "total_cost": 0.043854}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947801} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947804} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 15146, "completion_tokens": 209, "total_tokens": 15355, "cost": 0.048573, "total_cost": 0.092427}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947810} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947886} -{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947887} -{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733947887} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733948773} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950757} -{"event": "repo", "properties": {"num_files": 406}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950757} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950758} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950759} -{"event": "command_editor", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950762} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950768} -{"event": "command_editor", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950770} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950816} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950818} -{"event": "repo", "properties": {"num_files": 406}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950818} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950818} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950819} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950823} -{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950823} -{"event": "cli session", "properties": {"main_model": "gpt-4o-mini", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "gpt-4o-mini", "edit_format": "whole"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950823} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950824} -{"event": "message_send", "properties": {"main_model": "gpt-4o-mini", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "gpt-4o-mini", "edit_format": "whole", "prompt_tokens": 674, "completion_tokens": 23, "total_tokens": 697, "cost": 0.00011489999999999999, "total_cost": 0.00011489999999999999}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950827} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950828} -{"event": "message_send", "properties": {"main_model": "gpt-4o-mini", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "gpt-4o-mini", "edit_format": "whole", "prompt_tokens": 706, "completion_tokens": 25, "total_tokens": 731, "cost": 0.0001209, "total_cost": 0.00023579999999999999}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950829} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733950830} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951339} -{"event": "repo", "properties": {"num_files": 406}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951339} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951339} -{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951361} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951361} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 7036, "completion_tokens": 430, "total_tokens": 7466, "cost": 0.027558000000000003, "total_cost": 0.027558000000000003}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951372} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951373} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 9587, "completion_tokens": 522, "total_tokens": 10109, "cost": 0.036591, "total_cost": 0.064149}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951384} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951414} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951824} -{"event": "repo", "properties": {"num_files": 406}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951824} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951824} -{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951832} -{"event": "command_chat-mode", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951835} -{"event": "command_web", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951842} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951864} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 16097, "completion_tokens": 234, "total_tokens": 16331, "cost": 0.051801, "total_cost": 0.051801}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951873} -{"event": "command_clear", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951907} -{"event": "command_tokens", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951908} -{"event": "command_web", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951918} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951926} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 15874, "completion_tokens": 284, "total_tokens": 16158, "cost": 0.051882000000000005, "total_cost": 0.103683}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951936} -{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733951997} -{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 16180, "completion_tokens": 326, "total_tokens": 16506, "cost": 0.05343, "total_cost": 0.157113}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733952005} -{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733952052} -{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733952052} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953765} -{"event": "repo", "properties": {"num_files": 406}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953765} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953765} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953817} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953819} -{"event": "repo", "properties": {"num_files": 406}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953819} -{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953819} -{"event": "command_voice", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953822} -{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953848} -{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953850} {"event": "repo", "properties": {"num_files": 406}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953850} {"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953850} {"event": "command_voice", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1733953852} @@ -998,3 +856,145 @@ {"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452871} {"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 6592, "completion_tokens": 163, "total_tokens": 6755, "cost": 0.022221, "total_cost": 0.022221}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452876} {"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452877} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452878} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452997} +{"event": "repo", "properties": {"num_files": 412}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452999} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734452999} +{"event": "command_add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453002} +{"event": "command_ask", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453028} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453028} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2473, "completion_tokens": 1090, "total_tokens": 3563, "cost": 0.023769, "total_cost": 0.023769}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453057} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453099} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "ask", "prompt_tokens": 2774, "completion_tokens": 874, "total_tokens": 3648, "cost": 0.021432, "total_cost": 0.045201}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453113} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453121} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5810, "completion_tokens": 476, "total_tokens": 6286, "cost": 0.02457, "total_cost": 0.069771}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453131} +{"event": "command_diff", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453199} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453226} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734453909} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734454194} +{"event": "gui session", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734454194} +{"event": "exit", "properties": {"reason": "GUI session ended"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734454194} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461127} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461129} +{"event": "cli session", "properties": {"main_model": "None", "weak_model": "gemini/REDACTED", "editor_model": "None", "edit_format": "whole"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461129} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461132} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461133} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461142} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461144} +{"event": "cli session", "properties": {"main_model": "openai/REDACTED", "weak_model": "gemini/REDACTED", "editor_model": "openai/REDACTED", "edit_format": "whole"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461144} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461145} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461149} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461149} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461154} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461155} +{"event": "cli session", "properties": {"main_model": "openai/REDACTED", "weak_model": "gemini/REDACTED", "editor_model": "openai/REDACTED", "edit_format": "whole"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461155} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461156} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461158} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461158} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461248} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461250} +{"event": "cli session", "properties": {"main_model": "openai/REDACTED", "weak_model": "gemini/REDACTED", "editor_model": "openai/REDACTED", "edit_format": "whole"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461250} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461251} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461253} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461253} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461260} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461262} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461262} +{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734461262} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466628} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466630} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466630} +{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466631} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466820} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466822} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466822} +{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466822} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466919} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466921} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466921} +{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734466922} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734467111} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734467112} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734467112} +{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734467113} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734467964} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734467966} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734467966} +{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734467966} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468327} +{"event": "repo", "properties": {"num_files": 412}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468329} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468329} +{"event": "command_exit", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468336} +{"event": "exit", "properties": {"reason": "/exit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468336} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468346} +{"event": "repo", "properties": {"num_files": 412}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468347} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468347} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468363} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468364} +{"event": "repo", "properties": {"num_files": 412}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468367} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468367} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468418} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468419} +{"event": "repo", "properties": {"num_files": 412}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468421} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468421} +{"event": "exit", "properties": {"reason": "Completed main CLI coder.run"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468468} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468907} +{"event": "repo", "properties": {"num_files": 412}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468909} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468909} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468910} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468910} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468910} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5251, "completion_tokens": 652, "total_tokens": 5903, "cost": 0.025533, "total_cost": 0.025533}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468923} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468936} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 6873, "completion_tokens": 227, "total_tokens": 7100, "cost": 0.024024000000000004, "total_cost": 0.049557000000000004}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734468942} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469011} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469011} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 5787, "completion_tokens": 355, "total_tokens": 6142, "cost": 0.022686, "total_cost": 0.072243}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469018} +{"event": "command_undo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469039} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469321} +{"event": "repo", "properties": {"num_files": 412}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469323} +{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469327} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469764} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469766} +{"event": "cli session", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469766} +{"event": "command_editor", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469788} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469855} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 2625, "completion_tokens": 1082, "total_tokens": 3707, "cost": 0.024105, "total_cost": 0.024105}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469871} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469943} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 4268, "completion_tokens": 761, "total_tokens": 5029, "cost": 0.024219, "total_cost": 0.048324000000000006}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734469955} +{"event": "command_reset", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470607} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470629} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470629} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470629} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470629} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470629} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470629} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 4622, "completion_tokens": 260, "total_tokens": 4882, "cost": 0.017766, "total_cost": 0.06609000000000001}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470634} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8338, "completion_tokens": 212, "total_tokens": 8550, "cost": 0.028194, "total_cost": 0.100437}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470634} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470636} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 8768, "completion_tokens": 65, "total_tokens": 8833, "cost": 0.027279, "total_cost": 0.127716}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470638} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470682} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470682} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470682} +{"event": "ai-comments file-add", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470682} +{"event": "ai-comments execute", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470682} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470682} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 16987, "completion_tokens": 183, "total_tokens": 17170, "cost": 0.053706, "total_cost": 0.181422}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470688} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 13008, "completion_tokens": 279, "total_tokens": 13287, "cost": 0.043209000000000004, "total_cost": 0.10929900000000001}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470689} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470689} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 13621, "completion_tokens": 173, "total_tokens": 13794, "cost": 0.043458000000000004, "total_cost": 0.152757}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470696} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470696} +{"event": "message_send", "properties": {"main_model": "claude-3-5-sonnet-20241022", "weak_model": "gemini/REDACTED", "editor_model": "claude-3-5-sonnet-20241022", "edit_format": "diff", "prompt_tokens": 13975, "completion_tokens": 160, "total_tokens": 14135, "cost": 0.044325, "total_cost": 0.197082}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470700} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470700} +{"event": "exit", "properties": {"reason": "Control-C"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470704} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470873} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470875} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470875} +{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470876} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470880} +{"event": "no-repo", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470881} +{"event": "message_send_starting", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470881} +{"event": "exit", "properties": {"reason": "Completed --message"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734470882} +{"event": "launched", "properties": {}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734471006} +{"event": "repo", "properties": {"num_files": 412}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734471008} +{"event": "exit", "properties": {"reason": "Completed lint/test/commit"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1734471010} diff --git a/aider/website/assets/sample.aider.conf.yml b/aider/website/assets/sample.aider.conf.yml index 4efb856fbb4..2bd0419304a 100644 --- a/aider/website/assets/sample.aider.conf.yml +++ b/aider/website/assets/sample.aider.conf.yml @@ -218,7 +218,7 @@ ## Set the background color for the current item in the completion menu (default: terminal's default text color) #completion-menu-current-bg-color: xxx -## Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light) +## Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light, or a Pygments builtin style, see https://pygments.org/styles for available themes) #code-theme: default ## Show diffs when committing changes (default: False) diff --git a/aider/website/assets/sample.env b/aider/website/assets/sample.env index 8cf37e66869..56f449e4115 100644 --- a/aider/website/assets/sample.env +++ b/aider/website/assets/sample.env @@ -207,7 +207,7 @@ ## Set the background color for the current item in the completion menu (default: terminal's default text color) #AIDER_COMPLETION_MENU_CURRENT_BG_COLOR= -## Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light) +## Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light, or a Pygments builtin style, see https://pygments.org/styles for available themes) #AIDER_CODE_THEME=default ## Show diffs when committing changes (default: False) diff --git a/aider/website/docs/config/aider_conf.md b/aider/website/docs/config/aider_conf.md index 6c589513ff4..cb42c1b2efa 100644 --- a/aider/website/docs/config/aider_conf.md +++ b/aider/website/docs/config/aider_conf.md @@ -270,7 +270,7 @@ cog.outl("```") ## Set the background color for the current item in the completion menu (default: terminal's default text color) #completion-menu-current-bg-color: xxx -## Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light) +## Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light, or a Pygments builtin style, see https://pygments.org/styles for available themes) #code-theme: default ## Show diffs when committing changes (default: False) diff --git a/aider/website/docs/config/dotenv.md b/aider/website/docs/config/dotenv.md index 6da0f35aa09..1005dd974eb 100644 --- a/aider/website/docs/config/dotenv.md +++ b/aider/website/docs/config/dotenv.md @@ -247,7 +247,7 @@ cog.outl("```") ## Set the background color for the current item in the completion menu (default: terminal's default text color) #AIDER_COMPLETION_MENU_CURRENT_BG_COLOR= -## Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light) +## Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light, or a Pygments builtin style, see https://pygments.org/styles for available themes) #AIDER_CODE_THEME=default ## Show diffs when committing changes (default: False) diff --git a/aider/website/docs/config/options.md b/aider/website/docs/config/options.md index bee47b8b265..459678a5f0d 100644 --- a/aider/website/docs/config/options.md +++ b/aider/website/docs/config/options.md @@ -381,7 +381,7 @@ Set the background color for the current item in the completion menu (default: t Environment variable: `AIDER_COMPLETION_MENU_CURRENT_BG_COLOR` ### `--code-theme VALUE` -Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light, or a Pygments builtin style, see [https://pygments.org/styles](https://pygments.org/styles) for available themes) +Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light, or a Pygments builtin style, see https://pygments.org/styles for available themes) Default: default Environment variable: `AIDER_CODE_THEME` diff --git a/aider/website/docs/faq.md b/aider/website/docs/faq.md index 82677511811..97535899102 100644 --- a/aider/website/docs/faq.md +++ b/aider/website/docs/faq.md @@ -237,12 +237,12 @@ tr:hover { background-color: #f5f5f5; }
Model NameTotal TokensPercent
claude-3-5-sonnet-202410221,668,59987.5%
o1-preview117,3126.2%
claude-3-5-sonnet-202410221,681,13787.6%
o1-preview117,3126.1%
gemini/REDACTED82,5724.3%
deepseek/deepseek-coder24,6281.3%
gpt-4o9,2430.5%
- - - + + + - +
Model NameTotal TokensPercent
claude-3-5-sonnet-202410221,681,13787.6%
o1-preview117,3126.1%
gemini/REDACTED82,5724.3%
claude-3-5-sonnet-202410221,661,41887.5%
o1-preview117,3126.2%
gemini/REDACTED82,5724.4%
deepseek/deepseek-coder24,6281.3%
gpt-4o9,2430.5%
gpt-4o-mini3,4200.2%
gpt-4o-mini1,9920.1%
mistral/REDACTED6200.0%
From 04afb99c5490ea169d006f2f6e636c7447946b60 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 13:33:33 -0800 Subject: [PATCH 101/102] fix: Use module-level function in test_is_uuid_in_percentage --- tests/basic/test_analytics.py | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/basic/test_analytics.py b/tests/basic/test_analytics.py index 98aa1d44068..b800b33562d 100644 --- a/tests/basic/test_analytics.py +++ b/tests/basic/test_analytics.py @@ -108,32 +108,32 @@ def test_need_to_ask(temp_data_dir): def test_is_uuid_in_percentage(): - analytics = Analytics() + from aider.analytics import is_uuid_in_percentage # Test basic percentage thresholds - assert analytics.is_uuid_in_percentage("00000000000000000000000000000000", 1) is True - assert analytics.is_uuid_in_percentage("01999000000000000000000000000000", 1) is True - assert analytics.is_uuid_in_percentage("02000000000000000000000000000000", 1) is True - assert analytics.is_uuid_in_percentage("02910000000000000000000000000001", 1) is False - assert analytics.is_uuid_in_percentage("03000000000000000000000000000000", 1) is False - assert analytics.is_uuid_in_percentage("ff000000000000000000000000000000", 1) is False - - assert analytics.is_uuid_in_percentage("00000000000000000000000000000000", 10) is True - assert analytics.is_uuid_in_percentage("19000000000000000000000000000000", 10) is True - assert analytics.is_uuid_in_percentage("1a000000000000000000000000000000", 10) is False - assert analytics.is_uuid_in_percentage("ff000000000000000000000000000000", 10) is False + assert is_uuid_in_percentage("00000000000000000000000000000000", 1) is True + assert is_uuid_in_percentage("01999000000000000000000000000000", 1) is True + assert is_uuid_in_percentage("02000000000000000000000000000000", 1) is True + assert is_uuid_in_percentage("02910000000000000000000000000001", 1) is False + assert is_uuid_in_percentage("03000000000000000000000000000000", 1) is False + assert is_uuid_in_percentage("ff000000000000000000000000000000", 1) is False + + assert is_uuid_in_percentage("00000000000000000000000000000000", 10) is True + assert is_uuid_in_percentage("19000000000000000000000000000000", 10) is True + assert is_uuid_in_percentage("1a000000000000000000000000000000", 10) is False + assert is_uuid_in_percentage("ff000000000000000000000000000000", 10) is False # Test edge cases - assert analytics.is_uuid_in_percentage("00000000000000000000000000000000", 0) is False - assert analytics.is_uuid_in_percentage("00000000000000000000000000000000", 100) is True - assert analytics.is_uuid_in_percentage("ffffffffffffffffffffffffffffffff", 100) is True + assert is_uuid_in_percentage("00000000000000000000000000000000", 0) is False + assert is_uuid_in_percentage("00000000000000000000000000000000", 100) is True + assert is_uuid_in_percentage("ffffffffffffffffffffffffffffffff", 100) is True # Test invalid inputs with pytest.raises(ValueError): - analytics.is_uuid_in_percentage("00000000000000000000000000000000", -1) + is_uuid_in_percentage("00000000000000000000000000000000", -1) with pytest.raises(ValueError): - analytics.is_uuid_in_percentage("00000000000000000000000000000000", 101) + is_uuid_in_percentage("00000000000000000000000000000000", 101) # Test empty/None UUID - assert analytics.is_uuid_in_percentage("", 50) is False - assert analytics.is_uuid_in_percentage(None, 50) is False + assert is_uuid_in_percentage("", 50) is False + assert is_uuid_in_percentage(None, 50) is False From eb9c41f2a0087e90936d55d3e4ba3c9b7be3e517 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 17 Dec 2024 13:42:59 -0800 Subject: [PATCH 102/102] feat: Enable complete_while_typing in prompt_session --- aider/io.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aider/io.py b/aider/io.py index c2eb06877ae..ecadcb14d71 100644 --- a/aider/io.py +++ b/aider/io.py @@ -505,6 +505,7 @@ def _(event): complete_style=CompleteStyle.MULTI_COLUMN, style=style, key_bindings=kb, + complete_while_typing=True, ) else: line = input(show) @@ -773,7 +774,12 @@ def prompt_ask(self, question, default="", subject=None): res = "no" else: if self.prompt_session: - res = self.prompt_session.prompt(question + " ", default=default, style=style) + res = self.prompt_session.prompt( + question + " ", + default=default, + style=style, + complete_while_typing=True, + ) else: res = input(question + " ")