@assistant-ui/mcp-docs-server 0.1.31 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/code-examples/waterfall.md +23 -25
- package/.docs/organized/code-examples/with-a2a.md +28 -28
- package/.docs/organized/code-examples/with-ag-ui.md +35 -30
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +16 -14
- package/.docs/organized/code-examples/with-artifacts.md +44 -38
- package/.docs/organized/code-examples/with-assistant-transport.md +68 -56
- package/.docs/organized/code-examples/with-browser-extension.md +357 -0
- package/.docs/organized/code-examples/with-chain-of-thought.md +425 -90
- package/.docs/organized/code-examples/with-cloud-standalone.md +30 -29
- package/.docs/organized/code-examples/with-cloud.md +16 -14
- package/.docs/organized/code-examples/with-custom-thread-list.md +19 -17
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +29 -26
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +20 -18
- package/.docs/organized/code-examples/with-expo.md +37 -31
- package/.docs/organized/code-examples/with-external-store.md +13 -11
- package/.docs/organized/code-examples/with-ffmpeg.md +327 -290
- package/.docs/organized/code-examples/with-generative-ui.md +1195 -194
- package/.docs/organized/code-examples/with-google-adk.md +13 -11
- package/.docs/organized/code-examples/with-heat-graph.md +16 -14
- package/.docs/organized/code-examples/with-image-generation.md +456 -0
- package/.docs/organized/code-examples/with-interactables.md +322 -244
- package/.docs/organized/code-examples/with-langchain.md +18 -16
- package/.docs/organized/code-examples/with-langgraph.md +95 -88
- package/.docs/organized/code-examples/with-livekit.md +30 -27
- package/.docs/organized/code-examples/with-mcp.md +754 -0
- package/.docs/organized/code-examples/with-opencode.md +70 -70
- package/.docs/organized/code-examples/with-react-hook-form.md +24 -22
- package/.docs/organized/code-examples/with-react-ink.md +4 -4
- package/.docs/organized/code-examples/with-react-router.md +20 -18
- package/.docs/organized/code-examples/with-resumable-stream.md +661 -0
- package/.docs/organized/code-examples/with-store.md +22 -20
- package/.docs/organized/code-examples/with-tanstack.md +18 -19
- package/.docs/organized/code-examples/with-tap-runtime.md +31 -28
- package/.docs/raw/docs/(docs)/architecture.mdx +43 -2
- package/.docs/raw/docs/(docs)/cli.mdx +2 -2
- package/.docs/raw/docs/(docs)/copilots/model-context.mdx +34 -26
- package/.docs/raw/docs/(docs)/copilots/motivation.mdx +32 -26
- package/.docs/raw/docs/(docs)/index.mdx +2 -2
- package/.docs/raw/docs/(docs)/installation.mdx +2 -2
- package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +26 -24
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +20 -12
- package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +44 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +41 -16
- package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +12 -23
- package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +37 -8
- package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +11 -9
- package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +64 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +52 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +46 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +18 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +33 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/spec.mdx +45 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +98 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +18 -13
- package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +31 -52
- package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +640 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +15 -28
- package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +64 -18
- package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +434 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +24 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +11 -12
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +109 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +58 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +109 -132
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +78 -221
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +127 -242
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +39 -20
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +66 -87
- package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +50 -58
- package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +80 -48
- package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +67 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +323 -461
- package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +36 -43
- package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +29 -24
- package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +63 -245
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +202 -588
- package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +65 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +35 -22
- package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +57 -140
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +70 -161
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +84 -108
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +77 -96
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +173 -349
- package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +9 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +10 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +15 -70
- package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +18 -13
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +25 -28
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +11 -63
- package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +11 -48
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +10 -47
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +18 -30
- package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +85 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +39 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +127 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +42 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +91 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +48 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +62 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +19 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +143 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +54 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +36 -0
- package/.docs/raw/docs/cloud/ai-sdk.mdx +1 -3
- package/.docs/raw/docs/cloud/index.mdx +2 -2
- package/.docs/raw/docs/guides/attachments.mdx +4 -4
- package/.docs/raw/docs/guides/branching.mdx +1 -1
- package/.docs/raw/docs/guides/chain-of-thought.mdx +12 -14
- package/.docs/raw/docs/guides/context-api.mdx +6 -5
- package/.docs/raw/docs/guides/dictation.mdx +2 -2
- package/.docs/raw/docs/guides/editing.mdx +1 -1
- package/.docs/raw/docs/guides/image-generation.mdx +74 -0
- package/.docs/raw/docs/guides/index.mdx +5 -14
- package/.docs/raw/docs/guides/latex.mdx +2 -2
- package/.docs/raw/docs/guides/mentions.mdx +6 -6
- package/.docs/raw/docs/guides/message-timing.mdx +38 -5
- package/.docs/raw/docs/guides/quoting.mdx +1 -1
- package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +212 -0
- package/.docs/raw/docs/guides/resumable-stream-stores.mdx +152 -0
- package/.docs/raw/docs/guides/resumable-streams.mdx +210 -0
- package/.docs/raw/docs/guides/slash-commands.mdx +2 -2
- package/.docs/raw/docs/guides/speech.mdx +2 -2
- package/.docs/raw/docs/guides/suggestions.mdx +89 -5
- package/.docs/raw/docs/guides/voice.mdx +2 -2
- package/.docs/raw/docs/ink/adapters.mdx +37 -1
- package/.docs/raw/docs/ink/custom-backend.mdx +59 -8
- package/.docs/raw/docs/ink/hooks.mdx +98 -85
- package/.docs/raw/docs/ink/index.mdx +10 -11
- package/.docs/raw/docs/ink/migration.mdx +1 -1
- package/.docs/raw/docs/ink/primitives.mdx +350 -9
- package/.docs/raw/docs/integrations/auth/better-auth.mdx +1 -1
- package/.docs/raw/docs/integrations/auth/clerk.mdx +1 -1
- package/.docs/raw/docs/integrations/auth/next-auth.mdx +1 -1
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +3 -3
- package/.docs/raw/docs/integrations/frameworks/cloudflare-agents/overview.mdx +282 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +2 -2
- package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +1 -1
- package/.docs/raw/docs/integrations/gateways/index.mdx +9 -4
- package/.docs/raw/docs/integrations/index.mdx +17 -5
- package/.docs/raw/docs/integrations/observability/langfuse.mdx +8 -1
- package/.docs/raw/docs/integrations/observability/langsmith.mdx +8 -4
- package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +17 -2
- package/.docs/raw/docs/migrations/toolkit-tools.mdx +226 -0
- package/.docs/raw/docs/primitives/chain-of-thought.mdx +10 -16
- package/.docs/raw/docs/primitives/composer.mdx +53 -0
- package/.docs/raw/docs/primitives/index.mdx +2 -2
- package/.docs/raw/docs/primitives/message.mdx +9 -10
- package/.docs/raw/docs/primitives/suggestion.mdx +9 -0
- package/.docs/raw/docs/react-native/hooks.mdx +57 -82
- package/.docs/raw/docs/react-native/index.mdx +4 -4
- package/.docs/raw/docs/react-native/migration.mdx +1 -1
- package/.docs/raw/docs/react-native/primitives.mdx +2 -2
- package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +7 -4
- package/.docs/raw/docs/runtimes/a2a/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +32 -1
- package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +7 -2
- package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +1 -1
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +129 -1
- package/.docs/raw/docs/runtimes/concepts/threads.mdx +7 -1
- package/.docs/raw/docs/runtimes/custom/data-stream.mdx +27 -2
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +9 -1
- package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +18 -7
- package/.docs/raw/docs/runtimes/custom/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +108 -38
- package/.docs/raw/docs/runtimes/google-adk/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/langchain.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +1 -1
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +64 -50
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +98 -86
- package/.docs/raw/docs/runtimes/opencode/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +1 -1
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +12 -5
- package/.docs/raw/docs/tools/backend.mdx +136 -0
- package/.docs/raw/docs/tools/defining-tools.mdx +413 -0
- package/.docs/raw/docs/tools/dynamic-tools.mdx +110 -0
- package/.docs/raw/docs/tools/generative-ui.mdx +214 -0
- package/.docs/raw/docs/tools/index.mdx +76 -0
- package/.docs/raw/docs/{guides → tools}/interactables.mdx +3 -3
- package/.docs/raw/docs/tools/mcp-apps.mdx +231 -0
- package/.docs/raw/docs/{integrations/tools → tools}/mcp.mdx +77 -50
- package/.docs/raw/docs/{guides → tools}/multi-agent.mdx +19 -21
- package/.docs/raw/docs/tools/tool-ui.mdx +967 -0
- package/.docs/raw/docs/tools/user-managed-mcp.mdx +337 -0
- package/.docs/raw/docs/ui/composer-trigger-popover.mdx +11 -1
- package/.docs/raw/docs/ui/directive-text.mdx +3 -3
- package/.docs/raw/docs/ui/mcp-config.mdx +102 -0
- package/.docs/raw/docs/ui/model-selector.mdx +8 -8
- package/.docs/raw/docs/ui/part-grouping.mdx +84 -50
- package/.docs/raw/docs/ui/reasoning.mdx +4 -5
- package/.docs/raw/docs/ui/sources.mdx +17 -0
- package/.docs/raw/docs/ui/streamdown.mdx +34 -2
- package/.docs/raw/docs/ui/thread-list.mdx +2 -2
- package/.docs/raw/docs/ui/thread.mdx +2 -2
- package/.docs/raw/docs/ui/tool-group.mdx +5 -6
- package/.docs/raw/docs/utilities/heat-graph.mdx +1 -1
- package/README.md +14 -72
- package/dist/constants.d.ts +12 -9
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +13 -9
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -24
- package/dist/index.js.map +1 -1
- package/dist/prepare-docs/code-examples.d.ts +4 -1
- package/dist/prepare-docs/code-examples.d.ts.map +1 -1
- package/dist/prepare-docs/code-examples.js +109 -121
- package/dist/prepare-docs/code-examples.js.map +1 -1
- package/dist/prepare-docs/copy-raw.d.ts +4 -1
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
- package/dist/prepare-docs/copy-raw.js +45 -42
- package/dist/prepare-docs/copy-raw.js.map +1 -1
- package/dist/prepare-docs/prepare.d.ts +1 -2
- package/dist/prepare-docs/prepare.js +17 -17
- package/dist/prepare-docs/prepare.js.map +1 -1
- package/dist/stdio.d.ts +1 -3
- package/dist/stdio.js +6 -3
- package/dist/stdio.js.map +1 -1
- package/dist/tools/docs.d.ts +20 -15
- package/dist/tools/docs.d.ts.map +1 -1
- package/dist/tools/docs.js +140 -161
- package/dist/tools/docs.js.map +1 -1
- package/dist/tools/examples.d.ts +20 -15
- package/dist/tools/examples.d.ts.map +1 -1
- package/dist/tools/examples.js +74 -86
- package/dist/tools/examples.js.map +1 -1
- package/dist/tools/tests/test-setup.d.ts +5 -2
- package/dist/tools/tests/test-setup.d.ts.map +1 -1
- package/dist/tools/tests/test-setup.js +21 -28
- package/dist/tools/tests/test-setup.js.map +1 -1
- package/dist/utils/logger.d.ts +8 -5
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +17 -17
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/mcp-format.d.ts +8 -5
- package/dist/utils/mcp-format.d.ts.map +1 -1
- package/dist/utils/mcp-format.js +9 -9
- package/dist/utils/mcp-format.js.map +1 -1
- package/dist/utils/mdx.d.ts +8 -6
- package/dist/utils/mdx.d.ts.map +1 -1
- package/dist/utils/mdx.js +22 -22
- package/dist/utils/mdx.js.map +1 -1
- package/dist/utils/paths.d.ts +9 -6
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +66 -76
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/security.d.ts +4 -1
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +19 -40
- package/dist/utils/security.js.map +1 -1
- package/package.json +5 -5
- package/.docs/organized/code-examples/with-parent-id-grouping.md +0 -596
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +0 -151
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +0 -230
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback-speech.mdx +0 -41
- package/.docs/raw/docs/(reference)/api-reference/context-providers/text-message-part-provider.mdx +0 -40
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -260
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-hook-form.mdx +0 -103
- package/.docs/raw/docs/(reference)/api-reference/integrations/vercel-ai-sdk.mdx +0 -254
- package/.docs/raw/docs/guides/tool-ui.mdx +0 -858
- package/.docs/raw/docs/guides/tools.mdx +0 -675
- package/dist/prepare-docs/prepare.d.ts.map +0 -1
- package/dist/stdio.d.ts.map +0 -1
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/deprecation-policy.mdx +0 -0
- /package/.docs/raw/docs/{(reference) → migrations}/react-compatibility.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/react-langgraph-v0-7.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-11.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-12.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-14.mdx +0 -0
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: ErrorPrimitive
|
|
3
|
-
description:
|
|
3
|
+
description: Error primitives for rendering assistant-ui runtime, thread, and message failures inside custom chat interfaces.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { ErrorPrimitiveMessageProps, ErrorPrimitiveRootProps } from "@/generated/typeDocs";
|
|
7
|
+
import { ErrorPrimitive as ErrorPrimitiveDocs } from "@/generated/primitiveDocs";
|
|
7
8
|
|
|
9
|
+
{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
|
|
10
|
+
{/* Do not edit manually. */}
|
|
8
11
|
|
|
12
|
+
For examples and usage patterns, see [Error](/docs/primitives/error).
|
|
13
|
+
|
|
14
|
+
{/* api-manual:start */}
|
|
9
15
|
## Anatomy
|
|
10
16
|
|
|
11
17
|
```tsx
|
|
@@ -17,56 +23,43 @@ const ErrorDisplay = () => (
|
|
|
17
23
|
</ErrorPrimitive.Root>
|
|
18
24
|
);
|
|
19
25
|
```
|
|
26
|
+
{/* api-manual:end */}
|
|
27
|
+
|
|
28
|
+
{/* api-reference:start */}
|
|
29
|
+
{/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
|
|
30
|
+
{/* Do not edit this block manually. */}
|
|
20
31
|
|
|
21
32
|
## API Reference
|
|
22
33
|
|
|
23
34
|
### Root
|
|
24
35
|
|
|
25
|
-
|
|
36
|
+
{ErrorPrimitiveDocs.Root?.deprecated && (
|
|
37
|
+
<Callout type="warn">
|
|
38
|
+
<strong>Deprecated.</strong> {ErrorPrimitiveDocs.Root.deprecated}
|
|
39
|
+
</Callout>
|
|
40
|
+
)}
|
|
26
41
|
|
|
27
|
-
|
|
28
|
-
type="ErrorPrimitiveRootProps"
|
|
29
|
-
parameters={[
|
|
30
|
-
{
|
|
31
|
-
name: "asChild",
|
|
32
|
-
type: "boolean",
|
|
33
|
-
description:
|
|
34
|
-
"Change the component to the HTML tag or custom component of the only child.",
|
|
35
|
-
},
|
|
36
|
-
]}
|
|
37
|
-
/>
|
|
42
|
+
{ErrorPrimitiveDocs.Root?.description}
|
|
38
43
|
|
|
39
|
-
|
|
44
|
+
{ErrorPrimitiveDocs.Root?.element && (
|
|
45
|
+
<p>This primitive renders a <code>{`<${ErrorPrimitiveDocs.Root?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
46
|
+
)}
|
|
47
|
+
|
|
48
|
+
<ParametersTable {...ErrorPrimitiveRootProps} />
|
|
40
49
|
|
|
41
|
-
|
|
50
|
+
### Message
|
|
42
51
|
|
|
43
|
-
|
|
44
|
-
type="
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
type: "ReactNode",
|
|
49
|
-
description:
|
|
50
|
-
"Optional custom content to display instead of the default error message.",
|
|
51
|
-
},
|
|
52
|
-
]}
|
|
53
|
-
/>
|
|
52
|
+
{ErrorPrimitiveDocs.Message?.deprecated && (
|
|
53
|
+
<Callout type="warn">
|
|
54
|
+
<strong>Deprecated.</strong> {ErrorPrimitiveDocs.Message.deprecated}
|
|
55
|
+
</Callout>
|
|
56
|
+
)}
|
|
54
57
|
|
|
55
|
-
|
|
58
|
+
{ErrorPrimitiveDocs.Message?.description}
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
{ErrorPrimitiveDocs.Message?.element && (
|
|
61
|
+
<p>This primitive renders a <code>{`<${ErrorPrimitiveDocs.Message?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
62
|
+
)}
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const MessageWithError = () => (
|
|
63
|
-
<MessagePrimitive.Root>
|
|
64
|
-
<MessagePrimitive.Parts />
|
|
65
|
-
<MessagePrimitive.Error>
|
|
66
|
-
<ErrorPrimitive.Root>
|
|
67
|
-
<ErrorPrimitive.Message />
|
|
68
|
-
</ErrorPrimitive.Root>
|
|
69
|
-
</MessagePrimitive.Error>
|
|
70
|
-
</MessagePrimitive.Root>
|
|
71
|
-
);
|
|
72
|
-
```
|
|
64
|
+
<ParametersTable {...ErrorPrimitiveMessageProps} />
|
|
65
|
+
{/* api-reference:end */}
|
|
@@ -1,65 +1,70 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description:
|
|
2
|
+
title: Primitives API Reference
|
|
3
|
+
description: "Composable React primitives for assistant-ui chat UIs: Thread, Composer, Message, BranchPicker, ActionBar, and the parts that build threads, message lists, attachments, and editing flows."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
{/* AUTO-GENERATED by scripts/generate-api-reference
|
|
7
|
-
{/*
|
|
6
|
+
{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
|
|
7
|
+
{/* The page list is generated from exported APIs; edit only the manual prose slot. */}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
{/* api-manual:start */}
|
|
10
|
+
Primitives are the low-level React components behind assistant-ui interfaces. They provide accessible behavior, state wiring, and composition points while leaving layout and styling under your control.
|
|
11
|
+
{/* api-manual:end */}
|
|
10
12
|
|
|
11
13
|
## Pages
|
|
12
14
|
|
|
13
15
|
<Cards>
|
|
14
16
|
<Card title={"ActionBarPrimitive"} href={"/docs/api-reference/primitives/action-bar"}>
|
|
15
|
-
{"
|
|
17
|
+
{"Composable message action controls for copy, edit, reload, speech, and feedback in assistant-ui chat interfaces."}
|
|
16
18
|
</Card>
|
|
17
19
|
<Card title={"ActionBarMorePrimitive"} href={"/docs/api-reference/primitives/action-bar-more"}>
|
|
18
|
-
{"
|
|
20
|
+
{"Overflow menu primitives for grouping secondary assistant message actions in a custom React UI."}
|
|
19
21
|
</Card>
|
|
20
22
|
<Card title={"AuiIf"} href={"/docs/api-reference/primitives/assistant-if"}>
|
|
21
|
-
{"Conditional rendering
|
|
23
|
+
{"Conditional rendering primitive for showing React UI from assistant-ui thread, message, composer, and runtime state."}
|
|
22
24
|
</Card>
|
|
23
25
|
<Card title={"AssistantModalPrimitive"} href={"/docs/api-reference/primitives/assistant-modal"}>
|
|
24
|
-
{"
|
|
26
|
+
{"Floating assistant modal primitives for building support chat, copilot, and embedded assistant experiences."}
|
|
25
27
|
</Card>
|
|
26
28
|
<Card title={"AttachmentPrimitive"} href={"/docs/api-reference/primitives/attachment"}>
|
|
27
|
-
{"
|
|
29
|
+
{"Attachment primitives for rendering file previews, names, thumbnails, and remove controls in assistant-ui messages and composers."}
|
|
28
30
|
</Card>
|
|
29
31
|
<Card title={"BranchPickerPrimitive"} href={"/docs/api-reference/primitives/branch-picker"}>
|
|
30
|
-
{"
|
|
32
|
+
{"Branch picker primitives for navigating regenerated assistant responses and alternate message paths inside a chat thread."}
|
|
33
|
+
</Card>
|
|
34
|
+
<Card title={"ChainOfThoughtPrimitive"} href={"/docs/api-reference/primitives/chain-of-thought"}>
|
|
35
|
+
{"Chain of thought primitives for rendering assistant reasoning, step lists, and collapsible disclosure UI in message content."}
|
|
31
36
|
</Card>
|
|
32
37
|
<Card title={"ComposerPrimitive"} href={"/docs/api-reference/primitives/composer"}>
|
|
33
|
-
{"
|
|
38
|
+
{"Composable input primitives for assistant-ui prompts, send controls, cancellation, attachments, and composer state."}
|
|
34
39
|
</Card>
|
|
35
40
|
<Card title={"ErrorPrimitive"} href={"/docs/api-reference/primitives/error"}>
|
|
36
|
-
{"
|
|
41
|
+
{"Error primitives for rendering assistant-ui runtime, thread, and message failures inside custom chat interfaces."}
|
|
37
42
|
</Card>
|
|
38
43
|
<Card title={"MessagePrimitive"} href={"/docs/api-reference/primitives/message"}>
|
|
39
|
-
{"
|
|
44
|
+
{"Message primitives for rendering assistant and user turns, message parts, attachments, actions, editing, and branch controls."}
|
|
40
45
|
</Card>
|
|
41
46
|
<Card title={"MessagePartPrimitive"} href={"/docs/api-reference/primitives/message-part"}>
|
|
42
|
-
{"
|
|
47
|
+
{"Message part primitives for rendering text, tool calls, data parts, reasoning, source content, and custom assistant output."}
|
|
48
|
+
</Card>
|
|
49
|
+
<Card title={"QueueItemPrimitive"} href={"/docs/api-reference/primitives/queue-item"}>
|
|
50
|
+
{"Queue item primitives for rendering pending assistant-ui thread operations, optimistic work, and runtime queue state."}
|
|
43
51
|
</Card>
|
|
44
52
|
<Card title={"SelectionToolbarPrimitive"} href={"/docs/api-reference/primitives/selection-toolbar"}>
|
|
45
|
-
{"
|
|
53
|
+
{"Selection toolbar primitives for quote, copy, and contextual actions on selected chat text."}
|
|
46
54
|
</Card>
|
|
47
55
|
<Card title={"SuggestionPrimitive"} href={"/docs/api-reference/primitives/suggestion"}>
|
|
48
|
-
{"
|
|
56
|
+
{"Suggestion primitives for rendering starter prompts, follow-up actions, and composer suggestions in assistant-ui threads."}
|
|
49
57
|
</Card>
|
|
50
58
|
<Card title={"ThreadPrimitive"} href={"/docs/api-reference/primitives/thread"}>
|
|
51
|
-
{"
|
|
59
|
+
{"Thread primitives for rendering chat transcripts, message lists, viewport state, suggestions, and composers in assistant-ui."}
|
|
52
60
|
</Card>
|
|
53
61
|
<Card title={"ThreadListPrimitive"} href={"/docs/api-reference/primitives/thread-list"}>
|
|
54
|
-
{"
|
|
62
|
+
{"Thread list primitives for rendering conversation navigation, new thread actions, and custom assistant sidebars."}
|
|
55
63
|
</Card>
|
|
56
64
|
<Card title={"ThreadListItemPrimitive"} href={"/docs/api-reference/primitives/thread-list-item"}>
|
|
57
|
-
{"
|
|
65
|
+
{"Thread list item primitives for rendering selectable conversation rows with titles, archive controls, delete actions, and menus."}
|
|
58
66
|
</Card>
|
|
59
67
|
<Card title={"ThreadListItemMorePrimitive"} href={"/docs/api-reference/primitives/thread-list-item-more"}>
|
|
60
|
-
{"
|
|
61
|
-
</Card>
|
|
62
|
-
<Card title={"Composition"} href={"/docs/api-reference/primitives/composition"}>
|
|
63
|
-
{"How to compose primitives with custom components using asChild."}
|
|
68
|
+
{"Overflow menu primitives for secondary thread list item actions in custom assistant-ui sidebars."}
|
|
64
69
|
</Card>
|
|
65
70
|
</Cards>
|
|
@@ -1,65 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: MessagePartPrimitive
|
|
3
|
-
description:
|
|
3
|
+
description: Message part primitives for rendering text, tool calls, data parts, reasoning, source content, and custom assistant output.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
TextMessagePartState,
|
|
9
|
-
AudioMessagePartState,
|
|
10
|
-
ToolCallMessagePartState,
|
|
11
|
-
} from "@/generated/typeDocs";
|
|
6
|
+
import { MessagePartPrimitiveImageProps, MessagePartPrimitiveMessagesProps, MessagePartPrimitiveTextProps } from "@/generated/typeDocs";
|
|
7
|
+
import { MessagePartPrimitive as MessagePartPrimitiveDocs } from "@/generated/primitiveDocs";
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## Message part Types
|
|
17
|
-
|
|
18
|
-
### Text
|
|
19
|
-
|
|
20
|
-
Standard text content, used for both user and assistant messages.
|
|
21
|
-
|
|
22
|
-
### Reasoning
|
|
23
|
-
|
|
24
|
-
Exposes the assistant's reasoning process, showing how it arrived at its responses. This is typically used only in assistant messages.
|
|
25
|
-
|
|
26
|
-
### Audio
|
|
27
|
-
|
|
28
|
-
Audio content that can be played back.
|
|
29
|
-
|
|
30
|
-
### Tool Call
|
|
31
|
-
|
|
32
|
-
Interactive elements that represent tool operations.
|
|
33
|
-
|
|
34
|
-
### Data
|
|
35
|
-
|
|
36
|
-
Custom data events that can be rendered as UI at their position in the message stream. Each data part has a `name` and a `data` payload.
|
|
37
|
-
|
|
38
|
-
You can use either the explicit format `{ type: "data", name: "workflow", data: {...} }` or the shorthand `data-*` prefixed format `{ type: "data-workflow", data: {...} }`. The prefixed format is automatically converted to a `DataMessagePart` (stripping the `data-` prefix as the `name`). Unknown message part types that don't match any built-in type are silently skipped with a console warning.
|
|
39
|
-
|
|
40
|
-
#### Streaming Data Parts
|
|
41
|
-
|
|
42
|
-
Data parts can be sent from the server using `appendData()` on the stream controller:
|
|
43
|
-
|
|
44
|
-
```ts
|
|
45
|
-
controller.appendData({
|
|
46
|
-
type: "data",
|
|
47
|
-
name: "chart",
|
|
48
|
-
data: { labels: ["Q1", "Q2"], values: [10, 20] },
|
|
49
|
-
});
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Register a renderer with `makeAssistantDataUI` to display data parts:
|
|
53
|
-
|
|
54
|
-
```tsx
|
|
55
|
-
import { makeAssistantDataUI } from "@assistant-ui/react";
|
|
56
|
-
|
|
57
|
-
const ChartUI = makeAssistantDataUI({
|
|
58
|
-
name: "chart",
|
|
59
|
-
render: ({ data }) => <MyChart data={data} />,
|
|
60
|
-
});
|
|
61
|
-
```
|
|
9
|
+
{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
|
|
10
|
+
{/* Do not edit manually. */}
|
|
62
11
|
|
|
12
|
+
{/* api-manual:start */}
|
|
63
13
|
## Anatomy
|
|
64
14
|
|
|
65
15
|
```tsx
|
|
@@ -69,215 +19,83 @@ const TextMessagePart = () => {
|
|
|
69
19
|
return <MessagePartPrimitive.Text />;
|
|
70
20
|
};
|
|
71
21
|
```
|
|
22
|
+
{/* api-manual:end */}
|
|
72
23
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
```tsx
|
|
78
|
-
import { MessagePartPrimitive } from "@assistant-ui/react";
|
|
79
|
-
|
|
80
|
-
<MessagePartPrimitive.Text />;
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Markdown Text
|
|
84
|
-
|
|
85
|
-
Renders the message's text as Markdown.
|
|
86
|
-
|
|
87
|
-
```tsx
|
|
88
|
-
import { MarkdownTextPrimitive } from "@assistant-ui/react-markdown";
|
|
89
|
-
|
|
90
|
-
<MarkdownTextPrimitive />;
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Audio
|
|
94
|
-
|
|
95
|
-
Coming soon.
|
|
96
|
-
|
|
97
|
-
### InProgress
|
|
98
|
-
|
|
99
|
-
Renders children only if the message part is in progress.
|
|
100
|
-
|
|
101
|
-
```tsx
|
|
102
|
-
import { MessagePartPrimitive } from "@assistant-ui/react";
|
|
103
|
-
|
|
104
|
-
<MessagePartPrimitive.InProgress>
|
|
105
|
-
<LoadingIndicator />
|
|
106
|
-
</MessagePartPrimitive.InProgress>;
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Tool UI
|
|
110
|
-
|
|
111
|
-
You can map tool calls to UI components. We provide a few utility functions to make this easier, such as `makeAssistantToolUI`.
|
|
112
|
-
|
|
113
|
-
```tsx
|
|
114
|
-
const MyWeatherToolUI = makeAssistantToolUI({
|
|
115
|
-
toolName: "get_weather",
|
|
116
|
-
render: function MyWeatherToolUI({ args, result }) {
|
|
117
|
-
return (
|
|
118
|
-
<div className="mb-4 flex flex-col items-center">
|
|
119
|
-
<pre className="whitespace-pre-wrap break-all text-center">
|
|
120
|
-
get_weather({JSON.stringify(args)})
|
|
121
|
-
</pre>
|
|
122
|
-
{result !== undefined && (
|
|
123
|
-
<pre className="whitespace-pre-wrap break-all text-center">
|
|
124
|
-
{JSON.stringify(result)}
|
|
125
|
-
</pre>
|
|
126
|
-
)}
|
|
127
|
-
</div>
|
|
128
|
-
);
|
|
129
|
-
},
|
|
130
|
-
});
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Data UI
|
|
134
|
-
|
|
135
|
-
You can map data events to UI components, similar to tool UIs. There are two approaches:
|
|
136
|
-
|
|
137
|
-
#### Inline configuration
|
|
138
|
-
|
|
139
|
-
Pass a `data` config to `MessagePrimitive.Parts`:
|
|
140
|
-
|
|
141
|
-
```tsx
|
|
142
|
-
<MessagePrimitive.Parts>
|
|
143
|
-
{({ part }) => {
|
|
144
|
-
if (part.type === "data" && part.name === "my_chart") return <ChartComponent data={part.data} />;
|
|
145
|
-
if (part.type === "data") return <pre>{JSON.stringify(part.data, null, 2)}</pre>;
|
|
146
|
-
return null;
|
|
147
|
-
}}
|
|
148
|
-
</MessagePrimitive.Parts>
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
#### Global registration
|
|
152
|
-
|
|
153
|
-
Use `makeAssistantDataUI` or `useAssistantDataUI` to register data UIs globally. Global registrations take priority over inline configuration.
|
|
154
|
-
|
|
155
|
-
```tsx
|
|
156
|
-
import { makeAssistantDataUI } from "@assistant-ui/react";
|
|
157
|
-
|
|
158
|
-
const MyChartUI = makeAssistantDataUI({
|
|
159
|
-
name: "my_chart",
|
|
160
|
-
render: ({ name, data }) => <ChartComponent data={data} />,
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
// Place inside AssistantRuntimeProvider
|
|
164
|
-
function App() {
|
|
165
|
-
return (
|
|
166
|
-
<AssistantRuntimeProvider runtime={runtime}>
|
|
167
|
-
<Thread />
|
|
168
|
-
<MyChartUI />
|
|
169
|
-
</AssistantRuntimeProvider>
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
The hook variant allows access to component state:
|
|
175
|
-
|
|
176
|
-
```tsx
|
|
177
|
-
import { useAssistantDataUI } from "@assistant-ui/react";
|
|
178
|
-
|
|
179
|
-
function MyComponent() {
|
|
180
|
-
useAssistantDataUI({
|
|
181
|
-
name: "my_chart",
|
|
182
|
-
render: ({ name, data }) => <ChartComponent data={data} />,
|
|
183
|
-
});
|
|
184
|
-
return null;
|
|
185
|
-
}
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
Each data component receives the full data part as props: `{ type: "data", name: string, data: T, status: MessagePartStatus }`.
|
|
24
|
+
{/* api-reference:start */}
|
|
25
|
+
{/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
|
|
26
|
+
{/* Do not edit this block manually. */}
|
|
189
27
|
|
|
190
|
-
|
|
28
|
+
## API Reference
|
|
191
29
|
|
|
192
|
-
###
|
|
193
|
-
|
|
194
|
-
Renders nested messages from a tool call part's `messages` field. This is used in multi-agent setups where a sub-agent's conversation is embedded inside a tool call.
|
|
195
|
-
|
|
196
|
-
```tsx
|
|
197
|
-
import { MessagePartPrimitive } from "@assistant-ui/react";
|
|
198
|
-
|
|
199
|
-
<MessagePartPrimitive.Messages>
|
|
200
|
-
{({ message }) => {
|
|
201
|
-
if (message.role === "user") return <MyUserMessage />;
|
|
202
|
-
return <MyAssistantMessage />;
|
|
203
|
-
}}
|
|
204
|
-
</MessagePartPrimitive.Messages>;
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
This primitive must be used inside a tool call part context (e.g. inside a `makeAssistantToolUI` render function). It reads the `messages` field from the current `ToolCallMessagePart` and renders them in a readonly thread context.
|
|
30
|
+
### Text
|
|
208
31
|
|
|
209
|
-
|
|
32
|
+
{MessagePartPrimitiveDocs.Text?.deprecated && (
|
|
33
|
+
<Callout type="warn">
|
|
34
|
+
<strong>Deprecated.</strong> {MessagePartPrimitiveDocs.Text.deprecated}
|
|
35
|
+
</Callout>
|
|
36
|
+
)}
|
|
210
37
|
|
|
211
|
-
|
|
38
|
+
{MessagePartPrimitiveDocs.Text?.description}
|
|
212
39
|
|
|
213
|
-
|
|
40
|
+
{MessagePartPrimitiveDocs.Text?.element && (
|
|
41
|
+
<p>This primitive renders a <code>{`<${MessagePartPrimitiveDocs.Text?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
42
|
+
)}
|
|
214
43
|
|
|
215
|
-
|
|
44
|
+
<ParametersTable {...MessagePartPrimitiveTextProps} />
|
|
216
45
|
|
|
217
|
-
|
|
46
|
+
{/* api-manual:MessagePartPrimitive.Text:start */}
|
|
47
|
+
| Data attribute | Values |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| `[data-status]` | `"running"`, `"complete"`, or `"incomplete"` |
|
|
50
|
+
{/* api-manual:MessagePartPrimitive.Text:end */}
|
|
218
51
|
|
|
219
|
-
|
|
220
|
-
import { MessagePrimitive } from "@assistant-ui/react";
|
|
52
|
+
### Image
|
|
221
53
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
if (part.type === "tool-call" && part.toolName === "get_weather") return <MyWeatherToolUI {...part} />;
|
|
228
|
-
if (part.type === "tool-call") return <MyFallbackToolUI {...part} />;
|
|
229
|
-
if (part.type === "data" && part.name === "my_chart") return <MyChartComponent {...part} />;
|
|
230
|
-
if (part.type === "data") return <GenericDataComponent {...part} />;
|
|
231
|
-
return null;
|
|
232
|
-
}}
|
|
233
|
-
</MessagePrimitive.Parts>;
|
|
234
|
-
```
|
|
54
|
+
{MessagePartPrimitiveDocs.Image?.deprecated && (
|
|
55
|
+
<Callout type="warn">
|
|
56
|
+
<strong>Deprecated.</strong> {MessagePartPrimitiveDocs.Image.deprecated}
|
|
57
|
+
</Callout>
|
|
58
|
+
)}
|
|
235
59
|
|
|
236
|
-
|
|
60
|
+
{MessagePartPrimitiveDocs.Image?.description}
|
|
237
61
|
|
|
238
|
-
|
|
62
|
+
{MessagePartPrimitiveDocs.Image?.element && (
|
|
63
|
+
<p>This primitive renders a <code>{`<${MessagePartPrimitiveDocs.Image?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
64
|
+
)}
|
|
239
65
|
|
|
240
|
-
|
|
241
|
-
import { TextMessagePartProvider } from "@assistant-ui/react";
|
|
66
|
+
<ParametersTable {...MessagePartPrimitiveImageProps} />
|
|
242
67
|
|
|
243
|
-
|
|
244
|
-
<MessagePartPrimitive.Text />
|
|
245
|
-
</TextMessagePartProvider>;
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
## Runtime API
|
|
249
|
-
|
|
250
|
-
### `useAui` (Message Part Actions)
|
|
251
|
-
|
|
252
|
-
```tsx
|
|
253
|
-
import { useAui } from "@assistant-ui/react";
|
|
254
|
-
|
|
255
|
-
const aui = useAui();
|
|
256
|
-
aui.part().addToolResult(result);
|
|
257
|
-
const partState = aui.part().getState();
|
|
258
|
-
```
|
|
68
|
+
### InProgress
|
|
259
69
|
|
|
260
|
-
|
|
70
|
+
{MessagePartPrimitiveDocs.InProgress?.deprecated && (
|
|
71
|
+
<Callout type="warn">
|
|
72
|
+
<strong>Deprecated.</strong> {MessagePartPrimitiveDocs.InProgress.deprecated}
|
|
73
|
+
</Callout>
|
|
74
|
+
)}
|
|
261
75
|
|
|
262
|
-
|
|
76
|
+
{MessagePartPrimitiveDocs.InProgress?.description}
|
|
263
77
|
|
|
264
|
-
|
|
265
|
-
|
|
78
|
+
{MessagePartPrimitiveDocs.InProgress?.element && (
|
|
79
|
+
<p>This primitive renders a <code>{`<${MessagePartPrimitiveDocs.InProgress?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
80
|
+
)}
|
|
266
81
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
82
|
+
{MessagePartPrimitiveDocs.InProgress?.props && (
|
|
83
|
+
<ParametersTable type={MessagePartPrimitiveDocs.InProgress?.element} parameters={MessagePartPrimitiveDocs.InProgress.props} />
|
|
84
|
+
)}
|
|
270
85
|
|
|
271
|
-
|
|
272
|
-
<ParametersTable {...AudioMessagePartState} />
|
|
273
|
-
<ParametersTable {...ToolCallMessagePartState} />
|
|
86
|
+
### Messages
|
|
274
87
|
|
|
275
|
-
|
|
88
|
+
{MessagePartPrimitiveDocs.Messages?.deprecated && (
|
|
89
|
+
<Callout type="warn">
|
|
90
|
+
<strong>Deprecated.</strong> {MessagePartPrimitiveDocs.Messages.deprecated}
|
|
91
|
+
</Callout>
|
|
92
|
+
)}
|
|
276
93
|
|
|
277
|
-
|
|
278
|
-
import { useMessagePartText } from "@assistant-ui/react";
|
|
94
|
+
{MessagePartPrimitiveDocs.Messages?.description}
|
|
279
95
|
|
|
280
|
-
|
|
281
|
-
|
|
96
|
+
{MessagePartPrimitiveDocs.Messages?.element && (
|
|
97
|
+
<p>This primitive renders a <code>{`<${MessagePartPrimitiveDocs.Messages?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
98
|
+
)}
|
|
282
99
|
|
|
283
|
-
<ParametersTable {...
|
|
100
|
+
<ParametersTable {...MessagePartPrimitiveMessagesProps} />
|
|
101
|
+
{/* api-reference:end */}
|