Commit dd7a9d3
Eric Wheeler
feat: add efficiency warning for single SEARCH/REPLACE blocks in apply_diff
When apply_diff is used with only one SEARCH/REPLACE block, models now receive
a warning encouraging them to batch multiple related changes in a single
operation for better LLM context efficiency.
- Added single block detection by counting <<<<<<< SEARCH occurrences
- Warning message promotes batching related changes for improved efficiency
- Follows same pattern as read_file tool which warns for single file operations
- Improves API usage patterns by encouraging consolidated changes
Fixes: #6054
Signed-off-by: Eric Wheeler <[email protected]>1 parent 2f4d833 commit dd7a9d3
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
191 | 198 | | |
192 | 199 | | |
193 | 200 | | |
194 | | - | |
| 201 | + | |
195 | 202 | | |
196 | 203 | | |
197 | 204 | | |
| |||
0 commit comments