RetroApproval
A Mac OS 9 caution alert in the transcript that asks before an AI tool runs. Hold Option for Always Allow; once answered it collapses to a one-line receipt.
Installation
npx shadcn@latest add "https://nostalgia-ui.com/r/retro-approval.json"
Setup: installing any component also installs nostalgia-theme (the --os9-* tokens and os9-* utilities) via registryDependencies. To add the theme on its own: npx shadcn@latest add https://nostalgia-ui.com/r/nostalgia-theme.json. Put @layer ui-sdk; above @import "tailwindcss" in your global CSS (why).
Import
import { RetroApproval } from "@/components/ui/retro-approval"Usage
import { RetroApproval } from "@/components/ui/retro-approval"
// a tool part in state "approval-requested", from useChat
<RetroApproval
part={part}
title="Allow the assistant to move 12 files?"
description="They'll go from the Desktop into “Old Stuff”."
details={["Read Me → Old Stuff", "Budget 1999.xls → Old Stuff"]}
anchorRef={toolRowRef}
onApprove={(always) =>
addToolApprovalResponse({ id: part.approval.id, approved: true })
}
onDeny={() => addToolApprovalResponse({ id: part.approval.id, approved: false })}
/>In the Transcript
I'll move the 12 loose files on your Desktop into a folder called “Old Stuff”.
Allow the assistant to move 12 files?
They'll go from the Desktop into “Old Stuff”. You can move them back at any time.
The alert grows out of the tool row that asked, as a trail of zoom rects. It takes focus: Return allows, Escape doesn't, and holding Option turns Allow into Always Allow.
Answered
As a Modal
RetroApprovalDialog asks the same question as a blocking alert, for apps that must stop until it's answered.