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

Function buildFlowView

graph-ui/src/pseudocode/flow-view.ts:113–147  ·  view source on GitHub ↗
(input: FlowViewInput)

Source from the content-addressed store, hash-verified

111 * ruft, ergeben je einen Erklaerer mit einem Satz statt einer leeren Flaeche.
112 */
113export function buildFlowView(input: FlowViewInput): FlowView {
114 const closure = input.closure;
115 const root = closure.root;
116 const document = buildPseudocode(
117 { kind: 'closure', label: root.name },
118 { irs: input.irs, closure },
119 );
120 const nodes = flowNodes(closure);
121 const sequence = flowSequence(baseNameOf(root.uri), nodes);
122 const steps = flowSteps(document);
123 const arrows = steps.map((step) => flowArrowFor(sequence, step.line));
124
125 const notes: string[] = [];
126 if (sequence.interactions.length === 0) {
127 notes.push(EXPLAINER_EMPTY);
128 } else {
129 notes.push(explainerCappedNote(input.depth ?? FLOW_CLOSURE_DEPTH, input.cap ?? FLOW_CLOSURE_CAP));
130 }
131
132 return {
133 root,
134 title: document.title,
135 document,
136 sequence,
137 steps,
138 arrows,
139 stepRows: stepRowsOf(document, root, steps),
140 notes,
141 bound: {
142 depth: input.depth ?? FLOW_CLOSURE_DEPTH,
143 cap: input.cap ?? FLOW_CLOSURE_CAP,
144 },
145 unresolved: closure.symbols.filter((symbol) => symbol.kind === 'unknown').length,
146 };
147}
148
149/**
150 * Welche Zeile der STEPS-Sektion zu welchem Schritt gehoert.

Callers 5

ProjectWindowViewFunction · 0.90
flowFixtureFunction · 0.90
viewFunction · 0.90
flow-view.test.tsFile · 0.90
flowFixtureFunction · 0.90

Calls 9

buildPseudocodeFunction · 0.90
flowNodesFunction · 0.90
flowSequenceFunction · 0.90
baseNameOfFunction · 0.90
flowStepsFunction · 0.90
flowArrowForFunction · 0.90
explainerCappedNoteFunction · 0.90
stepRowsOfFunction · 0.85
pushMethod · 0.45

Tested by 3

flowFixtureFunction · 0.72
viewFunction · 0.72
flowFixtureFunction · 0.72