import { Event } from "../../../../base/common/event.js"; import { Disposable, IDisposable } from "../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../base/common/observable.js"; import { URI } from "../../../../base/common/uri.js"; import { IAccessibilityService } from "../../../../platform/accessibility/common/accessibility.service.js"; import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js"; import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js"; import { IThemeService } from "../../../../platform/theme/common/themeService.service.js"; import { IChatWidgetService } from "../../../../workbench/contrib/chat/browser/chat.service.js"; import { IMicCaptureService } from "../../../../workbench/contrib/chat/browser/voiceClient/micCaptureService.service.js"; import { ITtsPlaybackService } from "../../../../workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.service.js"; import { IVoiceSessionController } from "../../../../workbench/contrib/chat/browser/voiceClient/voiceSessionController.service.js"; import { ILanguageModelChatMetadataAndIdentifier } from "../../../../workbench/contrib/chat/common/languageModels.js"; import { ISessionsService } from "../../../services/sessions/browser/sessionsService.service.js"; import { INewChatVoiceTargetService } from "./newChatVoice.service.js"; /** * Stable resource for targeting the new-session composer before a session exists. * This keeps dictation on the composer so it creates a configured session. */ export declare const NEW_CHAT_VOICE_SENTINEL: URI; /** New-session composer APIs used by voice mode. */ export interface INewChatVoiceComposer { /** Fires when the composer input gains focus. */ readonly onDidFocus: Event; /** * When true, this remains a voice target even with an active session. * Otherwise, it targets only before any session exists. */ readonly routesWhileSessionActive?: boolean; /** Append `text` and submit; resolves false if submission is refused or fails. */ sendQuery(text: string): Promise; /** Set `text` without submitting. */ prefillInput(text: string): void; /** Focus the composer input. */ focus(): void; /** Models currently offered by the composer. */ getVoiceModels(): readonly ILanguageModelChatMetadataAndIdentifier[]; /** Select a model by its exact frontend identifier. */ selectVoiceModel(identifier: string): boolean; } export declare class NewChatVoiceTargetService extends Disposable implements INewChatVoiceTargetService { private readonly sessionsService; private readonly chatWidgetService; readonly _serviceBrand: undefined; private readonly _composers; private readonly _activeComposer; readonly activeComposer: IObservable; private _voiceTransitionVersion; private _pendingVoiceTransition; /** Session resource of the last-focused chat widget (the last-focused input). */ private readonly _focusedSessionResource; readonly currentVoiceInputResource: IObservable; constructor(sessionsService: ISessionsService, chatWidgetService: IChatWidgetService); registerComposer(composer: INewChatVoiceComposer): IDisposable; setActive(composer: INewChatVoiceComposer): void; beginVoiceTransition(): IDisposable; consumeVoiceTransition(): boolean; } /** * Shows the Voice Mode transcript and glow on a composer's input while it owns * a Voice Mode session that targets its draft. */ export declare class NewChatVoiceInputDecorations extends Disposable { constructor(inputContainer: HTMLElement, isVisible: IObservable, ownsDraftVoiceSession: IObservable, voiceSessionController: IVoiceSessionController, ttsPlaybackService: ITtsPlaybackService, micCaptureService: IMicCaptureService, configurationService: IConfigurationService, keybindingService: IKeybindingService, themeService: IThemeService, accessibilityService: IAccessibilityService); }