chatCustomizations: support grouping and badges for external provider items#305813
Merged
joshspicer merged 5 commits intomicrosoft:mainfrom Mar 27, 2026
Merged
chatCustomizations: support grouping and badges for external provider items#305813joshspicer merged 5 commits intomicrosoft:mainfrom
joshspicer merged 5 commits intomicrosoft:mainfrom
Conversation
…rt for external customization items
…ustomizationListWidget
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the Chat Customizations management UI to better support items coming from external customization providers (e.g., provider-backed harnesses) by enabling provider-defined grouping and inline badges, while also auto-inferring an item’s storage origin from its URI.
Changes:
- Extend
IExternalCustomizationItemwith optionalgroupKey,badge, andbadgeTooltip. - Add URI-based storage inference for provider items and pass through grouping/badge fields into list items.
- Update list filtering/grouping to support provider-defined
groupKeyheaders (falling back to storage-based grouping when no explicit groups are provided).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/common/customizationHarnessService.ts |
Extends the external provider item contract with grouping/badge metadata. |
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts |
Implements storage inference for provider items and updates grouping logic to render provider-defined groups and badges. |
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts
Outdated
Show resolved
Hide resolved
…s editor skill Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove duplicate sectionToIcon, reuse getSectionIcon instance method - Use Map for O(1) groupKey lookups instead of O(n²) includes/find - Check active project root in inferStorageFromUri for Sessions window - Set pluginUri on provider items and use it for storage inference - Remove redundant plugin check from inferStorageFromUri (handled by caller) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
joshspicer
added a commit
that referenced
this pull request
Mar 27, 2026
Move instruction enrichment from inline in fetchItemsFromProvider to a post-processing step (enrichProviderInstructionItems) called from fetchItemsForSection. This avoids touching fetchItemsFromProvider's mapping logic which #305813 also modifies. Restore the flat-list early return in filterItems (305813 replaces it with groupKey-based grouping). Drop our inferStorageFromUri in favor of the one 305813 adds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dmitrivMS
approved these changes
Mar 27, 2026
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
When the Chat Customizations editor displays items from an external provider (e.g., Copilot CLI), they were previously rendered as a flat, ungrouped list with no badge support. This PR adds:
Auto-detected storage-based grouping — Provider items are now automatically grouped into Workspace/User/Plugin categories by inferring storage from the item URI (checking workspace folders, user data prompts home, and plugin locations). No provider changes needed.
Explicit groupKey support — Providers can optionally set
groupKeyon items to create custom group headers (e.g., "Agent Instructions", "Included Based On Context", "Loaded On Demand" for instructions).Badge support — Providers can set
badgeandbadgeTooltipon items to display inline badges likeapplyToglob patterns (e.g.,src/vs/sessions/**).Changes
customizationHarnessService.tsIExternalCustomizationItemwith optionalgroupKey,badge,badgeTooltipfieldsaiCustomizationListWidget.tsinferStorageFromUri()— infersPromptsStoragefrom URI by checking workspace folders, user data home, and plugin locationssectionToIcon()— maps management sections to their corresponding icons for group headersfetchItemsFromProvider()to pass throughgroupKey/badge/badgeTooltipand auto-setstoragefilterItems()grouping logic:groupKey→ grouped by key with auto-built headersgroupKey→ fall through to standard storage-based grouping (Workspace/User/Plugin/Extension/Built-in)"