PromptHistorySearch
A fuzzy search dialog over prompts the user already sent. Pass history oldest first; the dialog lists unique prompts newest first, shows the first line of each and marks multi-line prompts with a line count. Picking a prompt calls onSelect and closes the dialog; an empty query shows all prompts, no match shows the empty label. It is built on CommandPalette, so it goes full screen on phones. InputBar already includes it: pass history to InputBar and Mod+R opens this dialog, while ArrowUp and ArrowDown browse history inline. Use historySearchHotkey to change or disable the hotkey, or onHistorySearch to open your own dialog. Related helpers for custom composers: navigatePromptHistory, canBrowseOlder, canBrowseNewer, getSearchablePrompts.
Getting Started
$pnpm add @sinups/ai-kit @mantine/core @mantine/hooks @tabler/icons-reactExamples
Dialog
API reference
Prop
Type
Required
opened
boolean
Yes
Whether the dialog is open
onClose
() => void
Yes
Called on Escape, outside click and after a prompt is picked
history
string[]
Yes
Previously sent prompts, oldest first
onSelect
(prompt: string) => void
Yes
Called with the picked prompt
labels
Partial<PromptHistorySearchLabels>
No
Overrides of the default English labels