refactor: simplify cross-session messaging

This commit is contained in:
chengyongru
2026-08-19 01:15:56 +08:00
committed by chengyongru
parent 0e184965e8
commit 251a1ccd40
78 changed files with 1578 additions and 7569 deletions
+2 -14
View File
@@ -2331,18 +2331,6 @@ function Shell({
.map((key) => byKey.get(key))
.filter((session): session is ChatSummary => session !== undefined);
}, [activeTabKey, activeTabState, orderedWorkbenchTabsByKey, sessions]);
const collaborationSessions = useMemo(() => {
const nearby = workbenchPaneSessions.length > 0
? workbenchPaneSessions
: activeSession
? [activeSession]
: [];
const nearbyKeys = new Set(nearby.map((session) => session.key));
return [
...nearby,
...sessions.filter((session) => !nearbyKeys.has(session.key)),
];
}, [activeSession, sessions, workbenchPaneSessions]);
const paneChromeEnabled = Boolean(
activeKey && activeSession && !temporaryChatActive && activeTabState,
);
@@ -2759,7 +2747,7 @@ function Shell({
return (
<ThreadShell
session={activeSession}
sessions={collaborationSessions}
sessions={sessions}
title={headerTitle}
temporary={temporaryChatRequested}
temporaryChatIds={temporaryChatIds}
@@ -2804,7 +2792,7 @@ function Shell({
return (
<ThreadShell
session={paneSession}
sessions={collaborationSessions}
sessions={sessions}
title={pane.title}
onToggleSidebar={toggleSidebar}
onNewChat={onNewChat}