Open
feat: Respect chat.disableAIFeatures for "Context for AI" in test failures#793
chat.disableAIFeatures for "Context for AI" in test failures#793Conversation
Copilot
AI
changed the title
[WIP] Skip 'Context for AI' when chat.disableAIFeatures is enabled
Respect Jul 3, 2026
chat.disableAIFeatures for "Context for AI" in test failures
Skn0tt
approved these changes
Jul 3, 2026
chat.disableAIFeatures for "Context for AI" in test failureschat.disableAIFeatures for "Context for AI" in test failures
dgozman
approved these changes
Jul 3, 2026
|
|
||
| private _extractAIContext(result: reporterTypes.TestResult): string | undefined { | ||
| // Respect the global VS Code setting that disables all AI-related features. | ||
| if (this._vscode.workspace.getConfiguration('chat').get('disableAIFeatures')) |
Contributor
There was a problem hiding this comment.
Is there a more official way to get this? Or is this the way? If it is documented somewhere, let's link to that place.
Contributor
There was a problem hiding this comment.
Why are we adding a zip to the repo?
| expect(log).toContain(`- button "click me"`); | ||
| }); | ||
|
|
||
| test('should not provide page snapshot to copilot when chat.disableAIFeatures is enabled', async ({ activate }) => { |
Contributor
There was a problem hiding this comment.
Not the most meaningful test I've seen 😄
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.
Users in environments where AI tooling is disabled via VS Code's
chat.disableAIFeaturessetting still saw the "Context for AI" dropdown attached to failing test messages. This change makes the extension honor that setting.Changes
src/extension.ts:_extractAIContext()returns early whenchat.disableAIFeaturesis enabled, so no page snapshot context is attached and the "Context for AI" block is omitted from failure messages.tests/run-tests.spec.ts: Added coverage asserting the "Context for AI" block and page snapshot are absent when the setting is on.