import { AssistantConversationProcessing, Message } from './conversation'; import { AssistantTr } from './i18n'; /** * What a message IS, for anything that shows it to a person. * * - `output`: text the model produced, or a genuine settled outcome (an error, * a quota refusal, the incomplete-turn note). `text` may be empty only when * the message carries completion evidence without prose — its cards still * render. * - `working`: a live turn with nothing to show yet. Loading copy is drawn from * the processing state, never from here, so `text` is empty. * - `stopped`: a turn that ended without producing anything, shown as "Stopped". * * ★ A status label is not an answer, so consumers act on `kind`, not on whether * `text` is non-empty: Copy and Listen are for `output` only, and the voice * session never advances on anything else. */ export type AssistantDisplayContent = { readonly kind: "output"; readonly text: string; } | { readonly kind: "working"; readonly text: ""; } | { readonly kind: "stopped"; readonly text: string; }; /** * The one projection from a stored message to what is shown for it. * * Used by every surface that shows a message to a person — the bubble, the * history preview, Copy, Listen, Export, the voice transcript — so no two of * them can disagree about whether a bubble holds an answer. * * ★★ PURE, and never written back. See `legacyFiller.ts` for why storage is not * rewritten. * * `processing` is the entry for the message's OWN conversation. Passing another * conversation's entry (or none, for a conversation with a live turn) would show * that live turn as Stopped. * * The rule for `stopped` is deliberately conservative — ALL of: * 1. an assistant message; * 2. no turn in flight for it; * 3. no completion evidence (see `hasCompletionEvidence`); * 4. content that is empty, EXACTLY loading copy an older build stored, or * EXACTLY the "Stopped" a BOFF-7229 build stored. * A reply that happens to read "Thinking..." carries evidence and is left alone. * * ★ Known limit, accepted: liveness is per TAB, because processing is never * persisted. A second tab opened on the same profile while the first is mid-turn * shows that turn as "Stopped" until the first tab's answer is reloaded — the * same message a real orphan shows, and nothing distinguishes the two. Older * builds showed frozen loading copy there instead. */ export declare function getAssistantDisplayContent(message: Message, processing: AssistantConversationProcessing | null | undefined, tr: AssistantTr): AssistantDisplayContent; //# sourceMappingURL=displayContent.d.ts.map