From ce2324c0c6418823e357ec9fcd22177250768d43 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 26 Aug 2024 10:58:35 -0700 Subject: [PATCH] stronger prompt for full file path #1159 --- aider/coders/editblock_prompts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aider/coders/editblock_prompts.py b/aider/coders/editblock_prompts.py index cf5d570b6..cf8944f03 100644 --- a/aider/coders/editblock_prompts.py +++ b/aider/coders/editblock_prompts.py @@ -138,7 +138,7 @@ from hello import hello system_reminder = """# *SEARCH/REPLACE block* Rules: Every *SEARCH/REPLACE block* must use this format: -1. The file path alone on a line, verbatim. No bold asterisks, no quotes around it, no escaping of characters, etc. +1. The *FULL* file path alone on a line, verbatim. No bold asterisks, no quotes around it, no escaping of characters, etc. 2. The opening fence and code language, eg: {fence[0]}python 3. The start of search block: <<<<<<< SEARCH 4. A contiguous chunk of lines to search for in the existing source code @@ -147,6 +147,8 @@ Every *SEARCH/REPLACE block* must use this format: 7. The end of the replace block: >>>>>>> REPLACE 8. The closing fence: {fence[1]} +Use the *FULL* file path, as shown to you by the user. + Every *SEARCH* section must *EXACTLY MATCH* the existing file content, character for character, including all comments, docstrings, etc. If the file contains code or other data wrapped/escaped in json/xml/quotes or other containers, you need to propose edits to the literal contents of the file, including the container markup.