pub struct SessionContext { /* private fields */ }Implementations§
Source§impl SessionContext
impl SessionContext
pub fn new() -> Arc<Self> ⓘ
pub async fn observe_tool_call(&self, tool_name: &str, arguments: &Value)
pub async fn take_if_changed(&self) -> bool
pub async fn get_context_hint(&self) -> Option<String>
Sourcepub async fn conversation_ngram(&self, window: usize) -> Option<String>
pub async fn conversation_ngram(&self, window: usize) -> Option<String>
Conversation n-gram retrieval key — Feature D (docs/PAPER-INSPIRATIONS.md, paper §2.3 “conditional memory”).
Instead of keying retrieval on a single query sentence (unigram-style), condition it on the recent window of observed turns — and weight that window by recency, so the turn the agent is acting on right now dominates retrieval while slightly older turns still shape it. The newest turn is repeated most, decaying linearly with age, which biases both the keyword tier (term frequency) and the embedding toward the current focus. Output is length-bounded so a long session cannot bloat the query unboundedly.
Returns None when nothing has been observed yet.
pub async fn get_project(&self) -> Option<String>
pub async fn get_intent(&self) -> IntentResult
Auto Trait Implementations§
impl !Freeze for SessionContext
impl !RefUnwindSafe for SessionContext
impl !UnwindSafe for SessionContext
impl Send for SessionContext
impl Sync for SessionContext
impl Unpin for SessionContext
impl UnsafeUnpin for SessionContext
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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