mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-20 15:33:54 +00:00
selectModel in use-model-controls captured activeSessionId as a closure prop, but the actions bag in wiring.tsx mutates in place to keep a stable identity for memoized surfaces. The modelMenuContent useMemo captures selectModel once when the gateway first opens (before any session is active) and never re-evaluates, so clicking a model in an existing thread goes through a stale closure with activeSessionId=null — the pick is treated as UI-only, config.set is never sent, and the next session.info event clobbers the optimistic update back to the session's real model. Drop the activeSessionId prop entirely. All three callbacks now read $activeSessionId.get() live from the store, matching the pattern refreshCurrentModel already followed. This is the correct contract for the actions bag's in-place mutation: callbacks read live state from the store, not from captured props. |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||