Skip to content

Conversation

@acoliver
Copy link
Contributor

@acoliver acoliver commented Dec 5, 2025

Add experimental terminal image rendering support with pixel sizing and React exposure.

Highlights:

  • New Image renderable that accepts pixelWidth/pixelHeight and fit modes (contain/cover/fill) with sharp-based scaling.
  • Renderer loads/caches images, emits kitty/iTerm2 graphics escapes, deletes kitty ids on move/resize, and surfaces pixelResolution via capabilities and a pixelResolution event.
  • React type exports and components include Image; tests cover graphics protocol parsing and renderer image path.

Notes:

  • Native build/tests not run here; JS tests only.
  • Pixel resolution query/response handled in JS; header sizing in downstream apps should use the exposed resolution and avoid hardcoded px-per-cell fallbacks.

Addresses #387

@acoliver acoliver marked this pull request as draft December 8, 2025 23:17
@acoliver
Copy link
Contributor Author

acoliver commented Dec 8, 2025

converting to draft while I figure out this bun crash issue.

default: false,
})

export function detectGraphicsSupport(): GraphicsSupport {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a better way to detect kitty graphics support, there should be already something in the codebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants