pub struct PromptBuilder { /* private fields */ }Implementations§
Source§impl PromptBuilder
impl PromptBuilder
pub fn new() -> Self
Sourcepub fn with_working_dir(working_dir: Option<&Path>) -> Self
pub fn with_working_dir(working_dir: Option<&Path>) -> Self
Create PromptBuilder with a specific working directory to check for project-local custom prompt. Priority: {cwd}/.robit/prompts/agent.md > ~/.robit/prompts/agent.md
Sourcepub fn build_system_prompt(
&self,
tools: &[&dyn Tool],
skills: &[(&str, &str)],
working_dir: &Path,
) -> String
pub fn build_system_prompt( &self, tools: &[&dyn Tool], skills: &[(&str, &str)], working_dir: &Path, ) -> String
Build the complete system prompt.
The prompt is composed of:
- Agent prompt (user-provided from agent.md, or default from default.md)
- System prompt (Tools, Skills, Environment) - automatically appended, defined in system.md (built-in, never overridden by users)
skills is a list of (name, description) pairs for enabled skills.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PromptBuilder
impl RefUnwindSafe for PromptBuilder
impl Send for PromptBuilder
impl Sync for PromptBuilder
impl Unpin for PromptBuilder
impl UnsafeUnpin for PromptBuilder
impl UnwindSafe for PromptBuilder
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