Skip to content

Add active session context to voice requests - #331503

Merged
Megan Rogge (meganrogge) merged 4 commits into
mainfrom
meganrogge/voice-active-session-context
Aug 18, 2026
Merged

Megan Rogge (meganrogge) merged 4 commits into
mainfrom
meganrogge/voice-active-session-context

Conversation

@meganrogge

@meganrogge Megan Rogge (meganrogge) commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator

Adds has_active_session to each ptt_start request so the voice backend can route lightweight questions while coding work continues. The value reflects whether the currently focused or targeted Omni/chat-panel session is in progress; unrelated background sessions do not affect it. Dictation sends false.

Fixes #329490

Tests:

  • npm run typecheck-client
  • ./scripts/test.sh --grep "VoiceClientService|reports whether a coding session is in progress"

Refs #329490

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 8432c00e-1eae-4634-9dee-bd83a314708b
Copilot AI balanced review requested due to automatic review settings August 18, 2026 16:37
@meganrogge Megan Rogge (meganrogge) added this to the 1.135.0 milestone Aug 18, 2026
Refs #329490

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 8432c00e-1eae-4634-9dee-bd83a314708b

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds an explicit “active coding session” signal to ptt_start voice messages so the backend can route lightweight questions differently while an agent/chat session is still running.

Changes:

  • Extends sendPttStart to include has_active_session and updates socket payloads accordingly.
  • Computes “session in progress” at request time in VoiceSessionController and forwards it on PTT start.
  • Updates/extends tests to validate the new field and controller behavior.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/browser/voiceClient/voiceSessionController.test.ts Adds controller-level test coverage for hasActiveSession computed on each PTT start.
src/vs/workbench/contrib/chat/test/browser/voiceClient/voiceClientService.test.ts Updates service tests to assert has_active_session is present in outbound ptt_start.
src/vs/workbench/contrib/chat/common/voiceClient/voiceClientService.ts Updates the public IVoiceClientService.sendPttStart signature to require hasActiveSession.
src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.ts Computes whether a session is currently “in progress” and passes that into sendPttStart.
src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.ts Adds has_active_session to the serialized ptt_start WebSocket message.
src/vs/workbench/contrib/chat/browser/speechToText/chatSpeechToTextService.ts Ensures dictation PTT uses hasActiveSession: false.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 6/6 changed files
  • Comments generated: 4
  • Review effort level: Lite

Refs #329490

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 8432c00e-1eae-4634-9dee-bd83a314708b

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.

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@meganrogge
Megan Rogge (meganrogge) merged commit 580ac1c into main Aug 18, 2026
27 checks passed
@meganrogge
Megan Rogge (meganrogge) deleted the meganrogge/voice-active-session-context branch August 18, 2026 19:56
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Oct 2, 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.

Voice mode: distinguish direct answers and app actions from coding requests

3 participants