Add inline badge to customization list items for context instructions#303598
Merged
joshspicer merged 6 commits intomainfrom Mar 20, 2026
Merged
Add inline badge to customization list items for context instructions#303598joshspicer merged 6 commits intomainfrom
joshspicer merged 6 commits intomainfrom
Conversation
Instructions with applyTo patterns now show context info (e.g. 'always added', 'context matching *.ts') as an inline badge next to the item name instead of baking it into the display name string. The badge uses the same visual style as the MCP 'Bridged' badge. The badge field is generic on IAICustomizationListItem so other customization types can use it in the future. Badge text is also included in search filtering. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Badge now shows just the applyTo pattern (e.g. '**/*.ts') or 'always added', instead of 'context matching ...'. Hovering the badge shows a tooltip explaining the behavior. Added badgeTooltip field to IAICustomizationListItem for generic reuse. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the AI Customization management list UI by replacing context-instruction metadata appended to display names with a dedicated inline badge (visually aligned with the existing MCP “Bridged” badge), and updates filtering/docs accordingly.
Changes:
- Add optional
badge/badgeTooltipsupport toIAICustomizationListItemand render the badge inline next to the item name (with managed hover tooltip). - Update context-instruction items to use the badge for
applyToinformation instead of baking it intodisplayName. - Extend search filtering to match against badge text and document the badge behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css | Adds layout container for name+badge and introduces .item-badge styling aligned with MCP badge visuals. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts | Adds badge fields to list items, renders badge+tooltip, updates context-instruction item construction, and includes badge text in filtering. |
| src/vs/sessions/AI_CUSTOMIZATIONS.md | Documents the new list item badge concept and intended usage. |
src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Extract shared .inline-badge class used by both MCP bridged badge and item badges to avoid style drift. - Add min-width: 0 and flex: 1 1 auto to .item-name so long names truncate correctly inside the flex row. - Update AI_CUSTOMIZATIONS.md to reflect that badges show the raw applyTo pattern with tooltip explanation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mjbvz
approved these changes
Mar 20, 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
Instructions with
applyTopatterns previously baked context info into the display name string (e.g."Name - context matching '*.ts'"). This PR replaces that with a visual inline badge — the same style used for the MCP "Bridged" badge — making it cleaner and more scannable.Changes
Generic badge support on
IAICustomizationListItem:badge?: string— small inline tag rendered next to the item namebadgeTooltip?: string— hover tooltip explaining the badge.item-nameis now wrapped in a.item-name-rowflex container with a.item-badgesiblingInstructions usage:
applyTo: '**'→ badge shows "always added", tooltip: "This instruction is automatically included in every interaction."applyTo: 'src/auth/**'→ badge showssrc/auth/**, tooltip: "This instruction is automatically included when files matching 'src/auth/**' are in context."CSS:
.item-badgematches the existing.mcp-bridged-badgevisual style (small rounded tag,descriptionForegroundcolor,toolbar-hoverBackgroundbackground).Spec: Updated
AI_CUSTOMIZATIONS.mdwith "Item Badges" section.Testing