sessions: Stop expanding skill/prompt slash commands#314289
Merged
joshspicer merged 3 commits intomainfrom May 5, 2026
Merged
Conversation
Skill and prompt slash commands (e.g., '/my-skill args') are now sent verbatim to agents instead of being expanded into verbose markdown references. This change is safe because Copilot CLI and Claude code natively understand slash commands, so no functionality is lost. Users' prompts are no longer unnecessarily modified. Fixes #313376
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Agents window (“sessions”) chat input pipeline to preserve user-entered prompt/skill slash commands (for example, /my-skill args) and forward them to the agent verbatim, instead of rewriting them into expanded markdown references.
Changes:
- Removed prompt/skill slash-command expansion logic from
SlashCommandHandler(including thePromptsTypedependency). - Simplified
NewChatInputWidget._send()to always send the original query text (after trimming), without conditional expansion. - Removed the now-unused
shouldExpandPromptSlashCommandwiring from the new chat view panes (and cleaned up related imports).
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/chat/browser/slashCommands.ts | Removes tryExpandPromptSlashCommand() and its PromptsType dependency; prompt/skill slash commands remain as completions/decorations only. |
| src/vs/sessions/contrib/chat/browser/newChatViewPane.ts | Drops shouldExpandPromptSlashCommand option plumbing and the unused ANY_AGENT_HOST_PROVIDER_RE import. |
| src/vs/sessions/contrib/chat/browser/newChatInSessionViewPane.ts | Drops shouldExpandPromptSlashCommand option plumbing and the unused ANY_AGENT_HOST_PROVIDER_RE import. |
| src/vs/sessions/contrib/chat/browser/newChatInput.ts | Removes expansion logic from _send() and removes the related option from the widget configuration shape. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 0
Contributor
Screenshot ChangesBase: Changed (8) |
justschen
approved these changes
May 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 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.
Skill and prompt slash commands (e.g., '/my-skill args') are now sent verbatim to agents instead of being expanded into verbose markdown references.
This change is safe because Copilot CLI and Claude code natively understand slash commands, so no functionality is lost. Users' prompts are no longer unnecessarily modified.
Changes
tryExpandPromptSlashCommand()method from slashCommands.ts_send()methodshouldExpandPromptSlashCommandoption from chat input configurationFixes #313376