feat(tui): render user images inline - #27
Merged
Merged
Conversation
danielkov
force-pushed
the
feat/inline-transcript-images
branch
from
August 26, 2026 16:53
1ccbc18 to
13a2208
Compare
danielkov
enabled auto-merge (squash)
August 26, 2026 16:57
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.
Summary
Render user-attached images inline when the terminal supports Kitty, Sixel, or iTerm2 graphics, with a safe clickable-label fallback elsewhere. This also removes duplicated ACP v2 image labels, preserves attachment order, and fixes links nested inside bold or italic Markdown. Kit is bumped from 0.1.92 to 0.1.93.
Motivation
ACP v2 user-message echoes flattened the prompt text and image block into adjacent Markdown labels, while user messages rendered those labels as plain text. Separately, the inline Markdown parser treated emphasis as an opaque span, leaving nested links unparsed.
Impact
Supported terminals show a bounded, static first frame for user-attached images. Unsupported terminals, malformed or oversized images, and decode failures retain the clickable text fallback; assistant and tool media behavior is unchanged. Terminal capability detection is bounded to 150 ms, and image source and decode caches have explicit limits.
Technical details
Structured and bounded image handling
User transcript messages retain ordered image payload metadata instead of irreversibly flattening every content block. Payload admission, decoded dimensions, allocation, retained source bytes, and cache size are bounded, and decoding is lazy for visible images.
Transcript-aware terminal rendering
ratatui-imagesupplies Kitty, Sixel, and iTerm2 protocol rendering. Image rows participate in transcript layout, scrolling, resize invalidation, session resets, and safe link hit-testing.Composable inline Markdown
Emphasis bodies are parsed recursively, so links inside bold and italic text retain both their emphasis and link metadata. Code spans remain literal.
Demo
Screen.Recording.2026-08-26.at.17.56.13.mov