Skip to content

Commit 81d5f63

Browse files
roomote[bot]roomotedaniel-lxshannesrudolph
authored
fix: remove search_and_replace tool from codebase (#8892)
Co-authored-by: Roo Code <[email protected]> Co-authored-by: daniel-lxs <[email protected]> Co-authored-by: Hannes Rudolph <[email protected]>
1 parent c66fed9 commit 81d5f63

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+24
-1614
lines changed

.roo/rules-issue-fixer/1_Workflow.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@
191191
Use appropriate tools:
192192
- apply_diff for targeted changes
193193
- write_to_file for new files
194-
- search_and_replace for systematic updates
195194

196195
After each significant change, run relevant tests:
197196
- execute_command to run test suites

.roo/rules-merge-resolver/2_best_practices.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<principle priority="high">
3434
<name>Escape Conflict Markers</name>
3535
<description>
36-
When using apply_diff or search_and_replace tools, always escape merge
36+
When using apply_diff, always escape merge
3737
conflict markers with backslashes to prevent parsing errors.
3838
</description>
3939
<example><![CDATA[

.roo/rules-merge-resolver/3_tool_usage.xml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</priority>
1414

1515
<priority level="3">
16-
<tool>apply_diff or search_and_replace</tool>
16+
<tool>apply_diff</tool>
1717
<when>To resolve conflicts by replacing conflicted sections</when>
1818
<why>Precise editing of specific conflict blocks</why>
1919
</priority>
@@ -127,25 +127,6 @@ function mergedImplementation() {
127127
]]></example>
128128
</tool>
129129

130-
<tool name="search_and_replace">
131-
<best_practices>
132-
<practice>Use for simple conflict resolutions</practice>
133-
<practice>Enable regex mode for complex patterns</practice>
134-
<practice>Always escape special characters</practice>
135-
</best_practices>
136-
137-
<example><![CDATA[
138-
<search_and_replace>
139-
<path>src/config.ts</path>
140-
<search>\<<<<<<< HEAD[\s\S]*?\>>>>>>> \w+</search>
141-
<replace>// Resolved configuration
142-
const config = {
143-
// Merged settings from both branches
144-
}</replace>
145-
<use_regex>true</use_regex>
146-
</search_and_replace>
147-
]]></example>
148-
</tool>
149130
</tool_specific_guidance>
150131

151132
<tool_combination_patterns>
@@ -215,7 +196,7 @@ const config = {
215196
<scenario name="malformed_conflicts">
216197
<description>Conflict markers are incomplete or nested</description>
217198
<approach>
218-
Use search_and_replace with careful regex patterns
199+
Use apply_diff with precise search blocks; split into multiple targeted edits if needed
219200
Manual inspection may be required
220201
</approach>
221202
</scenario>
@@ -232,7 +213,7 @@ const config = {
232213
<description>Code contains literal conflict marker strings</description>
233214
<approach>
234215
Extra careful escaping in diffs
235-
Consider using search_and_replace with precise patterns
216+
Prefer apply_diff with precise search blocks
236217
</approach>
237218
</scenario>
238219
</error_handling>

0 commit comments

Comments
 (0)