MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / exploreQueryTokens

Function exploreQueryTokens

src/mcp/tools.ts:1219–1227  ·  view source on GitHub ↗
(query: string)

Source from the content-addressed store, hash-verified

1217 * (`入口`, `로그인`), deduped, at most 16.
1218 */
1219export function exploreQueryTokens(query: string): string[] {
1220 const FILE_EXT = /\.(?:java|kt|kts|ts|tsx|js|jsx|mjs|cjs|cs|py|go|rb|php|swift|rs|cpp|cc|cxx|c|h|hpp|scala|lua|dart|vue|svelte|astro|erl|hrl)$/i;
1221 return [...new Set(
1222 query.split(/[\s,()[\]]+/)
1223 .map((t) => t.replace(FILE_EXT, '').trim())
1224 .flatMap(splitAtCjkSwitches)
1225 .filter(isQueryNameToken)
1226 )].slice(0, 16);
1227}
1228
1229/**
1230 * A query token written the way code names things — `ChangelogParser`,

Callers 2

handleExploreMethod · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected