Repository navigation
sessions: suggest slash commands on new session page - #299098
Merged
Merged
Conversation
Add individual prompt/skill files as slash commands in the sessions window's new-chat input, matching what the customizations view shows. - Add getFilteredPromptSlashCommands() to IAICustomizationWorkspaceService - Core: passthrough to IPromptsService - Sessions: filters via applyStorageSourceFilter() per prompt type - Add second completion provider in SlashCommandHandler for dynamic prompt/skill slash commands alongside existing static ones - Update decorations to recognize and highlight dynamic prompt commands - Subscribe to onDidChangeSlashCommands for cache refresh - Fix regex in tryExecuteSlashCommand to support Unicode prompt names Co-authored-by: Copilot <[email protected]>
When a user types /my-prompt in the sessions new-chat input, expand it before sending to: 'Use the prompt file located at [name](uri).' so the CLI agent can locate and process the prompt file. - Add tryExpandPromptSlashCommand() to SlashCommandHandler - Call it in _send() before session.setQuery() to rewrite the query Co-authored-by: Copilot <[email protected]>
Justin Chen (justschen)
previously approved these changes
Mar 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds prompt/skill file-backed /slash command suggestions to the Agent Sessions “new session” chat input, and expands selected prompt commands into a markdown reference so the agent can locate the underlying file (aligned with what AI Customization surfaces).
Changes:
- Extend
IAICustomizationWorkspaceServicewithgetFilteredPromptSlashCommands(...)to expose prompt/skill commands consistent with customization visibility policy. - Add dynamic prompt/skill slash command completions + decoration support in the Sessions new-chat input, and expand prompt commands on send.
- Implement Sessions-specific filtering for prompt/skill slash commands based on storage source policy.
Reviewed changes
Copilot reviewed 5 out of 5 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 | Extends the workspace service contract to supply filtered prompt/skill slash commands. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.ts | Wires IPromptsService into the workbench implementation to provide prompt slash commands. |
| src/vs/sessions/contrib/chat/browser/slashCommands.ts | Adds prompt/skill file-backed slash command completions, decorations, caching, and prompt expansion support. |
| src/vs/sessions/contrib/chat/browser/newChatViewPane.ts | Expands prompt/skill slash commands into a file reference before sending the query. |
| src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.ts | Implements Sessions-window filtering of prompt/skill slash commands using storage source policy. |
joshspicer
enabled auto-merge (squash)
March 4, 2026 03:21
Co-authored-by: Copilot <[email protected]>
Osvaldo Ortega (osortega)
approved these changes
Mar 4, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds individual prompt/skill files as /slash commands in the sessions window's new-chat input, matching exactly what the customizations view shows. When selected, prompt slash commands are expanded into CLI-friendly markdown references so the agent can locate the file.