void icon indicating copy to clipboard operation
void copied to clipboard

feat: Allow pasting images into the chat box

Open michael-farah opened this issue 7 months ago • 4 comments

You can paste an image using Ctrl+V (or Cmd+V). A preview of the image will appear below the text input, along with an "X" button to remove it before sending. When the message is sent, the image data is sent along with the text.

Extended ChatMessage and chatThreadService to handle imageData and imageMimeType. Adapted LLM message formatting (convertToLLMMessageService, provider types) to include image data for compatible models (Anthropic, OpenAI, Gemini). Added supportsImageInput flag to modelCapabilities for relevant models. Updated UI (VoidInputBox2, SidebarChat, ChatMarkdownRender) for image pasting, preview, and display. Added CSS for image previews in the input area and message display.

michael-farah avatar May 26 '25 11:05 michael-farah

Great start, nice work!

Still need to make sure it works with all providers, Claude 4 Opus breaks here:

Screenshot 2025-05-29 at 9 59 46 PM

Would be great to make this mutli-image too - this should be pretty easy, we can probably just ask Claude to do this.

andrewpareles avatar May 30 '25 04:05 andrewpareles

Lmk when this is ready or when you need help!

andrewpareles avatar May 31 '25 03:05 andrewpareles

Thank you for the feedback @andrewpareles 😄, I will let you know when I've made some progress on it today!

michael-farah avatar May 31 '25 03:05 michael-farah

Hey @andrewpareles this should work with other providers now, but I don't have access to Claude 4 Opus if you could please check if it works now. Also planning to add appending of images after a chat message has been sent.

michael-farah avatar May 31 '25 07:05 michael-farah