mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-27 17:58:07 +00:00
fix(desktop): null-guard the rotation signal fired from ensureSessionState
The salvaged no-op-publish guard moved the compression-rotation signal into ensureSessionState, where storedSessionId is string|null. A cleared stored id is a detach, not a rotation — firing the event with a null next id would send the route-follow effect chasing nothing (and tsc rejects it). Guard on a real next id.
This commit is contained in:
parent
9aaabdcbf4
commit
c74f48b62e
1 changed files with 3 additions and 1 deletions
|
|
@ -118,7 +118,9 @@ export function useSessionStateCache({
|
|||
if (existing.storedSessionId && existing.storedSessionId !== storedSessionId) {
|
||||
runtimeIdByStoredSessionIdRef.current.delete(existing.storedSessionId)
|
||||
|
||||
if (sessionId === $activeSessionId.get()) {
|
||||
// A rotation event needs a real next id — a null/cleared stored id
|
||||
// is a detach, not a rotation the route-follow effect should chase.
|
||||
if (storedSessionId && sessionId === $activeSessionId.get()) {
|
||||
setActiveSessionStoredIdRotation({
|
||||
nextStoredSessionId: storedSessionId,
|
||||
previousStoredSessionId: existing.storedSessionId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue