MCPcopy Index your code
hub / github.com/anomalyco/opencode / span

Function span

packages/opencode/src/cli/cmd/run/tool.ts:191–200  ·  view source on GitHub ↗
(state: ToolDict)

Source from the content-addressed store, hash-verified

189}
190
191function span(state: ToolDict): string {
192 const time = dict(state.time)
193 const start = num(time.start)
194 const end = num(time.end)
195 if (start === undefined || end === undefined || end <= start) {
196 return ""
197 }
198
199 return Locale.duration(end - start)
200}
201
202function fail(ctx: ToolFrame): string {
203 const error = toolError(ctx)

Callers 5

fallbackFinalFunction · 0.70
scrollBashFinalFunction · 0.70
scrollPatchFinalFunction · 0.70
scrollTodoFinalFunction · 0.70
scrollQuestionFinalFunction · 0.70

Calls 2

dictFunction · 0.70
numFunction · 0.70

Tested by

no test coverage detected