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

Function write

packages/app/src/components/terminal.tsx:439–447  ·  view source on GitHub ↗
(data: string)

Source from the content-addressed store, hash-verified

437 }
438
439 const write = (data: string) =>
440 new Promise<void>((resolve) => {
441 if (!output) {
442 resolve()
443 return
444 }
445 output.push(data)
446 output.flush(resolve)
447 })
448
449 if (restore && restoreSize) {
450 await write(restore)

Callers 1

runFunction · 0.70

Calls 3

pushMethod · 0.80
resolveFunction · 0.70
flushMethod · 0.45

Tested by

no test coverage detected