pub struct SessionContext {
pub recall_timing: Option<RecallTiming>,
pub primary_project_id: Option<ProjectId>,
pub secondary_project_ids: Vec<ProjectId>,
}Expand description
Session-level context for managing conversation state.
Holds project associations and recall timing.
Created when a new session starts, passed to AgentRuntime::execute().
Fields§
§recall_timing: Option<RecallTiming>Proactive recall timing tracker (session-scoped). Tracks message count and topic changes to decide when to trigger proactive memory injection.
primary_project_id: Option<ProjectId>Primary project for this session (sets CWD, provides main context).
secondary_project_ids: Vec<ProjectId>Secondary projects for cross-project work.
Implementations§
Source§impl SessionContext
impl SessionContext
Sourcepub fn with_project(project_id: ProjectId) -> Self
pub fn with_project(project_id: ProjectId) -> Self
Create a session context with a primary project.
Sourcepub fn with_projects(primary: ProjectId, secondary: Vec<ProjectId>) -> Self
pub fn with_projects(primary: ProjectId, secondary: Vec<ProjectId>) -> Self
Create a session context with multiple projects.
Sourcepub fn all_project_ids(&self) -> Vec<ProjectId> ⓘ
pub fn all_project_ids(&self) -> Vec<ProjectId> ⓘ
Get all project IDs (primary first, then secondary).
Sourcepub fn has_project(&self) -> bool
pub fn has_project(&self) -> bool
Whether this session has any project context.
Trait Implementations§
Source§impl Debug for SessionContext
impl Debug for SessionContext
Auto Trait Implementations§
impl Freeze for SessionContext
impl RefUnwindSafe for SessionContext
impl Send for SessionContext
impl Sync for SessionContext
impl Unpin for SessionContext
impl UnsafeUnpin for SessionContext
impl UnwindSafe 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