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

Function emitEdit

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

Source from the content-addressed store, hash-verified

613}
614
615function emitEdit(state: State): void {
616 const file = path.join(process.cwd(), "src", "demo-format.ts")
617 const ref = make(state, "edit", {
618 filePath: file,
619 })
620 doneTool(state, ref, {
621 title: "edit",
622 output: "",
623 metadata: {
624 diff: "@@ -1 +1 @@\n-export const demo = 1\n+export const demo = 42\n",
625 },
626 })
627}
628
629function emitPatch(state: State): void {
630 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