import { FC } from 'react'; import { AssistantAttachment } from '../../attachments'; import { VoiceSessionSnapshot } from '../../voice/voiceSession'; import { VoiceSessionNotice } from '../useVoiceSession'; import { VoiceTranscriptTurn } from '../../voice/turnVisibility'; /** How much room the voice session takes: a strip, the panel, or the screen. */ export type VoiceView = "mini" | "panel" | "full"; interface Props { session: VoiceSessionSnapshot; /** Recent exchanges, oldest first — the running conversation. */ turns?: ReadonlyArray; /** Download the spoken conversation. */ onSaveTranscript?: () => void; /** Leave a note in the typed thread, end the session, and carry on there. */ onContinueInChat?: () => void; /** Cut the assistant off mid-reply. */ onInterrupt?: () => void; /** A recoverable problem to surface. Null when the microphone is healthy. */ notice?: VoiceSessionNotice | null; /** The assistant's last reply, captioned while it is spoken. */ spoken: string | null; onToggleMute: () => void; /** * Files attached to the NEXT spoken turn. * * ★ Deliberately a separate draft from the composer's. A photo taken during a * voice session belongs to the question the user is about to ask aloud, not to * whatever half-typed message is sitting in the text box behind the overlay. */ attachments?: AssistantAttachment[]; onAttachFiles?: (files: FileList | null) => void; onRemoveAttachment?: (id: string) => void; onRetryAttachment?: (id: string) => void; canAttachMore?: boolean; /** Files being read — placeholder chips, see AssistantAttachmentChips. */ preparingAttachments?: number; /** Reveals the assistant caption in step with the audio. */ spokenChunks?: { chunks: string[]; index: number; } | null; onEnd: () => void; /** Is the recogniser actually running? Distinguishes CONNECTING from LISTENING. */ capturing?: boolean; /** The user has cut the assistant off and capture has not resumed yet. */ interrupting?: boolean; /** Quiet has fallen and the two-second correction window is running. */ awaitingEndpoint?: boolean; } /** * Full-screen voice conversation (BOFF-7120). * * ★ **Voice only, by explicit product decision.** The reference (Gemini Live) * also offers camera and screen sharing; those are deliberately absent here. * Attaching images is a separate, existing capability of the assistant and * stays in the composer, and screen sharing could not work on the primary * device anyway — `getDisplayMedia` is unsupported by every iOS browser, so * that control would be dead on an iPhone. * * The controls are therefore the two that a voice conversation actually needs: * mute, and end. Anything else would be a button the user has to think about * while talking. * * This component is presentational: every transition is owned by * `voiceSessionReducer`, which is pure and tested. That split exists because * this file cannot be tested at all in this repo — vitest runs in `node` with * no DOM and no audio. */ export declare const AssistantVoiceSession: FC; export {}; //# sourceMappingURL=AssistantVoiceSession.d.ts.map