feat: Allow pasting images into the chat box
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.
Great start, nice work!
Still need to make sure it works with all providers, Claude 4 Opus breaks here:
Would be great to make this mutli-image too - this should be pretty easy, we can probably just ask Claude to do this.
Lmk when this is ready or when you need help!
Thank you for the feedback @andrewpareles 😄, I will let you know when I've made some progress on it today!
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.