Skip to content

feat: collapse slash command expansion in user messages - #338

Open
Kabochar wants to merge 1 commit into
agegr:mainfrom
Kabochar:feat/slash-command-display
Open

feat: collapse slash command expansion in user messages#338
Kabochar wants to merge 1 commit into
agegr:mainfrom
Kabochar:feat/slash-command-display

Conversation

@Kabochar

@Kabochar Kabochar commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Show a compact clickable command reference for slash-command messages (/skill:name and prompt templates) instead of the full SDK-expanded text. The user-supplied arguments stay fully visible; clicking the command name toggles the expanded skill/template body.

  • lib/slash-display.ts: pure helpers (command parsing, skill expansion reverse-matching, FIFO tracker) + 17 unit tests
  • rpc-manager.ts: inject originalText on message_end for user messages via a new message object (never mutates SDK-shared state), always consume one FIFO entry per message, clear the tracker on prompt failures
  • session-reader.ts: reverse-match skill expansions when loading session history
  • MessageView.tsx: render command name as accent-colored toggle with args shown verbatim; keep image blocks in both branches; add aria-expanded

Storage and model input stay unchanged: session JSONL keeps the expanded text and originalText is a display-only field.

Show a compact clickable command reference for slash-command messages
(/skill:name and prompt templates) instead of the full SDK-expanded
text. The user-supplied arguments stay fully visible; clicking the
command name toggles the expanded skill/template body.

- lib/slash-display.ts: pure helpers (command parsing, skill expansion
  reverse-matching, FIFO tracker) + 17 unit tests
- rpc-manager.ts: inject originalText on message_end for user messages
  via a new message object (never mutates SDK-shared state), always
  consume one FIFO entry per message, clear the tracker on prompt
  failures
- session-reader.ts: reverse-match skill expansions when loading
  session history
- MessageView.tsx: render command name as accent-colored toggle with
  args shown verbatim; keep image blocks in both branches; add
  aria-expanded

Storage and model input stay unchanged: session JSONL keeps the
expanded text and originalText is a display-only field.
@Kabochar
Kabochar force-pushed the feat/slash-command-display branch from 6e3c41b to be89a60 Compare August 1, 2026 07:16
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.

1 participant