feat(cli): add dev map command with 224x performance optimization #161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π― What This Adds
New
dev mapcommand to visualize codebase structure with component counts, exports, and hot paths.π Performance Optimizations
Three Major Bottlenecks Fixed:
Semantic Search β Fast Scan (10-20x faster)
getAll()method to skip embedding generationEmbedder Initialization (100+ seconds saved)
skipEmbedderoption toinitialize()Git Stats Enrichment (103 seconds saved)
getBasicStats()to skip expensive git analysisResults
π Bugs Fixed
getAll()to test mocks⨠Features
--depth- Control directory nesting (1-5)--focus- Zoom into specific directories--exports/--no-exports- Show/hide exported symbols--change-frequency- Show git activity hotspots--token-budget- Control output size--verbose- Enable debug loggingπ Examples
π§ͺ Testing
π Files Changed
packages/core/src/vector/store.ts- AddedgetAll()packages/core/src/vector/index.ts- Added lazy embedder initpackages/core/src/indexer/index.ts- AddedgetBasicStats()packages/core/src/map/index.ts- Fixed count propagation + loggingpackages/cli/src/commands/map.ts- New command with verbose loggingpackages/cli/src/cli.ts- Registered map commandgetAll()mocks