/** * ChatAgentPicker — the connected {@link AgentPicker}. Fetches the project's * agents with {@link useAgents} and renders the picker only when there is more * than one to switch between, so it can be dropped straight into the composer's * `toolbarStart` slot without the caller wiring up data: * * ```tsx * const [agentId, setAgentId] = React.useState(); * } * /> * ``` * * It renders nothing while loading, on error, or when the project exposes fewer * than `minAgents` (default 2) agents — a single-agent project has nothing to * switch to, so the slot stays empty. Selection is controlled by the caller * (`value` / `onValueChange`), matching {@link AgentPicker}. * * @module react/components/chat/chat-agent-picker */ import * as React from "react"; import { type AgentMetadata } from "../../../agent/react/index.js"; import { type AgentOption } from "./agent-picker.js"; /** * Narrow browser-safe agent metadata to the picker's row shape. `AgentOption` * now shares `AgentMetadata`'s `avatarUrl` field, so `AgentMetadata[]` is also * accepted by `` directly — this helper just drops the * fields the rows don't use. */ export declare function agentsToPickerOptions(agents: AgentMetadata[]): AgentOption[]; /** Props accepted by ``. */ export interface ChatAgentPickerProps { /** Selected agent id (controlled). */ value?: string; /** Called with the chosen agent id. */ onValueChange?: (id: string) => void; /** * Minimum agent count before the picker renders. Defaults to `2` — with one * agent there is nothing to switch to. Set to `1` to always show it once an * agent is available. */ minAgents?: number; /** When `false`, skips the fetch and renders nothing. Defaults to `true`. */ enabled?: boolean; /** Shows a "Create Agent" row at the bottom of the list. */ onCreate?: () => void; /** Shows a "Manage Agents" row at the bottom of the list. */ onManage?: () => void; /** Additional class names for the trigger. */ className?: string; } /** Render the connected agent switcher, or nothing when there's nothing to switch. */ export declare function ChatAgentPicker({ value, onValueChange, minAgents, enabled, onCreate, onManage, className, }: ChatAgentPickerProps): React.ReactElement | null; //# sourceMappingURL=chat-agent-picker.d.ts.map