Add nice rendering for some slash commands in transcripts#19
Open
TobyBackstrom wants to merge 1 commit into
Open
Add nice rendering for some slash commands in transcripts#19TobyBackstrom wants to merge 1 commit into
TobyBackstrom wants to merge 1 commit into
Conversation
- Detect slash command messages (<command-name>/context</command-name>)
and merge with their stdout output
- Convert ANSI terminal colors to HTML spans with proper colors
- Render as expandable <details> widget styled like other tools
- Skip slash commands from index timeline (they're meta, not prompts)
stevencjyu
pushed a commit
to stevencjyu/claude-code-transcripts
that referenced
this pull request
Jul 8, 2026
Slash-command invocations (<command-name>), their stdout (<local-command-stdout>), and '[Request interrupted by user]' markers were numbered as prompts in the index — a session with two /model switches gained four fake prompts. They are harness bookkeeping, not something the user typed, so exclude them from the index timeline (they remain on the transcript pages). Generalizes the existing 'Stop hook feedback:' skip. Refs simonw#19. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Amazing tool, thanks.
This is to handle output from some of the slash commands that use terminal ANSI markup, for example /context which I frequently use. Implementation by Claude.