
Search by name, tag, category or type
Source and install need .
pnpm dlx shadcn@latest add @assembli/mail-command-barA ⌘K bar for mail that takes commands and plain sentences. "Archive newsletters older than a week" becomes a plan you see before it runs: the filters it understood, which threads match, whether it can be undone, and the exact tool call an agent would make. Enter runs it with Undo; sends ask twice. Pass a model through parse; a built-in parser covers common phrasings.
Other props pass through to the root element.
open
boolean
defaultOpen
boolean
Default false
onOpenChange
(open: boolean) => void
trigger
React.ReactElement
Rendered as the dialog trigger.
threads
CommandThread[]
Default []
Threads to search and to plan against.
commands
CommandItem[]
Default DEFAULT_COMMANDS
parse
(text: string, threads: CommandThread[]) => Plan | null | Promise<Plan | null>
Default parseCommand
Turns a sentence into a plan. Return null when it isn't a command. Defaults to parseCommand; pass a model call here.
onAction
(action: MailAction) => void
run_command (with plan and call), undo, open, and each command's own action.
defaultValue
string
Default ""
Text already in the field when it opens.
examples
string[]
Default DEFAULT_EXAMPLES
Example sentences shown before you type.
hotkey
boolean
Default true
Toggle with ⌘K / Ctrl+K.
actorName
string
Default "Ines Moreau"
The person acting, for actor on emitted actions.
className
string
| Description | |||
|---|---|---|---|
| open | boolean | – | |
| defaultOpen | boolean | false | |
| onOpenChange | (open: boolean) => void | – | |
| trigger | React.ReactElement | – | Rendered as the dialog trigger. |
| threads | CommandThread[] | [] | Threads to search and to plan against. |
| commands | CommandItem[] | DEFAULT_COMMANDS | |
| parse | (text: string, threads: CommandThread[]) => Plan | null | Promise<Plan | null> | parseCommand | Turns a sentence into a plan. Return null when it isn't a command. Defaults to |
| onAction | (action: MailAction) => void | – |
|
| defaultValue | string | "" | Text already in the field when it opens. |
| examples | string[] | DEFAULT_EXAMPLES | Example sentences shown before you type. |
| hotkey | boolean | true | Toggle with ⌘K / Ctrl+K. |
| actorName | string | "Ines Moreau" | The person acting, for |
| className | string | – |