pub struct CuratedContext {
pub recent_messages: Vec<Message>,
pub active_files: Vec<FileSummary>,
pub ledger_summary: Option<String>,
pub recent_errors: Vec<ErrorContext>,
pub relevant_tools: Vec<ToolDefinition>,
pub estimated_tokens: usize,
pub phase: ConversationPhase,
}
Expand description
Curated context result
Fields§
§recent_messages: Vec<Message>
§active_files: Vec<FileSummary>
§ledger_summary: Option<String>
§recent_errors: Vec<ErrorContext>
§relevant_tools: Vec<ToolDefinition>
§estimated_tokens: usize
§phase: ConversationPhase
Implementations§
Source§impl CuratedContext
impl CuratedContext
pub fn new() -> Self
pub fn add_recent_messages(&mut self, messages: &[Message], count: usize)
pub fn add_file_context(&mut self, summary: FileSummary)
pub fn add_ledger_summary(&mut self, summary: String)
pub fn add_error_context(&mut self, error: ErrorContext)
pub fn add_tools(&mut self, tools: Vec<ToolDefinition>)
Trait Implementations§
Source§impl Clone for CuratedContext
impl Clone for CuratedContext
Source§fn clone(&self) -> CuratedContext
fn clone(&self) -> CuratedContext
Returns a duplicate of the value. Read more
1.0.0 · 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 CuratedContext
impl Debug for CuratedContext
Source§impl Default for CuratedContext
impl Default for CuratedContext
Source§impl<'de> Deserialize<'de> for CuratedContext
impl<'de> Deserialize<'de> for CuratedContext
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 CuratedContext
impl RefUnwindSafe for CuratedContext
impl Send for CuratedContext
impl Sync for CuratedContext
impl Unpin for CuratedContext
impl UnwindSafe for CuratedContext
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,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more