From 5e1be966ed82b8e9a79c54c10799a0012a4aa5f8 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 4 Nov 2024 09:05:23 -0800 Subject: [PATCH 01/38] chore: add comment about printing traceback stack in error handling --- aider/io.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aider/io.py b/aider/io.py index 5e27a267a..29ec13b58 100644 --- a/aider/io.py +++ b/aider/io.py @@ -320,6 +320,7 @@ class InputOutput: return f.read() except OSError as err: self.tool_error(f"{filename}: unable to read: {err}") + #ai print the trackback stack! return except FileNotFoundError: self.tool_error(f"{filename}: file not found error") From ebdc126b008eaac79034648ce15001560f7b7f12 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 4 Nov 2024 09:05:24 -0800 Subject: [PATCH 02/38] feat: add traceback printing for file read errors --- aider/io.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/io.py b/aider/io.py index 29ec13b58..b6b7d5820 100644 --- a/aider/io.py +++ b/aider/io.py @@ -319,8 +319,9 @@ class InputOutput: with open(str(filename), "r", encoding=self.encoding) as f: return f.read() except OSError as err: + import traceback self.tool_error(f"{filename}: unable to read: {err}") - #ai print the trackback stack! + self.tool_error("Traceback:\n" + "".join(traceback.format_stack())) return except FileNotFoundError: self.tool_error(f"{filename}: file not found error") From 96ad107c191507b53e0a6c3261295a63a702ace3 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 4 Nov 2024 09:05:28 -0800 Subject: [PATCH 03/38] style: add newline before error message in io.py --- aider/io.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aider/io.py b/aider/io.py index b6b7d5820..38d900a8e 100644 --- a/aider/io.py +++ b/aider/io.py @@ -320,6 +320,7 @@ class InputOutput: return f.read() except OSError as err: import traceback + self.tool_error(f"{filename}: unable to read: {err}") self.tool_error("Traceback:\n" + "".join(traceback.format_stack())) return From 966a613ffed5eb591b856066990f512c9d0d5917 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 4 Nov 2024 09:07:47 -0800 Subject: [PATCH 04/38] fix: handle non-existent files in EditBlockCoder #2233 --- aider/coders/editblock_coder.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aider/coders/editblock_coder.py b/aider/coders/editblock_coder.py index 97b913c59..316205e72 100644 --- a/aider/coders/editblock_coder.py +++ b/aider/coders/editblock_coder.py @@ -46,8 +46,12 @@ class EditBlockCoder(Coder): for edit in edits: path, original, updated = edit full_path = self.abs_root_path(path) - content = self.io.read_text(full_path) - new_content = do_replace(full_path, content, original, updated, self.fence) + new_content = None + + if Path(full_path).exists(): + content = self.io.read_text(full_path) + new_content = do_replace(full_path, content, original, updated, self.fence) + if not new_content: # try patching any of the other files in the chat for full_path in self.abs_fnames: From 129f5fae76164af4c6562f5d4e168b2cac1de225 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 4 Nov 2024 09:09:45 -0800 Subject: [PATCH 05/38] cleanup --- aider/io.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/aider/io.py b/aider/io.py index 38d900a8e..5e27a267a 100644 --- a/aider/io.py +++ b/aider/io.py @@ -319,10 +319,7 @@ class InputOutput: with open(str(filename), "r", encoding=self.encoding) as f: return f.read() except OSError as err: - import traceback - self.tool_error(f"{filename}: unable to read: {err}") - self.tool_error("Traceback:\n" + "".join(traceback.format_stack())) return except FileNotFoundError: self.tool_error(f"{filename}: file not found error") From c67e63bc09f97768ed687d939e3c8be397dcc9b3 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 4 Nov 2024 10:34:19 -0800 Subject: [PATCH 06/38] feat: add clipboard edit mode via --apply-clipboard-edits flag --- aider/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aider/main.py b/aider/main.py index 258839b9e..9ad59dc0b 100644 --- a/aider/main.py +++ b/aider/main.py @@ -1,3 +1,5 @@ +#ai: add a --apply-clipboard-edits switch which sets the edit-format to the main models editor format and acts as if "--msg /paste" was provided as an arg! + import configparser import json import os From 8bc0d5544d0bb656a028407dbf14fb187151e529 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 4 Nov 2024 10:34:21 -0800 Subject: [PATCH 07/38] feat: add --apply-clipboard-edits switch for direct clipboard editing --- aider/args.py | 6 ++++++ aider/main.py | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/aider/args.py b/aider/args.py index c02254e49..852b42ee2 100644 --- a/aider/args.py +++ b/aider/args.py @@ -630,6 +630,12 @@ def get_parser(default_config_files, git_root): metavar="FILE", help="Apply the changes from the given file instead of running the chat (debug)", ) + group.add_argument( + "--apply-clipboard-edits", + action="store_true", + help="Apply clipboard contents as edits using the main model's editor format", + default=False, + ) group.add_argument( "--yes-always", action="store_true", diff --git a/aider/main.py b/aider/main.py index 9ad59dc0b..463400a38 100644 --- a/aider/main.py +++ b/aider/main.py @@ -1,4 +1,3 @@ -#ai: add a --apply-clipboard-edits switch which sets the edit-format to the main models editor format and acts as if "--msg /paste" was provided as an arg! import configparser import json @@ -776,6 +775,10 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F coder.apply_updates() return + if args.apply_clipboard_edits: + args.edit_format = main_model.editor_edit_format + args.message = "/paste" + if "VSCODE_GIT_IPC_HANDLE" in os.environ: args.pretty = False io.tool_output("VSCode terminal detected, pretty output has been disabled.") From dfaaedb466c15efd18f150a5c69ab96a72951525 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 4 Nov 2024 10:34:27 -0800 Subject: [PATCH 08/38] style: remove empty line at start of main.py --- aider/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/aider/main.py b/aider/main.py index 463400a38..4a11c214c 100644 --- a/aider/main.py +++ b/aider/main.py @@ -1,4 +1,3 @@ - import configparser import json import os From 0b11024967388bdd38dc83a68862e501041ec77b Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 4 Nov 2024 10:35:37 -0800 Subject: [PATCH 09/38] copy --- aider/website/assets/sample-analytics.jsonl | 61 +++++++++++++++++++++ aider/website/assets/sample.aider.conf.yml | 3 + aider/website/assets/sample.env | 3 + aider/website/docs/config/aider_conf.md | 3 + aider/website/docs/config/dotenv.md | 3 + aider/website/docs/config/options.md | 11 +++- 6 files changed, 81 insertions(+), 3 deletions(-) diff --git a/aider/website/assets/sample-analytics.jsonl b/aider/website/assets/sample-analytics.jsonl index a125eb78e..5ea20aa5a 100644 --- a/aider/website/assets/sample-analytics.jsonl +++ b/aider/website/assets/sample-analytics.jsonl @@ -352,3 +352,64 @@ {"event": "command_reset", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730478719} {"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730479180} {"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730479181} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730479652} +{"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730479652} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730485790} +{"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": 3686, "completion_tokens": 122, "total_tokens": 3808, "cost": 0.012888, "total_cost": 0.012888, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730485796} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730485864} +{"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": 4389, "completion_tokens": 131, "total_tokens": 4520, "cost": 0.015132, "total_cost": 0.015132, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730485870} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730485876} +{"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": 4630, "completion_tokens": 200, "total_tokens": 4830, "cost": 0.01689, "total_cost": 0.01689, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730485883} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730485888} +{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730496783} +{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730496794} +{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730496806} +{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730496809} +{"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": 5099, "completion_tokens": 491, "total_tokens": 5590, "cost": 0.022662, "total_cost": 0.941154, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730496915} +{"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": 5632, "completion_tokens": 419, "total_tokens": 6051, "cost": 0.023181, "total_cost": 0.964335, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730496952} +{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730496971} +{"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": 19338, "completion_tokens": 1079, "total_tokens": 20417, "cost": 0.074199, "total_cost": 1.038534, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730497006} +{"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": 19716, "completion_tokens": 102, "total_tokens": 19818, "cost": 0.060677999999999996, "total_cost": 1.099212, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.60.2.dev13+g9e7995b7"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730497034} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730497091} +{"event": "cli session", "properties": {"main_model": "gpt-4o-mini", "weak_model": "claude-3-5-sonnet-20241022", "editor_model": "gpt-4o-mini", "edit_format": "whole", "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730497092} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739772} +{"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": 2181, "completion_tokens": 62, "total_tokens": 2243, "cost": 0.0074730000000000005, "total_cost": 0.0074730000000000005, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739777} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739851} +{"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": 2181, "completion_tokens": 62, "total_tokens": 2243, "cost": 0.0074730000000000005, "total_cost": 0.0074730000000000005, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739855} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739887} +{"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.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739887} +{"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": 4679, "completion_tokens": 132, "total_tokens": 4811, "cost": 0.016017, "total_cost": 0.016017, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739897} +{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739914} +{"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": 8584, "completion_tokens": 182, "total_tokens": 8766, "cost": 0.028482, "total_cost": 0.044499, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739921} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739932} +{"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": 2181, "completion_tokens": 62, "total_tokens": 2243, "cost": 0.0074730000000000005, "total_cost": 0.0074730000000000005, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730739936} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740012} +{"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": 2181, "completion_tokens": 62, "total_tokens": 2243, "cost": 0.0074730000000000005, "total_cost": 0.0074730000000000005, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740016} +{"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": 2260, "completion_tokens": 65, "total_tokens": 2325, "cost": 0.007755000000000001, "total_cost": 0.015228000000000002, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740018} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740027} +{"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": 2181, "completion_tokens": 62, "total_tokens": 2243, "cost": 0.0074730000000000005, "total_cost": 0.0074730000000000005, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740031} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740037} +{"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": 2181, "completion_tokens": 62, "total_tokens": 2243, "cost": 0.0074730000000000005, "total_cost": 0.0074730000000000005, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740040} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740064} +{"event": "command_reset", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740104} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740138} +{"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740139} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740233} +{"event": "gui session", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730740233} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730741036} +{"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.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730741036} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730744738} +{"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.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730744738} +{"event": "command_paste", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730744742} +{"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": 1559, "completion_tokens": 43, "total_tokens": 1602, "cost": 0.0053219999999999995, "total_cost": 0.0053219999999999995, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730744745} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745072} +{"event": "command_paste", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745072} +{"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": 1559, "completion_tokens": 43, "total_tokens": 1602, "cost": 0.0053219999999999995, "total_cost": 0.0053219999999999995, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745076} +{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745181} +{"event": "command_add", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745186} +{"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": 15090, "completion_tokens": 442, "total_tokens": 15532, "cost": 0.0519, "total_cost": 0.096399, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745258} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745287} +{"event": "command_paste", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745287} +{"event": "launched", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745299} +{"event": "command_paste", "properties": {"python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745299} +{"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": 2271, "completion_tokens": 62, "total_tokens": 2333, "cost": 0.007743000000000001, "total_cost": 0.007743000000000001, "python_version": "3.12.6", "os_platform": "Darwin", "os_release": "23.6.0", "machine": "x86_64", "aider_version": "0.61.1.dev"}, "user_id": "c42c4e6b-f054-44d7-ae1f-6726cc41da88", "time": 1730745304} diff --git a/aider/website/assets/sample.aider.conf.yml b/aider/website/assets/sample.aider.conf.yml index 56b05d35e..ae00d6a43 100644 --- a/aider/website/assets/sample.aider.conf.yml +++ b/aider/website/assets/sample.aider.conf.yml @@ -320,6 +320,9 @@ ## Apply the changes from the given file instead of running the chat (debug) #apply: xxx +## Apply clipboard contents as edits using the main model's editor format +#apply-clipboard-edits: false + ## Always say yes to every confirmation #yes-always: false diff --git a/aider/website/assets/sample.env b/aider/website/assets/sample.env index 9b787dc9f..6c4857026 100644 --- a/aider/website/assets/sample.env +++ b/aider/website/assets/sample.env @@ -306,6 +306,9 @@ ## Apply the changes from the given file instead of running the chat (debug) #AIDER_APPLY= +## Apply clipboard contents as edits using the main model's editor format +#AIDER_APPLY_CLIPBOARD_EDITS=false + ## Always say yes to every confirmation #AIDER_YES_ALWAYS= diff --git a/aider/website/docs/config/aider_conf.md b/aider/website/docs/config/aider_conf.md index ef6abbf4a..c600de8d2 100644 --- a/aider/website/docs/config/aider_conf.md +++ b/aider/website/docs/config/aider_conf.md @@ -376,6 +376,9 @@ cog.outl("```") ## Apply the changes from the given file instead of running the chat (debug) #apply: xxx +## Apply clipboard contents as edits using the main model's editor format +#apply-clipboard-edits: false + ## Always say yes to every confirmation #yes-always: false diff --git a/aider/website/docs/config/dotenv.md b/aider/website/docs/config/dotenv.md index d7e1735e5..0be468a52 100644 --- a/aider/website/docs/config/dotenv.md +++ b/aider/website/docs/config/dotenv.md @@ -348,6 +348,9 @@ cog.outl("```") ## Apply the changes from the given file instead of running the chat (debug) #AIDER_APPLY= +## Apply clipboard contents as edits using the main model's editor format +#AIDER_APPLY_CLIPBOARD_EDITS=false + ## Always say yes to every confirmation #AIDER_YES_ALWAYS= diff --git a/aider/website/docs/config/options.md b/aider/website/docs/config/options.md index 5131631fc..7c00f8d5d 100644 --- a/aider/website/docs/config/options.md +++ b/aider/website/docs/config/options.md @@ -67,9 +67,9 @@ usage: aider [-h] [--openai-api-key] [--anthropic-api-key] [--model] [--chat-language] [--version] [--just-check-update] [--check-update | --no-check-update] [--install-main-branch] [--upgrade] [--apply] - [--yes-always] [-v] [--show-repo-map] [--show-prompts] - [--exit] [--message] [--message-file] [--load] - [--encoding] [-c] + [--apply-clipboard-edits] [--yes-always] [-v] + [--show-repo-map] [--show-prompts] [--exit] [--message] + [--message-file] [--load] [--encoding] [-c] [--gui | --no-gui | --browser | --no-browser] [--suggest-shell-commands | --no-suggest-shell-commands] [--fancy-input | --no-fancy-input] [--voice-format] @@ -574,6 +574,11 @@ Aliases: Apply the changes from the given file instead of running the chat (debug) Environment variable: `AIDER_APPLY` +### `--apply-clipboard-edits` +Apply clipboard contents as edits using the main model's editor format +Default: False +Environment variable: `AIDER_APPLY_CLIPBOARD_EDITS` + ### `--yes-always` Always say yes to every confirmation Environment variable: `AIDER_YES_ALWAYS` From 987cb3bca9f1203b20d731ace4403bfa3239b7b8 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 4 Nov 2024 10:46:54 -0800 Subject: [PATCH 10/38] feat: add claude-3-haiku model configuration --- aider/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aider/models.py b/aider/models.py index b48454787..f36dff3cb 100644 --- a/aider/models.py +++ b/aider/models.py @@ -9,6 +9,7 @@ from dataclasses import dataclass, fields from pathlib import Path from typing import Optional +#ai add anthropic/claude-3-5-haiku-20241022 and the versions of it from other providers mirroring the old claude-3-haiku settings! import json5 import yaml from PIL import Image From 0bde1da42ccbcbbcfbe85c1a97024e9474d2ffa5 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 4 Nov 2024 10:46:55 -0800 Subject: [PATCH 11/38] feat: add Claude 3.5 Haiku model and provider variants --- aider/models.py | 55 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/aider/models.py b/aider/models.py index f36dff3cb..edf72ba4b 100644 --- a/aider/models.py +++ b/aider/models.py @@ -9,7 +9,6 @@ from dataclasses import dataclass, fields from pathlib import Path from typing import Optional -#ai add anthropic/claude-3-5-haiku-20241022 and the versions of it from other providers mirroring the old claude-3-haiku settings! import json5 import yaml from PIL import Image @@ -53,6 +52,7 @@ ANTHROPIC_MODELS = """ claude-2 claude-2.1 claude-3-haiku-20240307 +claude-3-5-haiku-20241022 claude-3-opus-20240229 claude-3-sonnet-20240229 claude-3-5-sonnet-20240620 @@ -345,6 +345,59 @@ MODEL_SETTINGS = [ }, cache_control=True, ), + ModelSettings( + "anthropic/claude-3-5-haiku-20241022", + "whole", + weak_model_name="anthropic/claude-3-5-haiku-20241022", + examples_as_sys_msg=True, + extra_params={ + "extra_headers": { + "anthropic-beta": ANTHROPIC_BETA_HEADER, + }, + }, + cache_control=True, + ), + ModelSettings( + "claude-3-5-haiku-20241022", + "whole", + weak_model_name="claude-3-5-haiku-20241022", + examples_as_sys_msg=True, + extra_params={ + "extra_headers": { + "anthropic-beta": ANTHROPIC_BETA_HEADER, + }, + }, + cache_control=True, + ), + ModelSettings( + "vertex_ai/claude-3-5-haiku@20241022", + "whole", + weak_model_name="vertex_ai/claude-3-5-haiku@20241022", + examples_as_sys_msg=True, + extra_params={ + "max_tokens": 4096, + }, + ), + ModelSettings( + "openrouter/anthropic/claude-3.5-haiku", + "whole", + weak_model_name="openrouter/anthropic/claude-3.5-haiku", + examples_as_sys_msg=True, + extra_params={ + "max_tokens": 4096, + }, + cache_control=True, + ), + ModelSettings( + "openrouter/anthropic/claude-3.5-haiku:beta", + "whole", + weak_model_name="openrouter/anthropic/claude-3.5-haiku:beta", + examples_as_sys_msg=True, + extra_params={ + "max_tokens": 4096, + }, + cache_control=True, + ), ModelSettings( "claude-3-haiku-20240307", "whole", From 03bbdb010f3d7cadc2f0786dca65d0d2f4a6d000 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 4 Nov 2024 11:18:55 -0800 Subject: [PATCH 12/38] add haiku metadata --- aider/resources/model-metadata.json | 75 +++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 aider/resources/model-metadata.json diff --git a/aider/resources/model-metadata.json b/aider/resources/model-metadata.json new file mode 100644 index 000000000..e3970e0af --- /dev/null +++ b/aider/resources/model-metadata.json @@ -0,0 +1,75 @@ +{ + "claude-3-5-haiku-20241022": { + "max_tokens": 4096, + "max_input_tokens": 200000, + "max_output_tokens": 4096, + "input_cost_per_token": 0.000001, + "output_cost_per_token": 0.000005, + "litellm_provider": "anthropic", + "mode": "chat", + "supports_function_calling": true, + "tool_use_system_prompt_tokens": 264, + "supports_assistant_prefill": true, + "supports_prompt_caching": true + }, + "vertex_ai/claude-3-5-haiku@20241022": { + "max_tokens": 4096, + "max_input_tokens": 200000, + "max_output_tokens": 4096, + "input_cost_per_token": 0.000001, + "output_cost_per_token": 0.000005, + "litellm_provider": "vertex_ai-anthropic_models", + "mode": "chat", + "supports_function_calling": true, + "supports_assistant_prefill": true + }, + "openrouter/anthropic/claude-3-5-haiku": { + "max_tokens": 200000, + "input_cost_per_token": 0.000001, + "output_cost_per_token": 0.000005, + "litellm_provider": "openrouter", + "mode": "chat", + "supports_function_calling": true, + }, + "openrouter/anthropic/claude-3-5-haiku-20241022": { + "max_tokens": 4096, + "max_input_tokens": 200000, + "max_output_tokens": 4096, + "input_cost_per_token": 0.000001, + "output_cost_per_token": 0.000005, + "litellm_provider": "openrouter", + "mode": "chat", + "supports_function_calling": true, + "tool_use_system_prompt_tokens": 264 + }, + "anthropic.claude-3-5-haiku-20241022-v1:0": { + "max_tokens": 4096, + "max_input_tokens": 200000, + "max_output_tokens": 4096, + "input_cost_per_token": 0.000001, + "output_cost_per_token": 0.000005, + "litellm_provider": "bedrock", + "mode": "chat", + "supports_function_calling": true, + }, + "us.anthropic.claude-3-5-haiku-20241022-v1:0": { + "max_tokens": 4096, + "max_input_tokens": 200000, + "max_output_tokens": 4096, + "input_cost_per_token": 0.000001, + "output_cost_per_token": 0.000005, + "litellm_provider": "bedrock", + "mode": "chat", + "supports_function_calling": true, + }, + "eu.anthropic.claude-3-5-haiku-20241022-v1:0": { + "max_tokens": 4096, + "max_input_tokens": 200000, + "max_output_tokens": 4096, + "input_cost_per_token": 0.000001, + "output_cost_per_token": 0.000005, + "litellm_provider": "bedrock", + "mode": "chat", + "supports_function_calling": true, + }, +} From ce37ff26b567ab5eb22dc5e79ff7f9e0ef783c33 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 4 Nov 2024 11:32:41 -0800 Subject: [PATCH 13/38] refactor: remove redundant examples_as_sys_msg flag from Claude 3.5 models --- aider/models.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/aider/models.py b/aider/models.py index edf72ba4b..99a64791e 100644 --- a/aider/models.py +++ b/aider/models.py @@ -349,7 +349,6 @@ MODEL_SETTINGS = [ "anthropic/claude-3-5-haiku-20241022", "whole", weak_model_name="anthropic/claude-3-5-haiku-20241022", - examples_as_sys_msg=True, extra_params={ "extra_headers": { "anthropic-beta": ANTHROPIC_BETA_HEADER, @@ -373,7 +372,6 @@ MODEL_SETTINGS = [ "vertex_ai/claude-3-5-haiku@20241022", "whole", weak_model_name="vertex_ai/claude-3-5-haiku@20241022", - examples_as_sys_msg=True, extra_params={ "max_tokens": 4096, }, @@ -382,7 +380,6 @@ MODEL_SETTINGS = [ "openrouter/anthropic/claude-3.5-haiku", "whole", weak_model_name="openrouter/anthropic/claude-3.5-haiku", - examples_as_sys_msg=True, extra_params={ "max_tokens": 4096, }, @@ -392,7 +389,6 @@ MODEL_SETTINGS = [ "openrouter/anthropic/claude-3.5-haiku:beta", "whole", weak_model_name="openrouter/anthropic/claude-3.5-haiku:beta", - examples_as_sys_msg=True, extra_params={ "max_tokens": 4096, }, From 3be2109964aee0f0be6c6635565e0b2acfd1ac9b Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 4 Nov 2024 11:33:40 -0800 Subject: [PATCH 14/38] fix: update Claude 3.5 Haiku models to use diff mode instead of whole --- aider/models.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aider/models.py b/aider/models.py index 99a64791e..bc0fac898 100644 --- a/aider/models.py +++ b/aider/models.py @@ -347,7 +347,7 @@ MODEL_SETTINGS = [ ), ModelSettings( "anthropic/claude-3-5-haiku-20241022", - "whole", + "diff", weak_model_name="anthropic/claude-3-5-haiku-20241022", extra_params={ "extra_headers": { @@ -358,7 +358,7 @@ MODEL_SETTINGS = [ ), ModelSettings( "claude-3-5-haiku-20241022", - "whole", + "diff", weak_model_name="claude-3-5-haiku-20241022", examples_as_sys_msg=True, extra_params={ @@ -370,7 +370,7 @@ MODEL_SETTINGS = [ ), ModelSettings( "vertex_ai/claude-3-5-haiku@20241022", - "whole", + "diff", weak_model_name="vertex_ai/claude-3-5-haiku@20241022", extra_params={ "max_tokens": 4096, @@ -378,7 +378,7 @@ MODEL_SETTINGS = [ ), ModelSettings( "openrouter/anthropic/claude-3.5-haiku", - "whole", + "diff", weak_model_name="openrouter/anthropic/claude-3.5-haiku", extra_params={ "max_tokens": 4096, @@ -387,7 +387,7 @@ MODEL_SETTINGS = [ ), ModelSettings( "openrouter/anthropic/claude-3.5-haiku:beta", - "whole", + "diff", weak_model_name="openrouter/anthropic/claude-3.5-haiku:beta", extra_params={ "max_tokens": 4096, From e6d4c3558b16e286c57212bc6530eb8ff0477f61 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 4 Nov 2024 11:40:37 -0800 Subject: [PATCH 15/38] add 3.5 haiku to leaderboard --- aider/website/_data/edit_leaderboard.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/aider/website/_data/edit_leaderboard.yml b/aider/website/_data/edit_leaderboard.yml index 8e0a2da24..d247002a1 100644 --- a/aider/website/_data/edit_leaderboard.yml +++ b/aider/website/_data/edit_leaderboard.yml @@ -1610,4 +1610,27 @@ date: 2024-10-22 versions: 0.59.2.dev seconds_per_case: 18.6 + total_cost: 0.0000 + +- dirname: 2024-11-04-19-19-32--haiku35-diff-ex-as-sys-false + test_cases: 133 + model: claude-3-5-haiku-20241022 + edit_format: diff + commit_hash: 03bbdb0-dirty + pass_rate_1: 61.7 + pass_rate_2: 75.2 + percent_cases_well_formed: 95.5 + error_outputs: 11 + num_malformed_responses: 11 + num_with_malformed_responses: 6 + user_asks: 1 + lazy_comments: 1 + syntax_errors: 0 + indentation_errors: 0 + exhausted_context_windows: 0 + test_timeouts: 2 + command: aider --model anthropic/claude-3-5-haiku-20241022 + date: 2024-11-04 + versions: 0.61.1.dev + seconds_per_case: 18.4 total_cost: 0.0000 \ No newline at end of file From 7d79408683d3e017f5d88c2c49577e14ceaecf39 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 4 Nov 2024 12:08:05 -0800 Subject: [PATCH 16/38] feat: add distinct color for 3.5 Haiku models in leaderboard chart --- aider/website/docs/leaderboards/index.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aider/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md index 83f8d3efb..dadd59a25 100644 --- a/aider/website/docs/leaderboards/index.md +++ b/aider/website/docs/leaderboards/index.md @@ -65,8 +65,14 @@ The model also has to successfully apply all its changes to the source file with datasets: [{ label: 'Percent completed correctly', data: [], - backgroundColor: 'rgba(54, 162, 235, 0.2)', - borderColor: 'rgba(54, 162, 235, 1)', + backgroundColor: function(context) { + const label = context.chart.data.labels[context.dataIndex]; + return label.includes('3.5 Haiku') ? 'rgba(255, 99, 132, 0.2)' : 'rgba(54, 162, 235, 0.2)'; + }, + borderColor: function(context) { + const label = context.chart.data.labels[context.dataIndex]; + return label.includes('3.5 Haiku') ? 'rgba(255, 99, 132, 1)' : 'rgba(54, 162, 235, 1)'; + }, borderWidth: 1 }] }; From 0c9d4dd1235c9e4174c6f0aa68d8c1f51d8272e3 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 4 Nov 2024 12:09:47 -0800 Subject: [PATCH 17/38] fix: update Chart.js scales config and add null checks for labels --- aider/website/docs/leaderboards/index.md | 30 ++++++++---------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/aider/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md index dadd59a25..28ba3f50f 100644 --- a/aider/website/docs/leaderboards/index.md +++ b/aider/website/docs/leaderboards/index.md @@ -66,12 +66,12 @@ The model also has to successfully apply all its changes to the source file with label: 'Percent completed correctly', data: [], backgroundColor: function(context) { - const label = context.chart.data.labels[context.dataIndex]; - return label.includes('3.5 Haiku') ? 'rgba(255, 99, 132, 0.2)' : 'rgba(54, 162, 235, 0.2)'; + const label = context.chart.data.labels[context.dataIndex] || ''; + return (label && label.includes('3.5 Haiku')) ? 'rgba(255, 99, 132, 0.2)' : 'rgba(54, 162, 235, 0.2)'; }, borderColor: function(context) { - const label = context.chart.data.labels[context.dataIndex]; - return label.includes('3.5 Haiku') ? 'rgba(255, 99, 132, 1)' : 'rgba(54, 162, 235, 1)'; + const label = context.chart.data.labels[context.dataIndex] || ''; + return (label && label.includes('3.5 Haiku')) ? 'rgba(255, 99, 132, 1)' : 'rgba(54, 162, 235, 1)'; }, borderWidth: 1 }] @@ -123,14 +123,9 @@ The model also has to successfully apply all its changes to the source file with data: leaderboardData, options: { scales: { - yAxes: [{ - scaleLabel: { - display: true, - }, - ticks: { - beginAtZero: true - } - }] + y: { + beginAtZero: true + } } } }); @@ -248,14 +243,9 @@ Therefore, results are available for fewer models. data: leaderboardData, options: { scales: { - yAxes: [{ - scaleLabel: { - display: true, - }, - ticks: { - beginAtZero: true - } - }] + y: { + beginAtZero: true + } } } }); From 571c1b47b5038fb288ac5a65ede1177b06965daa Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 4 Nov 2024 12:11:48 -0800 Subject: [PATCH 18/38] refactor: extract Haiku model name to constant --- aider/website/docs/leaderboards/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aider/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md index 28ba3f50f..dd2302294 100644 --- a/aider/website/docs/leaderboards/index.md +++ b/aider/website/docs/leaderboards/index.md @@ -60,6 +60,7 @@ The model also has to successfully apply all its changes to the source file with