MCPcopy
hub / github.com/coder/mux / subscribeChat

Method subscribeChat

src/node/services/agentSession.ts:621–631  ·  view source on GitHub ↗
(listener: (event: AgentSessionChatEvent) => void)

Source from the content-addressed store, hash-verified

619 }
620
621 async subscribeChat(listener: (event: AgentSessionChatEvent) => void): Promise<() => void> {
622 this.assertNotDisposed("subscribeChat");
623 assert(typeof listener === "function", "listener must be a function");
624
625 const unsubscribe = this.onChatEvent(listener);
626 await this.emitHistoricalEvents(listener);
627
628 this.scheduleStartupRecovery();
629
630 return unsubscribe;
631 }
632
633 async replayHistory(
634 listener: (event: AgentSessionChatEvent) => void,

Callers 1

mainFunction · 0.95

Calls 5

assertNotDisposedMethod · 0.95
onChatEventMethod · 0.95
emitHistoricalEventsMethod · 0.95
assertFunction · 0.50

Tested by

no test coverage detected