From 47a2f5b56f3ed0ac6801713c46eca1698675ac33 Mon Sep 17 00:00:00 2001 From: Andrew Grigorev Date: Fri, 18 Apr 2025 04:11:33 +0300 Subject: [PATCH] fix: correct phrasing in user prompts for editing files --- aider/coders/base_coder.py | 2 +- aider/coders/base_prompts.py | 2 +- aider/coders/editblock_prompts.py | 2 +- aider/coders/patch_prompts.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 675570c60..a4df62a87 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -724,7 +724,7 @@ class Coder: dict(role="user", content=repo_content), dict( role="assistant", - content="Ok, I won't try and edit those files without asking first.", + content="Ok, I won't try to edit those files without asking first.", ), ] return repo_messages diff --git a/aider/coders/base_prompts.py b/aider/coders/base_prompts.py index 464212031..a8a37c0e5 100644 --- a/aider/coders/base_prompts.py +++ b/aider/coders/base_prompts.py @@ -29,7 +29,7 @@ Any other messages in the chat may contain outdated versions of the files' conte files_no_full_files = "I am not sharing any files that you can edit yet." - files_no_full_files_with_repo_map = """Don't try and edit any existing code without asking me to add the files to the chat! + files_no_full_files_with_repo_map = """Don't try to edit any existing code without asking me to add the files to the chat! Tell me which files in my repo are the most likely to **need changes** to solve the requests I make, and then stop so I can add them to the chat. Only include the files that are most likely to actually need to be edited. Don't include files that might contain relevant context, just files that will need to be changed. diff --git a/aider/coders/editblock_prompts.py b/aider/coders/editblock_prompts.py index 1457e021e..4676f4862 100644 --- a/aider/coders/editblock_prompts.py +++ b/aider/coders/editblock_prompts.py @@ -17,7 +17,7 @@ Once you understand the request you MUST: 1. Decide if you need to propose *SEARCH/REPLACE* edits to any files that haven't been added to the chat. You can create new files without asking! -But if you need to propose edits to existing files not already added to the chat, you *MUST* tell the user their full path names and ask them to *add the files to the chat*. +But if you need to propose edits to existing files not already added to the chat, you *MUST* tell the user their full path names and ask them to *add the files to the chat* BEFORE proposing any edits. End your reply and wait for their approval. You can keep asking if you then decide you need to edit more files. diff --git a/aider/coders/patch_prompts.py b/aider/coders/patch_prompts.py index a2deddc24..c8b4402de 100644 --- a/aider/coders/patch_prompts.py +++ b/aider/coders/patch_prompts.py @@ -18,7 +18,7 @@ Once you understand the request you MUST: 1. Decide if you need to propose edits to any files that haven't been added to the chat. You can create new files without asking! -But if you need to propose edits to existing files not already added to the chat, you *MUST* tell the user their full path names and ask them to *add the files to the chat*. +But if you need to propose edits to existing files not already added to the chat, you *MUST* tell the user their full path names and ask them to *add the files to the chat* BEFORE proposing any edits. End your reply and wait for their approval. You can keep asking if you then decide you need to edit more files.