import type { Session, SessionEvent, SessionQueueSnapshot } from "@opengeni/sdk"; import type { ComposerState, TimelineItem } from "../session.js"; import { type SessionStartupSource } from "./session-startup.js"; type StartupInput = { session: Pick; events: SessionEvent[]; optimisticMessages: ComposerState["optimisticMessages"]; hasNewer: boolean; queue?: SessionQueueSnapshot | null | undefined; fallbackStartedAt?: string | undefined; }; /** Presentation only. Accepted work is not proof that a worker is executing. */ export declare function sessionStartupTimeline(items: TimelineItem[], input: StartupInput): TimelineItem[]; /** A prompt the host already sent while its session is still being created or loaded. */ export type PendingPrompt = { /** The prompt exactly as the person sent it. */ text: string; /** When the person sent it (ISO 8601). Anchors the startup row's clock. */ sentAt: string; }; /** The startup row keeps this id from the pending prompt through the live projection. */ export declare const PENDING_PROMPT_STARTUP_ID = "pending-prompt-startup"; /** * Keep the current loading visual while a session-only wake acquires a turn ID. * The web app's session page and the embeddable conversation both project * through this, so a sent prompt shows the same startup row in either. A * session that has not loaded yet leaves the timeline unchanged. */ export declare function useSessionStartupTimeline(items: TimelineItem[], input: Omit & { session: (StartupInput["session"] & SessionStartupSource) | null; /** * A prompt sent before the session or its history is readable. Until * `historyReady`, the timeline is that prompt and a running startup row; * the live row then keeps the same id and clock, so nothing remounts. */ pendingPrompt?: PendingPrompt | null | undefined; historyReady?: boolean | undefined; }): TimelineItem[]; export {};