opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(app): add image preview support in session viewer

Open shuv1337 opened this issue 1 month ago • 0 comments

Summary

  • Add image preview support for base64-encoded images in the session viewer
  • Detect images by checking for base64 encoding and image/* mimeType
  • Render images inline with an <img> element instead of showing raw base64 data

Changes

  • Added isImage memo to detect base64 image content
  • Added imageDataUrl memo to construct data URL for rendering
  • Added new <Match> case to render images when detected

Before: image

After: image

shuv1337 avatar Jan 02 '26 19:01 shuv1337