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

Method wordsMatchingName

src/index.ts:1407–1414  ·  view source on GitHub ↗

Which of the prompt's original words match `name`'s segments (via * variants). Segments are recomputed in JS — a name-keyed vocab lookup * would scan the (segment, name) primary key.

(name: string, variantToWord: Map<string, string>)

Source from the content-addressed store, hash-verified

1405 * variants). Segments are recomputed in JS — a name-keyed vocab lookup
1406 * would scan the (segment, name) primary key. */
1407 private wordsMatchingName(name: string, variantToWord: Map<string, string>): Set<string> {
1408 const segments = new Set(splitIdentifierSegments(name));
1409 const matched = new Set<string>();
1410 for (const [variant, word] of variantToWord) {
1411 if (segments.has(variant)) matched.add(word);
1412 }
1413 return matched;
1414 }
1415
1416 /**
1417 * One-shot upgrade heal for callers that open the graph WITHOUT syncing —

Callers 1

getSegmentMatchesMethod · 0.95

Calls 2

splitIdentifierSegmentsFunction · 0.90
hasMethod · 0.80

Tested by

no test coverage detected