mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-21 13:24:44 +08:00
39 lines
967 B
TypeScript
39 lines
967 B
TypeScript
"use client";
|
|
|
|
import {
|
|
Sidebar,
|
|
SidebarHeader,
|
|
SidebarContent,
|
|
SidebarFooter,
|
|
SidebarRail,
|
|
useSidebar,
|
|
} from "@/components/ui/sidebar";
|
|
|
|
import { RecentChatList } from "./recent-chat-list";
|
|
import { WorkspaceHeader } from "./workspace-header";
|
|
import { WorkspaceNavChatList } from "./workspace-nav-chat-list";
|
|
import { WorkspaceNavMenu } from "./workspace-nav-menu";
|
|
|
|
export function WorkspaceSidebar({
|
|
...props
|
|
}: React.ComponentProps<typeof Sidebar>) {
|
|
const { open: isSidebarOpen } = useSidebar();
|
|
return (
|
|
<>
|
|
<Sidebar variant="sidebar" collapsible="icon" {...props}>
|
|
<SidebarHeader className="py-0">
|
|
<WorkspaceHeader />
|
|
</SidebarHeader>
|
|
<SidebarContent>
|
|
<WorkspaceNavChatList />
|
|
{isSidebarOpen && <RecentChatList />}
|
|
</SidebarContent>
|
|
<SidebarFooter>
|
|
<WorkspaceNavMenu />
|
|
</SidebarFooter>
|
|
<SidebarRail />
|
|
</Sidebar>
|
|
</>
|
|
);
|
|
}
|