feat(webui): add lightweight session messaging via mentions

This commit is contained in:
chengyongru
2026-08-19 01:15:56 +08:00
committed by chengyongru
parent 2bdb11eeba
commit 0e184965e8
76 changed files with 8297 additions and 658 deletions
+15 -2
View File
@@ -2331,6 +2331,18 @@ 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,
);
@@ -2379,6 +2391,7 @@ function Shell({
key: session.key,
chatId: session.chatId,
title: titleForSession(session),
handle: session.handle,
}));
return [presentation.rowKey, {
tabKey: orderedTab.tabKey,
@@ -2746,7 +2759,7 @@ function Shell({
return (
<ThreadShell
session={activeSession}
sessions={sessions}
sessions={collaborationSessions}
title={headerTitle}
temporary={temporaryChatRequested}
temporaryChatIds={temporaryChatIds}
@@ -2791,7 +2804,7 @@ function Shell({
return (
<ThreadShell
session={paneSession}
sessions={sessions}
sessions={collaborationSessions}
title={pane.title}
onToggleSidebar={toggleSidebar}
onNewChat={onNewChat}