fix(botlib): Add TOOL_EXEC message type (id=6) for direct tool invocation via WebSocket
This commit is contained in:
parent
f5496b0177
commit
e926818f35
1 changed files with 3 additions and 1 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
|
|
@ -17,6 +16,8 @@ impl MessageType {
|
||||||
pub const SUGGESTION: Self = Self(4);
|
pub const SUGGESTION: Self = Self(4);
|
||||||
|
|
||||||
pub const CONTEXT_CHANGE: Self = Self(5);
|
pub const CONTEXT_CHANGE: Self = Self(5);
|
||||||
|
|
||||||
|
pub const TOOL_EXEC: Self = Self(6);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<i32> for MessageType {
|
impl From<i32> for MessageType {
|
||||||
|
|
@ -46,6 +47,7 @@ impl std::fmt::Display for MessageType {
|
||||||
3 => "CONTINUE",
|
3 => "CONTINUE",
|
||||||
4 => "SUGGESTION",
|
4 => "SUGGESTION",
|
||||||
5 => "CONTEXT_CHANGE",
|
5 => "CONTEXT_CHANGE",
|
||||||
|
6 => "TOOL_EXEC",
|
||||||
_ => "UNKNOWN",
|
_ => "UNKNOWN",
|
||||||
};
|
};
|
||||||
write!(f, "{name}")
|
write!(f, "{name}")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue