@assistant-ui/mcp-docs-server 0.1.1
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/local-ollama.md +1135 -0
- package/.docs/organized/code-examples/search-agent-for-e-commerce.md +1721 -0
- package/.docs/organized/code-examples/with-ai-sdk.md +1081 -0
- package/.docs/organized/code-examples/with-cloud.md +1164 -0
- package/.docs/organized/code-examples/with-external-store.md +1064 -0
- package/.docs/organized/code-examples/with-ffmpeg.md +1305 -0
- package/.docs/organized/code-examples/with-langgraph.md +1819 -0
- package/.docs/organized/code-examples/with-openai-assistants.md +1175 -0
- package/.docs/organized/code-examples/with-react-hook-form.md +1727 -0
- package/.docs/organized/code-examples/with-vercel-ai-rsc.md +1157 -0
- package/.docs/raw/blog/2024-07-29-hello/index.mdx +65 -0
- package/.docs/raw/blog/2024-09-11/index.mdx +10 -0
- package/.docs/raw/blog/2024-12-15/index.mdx +10 -0
- package/.docs/raw/blog/2025-01-31-changelog/index.mdx +129 -0
- package/.docs/raw/docs/about-assistantui.mdx +44 -0
- package/.docs/raw/docs/api-reference/context-providers/AssistantRuntimeProvider.mdx +30 -0
- package/.docs/raw/docs/api-reference/context-providers/TextContentPartProvider.mdx +26 -0
- package/.docs/raw/docs/api-reference/integrations/react-hook-form.mdx +103 -0
- package/.docs/raw/docs/api-reference/integrations/vercel-ai-sdk.mdx +145 -0
- package/.docs/raw/docs/api-reference/overview.mdx +583 -0
- package/.docs/raw/docs/api-reference/primitives/ActionBar.mdx +264 -0
- package/.docs/raw/docs/api-reference/primitives/AssistantModal.mdx +129 -0
- package/.docs/raw/docs/api-reference/primitives/Attachment.mdx +96 -0
- package/.docs/raw/docs/api-reference/primitives/BranchPicker.mdx +87 -0
- package/.docs/raw/docs/api-reference/primitives/Composer.mdx +204 -0
- package/.docs/raw/docs/api-reference/primitives/ContentPart.mdx +173 -0
- package/.docs/raw/docs/api-reference/primitives/Error.mdx +70 -0
- package/.docs/raw/docs/api-reference/primitives/Message.mdx +181 -0
- package/.docs/raw/docs/api-reference/primitives/Thread.mdx +197 -0
- package/.docs/raw/docs/api-reference/primitives/composition.mdx +21 -0
- package/.docs/raw/docs/api-reference/runtimes/AssistantRuntime.mdx +33 -0
- package/.docs/raw/docs/api-reference/runtimes/AttachmentRuntime.mdx +46 -0
- package/.docs/raw/docs/api-reference/runtimes/ComposerRuntime.mdx +69 -0
- package/.docs/raw/docs/api-reference/runtimes/ContentPartRuntime.mdx +22 -0
- package/.docs/raw/docs/api-reference/runtimes/MessageRuntime.mdx +49 -0
- package/.docs/raw/docs/api-reference/runtimes/ThreadListItemRuntime.mdx +32 -0
- package/.docs/raw/docs/api-reference/runtimes/ThreadListRuntime.mdx +31 -0
- package/.docs/raw/docs/api-reference/runtimes/ThreadRuntime.mdx +48 -0
- package/.docs/raw/docs/architecture.mdx +92 -0
- package/.docs/raw/docs/cloud/authorization.mdx +152 -0
- package/.docs/raw/docs/cloud/overview.mdx +55 -0
- package/.docs/raw/docs/cloud/persistence/ai-sdk.mdx +54 -0
- package/.docs/raw/docs/cloud/persistence/langgraph.mdx +123 -0
- package/.docs/raw/docs/concepts/architecture.mdx +19 -0
- package/.docs/raw/docs/concepts/runtime-layer.mdx +163 -0
- package/.docs/raw/docs/concepts/why.mdx +9 -0
- package/.docs/raw/docs/copilots/make-assistant-readable.mdx +71 -0
- package/.docs/raw/docs/copilots/make-assistant-tool-ui.mdx +76 -0
- package/.docs/raw/docs/copilots/make-assistant-tool.mdx +117 -0
- package/.docs/raw/docs/copilots/model-context.mdx +135 -0
- package/.docs/raw/docs/copilots/motivation.mdx +191 -0
- package/.docs/raw/docs/copilots/use-assistant-instructions.mdx +62 -0
- package/.docs/raw/docs/getting-started.mdx +1133 -0
- package/.docs/raw/docs/guides/Attachments.mdx +640 -0
- package/.docs/raw/docs/guides/Branching.mdx +59 -0
- package/.docs/raw/docs/guides/Editing.mdx +56 -0
- package/.docs/raw/docs/guides/Speech.mdx +43 -0
- package/.docs/raw/docs/guides/ToolUI.mdx +663 -0
- package/.docs/raw/docs/guides/Tools.mdx +496 -0
- package/.docs/raw/docs/index.mdx +7 -0
- package/.docs/raw/docs/legacy/styled/AssistantModal.mdx +85 -0
- package/.docs/raw/docs/legacy/styled/Decomposition.mdx +633 -0
- package/.docs/raw/docs/legacy/styled/Markdown.mdx +86 -0
- package/.docs/raw/docs/legacy/styled/Scrollbar.mdx +71 -0
- package/.docs/raw/docs/legacy/styled/Thread.mdx +84 -0
- package/.docs/raw/docs/legacy/styled/ThreadWidth.mdx +21 -0
- package/.docs/raw/docs/mcp-docs-server.mdx +324 -0
- package/.docs/raw/docs/migrations/deprecation-policy.mdx +41 -0
- package/.docs/raw/docs/migrations/v0-7.mdx +188 -0
- package/.docs/raw/docs/migrations/v0-8.mdx +160 -0
- package/.docs/raw/docs/migrations/v0-9.mdx +75 -0
- package/.docs/raw/docs/react-compatibility.mdx +208 -0
- package/.docs/raw/docs/runtimes/ai-sdk/rsc.mdx +226 -0
- package/.docs/raw/docs/runtimes/ai-sdk/use-assistant-hook.mdx +195 -0
- package/.docs/raw/docs/runtimes/ai-sdk/use-chat-hook.mdx +138 -0
- package/.docs/raw/docs/runtimes/ai-sdk/use-chat.mdx +136 -0
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +1624 -0
- package/.docs/raw/docs/runtimes/custom/local.mdx +1185 -0
- package/.docs/raw/docs/runtimes/helicone.mdx +60 -0
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +320 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +11 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +28 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +120 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +336 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +385 -0
- package/.docs/raw/docs/runtimes/langserve.mdx +126 -0
- package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +218 -0
- package/.docs/raw/docs/runtimes/mastra/overview.mdx +17 -0
- package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +196 -0
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +222 -0
- package/.docs/raw/docs/ui/AssistantModal.mdx +46 -0
- package/.docs/raw/docs/ui/AssistantSidebar.mdx +42 -0
- package/.docs/raw/docs/ui/Attachment.mdx +82 -0
- package/.docs/raw/docs/ui/Markdown.mdx +72 -0
- package/.docs/raw/docs/ui/Mermaid.mdx +79 -0
- package/.docs/raw/docs/ui/Scrollbar.mdx +59 -0
- package/.docs/raw/docs/ui/SyntaxHighlighting.mdx +253 -0
- package/.docs/raw/docs/ui/Thread.mdx +47 -0
- package/.docs/raw/docs/ui/ThreadList.mdx +49 -0
- package/.docs/raw/docs/ui/ToolFallback.mdx +64 -0
- package/.docs/raw/docs/ui/primitives/Thread.mdx +197 -0
- package/LICENSE +21 -0
- package/README.md +128 -0
- package/dist/chunk-C7O7EFKU.js +38 -0
- package/dist/chunk-CZCDQ3YH.js +420 -0
- package/dist/index.js +1 -0
- package/dist/prepare-docs/prepare.js +199 -0
- package/dist/stdio.js +8 -0
- package/package.json +43 -0
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Overview
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
import { Callout } from "fumadocs-ui/components/callout";
|
|
6
|
+
|
|
7
|
+
import { Component, ContextLevel, RuntimeHooks } from "./context";
|
|
8
|
+
|
|
9
|
+
export const contextColors = {
|
|
10
|
+
"Assistant Context": "#4a86e8",
|
|
11
|
+
"Thread Context": "#45a049",
|
|
12
|
+
"Composer Context": "#ff9933",
|
|
13
|
+
"Message Context": "#bb2244",
|
|
14
|
+
"ContentPart Context": "#268bd2",
|
|
15
|
+
"Attachment Context": "#FFB6C1",
|
|
16
|
+
"ThreadListItem Context": "#c678dd",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
<Callout title="Work in progress" type="warn">
|
|
20
|
+
This page is under construction. Most links will not work yet.
|
|
21
|
+
</Callout>
|
|
22
|
+
|
|
23
|
+
## Cloud
|
|
24
|
+
|
|
25
|
+
- [`AssistantCloud`](#assistant-cloud)
|
|
26
|
+
|
|
27
|
+
## Runtime API
|
|
28
|
+
|
|
29
|
+
### AI SDK
|
|
30
|
+
|
|
31
|
+
- [`useChatRuntime`](#use-chat-runtime)
|
|
32
|
+
- [`useVercelUseChatRuntime`](#use-vercel-use-chat-runtime) (legacy)
|
|
33
|
+
- [`useVercelUseAssistantRuntime`](#use-vercel-use-assistant-runtime)
|
|
34
|
+
- [`useVercelRSCRuntime`](#use-vercel-rsc-runtime)
|
|
35
|
+
- [`useDangerousInBrowserRuntime`](#use-dangerous-in-browser-runtime)
|
|
36
|
+
|
|
37
|
+
### LangGraph
|
|
38
|
+
|
|
39
|
+
- [`useLangGraphRuntime`](#use-lang-graph-runtime)
|
|
40
|
+
|
|
41
|
+
### Local Runtime
|
|
42
|
+
|
|
43
|
+
- [`useLocalRuntime`](#use-local-runtime)
|
|
44
|
+
|
|
45
|
+
### External Store Runtime
|
|
46
|
+
|
|
47
|
+
- [`useExternalStoreRuntime`](#use-external-store-runtime)
|
|
48
|
+
- [`createMessageConverter`](#create-message-converter)
|
|
49
|
+
|
|
50
|
+
### Thread List Runtime
|
|
51
|
+
|
|
52
|
+
- [`useRemoteThreadListRuntime`](#use-remote-thread-list-runtime)
|
|
53
|
+
- [`useCloudThreadListRuntime`](#use-cloud-thread-list-runtime)
|
|
54
|
+
|
|
55
|
+
## Runtime Adapters
|
|
56
|
+
|
|
57
|
+
### Attachment
|
|
58
|
+
|
|
59
|
+
- [`AttachmentAdapter`](#attachment-adapter)
|
|
60
|
+
- [`SimpleImageAttachmentAdapter`](#simple-image-attachment-adapter)
|
|
61
|
+
- [`SimpleTextAttachmentAdapter`](#simple-text-attachment-adapter)
|
|
62
|
+
- [`CompositeAttachmentAdapter`](#composite-attachment-adapter)
|
|
63
|
+
|
|
64
|
+
### Feedback
|
|
65
|
+
|
|
66
|
+
- [`FeedbackAdapter`](#feedback-adapter)
|
|
67
|
+
|
|
68
|
+
### Speech
|
|
69
|
+
|
|
70
|
+
- [`SpeechSynthesisAdapter`](#speech-synthesis-adapter)
|
|
71
|
+
- [`WebSpeechSynthesisAdapter`](#web-speech-synthesis-adapter)
|
|
72
|
+
|
|
73
|
+
## Highest Level Context Providers
|
|
74
|
+
|
|
75
|
+
<Component
|
|
76
|
+
name="AssistantRuntimeProvider"
|
|
77
|
+
isContextProvider={true}
|
|
78
|
+
providedContexts={[
|
|
79
|
+
{ name: "Assistant Context", color: contextColors["Assistant Context"] },
|
|
80
|
+
{ name: "Thread Context", color: contextColors["Thread Context"] },
|
|
81
|
+
{
|
|
82
|
+
name: "Thread Composer Context",
|
|
83
|
+
color: contextColors["Composer Context"],
|
|
84
|
+
link: "#composer-context",
|
|
85
|
+
},
|
|
86
|
+
]}
|
|
87
|
+
docsLink="./context-providers/AssistantRuntimeProvider"
|
|
88
|
+
tooltip="Provides the highest level context for the assistant-ui"
|
|
89
|
+
props="runtime={runtime}"
|
|
90
|
+
>
|
|
91
|
+
<Component name="Thread" isLink={true} />
|
|
92
|
+
<Component name="ThreadList" isLink={true} />
|
|
93
|
+
</Component>
|
|
94
|
+
|
|
95
|
+
<Component
|
|
96
|
+
name="TextContentPartProvider"
|
|
97
|
+
isContextProvider={true}
|
|
98
|
+
providedContexts={[
|
|
99
|
+
{
|
|
100
|
+
name: "Text ContentPart Context",
|
|
101
|
+
color: contextColors["ContentPart Context"],
|
|
102
|
+
link: "#contentpart-context",
|
|
103
|
+
},
|
|
104
|
+
]}
|
|
105
|
+
docsLink="./context-providers/TextContentPartProvider"
|
|
106
|
+
tooltip="Provides context for text content parts"
|
|
107
|
+
props="text={text}"
|
|
108
|
+
>
|
|
109
|
+
<Component name="ContentPart" isLink={true} />
|
|
110
|
+
</Component>
|
|
111
|
+
|
|
112
|
+
<ContextLevel color={contextColors["Assistant Context"]}>
|
|
113
|
+
|
|
114
|
+
## Assistant Context
|
|
115
|
+
|
|
116
|
+
The context available to components inside `<AssistantRuntimeProvider />`. You usually wrap your entire application in this context.
|
|
117
|
+
|
|
118
|
+
### AssistantRuntime
|
|
119
|
+
|
|
120
|
+
Programmatically access the assistant's state and actions.
|
|
121
|
+
|
|
122
|
+
- [`useAssistantRuntime`](#use-assistant-runtime)
|
|
123
|
+
|
|
124
|
+
### Instructions
|
|
125
|
+
|
|
126
|
+
Add system prompt instructions
|
|
127
|
+
|
|
128
|
+
- [`useAssistantInstructions`](#use-assistant-instructions)
|
|
129
|
+
|
|
130
|
+
### Tool UI
|
|
131
|
+
|
|
132
|
+
Register tool UIs
|
|
133
|
+
|
|
134
|
+
- [`makeAssistantTool`](#make-assistant-tool)
|
|
135
|
+
- [`makeAssistantToolUI`](#make-assistant-tool-ui)
|
|
136
|
+
- [`useAssistantTool`](#use-assistant-tool)
|
|
137
|
+
- [`useAssistantToolUI`](#use-assistant-tool-ui)
|
|
138
|
+
|
|
139
|
+
Programmatically access the list of registered tool UIs (Experimental)
|
|
140
|
+
|
|
141
|
+
- [`useToolUIs`](#use-tool-uis)
|
|
142
|
+
- [`useToolUIsStore`](#use-tool-uis-store)
|
|
143
|
+
|
|
144
|
+
### ThreadListPrimitive
|
|
145
|
+
|
|
146
|
+
Shows a list of threads and allows the user to switch between them.
|
|
147
|
+
|
|
148
|
+
<Component
|
|
149
|
+
name="ThreadListPrimitive.Root"
|
|
150
|
+
docsLink="#thread-list-primitive-root"
|
|
151
|
+
tooltip="Root component for the thread list"
|
|
152
|
+
>
|
|
153
|
+
<Component
|
|
154
|
+
name="ThreadListPrimitive.New"
|
|
155
|
+
docsLink="#thread-list-primitive-new"
|
|
156
|
+
tooltip="Component for creating a new thread"
|
|
157
|
+
/>
|
|
158
|
+
<Component
|
|
159
|
+
name="ThreadListPrimitive.Items"
|
|
160
|
+
isContextProvider={true}
|
|
161
|
+
providedContexts={[
|
|
162
|
+
{
|
|
163
|
+
name: "ThreadListItem Context",
|
|
164
|
+
color: contextColors["ThreadListItem Context"],
|
|
165
|
+
},
|
|
166
|
+
]}
|
|
167
|
+
docsLink="#thread-list-primitive-items"
|
|
168
|
+
tooltip="Container for thread list items, provides context for individual items"
|
|
169
|
+
props="components={...}"
|
|
170
|
+
/>
|
|
171
|
+
</Component>
|
|
172
|
+
|
|
173
|
+
</ContextLevel>
|
|
174
|
+
|
|
175
|
+
<ContextLevel color={contextColors["Thread Context"]}>
|
|
176
|
+
|
|
177
|
+
## Thread Context
|
|
178
|
+
|
|
179
|
+
The context for a single thread. Currently always corresponds to the runtime's main thread.
|
|
180
|
+
|
|
181
|
+
### ThreadRuntime
|
|
182
|
+
|
|
183
|
+
Programmatically access the thread's state and actions.
|
|
184
|
+
|
|
185
|
+
- [`useThread`](#use-thread)
|
|
186
|
+
- [`useThreadComposer`](#use-thread-composer)
|
|
187
|
+
- [`useThreadRuntime`](#use-thread-runtime)
|
|
188
|
+
|
|
189
|
+
### ModelContext
|
|
190
|
+
|
|
191
|
+
- [`useThreadModelContext`](#use-thread-model-context)
|
|
192
|
+
|
|
193
|
+
### ThreadViewportStore
|
|
194
|
+
|
|
195
|
+
- [`useThreadViewport`](#use-thread-viewport)
|
|
196
|
+
- [`useThreadViewportStore`](#use-thread-viewport-store)
|
|
197
|
+
|
|
198
|
+
### ThreadPrimitive
|
|
199
|
+
|
|
200
|
+
A conversation thread.
|
|
201
|
+
|
|
202
|
+
<Component
|
|
203
|
+
name="ThreadPrimitive.Root"
|
|
204
|
+
docsLink="#thread-primitive-root"
|
|
205
|
+
tooltip="Root component for a thread"
|
|
206
|
+
>
|
|
207
|
+
<Component
|
|
208
|
+
name="ThreadPrimitive.Viewport"
|
|
209
|
+
docsLink="#thread-primitive-viewport"
|
|
210
|
+
tooltip="Viewport for the thread content"
|
|
211
|
+
>
|
|
212
|
+
<Component
|
|
213
|
+
name="ThreadPrimitive.Messages"
|
|
214
|
+
isContextProvider={true}
|
|
215
|
+
providedContexts={[
|
|
216
|
+
{ name: "Message Context", color: contextColors["Message Context"] },
|
|
217
|
+
{
|
|
218
|
+
name: "Edit Composer Context",
|
|
219
|
+
color: contextColors["Composer Context"],
|
|
220
|
+
link: "#composer-context",
|
|
221
|
+
},
|
|
222
|
+
]}
|
|
223
|
+
docsLink="#thread-primitive-messages"
|
|
224
|
+
tooltip="Container for thread messages, provides context for messages and edit composer"
|
|
225
|
+
>
|
|
226
|
+
<Component name="Message" isLink={true} />
|
|
227
|
+
</Component>
|
|
228
|
+
<Component
|
|
229
|
+
name="ThreadPrimitive.ScrollToBottom"
|
|
230
|
+
docsLink="#thread-primitive-scroll-to-bottom"
|
|
231
|
+
tooltip="Scrolls to the bottom of the thread"
|
|
232
|
+
/>
|
|
233
|
+
<Component
|
|
234
|
+
name="ThreadPrimitive.Empty"
|
|
235
|
+
docsLink="#thread-primitive-empty"
|
|
236
|
+
tooltip="Displayed when the thread is empty"
|
|
237
|
+
/>
|
|
238
|
+
<Component
|
|
239
|
+
name="ThreadPrimitive.If"
|
|
240
|
+
docsLink="#thread-primitive-if"
|
|
241
|
+
tooltip="Conditional rendering within the thread"
|
|
242
|
+
/>
|
|
243
|
+
<Component
|
|
244
|
+
name="ThreadPrimitive.Suggestion"
|
|
245
|
+
docsLink="#thread-primitive-suggestion"
|
|
246
|
+
tooltip="Displays suggestions in the thread"
|
|
247
|
+
/>
|
|
248
|
+
<Component name="Composer" isLink={true} />
|
|
249
|
+
</Component>
|
|
250
|
+
</Component>
|
|
251
|
+
|
|
252
|
+
### AssistantModalPrimitive
|
|
253
|
+
|
|
254
|
+
A floating modal that usually appears in the lower right corner of the screen. Common for support use cases.
|
|
255
|
+
|
|
256
|
+
<Component
|
|
257
|
+
name="AssistantModalPrimitive.Root"
|
|
258
|
+
docsLink="#assistant-modal-primitive-root"
|
|
259
|
+
tooltip="Root component for the assistant modal"
|
|
260
|
+
>
|
|
261
|
+
<Component
|
|
262
|
+
name="AssistantModalPrimitive.Trigger"
|
|
263
|
+
docsLink="#assistant-modal-primitive-trigger"
|
|
264
|
+
tooltip="Trigger to open the assistant modal"
|
|
265
|
+
/>
|
|
266
|
+
<Component
|
|
267
|
+
name="AssistantModalPrimitive.Anchor"
|
|
268
|
+
docsLink="#assistant-modal-primitive-anchor"
|
|
269
|
+
tooltip="Anchor point for the assistant modal"
|
|
270
|
+
/>
|
|
271
|
+
<Component
|
|
272
|
+
name="AssistantModalPrimitive.Content"
|
|
273
|
+
docsLink="#assistant-modal-primitive-content"
|
|
274
|
+
tooltip="Content of the assistant modal"
|
|
275
|
+
/>
|
|
276
|
+
</Component>
|
|
277
|
+
|
|
278
|
+
</ContextLevel>
|
|
279
|
+
|
|
280
|
+
<ContextLevel color={contextColors["Composer Context"]}>
|
|
281
|
+
|
|
282
|
+
## Composer Context
|
|
283
|
+
|
|
284
|
+
Manages the state and actions for the message composer
|
|
285
|
+
|
|
286
|
+
### ComposerRuntime
|
|
287
|
+
|
|
288
|
+
- [`useComposer`](#use-composer)
|
|
289
|
+
- [`useComposerRuntime`](#use-composer-runtime)
|
|
290
|
+
|
|
291
|
+
### ComposerPrimitive
|
|
292
|
+
|
|
293
|
+
<Component
|
|
294
|
+
name="ComposerPrimitive.Root"
|
|
295
|
+
docsLink="#composer-primitive-root"
|
|
296
|
+
tooltip="Root component for the composer"
|
|
297
|
+
>
|
|
298
|
+
<Component
|
|
299
|
+
name="ComposerPrimitive.Input"
|
|
300
|
+
docsLink="#composer-primitive-input"
|
|
301
|
+
tooltip="Input field for composing messages"
|
|
302
|
+
/>
|
|
303
|
+
<Component
|
|
304
|
+
name="ComposerPrimitive.Send"
|
|
305
|
+
docsLink="#composer-primitive-send"
|
|
306
|
+
tooltip="Button to send the composed message"
|
|
307
|
+
/>
|
|
308
|
+
<Component
|
|
309
|
+
name="ComposerPrimitive.Cancel"
|
|
310
|
+
docsLink="#composer-primitive-cancel"
|
|
311
|
+
tooltip="Button to cancel composing"
|
|
312
|
+
/>
|
|
313
|
+
<Component
|
|
314
|
+
name="ComposerPrimitive.Attachments"
|
|
315
|
+
isContextProvider={true}
|
|
316
|
+
providedContexts={[
|
|
317
|
+
{
|
|
318
|
+
name: "Attachment Context",
|
|
319
|
+
color: contextColors["Attachment Context"],
|
|
320
|
+
},
|
|
321
|
+
]}
|
|
322
|
+
docsLink="#composer-primitive-attachments"
|
|
323
|
+
tooltip="Manages attachments in the composer"
|
|
324
|
+
/>
|
|
325
|
+
<Component
|
|
326
|
+
name="ComposerPrimitive.AddAttachment"
|
|
327
|
+
docsLink="#composer-primitive-add-attachment"
|
|
328
|
+
tooltip="Button to add an attachment"
|
|
329
|
+
/>
|
|
330
|
+
</Component>
|
|
331
|
+
|
|
332
|
+
</ContextLevel>
|
|
333
|
+
|
|
334
|
+
<ContextLevel color={contextColors["Message Context"]}>
|
|
335
|
+
|
|
336
|
+
## Message Context
|
|
337
|
+
|
|
338
|
+
Manages the state and actions for individual messages
|
|
339
|
+
|
|
340
|
+
### MessageRuntime
|
|
341
|
+
|
|
342
|
+
- [`useMessage`](#use-message)
|
|
343
|
+
- [`useEditComposer`](#use-edit-composer)
|
|
344
|
+
- [`useMessageRuntime`](#use-message-runtime)
|
|
345
|
+
|
|
346
|
+
### MessageUtilsStore
|
|
347
|
+
|
|
348
|
+
- [`useMessageUtils`](#use-message-utils)
|
|
349
|
+
- [`useMessageUtilsStore`](#use-message-utils-store)
|
|
350
|
+
|
|
351
|
+
### MessagePrimitive
|
|
352
|
+
|
|
353
|
+
<Component
|
|
354
|
+
name="MessagePrimitive.Root"
|
|
355
|
+
docsLink="#message-primitive-root"
|
|
356
|
+
tooltip="Root component for a message"
|
|
357
|
+
>
|
|
358
|
+
<Component
|
|
359
|
+
name="MessagePrimitive.Content"
|
|
360
|
+
isContextProvider={true}
|
|
361
|
+
providedContexts={[
|
|
362
|
+
{
|
|
363
|
+
name: "ContentPart Context",
|
|
364
|
+
color: contextColors["ContentPart Context"],
|
|
365
|
+
},
|
|
366
|
+
]}
|
|
367
|
+
docsLink="#message-primitive-content"
|
|
368
|
+
tooltip="Displays the content of the message"
|
|
369
|
+
/>
|
|
370
|
+
<Component
|
|
371
|
+
name="MessagePrimitive.Attachments"
|
|
372
|
+
isContextProvider={true}
|
|
373
|
+
providedContexts={[
|
|
374
|
+
{
|
|
375
|
+
name: "Attachment Context",
|
|
376
|
+
color: contextColors["Attachment Context"],
|
|
377
|
+
},
|
|
378
|
+
]}
|
|
379
|
+
docsLink="#message-primitive-attachments"
|
|
380
|
+
tooltip="Displays attachments in the message"
|
|
381
|
+
/>
|
|
382
|
+
<Component
|
|
383
|
+
name="MessagePrimitive.If"
|
|
384
|
+
docsLink="#message-primitive-if"
|
|
385
|
+
tooltip="Conditional rendering within the message"
|
|
386
|
+
/>
|
|
387
|
+
</Component>
|
|
388
|
+
|
|
389
|
+
### ActionBarPrimitive
|
|
390
|
+
|
|
391
|
+
<Component
|
|
392
|
+
name="ActionBarPrimitive.Root"
|
|
393
|
+
docsLink="#action-bar-primitive-root"
|
|
394
|
+
tooltip="Root component for the action bar"
|
|
395
|
+
>
|
|
396
|
+
<Component
|
|
397
|
+
name="ActionBarPrimitive.Copy"
|
|
398
|
+
docsLink="#action-bar-primitive-copy"
|
|
399
|
+
tooltip="Copies the message content"
|
|
400
|
+
/>
|
|
401
|
+
<Component
|
|
402
|
+
name="ActionBarPrimitive.Edit"
|
|
403
|
+
docsLink="#action-bar-primitive-edit"
|
|
404
|
+
tooltip="Edits the message"
|
|
405
|
+
/>
|
|
406
|
+
<Component
|
|
407
|
+
name="ActionBarPrimitive.Reload"
|
|
408
|
+
docsLink="#action-bar-primitive-reload"
|
|
409
|
+
tooltip="Reloads the message"
|
|
410
|
+
/>
|
|
411
|
+
<Component
|
|
412
|
+
name="ActionBarPrimitive.Speak"
|
|
413
|
+
docsLink="#action-bar-primitive-speak"
|
|
414
|
+
tooltip="Speaks the message content"
|
|
415
|
+
/>
|
|
416
|
+
<Component
|
|
417
|
+
name="ActionBarPrimitive.StopSpeaking"
|
|
418
|
+
docsLink="#action-bar-primitive-stop-speaking"
|
|
419
|
+
tooltip="Stops speaking the message"
|
|
420
|
+
/>
|
|
421
|
+
<Component
|
|
422
|
+
name="ActionBarPrimitive.FeedbackPositive"
|
|
423
|
+
docsLink="#action-bar-primitive-feedback-positive"
|
|
424
|
+
tooltip="Provides positive feedback"
|
|
425
|
+
/>
|
|
426
|
+
<Component
|
|
427
|
+
name="ActionBarPrimitive.FeedbackNegative"
|
|
428
|
+
docsLink="#action-bar-primitive-feedback-negative"
|
|
429
|
+
tooltip="Provides negative feedback"
|
|
430
|
+
/>
|
|
431
|
+
</Component>
|
|
432
|
+
|
|
433
|
+
### BranchPickerPrimitive
|
|
434
|
+
|
|
435
|
+
<Component
|
|
436
|
+
name="BranchPickerPrimitive.Root"
|
|
437
|
+
docsLink="#branch-picker-primitive-root"
|
|
438
|
+
tooltip="Root component for the branch picker"
|
|
439
|
+
>
|
|
440
|
+
<Component
|
|
441
|
+
name="BranchPickerPrimitive.Previous"
|
|
442
|
+
docsLink="#branch-picker-primitive-previous"
|
|
443
|
+
tooltip="Navigates to the previous branch"
|
|
444
|
+
/>
|
|
445
|
+
<Component
|
|
446
|
+
name="BranchPickerPrimitive.Number"
|
|
447
|
+
docsLink="#branch-picker-primitive-number"
|
|
448
|
+
tooltip="Displays the current branch number"
|
|
449
|
+
/>
|
|
450
|
+
<Component
|
|
451
|
+
name="BranchPickerPrimitive.Next"
|
|
452
|
+
docsLink="#branch-picker-primitive-next"
|
|
453
|
+
tooltip="Navigates to the next branch"
|
|
454
|
+
/>
|
|
455
|
+
</Component>
|
|
456
|
+
|
|
457
|
+
</ContextLevel>
|
|
458
|
+
|
|
459
|
+
<ContextLevel color={contextColors["ContentPart Context"]}>
|
|
460
|
+
|
|
461
|
+
## ContentPart Context
|
|
462
|
+
|
|
463
|
+
Manages the state and actions for content parts within messages
|
|
464
|
+
|
|
465
|
+
### ContentPartRuntime
|
|
466
|
+
|
|
467
|
+
- [`useContentPart`](#use-content-part)
|
|
468
|
+
- [`useContentPartText`](#use-content-part-text)
|
|
469
|
+
- [`useContentPartReasoning`](#use-content-part-reasoning)
|
|
470
|
+
- [`useContentPartRuntime`](#use-content-part-runtime)
|
|
471
|
+
|
|
472
|
+
### ContentPartPrimitive
|
|
473
|
+
|
|
474
|
+
<Component
|
|
475
|
+
name="ContentPartPrimitive.Text"
|
|
476
|
+
docsLink="#content-part-text"
|
|
477
|
+
tooltip="Represents a text part of the message content"
|
|
478
|
+
/>
|
|
479
|
+
|
|
480
|
+
### MarkdownText
|
|
481
|
+
|
|
482
|
+
<Component
|
|
483
|
+
name="MarkdownText"
|
|
484
|
+
docsLink="#markdown-text"
|
|
485
|
+
tooltip="Renders markdown text in the message"
|
|
486
|
+
/>
|
|
487
|
+
|
|
488
|
+
</ContextLevel>
|
|
489
|
+
|
|
490
|
+
<ContextLevel color={contextColors["Attachment Context"]}>
|
|
491
|
+
|
|
492
|
+
## Attachment Context
|
|
493
|
+
|
|
494
|
+
Manages the state and actions for attachments in messages and composer
|
|
495
|
+
|
|
496
|
+
### AttachmentRuntime
|
|
497
|
+
|
|
498
|
+
- [`useAttachment`](#use-attachment)
|
|
499
|
+
- [`useAttachmentRuntime`](#use-attachment-runtime)
|
|
500
|
+
|
|
501
|
+
### AttachmentPrimitive
|
|
502
|
+
|
|
503
|
+
<Component
|
|
504
|
+
name="AttachmentPrimitive.Root"
|
|
505
|
+
docsLink="#attachment-primitive-root"
|
|
506
|
+
tooltip="Root component for an attachment"
|
|
507
|
+
>
|
|
508
|
+
<Component
|
|
509
|
+
name="AttachmentPrimitive.Name"
|
|
510
|
+
docsLink="#attachment-primitive-name"
|
|
511
|
+
tooltip="Displays the name of the attachment"
|
|
512
|
+
/>
|
|
513
|
+
<Component
|
|
514
|
+
name="AttachmentPrimitive.Delete"
|
|
515
|
+
docsLink="#attachment-primitive-delete"
|
|
516
|
+
tooltip="Deletes the attachment"
|
|
517
|
+
/>
|
|
518
|
+
<Component
|
|
519
|
+
name="AttachmentPrimitive.Thumb"
|
|
520
|
+
docsLink="#attachment-primitive-thumb"
|
|
521
|
+
tooltip="Displays a thumbnail of the attachment"
|
|
522
|
+
/>
|
|
523
|
+
</Component>
|
|
524
|
+
|
|
525
|
+
</ContextLevel>
|
|
526
|
+
|
|
527
|
+
<ContextLevel color={contextColors["ThreadListItem Context"]}>
|
|
528
|
+
|
|
529
|
+
## ThreadListItem Context
|
|
530
|
+
|
|
531
|
+
Manages the state and actions for individual thread list items
|
|
532
|
+
|
|
533
|
+
### ThreadListItemRuntime
|
|
534
|
+
|
|
535
|
+
- [`useThreadListItem`](#use-thread-list-item)
|
|
536
|
+
- [`useThreadListItemRuntime`](#use-thread-list-item-runtime)
|
|
537
|
+
|
|
538
|
+
### ThreadListItem
|
|
539
|
+
|
|
540
|
+
<Component
|
|
541
|
+
name="ThreadListItemPrimitive.Root"
|
|
542
|
+
docsLink="#thread-list-item-primitive-root"
|
|
543
|
+
tooltip="Root component for a thread list item"
|
|
544
|
+
>
|
|
545
|
+
<Component
|
|
546
|
+
name="ThreadListItemPrimitive.Trigger"
|
|
547
|
+
docsLink="#thread-list-item-primitive-trigger"
|
|
548
|
+
tooltip="Trigger for thread list item actions"
|
|
549
|
+
>
|
|
550
|
+
<Component
|
|
551
|
+
name="ThreadListItemPrimitive.Name"
|
|
552
|
+
docsLink="#thread-list-item-primitive-name"
|
|
553
|
+
tooltip="Displays the name of the thread"
|
|
554
|
+
/>
|
|
555
|
+
</Component>
|
|
556
|
+
<Component
|
|
557
|
+
name="ThreadListItemPrimitive.Archive"
|
|
558
|
+
docsLink="#thread-list-item-primitive-archive"
|
|
559
|
+
tooltip="Archives the thread"
|
|
560
|
+
/>
|
|
561
|
+
<Component
|
|
562
|
+
name="ThreadListItemPrimitive.Unarchive"
|
|
563
|
+
docsLink="#thread-list-item-primitive-unarchive"
|
|
564
|
+
tooltip="Unarchives the thread"
|
|
565
|
+
/>
|
|
566
|
+
<Component
|
|
567
|
+
name="ThreadListItemPrimitive.Delete"
|
|
568
|
+
docsLink="#thread-list-item-primitive-delete"
|
|
569
|
+
tooltip="Deletes the thread"
|
|
570
|
+
/>
|
|
571
|
+
<Component
|
|
572
|
+
name="ThreadListItemPrimitive.Rename"
|
|
573
|
+
docsLink="#thread-list-item-primitive-rename"
|
|
574
|
+
tooltip="Renames the thread"
|
|
575
|
+
/>
|
|
576
|
+
</Component>
|
|
577
|
+
|
|
578
|
+
</ContextLevel>
|
|
579
|
+
|
|
580
|
+
## Utilities
|
|
581
|
+
|
|
582
|
+
- [`useThreadViewportAutoscroll`](#use-thread-viewport-autoscroll)
|
|
583
|
+
- [`useInlineRender`](#use-inline-render)
|