Repository navigation
fix(vscode): disable voice input in remote windows - #14221
Conversation
Microphone capture runs in the extension host, and for Remote-SSH, WSL, dev containers, and tunnels that host is the remote machine. Such a machine normally has no capture device, so starting a recording failed with "Could not start microphone recording". Detect the window kind from vscode.env.remoteName and report a speechToText capability to the webview. When it is false, hide the microphone button, skip prewarming, and disable the speech shortcut in the prompt input, the Agent Manager new worktree dialog, and the diff viewer review annotations. The Speech to Text settings row explains that a local window is needed. Fixes #14197
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (36 files)
All four webview speech entry points (prompt input, Agent Manager new worktree dialog, diff/review annotations, prewarm) consume the new Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
What Problem This Solves
Voice input fails in remote VS Code windows (Remote-SSH, WSL, dev containers, tunnels). The reporter connected VS Code on Windows to a remote server, started voice input, and got
Could not start microphone recording. Kilo was trying to open a microphone on the remote machine, not on the user's machine.Closes #14197
Why This Change Was Made
Recording runs in the extension host.
capture.tsspawnsosascript/AVFoundation, FFmpeg, orpw-recordin that host, and in a remote window the host is the remote machine, which normally has no capture device. Microphone selection cannot fix this, because enumeration only sees devices on the remote machine and the user's microphone is on the local client.The real fix is capturing in the webview with
getUserMediaandMediaRecorder, so the browser process on the local client owns the microphone. That is a larger change. This PR is the stopgap: detect the window kind and turn the feature off instead of letting every remote user hit a broken recording attempt.User Impact
KILO_FFMPEG_AUDIO_DEVICE.Evidence
speechToTextcapability computed fromvscode.env.remoteNameinsrc/features.ts, passed intocanUseSpeechToTextat every webview gate.bun run compile(host typecheck, webview typecheck, lint, bundle) passes.configFeatures({}, false, true),canUseSpeechToText(..., false), and the prewarm effect gate).Follow-Up
Move capture into the webview with
getUserMedia+MediaRecorder, then re-enable voice input in remote windows.