Skip to content

sessions: convert built-in prompts to skills and add UI Integration badge#305347

Merged
joshspicer merged 4 commits intomainfrom
copilot/persistent-opossum
Mar 27, 2026
Merged

sessions: convert built-in prompts to skills and add UI Integration badge#305347
joshspicer merged 4 commits intomainfrom
copilot/persistent-opossum

Conversation

@joshspicer
Copy link
Member

Summary

This PR simplifies the sessions built-in customization architecture by consolidating two parallel discovery systems into one, and adds a "UI Integration" badge to help users understand when overriding a skill affects a UI surface.

What changed

1. Built-in prompts → skills

All 6 built-in prompt files have been converted from vs/sessions/prompts/*.prompt.md to vs/sessions/skills/{name}/SKILL.md with proper SKILL.md frontmatter (name, description). This eliminates the separate built-in prompt discovery system entirely — all built-in customizations are now skills.

Converted skills: act-on-feedback, create-draft-pr, create-pr, generate-run-commands, merge-changes, update-pr

2. Simplified AgenticPromptsService

  • Removed BUILTIN_PROMPTS_URI, _builtinPromptsCache, getBuiltinPromptFiles(), discoverBuiltinPrompts()
  • listPromptFiles() now early-returns for non-skill types instead of branching
  • listPromptFilesForStorage() collapsed to a single conditional
  • Removed unused getCleanPromptName import

3. "UI Integration" badge in customizations editor

  • Added getSkillUIIntegrations(): ReadonlyMap<string, string> to the IAICustomizationWorkspaceService interface
  • Sessions implementation provides mappings for skills with UI connections:
    • act-on-feedback → "Used by the Submit Feedback button in the Changes toolbar"
    • generate-run-commands → "Used by the Run button in the title bar"
  • Core VS Code implementation returns an empty map (no-op)
  • The list widget looks up skill names against this map and shows a badge + tooltip
  • Badge appears on both the built-in skill and any user/workspace override, so users know overriding affects a UI surface

Why

  • Simplicity: One discovery system instead of two. Skills already have richer metadata (name validation, description parsing, disableModelInvocation, userInvocable), so prompts were the weaker abstraction.
  • Discoverability: Users who override a built-in skill that drives a toolbar button should see that relationship in the customizations editor, not discover it by accident.

Testing

  • ✅ TypeScript compilation (tsgo): zero errors
  • ✅ Layering check: all 6 layer projects pass
  • ✅ Hygiene/pre-commit hook: passed

Copilot AI review requested due to automatic review settings March 26, 2026 22:43
@vs-code-engineering vs-code-engineering bot added this to the 1.114.0 milestone Mar 26, 2026
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

This PR consolidates Sessions “built-in customizations” so they’re discovered exclusively as skills (removing the parallel built-in prompt discovery path), and adds a “UI Integration” badge in the AI Customizations management UI to indicate skills that are invoked directly by UI surfaces.

Changes:

  • Convert Sessions bundled built-ins from .prompt.md files into skills/{name}/SKILL.md skills with frontmatter metadata.
  • Simplify AgenticPromptsService by removing built-in prompt discovery/caching and making built-ins apply only to skills.
  • Add IAICustomizationWorkspaceService.getSkillUIIntegrations() and use it in the customization list to show a “UI Integration” badge + tooltip.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.ts Adds getSkillUIIntegrations() to the workspace service interface.
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.ts Core VS Code implementation returns an empty map (no-op).
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts Uses getSkillUIIntegrations() to render a “UI Integration” badge for skills.
src/vs/sessions/contrib/chat/browser/promptsService.ts Removes built-in prompt discovery and makes built-ins apply only to skills.
src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.ts Sessions implementation provides UI-integration mappings for specific built-in skills.
src/vs/sessions/skills/act-on-feedback/SKILL.md Converted bundled customization to a skill with frontmatter + heading.
src/vs/sessions/skills/create-draft-pr/SKILL.md Converted bundled customization to a skill with frontmatter + heading.
src/vs/sessions/skills/create-pr/SKILL.md Converted bundled customization to a skill with frontmatter + heading.
src/vs/sessions/skills/generate-run-commands/SKILL.md Converted bundled customization to a skill with frontmatter + heading.
src/vs/sessions/skills/merge-changes/SKILL.md Converted bundled customization to a skill with frontmatter + heading.
src/vs/sessions/skills/update-pr/SKILL.md Converted bundled customization to a skill with frontmatter + heading.
src/vs/sessions/AI_CUSTOMIZATIONS.md Updates Sessions customization docs to reflect “built-in skills” + documents the new badge.
Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts:1182

  • Same issue for disabled skills: uiIntegrations.get(disabledName) uses file.name (frontmatter) when present. If the frontmatter name diverges from the folder name, the UI Integration badge can disappear for the disabled override even though the underlying skill id is still integrated in the UI. Prefer using the folder name (basename(dirname(file.uri))) for the integration lookup.
						const filename = basename(file.uri);
						const disabledName = file.name || basename(dirname(file.uri)) || filename;
						const uiTooltip = uiIntegrations.get(disabledName);
						items.push({

@joshspicer joshspicer marked this pull request as draft March 26, 2026 23:11
@joshspicer joshspicer force-pushed the copilot/persistent-opossum branch from 7e5091e to d20bfeb Compare March 26, 2026 23:35
joshspicer and others added 4 commits March 26, 2026 16:37
…adge

- Move all 6 built-in prompts from vs/sessions/prompts/ to
  vs/sessions/skills/{name}/SKILL.md with proper frontmatter
- Remove the built-in prompt discovery system (discoverBuiltinPrompts,
  getBuiltinPromptFiles, BUILTIN_PROMPTS_URI) from AgenticPromptsService
- Simplify listPromptFiles/listPromptFilesForStorage to only handle
  skills as the built-in type
- Add getSkillUIIntegrations() to IAICustomizationWorkspaceService
  interface, returning a map of skill names with UI surface connections
- Sessions implementation maps act-on-feedback (Submit Feedback button)
  and generate-run-commands (Run button) to tooltips
- Show 'UI Integration' badge in the customizations editor for skills
  that drive UI surfaces, including user overrides of those skills
- Update AI_CUSTOMIZATIONS.md to reflect the simplified architecture

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…back, shared empty map

- Use basename(dirname(skill.uri)) instead of skill.name for UI
  integration lookup so badge persists even if frontmatter name changes
- Return [] for BUILTIN_STORAGE on non-skill types instead of
  delegating to super (which would throw)
- Use a shared static empty map in the core VS Code implementation to
  avoid repeated allocations

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add create-pr, create-draft-pr, update-pr, merge-changes, and commit
to the skill UI integrations map. These are all triggered by buttons
in the Changes toolbar.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@joshspicer joshspicer force-pushed the copilot/persistent-opossum branch from d20bfeb to 9e1cd73 Compare March 26, 2026 23:37
@joshspicer joshspicer marked this pull request as ready for review March 26, 2026 23:41
@joshspicer joshspicer merged commit 201c439 into main Mar 27, 2026
18 checks passed
@joshspicer joshspicer deleted the copilot/persistent-opossum branch March 27, 2026 00:08
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.

3 participants