singularity-forge/packages/pi-agent-core/src
Tom Boucher 8d4b9d08a5 fix(footer): display active inference model during execution (#1982)
* fix(footer): display active inference model instead of configured model (#1844)

The footer read state.model which updates immediately on model selection,
but the running agent loop captures the model at _runLoop() start time.
This caused the footer to show the wrong model when the user switched
models mid-inference.

Add activeInferenceModel to AgentState, set it when _runLoop begins, and
clear it when the loop ends. The footer now prefers activeInferenceModel
over model, so it always shows the model actually being used for the
current inference.

Bug 2 follow-up to PR #1975 which fixed Bug 1 (queued messages cancel
tool calls).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ci: retrigger after stale check

* fix(test): rewrite agent test to use structural assertions

The mock StreamFn returned a plain AsyncGenerator but
AssistantMessageEventStream requires additional properties,
causing CI build failure. Rewrote tests as source-verification
assertions (matching other GSD test patterns) and excluded
test files from tsconfig build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:06:49 -06:00
..
agent-loop.ts refactor: deduplicate error emission and message patterns in agent-core (#1444) 2026-03-19 15:39:12 -06:00
agent.test.ts fix(footer): display active inference model during execution (#1982) 2026-03-22 17:06:49 -06:00
agent.ts fix(footer): display active inference model during execution (#1982) 2026-03-22 17:06:49 -06:00
index.ts feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
proxy.ts Merge pull request #1448 from frizynn/refactor/deduplicate-small-utilities 2026-03-19 15:46:13 -06:00
types.ts fix(footer): display active inference model during execution (#1982) 2026-03-22 17:06:49 -06:00