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

Function exploreQueryTokens

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

Source from the content-addressed store, hash-verified

1100 * (`入口`, `로그인`), deduped, at most 16.
1101 */
1102export function exploreQueryTokens(query: string): string[] {
1103 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;
1104 return [...new Set(
1105 query.split(/[\s,()[\]]+/)
1106 .map((t) => t.replace(FILE_EXT, '').trim())
1107 .flatMap(splitAtCjkSwitches)
1108 .filter(isQueryNameToken)
1109 )].slice(0, 16);
1110}
1111
1112/**
1113 * 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