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

Function scrollBashFinal

packages/opencode/src/cli/cmd/run/tool.ts:673–685  ·  view source on GitHub ↗
(p: ToolProps<typeof BashTool>)

Source from the content-addressed store, hash-verified

671}
672
673function scrollBashFinal(p: ToolProps<typeof BashTool>): string {
674 const code = p.metadata.exit ?? num(p.frame.meta.exitCode) ?? num(p.frame.meta.exit_code)
675 const time = span(p.frame.state)
676 if (code === undefined) {
677 if (!time) {
678 return "bash completed"
679 }
680
681 return `bash completed · ${time}`
682 }
683
684 return `bash completed (exit ${code})${time ? ` · ${time}` : ""}`
685}
686
687function scrollReadStart(p: ToolProps<typeof ReadTool>): string {
688 const file = toolPath(p.input.filePath)

Callers

nothing calls this directly

Calls 2

numFunction · 0.70
spanFunction · 0.70

Tested by

no test coverage detected