constructor(readonly session: CopilotSession) {
const unsubscribeAll = session.on(event => {
if (!this._handledEventTypes.has(event.type)) {
this._onUnhandledEvent.fire(event);
}
this._register(toDisposable(unsubscribeAll));
this._register(toDisposable(() => {
session.disconnect().catch(() => { /* best-effort */ });
}));
}
get sessionId(): string { return this.session.sessionId; }