pub struct ConversationSnapshot {
pub header: SessionHeader,
pub api_messages: Vec<SharedMessage>,
pub messages_len: usize,
pub tokens: ConversationTokens,
pub cost: f64,
pub keepwarm_cost: f64,
pub keepwarm_tokens: ConversationTokens,
pub abort_context: Option<String>,
pub queued_message: Option<String>,
pub pending_events_len: usize,
pub consecutive_auto_turns: u32,
pub messages_hash_memo: MessagesHashMemo,
}Expand description
Serializable mirror of ConversationState (+ the actor’s auto-turn
counter). Clients MUST replace, never merge, on Conversation(_).
Fields§
§header: SessionHeaderThe TUI’s App.session mirror (never api_messages).
api_messages: Vec<SharedMessage>§messages_len: usizeapi_messages.len() on the daemon — always filled by the actor;
api_messages itself may be empty for HistoryMode::Digest clients.
tokens: ConversationTokens§cost: f64§keepwarm_cost: f64Prompt-cache keep-warm spend, already included in cost (task #444).
keepwarm_tokens: ConversationTokensKeep-warm ping tokens, already included in tokens (task #444).
abort_context: Option<String>Legacy (protocol v3 shape kept): always None — an interrupted turn
is recorded in api_messages (engine::interrupt), never as a recap.
queued_message: Option<String>§pending_events_len: usize§consecutive_auto_turns: u32§messages_hash_memo: MessagesHashMemoNever serialised; see MessagesHashMemo.
Trait Implementations§
Source§impl Clone for ConversationSnapshot
impl Clone for ConversationSnapshot
Source§impl Debug for ConversationSnapshot
impl Debug for ConversationSnapshot
Source§impl Default for ConversationSnapshot
impl Default for ConversationSnapshot
Source§impl<'de> Deserialize<'de> for ConversationSnapshot
impl<'de> Deserialize<'de> for ConversationSnapshot
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 Freeze for ConversationSnapshot
impl RefUnwindSafe for ConversationSnapshot
impl Send for ConversationSnapshot
impl Sync for ConversationSnapshot
impl Unpin for ConversationSnapshot
impl UnsafeUnpin for ConversationSnapshot
impl UnwindSafe for ConversationSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.