Hmbown/CodeWhale · error · anyhow::Error

Failed to update setting: invalid inline diff mode '{value}'

Error message

Failed to update setting: invalid inline diff mode '{value}'. Expected: full, summary, or off.

What it means

Settings update validation for the inline-diff key (inline_diffs/inline_diff/diffs): the normalized value is neither full, summary, nor off. Controls how diffs render in the transcript; invalid values are rejected rather than defaulted.

Source

Thrown at crates/tui/src/settings.rs:1334

                self.thinking_preview_lines =
                    parse_usize_setting("thinking_preview_lines", value)?.min(40);
            }
            "thinking_highlight" | "reasoning_highlight" => {
                self.thinking_highlight = parse_bool(value)?;
            }
            "help_expand_groups" | "help_expanded" => {
                self.help_expand_groups = parse_bool(value)?;
            }
            "pin_last_prompt" | "pin_prompt" => {
                self.pin_last_prompt = parse_bool(value)?;
            }
            "show_tool_details" | "tool_details" => {
                self.show_tool_details = parse_bool(value)?;
            }
            "inline_diffs" | "inline_diff" | "diffs" => {
                let normalized = value.trim().to_ascii_lowercase();
                if !matches!(normalized.as_str(), "full" | "summary" | "off") {
                    anyhow::bail!(
                        "Failed to update setting: invalid inline diff mode '{value}'. Expected: full, summary, or off."
                    );
                }
                self.inline_diffs = normalized;
            }
            "locale" | "language" => {
                let Some(locale) = normalize_configured_locale(value) else {
                    anyhow::bail!(
                        "Failed to update setting: invalid locale '{value}'. Expected: {}.",
                        crate::localization::configured_locale_values(", ")
                    );
                };
                self.locale = locale.to_string();
            }
            "theme" => {
                self.theme = normalize_theme_setting(value).map_err(anyhow::Error::msg)?;
            }
            "ui_theme" => {

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Use full, summary, or off for the inline diff mode
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/settings.rs:1334 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/17cf7400493451c7. Report an issue: GitHub.