disable copilot chat extension by default and adopt accordingly#308478
Merged
disable copilot chat extension by default and adopt accordingly#308478
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
@lszomoruMatched files:
|
joaomoreno
approved these changes
Apr 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates VS Code’s built-in Copilot Chat behavior to be disabled by default and adjusts UI/entitlement gating to align with that new default, including a one-time migration at startup.
Changes:
- Add a startup migration in
ExtensionEnablementServiceto disable the built-in chat extension until chat setup is completed (and optionally disable AI features when the chat extension is globally disabled). - Relax various UI
when/precondition clauses to no longer depend onchatSetupDisabled, generally gating only onchatSetupHiddenand setup completion. - Adjust chat entitlement “anonymous” determination logic to ignore the
disabledsentiment flag, and update tests to wire the new dependency.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/services/extensionManagement/test/browser/extensionEnablementService.test.ts | Wires TestChatEntitlementService into tests for the new enablement service dependency. |
| src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts | Introduces a one-time migration that toggles built-in chat enablement / chat.disableAIFeatures based on chat setup state. |
| src/vs/workbench/services/chat/common/chatEntitlementService.ts | Changes anonymous eligibility check to only exclude hidden sentiment (not disabled). |
| src/vs/workbench/contrib/scm/browser/scmInput.ts | Removes Setup.disabled gating for SCM “Generate Commit Message” setup action visibility. |
| src/vs/workbench/contrib/scm/browser/scm.contribution.ts | Removes Setup.disabled gating for SCM merge-conflict “Resolve Conflicts with AI” setup action visibility. |
| src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.ts | Drops Setup.disabled checks in setup-driven contributions and command preconditions. |
| src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.ts | Relaxes chat view visibility gating to no longer depend on Setup.disabled. |
| src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.ts | Removes Setup.disabled gating for a title bar menu item. |
| src/vs/workbench/contrib/chat/browser/actions/chatActions.ts | Removes Setup.disabled gating from some chat actions/menus. |
| src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts | Shows “Open Chat” watermark based on chatSetupHidden only (no longer checks disabled). |
Copilot's findings
Comments suppressed due to low confidence (2)
src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts:150
this._chatExtensionIdis typed asstring | undefined, but it is used as theidof anIExtensionIdentifier(_isDisabledGlobally/_disableExtension). IfproductService.defaultChatAgent?.chatExtensionIdis missing, this will passundefinedinto extension identifier logic and can cause runtime errors. Add a guard to skip the migration when_chatExtensionIdis undefined.
if (context.value.state.completed) {
if (this._isDisabledGlobally({ id: this._chatExtensionId })) {
if (this.configurationService.getValue('chat.disableAIFeatures') !== true) {
this.logService.debug('Disabling AI features because builtin chat extension is disabled');
src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts:161
_disableExtensionreturns a Promise, but it's called withoutawait/.then()and wrapped intry/catch. Synchronoustry/catchwill not catch async rejections here, so failures will be dropped (and potentially show up as unhandled promise rejections). Handle the returned Promise explicitly (e.g. attach.catch(...), or move this to an async init path you canawait).
try {
this.logService.debug('Disabling builtin chat extension as chat set up is not completed');
this._disableExtension({ id: this._chatExtensionId });
} catch (error) {
this.logService.error('Failed to disable builtin chat extension during enablement migration', error);
}
- Files reviewed: 10/10 changed files
- Comments generated: 4
This was referenced Apr 14, 2026
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.
No description provided.