RetroMessage
Mac OS 9 chat transcript parts: a scrolling message thread, user and assistant messages built from AI SDK-style parts, and copy/retry actions.
Installation
npx shadcn@latest add "https://nostalgia-ui.com/r/retro-message.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 { RetroMessage } from "@/components/ui/retro-message"Usage
import {
RetroMessageThread,
RetroMessage,
RetroMessageActions,
} from "@/components/ui/retro-message"
import { RetroThinking } from "@/components/ui/retro-thinking"
import { RetroToolCall } from "@/components/ui/retro-tool-call"
const { messages, status, regenerate } = useChat()
<RetroMessageThread streaming={status === "streaming"} className="h-[480px]">
{messages.map((message, i) => {
const live = i === messages.length - 1 && status === "streaming"
return (
<RetroMessage
key={message.id}
message={message}
streaming={live}
renderTool={(part) => <RetroToolCall part={part} />}
>
{message.role === "assistant" && !live && (
<RetroMessageActions message={message} onRetry={() => regenerate()} />
)}
</RetroMessage>
)
})}
{status === "submitted" && <RetroThinking />}
</RetroMessageThread>Conversation
Ask something and the reply types in behind the insertion caret. Scroll up while it streams and the thread lets go; a New messages button brings you back. ⌘-period or Escape stops it. Hover a reply for Copy and Try Again.