You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/ai-elements/references/message.md
+3-38Lines changed: 3 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,8 +207,7 @@ export default ActionsDemo;
207
207
208
208
| Prop | Type | Default | Description |
209
209
|------|------|---------|-------------|
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. |
212
211
213
212
### `<MessageBranchPrevious />`
214
213
@@ -228,45 +227,11 @@ export default ActionsDemo;
228
227
|------|------|---------|-------------|
229
228
|`...props`|`React.HTMLAttributes<HTMLSpanElement>`| - | Any other props are spread to the underlying span element. |
230
229
231
-
### `<MessageAttachments />`
230
+
### `<MessageToolbar />`
232
231
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.
234
233
235
234
| Prop | Type | Default | Description |
236
235
|------|------|---------|-------------|
237
-
|`children`|`ReactNode`| - | MessageAttachment components to render. Returns null if no children provided. |
238
236
|`...props`|`React.ComponentProps<`| - | Any other props are spread to the root div. |
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. |
Copy file name to clipboardExpand all lines: skills/ai-elements/references/persona.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,14 @@ The Persona component responds to five distinct states, each triggering differen
78
78
-**speaking**: Active when the AI is delivering a response (e.g., text-to-speech output)
79
79
-**asleep**: A dormant state for when the AI is inactive or in low-power mode
80
80
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.
0 commit comments