edit_file
Replace exact text in a single file using one or multiple atomic edits applied in order, then run linters and return diagnostics plus a checkpoint ID.
Instructions
Replace exact text in one file. Either oldText/newText, or edits: [{oldText,newText,replaceAll}] applied atomically in order. oldText must match exactly once unless replaceAll. Reports diagnostics and a checkpoint id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path | |
| check | No | Run compilers/linters on the changed files afterwards (default true) | |
| edits | No | ||
| newText | No | ||
| oldText | No | ||
| replaceAll | No | ||
| expectedSha256 | No | Optional optimistic precondition from file_info; refuse the edit if the file changed |