import { type ComponentProps } from "react"; import type { SessionFailureSummary } from "../../lib/events.js"; import type { FreeCreditGap } from "../../lib/free-credit-gap.js"; import { type CreditRefusalKind } from "../../../lib/format.js"; import type { ConnectableSubscriptions } from "../../lib/deployment-free-model.js"; import { type CodexUsageChoice } from "./codex-usage-notice.js"; import { FailedSessionActions } from "./failed-session-actions.js"; import { type SandboxRecoveryActionsProps } from "./sandbox-recovery-actions.js"; /** Presentation only: admission, billing and retry identity remain with their owners. */ export declare function FailedSessionBanner({ failure, creditExhausted, creditRefusal: stopRefusal, freeCreditGap, onChooseModel, workspaceId, canBuyCredits, onAddCredits, canConnectModel, modelChanged, canChooseModel, freeModel, subscriptions, hasModelPicker, actions, sandboxRecovery, analyticsKey, shownInTimeline, codexUsage, }: { failure: SessionFailureSummary; /** Stable identity of this failure for the consent-gated recovery journey. */ analyticsKey?: string | undefined; creditExhausted?: boolean | undefined; /** The one-fix refusal the last turn ended on (`creditRefusalFromEvents`), if known. */ creditRefusal?: CreditRefusalKind | null | undefined; /** Free credit remains for other models but not this one. */ freeCreditGap?: FreeCreditGap | null | undefined; /** Select a model in the composer; offered for a covered model after a free-credit gap. */ onChooseModel?: ((modelId: string) => void) | undefined; workspaceId?: string | undefined; canBuyCredits?: boolean | undefined; /** Opens the add-credits prompt in the chat; without it, Add credits opens billing. */ onAddCredits?: (() => void) | undefined; canConnectModel?: boolean | undefined; modelChanged?: boolean | undefined; canChooseModel?: boolean | undefined; /** The failed turn ran on the deployment's free model (catalog `cost: "free"`). */ freeModel?: boolean | undefined; /** Subscriptions this deployment offers, for the free model's connect remedy. */ subscriptions?: ConnectableSubscriptions | undefined; /** * The composer shows a model picker, even while sending or a Retry briefly * locks it. Keeps the free model's remedies steady; defaults to `canChooseModel`. */ hasModelPicker?: boolean | undefined; actions?: ComponentProps | undefined; sandboxRecovery?: Omit | undefined; /** * The timeline above already shows this exact failure with its Details * (see `timelineShowsFailure`). A compaction failure then keeps only its * recovery actions here instead of a second headline and Details. */ shownInTimeline?: boolean | undefined; /** * When the ChatGPT/Codex plan is out of usage: say when it resets, with a * "Continue at reset" switch in place of Retry. */ codexUsage?: CodexUsageChoice | undefined; }): import("react").JSX.Element | null;