Standardize parameter description references in Edit and MultiEdit tools (#984)

This commit is contained in:
Mike Wallio
2025-07-14 20:03:59 -04:00
committed by GitHub
parent 2cdb37c32b
commit f593792fb5
3 changed files with 12 additions and 12 deletions

View File

@@ -8,9 +8,9 @@ Before using this tool:
To make multiple file edits, provide the following:
1. file_path: The absolute path to the file to modify (must be absolute, not relative)
2. edits: An array of edit operations to perform, where each edit contains:
- old_string: The text to replace (must match the file contents exactly, including all whitespace and indentation)
- new_string: The edited text to replace the old_string
- replace_all: Replace all occurrences of old_string. This parameter is optional and defaults to false.
- oldString: The text to replace (must match the file contents exactly, including all whitespace and indentation)
- newString: The edited text to replace the oldString
- replaceAll: Replace all occurrences of oldString. This parameter is optional and defaults to false.
IMPORTANT:
- All edits are applied in sequence, in the order they are provided
@@ -24,8 +24,8 @@ CRITICAL REQUIREMENTS:
3. Plan your edits carefully to avoid conflicts between sequential operations
WARNING:
- The tool will fail if edits.old_string doesn't match the file contents exactly (including whitespace)
- The tool will fail if edits.old_string and edits.new_string are the same
- The tool will fail if edits.oldString doesn't match the file contents exactly (including whitespace)
- The tool will fail if edits.oldString and edits.newString are the same
- Since edits are applied in sequence, ensure that earlier edits don't affect the text that later edits are trying to find
When making edits:
@@ -33,9 +33,9 @@ When making edits:
- Do not leave the code in a broken state
- Always use absolute file paths (starting with /)
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
- Use replace_all for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
- Use replaceAll for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
If you want to create a new file, use:
- A new file path, including dir name if needed
- First edit: empty old_string and the new file's contents as new_string
- First edit: empty oldString and the new file's contents as newString
- Subsequent edits: normal edit operations on the created content