Skip to content

show warning when subagents are used but not enabled#290746

Merged
aeschli merged 3 commits intomainfrom
aeschli/expected-pony-537
Mar 24, 2026
Merged

show warning when subagents are used but not enabled#290746
aeschli merged 3 commits intomainfrom
aeschli/expected-pony-537

Conversation

@aeschli
Copy link
Contributor

@aeschli aeschli commented Jan 27, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 27, 2026 10:17
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 27, 2026
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 configuration-aware validation for custom agent subagent usage and extends tests to cover the new behavior.

Changes:

  • Injects IConfigurationService into PromptValidator and adds checks so infer and agents headers emit warnings when they configure subagent behavior but chat.customAgentInSubagent.enabled is disabled.
  • Introduces an isCustomAgentInSubagentEnabled helper and uses it in validateInfer and validateAgentsAttribute.
  • Updates and adds tests in promptValidator.test.ts to assert both the new warning behavior and the config preconditions required for existing infer and agents validations.

Reviewed changes

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

File Description
src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.ts Uses IConfigurationService to gate infer and agents validations on ChatConfiguration.SubagentToolCustomAgents, emitting localized warnings when subagent-related settings are present but the feature flag is off.
src/vs/workbench/contrib/chat/test/browser/promptSyntax/languageProviders/promptValidator.test.ts Aligns the test setup with a shared TestConfigurationService instance and adds targeted tests verifying the new warning behavior and that other combinations remain valid/non-warning as intended.

lszomoru
lszomoru previously approved these changes Jan 27, 2026
@aeschli aeschli merged commit b7d981c into main Mar 24, 2026
29 of 30 checks passed
@aeschli aeschli deleted the aeschli/expected-pony-537 branch March 24, 2026 15:24
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.

5 participants