fix(botlib): Add TOOL_EXEC message type (id=6) for direct tool invocation via WebSocket

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-05 19:10:34 -03:00
parent f5496b0177
commit e926818f35

View file

@ -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<i32> 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}")