apply_edit
Apply edits to files using either precise workspace changes or text-matching replacement when positions are uncertain.
Instructions
Apply an edit to a file. Two modes: (1) WorkspaceEdit mode — pass workspace_edit with positional changes returned by rename_symbol or format_document; (2) Text-match mode — pass file_path + old_text + new_text to find and replace text without needing line/column positions. Text-match tries exact match first, then whitespace-normalised line match (handles indentation differences). Use text-match when AI-generated positions would be imprecise.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_edit | No | ||
| file_path | No | ||
| old_text | No | ||
| new_text | No |