pub struct MessageWindowView<'a> {
pub messages: &'a mut Vec<Message>,
pub last_persisted_message_id: &'a mut Option<i64>,
pub deferred_db_hide_ids: &'a mut Vec<i64>,
pub deferred_db_summaries: &'a mut Vec<String>,
pub cached_prompt_tokens: &'a mut u64,
pub token_counter: Arc<TokenCounter>,
pub completed_tool_ids: &'a mut HashSet<String>,
}Expand description
Borrow-lens over the agent’s conversation window fields.
Holds &mut references to every message-list field that the context service
needs to read or write. Constructed by the zeph-core shim from disjoint
sub-fields of Agent<C>::msg.
Fields§
§messages: &'a mut Vec<Message>Full message history. The context service reads and filters this list.
last_persisted_message_id: &'a mut Option<i64>SQLite row ID of the most recently persisted message.
deferred_db_hide_ids: &'a mut Vec<i64>SQLite row IDs to be soft-deleted after context assembly completes.
deferred_db_summaries: &'a mut Vec<String>Deferred summary strings to be appended after context assembly completes.
cached_prompt_tokens: &'a mut u64Running token count for the current prompt window — updated after every
message-list mutation to keep provider call budgets accurate.
Maps to Agent<C>::runtime.providers.cached_prompt_tokens.
token_counter: Arc<TokenCounter>Shared token counter — cheap Arc clone from Agent<C>::runtime.metrics.token_counter.
completed_tool_ids: &'a mut HashSet<String>Tool IDs that completed successfully in the current session.
Maps to Agent<C>::services.tool_state.completed_tool_ids.
Cleared by clear_history together with the message list.
Auto Trait Implementations§
impl<'a> Freeze for MessageWindowView<'a>
impl<'a> !RefUnwindSafe for MessageWindowView<'a>
impl<'a> Send for MessageWindowView<'a>
impl<'a> Sync for MessageWindowView<'a>
impl<'a> Unpin for MessageWindowView<'a>
impl<'a> UnsafeUnpin for MessageWindowView<'a>
impl<'a> !UnwindSafe for MessageWindowView<'a>
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
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request