import { ApiCaller } from '../api/api-caller'; import { ActionCallDto, MessageDto } from '../types/dtos'; import { WidgetMessageReplyTo, WidgetMessageU, WidgetSystemMessageU } from '../types/messages'; import { WidgetConfig } from '../types/widget-config'; import { MessageCtx } from './message.ctx'; import { SessionCtx } from './session.ctx'; export declare class ActiveSessionPollingCtx { private api; private config; private sessionCtx; private messageCtx; private sessionPollingIntervalSeconds; private poller; private fetchSessionAndFullHistoryAbortController; private reconcileAbortController; private subscriptions; /** Session the in-flight post-stream reconcile belongs to, if any. */ private reconcilingSessionId; constructor({ api, config, sessionCtx, messageCtx, sessionPollingIntervalSeconds, }: { api: ApiCaller; config: WidgetConfig; sessionCtx: SessionCtx; messageCtx: MessageCtx; sessionPollingIntervalSeconds: number; }); private registerPolling; dispose: () => void; /** * Ingest the canonical rows the backend persisted for a just-settled * streamed turn. Owns a REAL abort controller — cancelled on the session * boundary (see `registerPolling`), which is the whole point: the signal * this passes must be one somebody can actually fire. */ reconcileAfterStream: (sessionId: string) => Promise; fetchSessionAndHistory: ({ sessionId, abortSignal, }: { sessionId: string; abortSignal: AbortSignal; }) => Promise; /** A pick recorded elsewhere (another tab) lands on the message this tab already shows. */ private reconcileOptionPicks; mapHistoryToMessage: (history: MessageDto) => WidgetMessageU | null; /** * The quoted message carried by a reply — a teammate answering a specific * message, or the AI following up on one after asking the team. Spread into * the message so an absent quote adds no key at all. */ constructReplyTo: (history: MessageDto) => { replyTo?: WidgetMessageReplyTo; }; constructSystemMessage: (history: MessageDto) => WidgetSystemMessageU | null; extractActionResult: (action: ActionCallDto) => any; } //# sourceMappingURL=active-session-polling.ctx.d.ts.map