Persona picker (Pro)
ProIncluded in $99Choose which agent answers, right from the composer: @ mentions, a searchable picker, and each agent's model and tools before you send.
On this page
Installation
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
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
States
Props
| Prop | Type | Notes |
|---|---|---|
personas | Persona[] | { id, name, role?, description?, model?, tools?, avatar? }; a tool is { name, icon?, access?: "auto" | "asks" } |
persona, defaultPersona, onPersonaChange | string | Who answers, controlled or not |
onSubmit | ({ text, persona }) => void | The message and the agent it goes to |
defaultPickerOpen | boolean | Open the picker on mount, for previews |
value, defaultValue, onValueChange | string | The draft, controlled or not |
status, onStop | "idle" | "submitting" | "streaming", () => void | Send becomes Stop in the same footprint |
disabled | boolean | |
tools, actions, attachments | ReactNode | Toolbar start, before Send, above the text |
labels | Partial<PersonaPickerLabels> | Every string, for translation |
Keyboard
| Key | Action |
|---|---|
| @ at the start of a word | Open the agents inline, filtered as you type |
| Up, Down | Move through the agents and show each one's detail |
| Enter or Tab | Pick the highlighted agent |
| Escape | Close the list and keep the text |
| Enter, Shift Enter | Send, 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.