MCPcopy Index your code
hub / github.com/tiann/hapi / handleStdout

Method handleStdout

cli/src/codex/codexAppServerClient.ts:357–371  ·  view source on GitHub ↗
(chunk: string)

Source from the content-addressed store, hash-verified

355 }
356
357 private handleStdout(chunk: string): void {
358 this.buffer += chunk;
359 let newlineIndex = this.buffer.indexOf('\n');
360
361 while (newlineIndex >= 0) {
362 const line = this.buffer.slice(0, newlineIndex).trim();
363 this.buffer = this.buffer.slice(newlineIndex + 1);
364
365 if (line.length > 0) {
366 this.handleLine(line);
367 }
368
369 newlineIndex = this.buffer.indexOf('\n');
370 }
371 }
372
373 private handleLine(line: string): void {
374 if (this.protocolError) {

Callers 1

connectMethod · 0.95

Calls 1

handleLineMethod · 0.95

Tested by

no test coverage detected