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

Function fullSpan

apps/sim/lib/logs/log-views.ts:110–129  ·  view source on GitHub ↗
(s: TraceSpan, ctx: LogViewContext)

Source from the content-addressed store, hash-verified

108}
109
110async function fullSpan(s: TraceSpan, ctx: LogViewContext): Promise<FullSpan> {
111 const node: FullSpan = {
112 id: s.id,
113 blockId: s.blockId,
114 name: s.name,
115 type: s.type,
116 status: s.status,
117 durationMs: s.duration ?? 0,
118 startTime: s.startTime,
119 endTime: s.endTime,
120 }
121 if (s.cost) node.cost = s.cost
122 if (s.errorMessage) node.error = s.errorMessage
123 if (s.input !== undefined) node.input = await materializeField(s.input, ctx)
124 if (s.output !== undefined) node.output = await materializeField(s.output, ctx)
125 if (s.children && s.children.length > 0) {
126 node.children = await Promise.all(s.children.map((c) => fullSpan(c, ctx)))
127 }
128 return node
129}
130
131/**
132 * Resolve a span field that may be inline OR a large-value ref/manifest. Falls

Callers 1

toFullFunction · 0.85

Calls 1

materializeFieldFunction · 0.85

Tested by

no test coverage detected