Skip to content

Feature: Inline image preview in TUI using Sixel protocol #24769

Closed as not planned

Description

@AntoineTOLLIN

Summary

The TUI should support inline image previews for image files generated or referenced during a session, independent of the LLM model in use.

Problem

When a tool (MCP, custom tool, etc.) generates or references a local image file, the TUI currently cannot display it. The model correctly saves the image to disk, but the user has to manually open the file externally to see it. This is a UI/preview concern, not a model capability concern.

For example, an MCP image generation tool saves a file like /tmp/generated_werewolf.png, but the TUI shows nothing — just a text path. The user must open the file separately.

Proposal

Implement inline image rendering in the TUI using the Sixel protocol, which is supported by many modern terminals:

  • Sixel — widely supported (librsvg/libsixel), works in xterm, mintty, rxvt-unicode, Windows Terminal, and many others. This is the most portable choice.

Optionally, also support:

  • Kitty graphics protocol — for Kitty and Ghostty users
  • iTerm2 inline images — for iTerm2 and WezTerm users

The TUI should:

  1. Detect the terminal's image protocol support at startup
  2. When a tool result references a local image file (.png, .jpg, .webp, etc.), automatically render an inline preview
  3. Allow clicking on the preview to open the image in the system viewer
  4. Fall back gracefully (show file path) if the terminal does not support any image protocol

This would make image-related workflows (design review, diffing mockups, previewing generated assets, etc.) much more seamless without requiring any model changes.

Why Sixel

Sixel is the most widely supported image protocol across terminal emulators. Unlike Kitty protocol (Kitty/Ghostty only) or iTerm2 (iTerm2/WezTerm only), Sixel works across a broad range of terminals and is the closest thing to a universal standard for terminal graphics.

Activity

  1. added
    core
    on Apr 28, 2026
  2. added
    needs:compliance
    on Apr 28, 2026
  3. github-actions commented on Apr 28, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The title must start with [FEATURE]: (e.g. [FEATURE]: Inline image preview in TUI using Sixel protocol)
    • The feature request template requires checking the verification checkbox: "I have verified this feature I'm about to request hasn't been suggested before."

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.

    If you believe this was flagged incorrectly, please let a maintainer know.

  4. github-actions commented on Apr 28, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

  5. removed
    needs:compliance
    on Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

core

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions