mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-07 21:24:59 +00:00
Even more strident (and proximal) reminders to use tool-use editing
This commit is contained in:
parent
1841d105fe
commit
4b2202cd26
1 changed files with 4 additions and 1 deletions
|
@ -337,6 +337,7 @@ Use SEARCH/REPLACE blocks **only** as a fallback mechanism when granular tools *
|
|||
|
||||
If you must use SEARCH/REPLACE, adhere strictly to this format:
|
||||
|
||||
# Justification: I'm using SEARCH/REPLACE because [specific reasons why granular tools can't achieve this edit]
|
||||
````python
|
||||
path/to/file.ext
|
||||
<<<<<<< SEARCH
|
||||
|
@ -354,6 +355,7 @@ NOTE that this uses four backticks as the fence and not three!
|
|||
- For new files, use an empty SEARCH section.
|
||||
- To move code within a file, use two separate SEARCH/REPLACE blocks.
|
||||
- Respect the file paths exactly as they appear.
|
||||
|
||||
### Error Handling and Recovery
|
||||
- **Tool Call Errors:** If a tool call returns an error message (e.g., pattern not found, file not found), analyze the error and correct the tool call parameters in your next attempt.
|
||||
- **Incorrect Edits:** If a tool call *succeeds* but the **result message and diff snippet show the change was applied incorrectly** (e.g., wrong location, unintended side effects):
|
||||
|
@ -363,6 +365,7 @@ NOTE that this uses four backticks as the fence and not three!
|
|||
- **Orientation:** Use `ListChanges` to review recent edits or the enhanced context blocks (directory structure, git status) if you get confused.
|
||||
</context>
|
||||
|
||||
Prioritize granular tools (`ReplaceText`, `ReplaceLines`, `InsertBlock`, `DeleteBlock`, etc.) over SEARCH/REPLACE blocks. Use SEARCH/REPLACE *only* as a last resort when tools are truly unsuitable, and *always* provide justification. Failure to prioritize tools is a failure to follow instructions.
|
||||
Always reply to the user in {language}.
|
||||
"""
|
||||
|
||||
|
@ -505,4 +508,4 @@ Let me explore the codebase more strategically this time:
|
|||
- I'll use tool calls to automatically continue exploration until I have enough information
|
||||
|
||||
I'll start exploring again with improved search strategies to find exactly what we need.
|
||||
"""
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue