feat: Document Selector in Chat.

- Still need improvements but lets use it first.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-06-04 21:46:50 -07:00
parent e8a19c496b
commit d7bb31f894
12 changed files with 599 additions and 67 deletions

View file

@ -43,9 +43,9 @@ interface ChatAction {
}
export function NavProjects({
projects,
chats,
}: {
projects: {
chats: {
name: string
url: string
icon: LucideIcon
@ -57,13 +57,13 @@ export function NavProjects({
const { isMobile } = useSidebar()
const router = useRouter()
const searchSpaceId = projects[0]?.search_space_id || ""
const searchSpaceId = chats[0]?.search_space_id || ""
return (
<SidebarGroup className="group-data-[collapsible=icon]:hidden">
<SidebarGroupLabel>Recent Chats</SidebarGroupLabel>
<SidebarMenu>
{projects.map((item, index) => (
{chats.map((item, index) => (
<SidebarMenuItem key={item.id ? `chat-${item.id}` : `chat-${item.name}-${index}`}>
<SidebarMenuButton>
<item.icon />