pub struct ModeContext {
pub session_id: String,
pub project_path: Option<PathBuf>,
pub think_more_enabled: bool,
pub think_more_config: ThinkMoreConfig,
pub conversation_history: Vec<Message>,
pub custom: HashMap<String, Value>,
}Expand description
Context for mode execution
Fields§
§session_id: StringSession ID
project_path: Option<PathBuf>Project path
think_more_enabled: boolWhether Think More is enabled
think_more_config: ThinkMoreConfigThink More configuration
conversation_history: Vec<Message>Conversation history
custom: HashMap<String, Value>Custom context data
Implementations§
Source§impl ModeContext
impl ModeContext
Sourcepub fn add_message(&mut self, role: MessageRole, content: String)
pub fn add_message(&mut self, role: MessageRole, content: String)
Add a message to the conversation history
Trait Implementations§
Source§impl Clone for ModeContext
impl Clone for ModeContext
Source§fn clone(&self) -> ModeContext
fn clone(&self) -> ModeContext
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 ModeContext
impl Debug for ModeContext
Source§impl<'de> Deserialize<'de> for ModeContext
impl<'de> Deserialize<'de> for ModeContext
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 ModeContext
impl RefUnwindSafe for ModeContext
impl Send for ModeContext
impl Sync for ModeContext
impl Unpin for ModeContext
impl UnwindSafe for ModeContext
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