mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 20:54:59 +00:00
Try to have legacy navigator mode use SEARCH/REPLACE blocks more cleanly
This commit is contained in:
parent
02c092afff
commit
b155143845
1 changed files with 10 additions and 4 deletions
|
@ -118,7 +118,7 @@ When you include any tool call, the system will automatically continue to the ne
|
||||||
```
|
```
|
||||||
Your answer to the user's question...
|
Your answer to the user's question...
|
||||||
|
|
||||||
SEARCH/REPLACE blocks appear BEFORE the last '---' separator.
|
SEARCH/REPLACE blocks can ONLY appear BEFORE the last '---' separator. Any SEARCH/REPLACE blocks after the separator will be IGNORED.
|
||||||
|
|
||||||
file.py
|
file.py
|
||||||
<<<<<<< SEARCH
|
<<<<<<< SEARCH
|
||||||
|
@ -135,14 +135,17 @@ new code
|
||||||
## SEARCH/REPLACE Block Format
|
## SEARCH/REPLACE Block Format
|
||||||
When you need to make changes to code, use the SEARCH/REPLACE block format. You can include multiple edits in one message.
|
When you need to make changes to code, use the SEARCH/REPLACE block format. You can include multiple edits in one message.
|
||||||
|
|
||||||
```
|
````python
|
||||||
path/to/file.ext
|
path/to/file.ext
|
||||||
<<<<<<< SEARCH
|
<<<<<<< SEARCH
|
||||||
Original code lines to match exactly
|
Original code lines to match exactly
|
||||||
=======
|
=======
|
||||||
Replacement code lines
|
Replacement code lines
|
||||||
>>>>>>> REPLACE
|
>>>>>>> REPLACE
|
||||||
```
|
````
|
||||||
|
NOTE that this uses four backticks as the fence and not three!
|
||||||
|
|
||||||
|
IMPORTANT: Any SEARCH/REPLACE blocks that appear after the last '---' separator will be IGNORED.
|
||||||
|
|
||||||
#### Guidelines for SEARCH/REPLACE
|
#### Guidelines for SEARCH/REPLACE
|
||||||
- Every SEARCH section must EXACTLY MATCH existing content, including whitespace and indentation.
|
- Every SEARCH section must EXACTLY MATCH existing content, including whitespace and indentation.
|
||||||
|
@ -287,8 +290,9 @@ Here are summaries of some files present in this repo:
|
||||||
- If emitting 3 or more tool calls, OR if any tool call spans multiple lines, place each call on a new line for clarity.
|
- If emitting 3 or more tool calls, OR if any tool call spans multiple lines, place each call on a new line for clarity.
|
||||||
|
|
||||||
## SEARCH/REPLACE blocks
|
## SEARCH/REPLACE blocks
|
||||||
- SEARCH/REPLACE blocks MUST appear BEFORE the last '---' separator line in your response
|
- When using SEARCH/REPLACE blocks, they MUST ONLY appear BEFORE the last '---' separator line in your response
|
||||||
- If there is no '---' separator, they can appear anywhere in your response
|
- If there is no '---' separator, they can appear anywhere in your response
|
||||||
|
- IMPORTANT: Using SEARCH/REPLACE blocks is the standard editing method in this mode
|
||||||
- Format example:
|
- Format example:
|
||||||
```
|
```
|
||||||
Your answer text here...
|
Your answer text here...
|
||||||
|
@ -303,6 +307,8 @@ Here are summaries of some files present in this repo:
|
||||||
---
|
---
|
||||||
[tool_call(ToolName, param1=value1)]
|
[tool_call(ToolName, param1=value1)]
|
||||||
```
|
```
|
||||||
|
Note that SEARCH/REPLACE blocks should use four backticks (````) as the fence, not three
|
||||||
|
- IMPORTANT: Any SEARCH/REPLACE blocks that appear after the last '---' separator will be IGNORED
|
||||||
|
|
||||||
## Context Features
|
## Context Features
|
||||||
- Use enhanced context blocks (directory structure and git status) to orient yourself
|
- Use enhanced context blocks (directory structure and git status) to orient yourself
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue