pub struct Config {Show 14 fields
pub default_provider: String,
pub default_workdir: Option<String>,
pub providers: HashMap<String, ProviderConfig>,
pub datalog: DatalogConfig,
pub notifications: NotificationConfig,
pub auto_update: bool,
pub telemetry: TelemetryConfig,
pub lsp: LspConfig,
pub auto_commit: bool,
pub subagent: SubAgentConfig,
pub vision_preprocessor_provider: Option<String>,
pub language: Option<Locale>,
pub ui: UiConfig,
pub plugin: PluginConfig,
}Fields§
§default_provider: String§default_workdir: Option<String>Default working directory. Saved on /cd, restored on startup.
providers: HashMap<String, ProviderConfig>§datalog: DatalogConfigPer-turn datalog settings. Missing from older configs → defaults to enabled=true, dir=“$ATOMCODE_HOME/datalog” (project slug appended underneath).
skip_serializing intentionally suppresses serde’s automatic output;
save() writes this section manually with explanatory comments and
the resolved default dir value so users can see and edit it without
having to know the field names in advance.
notifications: NotificationConfigTask-finished notifications. Saved manually with help comments so users can discover the terminal-first strategy and platform fallbacks.
auto_update: boolWhen true (default), atomcode polls for new releases every hour
while running and stages any newer version it finds. The stage is
applied on the next startup (see self_update::apply_pending_upgrade).
Set to false to disable auto-staging entirely; /upgrade still
works manually. Missing from older configs → defaults to true.
telemetry: TelemetryConfigTelemetry configuration. Missing from older configs → defaults to
enabled=None (consent-pending), endpoint=None (use the built-in default).
Uses #[serde(default)] because TelemetryConfig has its own Default
impl that matches the no-section-present semantics.
lsp: LspConfigLSP integration configuration.
auto_commit: boolAutomatically commit edited files after each agent turn completes. Only applies when working inside a git repository.
subagent: SubAgentConfigSub-agent execution policy. Missing from older configs → defaults to enabled=true, initial_turns=4, max_turns=12, max_concurrent=3, timeout_secs=300.
vision_preprocessor_provider: Option<String>Provider key (matches a key in Config.providers) of a vision-language
model used to preprocess images before forwarding to a non-vision main
provider. When None or empty, image preprocessing is disabled — pasted
images either go directly to a vision-capable main provider, or get
degraded to "[image attached]" placeholder by the existing path.
Example value: "AtomGit-Qwen-Qwen3-VL-32B-Instruct".
language: Option<Locale>UI / prompt language override. None means auto-detect from the
environment (LC_ALL / LANG / system default). Persisted as the
short key defined by Locale’s serde rename (e.g. "zh_CN").
ui: UiConfigUI rendering preferences. Currently exposes the light/dark theme
switch driving the TUIX colour palette (markdown headings, code
block syntax highlight, session-name pill). Missing from older
configs → defaults to dark (legacy behaviour).
plugin: PluginConfigPlugin marketplace bootstrap + auto-update behaviour. Missing
from older configs → both knobs default to true, matching the
“ship batteries included” UX: first-startup auto-installs the
default atomcode-skills marketplace, and an in-place version
upgrade silently git pulls every installed marketplace so
skills track the binary.
Implementations§
Source§impl Config
impl Config
Sourcepub fn can_handle_attached_images(&self) -> bool
pub fn can_handle_attached_images(&self) -> bool
True iff attaching an image to the active turn will reach a model
that can process it — either the active provider accepts images
directly, or vision_preprocessor_provider points at a real entry
in providers that will OCR them before forwarding. Used by the
TUIX Ctrl+V paste gate to decide whether to accept the image or
reject with the “switch to a vision-capable model” hint.
Source§impl Config
impl Config
Sourcepub fn default_context_window(&self) -> usize
pub fn default_context_window(&self) -> usize
Context window of the currently-selected default provider. Falls back to 128_000 when the default_provider is missing or has no provider entry — matches pre-existing behavior at the ~5 sites that previously open-coded this lookup.
pub fn load(path: &Path) -> Result<Self>
pub fn save(&self, path: &Path) -> Result<()>
pub fn active_provider( &self, override_name: Option<&str>, ) -> Result<&ProviderConfig>
pub fn config_dir() -> PathBuf
pub fn default_path() -> PathBuf
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 more