Skip to content

Commit ec35aa3

Browse files
author
ai-elements-bot[bot]
committed
chore: regenerate skills
1 parent 607bb65 commit ec35aa3

5 files changed

Lines changed: 26 additions & 39 deletions

File tree

skills/ai-elements/references/checkpoint.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ const restoreAndBranch = (messageIndex: number) => {
177177
| Prop | Type | Default | Description |
178178
|------|------|---------|-------------|
179179
| `children` | `React.ReactNode` | - | The text or content to display in the trigger button. |
180+
| `tooltip` | `string` | - | Optional tooltip text shown on hover. |
180181
| `variant` | `string` | - | The button variant style. |
181182
| `size` | `string` | - | The button size. |
182183
| `...props` | `React.ComponentProps<typeof Button>` | - | Any other props are spread to the underlying shadcn/ui Button component. |

skills/ai-elements/references/confirmation.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { CheckIcon, XIcon } from "lucide-react";
2828
import { Button } from "@/components/ui/button";
2929
import {
3030
Confirmation,
31+
ConfirmationTitle,
3132
ConfirmationRequest,
3233
ConfirmationAccepted,
3334
ConfirmationRejected,
@@ -221,6 +222,14 @@ See `scripts/confirmation-rejected.tsx` for this example.
221222
| `className` | `string` | - | Additional CSS classes to apply to the Alert component. |
222223
| `...props` | `React.ComponentProps<typeof Alert>` | - | Any other props are spread to the Alert component. |
223224

225+
### `<ConfirmationTitle />`
226+
227+
A styled description element for displaying a title or label within the confirmation alert.
228+
229+
| Prop | Type | Default | Description |
230+
|------|------|---------|-------------|
231+
| `...props` | `React.ComponentProps<typeof AlertDescription>` | - | Any other props are spread to the underlying AlertDescription component. |
232+
224233
### `<ConfirmationRequest />`
225234

226235
| Prop | Type | Default | Description |

skills/ai-elements/references/conversation.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ const markdown = messagesToMarkdown(messages);
215215
// With custom formatter
216216
const customMarkdown = messagesToMarkdown(
217217
messages,
218-
(msg, i) => `[${msg.role}]: ${msg.content}`
218+
(msg, i) =>
219+
`[${msg.role}]: ${msg.parts
220+
.filter((p) => p.type === "text")
221+
.map((p) => p.text)
222+
.join("")}`
219223
);
220224
```

skills/ai-elements/references/message.md

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ export default ActionsDemo;
207207

208208
| Prop | Type | Default | Description |
209209
|------|------|---------|-------------|
210-
| `from` | `UIMessage[` | - | Aligns the selector for user, assistant or system messages. |
211-
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Any other props are spread to the selector container. |
210+
| `...props` | `React.ComponentProps<typeof ButtonGroup>` | - | Any other props are spread to the underlying ButtonGroup component. |
212211

213212
### `<MessageBranchPrevious />`
214213

@@ -228,45 +227,11 @@ export default ActionsDemo;
228227
|------|------|---------|-------------|
229228
| `...props` | `React.HTMLAttributes<HTMLSpanElement>` | - | Any other props are spread to the underlying span element. |
230229

231-
### `<MessageAttachments />`
230+
### `<MessageToolbar />`
232231

233-
A container component for displaying file attachments in a message. Automatically positions attachments at the end of the message with proper spacing and alignment.
232+
A container for placing actions and branch selectors below a message. Lays out children in a horizontal row with space-between alignment.
234233

235234
| Prop | Type | Default | Description |
236235
|------|------|---------|-------------|
237-
| `children` | `ReactNode` | - | MessageAttachment components to render. Returns null if no children provided. |
238236
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the root div. |
239-
240-
**Example:**
241-
242-
```tsx
243-
<MessageAttachments className="mb-2">
244-
{files.map((attachment) => (
245-
<MessageAttachment data={attachment} key={attachment.url} />
246-
))}
247-
</MessageAttachments>
248-
```
249-
250-
### `<MessageAttachment />`
251-
252-
Displays a single file attachment. Images are shown as thumbnails (96px × 96px) with rounded corners. Non-image files show a paperclip icon with the filename.
253-
254-
| Prop | Type | Default | Description |
255-
|------|------|---------|-------------|
256-
| `data` | `FileUIPart` | - | The file data to display. Must include url and mediaType. |
257-
| `onRemove` | `() => void` | - | Optional callback fired when the remove button is clicked. If provided, a remove button will appear on hover. |
258-
| `...props` | `React.HTMLAttributes<HTMLDivElement>` | - | Any other props are spread to the root div. |
259-
260-
**Example:**
261-
262-
```tsx
263-
<MessageAttachment
264-
data={{
265-
type: "file",
266-
url: "https://example.com/image.jpg",
267-
mediaType: "image/jpeg",
268-
filename: "image.jpg",
269-
}}
270-
onRemove={() => console.log("Remove clicked")}
271-
/>
272237
```

skills/ai-elements/references/persona.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ The Persona component responds to five distinct states, each triggering differen
7878
- **speaking**: Active when the AI is delivering a response (e.g., text-to-speech output)
7979
- **asleep**: A dormant state for when the AI is inactive or in low-power mode
8080

81+
## React Strict Mode (Vite)
82+
83+
The Persona component uses WebGL2 for rendering. Browsers limit the number of active WebGL2 contexts (~8–16), and React Strict Mode (enabled by default in Vite dev) double-mounts components, which can exhaust that limit and crash the page.
84+
85+
The component includes a built-in guard that defers WebGL2 initialization by one frame, preventing context creation during Strict Mode's throw-away mount. This means the component works in Vite dev mode out of the box — no configuration needed.
86+
87+
If you still experience crashes (for example, when rendering many Persona instances simultaneously), reduce the number of concurrent Persona components on screen.
88+
8189
## Usage Examples
8290

8391
### Basic Usage

0 commit comments

Comments
 (0)