feat: inline image display with lightbox
- Add image block type for base64 and URL images - Parse image/image_url blocks from gateway history - Render images inline in chat messages (rounded, dark-themed) - Click-to-zoom lightbox with Escape to close - Markdown images also use the lightbox component - Detect base64 images in tool results (e.g. Read tool on image files) - Support png, jpg, gif, webp formats
This commit is contained in:
@@ -12,7 +12,8 @@ export type MessageBlock =
|
||||
| { type: 'text'; text: string }
|
||||
| { type: 'thinking'; text: string }
|
||||
| { type: 'tool_use'; name: string; input: any; id?: string }
|
||||
| { type: 'tool_result'; content: string; toolUseId?: string; name?: string };
|
||||
| { type: 'tool_result'; content: string; toolUseId?: string; name?: string }
|
||||
| { type: 'image'; mediaType: string; data?: string; url?: string };
|
||||
|
||||
export interface Session {
|
||||
key: string;
|
||||
|
||||
Reference in New Issue
Block a user