feat: add harness filtering layer to Chat Customizations#302606
Draft
joshspicer wants to merge 3 commits intomainfrom
Draft
feat: add harness filtering layer to Chat Customizations#302606joshspicer wants to merge 3 commits intomainfrom
joshspicer wants to merge 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a harness-aware filtering layer for Chat Customizations so the UI can scope visible customization artifacts (agents/skills/instructions/prompts/hooks) to the active execution environment (VS Code vs sessions harnesses like CLI/Claude), without changing prompt discovery in IPromptsService.
Changes:
- Introduces
ICustomizationHarnessService(+ harness descriptors) to centralize harness selection and per-type storage source filtering. - Updates both core and sessions
IAICustomizationWorkspaceService.getStorageSourceFilterto delegate filtering to the harness service. - Adds a harness toggle UI (pill buttons) above the customization list and implements sessions-specific harness filters (CLI + Claude).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/customizationHarnessService.ts | Defines the harness service contract, harness enum, and UI descriptor interface. |
| src/vs/workbench/contrib/chat/browser/chat.contribution.ts | Ensures the core harness service implementation is registered/loaded. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css | Styles the new harness toggle bar/pills in the customization management list. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.ts | Core/default harness service implementation (single “VS Code” harness showing all sources). |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.ts | Delegates storage source filtering to ICustomizationHarnessService. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts | Adds harness toggle UI and refreshes list when harness changes. |
| src/vs/sessions/contrib/chat/browser/customizationHarnessService.ts | Sessions override providing CLI + Claude harnesses and root-restricted filters. |
| src/vs/sessions/contrib/chat/browser/chat.contribution.ts | Registers the sessions harness service override. |
| src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.ts | Removes inline filter logic and delegates to the harness service. |
| src/vs/sessions/AI_CUSTOMIZATIONS.md | Documents the new harness service and sessions filtering behavior by harness/type. |
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+637
to
+638
| pill.setAttribute('role', 'tab'); | ||
| pill.setAttribute('aria-selected', harness.id === activeId ? 'true' : 'false'); |
86936cd to
cfd5271
Compare
- Move CustomizationHarnessServiceBase, harness descriptor factories, and user root helpers to common/customizationHarnessService.ts - Core and sessions implementations now extend the base class with just configuration (~130 lines each reduced to ~40) - Centralize ~/.copilot, ~/.claude, ~/.agents path knowledge - Parameterize storage source extras (extension vs builtin) - Add tablist accessibility: role=tablist, aria-label, roving tabIndex, arrow-key keyboard navigation, focus-visible outline - Use scoped DisposableStore for harness toggle pill listeners
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.
Summary
ICustomizationHarnessServiceto separate harness visibility rules from prompt discoveryIPromptsService; apply filtering in a dedicated layer used by the customization UIIAICustomizationWorkspaceService.getStorageSourceFilterto the harness service in both core and sessionsValidation
npm run compile-check-ts-nativenpm run valid-layers-check./scripts/test.sh --grep "applyStorageSourceFilter|customizationCounts"