diff --git a/core/tools/definitions/searchAndReplaceInFile.ts b/core/tools/definitions/searchAndReplaceInFile.ts index b654f9c32..03b9defaf 100644 --- a/core/tools/definitions/searchAndReplaceInFile.ts +++ b/core/tools/definitions/searchAndReplaceInFile.ts @@ -56,7 +56,10 @@ Critical rules: * Include just the changing lines, and a few surrounding lines if needed for uniqueness. * Do not include long runs of unchanging lines in SEARCH/REPLACE blocks. * Each line must be complete. Never truncate lines mid-way through as this can cause matching failures. -4. Special operations: +4. Avoid extra tool calls: + * When making multiple edits to the same file ALWAYS try to use multiple SEARCH/REPLACE blocks in a single tool call, rather than making multiple tool calls + * If you need to make follow up edits, it is okay to perform additional tool calls +5. Special operations: * To move code: Use two SEARCH/REPLACE blocks (one to delete from original + one to insert at new location) * To delete code: Use empty REPLACE section