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

Function selectStep

graph-ui/src/architecture/SystemArchitecture.tsx:283–289  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

281 }
282 function selectPath(index: number) { setPathIndex(index); setStepIndex(0); setSelection(undefined); }
283 function selectStep(index: number) {
284 if (!path?.nodes[index]) return;
285 setStepIndex(index);
286 const found = model.nodes.find(item => item.depth === index && item.pathIndices?.includes(activePathIndex))
287 ?? model.nodes.find(item => item.componentIds?.includes(path.nodes[index].component_id) || item.id === path.nodes[index].group_id);
288 setSelection(data?.overview ? undefined : found ? { node: found.id } : undefined); selectSymbol(path.nodes[index]);
289 }
290 function selectEdge(id: string) {
291 const found = model.edges.find(item => item.id === id);
292 const nextPath = found?.pathIndices?.includes(activePathIndex) ? activePathIndex : found?.pathIndices?.[0] ?? activePathIndex;

Callers 1

SystemArchitectureFunction · 0.70

Calls 1

selectSymbolFunction · 0.85

Tested by

no test coverage detected