import { RiGithubFill } from "@remixicon/react"; import { Button } from "./button"; import { Separator } from "./separator"; import { useLocation } from "@remix-run/react"; const PAGE_TITLES: Record = { "/home/dashboard": "Memory graph", "/home/chat": "Chat", "/home/api": "API", "/home/logs": "Logs", }; function getHeaderTitle(pathname: string): string { // Try to match the most specific path first for (const key of Object.keys(PAGE_TITLES)) { if (pathname.startsWith(key)) { return PAGE_TITLES[key]; } } // Default fallback return "Documents"; } export function SiteHeader() { const location = useLocation(); const title = getHeaderTitle(location.pathname); return (

{title}

); }