MCPcopy
hub / github.com/coder/mux / append

Method append

src/node/runtime/initHook.ts:153–160  ·  view source on GitHub ↗

* Process a chunk of data, splitting on newlines and logging complete lines

(data: string)

Source from the content-addressed store, hash-verified

151 * Process a chunk of data, splitting on newlines and logging complete lines
152 */
153 append(data: string): void {
154 this.buffer += data;
155 const lines = this.buffer.split("\n");
156 this.buffer = lines.pop() ?? ""; // Keep last incomplete line
157 for (const line of lines) {
158 if (line) this.logLine(line);
159 }
160 }
161
162 /**
163 * Flush any remaining buffered data (called when stream closes)

Callers 15

runUpFunction · 0.95
openMethod · 0.80
events.test.tsFile · 0.80
readStdoutFunction · 0.80
readStderrFunction · 0.80
runInitHookFunction · 0.80
initHook.test.tsFile · 0.80
build_rowsFunction · 0.80

Calls

no outgoing calls

Tested by 2

openMethod · 0.64
download_fileMethod · 0.64