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

Method onChatEvent

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

Source from the content-addressed store, hash-verified

603 }
604
605 onChatEvent(listener: (event: AgentSessionChatEvent) => void): () => void {
606 assert(typeof listener === "function", "listener must be a function");
607 this.emitter.on("chat-event", listener);
608 return () => {
609 this.emitter.off("chat-event", listener);
610 };
611 }
612
613 onMetadataEvent(listener: (event: AgentSessionMetadataEvent) => void): () => void {
614 assert(typeof listener === "function", "listener must be a function");

Calls 2

onMethod · 0.80
assertFunction · 0.50

Tested by

no test coverage detected