MCPcopy Index your code
hub / github.com/codeaashu/claude-code / #spillToDisk

Method #spillToDisk

src/utils/task/TaskOutput.ts:256–276  ·  view source on GitHub ↗
(stderrChunk: string | null, stdoutChunk: string | null)

Source from the content-addressed store, hash-verified

254 }
255
256 #spillToDisk(stderrChunk: string | null, stdoutChunk: string | null): void {
257 this.#disk = new DiskTaskOutput(this.taskId)
258
259 // Flush existing buffers
260 if (this.#stdoutBuffer) {
261 this.#disk.append(this.#stdoutBuffer)
262 this.#stdoutBuffer = ''
263 }
264 if (this.#stderrBuffer) {
265 this.#disk.append(`[stderr] ${this.#stderrBuffer}`)
266 this.#stderrBuffer = ''
267 }
268
269 // Write the chunk that triggered overflow
270 if (stdoutChunk) {
271 this.#disk.append(stdoutChunk)
272 }
273 if (stderrChunk) {
274 this.#disk.append(`[stderr] ${stderrChunk}`)
275 }
276 }
277
278 /**
279 * Get stdout. In file mode, reads from the output file.

Callers 2

#writeBufferedMethod · 0.95
spillToDiskMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected