Skip to content

Commit 9d9e881

Browse files
authored
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
1 parent b22b0a9 commit 9d9e881

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
applyTo: '**/chat/**'
3+
description: Chat feature area coding guidelines
4+
---
5+
6+
## Adding chat/AI-related features
7+
8+
- 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.
9+
- When doing a code review for code that adds an AI feature, please ensure that the feature is properly gated.

0 commit comments

Comments
 (0)