Skip to content

Make editor.aiStats.enabled respect chat.disableAIFeatures flag#291366

Merged
hediet merged 2 commits intomainfrom
copilot/add-ai-stats-flag-support
Jan 28, 2026
Merged

Make editor.aiStats.enabled respect chat.disableAIFeatures flag#291366
hediet merged 2 commits intomainfrom
copilot/add-ai-stats-flag-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 28, 2026

The experimental editor.aiStats.enabled setting was not respecting chat.disableAIFeatures, allowing AI statistics to display even when AI features were globally disabled.

Changes

  • Added chat.disableAIFeatures configuration check to EditTelemetryContribution
  • AI stats feature now activates only when both conditions are met:
    • editor.aiStats.enabled is true
    • chat.disableAIFeatures is false

Implementation uses observableConfigValue for reactive configuration tracking, consistent with the existing editSourceTrackingEnabled pattern in the same file.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature Request] editor.aiStats.enabled should respect the chat.disableAIFeatures flag</issue_title>
<issue_description>When the chat.disableAIFeatures is set to true the editor.aiStats.enabled should automatically be ignored/overridden to false since AI-related features are disabled.

Marking this as a feature request since the editor.aiStats.enabled is currently experimental and thus undergoing active development.

Observed on the following version of VSCode:

Version: 1.109.0-insider
Commit: e7a06c8eabf2915e2c383b1ce6d2b993d90e2e92
Date: 2026-01-27T07:16:53.085Z
Electron: 39.3.0
ElectronBuildId: 13168319
Chromium: 142.0.7444.265
Node.js: 22.21.1
V8: 14.2.231.22-electron.0
OS: Linux x64 6.18.6-arch1-1
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: hediet <2931520+hediet@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for chat.disableAIFeatures flag in aiStats Make editor.aiStats.enabled respect chat.disableAIFeatures flag Jan 28, 2026
Copilot AI requested a review from hediet January 28, 2026 18:56
@hediet hediet marked this pull request as ready for review January 28, 2026 19:06
Copilot AI review requested due to automatic review settings January 28, 2026 19:06
@hediet hediet enabled auto-merge (rebase) January 28, 2026 19:07
@vs-code-engineering vs-code-engineering Bot added this to the January 2026 milestone Jan 28, 2026
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

Fixes an issue where the experimental editor.aiStats.enabled feature could still activate even when AI features were globally disabled via chat.disableAIFeatures.

Changes:

  • Added a reactive configuration dependency on chat.disableAIFeatures to the AI stats enablement logic.
  • Updated EditTelemetryContribution so AI stats activate only when editor.aiStats.enabled === true and chat.disableAIFeatures === false.

@hediet hediet merged commit 7ee6a1d into main Jan 28, 2026
27 of 28 checks passed
@hediet hediet deleted the copilot/add-ai-stats-flag-support branch January 28, 2026 19:30
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Mar 14, 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.

[Feature Request] editor.aiStats.enabled should respect the chat.disableAIFeatures flag

5 participants