From e926818f35879c1db4086efaa9634caac45f5743 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sun, 5 Apr 2026 19:10:34 -0300 Subject: [PATCH] fix(botlib): Add TOOL_EXEC message type (id=6) for direct tool invocation via WebSocket --- src/message_types.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/message_types.rs b/src/message_types.rs index 72e06e9..81f7373 100644 --- a/src/message_types.rs +++ b/src/message_types.rs @@ -1,4 +1,3 @@ - use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] @@ -17,6 +16,8 @@ impl MessageType { pub const SUGGESTION: Self = Self(4); pub const CONTEXT_CHANGE: Self = Self(5); + + pub const TOOL_EXEC: Self = Self(6); } impl From for MessageType { @@ -46,6 +47,7 @@ impl std::fmt::Display for MessageType { 3 => "CONTINUE", 4 => "SUGGESTION", 5 => "CONTEXT_CHANGE", + 6 => "TOOL_EXEC", _ => "UNKNOWN", }; write!(f, "{name}")