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

Function scrollBashStart

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

Source from the content-addressed store, hash-verified

622}
623
624function scrollBashStart(p: ToolProps<typeof BashTool>): string {
625 const cmd = p.input.command ?? ""
626 const wd = p.input.workdir ?? ""
627 const formatted = wd && wd !== "." ? toolPath(wd) : ""
628 const dir = formatted === "." ? "" : formatted
629 if (cmd && !dir) {
630 return `$ ${cmd}`
631 }
632
633 if (!cmd) {
634 return dir ? `# Running in ${dir}` : ""
635 }
636
637 return `# Running in ${dir}\n$ ${cmd}`
638}
639
640function scrollBashProgress(p: ToolProps<typeof BashTool>): string {
641 const out = stripAnsi(p.frame.raw)

Callers

nothing calls this directly

Calls 1

toolPathFunction · 0.85

Tested by

no test coverage detected