mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
fix(file-analyzer): preserve language and fall back when imports unresolved
Two bugs surfaced when analyzing Python projects that use absolute imports: - The dispatch prompt (SKILL.md) and file-analyzer agent omitted the per-file `language` field, so `extract-structure.mjs` received null and passed it through to the graph. - `extract-structure.mjs` used `if (importPaths)` to decide whether to trust pre-resolved imports. Empty arrays are truthy, so files where the project scanner could not resolve any imports (e.g. Python absolute imports) clobbered the parser's import count with 0, never falling back to tree-sitter's own analysis. Bumps plugin version to 2.6.1 across the five tracked manifests and adds unit tests for `buildResult` covering language pass-through and the importCount fallback paths. To make the script testable, `buildResult` is now exported and the CLI invocation is guarded so importing the module no longer triggers `main()`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"name": "understand-anything",
|
||||
"displayName": "Understand Anything",
|
||||
"description": "AI-powered codebase understanding — analyze, visualize, and explain any project",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"author": {
|
||||
"name": "Lum1104"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user