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

Function normalizeQuerySpelling

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

Source from the content-addressed store, hash-verified

118 * single-colon identifier pair.
119 */
120export function normalizeQuerySpelling(query: string): string {
121 return query
122 .replace(/\b([A-Za-z_][\w@]*)\/(\d{1,3})(?=$|[\s,()[\]/])/g, '$1')
123 .replace(
124 /(^|[\s,()[\]])(?!(?:kind|lang|language|path|name):)([a-z_][\w@]*):([A-Za-z_][\w@]*)(?=$|[\s,()[\]])/g,
125 '$1$2.$3'
126 );
127}
128
129/**
130 * Calculate the recommended number of codegraph_explore calls based on project size.

Callers 2

handleExploreMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected