Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Acp images#127

Merged
Kvadratni merged 4 commits intomainfrom
acp-images
Feb 6, 2026
Merged

Acp images#127
Kvadratni merged 4 commits intomainfrom
acp-images

Conversation

@Kvadratni
Copy link
Collaborator

@Kvadratni Kvadratni commented Feb 6, 2026

Changes

  • Add image attachment support to ACP communication
  • feat: add image attachment support to new agent forward UI
  • fix: add validation for image attachments to prevent security issues
image

Kvadratni and others added 4 commits February 5, 2026 21:32
- Add ImageAttachment type to Rust backend and TypeScript frontend
- Update send_agent_prompt_streaming command to accept optional images parameter
- Add run_acp_prompt_streaming_with_images function to AI client
- Update session manager send_prompt to handle image attachments
- Images are sent as base64-encoded content blocks in ACP prompts
- Supports pasting and attaching images for multimodal agent interactions
Wire up image attachment support for the new agent forward UI (konami code enabled branch workflow). This completes the image support infrastructure by:

- Add image attachment UI to NewSessionModal with file picker and preview
- Update startBranchSession, restartBranchSession, and startBranchNote to accept and pass image attachments
- Thread images parameter through Tauri commands to session_manager.send_prompt

The ACP communication layer already supported images; this change enables the new agent forward UI to utilize that capability.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds comprehensive validation for image attachments on both frontend and backend:
- Enforces max file size limit of 10MB to prevent memory exhaustion and DoS
- Restricts allowed MIME types to standard image formats (PNG, JPEG, GIF, WebP)
- Limits maximum number of attachments to 5 per request
- Validates all images in Tauri commands before processing
- Provides clear error messages for validation failures
- Shows image count in UI to help users track limits

This addresses critical security concerns identified in code review where
unvalidated image attachments could cause memory issues or system instability.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add clipboard paste handler to NewSessionModal textarea that detects
  and validates images from clipboard, enabling users to paste images
  directly into the prompt input
- Implement inline helper functions in AgentPanel for image validation
  and clipboard reading using browser Clipboard API
- Fix cargo fmt issues in client.rs and lib.rs for proper formatting
- Add accessibility attributes (role, aria-label) to dragover/drop div
- Remove broken image.ts service file that had type errors

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@Kvadratni Kvadratni marked this pull request as ready for review February 6, 2026 06:35
@Kvadratni Kvadratni merged commit cc46a1e into main Feb 6, 2026
1 check passed
@Kvadratni Kvadratni deleted the acp-images branch February 6, 2026 06:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant