Skip to content

feat: add harness filtering layer to Chat Customizations#302606

Draft
joshspicer wants to merge 3 commits intomainfrom
copilot/puny-antelope
Draft

feat: add harness filtering layer to Chat Customizations#302606
joshspicer wants to merge 3 commits intomainfrom
copilot/puny-antelope

Conversation

@joshspicer
Copy link
Member

Summary

  • introduce a new ICustomizationHarnessService to separate harness visibility rules from prompt discovery
  • keep prompt discovery unchanged in IPromptsService; apply filtering in a dedicated layer used by the customization UI
  • delegate IAICustomizationWorkspaceService.getStorageSourceFilter to the harness service in both core and sessions
  • add a harness toggle bar above customization kinds in the management editor list surface
  • add sessions harness implementations for CLI and Claude root filtering

Validation

  • npm run compile-check-ts-native
  • npm run valid-layers-check
  • ./scripts/test.sh --grep "applyStorageSourceFilter|customizationCounts"

Copilot AI review requested due to automatic review settings March 17, 2026 23:34
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

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.getStorageSourceFilter to 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');
- 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
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.

2 participants