feat(chat): add vision input with drag-and-drop & paste images (M9.4)
Drag-and-drop or paste images into chat input. Thumbnail preview above input, max 4 images per message. Images encoded as base64 and sent in Claude vision format (multimodal content arrays). Image attach button in chat input toolbar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
0ae497f1db
commit
27aeb2b188
@@ -8,6 +8,13 @@ export interface WebSearchResult {
|
||||
imgSrc?: string
|
||||
}
|
||||
|
||||
export interface ImageAttachment {
|
||||
/** Base64-encoded image data (no data: prefix) */
|
||||
data: string
|
||||
/** MIME type e.g. image/jpeg, image/png, image/gif, image/webp */
|
||||
mediaType: string
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
id: string
|
||||
role: 'user' | 'assistant' | 'system'
|
||||
@@ -23,6 +30,8 @@ export interface Message {
|
||||
webResults?: WebSearchResult[]
|
||||
/** Timestamp of last edit (set when user edits a sent message) */
|
||||
editedAt?: number
|
||||
/** Attached images (base64, max 4) for vision-capable models */
|
||||
images?: ImageAttachment[]
|
||||
}
|
||||
|
||||
export interface Reaction {
|
||||
@@ -39,4 +48,10 @@ export interface Conversation {
|
||||
updatedAt: number
|
||||
model?: string
|
||||
systemPrompt?: string
|
||||
/** ID of parent conversation this was branched from */
|
||||
parentConversationId?: string
|
||||
/** Message ID in parent where this branch forked */
|
||||
branchPoint?: string
|
||||
/** IDs of child branches forked from this conversation */
|
||||
childBranchIds?: string[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user