mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
fix(understand): address review findings — importCount metric source and plan typo
- Update importCount metric description to reference batchImportData[file.path].length instead of "number of import statements" (contradicted "do NOT extract imports" rule) - Fix duplicate /index.js → /index.jsx in impl plan Task 5 extension variants Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
b90fb16b01
commit
3fb12033d6
@@ -440,7 +440,7 @@ For each file, read its content and extract import paths using language-appropri
|
||||
For each extracted import path:
|
||||
1. Compute the resolved file path relative to project root:
|
||||
- For relative imports (`./x`, `../x`): resolve from the importing file's directory
|
||||
- Try these extension variants in order if the import has no extension: `.ts`, `.tsx`, `.js`, `.jsx`, `/index.ts`, `/index.js`, `/index.tsx`, `/index.js`, `.py`, `.go`, `.rs`, `.rb`
|
||||
- Try these extension variants in order if the import has no extension: `.ts`, `.tsx`, `.js`, `.jsx`, `/index.ts`, `/index.js`, `/index.tsx`, `/index.jsx`, `.py`, `.go`, `.rs`, `.rb`
|
||||
2. Check if the resolved path exists in the discovered file list
|
||||
3. If yes: add to this file's resolved imports list
|
||||
4. If no: skip (external, unresolvable, or dynamic import)
|
||||
|
||||
@@ -59,7 +59,7 @@ For each file in `batchFiles`, read the file content and extract:
|
||||
**Basic Metrics:**
|
||||
- Total line count
|
||||
- Non-empty line count (lines that are not blank or comment-only)
|
||||
- Import count (number of import statements)
|
||||
- Import count — use `batchImportData[file.path].length` from the input JSON (do not count from source)
|
||||
- Export count (number of export statements)
|
||||
- Function count, class count
|
||||
|
||||
|
||||
Reference in New Issue
Block a user