()
| 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 | } |
no test coverage detected