mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 01:36:30 +02:00
feat: Document Selector in Chat.
- Still need improvements but lets use it first.
This commit is contained in:
parent
e8a19c496b
commit
d7bb31f894
12 changed files with 599 additions and 67 deletions
|
|
@ -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 />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue