pub struct HistoryCompactResult {
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 HistoryCompactResult
impl Clone for HistoryCompactResult
Source§fn clone(&self) -> HistoryCompactResult
fn clone(&self) -> HistoryCompactResult
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 HistoryCompactResult
impl Debug for HistoryCompactResult
Source§impl Default for HistoryCompactResult
impl Default for HistoryCompactResult
Source§fn default() -> HistoryCompactResult
fn default() -> HistoryCompactResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HistoryCompactResult
impl<'de> Deserialize<'de> for HistoryCompactResult
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 HistoryCompactResult
impl RefUnwindSafe for HistoryCompactResult
impl Send for HistoryCompactResult
impl Sync for HistoryCompactResult
impl Unpin for HistoryCompactResult
impl UnsafeUnpin for HistoryCompactResult
impl UnwindSafe for HistoryCompactResult
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