pub struct SystemPromptOptions {
pub custom_prompt: Option<String>,
pub force_system_prompt: Option<String>,
pub selected_tools: Vec<String>,
pub tool_snippets: IndexMap<String, String>,
pub tool_guidelines: IndexMap<String, Vec<String>>,
pub prompt_guidelines: Vec<String>,
pub append_system_prompt: String,
pub sections: IndexMap<String, String>,
pub cwd: PathBuf,
pub context_files: Vec<ContextFile>,
pub skills: Vec<Skill>,
}Expand description
pi’s normalized BuildSystemPromptOptions. Handlers edit it and hand it
back, so a key they removed takes its empty value.
Fields§
§custom_prompt: Option<String>Replaces the default preamble, tools, rules and docs (SYSTEM.md,
--system-prompt).
force_system_prompt: Option<String>The whole prompt, as a before_agent_start handler set it.
selected_tools: Vec<String>Active tool names, in order.
tool_snippets: IndexMap<String, String>One-line summaries by tool name; tools without one are not listed.
tool_guidelines: IndexMap<String, Vec<String>>Rule bullets by tool name.
prompt_guidelines: Vec<String>Extra rule bullets.
append_system_prompt: StringAppended after the rules (APPEND_SYSTEM.md, --append-system-prompt);
empty for none.
sections: IndexMap<String, String>Extra sections from extensions, by tag name.
cwd: PathBufWorking directory.
context_files: Vec<ContextFile>Context files.
skills: Vec<Skill>Skills.
Trait Implementations§
Source§impl Clone for SystemPromptOptions
impl Clone for SystemPromptOptions
Source§impl Debug for SystemPromptOptions
impl Debug for SystemPromptOptions
Source§impl Default for SystemPromptOptions
impl Default for SystemPromptOptions
Source§impl<'de> Deserialize<'de> for SystemPromptOptionswhere
SystemPromptOptions: Default,
impl<'de> Deserialize<'de> for SystemPromptOptionswhere
SystemPromptOptions: Default,
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
Source§impl PartialEq for SystemPromptOptions
impl PartialEq for SystemPromptOptions
Source§impl Serialize for SystemPromptOptions
impl Serialize for SystemPromptOptions
impl StructuralPartialEq for SystemPromptOptions
Auto Trait Implementations§
impl Freeze for SystemPromptOptions
impl RefUnwindSafe for SystemPromptOptions
impl Send for SystemPromptOptions
impl Sync for SystemPromptOptions
impl Unpin for SystemPromptOptions
impl UnsafeUnpin for SystemPromptOptions
impl UnwindSafe for SystemPromptOptions
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