Skip to content

feat(tui): render user images inline - #27

Merged
danielkov merged 1 commit into
mainfrom
feat/inline-transcript-images
Aug 26, 2026
Merged

feat(tui): render user images inline#27
danielkov merged 1 commit into
mainfrom
feat/inline-transcript-images

Conversation

@danielkov

@danielkov danielkov commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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-image supplies 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

@danielkov
danielkov force-pushed the feat/inline-transcript-images branch from 1ccbc18 to 13a2208 Compare August 26, 2026 16:53
@danielkov
danielkov enabled auto-merge (squash) August 26, 2026 16:57
@danielkov
danielkov merged commit 896920b into main Aug 26, 2026
2 checks passed
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