MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / ingest

Method ingest

__tests__/ui-events-api.test.ts:116–127  ·  view source on GitHub ↗
(chunk: string)

Source from the content-addressed store, hash-verified

114 }
115
116 private ingest(chunk: string): void {
117 this.buffer += chunk;
118 let split = this.buffer.indexOf('\n\n');
119 while (split !== -1) {
120 const frame = this.buffer.slice(0, split);
121 this.buffer = this.buffer.slice(split + 2);
122 this.parse(frame);
123 split = this.buffer.indexOf('\n\n');
124 }
125 // A heartbeat is its own frame and ends the same way, but node may deliver
126 // it alone; the loop above already handled it.
127 }
128
129 private parse(frame: string): void {
130 let name = 'message';

Callers 1

openMethod · 0.95

Calls 1

parseMethod · 0.95

Tested by

no test coverage detected