import * as React from 'react';
import { cn } from '@/lib/utils';
import { agentIconFor } from '@/components/agents/icons';
import OwliverAvatar from '@/components/krow/OwliverAvatar';
import { useActiveAgent } from './AgentContext';
/**
* Who is answering, in Owliver's own header.
*
* This was an agent *switcher*: the header opened a popover with a search box,
* every registered agent, Browse all and Create agent. That made the panel a
* second place to decide which agent answers, competing with the one place that
* actually configures agents — the Agent Editor — and letting a reader put
* Owliver into a state nothing on the page explained.
*
* It is now a label. The agent is whatever `AgentContext` resolves for the page
* being read, which is the same resolution the runtime already uses to answer,
* so the header cannot disagree with the reply underneath it. Switching belongs
* to Agent Registry → Agents → Configure.
*
* Deliberately **not** a button, and deliberately no chevron: a disclosure
* affordance that discloses nothing is worse than none. Nothing here is
* clickable, so nothing here promises a menu.
*/
/** The avatar for the primary agent; a lucide glyph for the rest. */
function AgentGlyph({ agent, className = 'h-7 w-7' }) {
const Icon = agentIconFor(agent?.icon);
if (!Icon) return
{page}
{agent && !covers &&