Skip to content

fix #310143 - #310840

Merged
Sandeep Somavarapu (sandy081) merged 1 commit into
mainfrom
sandy081/tense-cephalopod
Apr 16, 2026
Merged

Sandeep Somavarapu (sandy081) merged 1 commit into
mainfrom
sandy081/tense-cephalopod

Conversation

@sandy081

Copy link
Copy Markdown
Member

No description provided.

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

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 88fc2710 Current: 44632907

Changed (2)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after

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

Adjusts how enabling/disabling built-in AI features (Copilot/chat) is coordinated between extension enablement state and the chat.disableAIFeatures setting, particularly for workspace-vs-global behavior.

Changes:

  • Refines enablement-UI logic for “Enable AI Features” actions in the Extensions view using IConfigurationService.inspect(...) and ConfigurationTarget.
  • Updates chat teardown/extension-change handling to avoid unintentionally flipping global settings when workspace enablement changes.
  • Adds configuration-change listeners so action enablement updates when chat.disableAIFeatures changes.
Show a summary per file
File Description
src/vs/workbench/contrib/extensions/browser/extensionsActions.ts Updates “Enable AI Features” actions to consult inspected config values and selectively write workspace overrides.
src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.ts Adjusts teardown extension-change behavior to write workspace vs global config depending on workspace enablement state.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/extensions/browser/extensionsActions.ts:1897

  • EnableAIFeaturesInWorkspaceAction.run() only clears chat.disableAIFeatures when workspaceValue === true. If AI is disabled via user/global settings (inspect.value === true with workspaceValue undefined), enabling the extension for the workspace won’t actually re-enable AI features because the effective setting remains true. Consider updating the workspace setting to false whenever the effective value is true (or whenever workspaceValue !== false) so the workspace enable action reliably overrides a global disable.
		await this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.EnabledWorkspace);
		if (this.configurationService.inspect(CHAT_AI_DISABLED_SETTING).workspaceValue === true) {
			await this.configurationService.updateValue(CHAT_AI_DISABLED_SETTING, false, ConfigurationTarget.WORKSPACE);
		}
  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment on lines +1875 to +1887
const inspect = this.configurationService.inspect(CHAT_AI_DISABLED_SETTING);
if (inspect.value === false) {
return;
}
if (inspect?.workspaceValue === true) {
this.enabled = true;
return;
}
if (this.extension.enablementState === EnablementState.EnabledWorkspace) {
return;
}
this.enabled = true;
return;

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

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

EnableAIFeaturesInWorkspaceAction.update() is now gated on inspect.value !== false, which means the action won’t be available when the chat extension is disabled for the workspace but the chat.disableAIFeatures setting is still false (e.g. after using “Disable AI Features (Workspace)”, which only changes extension enablement). This can leave users without a way to re-enable AI features from the extensions UI. Consider also enabling this action when this.extension.enablementState === EnablementState.DisabledWorkspace (or switching the disable/enable pair to consistently toggle the setting rather than only enablement).

This issue also appears on line 1894 of the same file.

Copilot uses AI. Check for mistakes.
Comment on lines +762 to +768
if (defaultChatExtension.enablementState === EnablementState.EnabledWorkspace) {
if (this.configurationService.inspect(ChatConfiguration.AIDisabled).workspaceValue === true) {
this.configurationService.updateValue(ChatConfiguration.AIDisabled, false, ConfigurationTarget.WORKSPACE);
}
} else {
this.configurationService.updateValue(ChatConfiguration.AIDisabled, false);
}

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

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

In ChatTeardownContribution’s extension-change handler, when the chat extension ends up EnabledWorkspace you only clear chat.disableAIFeatures if workspaceValue === true. If AI was disabled globally (so value === true with no workspace override) and the user enables the extension in this workspace, the effective setting stays true and AI features remain disabled. Consider setting chat.disableAIFeatures to false at ConfigurationTarget.WORKSPACE whenever the extension is EnabledWorkspace and the effective config value is true, so workspace-enablement reliably overrides a global disable without flipping the global setting.

Copilot uses AI. Check for mistakes.
@sandy081
Sandeep Somavarapu (sandy081) merged commit 17c5eed into main Apr 16, 2026
30 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the sandy081/tense-cephalopod branch April 16, 2026 20:42
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 16, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators May 31, 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