Skip to content

feat(acp): rich content support — images, resources, tool locations#822

Merged
bug-ops merged 2 commits intomainfrom
epic/acp-rich-content
Feb 24, 2026
Merged

feat(acp): rich content support — images, resources, tool locations#822
bug-ops merged 2 commits intomainfrom
epic/acp-rich-content

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 24, 2026

Summary

Implements Epic #784 — Rich Content Support for ACP.

4.1 Multi-modal prompts

  • Image content blocks decoded from base64 and forwarded to LLM providers as attachments
  • Embedded resource text wrapped in <resource> markers and appended to prompt
  • Audio and ResourceLink blocks skipped (no provider support)

4.2 Tool locations

  • LoopbackEvent::ToolOutput extended with locations: Option<Vec<String>>
  • Mapped to acp::ToolCallLocation for IDE file navigation

4.3 Thinking chunks

  • Already implemented — verified, no changes needed

Security hardening

  • 20 MiB base64 size guard before decode (DoS prevention)
  • MIME whitelist: jpeg, png, gif, webp only
  • Resource text isolation via XML markers (prompt injection mitigation)

Test plan

  • 8 new unit tests for image extraction, resource wrapping, tool locations, edge cases
  • Integration tests pass (2 ACP e2e tests)
  • All 2605 workspace tests pass
  • Security review: size guard, MIME whitelist, resource isolation
  • Performance review: no blockers

Closes #784

Multi-modal ACP prompts: image content blocks decoded from base64
and forwarded to LLM providers as attachments. Embedded resource
text wrapped in <resource> markers and appended to prompt.

Tool output now includes optional file locations for IDE navigation
via ToolCallLocation.

Security hardening: 20 MiB base64 size guard, MIME whitelist
(jpeg/png/gif/webp), resource text isolation markers.
@bug-ops bug-ops added this to the ACP Phase 2 milestone Feb 24, 2026
@github-actions github-actions bot added documentation Improvements or additions to documentation rust core dependencies enhancement New feature or request size/L labels Feb 24, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 24, 2026 19:37
@bug-ops bug-ops merged commit a09e7ed into main Feb 24, 2026
23 checks passed
@bug-ops bug-ops deleted the epic/acp-rich-content branch February 24, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core dependencies documentation Improvements or additions to documentation enhancement New feature or request rust size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Epic: Rich Content Support

1 participant