Skip to content

Slash command args not displayed in message view #53

@DrumRobot

Description

@DrumRobot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions