plugins: deduplicate canonical command ID when skill name matches plugin name#312196
Merged
connor4312 merged 1 commit intomainfrom Apr 23, 2026
Merged
plugins: deduplicate canonical command ID when skill name matches plugin name#312196connor4312 merged 1 commit intomainfrom
connor4312 merged 1 commit intomainfrom
Conversation
…gin name When a plugin's skill name matches the plugin name, the canonical command ID was producing a redundant format like `plugin-name:plugin-name`. This change collapses that to just `plugin-name` so users can invoke `/plugin-name` instead of `/plugin-name:plugin-name`. - Adds a check in getCanonicalPluginCommandId to return just the prefix when it equals the normalized command name (Commit message generated by Copilot)
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts plugin-provided slash command naming so that when a plugin resource’s name matches the plugin name, the canonical command ID no longer becomes redundant (plugin:plugin), enabling invocation via /plugin.
Changes:
- Add a special-case in
getCanonicalPluginCommandIdto returnprefixwhenprefix === normalizedCommand. - Keep existing behavior when the command is already explicitly prefixed (
prefix:*).
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/plugins/agentPluginService.ts | Updates canonical plugin command ID generation to avoid redundant prefix:prefix names. |
Copilot's findings
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/chat/common/plugins/agentPluginService.ts:76
- This changes the canonical slash command ID for root plugin resources from
prefix:prefixto justprefix, which breaks any existing invocations/configuration that still use the oldprefix:prefixform (there’s no normalization/aliasing in resolvePromptSlashCommand; it does an exact name match). Consider keepingprefix:prefixas a supported alias (or normalizing user input) so both forms continue to resolve, and so users can still disambiguate if another prompt/skill namedprefixexists.
if (prefix === normalizedCommand) {
return prefix;
}
return `${prefix}:${normalizedCommand}`;
- Files reviewed: 1/1 changed files
- Comments generated: 2
rzhao271
approved these changes
Apr 23, 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.
plugins: deduplicate canonical command ID when skill name matches plugin name
When a plugin's skill name matches the plugin name, the canonical command
ID was producing a redundant format like
plugin-name:plugin-name. Thischange collapses that to just
plugin-nameso users can invoke/plugin-nameinstead of/plugin-name:plugin-name.when it equals the normalized command name
(Commit message generated by Copilot)