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

Function PathSteps

graph-ui/src/galaxy/ScopePathControls.tsx:51–85  ·  view source on GitHub ↗
({ heading, note, steps, active, nameOf, lines, onStep, onClear }: {
    heading: string;
    note?: string;
    steps: readonly ScopePathStep[];
    active: number;
    nameOf: (id: number) => string;
    /** Call order shows the call-site line; a path shows the hop. */
    lines: boolean;
    onStep: (index: number) => void;
    onClear: () => void;
})

Source from the content-addressed store, hash-verified

49
50/** The compact step list: one line per hop or call site, stepping moves the highlight. */
51export function PathSteps({ heading, note, steps, active, nameOf, lines, onStep, onClear }: {
52 heading: string;
53 note?: string;
54 steps: readonly ScopePathStep[];
55 active: number;
56 nameOf: (id: number) => string;
57 /** Call order shows the call-site line; a path shows the hop. */
58 lines: boolean;
59 onStep: (index: number) => void;
60 onClear: () => void;
61}) {
62 return <section className="atlas-galaxy-path-panel" aria-label={text.panel} data-testid="atlas-galaxy-path-panel">
63 <header>
64 <strong>{heading}</strong>
65 <button type="button" title={text.clearTitle} onClick={onClear}>{text.clear}</button>
66 </header>
67 {note && <p>{note}</p>}
68 {steps.length > 0 && <>
69 <ol>{steps.map((step, index) => <li key={`${index}:${step.edge.id ?? ''}`}>
70 <button type="button" data-active={index === active} aria-current={index === active ? 'step' : undefined}
71 onClick={() => onStep(index)}>
72 <span className="atlas-galaxy-path-hop">{lines
73 ? step.edge.line === undefined ? text.lineUnknown : text.line(step.edge.line)
74 : text.hop(index + 1)}</span>
75 <code>{text.step(nameOf(step.from), step.edge.type, nameOf(step.to), step.edge.source === step.from)}</code>
76 </button>
77 </li>)}</ol>
78 <footer>
79 <button type="button" disabled={active <= 0} onClick={() => onStep(active - 1)}>{text.previous}</button>
80 <span>{text.position(active + 1, steps.length)}</span>
81 <button type="button" disabled={active >= steps.length - 1} onClick={() => onStep(active + 1)}>{text.next}</button>
82 </footer>
83 </>}
84 </section>;
85}

Callers

nothing calls this directly

Calls 3

lineMethod · 0.80
nameOfFunction · 0.70
stepMethod · 0.45

Tested by

no test coverage detected