Use case
Firing a saved prompt today means opening the Prompts dropdown and clicking
it, every time. For prompts I use dozens of times a day (nudge an agent to
run tests, ask for a summary, etc.) that's a lot of mousing for something
that should be a single keystroke.
Proposed behavior
Two new shortcuts on top of the existing Prompt Library:
- ⌘R (leader key) + a letter/number — press ⌘R to arm a transient
"press a key" mode (shown as a hint pill), then press the prompt's
assigned key to fire it straight at the focused agent tab. Falls back to
a destination picker if there's no focused live agent to fire into.
Cancels on Escape, an unmapped key, or ~2s idle.
- ⇧⌘R — opens a searchable command palette of all prompts (fuzzy
filter by title), Enter fires the highlighted one through the same
destination logic as the leader-key path.
Each prompt gets a trigger key: an optional manual override, else the next
free slot in a default 1-9, a-z sequence, assigned stably so keys don't
shift around as prompts are enabled/disabled. Trigger keys are configurable
per-prompt in Settings → Prompts and shown as badges in the Prompts
dropdown and the palette.
Where it'd live
src/lib/shortcuts.ts — effectiveTriggerKeys(): override-first, then
stable auto-assignment over free 1-9/a-z slots.
src/lib/promptFire.ts (new) — shared fireOrPickDestination() so the
leader-key shortcut, palette, and dropdown all resolve the destination
agent identically.
src/hooks/useShortcuts.ts — leader-key arm/disarm state machine,
capture-phase keydown + stopImmediatePropagation so the follow-up key
is intercepted before a focused terminal/editor sees it.
src/components/dialogs/PromptDestinationDialog.tsx (new) — destination
picker for when a prompt can't auto-resolve one.
src/components/dialogs/PromptPalette.tsx (new) — the ⇧⌘R palette.
src/store/prompts.ts / src/store/ui.ts — persisted per-prompt
triggerKeys, palette/quick-fire UI state.
src/components/settings/PromptLibrarySection.tsx — shortcut recorder
for per-prompt override keys.
docs/shortcuts.md — documents the leader-key mechanism.
Use case
Firing a saved prompt today means opening the Prompts dropdown and clicking
it, every time. For prompts I use dozens of times a day (nudge an agent to
run tests, ask for a summary, etc.) that's a lot of mousing for something
that should be a single keystroke.
Proposed behavior
Two new shortcuts on top of the existing Prompt Library:
"press a key" mode (shown as a hint pill), then press the prompt's
assigned key to fire it straight at the focused agent tab. Falls back to
a destination picker if there's no focused live agent to fire into.
Cancels on Escape, an unmapped key, or ~2s idle.
filter by title), Enter fires the highlighted one through the same
destination logic as the leader-key path.
Each prompt gets a trigger key: an optional manual override, else the next
free slot in a default
1-9, a-zsequence, assigned stably so keys don'tshift around as prompts are enabled/disabled. Trigger keys are configurable
per-prompt in Settings → Prompts and shown as badges in the Prompts
dropdown and the palette.
Where it'd live
src/lib/shortcuts.ts—effectiveTriggerKeys(): override-first, thenstable auto-assignment over free
1-9/a-zslots.src/lib/promptFire.ts(new) — sharedfireOrPickDestination()so theleader-key shortcut, palette, and dropdown all resolve the destination
agent identically.
src/hooks/useShortcuts.ts— leader-key arm/disarm state machine,capture-phase
keydown+stopImmediatePropagationso the follow-up keyis intercepted before a focused terminal/editor sees it.
src/components/dialogs/PromptDestinationDialog.tsx(new) — destinationpicker for when a prompt can't auto-resolve one.
src/components/dialogs/PromptPalette.tsx(new) — the ⇧⌘R palette.src/store/prompts.ts/src/store/ui.ts— persisted per-prompttriggerKeys, palette/quick-fire UI state.src/components/settings/PromptLibrarySection.tsx— shortcut recorderfor per-prompt override keys.
docs/shortcuts.md— documents the leader-key mechanism.