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

Function write

packages/opencode/src/cli/cmd/run/trace.ts:76–86  ·  view source on GitHub ↗
(type: string, data?: unknown)

Source from the content-addressed store, hash-verified

74 )
75 state = {
76 write(type: string, data?: unknown) {
77 fs.appendFileSync(
78 target,
79 text({
80 time: new Date().toISOString(),
81 pid: process.pid,
82 type,
83 data,
84 }) + "\n",
85 )
86 },
87 }
88 state.write("trace.start", {
89 argv: process.argv.slice(2),

Callers

nothing calls this directly

Calls 1

textFunction · 0.70

Tested by

no test coverage detected