Skip to content

disable copilot chat extension by default and adopt accordingly#308478

Merged
sandy081 merged 1 commit intomainfrom
sandy081/social-fish
Apr 8, 2026
Merged

disable copilot chat extension by default and adopt accordingly#308478
sandy081 merged 1 commit intomainfrom
sandy081/social-fish

Conversation

@sandy081
Copy link
Copy Markdown
Member

@sandy081 sandy081 commented Apr 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 8, 2026 10:53
@sandy081 sandy081 enabled auto-merge (squash) April 8, 2026 10:53
@sandy081 sandy081 self-assigned this Apr 8, 2026
@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts

@lszomoru

Matched files:

  • src/vs/workbench/contrib/scm/browser/scm.contribution.ts
  • src/vs/workbench/contrib/scm/browser/scmInput.ts

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 ExtensionEnablementService to 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 on chatSetupDisabled, generally gating only on chatSetupHidden and setup completion.
  • Adjust chat entitlement “anonymous” determination logic to ignore the disabled sentiment 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._chatExtensionId is typed as string | undefined, but it is used as the id of an IExtensionIdentifier (_isDisabledGlobally / _disableExtension). If productService.defaultChatAgent?.chatExtensionId is missing, this will pass undefined into extension identifier logic and can cause runtime errors. Add a guard to skip the migration when _chatExtensionId is 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

  • _disableExtension returns a Promise, but it's called without await/.then() and wrapped in try/catch. Synchronous try/catch will 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 can await).
						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

Comment thread src/vs/workbench/services/chat/common/chatEntitlementService.ts
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatActions.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants