MCPcopy Create free account
hub / github.com/anomalyco/opencode / fmt

Function fmt

packages/opencode/src/cli/cmd/run/tool.ts:643–646  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

641 const out = stripAnsi(p.frame.raw)
642 const cmd = (p.input.command ?? "").trim()
643 const fmt = (text: string) => {
644 const body = text.replace(/^\n+/, "").replace(/\n+$/, "")
645 return body ? `\n${body}` : ""
646 }
647
648 if (!cmd) {
649 return out.replace(/\n+$/, "")

Callers 1

scrollBashProgressFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected