Reasoning
<Reasoning />The model’s thinking, open while it thinks and folded away under one line once it stops.
The bug only shows with two or more items, so it is not the price lookup. The loop runs i < items.length - 1, which skips the last item. That is the off-by-one.
Install
npx shadcn@latest add https://orbeez-kit.vercel.app/r/reasoning.jsonUsage
tsx
<Reasoning streaming={thinking}>
<ReasoningTrigger>Thought for 3s</ReasoningTrigger>
<ReasoningContent markdown>{thoughts}</ReasoningContent>
</Reasoning>Good to know
- Controlled with open, it stays where you put it.
- In a ChatContainer its folding never moves the conversation.
Thinking
<Thinking />What an agent did while it thought: a header with a clock, and the steps arriving under it one at a time, the last in ink and the ones before it gone quiet.
npx shadcn@latest add https://orbeez-kit.vercel.app/r/thinking.jsontsx
<Thinking working={thinking}>
<ThinkingTrigger hue={agent.hue} />
<ThinkingContent>
<ThinkingStep status="done" icon={<SearchIcon />}>
Searched the web
<ThinkingSources sources={[{ name: 'web.dev' }, { name: 'w3.org' }]} />
</ThinkingStep>
<ThinkingStep status="active">Comparing every colour pair against AA</ThinkingStep>
{!thinking && <ThinkingDone />}
</ThinkingContent>
</Thinking>- Moods. The agent's bead in the header acts out the step in hand: that step's mood, like working for a command or thinking while it reads, sad the moment a step fails, and once it is all done it goes back to the trigger's mood, thinking by default, unless it ended on a failure. The tick is on the finished row, never on the header's bead. The finished row wears a bead with a tick; the header shimmers while it works.
- You add the steps as they happen and say which one is active; Thinking times how they arrive.
- The clock counts from when it appears while working, or follows seconds if you keep time yourself.
- Give ThinkingTrigger the agent's hue, and accessory, to show its bead in the header. Leave them out inside a Message whose MessageAvatar is already the agent.
Behaviour
- Steps are only ever added at the bottom. Nothing above a new step moves when it arrives.
- A step arrives with transform, opacity and a little blur, never height. With reduced motion it only fades.
- A step going from active to done changes colour only: never its weight, size or the room it takes.
- The header keeps its height and its chevron and bead stay put as its words change from working to done; only the clock and the words after it change.
- Source chips arrive one after another, and the rest are counted in "+N more" rather than wrapping on without end.
Every kind of step
<ThinkingStep />Reasoning, commands, sources and links as the same line: a step can fail, carry a detail, fold what it gave back under its words, or open something.
npx shadcn@latest add https://orbeez-kit.vercel.app/r/thinking.jsontsx
<ThinkingTrigger hue={agent.hue} label="Working" doneLabel="Worked for" />
<ThinkingStep mood="working" icon={<CodeIcon />} output={<CodeBlock size="sm" language="terminal" code={log} />}>
Ran git diff --stat
</ThinkingStep>
<ThinkingStep status="failed" detail="The lockfile is older than package.json" output={<CodeBlock size="sm" code={error} />}>
Failed to run pnpm install
</ThinkingStep>
<ThinkingStep icon={<GlobeIcon />} output={<ThinkingSources sources={sources} />}>Used 2 sources</ThinkingStep>
<ThinkingStep href={url}>Read pnpm on frozen lockfiles</ThinkingStep>
<ThinkingStep onOpen={() => openSheet(run)}>Ran the reviewer</ThinkingStep>
<ThinkingStep status="pending">Commit the lockfile</ThinkingStep>- status is pending, active, done or failed. Failed is never red: the mark is a sad ink bead, the words stay in ink so they're seen, and its output gets a dashed edge.
- output folds what the step gave back under its words, which become the button that opens it. defaultOpen opens it from the start.
- href makes the words a link, with a dotted underline that goes solid under the pointer. A link to another site opens in a new tab and shows an arrow out. onOpen makes the words a button for a dialog, sheet or panel of your own.
- Give a ThinkingSource an href and its chip becomes a link to the page, deepening under the pointer.
- detail is a quieter line under the words, like the command run or why it failed.
- mood is how the agent feels doing the step: working for a command, thinking while it reads. The agent's bead in the header plays it while it is the latest step.
Behaviour
- A step's status changes its colour and the mark in its fixed box, never the room it takes.
- A failed step wears no hue: an ink bead in the sad mood, and a dashed outline round its output, which takes no room.
- Opening a step's output only ever happens when someone opens it, and only what is under that step moves.
- The header's bead always plays the latest step: its mood while it runs, sad the moment it fails, and back in the trigger's mood, thinking by default, once the run is done. It never wears a tick. Its size never changes with its mood.
- A link reads as a link before it is hovered, and a link to another site opens in a new tab. Its underline takes no room.
Thinking bar
<ThinkingBar />One line saying the model is still thinking, with a way to hurry it along.
Reading 14 files in app/
npx shadcn@latest add https://orbeez-kit.vercel.app/r/thinking-bar.jsontsx
<ThinkingBar onAnswerNow={answerNow}>Reading 14 files in app/</ThinkingBar>- Moods. Its bead thinks.