Fix pending Jupyter workspace handoff
This commit is contained in:
@@ -20,8 +20,8 @@ import {
|
||||
SidebarTrigger,
|
||||
} from "@/components/ui/sidebar";
|
||||
import {
|
||||
consumePendingWorkspaceSessionId,
|
||||
readActiveSessionId,
|
||||
readPendingWorkspaceSessionId,
|
||||
writeActiveSessionId,
|
||||
} from "@/lib/claw-active-session";
|
||||
import { ClawSessionReplayProvider } from "@/lib/claw-session-replay";
|
||||
@@ -39,19 +39,13 @@ export const Assistant = () => {
|
||||
const selectedSessionId = readActiveSessionId();
|
||||
const lastSessionId = getLastSessionId(messages);
|
||||
const pendingWorkspaceSessionId =
|
||||
messages.length <= 1 ? consumePendingWorkspaceSessionId() : null;
|
||||
const usablePendingWorkspaceSessionId =
|
||||
pendingWorkspaceSessionId &&
|
||||
(!selectedSessionId ||
|
||||
selectedSessionId === pendingWorkspaceSessionId)
|
||||
? pendingWorkspaceSessionId
|
||||
: null;
|
||||
messages.length <= 1 ? readPendingWorkspaceSessionId() : null;
|
||||
const selectedResumeSessionId =
|
||||
messages.length > 1 ? selectedSessionId : null;
|
||||
const outgoingSessionId =
|
||||
lastSessionId ??
|
||||
selectedResumeSessionId ??
|
||||
usablePendingWorkspaceSessionId ??
|
||||
pendingWorkspaceSessionId ??
|
||||
options.id;
|
||||
const lastUserMessage = [...messages]
|
||||
.reverse()
|
||||
|
||||
Reference in New Issue
Block a user