MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / onClientHello

Method onClientHello

packages/server/src/ws/connection.ts:270–290  ·  view source on GitHub ↗
(msg: ClientHelloMessage)

Source from the content-addressed store, hash-verified

268 }
269
270 private async onClientHello(msg: ClientHelloMessage): Promise<void> {
271 this.gotClientHello = true;
272 const { subscriptions, cursors } = msg.payload;
273
274 const sync = await this.syncSessions(subscriptions, cursors);
275
276 this.logger.info(
277 {
278 acceptedCount: sync.accepted.length,
279 resyncRequiredCount: sync.resyncRequired.length,
280 },
281 'client hello',
282 );
283 this.send(
284 buildAck(msg.id, 0, 'success', {
285 accepted_subscriptions: sync.accepted,
286 resync_required: sync.resyncRequired,
287 cursors: sync.serverCursors,
288 }),
289 );
290 }
291
292 /**
293 * Shared client_hello/subscribe session sync:

Callers 1

onMessageMethod · 0.95

Calls 4

syncSessionsMethod · 0.95
sendMethod · 0.95
buildAckFunction · 0.90
infoMethod · 0.65

Tested by

no test coverage detected