pub struct SystemMessage {
pub subtype: String,
pub session_id: String,
pub cwd: String,
pub model: String,
pub claude_code_version: String,
pub permission_mode: String,
pub tools: Vec<String>,
pub betas: Vec<String>,
pub capabilities: Vec<String>,
pub skills: Vec<Value>,
pub plugins: Vec<Value>,
pub extra: HashMap<String, Value>,
}Expand description
Every type:"system" frame: init (first frame of each turn) plus
hook_started, hook_response, compact_boundary, model_fallback,
background_tasks_changed, task_started, task_updated, task_notification,
thinking_tokens, model_refusal_no_fallback, peer_message_hold, … —
only subtype and session_id are common to all; subtype-specific fields
are in extra. Source: binary system-message schemas
Source: chunk-hp1k7mph.js:194 (WGt function), chunk-20bv8pca.js:15125
Fields§
§subtype: String§session_id: String§cwd: String§model: String§claude_code_version: String§permission_mode: String§tools: Vec<String>§betas: Vec<String>§capabilities: Vec<String>§skills: Vec<Value>§plugins: Vec<Value>§extra: HashMap<String, Value>Implementations§
Source§impl SystemMessage
impl SystemMessage
Sourcepub fn code_mode_active(&self) -> bool
pub fn code_mode_active(&self) -> bool
REPL or Eval in tools[] = Code Mode active (see SessionOptions::code_mode).
Trait Implementations§
Source§impl Clone for SystemMessage
impl Clone for SystemMessage
Source§impl Debug for SystemMessage
impl Debug for SystemMessage
Source§impl<'de> Deserialize<'de> for SystemMessage
impl<'de> Deserialize<'de> for SystemMessage
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
Auto Trait Implementations§
impl Forget for SystemMessage
impl Freeze for SystemMessage
impl Move for SystemMessage
impl RefUnwindSafe for SystemMessage
impl Send for SystemMessage
impl Sync for SystemMessage
impl Unpin for SystemMessage
impl UnsafeUnpin for SystemMessage
impl UnwindSafe for SystemMessage
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