Hmbown/CodeWhale · error
Unknown preset '{}'. Available presets: calm
Error message
Unknown preset '{}'. Available presets: calm What it means
Named settings preset application (bundled-settings mechanism): the requested preset name is not one of the shipped presets — currently only `calm` exists. The message lists the valid names so the caller can correct the request.
Source
Thrown at crates/tui/src/settings.rs:1515
}
Ok(())
}
/// Apply a named settings preset (#3478).
///
/// Presets are the first bundled-settings mechanism: a single name applies a
/// coherent group of presentation knobs. `calm` is the "beautiful/calm
/// transcript" preset — it quiets motion and verbose tool output while
/// **keeping evidence reachable**: thinking stays visible and tool runs stay
/// expandable (only their inline detail is collapsed), so maintainer/release
/// work is never blind to failures. Presentation only — no model, provider,
/// routing, or safety setting is touched. Reuses [`Settings::set`] so each
/// field goes through the same validation as a single-key set.
///
/// Returns the keys changed, or an error for an unknown preset.
pub fn apply_preset(&mut self, name: &str) -> Result<Vec<&'static str>> {
let Some(bundle) = preset_fields(name) else {
anyhow::bail!("Unknown preset '{}'. Available presets: calm", name.trim());
};
let mut changed = Vec::with_capacity(bundle.len());
for (key, value) in bundle {
self.set(key, value)?;
changed.push(*key);
}
Ok(changed)
}
/// Get all settings as a displayable string
pub fn display(&self, locale: crate::localization::Locale) -> String {
use crate::localization::{MessageId, tr};
let mut lines = Vec::new();
lines.push(tr(locale, MessageId::SettingsTitle).to_string());
lines.push("─────────────────────────────".to_string());
lines.push(format!(" auto_compact: {}", self.auto_compact));
lines.push(format!(
" auto_compact_pct: {:.0}",View on GitHub (pinned to 0c42157ee5)
Solutions
- Use the calm preset
- Or set individual settings instead
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/settings.rs:1515 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/7b0ecb34d90781c7.
Report an issue: GitHub.