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

Method relevanceWeight

src/mcp/tools.ts:5054–5061  ·  view source on GitHub ↗
(node: Node, probeIsolation: boolean)

Source from the content-addressed store, hash-verified

5052 * declares it.
5053 */
5054 const relevanceWeight = (node: Node, probeIsolation: boolean): number => {
5055 const signatureOnly = isInterfaceOwnedMethod(node);
5056 const weight = signatureOnly
5057 ? TYPE_MEMBER_RELEVANCE_WEIGHT
5058 : RELEVANCE_KIND_WEIGHT[node.kind] ?? DEFAULT_RELEVANCE_KIND_WEIGHT;
5059 if (!probeIsolation || !(signatureOnly || WEAK_RELEVANCE_KINDS.has(node.kind))) return weight;
5060 return isUsageIsolated(node) ? ISOLATED_WEAK_KIND_WEIGHT : weight;
5061 };
5062
5063 // CHANGE SURFACE (#1064): a named method's signature types — its parameter
5064 // and return types — are part of what you'd edit to "add a parameter to X",

Callers

nothing calls this directly

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected