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

Function proseChips

graph-ui/src/twin/render-model.ts:1228–1243  ·  view source on GitHub ↗

Distinct callees in the order the body reaches them, capped.

(ir: SemanticIR, limit: number)

Source from the content-addressed store, hash-verified

1226
1227/** Distinct callees in the order the body reaches them, capped. */
1228function proseChips(ir: SemanticIR, limit: number): { chips: TwinChip[]; hidden: number } {
1229 const seen = new Set<string>();
1230 const distinct: CallSite[] = [];
1231 for (const call of ir.steps.value) {
1232 const key = call.targetQualifiedName ?? call.targetName;
1233 if (key.length === 0 || seen.has(key)) {
1234 continue;
1235 }
1236 seen.add(key);
1237 distinct.push(call);
1238 }
1239 return {
1240 chips: distinct.slice(0, limit).map(call => ({ label: call.targetName, target: stepTarget(call) })),
1241 hidden: Math.max(0, distinct.length - limit)
1242 };
1243}
1244
1245/**
1246 * One honest sentence about whether anything tests this, in plain words.

Callers 1

narrativeFunction · 0.85

Calls 2

stepTargetFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected