Files
deer-flow/frontend/src/components/workspace/workspace-sidebar.tsx

39 lines
967 B
TypeScript
Raw Normal View History

2026-01-20 16:00:39 +08:00
"use client";
2026-01-15 23:40:21 +08:00
import {
Sidebar,
SidebarHeader,
SidebarContent,
SidebarFooter,
SidebarRail,
useSidebar,
2026-01-15 23:40:21 +08:00
} from "@/components/ui/sidebar";
import { RecentChatList } from "./recent-chat-list";
import { WorkspaceHeader } from "./workspace-header";
2026-01-22 14:19:54 +08:00
import { WorkspaceNavChatList } from "./workspace-nav-chat-list";
2026-01-15 23:40:21 +08:00
import { WorkspaceNavMenu } from "./workspace-nav-menu";
export function WorkspaceSidebar({
...props
}: React.ComponentProps<typeof Sidebar>) {
const { open: isSidebarOpen } = useSidebar();
2026-01-15 23:40:21 +08:00
return (
2026-01-20 23:43:21 +08:00
<>
<Sidebar variant="sidebar" collapsible="icon" {...props}>
<SidebarHeader className="py-0">
<WorkspaceHeader />
</SidebarHeader>
<SidebarContent>
2026-01-22 14:19:54 +08:00
<WorkspaceNavChatList />
{isSidebarOpen && <RecentChatList />}
2026-01-20 23:43:21 +08:00
</SidebarContent>
<SidebarFooter>
2026-01-22 14:19:54 +08:00
<WorkspaceNavMenu />
2026-01-20 23:43:21 +08:00
</SidebarFooter>
<SidebarRail />
</Sidebar>
</>
2026-01-15 23:40:21 +08:00
);
}