import { TooltipAnchor, Button, Sidebar } from '@librechat/client'; import { useLocalize } from '~/hooks'; import { cn } from '~/utils'; /** Element ID for the close sidebar button - used for focus management */ export const CLOSE_SIDEBAR_ID = 'close-sidebar-button'; /** Element ID for the open sidebar button - used for focus management */ export const OPEN_SIDEBAR_ID = 'open-sidebar-button'; export default function OpenSidebar({ setNavVisible, className, }: { setNavVisible: React.Dispatch>; className?: string; }) { const localize = useLocalize(); const handleClick = () => { setNavVisible((prev) => { localStorage.setItem('navVisible', JSON.stringify(!prev)); return !prev; }); // Delay focus until after the sidebar animation completes (200ms) setTimeout(() => { document.getElementById(CLOSE_SIDEBAR_ID)?.focus(); }, 250); }; return (