pub struct HistoryCompactRequest {
pub custom_instructions: Option<String>,
pub token_limit: Option<i64>,
pub trigger: Option<HistoryCompactRequestTrigger>,
}Expand description
Optional compaction parameters.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§custom_instructions: Option<String>Optional user-provided instructions to focus the compaction summary
token_limit: Option<i64>Context window token limit this compaction is targeting, recorded as the tokenLimit on the persisted session.compaction_start / session.compaction_complete events. Set it when the compaction targets a window other than the compacting model’s own, e.g. switching to a model with a smaller context window: the compaction still runs on the current model, so the limit that motivated it would otherwise be lost. When absent, the events record the compacting model’s own resolved limit. Attribution metadata only - it does not change how much the compaction removes.
trigger: Option<HistoryCompactRequestTrigger>What initiated this compaction request, recorded as the trigger on the persisted session.compaction_start / session.compaction_complete events. When absent, the compaction is persisted without trigger attribution (initiator unknown).
Trait Implementations§
Source§impl Clone for HistoryCompactRequest
impl Clone for HistoryCompactRequest
Source§fn clone(&self) -> HistoryCompactRequest
fn clone(&self) -> HistoryCompactRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more