You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
search_code returns zero results for any pattern searched in .mjs (ES module) files, even though the files are indexed and search_graph finds nodes within them.
Environment
Version: 0.5.7 (upgraded from 0.4.10, same issue on both)
Additional patterns tested (all return 0 for .mjs)
asyncHandler — used in 40+ route handlers across .mjs files → 0 results
router.post → 0 results
process.env → 0 results (when filtered to *.mjs)
What works
search_graph with label: Route returns nodes from .mjs files — so indexing parses them correctly
search_code works for .py and .js files
Native grep/ripgrep finds all patterns correctly
Likely cause
The internal grep in search_code may not include .mjs in its list of recognized JavaScript file extensions, so it skips these files entirely during the text search phase. The graph indexer (tree-sitter) handles them fine.
Workaround
Using the file_pattern parameter with *.mjs also returns 0, so there is no workaround within the tool.
Fixed. Root cause: .mjs (and .cjs) were missing from the extension→language table, so those files were never assigned a language — they weren't indexed at all (no graph nodes), and search_code (which greps the set of indexed files) therefore returned 0 for any pattern in them. (.js/.jsx were mapped, which is why plain .js worked.)
Added .mjs/.cjs → JavaScript and .mts/.cts → TypeScript. Verified end-to-end on macOS: a function in server.mjs is now extracted and returned by search_code (total_results=1). Regression tests lang_ext_mjs_cjs / lang_ext_mts_cts added. Closes #197. 🙏
Activity
DeusData commentedon May 31, 2026
Fixed. Root cause:
.mjs(and.cjs) were missing from the extension→language table, so those files were never assigned a language — they weren't indexed at all (no graph nodes), andsearch_code(which greps the set of indexed files) therefore returned 0 for any pattern in them. (.js/.jsxwere mapped, which is why plain.jsworked.)Added
.mjs/.cjs→ JavaScript and.mts/.cts→ TypeScript. Verified end-to-end on macOS: a function inserver.mjsis now extracted and returned bysearch_code(total_results=1). Regression testslang_ext_mjs_cjs/lang_ext_mts_ctsadded. Closes #197. 🙏fix(discover): map .mjs/.cjs (JS) and .mts/.cts (TS) extensions (#197)
fix(discover): map .mjs/.cjs (JS) and .mts/.cts (TS) extensions (Deus…