Skip to content

sessions: suggest slash commands on new session page - #299098

Merged
joshspicer merged 3 commits into
mainfrom
copilot-worktree-2026-03-03T23-18-26
Mar 4, 2026
Merged

joshspicer merged 3 commits into
mainfrom
copilot-worktree-2026-03-03T23-18-26

Conversation

@joshspicer

Copy link
Copy Markdown
Contributor

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.

joshspicer and others added 2 commits March 3, 2026 16:16
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]>
Copilot AI review requested due to automatic review settings March 4, 2026 00:47
@vs-code-engineering vs-code-engineering Bot added this to the 1.111.0 milestone Mar 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 IAICustomizationWorkspaceService with getFilteredPromptSlashCommands(...) 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
joshspicer enabled auto-merge (squash) March 4, 2026 03:21
@joshspicer
joshspicer merged commit ea82cfa into main Mar 4, 2026
0 checks passed
@joshspicer
joshspicer deleted the copilot-worktree-2026-03-03T23-18-26 branch March 4, 2026 03:46
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Apr 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants