pub struct SessionHistoryCompactResult {
pub context_window: Option<HistoryCompactContextWindow>,
pub messages_removed: i64,
pub success: bool,
pub summary_content: Option<String>,
pub tokens_removed: i64,
}Expand description
Compaction outcome with the number of tokens and messages removed, summary text, and the resulting context window breakdown.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§context_window: Option<HistoryCompactContextWindow>Post-compaction context window usage breakdown
messages_removed: i64Number of messages removed during compaction
success: boolWhether compaction completed successfully
summary_content: Option<String>Summary text produced by compaction. Omitted when compaction did not produce a summary (e.g. failure path).
tokens_removed: i64Number of tokens freed by compaction
Trait Implementations§
Source§impl Clone for SessionHistoryCompactResult
impl Clone for SessionHistoryCompactResult
Source§fn clone(&self) -> SessionHistoryCompactResult
fn clone(&self) -> SessionHistoryCompactResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionHistoryCompactResult
impl Debug for SessionHistoryCompactResult
Source§impl Default for SessionHistoryCompactResult
impl Default for SessionHistoryCompactResult
Source§fn default() -> SessionHistoryCompactResult
fn default() -> SessionHistoryCompactResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SessionHistoryCompactResult
impl<'de> Deserialize<'de> for SessionHistoryCompactResult
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 SessionHistoryCompactResult
impl RefUnwindSafe for SessionHistoryCompactResult
impl Send for SessionHistoryCompactResult
impl Sync for SessionHistoryCompactResult
impl Unpin for SessionHistoryCompactResult
impl UnsafeUnpin for SessionHistoryCompactResult
impl UnwindSafe for SessionHistoryCompactResult
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