Skip to content

feat: render image attachments inline in chat#42

Open
ruguoba wants to merge 1 commit into
aitrace-dev:mainfrom
ruguoba:feat/render-image-attachments
Open

feat: render image attachments inline in chat#42
ruguoba wants to merge 1 commit into
aitrace-dev:mainfrom
ruguoba:feat/render-image-attachments

Conversation

@ruguoba
Copy link
Copy Markdown

@ruguoba ruguoba commented May 14, 2026

Summary

Add support for rendering image attachments in the chat transcript. Images are displayed inline with a max-width of 400px, clickable to open full-size in a new tab, and use lazy loading.

Changes

  • Add attachments field to ChatMessage interface with type Array<{ type: 'image'; url: string; mimeType: string }>
  • Render images after message text with proper styling
  • Support click-to-open in new tab
  • Use lazy loading for better performance

Testing

  • Verified that images render inline in the chat transcript
  • Confirmed that clicking an image opens it in a new tab
  • Tested lazy loading behavior
  • Verified that messages without attachments still render correctly

Fixes #29

Add support for rendering image attachments in the chat transcript.
Images are displayed inline with a max-width of 400px, clickable
to open full-size in a new tab, and use lazy loading.

Changes:
- Add `attachments` field to ChatMessage interface
- Render images after message text with proper styling
- Support click-to-open in new tab
- Use lazy loading for better performance

Fixes aitrace-dev#29
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.

Render image attachments inline in chat transcript (render-only)

1 participant