Skip to content

fix: effort switch shows by default + status shows the actual model - #21

Merged
SergKam merged 1 commit into
mainfrom
fix/model-effort-display
Jun 12, 2026
Merged

fix: effort switch shows by default + status shows the actual model#21
SergKam merged 1 commit into
mainfrom
fix/model-effort-display

Conversation

@SergKam

@SergKam SergKam commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Follow-up to #20, fixing two issues reported in testing.

1. No effort switch

The Effort section was keyed on the explicit model override, which is None until the user picks a model — so in the default state (the common case) it never rendered. Now an effective model is resolved (override → the CLI \default` entry → first model) and the effort levels + the model checkmark key off that. The Effort section now appears for the default model too, populated from its \supportedEffortLevels`.

2. Status bar showed "Default", not the real model

The status now surfaces the model the CLI actually resolved, taken from the `Started` event (previously discarded) into a new `active_model` field — e.g. `claude-opus-4-8` (the `[1m]` context suffix is stripped). It updates every turn.

  • Before the first turn (or after reopening a tab): falls back to the effective selection's display name (`Default (recommended)`).
  • The instant you send a message: resolves to the actual model id.
  • Picking a new model clears `active_model` so the new choice shows immediately, then the next turn confirms the resolved id.

Scope

  • `state`: `PanelConfig.active_model`; `PanelState.model_status_label`.
  • `agent_panel`: `effective_model_value` + `clean_model_id` helpers; `rebuild_model_menu`/`model_effort_status` key off the effective model; `update_model_status` shared with the event handler; menu actions clear `active_model` on model change.
  • `event_handler`: `Started` writes `active_model` and refreshes the status.

Checks

fmt ✅ · clippy `-D warnings` ✅ · tests ✅ (105)

Two follow-ups to the model/effort switcher:

1. Effort section never appeared unless a model was explicitly picked. It was
   keyed on the explicit override, which is None until the user chooses — so the
   common default state showed no effort control. Resolve an 'effective model'
   (override -> the CLI 'default' entry -> first) and key the effort levels + the
   model checkmark off that, so effort shows for the default model too.

2. The status bar showed a literal 'Default', not the model actually running.
   Wire the Started event's resolved model id (e.g. claude-opus-4-8[1m]) into a
   new active_model field and show it (context suffix stripped) — updated every
   turn. Before the first turn it falls back to the effective selection's display
   name. Picking a new model clears active_model so the choice shows immediately
   until the next turn confirms it.
@SergKam
SergKam merged commit 29ce1bf into main Jun 12, 2026
2 checks passed
@SergKam
SergKam deleted the fix/model-effort-display branch June 12, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant