Skip to main content

Module settings

Module settings 

Source
Expand description

Settings system - Persistent user preferences

Settings are stored at ~/.codewhale/settings.toml, with legacy fallbacks.

There is one persisted settings store. The historical tui.toml second store is folded into it on load and moved aside with a receipt — see TuiPrefsMigration.

Structs§

AgentQuotaSetting
AgentSettings
PinnedModel
User settings with defaults
Settings
SettingsTransaction
Proof that the caller is inside the settings critical section.
TuiPrefsMigration
What the one-time tui.toml fold did, so a session can say it out loud.

Enums§

InlineDiffMode
How successful structured file mutations are represented in the live transcript. Exact evidence is retained for inspection in every mode.
MotionOverride
The runtime overlay that forces low_motion on, when one wins over the persisted value. Mirrors the precedence of Settings::apply_env_overrides so a settings surface can name the real owner instead of calling a forced value “saved”.

Constants§

AGENT_QUOTA_KEY_PREFIX
CALM_PRESET_FIELDS
The calm transcript preset (#3478): a coherent “beautiful/calm” bundle that favors a quiet, readable transcript over debug-dense output. Presentation only, and evidence-preserving — show_thinking is deliberately left untouched (thinking stays visible) and tool runs only have their inline detail collapsed, never hidden. Keyed by Settings::set names so the preset and a single-key /config set share one validation path.
WORK_SURFACE_TOP_HEIGHT_MAX
WORK_SURFACE_TOP_HEIGHT_MIN
Smallest Top work surface that can show its divider plus the compact goal / to-do / Agent projection without turning the rail into invisible keyboard state. Older releases accepted two rows, which left only one content row and could hide every actionable item behind the goal title.

Functions§

detect_low_motion_override
Detect which runtime overlay forces low_motion, in the order Settings::apply_env_overrides applies them.
detected_legacy_windows_console_host
Returns true for the unmarked Windows console-host path used by plain PowerShell / cmd.exe. Modern Windows terminals set at least one marker that lets us keep the richer rendering path.
detected_ptyxis_terminal
Returns true when the active terminal is Ptyxis (the new default terminal on Ubuntu 26.04). Used by Settings::apply_env_overrides to flip synchronized_output from auto to off so DEC mode 2026 flicker on Ptyxis 50.x + VTE 0.84.x stops at the source.
preset_fields
The (key, value) fields a named preset applies, or None for an unknown name. Single source of truth shared by Settings::apply_preset and the /config preset command so the bundle is never defined twice.
with_settings_transaction
Run operation as one whole-file settings critical section.