
Chat Thread
AI chat
Search by name, tag, category or type
Source and install need .
pnpm dlx shadcn@latest add @assembli/prompt-templatesPrompt library with fill-in-the-blank templates: a searchable list grouped by category, and the chosen template as a sentence with inline blanks that size to their answer, or selects for choices. Tab and Enter move between blanks, a progress count tracks them, and Use prompt fills the text. Write your own with {{blank}} syntax. Exports fillTemplate and parseTemplate.
Other props pass through to the root element.
templates*
PromptTemplate[]
defaultTemplateId
string
defaultValues
Record<string, TemplateValues>
Default {}
Answers already given, by template id then blank name.
onUse
(text: string, values: TemplateValues, template: PromptTemplate) => void
onSave
(template: PromptTemplate) => void
Called with a template the user wrote. It's also added to the list under "My templates".
| Description | |||
|---|---|---|---|
| templates* | PromptTemplate[] | – | |
| defaultTemplateId | string | – | |
| defaultValues | Record<string, TemplateValues> | {} | Answers already given, by template id then blank name. |
| onUse | (text: string, values: TemplateValues, template: PromptTemplate) => void | – | |
| onSave | (template: PromptTemplate) => void | – | Called with a template the user wrote. It's also added to the list under "My templates". |

AI chat

AI chat

AI chat

AI chat