pub struct Settings {
pub default_provider: Option<String>,
pub default_model: Option<String>,
pub default_thinking_level: Option<String>,
pub tools: Vec<String>,
pub exclude_tools: Vec<String>,
pub theme: Option<String>,
pub verbose: bool,
pub hide_thinking: Option<bool>,
pub collapse_tool_output: Option<bool>,
}Expand description
Settings schema matching pi’s settings.json format. API keys live in auth.json, not here.
Fields§
§default_provider: Option<String>§default_model: Option<String>§default_thinking_level: Option<String>§tools: Vec<String>§exclude_tools: Vec<String>§theme: Option<String>§verbose: bool§hide_thinking: Option<bool>Hide thinking blocks (Ctrl+T toggle). Persisted to settings.json.
collapse_tool_output: Option<bool>Collapse tool output (Ctrl+O toggle). Persisted to settings.json.
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn load(cwd: &Path) -> Result<Self>
pub fn load(cwd: &Path) -> Result<Self>
Load settings from the global agent config path and project-local path.
Sourcepub fn load_from(global_path: PathBuf, cwd: &Path) -> Result<Self>
pub fn load_from(global_path: PathBuf, cwd: &Path) -> Result<Self>
Load settings with an explicit global config path (for testing).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
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 Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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