Skip to Content
UI Kit
Components (172)

Prompt History

Reusable Clean-style UI component built on Base UI and Tailwind CSS v4.

Open preview
Loading Prompt History…

Usage

import { PromptHistory } from "ui-kit/components/prompt-history";

Props

PropTypeDefaultDescription
turns*PromptTurn[]——
headstring—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; } | nullnullShows 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
chatstring—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) => stringdollarsFormats a cost – defaults to dollars
titlestring"Prompt history"—
classNamestring——

On this page