(listener: (event: AgentSessionChatEvent) => void)
| 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, |
no test coverage detected