MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / testCandidates

Function testCandidates

graph-ui/src/impact/impact-source.ts:76–94  ·  view source on GitHub ↗
(
    symbols: readonly ChangeImpactSymbol[],
    cap: number,
)

Source from the content-addressed store, hash-verified

74
75/** The symbols worth asking about, in the order the change set reported them. */
76export function testCandidates(
77 symbols: readonly ChangeImpactSymbol[],
78 cap: number,
79): ChangeImpactSymbol[] {
80 const seen = new Set<string>();
81 const out: ChangeImpactSymbol[] = [];
82 for (const symbol of symbols) {
83 const key = symbol.qualifiedName;
84 if (symbol.changeKind === 'module' || symbol.isTest === true || key === undefined || seen.has(key)) {
85 continue;
86 }
87 seen.add(key);
88 out.push(symbol);
89 if (out.length >= cap) {
90 break;
91 }
92 }
93 return out;
94}
95
96/**
97 * Test callers for as many affected symbols as the cap allows.

Callers 2

testLookupFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected