Commit Graph

1 Commits

Author SHA1 Message Date
Sam Morrow d608c4b99b Add tree-sitter structural diff for code files
Extends the compare_file_contents tool with AST-based structural
diffing for code files using tree-sitter. Instead of line-based diffs,
this shows declaration-level changes (functions, classes, types) which
gives models more concise and semantically meaningful context.

Supported languages: Go, Python, JavaScript, TypeScript, Ruby, Rust,
Java, C/C++.

Requires CGO_ENABLED=1 for the tree-sitter C bindings. Windows builds
are removed from goreleaser as CGO cross-compilation is not supported
without additional toolchain setup.

For unsupported languages, falls back to unified line-based diff.
2026-02-09 23:20:55 +01:00