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

Function normalizeQuerySpelling

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

Source from the content-addressed store, hash-verified

129 * single-colon identifier pair.
130 */
131export function normalizeQuerySpelling(query: string): string {
132 return query
133 .replace(/\b([A-Za-z_][\w@]*)\/(\d{1,3})(?=$|[\s,()[\]/])/g, '$1')
134 .replace(
135 /(^|[\s,()[\]])(?!(?:kind|lang|language|path|name):)([a-z_][\w@]*):([A-Za-z_][\w@]*)(?=$|[\s,()[\]])/g,
136 '$1$2.$3'
137 );
138}
139
140/**
141 * 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