Skip to content

Test: Kitty Graphics Protocol in VS Code Terminal #297073

Closed

Description

Refs: #286141

Complexity: 5

Create Issue


Thanks in advance for testing.

Background Information

👋 You will get to render fancy images in the terminal today :)
Context: Kitty graphics protocol is defined: https://sw.kovidgoyal.net/kitty/graphics-protocol/

Discussion/Chart tracker of the current state of KGP implementation ---> xtermjs/xterm.js#5683

Long story short, Kitty graphics protocol (herby defined KGP), allows us to render "fancy" or "high fidelity" images in the terminal.

To test images show up in the terminal using KGP, you may use clients such as "kitten icat", but "kitten icat" specifically is not supported in Windows.

For the ease of testing, I've made image-kitty command in VT Cli tool --> https://github.com/xtermjs/vtc

  • Please use bun run <ABSOLUTE_PATH_TO_YOUR_VT_CLI_src/index.ts> image-kitty --help to get guidance on how to use cli command to test sending images to the terminal.

Copilot also does a fantastic job guiding you which commands are useful to test, if you locally clone https://github.com/xtermjs/vtc and feed it as context to chat/agent.

Requirements

  • Please install bun if you have not already. You need this to run image-kitty command defined above.
  • Latest version of VS Code Insiders.
  • Enable terminal.integrated.enableImages
  • Make sure terminal.integrated.gpuAcceleration is on or auto
  • Windows) Please turn ON terminal.integrated.windowsUseConptyDll to true.
  • Clone https://github.com/xtermjs/vtc you will need path of this to use bun run ... index.ts ... image-kitty command defined above.
  • Try to get a quick summary/understanding of https://sw.kovidgoyal.net/kitty/graphics-protocol/

Testing

Steps to Test:

  1. Please make sure you read the context & requirement above.
  2. Open a new terminal inside VS Code, start testing different commands using image-kitty command.
  3. Have couple of images of different size (PNG, RGB, RGBA) of your choice locally so you can provide a path to them using image-kitty command.
  4. As you may have noticed in the xterm.js discussion link Kitty Graphics Protocol Discussion xtermjs/xterm.js#5683 not all specs have been implemented 100% (we dont support animiations, relative placements, for example).
  5. Use Copilot, KGP official doc, discussion page to freely test different components of Kitty graphics protocol.
  6. If you notice anything weird, or unexpected in the VS Code terminal, feel free to compare the behavior (using same command) against Ghostty, or Kitty terminal.

In case you are super lost, here are few commands to get started.
(Of course, please change the PATH to be appropriate for your system)

# Display built-in demo image (no file needed)
bun run src/index.ts image-kitty --demo

# Basic: display an image as PNG (simplest)
bun run src/index.ts image-kitty ~/Desktop/lotte.png

# Display with a specific size (10 columns wide, 5 rows tall)
bun run src/index.ts image-kitty ~/Desktop/colorAllTheWay.png --columns 10 --rows 5

# Transmit ONLY (You can have image displayed later)
bun run src/index.ts image-kitty ~/Desktop/lotte.png --action transmit --imageId 1

# If you ran above (transmit only, you can place it with same ID
bun run src/index.ts image-kitty --action place --imageId 1

# Crop: display only a 100x100 region starting at pixel (50, 50)
bun run src/index.ts image-kitty ~/Desktop/lotte.png --srcX 50 --srcY 50 --srcWidth 100 --srcHeight 100

You will see images in the terminal like:

Image

Thank you, and have fun!

Activity

  1. federicobrancasi commented on Feb 24, 2026

    @federicobrancasi
    Member

    I can reproduce what looks like a cursor positioning issue after rendering an image with Kitty Graphics Protocol in the VS Code integrated terminal (unless I’m missing something in expected behavior).

    Expected
    Typing/input starts at the prompt line below the rendered image (PS ...>), consistently.

    Actual
    Typing sometimes starts near the top-right area beside the image (above the prompt line), so cursor position appears incorrect after image render.

    I attached a video showing the behavior.

    Please let me know if I’m missing something, but I’d expect new input to start from the next prompt line below the rendered image, not from a position beside/above it, right?

    vtc.test.mp4
  2. federicobrancasi commented on Feb 24, 2026

    @federicobrancasi
    Member

    Also, I forgot to tell you, I ran it on Windows cause I still don't have the Mac (it will arrive in a couple of weeks), but maybe I can test it on my personal at home.

  3. TylerLeonhardt commented on Feb 24, 2026

    @TylerLeonhardt
    Member

    Federico Brancasi (@federicobrancasi) you'll want to open that as an issue using the friendly "Create Issue" link in the issue which will reference this issue automatically.

    Also, when you are done testing, check your name off and remove yourself as assigned.

    Since you ended up taking Windows instead of macOS, I'll remove Dmitriy Vasyura (@dmitrivMS)'s assignment to windows and add you and then we'll get someone else to do macOS.

    Don't be afraid to reach out to your buddy, #dev-discuss or myself if you have any questions!

  4. Yoyokrazy commented on Feb 25, 2026

    @Yoyokrazy
    Collaborator

    macOS Test Results

    Tested on macOS with VS Code Insiders (latest as of 2026-02-24), terminal.integrated.enableImages: true, terminal.integrated.gpuAcceleration: "auto".

    Used vtc CLI tool with two test images: a 48K RGBA PNG (transparency) and a 293B solid blue PNG.

    # Test Result Notes
    1 --demo (built-in image) ✅ Pass Renders correctly
    2 RGBA PNG display ✅ Pass Transparency renders correctly
    3 Sized display (--columns 10 --rows 5) ✅ Pass Image correctly constrained to specified cell area
    4 Small solid image ✅ Pass Renders correctly
    5 Transmit only (--action transmit --imageId 1) ✅ Pass No image displayed (stored only)
    6 Place stored image (--action place --imageId 1) ✅ Pass Previously stored image displays on demand
    7 Crop (--srcX 50 --srcY 50 --srcWidth 100 --srcHeight 100) ✅ Pass Displays expected sub-region
    8 RGB wire format (--format rgb) ✅ Pass Renders correctly; transparent areas become black (expected — RGB strips alpha)
    9 RGBA wire format (--format rgba) ✅ Pass Renders correctly with transparency preserved
    10 No-move cursor (--noMove / C=1) ❌ Bug Cursor moves to bottom-right corner of image instead of staying at original position. Filed #297557
    11 Sub-cell offset (--offsetX / --offsetY) ✅ Pass Offset visible when comparing with/without; tested with 50px/30px offset
    12 Query action (--action query) ✅ Pass Terminal responds with OK, confirming KGP support

    Additional checks

    • Scrolling: Images survive scrolling up/down ✅
    • Terminal resize: Images persist after panel resize ✅
    • Clear terminal (Cmd+K): Images properly cleared ✅

    Bug filed

  5. federicobrancasi commented on Feb 25, 2026

    @federicobrancasi
    Member

    Windows testing complete; follow-up bug filed: #297643.

  6. locked and limited conversation to collaborators on Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions