pub struct SettingsManager { /* private fields */ }Expand description
Settings manager for loading and accessing settings
Implementations§
Source§impl SettingsManager
impl SettingsManager
Sourcepub fn new(project_dir: impl AsRef<Path>) -> Result<Self>
pub fn new(project_dir: impl AsRef<Path>) -> Result<Self>
Create a new settings manager and load settings
§Arguments
project_dir- The project working directory
Sourcepub fn new_with_settings(
settings: Settings,
project_dir: impl AsRef<Path>,
) -> Self
pub fn new_with_settings( settings: Settings, project_dir: impl AsRef<Path>, ) -> Self
Create a new settings manager with provided settings (fallback)
§Arguments
settings- The settings to useproject_dir- The project working directory
Sourcepub fn project_dir(&self) -> &Path
pub fn project_dir(&self) -> &Path
Get the project directory
Sourcepub fn system_prompt(&self) -> Option<&str>
pub fn system_prompt(&self) -> Option<&str>
Get the system prompt if configured
Sourcepub fn permission_mode(&self) -> Option<&str>
pub fn permission_mode(&self) -> Option<&str>
Get the permission mode if configured
Sourcepub fn small_fast_model(&self) -> Option<&str>
pub fn small_fast_model(&self) -> Option<&str>
Get the small/fast model if configured
Sourcepub fn api_base_url(&self) -> Option<&str>
pub fn api_base_url(&self) -> Option<&str>
Get the API base URL if configured
Sourcepub fn always_thinking_enabled(&self) -> bool
pub fn always_thinking_enabled(&self) -> bool
Get whether extended thinking mode is always enabled
Sourcepub fn mcp_servers(&self) -> Option<&HashMap<String, McpServerConfig>>
pub fn mcp_servers(&self) -> Option<&HashMap<String, McpServerConfig>>
Get MCP servers configuration
Sourcepub fn is_tool_allowed(&self, tool_name: &str) -> bool
pub fn is_tool_allowed(&self, tool_name: &str) -> bool
Check if a tool is allowed
Trait Implementations§
Source§impl Debug for SettingsManager
impl Debug for SettingsManager
Auto Trait Implementations§
impl Freeze for SettingsManager
impl RefUnwindSafe for SettingsManager
impl Send for SettingsManager
impl Sync for SettingsManager
impl Unpin for SettingsManager
impl UnwindSafe for SettingsManager
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
fn into_option(self) -> Option<T>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request