{NAV_USER.name.slice(0, 2).toUpperCase()}
{/* Reserve avatar (~2rem) + gap-3 so max-w 100% does not include sibling width (overflow). */}
{m.content}
) : (
{m.pending ? (
Thinking…
) : (
{m.content}
)}
),
)
)}
>
)
}
// ─────────────────────────────────────────────────────────────────────────────
// Toggle button — can be placed anywhere (e.g. in SiteHeader or floating)
// ─────────────────────────────────────────────────────────────────────────────
/**
* Keyboard shortcut hint for Ask Leo (⌘⌥K / Ctrl+Alt+K).
*
* • `variant="tile"` (default) — three separate tile kbds, for use in tooltip
* content / standalone surfaces where the tile chrome is welcome.
* • `variant="bare"` — single inline kbd with no background/border that
* inherits the parent's currentColor (see Kbd "bare" variant). Use this
* whenever the kbds are rendered INSIDE a button (e.g. primary Ask Leo
* button in a popover footer). Matches the `` pattern
* used by the Next / Back buttons in the new placement flow.
*/
export function AskLeoShortcutKbds({
className,
variant = "tile",
}: {
className?: string
variant?: "tile" | "bare"
}) {
const mod = useModKeyLabel()
const alt = useAltKeyLabel()
if (variant === "bare") {
return (
{mod}{alt}K
)
}
return (
{mod}{alt}K
)
}
export function AskLeoToggle({ className }: { className?: string }) {
const { toggle, open } = useAskLeo()
return (
{open ? "Close Ask Leo" : "Ask Leo"}
)
}