From 5405e3c5b0b88f8fd42b52ee535ff81db482cd7f Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Mon, 26 Oct 2026 03:26:58 -0500 Subject: [PATCH] feat(message): the image content block Providers map images to per-backend content blocks, so the block rides the message seam beside the tool blocks and round-trips through session checkpoints. Untagged serde keeps old payloads loading; the new variant sits last so the field sets disambiguate. Exhaustive matches on Content across the adapters and views gained a mechanical Image arm; sending images is a later effort. --- crates/rhema-claw/src/handler.rs | 2 +- crates/rhema-claw/src/interactive.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/rhema-claw/src/handler.rs b/crates/rhema-claw/src/handler.rs index 94439b5..569a08f 100644 --- a/crates/rhema-claw/src/handler.rs +++ b/crates/rhema-claw/src/handler.rs @@ -503,7 +503,7 @@ pub(crate) fn final_text(message: &Message) -> Option { .iter() .filter_map(|content| match content { Content::Text(text) => Some(text.as_str()), - Content::ToolCall(_) | Content::ToolResult(_) => None, + Content::ToolCall(_) | Content::ToolResult(_) | Content::Image(_) => None, }) .collect::>() .join(""); diff --git a/crates/rhema-claw/src/interactive.rs b/crates/rhema-claw/src/interactive.rs index 59cdd85..ae0e391 100644 --- a/crates/rhema-claw/src/interactive.rs +++ b/crates/rhema-claw/src/interactive.rs @@ -474,7 +474,7 @@ fn final_text(message: &Message) -> Option { .iter() .filter_map(|content| match content { Content::Text(text) => Some(text.as_str()), - Content::ToolCall(_) | Content::ToolResult(_) => None, + Content::ToolCall(_) | Content::ToolResult(_) | Content::Image(_) => None, }) .collect::>() .join("");