Skip to content

chat - add a smoke test to check for AI disabling support#273940

Merged
bpasero merged 3 commits intomainfrom
ben/deep-chimpanzee
Oct 29, 2025
Merged

chat - add a smoke test to check for AI disabling support#273940
bpasero merged 3 commits intomainfrom
ben/deep-chimpanzee

Conversation

@bpasero
Copy link
Member

@bpasero bpasero commented Oct 29, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 29, 2025 12:13
@bpasero bpasero self-assigned this Oct 29, 2025
Copy link
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

This PR adds smoke tests for chat functionality, specifically testing the ability to disable AI features. The changes introduce a new chat test suite and supporting automation infrastructure.

  • Adds a new smoke test file chat.test.ts that tests disabling AI features via settings
  • Implements a new getCommandNames() method in the automation framework to retrieve command names from the command palette
  • Integrates the chat test suite into the main smoke test runner with appropriate conditions
  • Disables the vscode.vscode-api-tests extension during Electron smoke tests to prevent interference

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/smoke/src/main.ts Imports and sets up the new chat test suite, conditionally running it for non-web environments
test/smoke/src/areas/chat/chat.test.ts New test file verifying that AI features can be disabled via settings
test/automation/src/quickaccess.ts Adds getCommandNames() method to retrieve command names with retry logic for flaky test scenarios
test/automation/src/electron.ts Disables vscode.vscode-api-tests extension to prevent test interference
src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.ts Adds precondition to "View Chat Terminals" action to require chat to be enabled

continue;
}

if (command.indexOf('Chat') >= 0 || command.indexOf('Agent') >= 0 || command.indexOf('Copilot') >= 0) {
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

Use includes() instead of indexOf() for better readability and clarity. Replace command.indexOf('Chat') >= 0 with command.includes('Chat').

Suggested change
if (command.indexOf('Chat') >= 0 || command.indexOf('Agent') >= 0 || command.indexOf('Copilot') >= 0) {
if (command.includes('Chat') || command.includes('Agent') || command.includes('Copilot')) {

Copilot uses AI. Check for mistakes.
}

if (unexpectedFound.length > 0) {
throw new Error(`Unexpected AI related commands found after having disabled AI features: ${JSON.stringify(unexpectedFound, undefined, 0)}`);
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

The third argument to JSON.stringify() should be 2 or '\t' for readable indentation. Using 0 disables indentation, which may make error messages harder to read in logs. Consider using JSON.stringify(unexpectedFound, undefined, 2) for better formatting.

Suggested change
throw new Error(`Unexpected AI related commands found after having disabled AI features: ${JSON.stringify(unexpectedFound, undefined, 0)}`);
throw new Error(`Unexpected AI related commands found after having disabled AI features: ${JSON.stringify(unexpectedFound, undefined, 2)}`);

Copilot uses AI. Check for mistakes.
@bpasero bpasero marked this pull request as ready for review October 29, 2025 12:59
@bpasero bpasero enabled auto-merge (squash) October 29, 2025 12:59
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 29, 2025
@bpasero bpasero merged commit 6808f75 into main Oct 29, 2025
28 checks passed
@bpasero bpasero deleted the ben/deep-chimpanzee branch October 29, 2025 13:16
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 13, 2025
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