feat(ui): kitty graphics layer and terminal detection #66
Loading…
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?
Problem
Inline images (#60) need a terminal-graphics layer: detect kitty-protocol terminals and emit images as Unicode placeholders that scroll like text. Nothing user-visible changes in this ticket.
Acceptance criteria
internal/ui/termimg:Support{OK, Tmux bool; CellW, CellH int},Transmit(id, img, cols, rows, tmux) string,Place(...),Cells(id, cols, rows) []string,Delete(id, tmux) string, and anIDsLRU allocator over 16-255 that emits a delete when it reuses an ID. Exact-string tests.a=T,U=1,i=N,p=1,c=cols,r=rows; every placeholder cell carries row and column diacritics; the ID is a38;5;Nforeground.a=qquery is answered before DA1, 1s timeout. Inside tmux:allow-passthroughison/allandclient_termtypenames kitty or ghostty; sequences wrapped inansi.TmuxPassthrough. Colour profile at least ANSI256. Cell size fromCSI 16 t, default 8x16. We never change the user's tmux settings.Support.38;5;Nsurvive the cell-diff renderer.Plan
Decided by Opus (design summary on #60).
x/ansiv0.11.8 (already in the module graph) provideskitty.EncodeGraphics,kitty.Placeholder,kitty.Diacritic,ansi.TmuxPassthrough; it becomes a direct dependency, no new module. Opus prototyped the placeholder approach under Bubble Tea v2 + viewport scrolling: placeholders and diacritics survive the diff renderer; the image ID survives as38;5;Nunder TrueColor/ANSI256 but not ANSI16.Out of scope
Fetching (#65), markdown and details integration (later ticket), WezTerm (unverified).
Refs #60
🤖 merged: #70