Multi-var/const blocks now extract all declared names from var_spec_list
children (e.g., 'globalMap, oldRegexp' instead of '_var_declaration_19').
For >3 names, shows first two plus count.
Var/const blocks are keyed by position (like imports) so adding/removing
a variable shows as 'modified' with inline diff rather than remove+add.
When name extraction returns empty, falls back to showing the first line
of the declaration text instead of opaque '_kind_N' indices. This ensures
no tree-sitter internal names appear in output.
Package clauses now extract the package name from the package_identifier
child node, showing 'package handler' instead of '_package_clause_0'.
New and deleted code files now show a declaration summary listing all
top-level symbols with their signatures, rather than just 'file added'
or 'file deleted'. This gives the model a table-of-contents view of
what was added/removed.
Import declarations now show package names instead of opaque
_import_declaration_N identifiers. Go imports extract short package
names (e.g., 'fmt, http, context'). For large import blocks, shows
first two and count (e.g., 'fmt, http, ... (5 packages)').
Import blocks are keyed by position rather than name, so changing the
imported packages shows as 'modified' with inline diff instead of
separate remove+add entries.
Added declarations now show their signature (first line) to give
context about what was added, rather than just the word 'added'.
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
var_declaration and const_declaration nodes contain spec children
(var_spec, const_spec) with name fields. The Go name extractor now
handles these the same way as type_declaration, so nested diffs show
'var_declaration storeLine' instead of '_var_declaration_25'.
Modified declarations now show what changed inside them:
- Inline line-level diffs using LCS for precise change detection
- Whitespace-normalized comparison for brace languages (Go, JS, etc.)
so indentation-only changes collapse to '(whitespace/formatting only)'
- Exact comparison for whitespace-significant languages (Python)
- Recursive nesting into classes/modules to pinpoint which method changed
e.g. 'class Dog: modified > method bark: modified > line change'
- Max depth of 5 prevents unbounded recursion
- Added method_definition to JS/TS/TSX declaration kinds for class methods
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.