import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IAgentSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service"; import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service"; import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service"; import { IVoiceToolCall } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/voiceClient/voiceClientService"; import { IVoiceToolDispatchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.service"; /** * Callbacks that require access to the chat widget or view state. * Implemented by the ChatViewPane to bridge UI concerns. */ export interface IVoiceToolDispatchDelegate { /** Accept input text in the current chat widget. Returns false if no widget available. */ acceptInput(text: string): boolean; /** Get the resource URI of the currently active session. */ getCurrentSessionResource(): Promise; /** Switch the view to a different session by resource URI. */ switchToSession(resource: URI): void; /** Get the set of auto-approved session resource strings. */ getAutoApprovedSessions(): Set; /** Mark all current sessions as auto-approved. */ addAllAutoApprovedSessions(): void; /** Remove a session from auto-approved set. */ removeAutoApprovedSession(resource: string): void; /** Trigger an auto-approve check cycle. */ triggerAutoApproveCheck(): void; } export declare class VoiceToolDispatchService implements IVoiceToolDispatchService { private readonly agentSessionsService; private readonly chatService; private readonly toolsService; readonly _serviceBrand: undefined; private _delegate; constructor(agentSessionsService: IAgentSessionsService, chatService: IChatService, toolsService: ILanguageModelToolsService); setDelegate(delegate: IVoiceToolDispatchDelegate): void; /** Get the action label for a tool call name. */ static getActionLabel(name: string): string; private get _agentModeOptions(); dispatchToolCall(toolCall: IVoiceToolCall): Promise; private _gatherSessionInfo; /** * Resolve a coding_session_id (resource URI string) to an IAgentSession. * Falls back to the currently active session when id is missing/unknown. */ private _resolveSession; /** * Gather files touched + per-file insertions/deletions for a session. * Returns a JSON string keyed for the LLM follow-up to summarize. */ private _gatherSessionChanges; /** * Gather the last N user/assistant turns of a coding session — actual * conversation content, trimmed for spoken summarization. */ private _gatherSessionThread; /** Render a URI as a short relative-ish path for spoken summaries. */ private _formatPath; }