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

Function emitWrite

packages/opencode/src/cli/cmd/run/demo.ts:602–613  ·  view source on GitHub ↗
(state: State)

Source from the content-addressed store, hash-verified

600}
601
602function emitWrite(state: State): void {
603 const file = path.join(process.cwd(), "src", "demo-format.ts")
604 const ref = make(state, "write", {
605 filePath: file,
606 content: "export const demo = 42\n",
607 })
608 doneTool(state, ref, {
609 title: "write",
610 output: "",
611 metadata: {},
612 })
613}
614
615function emitEdit(state: State): void {
616 const file = path.join(process.cwd(), "src", "demo-format.ts")

Callers 1

emitFmtFunction · 0.85

Calls 3

makeFunction · 0.70
doneToolFunction · 0.70
cwdMethod · 0.65

Tested by

no test coverage detected