Scope active session to browser tab
This commit is contained in:
@@ -1320,10 +1320,9 @@ function useComposerContextStatus() {
|
||||
const activeSessionId = normalizeSessionId(readActiveSessionId());
|
||||
const latestMessageSessionId = normalizeSessionId(latestSessionId);
|
||||
let sessionId = normalizeSessionId(
|
||||
(isRunning
|
||||
isRunning
|
||||
? activeSessionId || latestMessageSessionId
|
||||
: latestMessageSessionId || activeSessionId) ||
|
||||
normalizeSessionId(statePayload.active_session_id),
|
||||
: latestMessageSessionId || activeSessionId,
|
||||
);
|
||||
if (sessionId) writeActiveSessionId(sessionId);
|
||||
let sessionPayload: ClawStoredSession | null = null;
|
||||
|
||||
@@ -492,9 +492,7 @@ function AccountMenu({
|
||||
: [];
|
||||
setState(nextState);
|
||||
setSessions(nextSessions);
|
||||
const activeSessionId = normalizeSessionId(
|
||||
readActiveSessionId() ?? nextState?.active_session_id,
|
||||
);
|
||||
const activeSessionId = normalizeSessionId(readActiveSessionId());
|
||||
if (!activeSessionId) {
|
||||
setActiveSession(null);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user