pub struct Config {
pub default_provider: Option<String>,
pub default_model: Option<String>,
pub providers: HashMap<String, ProviderConfig>,
pub agents: HashMap<String, AgentConfig>,
pub permissions: PermissionConfig,
pub a2a: A2aConfig,
pub ui: UiConfig,
pub session: SessionConfig,
pub telemetry: TelemetryConfig,
pub lsp: LspSettings,
pub rlm: RlmConfig,
}Expand description
Main configuration structure
Fields§
§default_provider: Option<String>Default provider to use
default_model: Option<String>Default model to use (provider/model format)
providers: HashMap<String, ProviderConfig>Provider-specific configurations
agents: HashMap<String, AgentConfig>Agent configurations
permissions: PermissionConfigPermission rules
a2a: A2aConfigA2A worker settings
ui: UiConfigUI/TUI settings
session: SessionConfigSession settings
telemetry: TelemetryConfigTelemetry and crash reporting settings
lsp: LspSettingsLSP / linter server settings
rlm: RlmConfigRLM (Recursive Language Model) settings.
Controls when and how large-output tool results and long
conversation prefixes are handed off to the RLM router for
compression/analysis. See crate::rlm::RlmConfig for fields.
Implementations§
Source§impl Config
impl Config
Sourcepub async fn load() -> Result<Self>
pub async fn load() -> Result<Self>
Load configuration from all sources (global, project, env)
Performance: issues every candidate file read concurrently so that slow-disk or network-mounted home directories don’t sum their latency. Merge order is preserved: global < project-root < project-dot-dir < env.
Sourcepub fn global_config_path() -> Option<PathBuf>
pub fn global_config_path() -> Option<PathBuf>
Get the global config directory path
Sourcepub async fn init_default() -> Result<()>
pub async fn init_default() -> Result<()>
Initialize default configuration file
Sourcepub fn load_theme(&self) -> Theme
pub fn load_theme(&self) -> Theme
Load theme based on configuration
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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>
T in a tonic::Request