What would you like?
Reuse the parsed AST across sequential edits on the same file instead of re-parsing from scratch each time.
Motivation
Each edit-code call re-parses the entire file. When the model makes multiple edits to the same file in one task, this is redundant. Caching the AST between edits would reduce latency for multi-edit workflows.
Proposed approach
Cache the parsed AST per file path within a task scope. Invalidate when the file content changes after an edit. Measure performance impact before and after.
Scope
- code-ops.ts
- Related test files
What would you like?
Reuse the parsed AST across sequential edits on the same file instead of re-parsing from scratch each time.
Motivation
Each edit-code call re-parses the entire file. When the model makes multiple edits to the same file in one task, this is redundant. Caching the AST between edits would reduce latency for multi-edit workflows.
Proposed approach
Cache the parsed AST per file path within a task scope. Invalidate when the file content changes after an edit. Measure performance impact before and after.
Scope