import { Disposable } from "../../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../../base/common/observable.js"; import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.service.js"; import { RawContextKey } from "../../../../../platform/contextkey/common/contextkey.js"; import { IContextKeyService } from "../../../../../platform/contextkey/common/contextkey.service.js"; import { IStorageService } from "../../../../../platform/storage/common/storage.service.js"; import { IChatSpeechToTextService } from "../speechToText/chatSpeechToTextService.service.js"; import { IVoiceInputModeService } from "./voiceInputMode.service.js"; /** * The two mutually-exclusive voice input modes exposed in the chat input. * - `dictation`: speech-to-text that types the recognized words into the input box. * - `voice`: the live, conversational Voice Mode agent (real-time listen + talk-back). */ export type VoiceInputMode = "dictation" | "voice"; /** * Simulated voice-cell visual states for development/preview, so the UI can be * inspected without a live backend connection. `undefined` = use real state. */ export type SimulatedVoiceState = "off" | "connecting" | "idle" | "listening" | "speaking" | "dictating"; /** * The four push-to-talk interaction designs being compared. Each drives its own * prototype walkthrough (state sequence + layout + hint) so they can be evaluated * side by side without a live backend. * - `handsFree`: auto-listen + auto-send; hold a key only to barge in / interrupt. * - `keyboardHold`: walkie-talkie — hold a keybinding to talk; button only connects. * - `buttonHold`: hold the voice button to talk; a quick tap disconnects. * - `clickToggle`: tap the button to start listening, tap again to stop. */ export type VoiceWalkthroughVersion = "handsFree" | "keyboardHold" | "buttonHold" | "clickToggle"; /** * Which voice input mode is currently selected in the segmented toggle. This is the * single source of truth for *which* segment is highlighted — distinct from whether * that mode is currently active (listening / connected / speaking). */ export declare const CHAT_VOICE_INPUT_MODE: RawContextKey; export declare class VoiceInputModeService extends Disposable implements IVoiceInputModeService { private readonly storageService; readonly _serviceBrand: undefined; private readonly _selectedMode; readonly selectedMode: IObservable; readonly voiceAvailable: IObservable; readonly dictationAvailable: IObservable; readonly handsFree: IObservable; private readonly _simulatedVoiceState; readonly simulatedVoiceState: IObservable; private readonly _simulatedHandsFree; readonly simulatedHandsFree: IObservable; private readonly _simulatedVersion; readonly simulatedVersion: IObservable; private readonly _simulatedHover; readonly simulatedHover: IObservable; private readonly _contextKey; constructor(storageService: IStorageService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, chatSpeechToTextService: IChatSpeechToTextService); setSelectedMode(mode: VoiceInputMode): void; setSimulatedVoiceState(state: SimulatedVoiceState | undefined): void; private static readonly WALKTHROUGHS; private static readonly WALK_STEP_MS; private _walkTimer; private _walkIndex; private _walkVersion; startVoiceStateWalkthrough(version: VoiceWalkthroughVersion): void; stepVoiceStateWalkthrough(): void; clearSimulation(): void; private _stopWalkTimer; dispose(): void; }