Skip to content

release: images as pictures — transcript thumbnails and reliable drop conversion #59

Closed

Description

@santoshkumarradha

Product requirement

Pictures behave like pictures in two places they don't today:

  1. The person's own images render in the transcript. Today a sent image
    leaves only a dim marker — › what is wrong with this [image #1] [#1 chart.png] (chipMarkers, internal/tui3/attach.go:575). The comment
    there says "a terminal cell is not a place to show a picture" — but the
    surface already proves otherwise: tool rows draw real half-cell truecolor
    thumbnails (imagethumb.go) and expansions draw full pictures
    (imagepreview.go). The technique exists; the person's own messages just
    don't get it. A sent screenshot should appear as a small thumbnail in the
    transcript, same rungs and same degradation as tool rows (TrueColor →
    ANSI256 → marker only).

  2. A dropped image converts to [image #1], reliably. The paste
    substitution (imagepaste.go) handles backslash-escaped spaces, quoted
    paths, and file:// URLs — but the person still sees the raw path in the
    draft instead of the token. The likely hole: some terminals paste a
    dropped file's path with un-escaped spaces, so pastedWords splits it
    into five words, none of which resolves to an image, and the
    all-or-nothing substitution is skipped. The space handling was fixed once
    (escaped/quoted forms); the un-escaped form is the regression-shaped gap.

Fix direction for the drop

After the word-split fails to resolve, try the whole paste (and each
newline-separated line of it) as one path before giving up: if the entire
string resolves to an existing image file, it is a picture. This covers
un-escaped spaces without guessing, and it can't misfire — a sentence never
resolves to an existing file. Also verify the two other paths that leave the
path as text by design are not the ones firing: the slash-command guard
(input starting with /) and the size ceiling (maxAttachBytes).

Acceptance

  1. Dropping a screenshot into any of iTerm2, Ghostty, Terminal.app converts
    the paste to [image #1] on the tray — including paths pasted with raw
    un-escaped spaces.
  2. A sent image-bearing message shows a small thumbnail in the transcript
    (half-cell technique, same rungs as tool rows); below ANSI256 it degrades
    to today's marker, unchanged.
  3. Regression tests: one paste form per terminal convention (escaped,
    quoted, file://, raw spaces), and one transcript render at each palette
    rung.

Drafted with CodeAF · reviewed and owned by the author

Activity

  1. added
    feature
    on Aug 27, 2026
  2. added
    area:chat
    and removed on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:chatfeature

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions