You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enables pasting images directly into the chat input box for multimodal
AI conversations.
## Changes
**Frontend**
- New `ImageAttachments` component displays pasted images as thumbnails
with remove buttons (80x80px in input, 300x300px max in messages)
- `ChatInput` handles paste events to extract images from clipboard
- Images converted to base64 data URLs for preview and transmission
- Updated send logic to allow sending messages with only images (no text
required)
- `UserMessage` component now renders inline images in chat history
**Backend**
- Extended `CmuxMessage` type with `CmuxImagePart` (image data +
mimeType)
- Updated IPC `sendMessage` to accept optional `imageParts` array
- Modified message construction in `ipcMain` to include image parts
- `StreamingMessageAggregator` extracts image parts when converting to
`DisplayedMessage`
- Images flow through AI SDK's `convertToModelMessages` to provider APIs
**Type Updates**
- `DisplayedMessage` type for user messages now includes optional
`imageParts` field
- Image parts properly preserved through entire message pipeline (input
→ IPC → history → aggregator → UI)
## Implementation Notes
The AI SDK automatically converts image parts to the appropriate format
for each provider (Anthropic, OpenAI, Google, etc.), so no
provider-specific handling is needed.
Image attachments are:
- Cleared on successful send or when explicitly removed by user
- Displayed as thumbnails in input area before sending
- Rendered inline in message history after sending
- Included in chat history for context in subsequent messages
## Testing
Manually tested:
1. Copy image to clipboard
2. Paste into chat input (Cmd+V / Ctrl+V)
3. Verify thumbnail appears with remove button
4. Send message and confirm image renders in chat
5. Verify AI can see and respond to image content
_Generated with `cmux`_
0 commit comments