Skip to content

feat: add image upload support to CLI message pipeline#901

Open
chaehyun2 wants to merge 1 commit intoslopus:mainfrom
chaehyun2:feat/image-upload-cli
Open

feat: add image upload support to CLI message pipeline#901
chaehyun2 wants to merge 1 commit intoslopus:mainfrom
chaehyun2:feat/image-upload-cli

Conversation

@chaehyun2
Copy link

Summary

  • Users can paste images in the web/mobile UI and have them sent to Claude alongside text messages
  • Images are carried through the full pipeline: web UI → sync → CLI → Claude Code SDK (as base64 content array)
  • Empty mediaType falls back to image/png for robustness
  • Wire protocol updated with ImageAttachmentSchema for type-safe image transport

Changes

  • types.ts: add images field to UserMessageSchema
  • MessageQueue2.ts: carry images through queue batching
  • runClaude.ts: pass images from user message to queue
  • claudeRemote.ts: buildContent() constructs SDK content array with base64 image blocks
  • claudeRemoteLauncher.ts: pass images through to claudeRemote
  • legacyProtocol.ts: add ImageAttachmentSchema to wire protocol

Test plan

  • Paste an image in web UI chat input, verify preview thumbnail appears
  • Send message with image, verify Claude receives and describes the image
  • Send message with multiple images
  • Send text-only message (no images), verify normal behavior unchanged
  • Verify mobile app still displays messages correctly

🤖 Generated with Claude Code
via Happy

Users can paste images in the web/mobile UI and have them sent to
Claude alongside text messages.

- types.ts: add images field to UserMessageSchema
- MessageQueue2.ts: carry images through queue batching
- runClaude.ts: pass images from user message to queue
- claudeRemote.ts: buildContent constructs SDK content array with
  base64 image blocks (fallback mediaType to image/png)
- claudeRemoteLauncher.ts: pass images through to claudeRemote
- legacyProtocol.ts: add ImageAttachmentSchema to wire protocol

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant