pub enum AgentMode {
Casual,
Planning,
Agent,
Research,
}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, Planning, and Research modes, the prompt is assembled as:
header.md + blank line +
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, Planning, and Research modes, this returns only the mode-specific section (the header is handled separately).