tui: image rendering — Kitty Graphics Protocol backend #12
Labels
No labels
area:agents
area:ai
area:config
area:dashboard
area:design
area:design-review
area:devtools
area:entities
area:gallery
area:generate
area:image
area:infra
area:meta
area:model-browser
area:navigation
area:presets
area:security
area:sessions
area:settings
area:sharing
area:test
area:ux
area:webhook
area:workdir
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/loom#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As a user running loom-tui inside a Kitty-compatible terminal, I want images (gallery thumbnails, model previews, generate preview) displayed inline at native resolution, so that the TUI looks as informative as the GTK app.
Acceptance criteria
ImageRenderer trait
loom_tui::image::ImageRenderertrait defined withrender(&self, image: &[u8], rect: Rect, frame: &mut Frame) -> RenderHandle,delete(&self, handle: RenderHandle),protocol_name(&self) -> &'static strRenderHandleis an opaque type carrying enough info to delete or replace a previously-rendered imageKitty protocol
a=T, chunked at 4096 bytes of base64 per chunk (m=1/m=0)f=32(RGBA) andf=100(PNG) payload formats; chooses PNG for files already PNG to skip redecodingU=1,C=1) so images move with ratatui reflowa=d,d=Abefore re-rendering a cell regionu32) keyed by hash of(path_or_bytes, width_cells, height_cells)to avoid redundant transmissions within a sessionmpscIntegration
KittyRendererstruct implementingImageRendererimagecrate used for decoding/scalingOut of scope
References