-
Notifications
You must be signed in to change notification settings - Fork 137
search_code grep phase misses CommonJS (.js) files #201
Copy link
Copy link
Open
Description
Bug
search_code does not find functions in CommonJS .js files. The grep phase appears to skip them entirely, even though the same functions are correctly indexed in the graph (findable via search_graph name_pattern and query_graph Cypher).
Version: 0.5.7
Reproduction:
codebase-memory-mcp cli search_code '{"project":"my-project","pattern":"evaluateOffer"}'
# Returns: 0 results
codebase-memory-mcp cli search_graph '{"project":"my-project","name_pattern":"evaluateNew"}'
# Returns: evaluateNewOffers in decision_service.js (correct)
The project has a Node.js/Express backend using CommonJS require() — all files are .js (not .mjs or .ts). The tree-sitter indexer parses them correctly (nodes exist in the graph), but search_code's grep phase doesn't search these files.
Workaround: Use search_graph with name_pattern or query_graph with Cypher for CJS codebases.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels