Skip to content

feat(code): incremental AST parsing cache #68

@cniska

Description

@cniska

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesticeboxNot planned for 1.0 — revisit later

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions