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

Method wordsMatchingName

src/index.ts:2894–2901  ·  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

2892 * variants). Segments are recomputed in JS — a name-keyed vocab lookup
2893 * would scan the (segment, name) primary key. */
2894 private wordsMatchingName(name: string, variantToWord: Map<string, string>): Set<string> {
2895 const segments = new Set(splitIdentifierSegments(name));
2896 const matched = new Set<string>();
2897 for (const [variant, word] of variantToWord) {
2898 if (segments.has(variant)) matched.add(word);
2899 }
2900 return matched;
2901 }
2902
2903 /**
2904 * One-shot upgrade heal for callers that open the graph WITHOUT syncing —

Callers 1

getSegmentMatchesMethod · 0.95

Calls 3

splitIdentifierSegmentsFunction · 0.90
hasMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected