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

Function named

graph-ui/src/pseudocode/step-insights.ts:314–330  ·  view source on GitHub ↗

The names one relation points at, deduplicated, in the graph's order.

(
    edges: readonly InsightEdge[],
    type: string,
    byId: ReadonlyMap<number, InsightNode>,
)

Source from the content-addressed store, hash-verified

312
313/** The names one relation points at, deduplicated, in the graph's order. */
314function named(
315 edges: readonly InsightEdge[],
316 type: string,
317 byId: ReadonlyMap<number, InsightNode>,
318): string[] {
319 const out: string[] = [];
320 for (const edge of edges) {
321 if (edge.type !== type) {
322 continue;
323 }
324 const name = byId.get(edge.target)?.name;
325 if (name !== undefined && name.length > 0 && !out.includes(name)) {
326 out.push(name);
327 }
328 }
329 return out;
330}
331
332/** One sentence over up to {@link STEP_INSIGHT_CAP} names, and a count for the rest. */
333function listed(names: readonly string[], phrase: (name: string) => string): string {

Callers 1

notesOfFunction · 0.70

Calls 2

getMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected