pub enum ClientMessage {
DaemonControl {
request_id: String,
command: DaemonCommand,
},
Initialize {
request_id: String,
protocol_version: u32,
client: PeerInfo,
},
SessionStart {
request_id: String,
cwd: String,
provider: Option<String>,
model: Option<String>,
base_url: Option<String>,
no_tools: Option<bool>,
delegation_depth: Option<u32>,
channel: Option<String>,
auto_approve: Option<bool>,
},
SessionAttach {
request_id: String,
session_id: String,
cwd: String,
},
TurnStart {
request_id: String,
session_id: String,
prompt: String,
attachments: Vec<Attachment>,
},
QueueUpdate {
request_id: String,
session_id: String,
queue_id: String,
revision: u64,
prompt: String,
},
QueueMove {
request_id: String,
session_id: String,
queue_id: String,
revision: u64,
before_queue_id: Option<String>,
},
QueueRemove {
request_id: String,
session_id: String,
queue_id: String,
revision: u64,
},
SessionPause {
request_id: String,
session_id: String,
paused: bool,
},
TurnCancel {
request_id: String,
session_id: String,
turn_id: String,
},
ApprovalResolve {
request_id: String,
session_id: String,
approval_id: String,
approved: bool,
},
SessionClear {
request_id: String,
session_id: String,
},
}Variants§
DaemonControl
Initialize
SessionStart
Fields
§
delegation_depth: Option<u32>Delegation depth of the client, when it is itself a delegated agent (such as a nested SCV). Tools started from the session count from it, so the depth limit holds across processes.
§
channel: Option<String>The chat channel this session answers on, as its users name it
(such as WeChat or Feishu). The user reads short plain-text
replies there and never sees tool calls, so the server tells the
model; a chat client also delivers files the model attaches to
its reply, so a session with tools offers CHAT_ATTACH_TOOL.
At most MAX_CHANNEL_NAME_BYTES, without control characters.
SessionAttach
TurnStart
Fields
§
attachments: Vec<Attachment>Files that come with the prompt, at most MAX_TURN_ATTACHMENTS.
The server lists them for the model and shows it images directly
when the model accepts image input.
QueueUpdate
QueueMove
Fields
QueueRemove
SessionPause
TurnCancel
ApprovalResolve
SessionClear
Implementations§
Source§impl ClientMessage
impl ClientMessage
pub fn request_id(&self) -> &str
Trait Implementations§
Source§impl Clone for ClientMessage
impl Clone for ClientMessage
Source§impl Debug for ClientMessage
impl Debug for ClientMessage
Source§impl<'de> Deserialize<'de> for ClientMessage
impl<'de> Deserialize<'de> for ClientMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ClientMessage
impl PartialEq for ClientMessage
Source§impl Serialize for ClientMessage
impl Serialize for ClientMessage
impl StructuralPartialEq for ClientMessage
Auto Trait Implementations§
impl Freeze for ClientMessage
impl RefUnwindSafe for ClientMessage
impl Send for ClientMessage
impl Sync for ClientMessage
impl Unpin for ClientMessage
impl UnsafeUnpin for ClientMessage
impl UnwindSafe for ClientMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more