You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"You should always prefer using other editing tools over write_to_file when making changes to existing files since write_to_file is much slower and cannot handle large files.",
641
632
)
642
633
expect(prompt).toContain("The insert_content tool adds lines of text to files")
643
-
expect(prompt).toContain("The search_and_replace tool finds and replaces text or regex in files")
Copy file name to clipboardExpand all lines: src/core/prompts/sections/rules.ts
+5-8Lines changed: 5 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,8 @@ function getEditingInstructions(diffStrategy?: DiffStrategy, experiments?: Recor
19
19
if(experiments?.["insert_content"]){
20
20
availableTools.push("insert_content (for adding lines to existing files)")
21
21
}
22
-
if(experiments?.["search_and_replace"]){
23
-
availableTools.push("search_and_replace (for finding and replacing individual pieces of text)")
24
-
}
22
+
23
+
availableTools.push("search_and_replace (for finding and replacing individual pieces of text)")
25
24
26
25
// Base editing instruction mentioning all available tools
27
26
if(availableTools.length>1){
@@ -38,11 +37,9 @@ function getEditingInstructions(diffStrategy?: DiffStrategy, experiments?: Recor
38
37
)
39
38
}
40
39
41
-
if(experiments?.["search_and_replace"]){
42
-
instructions.push(
43
-
"- The search_and_replace tool finds and replaces text or regex in files. This tool allows you to search for a specific regex pattern or text and replace it with another value. Be cautious when using this tool to ensure you are replacing the correct text. It can support multiple operations at once.",
44
-
)
45
-
}
40
+
instructions.push(
41
+
"- The search_and_replace tool finds and replaces text or regex in files. This tool allows you to search for a specific regex pattern or text and replace it with another value. Be cautious when using this tool to ensure you are replacing the correct text. It can support multiple operations at once.",
0 commit comments