import { useState, type ReactNode } from "react"; import { Archive, Menu, Search, Settings, SquarePen, Blocks, } from "lucide-react"; import { useTranslation } from "react-i18next"; import { ChatList } from "@/components/ChatList"; import { ConnectionBadge } from "@/components/ConnectionBadge"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; import type { ChatSummary, SidebarViewState, } from "@/lib/types"; import { cn } from "@/lib/utils"; interface SidebarProps { sessions: ChatSummary[]; activeKey: string | null; loading: boolean; onNewChat: () => void; onSelect: (key: string) => void; onRequestDelete: (key: string, label: string) => void; onTogglePin: (key: string) => void; onRequestRename: (key: string, label: string) => void; onToggleArchive: (key: string) => void; onToggleGroup: (groupId: string) => void; onRequestRenameProject: (projectKey: string, label: string) => void; onNewChatInProject: (projectPath: string, projectName: string) => void; onOpenSettings: () => void; onOpenApps: () => void; onOpenSearch: () => void; activeUtility?: "apps" | null; onToggleArchived: () => void; onCollapse: () => void; onExpand?: () => void; containActionMenus?: boolean; collapsed?: boolean; pinnedKeys?: string[]; archivedKeys?: string[]; titleOverrides?: Record; projectNameOverrides?: Record; collapsedGroups?: Record; runningChatIds?: string[]; completedChatIds?: string[]; viewState?: SidebarViewState; showArchived?: boolean; archivedCount?: number; defaultWorkspacePath?: string | null; hostChromeInset?: boolean; } export function Sidebar(props: SidebarProps) { const { t } = useTranslation(); const [menuPortalContainer, setMenuPortalContainer] = useState(null); const collapsed = Boolean(props.collapsed); const toggleLabel = t("thread.header.toggleSidebar"); return ( ); } function SidebarActionButton({ collapsed, label, icon, onClick, active = false, className, }: { collapsed: boolean; label: string; icon: ReactNode; onClick: () => void; active?: boolean; className?: string; }) { return ( ); }