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

Function emitBash

packages/opencode/src/cli/cmd/run/demo.ts:585–600  ·  view source on GitHub ↗
(state: State, signal?: AbortSignal)

Source from the content-addressed store, hash-verified

583}
584
585async function emitBash(state: State, signal?: AbortSignal): Promise<void> {
586 const ref = make(state, "bash", {
587 command: "git status",
588 workdir: process.cwd(),
589 description: "Show git status",
590 })
591 startTool(state, ref)
592 await wait(70, signal)
593 doneTool(state, ref, {
594 title: "git status",
595 output: `${process.cwd()}\ngit status\nOn branch demo\nnothing to commit, working tree clean\n`,
596 metadata: {
597 exitCode: 0,
598 },
599 })
600}
601
602function emitWrite(state: State): void {
603 const file = path.join(process.cwd(), "src", "demo-format.ts")

Callers 1

emitFmtFunction · 0.85

Calls 5

makeFunction · 0.70
startToolFunction · 0.70
waitFunction · 0.70
doneToolFunction · 0.70
cwdMethod · 0.65

Tested by

no test coverage detected