Add instructions to ensure that new ai features are gated by the right context key (#286603)

* Add instructions to ensure that new ai features are gated by the right context key

* Move instructions to chat-specific
This commit is contained in:
Rob Lourens
2026-01-10 10:12:35 -08:00
committed by GitHub
parent b22b0a9db4
commit 9d9e881649

View File

@@ -0,0 +1,9 @@
---
applyTo: '**/chat/**'
description: Chat feature area coding guidelines
---
## Adding chat/AI-related features
- When adding a new chat/AI feature like a new surface where chat or agents appear, a new AI command, etc, these features must not show up for users when they've disabled AI features. The best way to do this is to gate the feature on the context key `ChatContextKeys.enabled` via a when clause.
- When doing a code review for code that adds an AI feature, please ensure that the feature is properly gated.