pub struct SessionContextAttribution {
pub compactions: SessionContextAttributionCompactions,
pub entries: Vec<SessionContextAttributionEntriesItem>,
pub total_tokens: i64,
}Expand description
Per-source context-window attribution, or null if the session has not yet been initialized (no system prompt or tool metadata cached).
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§compactions: SessionContextAttributionCompactionsSuccessful compaction history for the session.
entries: Vec<SessionContextAttributionEntriesItem>Flat list of per-source attribution entries. Group by kind and render unrecognized kinds generically. Nesting and rollups are expressed via parentId.
total_tokens: i64Total token count of the current context window the entries are measured against (system message + conversation messages + tool definitions — the same total reported by /context). Divide an entry’s tokens by this to derive its share.
Trait Implementations§
Source§impl Clone for SessionContextAttribution
impl Clone for SessionContextAttribution
Source§fn clone(&self) -> SessionContextAttribution
fn clone(&self) -> SessionContextAttribution
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 SessionContextAttribution
impl Debug for SessionContextAttribution
Source§impl Default for SessionContextAttribution
impl Default for SessionContextAttribution
Source§fn default() -> SessionContextAttribution
fn default() -> SessionContextAttribution
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SessionContextAttribution
impl<'de> Deserialize<'de> for SessionContextAttribution
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 SessionContextAttribution
impl RefUnwindSafe for SessionContextAttribution
impl Send for SessionContextAttribution
impl Sync for SessionContextAttribution
impl Unpin for SessionContextAttribution
impl UnsafeUnpin for SessionContextAttribution
impl UnwindSafe for SessionContextAttribution
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