"use client"; import dynamic from "next/dynamic"; import { usePathname } from "next/navigation"; import type { User } from "next-auth"; import type { ChatShellChromeProps } from "@/components/chat-shell-chrome"; type CustomLink = { id: string; name: string; url: string; order: number; toolboxGroup: number; }; type TutorialVideo = { id: string; title: string; videoUrl: string; coverUrl: string | null; description: string | null; order: number; }; type ChatShellProps = { children: React.ReactNode; user?: User; siteName: string; siteLogo?: string; siteLogoDark?: string; isAdmin: boolean; settingsHref?: string | null; customLinks: CustomLink[]; toolbox1Name: string; toolbox1Enabled: boolean; toolbox2Name: string; toolbox2Enabled: boolean; tutorialVideos: TutorialVideo[]; tutorialEnabled: boolean; rankingEnabled: boolean; productPlanningEnabled: boolean; agentEnabled: boolean; videoCanvasEnabled: boolean; }; const ChatShellChrome = dynamic( () => import("@/components/chat-shell-chrome").then( (module) => module.ChatShellChrome ), { loading: () =>
, ssr: false, } ); export function ChatShell({ children, user, siteName, siteLogo, siteLogoDark, isAdmin, settingsHref = null, customLinks, toolbox1Name, toolbox1Enabled, toolbox2Name, toolbox2Enabled, tutorialVideos, tutorialEnabled, rankingEnabled, productPlanningEnabled, agentEnabled, videoCanvasEnabled, }: ChatShellProps) { const pathname = usePathname(); const isLovartHome = pathname === "/"; const isAiCadWorkspace = pathname === "/ai-cad"; const isFlowBoardWorkspace = pathname === "/flow-board"; const isPascalEditorWorkspace = pathname === "/pascal-editor"; if (isLovartHome) { return