Components (172)
Prompt History
Reusable Clean-style UI component built on Base UI and Tailwind CSS v4.
Loading Prompt History…
Usage
import { PromptHistory } from "ui-kit/components/prompt-history";Props
| Prop | Type | Default | Description |
|---|---|---|---|
turns* | PromptTurn[] | — | — |
head | string | — | The turn you're on – defaults to the last one |
onEdit | (turn: PromptTurn, prompt: string) => void | — | A prompt was edited – add a new turn with the same parent and the new text. Without it, the rows have no Edit |
onOpen | (turn: PromptTurn) => void | — | Open a version left behind – move head to its last turn. Without it, those rows have no Open |
draft | { id: string; text: string; } | null | null | Shows the edit box on a turn with this text, without taking focus – to play an edit back, e.g. in a demo |
agent | { id: string; name: string; } | — | The agent that answers – its pixel mark comes from id |
chat | string | — | What the chat is about – e.g. "Launch email" |
fileIcon | (name: string) => ReactNode | — | A logo of your own for a file – return nothing to keep the built-in one |
formatCost | (amount: number) => string | dollars | Formats a cost – defaults to dollars |
title | string | "Prompt history" | — |
className | string | — | — |