pub struct SessionContext {
pub project_path: Option<String>,
pub provider: String,
pub model: String,
pub mode: SessionMode,
pub files: Vec<String>,
pub custom: HashMap<String, Value>,
}Expand description
Context for a session (project, provider, model, etc.)
Fields§
§project_path: Option<String>Path to the project directory
provider: StringAI provider (e.g., “openai”, “anthropic”)
model: StringModel name (e.g., “gpt-4”, “claude-3”)
mode: SessionModeSession mode (Chat, Code, Vibe)
files: Vec<String>Files included in the session context
custom: HashMap<String, Value>Custom context data
Implementations§
Source§impl SessionContext
impl SessionContext
Sourcepub fn new(provider: String, model: String, mode: SessionMode) -> Self
pub fn new(provider: String, model: String, mode: SessionMode) -> Self
Create a new session context
Trait Implementations§
Source§impl Clone for SessionContext
impl Clone for SessionContext
Source§fn clone(&self) -> SessionContext
fn clone(&self) -> SessionContext
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 SessionContext
impl Debug for SessionContext
Source§impl<'de> Deserialize<'de> for SessionContext
impl<'de> Deserialize<'de> for SessionContext
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 SessionContext
impl RefUnwindSafe for SessionContext
impl Send for SessionContext
impl Sync for SessionContext
impl Unpin 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