feat(chat): 修复 Strategy/Workspace 统一聊天布局与历史路由归属

This commit is contained in:
董宏凯 committed 2026-09-01 14:51:16 +08:00
1 parent dbf62e5889
commit 519e4c0c01
7 files changed
+107 -70

No files matched your search

+5 -1
View File
@@ -182,7 +182,11 @@ export function WorkspaceLayout({
'--header-height': headerHidden ? '0rem' : '4rem',
} as CSSProperties
}
key={String(compactWorkspaceSidebar)}
// Agent and general-chat routes share this layout component. Keep their
// sidebar state separate: otherwise React preserves the collapsed agent
// state when a history item switches to `/chats/:thread_id`, while the
// new page's header button is meant to control GeneralQaSidebar.
key={`${String(compactWorkspaceSidebar)}:${isGeneralQa ? 'general' : 'workspace'}`}
data-page-sidebar-collapsed={pageSidebarCollapsed}
defaultOpen={
forceWorkspaceSidebarCollapsed