feat(#2220): add low and max effort levels

claude --effort now accepts low, medium, high, xhigh, max.
Expand EFFORT_LEVELS from 3 to 5, update NixOS enum + description,
and fix the stale doc comment in web_ui.rs.

Closes #2220
This commit is contained in:
atlas 2026-07-04 17:52:48 +02:00 committed by mara
commit 742f4ef916
3 changed files with 10 additions and 8 deletions

View file

@ -583,7 +583,7 @@ pub const DEFAULT_EFFORT: &str = "medium";
/// Valid claude `--effort` levels, ascending. The operator picker is
/// constrained to these; [`is_valid_effort`] guards the persist path.
pub const EFFORT_LEVELS: [&str; 3] = ["medium", "high", "xhigh"];
pub const EFFORT_LEVELS: [&str; 5] = ["low", "medium", "high", "xhigh", "max"];
/// True iff `level` is one of [`EFFORT_LEVELS`].
#[must_use]

View file

@ -461,7 +461,7 @@ struct StateSnapshot {
/// runtime via `POST /api/effort`; applies on the next session.
effort: String,
/// Selectable effort levels for the picker, ascending. Fixed set
/// (`medium`, `high`, `xhigh`) — sourced from
/// (`low`, `medium`, `high`, `xhigh`, `max`) — sourced from
/// [`crate::events::EFFORT_LEVELS`], not operator-configurable like
/// `available_models`. The frontend renders one button per entry.
available_efforts: Vec<String>,