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

Method onUnsubscribe

packages/server/src/ws/connection.ts:395–419  ·  view source on GitHub ↗
(msg: UnsubscribeMessage)

Source from the content-addressed store, hash-verified

393 }
394
395 private onUnsubscribe(msg: UnsubscribeMessage): void {
396 const { session_ids } = msg.payload;
397 for (const sid of session_ids) {
398 this.unsubscribe(sid);
399 this.cursorsBySession.delete(sid);
400
401 if (this.fsWatchHandler !== undefined) {
402
403 const handler = this.fsWatchHandler;
404 void handler.remove(sid, this.id, []).catch((err: unknown) => {
405 this.logger.warn(
406 { sid, err: String(err) },
407 'unsubscribe watch_fs drop threw',
408 );
409 });
410 }
411 }
412 this.send(
413 buildAck(msg.id, 0, 'success', {
414 accepted: session_ids,
415 not_found: [],
416 resync_required: [],
417 }),
418 );
419 }
420
421 private onWatchFsAdd(msg: WatchFsAddMessage): void {
422 if (this.fsWatchHandler === undefined) {

Callers 1

onMessageMethod · 0.95

Calls 6

unsubscribeMethod · 0.95
sendMethod · 0.95
buildAckFunction · 0.90
deleteMethod · 0.65
removeMethod · 0.65
warnMethod · 0.65

Tested by

no test coverage detected