Skip to content
Sign upPro
ComposerPersona pickerMenu

Persona picker (Pro)

ProIncluded in $99

Choose which agent answers, right from the composer: @ mentions, a searchable picker, and each agent's model and tools before you send.

ProA furniture shop's workspace with five agents. @led switches to the finance agent, and the question goes to Ledger.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/persona-picker

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { PersonaPicker } from "@/components/ui/chatcn/pro/persona-picker"

<PersonaPicker
  personas={[
    { id: "general", name: "Assistant", role: "General help", model: "claude-sonnet-5-5" },
    { id: "ledger", name: "Ledger", role: "Finance analyst", model: "claude-opus-5-5" },
  ]}
  defaultPersona="general"
  onSubmit={({ text, persona }) => send(persona, text)}
/>

A To line above the text says who will answer and on which model, so nobody sends a finance question to the support agent by accident. Typing @ at the start of a word opens the agents inline and filters as you type, by name first and then by role; Enter or Tab picks, and the mention is removed from the text. The toolbar button opens the same list as a picker with search. Hovering or moving through an agent shows what it is for, its model and its tools, and marks the tools that wait for your approval. Picking another agent shows a way back to the default. Under it all is the free PromptInput: IME safe Enter, Shift Enter for a new line, paste, and Stop in the send footprint.

Examples

Picker

ProThe picker open from the toolbar. Find an agent, and see its model and tools, with the ones that ask first marked.

States

ProThe default agent, another one picked, @ open inline, filtered by role, no match, streaming and disabled.

Props

PropTypeNotes
personasPersona[]{ id, name, role?, description?, model?, tools?, avatar? }; a tool is { name, icon?, access?: "auto" | "asks" }
persona, defaultPersona, onPersonaChangestringWho answers, controlled or not
onSubmit({ text, persona }) => voidThe message and the agent it goes to
defaultPickerOpenbooleanOpen the picker on mount, for previews
value, defaultValue, onValueChangestringThe draft, controlled or not
status, onStop"idle" | "submitting" | "streaming", () => voidSend becomes Stop in the same footprint
disabledboolean
tools, actions, attachmentsReactNodeToolbar start, before Send, above the text
labelsPartial<PersonaPickerLabels>Every string, for translation

Keyboard

KeyAction
@ at the start of a wordOpen the agents inline, filtered as you type
Up, DownMove through the agents and show each one's detail
Enter or TabPick the highlighted agent
EscapeClose the list and keep the text
Enter, Shift EnterSend, new line. Never sends while an IME is composing

Accessibility

  • While the inline list is open the field is a combobox pointing at the highlighted agent.
  • The To line names the agent and model in text, so the choice never rests on an avatar alone.
  • Tools that ask first carry the words Asks first next to their icon.
  • The picker's search field is a combobox over the agent list; Escape closes it and focus returns to the toolbar button.

Motion

The inline list and the picker open from where they were triggered with a short fade and scale; the detail pane swaps without movement. Under reduced motion both only fade.