The Rust CLI now recognizes explicit local image references in prompt text, encodes supported image files as base64, and serializes mixed text/image content blocks for the API. The request conversion path was kept narrow so existing runtime/session structures remain stable while prompt mode and user text conversion gain multimodal support. Constraint: Must support PNG, JPG/JPEG, GIF, and WebP without adding broad runtime abstractions Constraint: Existing text-only prompt behavior and API tool flows must keep working unchanged Rejected: Add only explicit --image CLI flags | does not satisfy auto-detect image refs in prompt text Rejected: Persist native image blocks in runtime session model | broader refactor than needed for prompt support Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep image parsing scoped to outbound user prompt adaptation unless session persistence truly needs multimodal history Tested: cargo fmt --all; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace Not-tested: Live remote multimodal request against Anthropic API
16 KiB
16 KiB