import * as React from "react"; import { useHotkeys } from "react-hotkeys-hook"; import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuItem, } from "../ui/sidebar"; import { Columns3, Inbox, LayoutGrid, LoaderCircle, MessageSquare, Network, Plus, } from "lucide-react"; import { NavMain } from "./nav-main"; import { useUser } from "~/hooks/useUser"; import { NavUser } from "./nav-user"; import Logo from "../logo/logo"; import { ConversationList } from "../conversation"; import { Button } from "../ui"; import { Project } from "../icons/project"; import { AddMemoryCommand } from "../command-bar/add-memory-command"; import { AddMemoryDialog } from "../command-bar/memory-dialog.client"; const data = { navMain: [ { title: "Inbox", url: "/home/inbox", icon: Inbox, }, { title: "Chat", url: "/home/conversation", icon: MessageSquare, }, { title: "Memory", url: "/home/dashboard", icon: Network, }, { title: "Spaces", url: "/home/space", icon: Project, }, { title: "Integrations", url: "/home/integrations", icon: LayoutGrid, }, ], }; export function AppSidebar({ ...props }: React.ComponentProps) { const user = useUser(); const [showAddMemory, setShowAddMemory] = React.useState(false); // Open command bar with Meta+K (Cmd+K on Mac, Ctrl+K on Windows/Linux) useHotkeys("meta+k", (e) => { e.preventDefault(); setShowAddMemory(true); }); return ( <>
C.O.R.E.

History

{showAddMemory && ( )} ); }