pub struct SummaryState {
pub summary: String,
pub tracked: Vec<TrackedSet>,
}Expand description
A summary of a conversation’s older messages and the values tracked across compactions (such as the files a coding agent read). The default is the state before the first compaction.
Fields§
§summary: StringThe summary; empty before the first compaction.
tracked: Vec<TrackedSet>Named sets of values, in the order they were first tracked.
Implementations§
Source§impl SummaryState
impl SummaryState
Sourcepub fn message(&self) -> Option<String>
pub fn message(&self) -> Option<String>
The text that stands for the summarized messages, None before the
first compaction. A value appears only in the last set that holds
it, so a later set (files changed) overrides an earlier one (files
read).
Sourcepub fn track(
&mut self,
messages: &[impl Borrow<Message>],
rules: &[TrackArgument],
)
pub fn track( &mut self, messages: &[impl Borrow<Message>], rules: &[TrackArgument], )
Adds the arguments rules name of the tool calls in messages to
the tracked sets, creating the rules’ sets in rule order first.
Trait Implementations§
Source§impl Clone for SummaryState
impl Clone for SummaryState
Source§impl Debug for SummaryState
impl Debug for SummaryState
Source§impl Default for SummaryState
impl Default for SummaryState
Source§impl<'de> Deserialize<'de> for SummaryState
impl<'de> Deserialize<'de> for SummaryState
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
impl Eq for SummaryState
Source§impl PartialEq for SummaryState
impl PartialEq for SummaryState
Source§impl Serialize for SummaryState
impl Serialize for SummaryState
impl StructuralPartialEq for SummaryState
Auto Trait Implementations§
impl Freeze for SummaryState
impl RefUnwindSafe for SummaryState
impl Send for SummaryState
impl Sync for SummaryState
impl Unpin for SummaryState
impl UnsafeUnpin for SummaryState
impl UnwindSafe for SummaryState
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.