refactor: remove old chat components and implement new sidebar structure

- Deleted `chats-client.tsx` and `page.tsx` as part of the chat management overhaul.
- Introduced `AllChatsSidebar` and `NavChats` components for improved chat navigation and management.
- Updated sidebar to integrate new chat components and removed the deprecated `NavProjects`.
- Enhanced chat deletion handling and added loading states for better user experience.
- Added new translation keys for chat-related UI strings.
This commit is contained in:
Anish Sarkar 2025-12-19 03:53:40 +05:30
parent 90b4ce6e43
commit 79e552520a
11 changed files with 500 additions and 672 deletions

View file

@ -113,9 +113,9 @@ function UserAvatar({ email, size = 32 }: { email: string; size?: number }) {
);
}
import { NavChats } from "@/components/sidebar/nav-chats";
import { NavMain } from "@/components/sidebar/nav-main";
import { NavNotes } from "@/components/sidebar/nav-notes";
import { NavProjects } from "@/components/sidebar/nav-projects";
import { NavSecondary } from "@/components/sidebar/nav-secondary";
import { PageUsageDisplay } from "@/components/sidebar/page-usage-display";
import {
@ -446,11 +446,12 @@ export const AppSidebar = memo(function AppSidebar({
<SidebarContent className="space-y-6">
<NavMain items={processedNavMain} />
{processedRecentChats.length > 0 && (
<div className="space-y-2">
<NavProjects chats={processedRecentChats} />
</div>
)}
<div className="space-y-2">
<NavChats
chats={processedRecentChats}
searchSpaceId={searchSpaceId}
/>
</div>
<div className="space-y-2">
<NavNotes