- Replaced time-based sleeps and polling loops with event-driven promise resolvers and fake timers across agent and tool tests.
- Migrated test suites to share in-memory auth storage and fixtures using lifecycle hooks.
- Updated catalog model definitions, metadata, and configurations.
- Shared immutable model registries and auth storage via beforeAll/afterAll.
- Swapped fixed-delay settle sleeps for predicate polling and signals.
- Stubbed network/timers to drop wall-clock waits in registry and history tests.
- Added resetDisplay invalidation tests and startup-timing breakdown lines.
- Converted systemPrompt APIs and state types to ordered `string[]` across agent, AI, and coding-agent surfaces.
- Added `normalizeSystemPrompts` and applied it to context normalization before building provider request payloads.
- Updated AI providers to emit separate normalized prompt blocks/messages instead of a single merged system prompt.
- Removed dedicated `projectPrompt` state and remapped that context into system-context buckets in session, dump, and token accounting.
- Aligned tests and changelogs to pass and assert `systemPrompt` as arrays with ordered prompt semantics.
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