mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 20:23:36 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user