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

Method onEvent

packages/node-sdk/src/session.ts:85–92  ·  view source on GitHub ↗
(listener: (event: Event) => void)

Source from the content-addressed store, hash-verified

83 }
84
85 onEvent(listener: (event: Event) => void): Unsubscribe {
86 this.ensureOpen();
87 return this.rpc.onEvent((event) => {
88 if (event.sessionId === this.id) {
89 listener(event);
90 }
91 });
92 }
93
94 setApprovalHandler(handler: ApprovalHandler | undefined): void {
95 this.ensureOpen();

Callers

nothing calls this directly

Calls 3

ensureOpenMethod · 0.95
listenerFunction · 0.85
onEventMethod · 0.65

Tested by

no test coverage detected