stageEdit
Stage file edits inside a transaction using line range or search/replace operations, without writing changes to disk.
Instructions
Stage a file edit inside a transaction. Supports lineRange and searchReplace operations (same params as previewEdit). Does NOT write to disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transactionId | Yes | Transaction ID from beginTransaction | |
| filePath | Yes | Workspace-relative or absolute path to the file | |
| operation | Yes | Type of edit | |
| startLine | No | Start line (1-based, lineRange only) | |
| endLine | No | End line inclusive (1-based, lineRange only) | |
| newContent | No | Replacement content for the line range | |
| search | No | Pattern to search for (searchReplace only) | |
| replace | No | Replacement text (searchReplace only) | |
| useRegex | No | Treat search as regex (searchReplace only) | |
| caseSensitive | No | Case-sensitive match (searchReplace only, default true) |