Skip to content

fix: guard against missing voiceWsUrl in voice client - #321138

Merged
Megan Rogge (meganrogge) merged 1 commit into
mainfrom
meganrogge/voice-ws-url-fix
Jun 12, 2026
Merged

Megan Rogge (meganrogge) merged 1 commit into
mainfrom
meganrogge/voice-ws-url-fix

Conversation

@meganrogge

Copy link
Copy Markdown
Collaborator

When voiceWsUrl is not set in product.json, the voice client would attempt new WebSocket('') which silently fails — pressing the mic button does nothing with no errors.

This adds a guard that logs an error and returns early when no URL is configured.

The proprietary product.json (Insiders/Stable) needs voiceWsUrl added to enable Voice Mode.

The voiceWsUrl should only be set in the proprietary product.json
(Insiders/Stable builds). When missing, log an error instead of
attempting to connect with an empty URL.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings June 12, 2026 12:58
@meganrogge Megan Rogge (meganrogge) added this to the 1.125.0 milestone Jun 12, 2026
@meganrogge
Megan Rogge (meganrogge) enabled auto-merge (squash) June 12, 2026 13:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR guards the Voice client’s WebSocket connection setup against an empty/missing backend URL, preventing attempts to instantiate new WebSocket('') when voiceWsUrl (product) or agents.voice.backendUrl (settings) is not configured.

Changes:

  • Add an early-return guard when the computed Voice WebSocket base URL is empty.
  • Log an error indicating where to configure the Voice backend URL.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.ts Adds a guard to avoid connecting with an empty WebSocket URL and logs a configuration error.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines +121 to +124
if (!baseUrl) {
this._logService.error('[voice] No voice WebSocket URL configured (set voiceWsUrl in product.json or agents.voice.backendUrl in settings)');
return;
}
@meganrogge
Megan Rogge (meganrogge) merged commit 658d6d3 into main Jun 12, 2026
26 checks passed
@meganrogge
Megan Rogge (meganrogge) deleted the meganrogge/voice-ws-url-fix branch June 12, 2026 13:27
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jul 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants