Skip to content

Commit c476138

Browse files
committed
Update search_and_replace tool description for clarity and detail
1 parent a53f604 commit c476138

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/core/prompts/__tests__/__snapshots__/system.test.ts.snap

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Example for appending to the end of file:
210210
211211
212212
## search_and_replace
213-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
213+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
214214
215215
Required Parameters:
216216
- path: The path of the file to modify (relative to the current workspace directory /test/path)
@@ -677,7 +677,7 @@ Example for appending to the end of file:
677677
678678
679679
## search_and_replace
680-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
680+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
681681
682682
Required Parameters:
683683
- path: The path of the file to modify (relative to the current workspace directory /test/path)
@@ -1144,7 +1144,7 @@ Example for appending to the end of file:
11441144
11451145
11461146
## search_and_replace
1147-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
1147+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
11481148
11491149
Required Parameters:
11501150
- path: The path of the file to modify (relative to the current workspace directory /test/path)
@@ -1611,7 +1611,7 @@ Example for appending to the end of file:
16111611
16121612
16131613
## search_and_replace
1614-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
1614+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
16151615
16161616
Required Parameters:
16171617
- path: The path of the file to modify (relative to the current workspace directory /test/path)
@@ -2134,7 +2134,7 @@ Example for appending to the end of file:
21342134
21352135
21362136
## search_and_replace
2137-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
2137+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
21382138
21392139
Required Parameters:
21402140
- path: The path of the file to modify (relative to the current workspace directory /test/path)
@@ -2669,7 +2669,7 @@ Example for appending to the end of file:
26692669
26702670
26712671
## search_and_replace
2672-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
2672+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
26732673
26742674
Required Parameters:
26752675
- path: The path of the file to modify (relative to the current workspace directory /test/path)
@@ -3282,7 +3282,7 @@ Example for appending to the end of file:
32823282
32833283
32843284
## search_and_replace
3285-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
3285+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
32863286
32873287
Required Parameters:
32883288
- path: The path of the file to modify (relative to the current workspace directory /test/path)
@@ -3749,7 +3749,7 @@ Example for appending to the end of file:
37493749
37503750
37513751
## search_and_replace
3752-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
3752+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
37533753
37543754
Required Parameters:
37553755
- path: The path of the file to modify (relative to the current workspace directory /test/path)
@@ -4258,7 +4258,7 @@ Example for appending to the end of file:
42584258
42594259
42604260
## search_and_replace
4261-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
4261+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
42624262
42634263
Required Parameters:
42644264
- path: The path of the file to modify (relative to the current workspace directory /test/path)
@@ -4802,7 +4802,7 @@ Example for appending to the end of file:
48024802
48034803
48044804
## search_and_replace
4805-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
4805+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
48064806
48074807
Required Parameters:
48084808
- path: The path of the file to modify (relative to the current workspace directory /test/path)
@@ -5635,7 +5635,7 @@ Example for appending to the end of file:
56355635
56365636
56375637
## search_and_replace
5638-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
5638+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
56395639
56405640
Required Parameters:
56415641
- path: The path of the file to modify (relative to the current workspace directory /test/path)

src/core/prompts/tools/search-and-replace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ToolArgs } from "./types"
22

33
export function getSearchAndReplaceDescription(args: ToolArgs): string {
44
return `## search_and_replace
5-
Description: Request to perform a search and replace operation on a file. Supports both literal text and regex patterns. Shows a diff preview before applying changes.
5+
Description: Use this tool to find and replace specific text strings or patterns (using regex) within a file. It's suitable for targeted replacements across multiple locations within the file. Supports literal text and regex patterns, case sensitivity options, and optional line ranges. Shows a diff preview before applying changes.
66
77
Required Parameters:
88
- path: The path of the file to modify (relative to the current workspace directory ${args.cwd.toPosix()})

0 commit comments

Comments
 (0)