Update search_and_replace tool description for clarity and detail (#2891)

This commit is contained in:
Hannes Rudolph 2025-04-23 15:42:59 -06:00 committed by GitHub
parent a53f604e3a
commit 41db2cad43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 12 deletions

View file

@ -210,7 +210,7 @@ Example for appending to the end of file:
## search_and_replace
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.
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.
Required Parameters:
- 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:
## search_and_replace
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.
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.
Required Parameters:
- 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:
## search_and_replace
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.
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.
Required Parameters:
- 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:
## search_and_replace
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.
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.
Required Parameters:
- 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:
## search_and_replace
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.
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.
Required Parameters:
- 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:
## search_and_replace
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.
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.
Required Parameters:
- 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:
## search_and_replace
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.
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.
Required Parameters:
- 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:
## search_and_replace
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.
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.
Required Parameters:
- 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:
## search_and_replace
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.
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.
Required Parameters:
- 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:
## search_and_replace
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.
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.
Required Parameters:
- 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:
## search_and_replace
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.
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.
Required Parameters:
- path: The path of the file to modify (relative to the current workspace directory /test/path)

View file

@ -2,7 +2,7 @@ import { ToolArgs } from "./types"
export function getSearchAndReplaceDescription(args: ToolArgs): string {
return `## search_and_replace
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.
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.
Required Parameters:
- path: The path of the file to modify (relative to the current workspace directory ${args.cwd.toPosix()})