mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-23 14:14:46 +08:00
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import { MessageSquarePlus, MessagesSquare } from "lucide-react";
|
|
import Link from "next/link";
|
|
import { usePathname } from "next/navigation";
|
|
|
|
import {
|
|
SidebarGroup,
|
|
SidebarMenu,
|
|
SidebarMenuButton,
|
|
SidebarMenuItem,
|
|
} from "@/components/ui/sidebar";
|
|
|
|
export function WorkspaceNavMenu() {
|
|
const pathname = usePathname();
|
|
return (
|
|
<SidebarGroup>
|
|
<SidebarMenu>
|
|
<SidebarMenuItem>
|
|
<SidebarMenuButton
|
|
isActive={pathname === "/workspace/chats/new"}
|
|
asChild
|
|
>
|
|
<Link className="text-muted-foreground" href="/workspace/chats/new">
|
|
<MessageSquarePlus size={16} />
|
|
<span>New chat</span>
|
|
</Link>
|
|
</SidebarMenuButton>
|
|
</SidebarMenuItem>
|
|
<SidebarMenuItem>
|
|
<SidebarMenuButton isActive={pathname === "/workspace/chats"} asChild>
|
|
<Link className="text-muted-foreground" href="/workspace/chats">
|
|
<MessagesSquare />
|
|
<span>Chats</span>
|
|
</Link>
|
|
</SidebarMenuButton>
|
|
</SidebarMenuItem>
|
|
</SidebarMenu>
|
|
</SidebarGroup>
|
|
);
|
|
}
|