Files
oh-my-pi/packages/coding-agent/test
Kevin Loftis 06b8e17ddc fix(plan-mode): propagate thinking level when entering/exiting plan mode
When entering plan mode, the thinking level configured on the plan role
(e.g., 'anthropic/claude-sonnet-4-5:xhigh') was discarded because
#resolveRoleModel() called resolveModelRoleValue() but only returned
.model, dropping the thinking level.

This is the same class of bug that was fixed in cycleRoleModels (which
correctly preserves and applies thinking level from role configs).
#applyPlanModeModel was the remaining unfixed call site.

Changes:
- Refactor #resolveRoleModel to #resolveRoleModelFull returning the
  full ResolvedModelRoleValue instead of just Model
- Add resolveRoleModelWithThinking() public method exposing the full
  resolution result
- Add optional thinkingLevel param to setModelTemporary() for atomic
  model+thinking switches (eliminates two-step set-then-apply pattern)
- Bundle model+thinking into paired state objects in InteractiveMode
  (#planModePreviousModelState, #pendingModelSwitch) — eliminates
  4 parallel fields that could desync
- Simplify #applyPlanModeModel, flushPendingModelSwitch, #exitPlanMode
  to single setModelTemporary calls
- Collapse cycleRoleModels two-step into single setModelTemporary call
- Add 6 tests for resolveRoleModelWithThinking
2026-04-03 10:46:46 -07:00
..
2026-03-14 10:46:26 +01:00
WIP
2026-03-23 08:54:54 -04:00