import type React from 'react'; /** * What the user chose on a failed refinement. `retry` re-runs on the same * model with a longer window; `fallback` re-runs on the resolved fallback ref; * `pick` re-runs on an explicitly-chosen provider/model (ephemeral — the * session model is untouched); `original` sends the raw text as-is; `edit` * loads the text back into the input for hand-editing. */ export type RefineFailureDecision = { kind: 'retry'; } | { kind: 'fallback'; } | { kind: 'pick'; providerId: string; model: string; } | { kind: 'original'; } | { kind: 'edit'; }; export interface RefineFailureModel { providerId: string; model: string; label?: string | undefined; } export declare function filterRefineModels(models: readonly T[], query: string): readonly T[]; export interface RefineFailurePanelProps { /** The user's original message (sent as-is if they decline recovery). */ original: string; /** Short failure reason from the refiner (provider error / timeout / empty). */ error?: string | undefined; /** Total time spent across attempts so far. */ elapsedMs?: number | undefined; /** One-key "retry with another model" offer (provider/model), if resolved. */ fallbackRef?: string | undefined; /** Provider/model candidates for the inline "pick another model" list. */ models: RefineFailureModel[]; onDecision: (decision: RefineFailureDecision) => void; } /** * Recovery panel shown when a refinement fails. Two views: the default option * list (retry / fallback / pick / send-as-is / edit) and — when the user opens * "pick another model" — an inline scroll list of provider/models with a * type-to-filter search box. * Everything resolves through `onDecision`; no session state is mutated here. */ export declare function RefineFailurePanel({ original, error, elapsedMs, fallbackRef, models, onDecision, }: RefineFailurePanelProps): React.ReactElement; //# sourceMappingURL=refine-failure-panel.d.ts.map