MCPcopy Index your code
hub / github.com/continuedev/continue / handleLine

Method handleLine

binary/test/binary.test.ts:101–118  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

99 }
100
101 private async handleLine(line: string) {
102 let msg: { messageType: string; messageId: string; data?: any };
103 try {
104 msg = JSON.parse(line);
105 } catch {
106 return; // not JSON, ignore
107 }
108
109 const handler = this.handlers[msg.messageType];
110 if (!handler) return; // not an IDE message, let CoreBinaryMessenger handle it
111
112 try {
113 const result = await handler(msg.data);
114 this.respond(msg.messageType, result, msg.messageId);
115 } catch (e) {
116 this.respond(msg.messageType, undefined, msg.messageId);
117 }
118 }
119
120 private respond(messageType: string, data: any, messageId: string) {
121 const response = JSON.stringify({ messageType, data, messageId });

Callers 1

handleDataMethod · 0.95

Calls 1

respondMethod · 0.95

Tested by

no test coverage detected