Repository navigation
Support an icon for third-party host commands in the "/" menu #10143
Nyxlux-bot
started this conversation in
Ideas
Replies: 1 comment
|
Another real-world case: TheStreamCode/dsh-muse-code registers a host command |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What is the problem?
Third-party plugins can register a host command (for example
/taste) throughctx.commands.register({ name, description, input, handler }), and it appears in the/menu. But the menu row has no icon.@deepseek-ai/dsh-client-ui-commandsbuilds host rows withbuiltinRowFace(), which only knows the first-partyHOST_FACESmap:goal,plan,feedback,compact,permission,export.{ description: c.description }, so the glyph column is empty.icon, but registering a contribution with the same name fails withui-commands: contribution /<name> collides with a host command.ctx.commandUi.decorate(...)decoration can add a popup or action to a host command, but the row face is still the host face; decorations do not affect presentation.The result: plugin commands are visually inconsistent with first-party commands, and there is no supported way to give one an icon.
Proposed solution
Let a client plugin attach presentation to a host command by name, without claiming dispatch:
or extend the host descriptor with presentation metadata that the client resolves:
Preference: a client-side face registration, because the icon is a React component and cannot travel over the command wire. It should:
decoratedoes);definitionIdfaces take precedence, so a plugin cannot shadow built-in icons;label/descriptionoverrides for localization, with the catalog text as fallback;Alternatives considered
/nameand its input claim.HOST_FACES: not a plugin API.Additional context
I am building a local plugin,
@local/dsh-taste, that publishes interactive design canvases./tasteis a leading-input host command (it takes a brief) and works, but its row has an empty glyph. The client already has the icon component throughctx.commandUicontributions; the missing piece is a supported way to associate it with a host row without registering a colliding contribution.Happy to test a patch or provide a minimal plugin reproduction.
All reactions