diff --git a/frontend/app/components/assistant-ui/thread.tsx b/frontend/app/components/assistant-ui/thread.tsx index 76fa85b..33123da 100644 --- a/frontend/app/components/assistant-ui/thread.tsx +++ b/frontend/app/components/assistant-ui/thread.tsx @@ -424,6 +424,9 @@ const ChatTopActions: FC = () => { const [workspaceOpen, setWorkspaceOpen] = useState(false); const normalizedSessionId = useCurrentThreadSessionId({ includePending: true, + // 工作区切换必须绑定当前可见会话;空白新会话不能回退到上一个 + // activeSessionId,否则会把 Jupyter 工作区切到旧会话上。 + includeActive: false, }); const workspaceStatus = useJupyterWorkspaceStatus(normalizedSessionId); @@ -849,6 +852,7 @@ const Composer: FC = () => { const replayedRun = useReplayedRunState(); const workspaceSessionId = useCurrentThreadSessionId({ includePending: true, + includeActive: false, }); return (