Description
When a slash command with parameters (e.g., /skill-name topic) is displayed in the web session viewer, only the command name is shown — the args/parameters are dropped.
Root Cause
In packages/web/src/lib/components/MessageItem.svelte (line ~296), the slash command rendering only displays commandData.name:
<span class="font-semibold text-gh-accent">{commandData.name || 'Command'}</span>
The commandData.args field (parsed from <command-args> XML tags) is available but never rendered.
Expected Behavior
/skill-name topic should display as: /skill-name topic
- Similar to how
CommandTitle.svelte renders commands with args in accent + secondary colors
Fix Suggestion
Add args display after the command name in the slash command block:
<span class="font-semibold text-gh-accent">{commandData.name || 'Command'}</span>
{#if commandData.args}
<span class="text-gh-text-secondary ml-1">{commandData.args}</span>
{/if}
Affected Files
packages/web/src/lib/components/MessageItem.svelte (line ~289-302)
Storybook
- Add/update Storybook story for
MessageItem covering slash command display with and without args
Related
CommandTitle.svelte already handles this correctly for session list display
parseCommandMessage() in packages/core/src/utils.ts correctly extracts args
Description
When a slash command with parameters (e.g.,
/skill-name topic) is displayed in the web session viewer, only the command name is shown — the args/parameters are dropped.Root Cause
In
packages/web/src/lib/components/MessageItem.svelte(line ~296), the slash command rendering only displayscommandData.name:The
commandData.argsfield (parsed from<command-args>XML tags) is available but never rendered.Expected Behavior
/skill-name topicshould display as:/skill-nametopicCommandTitle.svelterenders commands with args in accent + secondary colorsFix Suggestion
Add args display after the command name in the slash command block:
Affected Files
packages/web/src/lib/components/MessageItem.svelte(line ~289-302)Storybook
MessageItemcovering slash command display with and without argsRelated
CommandTitle.sveltealready handles this correctly for session list displayparseCommandMessage()inpackages/core/src/utils.tscorrectly extractsargs