[PR #6531] fix: display MCP tag for prompts in autocomplete but not in prompt #11960

Closed
opened 2026-02-16 18:16:54 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6531

State: closed
Merged: Yes


A last-minute change from @rekram1-node in #5767 was to add an (MCP) tag to the name of the prompt if it was an MCP one. Quite a nice addition to be fair. However, that broke the functionality because now the prompt has a space, meaning the (MCP) part is considered an argument by the parser and the name is not matched.

This PR fixes it by adding an mcp property to the Command object so that we can still display the (MCP) tag but then when it's added to the prompt only the uninterrupted name is there which mean the substitution will work fine.

One possible change could be to have a general tag property instead of the specific mcp one so that if we want to add more tags in the future we can for example display /my-command (CUSTOMTAG)...but it might be surperflous.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6531 **State:** closed **Merged:** Yes --- A last-minute change from @rekram1-node in #5767 was to add an `(MCP)` tag to the name of the prompt if it was an MCP one. Quite a nice addition to be fair. However, that broke the functionality because now the prompt has a space, meaning the `(MCP)` part is considered an argument by the parser and the name is not matched. This PR fixes it by adding an `mcp` property to the `Command` object so that we can still display the `(MCP)` tag but then when it's added to the prompt only the uninterrupted name is there which mean the substitution will work fine. One possible change could be to have a general `tag` property instead of the specific `mcp` one so that if we want to add more tags in the future we can for example display `/my-command (CUSTOMTAG)`...but it might be surperflous.
yindo added the pull-request label 2026-02-16 18:16:54 -05:00
yindo closed this issue 2026-02-16 18:16:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11960