speech: expose voice chat state changes to extensions#286726
Open
fabienbouchez wants to merge 3 commits intomicrosoft:mainfrom
Open
speech: expose voice chat state changes to extensions#286726fabienbouchez wants to merge 3 commits intomicrosoft:mainfrom
fabienbouchez wants to merge 3 commits intomicrosoft:mainfrom
Conversation
Add onDidChangeVoiceChatInProgress event to the speech API to allow extensions to react when voice chat sessions start or stop. This enables extensions to: - Automatically adjust system audio during voice chat - Disable interfering keyboard shortcuts - Show UI indicators for active voice input - Adapt behavior during voice interaction The implementation listens to the voiceChatInProgress context key and propagates changes to extensions via an Event<boolean>. Fixes: #<issue_number_if_any>
Author
|
@microsoft-github-policy-service agree |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes voice chat state changes to extensions by adding an onDidChangeVoiceChatInProgress event to the speech API. This enables extensions to react when voice chat sessions start or stop, allowing them to automatically adjust system audio, disable interfering shortcuts, show UI indicators, or adapt behavior during voice interaction.
Key Changes:
- Added
onDidChangeVoiceChatInProgressevent to the proposed speech API - Implemented event propagation from main thread to extension host via context key listener
- Exposed the event through the extension API with proper proposal guard
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vscode-dts/vscode.proposed.speech.d.ts | Adds API definition for onDidChangeVoiceChatInProgress event |
| src/vs/workbench/api/common/extHostSpeech.ts | Implements Emitter and event exposure in extension host |
| src/vs/workbench/api/common/extHost.protocol.ts | Adds protocol method for voice chat state change notifications |
| src/vs/workbench/api/common/extHost.api.impl.ts | Exposes event to extensions with proposal API guard |
| src/vs/workbench/api/browser/mainThreadSpeech.ts | Listens to context key changes and notifies extensions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add onDidChangeVoiceChatInProgress event to the speech API to allow extensions to react when voice chat sessions start or stop.
This enables extensions for example to :
The implementation listens to the voiceChatInProgress context key and propagates changes to extensions via an Event.