mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-31 22:32:28 +00:00
10 lines
1.1 KiB
Plaintext
10 lines
1.1 KiB
Plaintext
Performs exact string replacements in files.
|
|
|
|
Usage:
|
|
- You must use your `Read` tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file.
|
|
- When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: spaces + line number + tab. Everything after that tab is the actual file content to match. Never include any part of the line number prefix in the oldString or newString.
|
|
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
|
|
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
|
|
- The edit will FAIL if `oldString` is not unique in the file. Either provide a larger string with more surrounding context to make it unique or use `replaceAll` to change every instance of `oldString`.
|
|
- Use `replaceAll` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
|