MCPcopy
hub / github.com/anomalyco/opencode / flush

Method flush

packages/opencode/src/cli/cmd/run/footer.ts:1112–1128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1110 // spacing, and progressive markdown/code settling so direct mode can append
1111 // immutable transcript rows without rewriting history.
1112 private flush(): void {
1113 if (this.isGone || this.queue.length === 0) {
1114 this.queue.length = 0
1115 return
1116 }
1117
1118 const batch = this.queue.splice(0)
1119 this.flushing = this.flushing
1120 .then(async () => {
1121 for (const item of batch) {
1122 await this.scrollback.append(item)
1123 }
1124 })
1125 .catch((error) => {
1126 this.flushError = error
1127 })
1128 }
1129}

Callers 11

eventMethod · 0.95
patchMethod · 0.95
appendMethod · 0.95
idleMethod · 0.95
closeMethod · 0.95
RunFooterClass · 0.95
runCommandFunction · 0.45
writeFunction · 0.45
TerminalFunction · 0.45

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected