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:
Lum1104
2026-03-28 11:11:49 +08:00
co-authored by Claude Opus 4.6
parent b90fb16b01
commit 3fb12033d6
2 changed files with 2 additions and 2 deletions
@@ -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