MCPcopy
hub / github.com/continuedev/continue / handleData

Method handleData

binary/test/binary.test.ts:86–99  ·  view source on GitHub ↗
(data: string)

Source from the content-addressed store, hash-verified

84 }
85
86 private handleData(data: string) {
87 const d = data;
88 const lines = d.split(/\r\n/).filter((line) => line.trim() !== "");
89 if (lines.length === 0) return;
90
91 if (this.unfinishedLine) {
92 lines[0] = this.unfinishedLine + lines[0];
93 this.unfinishedLine = undefined;
94 }
95 if (!d.endsWith("\r\n")) {
96 this.unfinishedLine = lines.pop();
97 }
98 lines.forEach((line) => this.handleLine(line));
99 }
100
101 private async handleLine(line: string) {
102 let msg: { messageType: string; messageId: string; data?: any };

Callers 1

constructorMethod · 0.95

Calls 2

handleLineMethod · 0.95
popMethod · 0.45

Tested by

no test coverage detected