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
|`onApprovalDecision`|`((decision: ApprovalDecision) => void \| Promise<void>)`|| - | Called when the user clicks Allow / Deny. Throw to keep the card `pending`. Defaults to a POST against approveUrl. |
51
+
|`approveUrl`|`string`|| - | Defaults to `api` with `/chat` swapped for `/approve`. |
52
+
|`className`|`string`|| - | - |
53
+
|`id`|`string`|| - | Stable chat id. Defaults to a fresh UUID per mount. |
54
+
|`onError`|`((error: Error) => void)`|| - | Called on stream errors. |
55
+
|`headers`|`Resolvable<Record<string, string> \| Headers>`|| - | Extra fetch headers forwarded to the transport. |
56
+
|`messages`|`TMessage[]`|| - | Initial messages (e.g. when hydrating from history). |
57
+
|`onData`|`ChatOnDataCallback<TMessage>`|| - | Fires for every `data-*` chunk (e.g. `data-approval-pending`). |
58
+
|`onStreamPart`|`((chunk: UIMessageChunk) => void)`|| - | Fires synchronously for every chunk. Unaffected by render throttling. |
Default composer. Built on the `<ChatInput>` headless primitive so Enter-to-submit, IME composition, and value clearing match roll-your-own composers.
4
+
5
+
6
+
## ChatComposer
7
+
8
+
Default composer. Built on the `<ChatInput>` headless primitive so
9
+
Enter-to-submit, IME composition, and value clearing match
0 commit comments