import { ICodeEditor } from "../../../../../editor/browser/editorBrowser.js"; import { DisposableStore } from "../../../../../base/common/lifecycle.js"; import { Action2 } from "../../../../../platform/actions/common/actions.js"; import { ServicesAccessor } from "../../../../../platform/instantiation/common/instantiation.js"; import { IKeybindingService } from "../../../../../platform/keybinding/common/keybinding.service.js"; import { ILogService } from "../../../../../platform/log/common/log.service.js"; import { ChatSpeechToTextState } from "../speechToText/chatSpeechToTextService.js"; import { IChatSpeechToTextService } from "../speechToText/chatSpeechToTextService.service.js"; import { IDictationOnboardingService } from "../speechToText/dictationOnboarding.service.js"; import { startDictation } from "../speechToText/dictationSession.js"; export declare const ChatSpeechToTextConfigured: import("../../../../../platform/contextkey/common/contextkey.js").ContextKeyExpression | undefined; /** True while the selected dictation backend is preparing. */ export declare const ChatSpeechToTextPreparing: import("../../../../../platform/contextkey/common/contextkey.js").ContextKeyExpression; /** Services required to run the dictation shortcut, see {@link runDictationShortcut}. */ export interface IDictationShortcutContext { readonly speechService: IChatSpeechToTextService; readonly keybindingService: IKeybindingService; readonly logService: ILogService; /** * Supplied by chat inputs only. The first dictation started from one shows * its introduction alongside recording; editor and terminal dictation have * nowhere to dock the card. */ readonly onboardingService?: IDictationOnboardingService; } /** Resolves a toggle invocation against the current dictation lifecycle. */ export declare function getDictationShortcutOperation(dictating: boolean, state: ChatSpeechToTextState, preparingModel: boolean): "start" | "stop" | "cancel" | undefined; /** * Run the dictation shortcut for `editor`. Shared by the main chat input toggle * action and the Agents composer's Cmd/Ctrl+I command so both behave * identically: tapping toggles, holding is push-to-talk (release stops). * * `commandId` is the keybinding command being run; it is used to detect a held * shortcut via {@link IKeybindingService.enableKeybindingHoldMode}, which * returns `undefined` when not invoked through a held key (e.g. the toolbar mic * or the command palette), collapsing the behavior to a plain toggle. */ export declare function runDictationShortcut(context: IDictationShortcutContext, commandId: string, editor: ICodeEditor, startDictationFn?: typeof startDictation): Promise; export declare class ToggleChatSpeechToTextAction extends Action2 { static readonly ID = "workbench.action.chat.toggleSpeechToText"; constructor(); run(accessor: ServicesAccessor, ...args: unknown[]): Promise; } /** * Shown in place of the mic button while the on-device model downloads or loads. */ export declare class ChatSpeechToTextPreparingAction extends Action2 { static readonly ID = "workbench.action.chat.speechToTextPreparing"; constructor(); run(): Promise; } /** Shown in place of the mic button while cloud dictation connects. */ export declare class ChatSpeechToTextConnectingAction extends Action2 { static readonly ID = "workbench.action.chat.speechToTextConnecting"; constructor(); run(): Promise; } export declare function registerChatSpeechToTextActions(): DisposableStore;