feat: enhance image handling in chat and drop zone components

- Updated ImageAttachment interface to make 'id' and 'size' optional for better compatibility with server messages.
- Improved image display in AgentView for user messages, including a count of attached images and a clickable preview.
- Refined ImageDropZone to conditionally render file size and ensure proper handling of image removal actions.
This commit is contained in:
Kacper
2025-12-16 03:11:01 +01:00
parent 7eeba5f17c
commit 23cef5fd82
4 changed files with 65 additions and 19 deletions

View File

@@ -210,11 +210,11 @@ export const DEFAULT_KEYBOARD_SHORTCUTS: KeyboardShortcuts = {
};
export interface ImageAttachment {
id: string;
id?: string; // Optional - may not be present in messages loaded from server
data: string; // base64 encoded image data
mimeType: string; // e.g., "image/png", "image/jpeg"
filename: string;
size: number; // file size in bytes
size?: number; // file size in bytes - optional for messages from server
}
export interface ChatMessage {