feat: make new chat always on top

This commit is contained in:
Henry Li
2026-01-19 00:00:35 +08:00
parent 63fa500716
commit d8391ca3ea
2 changed files with 48 additions and 35 deletions

View File

@@ -1,6 +1,6 @@
"use client";
import { MessageSquarePlus, MessagesSquare } from "lucide-react";
import { MessagesSquare } from "lucide-react";
import Link from "next/link";
import { usePathname } from "next/navigation";
@@ -14,19 +14,8 @@ import {
export function WorkspaceNavMenu() {
const pathname = usePathname();
return (
<SidebarGroup>
<SidebarGroup className="pt-1">
<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">