Skip to content

plugins: deduplicate canonical command ID when skill name matches plugin name#312196

Merged
connor4312 merged 1 commit intomainfrom
connor4312/plugin-canonical-command-dedup
Apr 23, 2026
Merged

plugins: deduplicate canonical command ID when skill name matches plugin name#312196
connor4312 merged 1 commit intomainfrom
connor4312/plugin-canonical-command-dedup

Conversation

@connor4312
Copy link
Copy Markdown
Member

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. 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)

…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)
Copilot AI review requested due to automatic review settings April 23, 2026 18:33
@connor4312 connor4312 enabled auto-merge (squash) April 23, 2026 18:33
Copy link
Copy Markdown
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

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 getCanonicalPluginCommandId to return prefix when prefix === 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:prefix to just prefix, which breaks any existing invocations/configuration that still use the old prefix:prefix form (there’s no normalization/aliasing in resolvePromptSlashCommand; it does an exact name match). Consider keeping prefix:prefix as a supported alias (or normalizing user input) so both forms continue to resolve, and so users can still disambiguate if another prompt/skill named prefix exists.
	if (prefix === normalizedCommand) {
		return prefix;
	}

	return `${prefix}:${normalizedCommand}`;
  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread src/vs/workbench/contrib/chat/common/plugins/agentPluginService.ts
Comment thread src/vs/workbench/contrib/chat/common/plugins/agentPluginService.ts
@connor4312 connor4312 merged commit a46152f into main Apr 23, 2026
30 checks passed
@connor4312 connor4312 deleted the connor4312/plugin-canonical-command-dedup branch April 23, 2026 18:56
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 23, 2026
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