代码提交
This commit is contained in:
1 parent
e70bb4aa6f
commit
5bf3955b26
20 files changed
+636
-61
No files matched your search
@@ -9,8 +9,10 @@ import { isWujieEnv } from "@/core/embed/wujie";
|
||||
import {
|
||||
isEmbedActive,
|
||||
isChromeHidden,
|
||||
isHeaderHidden,
|
||||
isHideChromeActive,
|
||||
readEmbedParam,
|
||||
readHideHeaderParam,
|
||||
readHideChromeParam,
|
||||
} from "@/core/embed/embed-session";
|
||||
import { useTheme } from "@/contexts/ThemeContext";
|
||||
@@ -69,6 +71,12 @@ function PageLayout() {
|
||||
() => isHideChromeActive() || readHideChromeParam(location.search) === "on",
|
||||
[location.pathname, location.search],
|
||||
);
|
||||
// `?hideHeader=1` only removes the global top navigation. Unlike
|
||||
// `hideChrome=1`, PageSidebar remains available in the full layout.
|
||||
const headerHidden = useMemo(
|
||||
() => isHeaderHidden() || readHideHeaderParam(location.search) === "on",
|
||||
[location.pathname, location.search],
|
||||
);
|
||||
// `chatMode=full` is the embed-friendly standard chat view: hide the global
|
||||
// Header/PageSidebar when `hideChrome=1`, but keep WorkspaceSidebar so users
|
||||
// can still pick an agent and access their common agents/history.
|
||||
@@ -101,18 +109,20 @@ function PageLayout() {
|
||||
return (
|
||||
<RoundtableJobNotifier>
|
||||
<div className="h-full flex flex-col bg-muted/20">
|
||||
{pageSidebarAllowed && <Header collapsed={collapsed} />}
|
||||
{pageSidebarAllowed && !headerHidden && <Header collapsed={collapsed} />}
|
||||
<div className="flex flex-1 overflow-hidden">
|
||||
{pageSidebarAllowed && (
|
||||
isDark ? (
|
||||
<PageSidebarDark
|
||||
collapsed={collapsed}
|
||||
onToggleCollapsed={() => setCollapsed((prev) => !prev)}
|
||||
headerHidden={headerHidden}
|
||||
/>
|
||||
) : (
|
||||
<PageSidebar
|
||||
collapsed={collapsed}
|
||||
onToggleCollapsed={() => setCollapsed((prev) => !prev)}
|
||||
headerHidden={headerHidden}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
@@ -139,12 +149,12 @@ function PageLayout() {
|
||||
pageSidebarCollapsed={collapsed}
|
||||
pageSidebarHidden={!pageSidebarAllowed}
|
||||
workspaceSidebarHidden={hideChromeActive && !fullChatMode}
|
||||
headerHidden={!pageSidebarAllowed}
|
||||
headerHidden={!pageSidebarAllowed || headerHidden}
|
||||
// Full-chat embedding has no global PageSidebar, but it
|
||||
// still needs the full GeneralQaSidebar (common agents and
|
||||
// conversation history) inside the workspace.
|
||||
compactWorkspaceSidebar={pageSidebarAllowed || fullChatMode}
|
||||
compactActionsHidden={hideChromeActive}
|
||||
compactActionsHidden={hideChromeActive || headerHidden}
|
||||
pageSidebarDark={isDark}
|
||||
forceWorkspaceSidebarCollapsed={
|
||||
forceCollapsedSidebar && !fullChatMode
|
||||
|
||||
Reference in new issue
Block a user