edit
Replace text in a file using OpenCode matching semantics, preserving exact indentation from read output. Use replaceAll to replace every occurrence or add context when the match is ambiguous.
Instructions
Replace text in a file using OpenCode matching semantics. Preserve the exact indentation from read output, excluding its line-number prefix. The operation fails when oldString cannot be identified unambiguously; supply more context or use replaceAll to replace every occurrence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | The absolute path to the file to modify | |
| newString | Yes | The text to replace it with (must be different from oldString) | |
| oldString | Yes | The text to replace | |
| replaceAll | No | Replace all occurrences of oldString (default false) |