@assistant-ui/mcp-docs-server 0.1.31 → 0.1.32
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 +8 -8
- package/.docs/organized/code-examples/with-a2a.md +10 -10
- package/.docs/organized/code-examples/with-ag-ui.md +11 -11
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +13 -13
- package/.docs/organized/code-examples/with-artifacts.md +13 -13
- package/.docs/organized/code-examples/with-assistant-transport.md +10 -10
- package/.docs/organized/code-examples/with-browser-extension.md +345 -0
- package/.docs/organized/code-examples/with-chain-of-thought.md +54 -17
- package/.docs/organized/code-examples/with-cloud-standalone.md +13 -13
- package/.docs/organized/code-examples/with-cloud.md +13 -13
- package/.docs/organized/code-examples/with-custom-thread-list.md +13 -13
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +17 -16
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +17 -16
- package/.docs/organized/code-examples/with-expo.md +24 -24
- package/.docs/organized/code-examples/with-external-store.md +10 -10
- package/.docs/organized/code-examples/with-ffmpeg.md +13 -13
- package/.docs/organized/code-examples/with-generative-ui.md +210 -13
- package/.docs/organized/code-examples/with-google-adk.md +10 -10
- package/.docs/organized/code-examples/with-heat-graph.md +8 -8
- package/.docs/organized/code-examples/with-image-generation.md +454 -0
- package/.docs/organized/code-examples/with-interactables.md +13 -13
- package/.docs/organized/code-examples/with-langchain.md +12 -12
- package/.docs/organized/code-examples/with-langgraph.md +15 -12
- package/.docs/organized/code-examples/with-livekit.md +18 -17
- package/.docs/organized/code-examples/with-mcp.md +748 -0
- package/.docs/organized/code-examples/with-opencode.md +11 -11
- package/.docs/organized/code-examples/with-parent-id-grouping.md +11 -11
- package/.docs/organized/code-examples/with-react-hook-form.md +14 -14
- package/.docs/organized/code-examples/with-react-ink.md +4 -4
- package/.docs/organized/code-examples/with-react-router.md +15 -15
- package/.docs/organized/code-examples/with-resumable-stream.md +660 -0
- package/.docs/organized/code-examples/with-store.md +8 -8
- package/.docs/organized/code-examples/with-tanstack.md +14 -14
- package/.docs/organized/code-examples/with-tap-runtime.md +11 -10
- package/.docs/raw/docs/(docs)/cli.mdx +1 -0
- package/.docs/raw/docs/(docs)/index.mdx +2 -2
- package/.docs/raw/docs/(docs)/installation.mdx +1 -1
- 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 +37 -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 +36 -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 +18 -57
- 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 +79 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +52 -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 +110 -131
- 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 +175 -591
- 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 +68 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +39 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +79 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +42 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +92 -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 +131 -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 -1
- 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 +5 -5
- package/.docs/raw/docs/guides/context-api.mdx +4 -4
- package/.docs/raw/docs/guides/dictation.mdx +2 -2
- package/.docs/raw/docs/guides/editing.mdx +1 -1
- package/.docs/raw/docs/guides/generative-ui.mdx +142 -0
- package/.docs/raw/docs/guides/image-generation.mdx +74 -0
- package/.docs/raw/docs/guides/index.mdx +2 -2
- package/.docs/raw/docs/guides/interactables.mdx +2 -2
- package/.docs/raw/docs/guides/latex.mdx +2 -2
- package/.docs/raw/docs/guides/mcp-apps.mdx +231 -0
- package/.docs/raw/docs/guides/mentions.mdx +2 -2
- package/.docs/raw/docs/guides/message-timing.mdx +38 -5
- package/.docs/raw/docs/guides/multi-agent.mdx +2 -2
- 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 +1 -1
- package/.docs/raw/docs/guides/speech.mdx +2 -2
- package/.docs/raw/docs/guides/suggestions.mdx +88 -4
- package/.docs/raw/docs/guides/tool-ui.mdx +2 -2
- package/.docs/raw/docs/guides/tools.mdx +66 -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/index.mdx +10 -11
- package/.docs/raw/docs/ink/primitives.mdx +349 -8
- 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 +2 -2
- 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 +15 -3
- 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/tools/react-mcp.mdx +337 -0
- package/.docs/raw/docs/primitives/composer.mdx +53 -0
- package/.docs/raw/docs/primitives/index.mdx +2 -2
- package/.docs/raw/docs/primitives/suggestion.mdx +9 -0
- package/.docs/raw/docs/react-native/hooks.mdx +2 -2
- package/.docs/raw/docs/react-native/index.mdx +4 -4
- package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +4 -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 +7 -0
- 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/overview.mdx +2 -2
- 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/overview.mdx +2 -2
- 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/ui/composer-trigger-popover.mdx +11 -1
- 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/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/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/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/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,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description: API reference for primitives,
|
|
2
|
+
title: API Reference
|
|
3
|
+
description: Complete assistant-ui React API reference for building AI chat UIs with primitives, hooks, runtimes, adapters, tools, transport, voice, and integrations.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
import { Component, ContextLevel
|
|
7
|
+
import { Component, ContextLevel } from "./context";
|
|
8
8
|
|
|
9
9
|
export const contextColors = {
|
|
10
10
|
"Assistant Context": "#4a86e8",
|
|
@@ -21,80 +21,39 @@ export const contextColors = {
|
|
|
21
21
|
The React API reference is organized by how you build with assistant-ui:
|
|
22
22
|
|
|
23
23
|
<Cards>
|
|
24
|
-
<Card title="
|
|
25
|
-
|
|
24
|
+
<Card title="Tools" href="/docs/api-reference/tools">
|
|
25
|
+
Define toolkits, register component-scoped tools, and render tool or data parts.
|
|
26
26
|
</Card>
|
|
27
|
-
<Card title="
|
|
27
|
+
<Card title="Model Context" href="/docs/api-reference/model-context/context">
|
|
28
|
+
Provide instructions, merge model context, and register inline renderers for model-facing state.
|
|
29
|
+
</Card>
|
|
30
|
+
<Card title="Transport" href="/docs/api-reference/transport/assistant-transport">
|
|
31
|
+
Assistant transport, frame provider, and serialized frame protocol APIs for cross-boundary runtimes.
|
|
32
|
+
</Card>
|
|
33
|
+
<Card title="External Store" href="/docs/api-reference/external-store/runtime">
|
|
34
|
+
Runtime and message conversion APIs for apps that own their message store.
|
|
35
|
+
</Card>
|
|
36
|
+
<Card title="Voice" href="/docs/api-reference/voice/session">
|
|
37
|
+
Realtime voice sessions, speech synthesis adapters, and dictation adapters.
|
|
38
|
+
</Card>
|
|
39
|
+
<Card title="Primitives" href="/docs/api-reference/primitives/thread">
|
|
40
|
+
Composable React components such as `ThreadPrimitive`, `MessagePrimitive`, and `ComposerPrimitive`.
|
|
41
|
+
</Card>
|
|
42
|
+
<Card title="Hooks" href="/docs/api-reference/hooks/state">
|
|
28
43
|
Reactive state hooks, runtime hooks, model context hooks, and utility hooks.
|
|
29
44
|
</Card>
|
|
30
|
-
<Card title="Adapters" href="/docs/api-reference/adapters">
|
|
45
|
+
<Card title="Adapters" href="/docs/api-reference/adapters/model">
|
|
31
46
|
Runtime extension points for attachments, persistence, feedback, speech, dictation, and suggestions.
|
|
32
47
|
</Card>
|
|
48
|
+
<Card title="Integrations" href="/docs/api-reference/integrations/react-ai-sdk">
|
|
49
|
+
Package-level APIs for integrations such as `@assistant-ui/react-ai-sdk` and `@assistant-ui/cloud-ai-sdk`.
|
|
50
|
+
</Card>
|
|
33
51
|
<Card title="Runtime State" href="/docs/api-reference/runtimes/assistant-runtime">
|
|
34
52
|
Runtime action and state shapes used by `useAui` and `useAuiState`.
|
|
35
53
|
</Card>
|
|
36
54
|
</Cards>
|
|
37
55
|
|
|
38
|
-
The lower sections on this page show how the contexts nest and where
|
|
39
|
-
|
|
40
|
-
## Cloud
|
|
41
|
-
|
|
42
|
-
- [`AssistantCloud`](#assistant-cloud)
|
|
43
|
-
|
|
44
|
-
## Runtime API
|
|
45
|
-
|
|
46
|
-
### AI SDK
|
|
47
|
-
|
|
48
|
-
- [`useChatRuntime`](#use-chat-runtime)
|
|
49
|
-
- [`useAISDKRuntime`](#use-aisdk-runtime)
|
|
50
|
-
|
|
51
|
-
### Data Stream
|
|
52
|
-
|
|
53
|
-
- [`useDataStreamRuntime`](#use-data-stream-runtime)
|
|
54
|
-
- [`useCloudRuntime`](#use-cloud-runtime)
|
|
55
|
-
- [`toLanguageModelMessages`](#to-language-model-messages) (AI SDK specific)
|
|
56
|
-
|
|
57
|
-
### assistant-stream (Framework-Agnostic)
|
|
58
|
-
|
|
59
|
-
- [`toGenericMessages`](#to-generic-messages)
|
|
60
|
-
- [`toToolsJSONSchema`](#to-tools-json-schema)
|
|
61
|
-
- [`GenericMessage`](#generic-message)
|
|
62
|
-
|
|
63
|
-
### LangGraph
|
|
64
|
-
|
|
65
|
-
- [`useLangGraphRuntime`](#use-lang-graph-runtime)
|
|
66
|
-
|
|
67
|
-
### Local Runtime
|
|
68
|
-
|
|
69
|
-
- [`useLocalRuntime`](#use-local-runtime)
|
|
70
|
-
|
|
71
|
-
### External Store Runtime
|
|
72
|
-
|
|
73
|
-
- [`useExternalStoreRuntime`](#use-external-store-runtime)
|
|
74
|
-
- [`createMessageConverter`](#create-message-converter)
|
|
75
|
-
|
|
76
|
-
### Thread List Runtime
|
|
77
|
-
|
|
78
|
-
- [`useRemoteThreadListRuntime`](#use-remote-thread-list-runtime)
|
|
79
|
-
- [`useCloudThreadListRuntime`](#use-cloud-thread-list-runtime)
|
|
80
|
-
|
|
81
|
-
## Runtime Adapters
|
|
82
|
-
|
|
83
|
-
### Attachment
|
|
84
|
-
|
|
85
|
-
- [`AttachmentAdapter`](#attachment-adapter)
|
|
86
|
-
- [`SimpleImageAttachmentAdapter`](#simple-image-attachment-adapter)
|
|
87
|
-
- [`SimpleTextAttachmentAdapter`](#simple-text-attachment-adapter)
|
|
88
|
-
- [`CompositeAttachmentAdapter`](#composite-attachment-adapter)
|
|
89
|
-
|
|
90
|
-
### Feedback
|
|
91
|
-
|
|
92
|
-
- [`FeedbackAdapter`](#feedback-adapter)
|
|
93
|
-
|
|
94
|
-
### Speech
|
|
95
|
-
|
|
96
|
-
- [`SpeechSynthesisAdapter`](#speech-synthesis-adapter)
|
|
97
|
-
- [`WebSpeechSynthesisAdapter`](#web-speech-synthesis-adapter)
|
|
56
|
+
The lower sections on this page show how the core React contexts nest and where the primary primitives, hooks, and runtime objects are available. Feature-first APIs such as tools, model context, transport, external store, and voice now live in their own generated sections.
|
|
98
57
|
|
|
99
58
|
## Highest Level Context Providers
|
|
100
59
|
|
|
@@ -110,12 +69,20 @@ The lower sections on this page show how the contexts nest and where each primit
|
|
|
110
69
|
link: "#composer-context",
|
|
111
70
|
},
|
|
112
71
|
]}
|
|
113
|
-
docsLink="
|
|
72
|
+
docsLink="/docs/api-reference/context-providers/assistant-runtime-provider"
|
|
114
73
|
tooltip="Provides the highest level context for the assistant-ui"
|
|
115
74
|
props="runtime={runtime}"
|
|
116
75
|
>
|
|
117
|
-
<Component
|
|
118
|
-
|
|
76
|
+
<Component
|
|
77
|
+
name="ThreadPrimitive"
|
|
78
|
+
docsLink="/docs/api-reference/primitives/thread"
|
|
79
|
+
tooltip="Thread primitive components"
|
|
80
|
+
/>
|
|
81
|
+
<Component
|
|
82
|
+
name="ThreadListPrimitive"
|
|
83
|
+
docsLink="/docs/api-reference/primitives/thread-list"
|
|
84
|
+
tooltip="Thread list primitive components"
|
|
85
|
+
/>
|
|
119
86
|
</Component>
|
|
120
87
|
|
|
121
88
|
<Component
|
|
@@ -125,14 +92,18 @@ The lower sections on this page show how the contexts nest and where each primit
|
|
|
125
92
|
{
|
|
126
93
|
name: "Text MessagePart Context",
|
|
127
94
|
color: contextColors["MessagePart Context"],
|
|
128
|
-
link: "#
|
|
95
|
+
link: "#messagepart-context",
|
|
129
96
|
},
|
|
130
97
|
]}
|
|
131
|
-
docsLink="
|
|
98
|
+
docsLink="/docs/api-reference/context-providers/scoped-providers"
|
|
132
99
|
tooltip="Provides context for text message parts"
|
|
133
100
|
props="text={text}"
|
|
134
101
|
>
|
|
135
|
-
<Component
|
|
102
|
+
<Component
|
|
103
|
+
name="MessagePartPrimitive"
|
|
104
|
+
docsLink="/docs/api-reference/primitives/message-part"
|
|
105
|
+
tooltip="Message part primitive components"
|
|
106
|
+
/>
|
|
136
107
|
</Component>
|
|
137
108
|
|
|
138
109
|
<ContextLevel color={contextColors["Assistant Context"]}>
|
|
@@ -149,16 +120,16 @@ Programmatically access the assistant's state and actions via `useAui()`.
|
|
|
149
120
|
|
|
150
121
|
Add system prompt instructions
|
|
151
122
|
|
|
152
|
-
- [`useAssistantInstructions`](
|
|
123
|
+
- [`useAssistantInstructions`](/docs/api-reference/model-context/context)
|
|
153
124
|
|
|
154
125
|
### Tool UI
|
|
155
126
|
|
|
156
127
|
Register tool UIs
|
|
157
128
|
|
|
158
|
-
- [`makeAssistantTool`](
|
|
159
|
-
- [`makeAssistantToolUI`](#
|
|
160
|
-
- [`useAssistantTool`](
|
|
161
|
-
- [`useAssistantToolUI`](#
|
|
129
|
+
- [`makeAssistantTool`](/docs/api-reference/tools/component-tools#makeassistanttool)
|
|
130
|
+
- [`makeAssistantToolUI`](/docs/api-reference/tools/rendering#makeassistanttoolui)
|
|
131
|
+
- [`useAssistantTool`](/docs/api-reference/tools/component-tools#useassistanttool)
|
|
132
|
+
- [`useAssistantToolUI`](/docs/api-reference/tools/rendering#useassistanttoolui)
|
|
162
133
|
|
|
163
134
|
Programmatically access the list of registered tool UIs via `useAuiState((s) => s.tools)` and `useAui().tools()`.
|
|
164
135
|
|
|
@@ -168,12 +139,12 @@ Shows a list of threads and allows the user to switch between them.
|
|
|
168
139
|
|
|
169
140
|
<Component
|
|
170
141
|
name="ThreadListPrimitive.Root"
|
|
171
|
-
docsLink="
|
|
142
|
+
docsLink="/docs/api-reference/primitives/thread-list"
|
|
172
143
|
tooltip="Root component for the thread list"
|
|
173
144
|
>
|
|
174
145
|
<Component
|
|
175
146
|
name="ThreadListPrimitive.New"
|
|
176
|
-
docsLink="
|
|
147
|
+
docsLink="/docs/api-reference/primitives/thread-list"
|
|
177
148
|
tooltip="Component for creating a new thread"
|
|
178
149
|
/>
|
|
179
150
|
<Component
|
|
@@ -185,7 +156,7 @@ Shows a list of threads and allows the user to switch between them.
|
|
|
185
156
|
color: contextColors["ThreadListItem Context"],
|
|
186
157
|
},
|
|
187
158
|
]}
|
|
188
|
-
docsLink="
|
|
159
|
+
docsLink="/docs/api-reference/primitives/thread-list"
|
|
189
160
|
tooltip="Container for thread list items, provides context for individual items"
|
|
190
161
|
props="components={...}"
|
|
191
162
|
/>
|
|
@@ -213,8 +184,8 @@ Programmatically access the thread's state and actions.
|
|
|
213
184
|
|
|
214
185
|
### ThreadViewportStore
|
|
215
186
|
|
|
216
|
-
- [`useThreadViewport`](
|
|
217
|
-
- [`useThreadViewportStore`](
|
|
187
|
+
- [`useThreadViewport`](/docs/api-reference/hooks/primitives)
|
|
188
|
+
- [`useThreadViewportStore`](/docs/api-reference/hooks/primitives)
|
|
218
189
|
|
|
219
190
|
### ThreadPrimitive
|
|
220
191
|
|
|
@@ -222,12 +193,12 @@ A conversation thread.
|
|
|
222
193
|
|
|
223
194
|
<Component
|
|
224
195
|
name="ThreadPrimitive.Root"
|
|
225
|
-
docsLink="
|
|
196
|
+
docsLink="/docs/api-reference/primitives/thread"
|
|
226
197
|
tooltip="Root component for a thread"
|
|
227
198
|
>
|
|
228
199
|
<Component
|
|
229
200
|
name="ThreadPrimitive.Viewport"
|
|
230
|
-
docsLink="
|
|
201
|
+
docsLink="/docs/api-reference/primitives/thread"
|
|
231
202
|
tooltip="Viewport for the thread content"
|
|
232
203
|
>
|
|
233
204
|
<Component
|
|
@@ -241,27 +212,35 @@ A conversation thread.
|
|
|
241
212
|
link: "#composer-context",
|
|
242
213
|
},
|
|
243
214
|
]}
|
|
244
|
-
docsLink="
|
|
215
|
+
docsLink="/docs/api-reference/primitives/thread"
|
|
245
216
|
tooltip="Container for thread messages, provides context for messages and edit composer"
|
|
246
217
|
>
|
|
247
|
-
<Component
|
|
218
|
+
<Component
|
|
219
|
+
name="MessagePrimitive"
|
|
220
|
+
docsLink="/docs/api-reference/primitives/message"
|
|
221
|
+
tooltip="Message primitive components"
|
|
222
|
+
/>
|
|
248
223
|
</Component>
|
|
249
224
|
<Component
|
|
250
225
|
name="ThreadPrimitive.ScrollToBottom"
|
|
251
|
-
docsLink="
|
|
226
|
+
docsLink="/docs/api-reference/primitives/thread"
|
|
252
227
|
tooltip="Scrolls to the bottom of the thread"
|
|
253
228
|
/>
|
|
254
229
|
<Component
|
|
255
230
|
name="AuiIf"
|
|
256
|
-
docsLink="
|
|
231
|
+
docsLink="/docs/api-reference/primitives/assistant-if"
|
|
257
232
|
tooltip="Conditional rendering based on assistant state"
|
|
258
233
|
/>
|
|
259
234
|
<Component
|
|
260
235
|
name="ThreadPrimitive.Suggestion"
|
|
261
|
-
docsLink="
|
|
236
|
+
docsLink="/docs/api-reference/primitives/thread"
|
|
262
237
|
tooltip="Displays suggestions in the thread"
|
|
263
238
|
/>
|
|
264
|
-
<Component
|
|
239
|
+
<Component
|
|
240
|
+
name="ComposerPrimitive"
|
|
241
|
+
docsLink="/docs/api-reference/primitives/composer"
|
|
242
|
+
tooltip="Composer primitive components"
|
|
243
|
+
/>
|
|
265
244
|
</Component>
|
|
266
245
|
</Component>
|
|
267
246
|
|
|
@@ -271,22 +250,22 @@ A floating modal that usually appears in the lower right corner of the screen. C
|
|
|
271
250
|
|
|
272
251
|
<Component
|
|
273
252
|
name="AssistantModalPrimitive.Root"
|
|
274
|
-
docsLink="
|
|
253
|
+
docsLink="/docs/api-reference/primitives/assistant-modal"
|
|
275
254
|
tooltip="Root component for the assistant modal"
|
|
276
255
|
>
|
|
277
256
|
<Component
|
|
278
257
|
name="AssistantModalPrimitive.Trigger"
|
|
279
|
-
docsLink="
|
|
258
|
+
docsLink="/docs/api-reference/primitives/assistant-modal"
|
|
280
259
|
tooltip="Trigger to open the assistant modal"
|
|
281
260
|
/>
|
|
282
261
|
<Component
|
|
283
262
|
name="AssistantModalPrimitive.Anchor"
|
|
284
|
-
docsLink="
|
|
263
|
+
docsLink="/docs/api-reference/primitives/assistant-modal"
|
|
285
264
|
tooltip="Anchor point for the assistant modal"
|
|
286
265
|
/>
|
|
287
266
|
<Component
|
|
288
267
|
name="AssistantModalPrimitive.Content"
|
|
289
|
-
docsLink="
|
|
268
|
+
docsLink="/docs/api-reference/primitives/assistant-modal"
|
|
290
269
|
tooltip="Content of the assistant modal"
|
|
291
270
|
/>
|
|
292
271
|
</Component>
|
|
@@ -308,22 +287,22 @@ Manages the state and actions for the message composer
|
|
|
308
287
|
|
|
309
288
|
<Component
|
|
310
289
|
name="ComposerPrimitive.Root"
|
|
311
|
-
docsLink="
|
|
290
|
+
docsLink="/docs/api-reference/primitives/composer"
|
|
312
291
|
tooltip="Root component for the composer"
|
|
313
292
|
>
|
|
314
293
|
<Component
|
|
315
294
|
name="ComposerPrimitive.Input"
|
|
316
|
-
docsLink="
|
|
295
|
+
docsLink="/docs/api-reference/primitives/composer"
|
|
317
296
|
tooltip="Input field for composing messages"
|
|
318
297
|
/>
|
|
319
298
|
<Component
|
|
320
299
|
name="ComposerPrimitive.Send"
|
|
321
|
-
docsLink="
|
|
300
|
+
docsLink="/docs/api-reference/primitives/composer"
|
|
322
301
|
tooltip="Button to send the composed message"
|
|
323
302
|
/>
|
|
324
303
|
<Component
|
|
325
304
|
name="ComposerPrimitive.Cancel"
|
|
326
|
-
docsLink="
|
|
305
|
+
docsLink="/docs/api-reference/primitives/composer"
|
|
327
306
|
tooltip="Button to cancel composing"
|
|
328
307
|
/>
|
|
329
308
|
<Component
|
|
@@ -335,12 +314,12 @@ Manages the state and actions for the message composer
|
|
|
335
314
|
color: contextColors["Attachment Context"],
|
|
336
315
|
},
|
|
337
316
|
]}
|
|
338
|
-
docsLink="
|
|
317
|
+
docsLink="/docs/api-reference/primitives/composer"
|
|
339
318
|
tooltip="Manages attachments in the composer"
|
|
340
319
|
/>
|
|
341
320
|
<Component
|
|
342
321
|
name="ComposerPrimitive.AddAttachment"
|
|
343
|
-
docsLink="
|
|
322
|
+
docsLink="/docs/api-reference/primitives/composer"
|
|
344
323
|
tooltip="Button to add an attachment"
|
|
345
324
|
/>
|
|
346
325
|
</Component>
|
|
@@ -364,7 +343,7 @@ Manages the state and actions for individual messages
|
|
|
364
343
|
|
|
365
344
|
<Component
|
|
366
345
|
name="MessagePrimitive.Root"
|
|
367
|
-
docsLink="
|
|
346
|
+
docsLink="/docs/api-reference/primitives/message"
|
|
368
347
|
tooltip="Root component for a message"
|
|
369
348
|
>
|
|
370
349
|
<Component
|
|
@@ -376,7 +355,7 @@ Manages the state and actions for individual messages
|
|
|
376
355
|
color: contextColors["MessagePart Context"],
|
|
377
356
|
},
|
|
378
357
|
]}
|
|
379
|
-
docsLink="
|
|
358
|
+
docsLink="/docs/api-reference/primitives/message"
|
|
380
359
|
tooltip="Displays the parts of the message"
|
|
381
360
|
/>
|
|
382
361
|
<Component
|
|
@@ -388,12 +367,12 @@ Manages the state and actions for individual messages
|
|
|
388
367
|
color: contextColors["Attachment Context"],
|
|
389
368
|
},
|
|
390
369
|
]}
|
|
391
|
-
docsLink="
|
|
370
|
+
docsLink="/docs/api-reference/primitives/message"
|
|
392
371
|
tooltip="Displays attachments in the message"
|
|
393
372
|
/>
|
|
394
373
|
<Component
|
|
395
374
|
name="AuiIf"
|
|
396
|
-
docsLink="
|
|
375
|
+
docsLink="/docs/api-reference/primitives/assistant-if"
|
|
397
376
|
tooltip="Conditional rendering based on assistant state"
|
|
398
377
|
/>
|
|
399
378
|
</Component>
|
|
@@ -402,42 +381,42 @@ Manages the state and actions for individual messages
|
|
|
402
381
|
|
|
403
382
|
<Component
|
|
404
383
|
name="ActionBarPrimitive.Root"
|
|
405
|
-
docsLink="
|
|
384
|
+
docsLink="/docs/api-reference/primitives/action-bar"
|
|
406
385
|
tooltip="Root component for the action bar"
|
|
407
386
|
>
|
|
408
387
|
<Component
|
|
409
388
|
name="ActionBarPrimitive.Copy"
|
|
410
|
-
docsLink="
|
|
389
|
+
docsLink="/docs/api-reference/primitives/action-bar"
|
|
411
390
|
tooltip="Copies the message content"
|
|
412
391
|
/>
|
|
413
392
|
<Component
|
|
414
393
|
name="ActionBarPrimitive.Edit"
|
|
415
|
-
docsLink="
|
|
394
|
+
docsLink="/docs/api-reference/primitives/action-bar"
|
|
416
395
|
tooltip="Edits the message"
|
|
417
396
|
/>
|
|
418
397
|
<Component
|
|
419
398
|
name="ActionBarPrimitive.Reload"
|
|
420
|
-
docsLink="
|
|
399
|
+
docsLink="/docs/api-reference/primitives/action-bar"
|
|
421
400
|
tooltip="Reloads the message"
|
|
422
401
|
/>
|
|
423
402
|
<Component
|
|
424
403
|
name="ActionBarPrimitive.Speak"
|
|
425
|
-
docsLink="
|
|
404
|
+
docsLink="/docs/api-reference/primitives/action-bar"
|
|
426
405
|
tooltip="Speaks the message content"
|
|
427
406
|
/>
|
|
428
407
|
<Component
|
|
429
408
|
name="ActionBarPrimitive.StopSpeaking"
|
|
430
|
-
docsLink="
|
|
409
|
+
docsLink="/docs/api-reference/primitives/action-bar"
|
|
431
410
|
tooltip="Stops speaking the message"
|
|
432
411
|
/>
|
|
433
412
|
<Component
|
|
434
413
|
name="ActionBarPrimitive.FeedbackPositive"
|
|
435
|
-
docsLink="
|
|
414
|
+
docsLink="/docs/api-reference/primitives/action-bar"
|
|
436
415
|
tooltip="Provides positive feedback"
|
|
437
416
|
/>
|
|
438
417
|
<Component
|
|
439
418
|
name="ActionBarPrimitive.FeedbackNegative"
|
|
440
|
-
docsLink="
|
|
419
|
+
docsLink="/docs/api-reference/primitives/action-bar"
|
|
441
420
|
tooltip="Provides negative feedback"
|
|
442
421
|
/>
|
|
443
422
|
</Component>
|
|
@@ -446,22 +425,22 @@ Manages the state and actions for individual messages
|
|
|
446
425
|
|
|
447
426
|
<Component
|
|
448
427
|
name="BranchPickerPrimitive.Root"
|
|
449
|
-
docsLink="
|
|
428
|
+
docsLink="/docs/api-reference/primitives/branch-picker"
|
|
450
429
|
tooltip="Root component for the branch picker"
|
|
451
430
|
>
|
|
452
431
|
<Component
|
|
453
432
|
name="BranchPickerPrimitive.Previous"
|
|
454
|
-
docsLink="
|
|
433
|
+
docsLink="/docs/api-reference/primitives/branch-picker"
|
|
455
434
|
tooltip="Navigates to the previous branch"
|
|
456
435
|
/>
|
|
457
436
|
<Component
|
|
458
437
|
name="BranchPickerPrimitive.Number"
|
|
459
|
-
docsLink="
|
|
438
|
+
docsLink="/docs/api-reference/primitives/branch-picker"
|
|
460
439
|
tooltip="Displays the current branch number"
|
|
461
440
|
/>
|
|
462
441
|
<Component
|
|
463
442
|
name="BranchPickerPrimitive.Next"
|
|
464
|
-
docsLink="
|
|
443
|
+
docsLink="/docs/api-reference/primitives/branch-picker"
|
|
465
444
|
tooltip="Navigates to the next branch"
|
|
466
445
|
/>
|
|
467
446
|
</Component>
|
|
@@ -483,7 +462,7 @@ Manages the state and actions for message parts within messages
|
|
|
483
462
|
|
|
484
463
|
<Component
|
|
485
464
|
name="MessagePartPrimitive.Text"
|
|
486
|
-
docsLink="
|
|
465
|
+
docsLink="/docs/api-reference/primitives/message-part"
|
|
487
466
|
tooltip="Represents a text part of the message content"
|
|
488
467
|
/>
|
|
489
468
|
|
|
@@ -491,7 +470,7 @@ Manages the state and actions for message parts within messages
|
|
|
491
470
|
|
|
492
471
|
<Component
|
|
493
472
|
name="MarkdownText"
|
|
494
|
-
docsLink="
|
|
473
|
+
docsLink="/docs/api-reference/primitives/message-part"
|
|
495
474
|
tooltip="Renders markdown text in the message"
|
|
496
475
|
/>
|
|
497
476
|
|
|
@@ -512,22 +491,22 @@ Manages the state and actions for attachments in messages and composer
|
|
|
512
491
|
|
|
513
492
|
<Component
|
|
514
493
|
name="AttachmentPrimitive.Root"
|
|
515
|
-
docsLink="
|
|
494
|
+
docsLink="/docs/api-reference/primitives/attachment"
|
|
516
495
|
tooltip="Root component for an attachment"
|
|
517
496
|
>
|
|
518
497
|
<Component
|
|
519
498
|
name="AttachmentPrimitive.Name"
|
|
520
|
-
docsLink="
|
|
499
|
+
docsLink="/docs/api-reference/primitives/attachment"
|
|
521
500
|
tooltip="Displays the name of the attachment"
|
|
522
501
|
/>
|
|
523
502
|
<Component
|
|
524
503
|
name="AttachmentPrimitive.Remove"
|
|
525
|
-
docsLink="
|
|
504
|
+
docsLink="/docs/api-reference/primitives/attachment"
|
|
526
505
|
tooltip="Removes the attachment"
|
|
527
506
|
/>
|
|
528
507
|
<Component
|
|
529
508
|
name="AttachmentPrimitive.unstable_Thumb"
|
|
530
|
-
docsLink="
|
|
509
|
+
docsLink="/docs/api-reference/primitives/attachment"
|
|
531
510
|
tooltip="Displays a thumbnail of the attachment"
|
|
532
511
|
/>
|
|
533
512
|
</Component>
|
|
@@ -549,33 +528,33 @@ Manages the state and actions for individual thread list items
|
|
|
549
528
|
|
|
550
529
|
<Component
|
|
551
530
|
name="ThreadListItemPrimitive.Root"
|
|
552
|
-
docsLink="
|
|
531
|
+
docsLink="/docs/api-reference/primitives/thread-list-item"
|
|
553
532
|
tooltip="Root component for a thread list item"
|
|
554
533
|
>
|
|
555
534
|
<Component
|
|
556
535
|
name="ThreadListItemPrimitive.Trigger"
|
|
557
|
-
docsLink="
|
|
536
|
+
docsLink="/docs/api-reference/primitives/thread-list-item"
|
|
558
537
|
tooltip="Trigger for thread list item actions"
|
|
559
538
|
>
|
|
560
539
|
<Component
|
|
561
540
|
name="ThreadListItemPrimitive.Title"
|
|
562
|
-
docsLink="
|
|
541
|
+
docsLink="/docs/api-reference/primitives/thread-list-item"
|
|
563
542
|
tooltip="Displays the title of the thread"
|
|
564
543
|
/>
|
|
565
544
|
</Component>
|
|
566
545
|
<Component
|
|
567
546
|
name="ThreadListItemPrimitive.Archive"
|
|
568
|
-
docsLink="
|
|
547
|
+
docsLink="/docs/api-reference/primitives/thread-list-item"
|
|
569
548
|
tooltip="Archives the thread"
|
|
570
549
|
/>
|
|
571
550
|
<Component
|
|
572
551
|
name="ThreadListItemPrimitive.Unarchive"
|
|
573
|
-
docsLink="
|
|
552
|
+
docsLink="/docs/api-reference/primitives/thread-list-item"
|
|
574
553
|
tooltip="Unarchives the thread"
|
|
575
554
|
/>
|
|
576
555
|
<Component
|
|
577
556
|
name="ThreadListItemPrimitive.Delete"
|
|
578
|
-
docsLink="
|
|
557
|
+
docsLink="/docs/api-reference/primitives/thread-list-item"
|
|
579
558
|
tooltip="Deletes the thread"
|
|
580
559
|
/>
|
|
581
560
|
</Component>
|
|
@@ -584,5 +563,5 @@ Manages the state and actions for individual thread list items
|
|
|
584
563
|
|
|
585
564
|
## Utilities
|
|
586
565
|
|
|
587
|
-
- [`useThreadViewportAutoScroll`](
|
|
588
|
-
- [`useInlineRender`](
|
|
566
|
+
- [`useThreadViewportAutoScroll`](/docs/api-reference/hooks/primitives)
|
|
567
|
+
- [`useInlineRender`](/docs/api-reference/model-context/context)
|