pub struct ConfigToml {Show 25 fields
pub api_key: Option<String>,
pub base_url: Option<String>,
pub http_headers: BTreeMap<String, String>,
pub default_text_model: Option<String>,
pub provider: ProviderKind,
pub model: Option<String>,
pub auth_mode: Option<String>,
pub output_mode: Option<String>,
pub verbosity: Option<String>,
pub log_level: Option<String>,
pub telemetry: Option<bool>,
pub approval_policy: Option<String>,
pub sandbox_mode: Option<String>,
pub tools: Option<ToolsToml>,
pub providers: ProvidersToml,
pub fallback_providers: Vec<ProviderKind>,
pub network: Option<NetworkPolicyToml>,
pub skills: Option<SkillsToml>,
pub snapshots: Option<SnapshotsToml>,
pub lsp: Option<LspConfigToml>,
pub harness_profiles: Vec<HarnessProfile>,
pub hotbar: Option<Vec<HotbarBindingToml>>,
pub hook_sinks: Option<HookSinksToml>,
pub fleet: Option<FleetConfigToml>,
pub extras: BTreeMap<String, Value>,
}Fields§
§api_key: Option<String>TUI-compatible DeepSeek API key. Kept at the root so both deepseek
and codewhale-tui can share a single config file.
base_url: Option<String>TUI-compatible DeepSeek base URL.
http_headers: BTreeMap<String, String>Optional extra HTTP headers forwarded to model API requests.
default_text_model: Option<String>TUI-compatible default DeepSeek model.
provider: ProviderKind§model: Option<String>§auth_mode: Option<String>§output_mode: Option<String>§verbosity: Option<String>§log_level: Option<String>§telemetry: Option<bool>§approval_policy: Option<String>§sandbox_mode: Option<String>§tools: Option<ToolsToml>Native tool catalog controls shared with codewhale-tui.
providers: ProvidersToml§fallback_providers: Vec<ProviderKind>Provider fallback chain (#2574). TUI runtime code may advance through these providers after recoverable provider errors; config resolution itself still reports the selected primary provider.
network: Option<NetworkPolicyToml>Per-domain network policy (#135). When absent, network tools fall back to a permissive default that mirrors pre-v0.7.0 behavior.
skills: Option<SkillsToml>Community skill installer settings (#140). Mirrors
SkillsToml from the TUI side; the dispatcher consults
registry_url when running deepseek skill install.
snapshots: Option<SnapshotsToml>Workspace side-git snapshots (#137). The live TUI defaults this to enabled with 7-day retention when absent.
lsp: Option<LspConfigToml>Post-edit LSP diagnostics injection (#136). When absent, the engine
applies the defaults documented in LspConfigToml.
harness_profiles: Vec<HarnessProfile>Per-model harness profiles (#2693). Runtime wiring lands in follow-up v0.9 slices; this is the durable config data model.
hotbar: Option<Vec<HotbarBindingToml>>Optional 1-8 hotbar slot bindings (#2064). When absent, the TUI falls back to the built-in default slots.
hook_sinks: Option<HookSinksToml>App-server hook sink configuration. Kept separate from the TUI
lifecycle [hooks] table so config rewrites preserve existing hooks.
fleet: Option<FleetConfigToml>Agent Fleet trust and security policy (#3165). When absent, fleet workers inherit conservative Sandbox defaults.
extras: BTreeMap<String, Value>Implementations§
Source§impl ConfigToml
impl ConfigToml
Sourcepub fn resolve_harness_profile(
&self,
provider_route: &str,
model: &str,
) -> Option<&HarnessProfile>
pub fn resolve_harness_profile( &self, provider_route: &str, model: &str, ) -> Option<&HarnessProfile>
Resolve the first configured harness profile for a provider/model route.
This helper is deliberately dormant for v0.9: callers may display or test the resolved profile, but runtime provider/model routing and prompt shaping remain unchanged until a later, explicit integration slice.
Sourcepub fn resolve_hotbar_bindings(
&self,
known_action_ids: &[&str],
) -> HotbarConfigResolution
pub fn resolve_hotbar_bindings( &self, known_action_ids: &[&str], ) -> HotbarConfigResolution
Resolve durable hotbar config into normalized 1-8 slot bindings.
known_action_ids is supplied by the TUI action registry in later
slices. Unknown actions are preserved so the UI can render a disabled
? cell instead of silently deleting user config.
Source§impl ConfigToml
impl ConfigToml
Sourcepub fn merge_project_overrides(&mut self, project: ConfigToml)
pub fn merge_project_overrides(&mut self, project: ConfigToml)
Merge safe project-level overrides from $WORKSPACE/.codewhale/config.toml
or legacy $WORKSPACE/.deepseek/config.toml.
Repo-local config is untrusted input. This helper intentionally ignores credentials, endpoints, provider selection, auth/session values, telemetry, network policy, skill registry, LSP command tables, and unknown extras. Approval and sandbox values may only tighten the existing user/global posture.
pub fn get_value(&self, key: &str) -> Option<String>
pub fn get_display_value(&self, key: &str) -> Option<String>
pub fn set_value(&mut self, key: &str, value: &str) -> Result<()>
pub fn unset_value(&mut self, key: &str) -> Result<()>
pub fn list_values(&self) -> BTreeMap<String, String>
Sourcepub fn resolve_runtime_options(
&self,
cli: &CliRuntimeOverrides,
) -> ResolvedRuntimeOptions
pub fn resolve_runtime_options( &self, cli: &CliRuntimeOverrides, ) -> ResolvedRuntimeOptions
Resolve runtime options without touching platform credential stores.
This method keeps library callers prompt-free: CLI flag → config file
→ environment. Call resolve_runtime_options_with_secrets when a
user-facing dispatcher should recover credentials from the configured
secret store.
Sourcepub fn resolve_runtime_options_with_secrets(
&self,
cli: &CliRuntimeOverrides,
secrets: &Secrets,
) -> ResolvedRuntimeOptions
pub fn resolve_runtime_options_with_secrets( &self, cli: &CliRuntimeOverrides, secrets: &Secrets, ) -> ResolvedRuntimeOptions
Resolve runtime options using an explicit secrets façade.
API-key precedence is CLI flag → config-file → secret store → environment.
Trait Implementations§
Source§impl Clone for ConfigToml
impl Clone for ConfigToml
Source§fn clone(&self) -> ConfigToml
fn clone(&self) -> ConfigToml
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more