MCPcopy Index your code
hub / github.com/simstudioai/sim / toOverview

Function toOverview

apps/sim/lib/logs/log-views.ts:42–56  ·  view source on GitHub ↗
(spans: TraceSpan[])

Source from the content-addressed store, hash-verified

40
41/** Project trace spans to a compact overview tree. Never materializes refs. */
42export function toOverview(spans: TraceSpan[]): OverviewSpan[] {
43 return spans.map((s) => {
44 const node: OverviewSpan = {
45 id: s.id,
46 blockId: s.blockId,
47 name: s.name,
48 type: s.type,
49 status: s.status,
50 durationMs: s.duration ?? 0,
51 }
52 if (s.cost) node.cost = s.cost
53 if (s.children && s.children.length > 0) node.children = toOverview(s.children)
54 return node
55 })
56}
57
58// ---------------------------------------------------------------------------
59// Full (Level 3): block tree WITH materialized input/output.

Callers 2

log-views.test.tsFile · 0.90
executeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected