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:
Dorian
2026-03-03 23:25:26 +00:00
co-authored by Claude Opus 4.6
parent 0ae497f1db
commit 27aeb2b188
5 changed files with 213 additions and 16 deletions
@@ -74,13 +74,23 @@
<!-- Normal display -->
<template v-else>
<!-- Attached images -->
<div v-if="message.images && message.images.length > 0" class="flex gap-2 flex-wrap mb-2">
<img
v-for="(img, i) in message.images"
:key="i"
:src="`data:${img.mediaType};base64,${img.data}`"
:alt="`Attached image ${i + 1}`"
class="rounded-lg max-w-[200px] max-h-[200px] object-cover border border-white/10"
/>
</div>
<div
v-if="!isUser"
class="chat-markdown text-sm leading-relaxed break-words text-white/90"
v-html="renderedMarkdown"
/>
<p
v-else
v-else-if="message.content"
class="text-sm leading-relaxed whitespace-pre-wrap break-words text-white/90"
>{{ displayText }}</p>
</template>