import { useT } from "@agent-native/core/client/i18n"; import { IconInfoCircle } from "@tabler/icons-react"; import { type ReactNode } from "react"; import { useLocation } from "react-router"; import { dispatchDocsHrefForPath, DocsLink } from "./docs-link"; import { useSetPageTitle } from "./layout/HeaderActions"; import { Popover, PopoverContent, PopoverTrigger } from "./ui/popover"; /** * DispatchShell renders the per-page title (with an optional click-to-open * description popover) into the global header via the HeaderActions store. * The actual chrome (sidebar, AgentSidebar, header bar with AgentToggleButton) * is provided by `Layout` mounted in `root.tsx`. */ export function DispatchShell({ title, description, children, }: { title: string; description?: string; children: ReactNode; }) { const t = useT(); const location = useLocation(); const docsHref = dispatchDocsHrefForPath(location.pathname); useSetPageTitle(

{title}

{docsHref ? ( ) : description ? ( {description} ) : null}
, ); return <>{children}; }