pub enum AgentMode {
Casual,
Planning,
Agent,
}Variants§
Implementations§
Source§impl AgentMode
impl AgentMode
Sourcepub fn prompts_filename(&self) -> &'static str
pub fn prompts_filename(&self) -> &'static str
Returns the filename for this mode’s prompt file (e.g. “casual.md”).
Sourcepub fn uses_header(&self) -> bool
pub fn uses_header(&self) -> bool
Returns whether this mode uses the shared developer header. Casual mode is self-contained; all other modes use header + mode section.
Sourcepub fn load_system_prompt(&self, prompts_dir: &Path) -> String
pub fn load_system_prompt(&self, prompts_dir: &Path) -> String
Load the system prompt for this mode from .md files in prompts_dir.
For Agent and Planning modes, the prompt is assembled as:
header.md + blank line + <mode>.md
Casual mode uses only its own file (self-contained).
Falls back to hardcoded defaults if files cannot be read.
Sourcepub fn default_system_prompt(&self) -> &'static str
pub fn default_system_prompt(&self) -> &'static str
Returns the hardcoded default system prompt (embedded at compile time
via include_str!). Used as fallback when no custom prompt file exists
and as the seed for first-launch initialization.
For Agent and Planning modes, this returns only the mode-specific section (the header is handled separately).
Trait Implementations§
impl Copy for AgentMode
Source§impl<'de> Deserialize<'de> for AgentMode
impl<'de> Deserialize<'de> for AgentMode
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>,
impl Eq for AgentMode
impl StructuralPartialEq for AgentMode
Auto Trait Implementations§
impl Forget for AgentMode
impl Freeze for AgentMode
impl RefUnwindSafe for AgentMode
impl Send for AgentMode
impl Sync for AgentMode
impl Unpin for AgentMode
impl UnsafeUnpin for AgentMode
impl UnwindSafe for AgentMode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.