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

Method close

packages/node-sdk/src/session.ts:515–524  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

513 }
514
515 async close(): Promise<void> {
516 if (this.closed) return;
517 this.closed = true;
518 try {
519 await this.rpc.closeSession({ sessionId: this.id });
520 } finally {
521 this.rpc.clearSessionHandlers(this.id);
522 await this.onClose?.();
523 }
524 }
525
526 /** @internal */
527 emitMetaUpdated(patch: { readonly title?: string | undefined }): void {

Callers

nothing calls this directly

Calls 3

onCloseMethod · 0.80
closeSessionMethod · 0.65
clearSessionHandlersMethod · 0.45

Tested by

no test coverage detected