RetroToolCall

A Mac OS 9 row for an AI tool call: status glyph, tool name and a disclosure triangle revealing its input and output. Takes the AI SDK's tool part as-is.

Installation

npx shadcn@latest add "https://nostalgia-ui.com/r/retro-tool-call.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 { RetroToolCall } from "@/components/ui/retro-tool-call"

Usage

import { RetroToolCall, RetroToolCallGroup } from "@/components/ui/retro-tool-call"

// inside a message, for each tool part from useChat
<RetroToolCallGroup>
  {toolParts.map((part) => (
    <RetroToolCall key={part.toolCallId} part={part} />
  ))}
</RetroToolCallGroup>

// dense layouts
<RetroToolChips parts={toolParts} onSelect={(part) => scrollTo(part.toolCallId)} />

Live

The barber pole runs under the row while the call works. When the result lands, the watch turns edge-on and comes back as the check, in two frames, like the disclosure triangle.

States

emptyTrash · call_04
Input
{
  "secure": false
}
Error
The Trash can't be emptied because “Budget 1999.xls” is in use.

Group

Consecutive calls stack with shared borders. A custom title and icon replace the prettified tool name.

Chips

Compact chips for dense layouts. Pass onSelect to make them buttons.