AI
shadcn's AI Elements for agent interfaces, rebuilt on our parts. A tool call, a plan step or a task is one Trace line, and only a line that failed is red.
the layer
src/components/ai- elements
- 22
- one line
- ui/trace.tsx
- a failure
- signal
ai / tool
states · verbs M src/components/ui/trace.tsx
?? src/components/ai/tool.tsx- phases
- running · done
- also
- failed · denied
- line
- a Trace row
- logic
- src/lib/ai-tool.ts
- tests
- ai-tool.test.ts
A tool call is one line with its verb and its object. A failed call is a Fault: the line takes signal.
ai / steps
statuses · failed- parts
- AgentSteps, StepGroup
- statuses
- 4
- pending
- muted
- running
- bone
- error
- signal
- logic
- src/lib/ai-steps.ts
The steps of an agent read as a log. Only the step that failed is red.
ai / chat-thread
thread · confirmationIt rewrites src/lib/icons/set.ts and glyphs.tsx.
- turns
- ChatTurn
- scroll
- MessageScroller
- a reply
- copies as text
- under it
- PromptInput
- to ask
- Confirmation
The thread keeps to the left measure. The prompt sits at the foot, like the Command line.
plates / ai
22 platesEach AI Element, live. A plate opens the element's Panel with every story.
It rewrites src/lib/icons/set.ts and glyphs.tsx.
A popup in ui-sdk draws in the browser's top layer, so no ancestor clips it developer.mozilla.org. Placement props go on the content part ui-sdk.dev +1.
Every popup draws in the top layer, so the Portal parts go.
The preview shows the old focus ring. The ring comes from :focus-visible in globals.css, and the row sets outline-none.
TypeError: Cannot read properties of undefined (reading 'title')
- at sharePage (src/app/_components/share-image/page.tsx:42:31)
- at Image (src/app/writing/opengraph-image.tsx:12:10)
- at renderWithHooks (node_modules/react-dom/cjs/react-dom-server.node.development.js:14985:18)
- at node:internal/process/task_queues:95:5
Two files use red outside a Fault. Both are copied code.
> eslint
src/components/ai/plan.tsx
12:7 error 'done' is assigned a value but never used no-unused-vars
✖ 1 problem (1 error, 0 warnings)✓ src/lib/ai-tool.test.ts (5 tests)
✓ src/lib/ai-steps.test.ts (7 tests) M src/components/ui/trace.tsx
?? src/components/ai/tool.tsxevery story · src/components/ai
It rewrites src/lib/icons/set.ts and glyphs.tsx.
A popup in ui-sdk draws in the browser's top layer, so no ancestor clips it developer.mozilla.org. Placement props go on the content part ui-sdk.dev +1.
Every popup draws in the top layer, so the Portal parts go.
The preview shows the old focus ring. The ring comes from :focus-visible in globals.css, and the row sets outline-none.
The preview shows the old focus ring. The ring comes from :focus-visible in globals.css, and the row sets outline-none. So the row needs its own focus look: it inverts to bone, as a Row does.
TypeError: Cannot read properties of undefined (reading 'title')
- at sharePage (src/app/_components/share-image/page.tsx:42:31)
- at Image (src/app/writing/opengraph-image.tsx:12:10)
- at renderWithHooks (node_modules/react-dom/cjs/react-dom-server.node.development.js:14985:18)
- at node:internal/process/task_queues:95:5
Two files use red outside a Fault. Both are copied code.
> eslint
src/components/ai/plan.tsx
12:7 error 'done' is assigned a value but never used no-unused-vars
✖ 1 problem (1 error, 0 warnings)✓ src/lib/ai-tool.test.ts (5 tests)
✓ src/lib/ai-steps.test.ts (7 tests) M src/components/ui/trace.tsx
?? src/components/ai/tool.tsx