@assistant-ui/mcp-docs-server 0.1.19 → 0.1.21
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/with-ag-ui.md +172 -1633
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +42 -1640
- package/.docs/organized/code-examples/with-assistant-transport.md +40 -1743
- package/.docs/organized/code-examples/with-cloud.md +71 -1745
- package/.docs/organized/code-examples/with-custom-thread-list.md +87 -1723
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +70 -1637
- package/.docs/organized/code-examples/with-external-store.md +67 -1624
- package/.docs/organized/code-examples/with-ffmpeg.md +71 -1629
- package/.docs/organized/code-examples/with-langgraph.md +95 -1893
- package/.docs/organized/code-examples/with-parent-id-grouping.md +57 -1654
- package/.docs/organized/code-examples/with-react-hook-form.md +220 -2163
- package/.docs/organized/code-examples/with-react-router.md +66 -1318
- package/.docs/organized/code-examples/with-store.md +31 -31
- package/.docs/organized/code-examples/with-tanstack.md +77 -861
- package/.docs/organized/code-examples/with-tap-runtime.md +812 -0
- package/.docs/raw/docs/(docs)/cli.mdx +66 -0
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +0 -1
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +0 -1
- package/.docs/raw/docs/(docs)/copilots/model-context.mdx +4 -4
- package/.docs/raw/docs/(docs)/copilots/motivation.mdx +3 -3
- package/.docs/raw/docs/(docs)/devtools.mdx +0 -1
- package/.docs/raw/docs/(docs)/guides/attachments.mdx +2 -3
- package/.docs/raw/docs/(docs)/guides/context-api.mdx +117 -117
- package/.docs/raw/docs/(docs)/guides/suggestions.mdx +296 -0
- package/.docs/raw/docs/(docs)/guides/tools.mdx +336 -513
- package/.docs/raw/docs/(docs)/index.mdx +33 -410
- package/.docs/raw/docs/(docs)/installation.mdx +450 -0
- package/.docs/raw/docs/(docs)/llm.mdx +209 -0
- package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/context-providers/text-message-part-provider.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +48 -3
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-hook-form.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/integrations/vercel-ai-sdk.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +9 -3
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +20 -52
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +16 -39
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +49 -50
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +3 -11
- package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +0 -3
- package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +5 -16
- package/.docs/raw/docs/(reference)/api-reference/primitives/composition.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +1 -2
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +152 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +1 -2
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +1 -2
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +28 -40
- package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +1 -2
- package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +2 -3
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +1 -2
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +1 -2
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +0 -1
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +1 -2
- package/.docs/raw/docs/(reference)/legacy/styled/assistant-modal.mdx +0 -1
- package/.docs/raw/docs/(reference)/legacy/styled/decomposition.mdx +5 -5
- package/.docs/raw/docs/(reference)/legacy/styled/markdown.mdx +0 -1
- package/.docs/raw/docs/(reference)/legacy/styled/thread.mdx +0 -1
- package/.docs/raw/docs/(reference)/migrations/v0-12.mdx +207 -33
- package/.docs/raw/docs/(reference)/react-compatibility.mdx +0 -1
- package/.docs/raw/docs/cloud/persistence/ai-sdk.mdx +0 -1
- package/.docs/raw/docs/cloud/persistence/langgraph.mdx +0 -1
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +0 -1
- package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +118 -0
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +198 -0
- package/.docs/raw/docs/runtimes/assistant-transport.mdx +3 -3
- package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +5 -6
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +9 -11
- package/.docs/raw/docs/runtimes/custom/local.mdx +43 -36
- package/.docs/raw/docs/runtimes/data-stream.mdx +35 -3
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +1 -2
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +0 -1
- package/.docs/raw/docs/runtimes/langserve.mdx +0 -1
- package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +0 -1
- package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +0 -1
- package/.docs/raw/docs/ui/accordion.mdx +259 -0
- package/.docs/raw/docs/ui/assistant-modal.mdx +1 -3
- package/.docs/raw/docs/ui/assistant-sidebar.mdx +1 -3
- package/.docs/raw/docs/ui/attachment.mdx +0 -2
- package/.docs/raw/docs/ui/badge.mdx +138 -0
- package/.docs/raw/docs/ui/diff-viewer.mdx +279 -0
- package/.docs/raw/docs/ui/file.mdx +152 -0
- package/.docs/raw/docs/ui/image.mdx +100 -0
- package/.docs/raw/docs/ui/markdown.mdx +0 -1
- package/.docs/raw/docs/ui/mermaid.mdx +0 -1
- package/.docs/raw/docs/ui/model-selector.mdx +224 -0
- package/.docs/raw/docs/ui/part-grouping.mdx +4 -5
- package/.docs/raw/docs/ui/reasoning.mdx +6 -5
- package/.docs/raw/docs/ui/scrollbar.mdx +26 -9
- package/.docs/raw/docs/ui/select.mdx +245 -0
- package/.docs/raw/docs/ui/sources.mdx +6 -5
- package/.docs/raw/docs/ui/streamdown.mdx +348 -0
- package/.docs/raw/docs/ui/syntax-highlighting.mdx +8 -63
- package/.docs/raw/docs/ui/tabs.mdx +259 -0
- package/.docs/raw/docs/ui/thread-list.mdx +98 -16
- package/.docs/raw/docs/ui/thread.mdx +57 -73
- package/.docs/raw/docs/ui/tool-fallback.mdx +0 -1
- package/.docs/raw/docs/ui/tool-group.mdx +1 -3
- package/README.md +3 -3
- package/package.json +4 -4
- package/src/tools/tests/examples.test.ts +1 -1
- package/.docs/raw/docs/(docs)/about-assistantui.mdx +0 -54
- package/.docs/raw/docs/(docs)/mcp-docs-server.mdx +0 -321
- package/.docs/raw/docs/runtimes/ai-sdk/use-chat.mdx +0 -219
|
@@ -3,14 +3,12 @@ title: ThreadList
|
|
|
3
3
|
description: Switch between conversations. Supports sidebar or dropdown layouts.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { ParametersTable } from "@/components/docs/tables/ParametersTable";
|
|
7
|
-
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
|
|
8
6
|
import { ThreadListSample } from "@/components/docs/samples/threadlist";
|
|
9
7
|
|
|
10
8
|
<ThreadListSample />
|
|
11
9
|
|
|
12
10
|
<Callout>
|
|
13
|
-
This demo uses
|
|
11
|
+
This demo uses `ThreadListSidebar`, which includes `thread-list` as a dependency and provides a complete sidebar layout. For custom implementations, you can use `thread-list` directly.
|
|
14
12
|
</Callout>
|
|
15
13
|
|
|
16
14
|
## Getting Started
|
|
@@ -40,10 +38,10 @@ Use `threadlist-sidebar` for a complete sidebar layout or `thread-list` for cust
|
|
|
40
38
|
```tsx title="/app/assistant.tsx"
|
|
41
39
|
import { Thread } from "@/components/assistant-ui/thread";
|
|
42
40
|
import { ThreadListSidebar } from "@/components/assistant-ui/threadlist-sidebar";
|
|
43
|
-
import {
|
|
44
|
-
SidebarProvider,
|
|
41
|
+
import {
|
|
42
|
+
SidebarProvider,
|
|
45
43
|
SidebarInset,
|
|
46
|
-
SidebarTrigger
|
|
44
|
+
SidebarTrigger
|
|
47
45
|
} from "@/components/ui/sidebar";
|
|
48
46
|
|
|
49
47
|
export default function Assistant() {
|
|
@@ -84,7 +82,7 @@ Use `threadlist-sidebar` for a complete sidebar layout or `thread-list` for cust
|
|
|
84
82
|
|
|
85
83
|
## Anatomy
|
|
86
84
|
|
|
87
|
-
The ThreadList component is built with the following primitives:
|
|
85
|
+
The `ThreadList` component is built with the following primitives:
|
|
88
86
|
|
|
89
87
|
```tsx
|
|
90
88
|
import { ThreadListPrimitive, ThreadListItemPrimitive } from "@assistant-ui/react";
|
|
@@ -242,6 +240,18 @@ A button to archive the thread.
|
|
|
242
240
|
|
|
243
241
|
A button to restore an archived thread.
|
|
244
242
|
|
|
243
|
+
<ParametersTable
|
|
244
|
+
type="ThreadListItemPrimitiveUnarchiveProps"
|
|
245
|
+
parameters={[
|
|
246
|
+
{
|
|
247
|
+
name: "asChild",
|
|
248
|
+
type: "boolean",
|
|
249
|
+
default: "false",
|
|
250
|
+
description: "Merge props with child element instead of rendering a wrapper button.",
|
|
251
|
+
},
|
|
252
|
+
]}
|
|
253
|
+
/>
|
|
254
|
+
|
|
245
255
|
### ThreadListItemPrimitive.Delete
|
|
246
256
|
|
|
247
257
|
A button to permanently delete the thread.
|
|
@@ -258,18 +268,90 @@ A button to permanently delete the thread.
|
|
|
258
268
|
]}
|
|
259
269
|
/>
|
|
260
270
|
|
|
261
|
-
###
|
|
271
|
+
### ThreadListItemMorePrimitive
|
|
262
272
|
|
|
263
|
-
A dropdown menu for additional thread actions, built on Radix UI DropdownMenu
|
|
273
|
+
A dropdown menu for additional thread actions, built on Radix UI DropdownMenu.
|
|
264
274
|
|
|
265
|
-
|
|
266
|
-
- `ThreadListItemMorePrimitive.Trigger` - Button to open the menu
|
|
267
|
-
- `ThreadListItemMorePrimitive.Content` - Menu content container
|
|
268
|
-
- `ThreadListItemMorePrimitive.Item` - Individual menu item
|
|
269
|
-
- `ThreadListItemMorePrimitive.Separator` - Visual separator between items
|
|
275
|
+
#### ThreadListItemMorePrimitive.Root
|
|
270
276
|
|
|
271
|
-
|
|
277
|
+
Menu container that manages dropdown state.
|
|
272
278
|
|
|
273
|
-
|
|
279
|
+
<ParametersTable
|
|
280
|
+
type="ThreadListItemMorePrimitiveRootProps"
|
|
281
|
+
parameters={[
|
|
282
|
+
{
|
|
283
|
+
name: "asChild",
|
|
284
|
+
type: "boolean",
|
|
285
|
+
default: "false",
|
|
286
|
+
description: "Merge props with child element instead of rendering a wrapper div.",
|
|
287
|
+
},
|
|
288
|
+
]}
|
|
289
|
+
/>
|
|
274
290
|
|
|
291
|
+
#### ThreadListItemMorePrimitive.Trigger
|
|
275
292
|
|
|
293
|
+
Button to open the menu.
|
|
294
|
+
|
|
295
|
+
<ParametersTable
|
|
296
|
+
type="ThreadListItemMorePrimitiveTriggerProps"
|
|
297
|
+
parameters={[
|
|
298
|
+
{
|
|
299
|
+
name: "asChild",
|
|
300
|
+
type: "boolean",
|
|
301
|
+
default: "false",
|
|
302
|
+
description: "Merge props with child element instead of rendering a wrapper button.",
|
|
303
|
+
},
|
|
304
|
+
]}
|
|
305
|
+
/>
|
|
306
|
+
|
|
307
|
+
#### ThreadListItemMorePrimitive.Content
|
|
308
|
+
|
|
309
|
+
Menu content container.
|
|
310
|
+
|
|
311
|
+
<ParametersTable
|
|
312
|
+
type="ThreadListItemMorePrimitiveContentProps"
|
|
313
|
+
parameters={[
|
|
314
|
+
{
|
|
315
|
+
name: "asChild",
|
|
316
|
+
type: "boolean",
|
|
317
|
+
default: "false",
|
|
318
|
+
description: "Merge props with child element instead of rendering a wrapper div.",
|
|
319
|
+
},
|
|
320
|
+
]}
|
|
321
|
+
/>
|
|
322
|
+
|
|
323
|
+
#### ThreadListItemMorePrimitive.Item
|
|
324
|
+
|
|
325
|
+
Individual menu item.
|
|
326
|
+
|
|
327
|
+
<ParametersTable
|
|
328
|
+
type="ThreadListItemMorePrimitiveItemProps"
|
|
329
|
+
parameters={[
|
|
330
|
+
{
|
|
331
|
+
name: "asChild",
|
|
332
|
+
type: "boolean",
|
|
333
|
+
default: "false",
|
|
334
|
+
description: "Merge props with child element instead of rendering a wrapper div.",
|
|
335
|
+
},
|
|
336
|
+
]}
|
|
337
|
+
/>
|
|
338
|
+
|
|
339
|
+
#### ThreadListItemMorePrimitive.Separator
|
|
340
|
+
|
|
341
|
+
Visual separator between items.
|
|
342
|
+
|
|
343
|
+
<ParametersTable
|
|
344
|
+
type="ThreadListItemMorePrimitiveSeparatorProps"
|
|
345
|
+
parameters={[
|
|
346
|
+
{
|
|
347
|
+
name: "asChild",
|
|
348
|
+
type: "boolean",
|
|
349
|
+
default: "false",
|
|
350
|
+
description: "Merge props with child element instead of rendering a wrapper div.",
|
|
351
|
+
},
|
|
352
|
+
]}
|
|
353
|
+
/>
|
|
354
|
+
|
|
355
|
+
## Related Components
|
|
356
|
+
|
|
357
|
+
- [Thread](/docs/ui/thread) - The main chat interface displayed alongside the list
|
|
@@ -3,8 +3,6 @@ title: Thread
|
|
|
3
3
|
description: The main chat container with messages, composer, and auto-scroll.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { ParametersTable } from "@/components/docs/tables/ParametersTable";
|
|
7
|
-
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
|
|
8
6
|
import { ThreadSample } from "@/components/docs/samples/thread";
|
|
9
7
|
|
|
10
8
|
A complete chat interface that combines message rendering, auto-scrolling, composer input,
|
|
@@ -15,10 +13,10 @@ attachments, and conditional UI states. Fully customizable and composable.
|
|
|
15
13
|
|
|
16
14
|
## Anatomy
|
|
17
15
|
|
|
18
|
-
The Thread component is built with the following primitives:
|
|
16
|
+
The `Thread` component is built with the following primitives:
|
|
19
17
|
|
|
20
18
|
```tsx
|
|
21
|
-
import { ThreadPrimitive,
|
|
19
|
+
import { ThreadPrimitive, AuiIf } from "@assistant-ui/react";
|
|
22
20
|
|
|
23
21
|
<ThreadPrimitive.Root>
|
|
24
22
|
<ThreadPrimitive.Viewport>
|
|
@@ -32,8 +30,8 @@ import { ThreadPrimitive, AssistantIf } from "@assistant-ui/react";
|
|
|
32
30
|
/>
|
|
33
31
|
<ThreadPrimitive.ScrollToBottom />
|
|
34
32
|
</ThreadPrimitive.Viewport>
|
|
35
|
-
<ThreadPrimitive.
|
|
36
|
-
<
|
|
33
|
+
<ThreadPrimitive.Suggestions />
|
|
34
|
+
<AuiIf condition={...} />
|
|
37
35
|
</ThreadPrimitive.Root>
|
|
38
36
|
```
|
|
39
37
|
|
|
@@ -73,42 +71,62 @@ export default function Chat() {
|
|
|
73
71
|
### Welcome Screen
|
|
74
72
|
|
|
75
73
|
```tsx
|
|
76
|
-
<
|
|
74
|
+
<AuiIf condition={({ thread }) => thread.isEmpty}>
|
|
77
75
|
<ThreadWelcome />
|
|
78
|
-
</
|
|
76
|
+
</AuiIf>
|
|
79
77
|
```
|
|
80
78
|
|
|
81
79
|
### Viewport Spacer
|
|
82
80
|
|
|
83
81
|
```tsx
|
|
84
|
-
<
|
|
82
|
+
<AuiIf condition={({ thread }) => !thread.isEmpty}>
|
|
85
83
|
<div className="min-h-8 grow" />
|
|
86
|
-
</
|
|
84
|
+
</AuiIf>
|
|
87
85
|
```
|
|
88
86
|
|
|
89
87
|
### Conditional Send/Cancel Button
|
|
90
88
|
|
|
91
89
|
```tsx
|
|
92
|
-
<
|
|
90
|
+
<AuiIf condition={({ thread }) => !thread.isRunning}>
|
|
93
91
|
<ComposerPrimitive.Send>
|
|
94
92
|
Send
|
|
95
93
|
</ComposerPrimitive.Send>
|
|
96
|
-
</
|
|
94
|
+
</AuiIf>
|
|
97
95
|
|
|
98
|
-
<
|
|
96
|
+
<AuiIf condition={({ thread }) => thread.isRunning}>
|
|
99
97
|
<ComposerPrimitive.Cancel>
|
|
100
98
|
Cancel
|
|
101
99
|
</ComposerPrimitive.Cancel>
|
|
102
|
-
</
|
|
100
|
+
</AuiIf>
|
|
103
101
|
```
|
|
104
102
|
|
|
105
103
|
### Suggestions
|
|
106
104
|
|
|
105
|
+
Display suggested prompts using the Suggestions API. See the [Suggestions guide](/docs/guides/suggestions) for detailed configuration.
|
|
106
|
+
|
|
107
107
|
```tsx
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
import { SuggestionPrimitive, ThreadPrimitive } from "@assistant-ui/react";
|
|
109
|
+
|
|
110
|
+
// Configure suggestions in your runtime provider
|
|
111
|
+
const aui = useAui({
|
|
112
|
+
suggestions: Suggestions(["What's the weather?", "Tell me a joke"]),
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// Display suggestions in your thread component
|
|
116
|
+
<ThreadPrimitive.Suggestions
|
|
117
|
+
components={{
|
|
118
|
+
Suggestion: SuggestionItem,
|
|
119
|
+
}}
|
|
111
120
|
/>
|
|
121
|
+
|
|
122
|
+
// Custom suggestion item
|
|
123
|
+
const SuggestionItem = () => (
|
|
124
|
+
<SuggestionPrimitive.Trigger send asChild>
|
|
125
|
+
<button>
|
|
126
|
+
<SuggestionPrimitive.Title />
|
|
127
|
+
</button>
|
|
128
|
+
</SuggestionPrimitive.Trigger>
|
|
129
|
+
);
|
|
112
130
|
```
|
|
113
131
|
|
|
114
132
|
## API Reference
|
|
@@ -297,89 +315,55 @@ A button to scroll the viewport to the bottom. Disabled when the viewport is alr
|
|
|
297
315
|
|
|
298
316
|
This primitive renders a `<button>` element unless `asChild` is set.
|
|
299
317
|
|
|
300
|
-
###
|
|
318
|
+
### Suggestions
|
|
301
319
|
|
|
302
|
-
|
|
320
|
+
Renders all configured suggestions. Configure suggestions using the `Suggestions()` API in your runtime provider.
|
|
303
321
|
|
|
304
322
|
```tsx
|
|
305
|
-
<ThreadPrimitive.
|
|
306
|
-
|
|
307
|
-
|
|
323
|
+
<ThreadPrimitive.Suggestions
|
|
324
|
+
components={{
|
|
325
|
+
Suggestion: CustomSuggestionComponent,
|
|
326
|
+
}}
|
|
308
327
|
/>
|
|
309
328
|
```
|
|
310
329
|
|
|
311
330
|
<ParametersTable
|
|
312
|
-
type="
|
|
331
|
+
type="ThreadPrimitiveSuggestionsProps"
|
|
313
332
|
parameters={[
|
|
314
333
|
{
|
|
315
|
-
name: "
|
|
316
|
-
type: "
|
|
317
|
-
|
|
318
|
-
description: "The suggestion text to use when clicked.",
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
name: "send",
|
|
322
|
-
type: "boolean",
|
|
323
|
-
description:
|
|
324
|
-
"When true, automatically sends the message. When false, replaces or appends the composer text with the suggestion - depending on the value of `clearComposer`",
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
name: "clearComposer",
|
|
328
|
-
type: "boolean",
|
|
329
|
-
default: "true",
|
|
330
|
-
description:
|
|
331
|
-
"Whether to clear the composer after sending. When send is set to false, determines if composer text is replaced with suggestion (true, default), or if the suggestion's prompt is appended to the composer text (false).",
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
name: "autoSend",
|
|
335
|
-
type: "boolean",
|
|
336
|
-
deprecated: true,
|
|
337
|
-
description: "Deprecated. Use 'send' instead.",
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
name: "method",
|
|
341
|
-
type: "'replace'",
|
|
342
|
-
deprecated: true,
|
|
343
|
-
description: "Deprecated. This parameter is no longer used.",
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
name: "asChild",
|
|
347
|
-
type: "boolean",
|
|
348
|
-
default: "false",
|
|
349
|
-
description: "Merge props with child element instead of rendering a wrapper button.",
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
name: "className",
|
|
353
|
-
type: "string",
|
|
354
|
-
description: "CSS class name.",
|
|
334
|
+
name: "components",
|
|
335
|
+
type: "{ Suggestion: ComponentType }",
|
|
336
|
+
description: "Custom component to render each suggestion.",
|
|
355
337
|
},
|
|
356
338
|
]}
|
|
357
339
|
/>
|
|
358
340
|
|
|
359
|
-
|
|
341
|
+
<Callout type="info">
|
|
342
|
+
See the [Suggestions guide](/docs/guides/suggestions) for detailed information on configuring and customizing suggestions.
|
|
343
|
+
</Callout>
|
|
360
344
|
|
|
361
|
-
###
|
|
345
|
+
### AuiIf
|
|
362
346
|
|
|
363
347
|
Conditionally renders children based on assistant state. This is a generic component that can access thread, message, composer, and other state.
|
|
364
348
|
|
|
365
349
|
```tsx
|
|
366
|
-
import {
|
|
350
|
+
import { AuiIf } from "@assistant-ui/react";
|
|
367
351
|
|
|
368
|
-
<
|
|
352
|
+
<AuiIf condition={({ thread }) => thread.isEmpty}>
|
|
369
353
|
<WelcomeScreen />
|
|
370
|
-
</
|
|
354
|
+
</AuiIf>
|
|
371
355
|
|
|
372
|
-
<
|
|
356
|
+
<AuiIf condition={({ thread }) => thread.isRunning}>
|
|
373
357
|
<LoadingIndicator />
|
|
374
|
-
</
|
|
358
|
+
</AuiIf>
|
|
375
359
|
|
|
376
|
-
<
|
|
360
|
+
<AuiIf condition={({ message }) => message.role === "assistant"}>
|
|
377
361
|
<AssistantAvatar />
|
|
378
|
-
</
|
|
362
|
+
</AuiIf>
|
|
379
363
|
```
|
|
380
364
|
|
|
381
365
|
<ParametersTable
|
|
382
|
-
type="
|
|
366
|
+
type="AuiIfProps"
|
|
383
367
|
parameters={[
|
|
384
368
|
{
|
|
385
369
|
name: "condition",
|
|
@@ -3,8 +3,6 @@ title: ToolGroup
|
|
|
3
3
|
description: Wrapper for consecutive tool calls with collapsible and styled options.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
|
|
7
|
-
import { ParametersTable } from "@/components/docs/tables/ParametersTable";
|
|
8
6
|
import {
|
|
9
7
|
ToolGroupSample,
|
|
10
8
|
ToolGroupStreamingSample,
|
|
@@ -70,7 +68,7 @@ Use the `variant` prop on `ToolGroup.Root` to change the visual style:
|
|
|
70
68
|
|
|
71
69
|
### Streaming Demo (Custom UI + Fallback)
|
|
72
70
|
|
|
73
|
-
Interactive demo showing tool group with **custom tool UIs** and
|
|
71
|
+
Interactive demo showing tool group with **custom tool UIs** and `ToolFallback` working together. Watch as weather cards stream in with loading states, followed by a search tool using the fallback UI.
|
|
74
72
|
|
|
75
73
|
<ToolGroupStreamingSample />
|
|
76
74
|
|
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A Model Context Protocol (MCP) server that provides AI assistants with direct access to assistant-ui's documentation and examples.
|
|
4
4
|
|
|
5
|
-
> **📖 Full Documentation**
|
|
6
|
-
> For detailed installation instructions, troubleshooting, and advanced usage, visit the [complete documentation](https://www.assistant-ui.com/docs/mcp
|
|
5
|
+
> **📖 Full Documentation**
|
|
6
|
+
> For detailed installation instructions, troubleshooting, and advanced usage, visit the [complete documentation](https://www.assistant-ui.com/docs/llm#mcp).
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
@@ -67,7 +67,7 @@ Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
|
67
67
|
|
|
68
68
|
### VSCode
|
|
69
69
|
|
|
70
|
-
Add to
|
|
70
|
+
Add to `.vscode/mcp.json` in your project:
|
|
71
71
|
|
|
72
72
|
```json
|
|
73
73
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/mcp-docs-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "MCP server for assistant-ui documentation and examples",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
37
37
|
"gray-matter": "^4.0.3",
|
|
38
|
-
"zod": "^4.3.
|
|
38
|
+
"zod": "^4.3.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@types/node": "^25.0
|
|
41
|
+
"@types/node": "^25.2.0",
|
|
42
42
|
"tsx": "^4.21.0",
|
|
43
|
-
"vitest": "^4.0.
|
|
43
|
+
"vitest": "^4.0.18",
|
|
44
44
|
"@assistant-ui/x-buildutils": "0.0.1"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
@@ -54,7 +54,7 @@ describe("assistantUIExamples", () => {
|
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
expect(result.content).toContain("package.json");
|
|
57
|
-
expect(result.content).toContain("
|
|
57
|
+
expect(result.content).toContain("app/page.tsx");
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
it("should handle empty example parameter", async () => {
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "About assistant-ui"
|
|
3
|
-
description: Why assistant-ui? Composable primitives, runtime agnostic, and production-ready.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import { Sparkles, PanelsTopLeft, Database, Terminal } from "lucide-react";
|
|
7
|
-
|
|
8
|
-
assistant-ui helps you create beautiful, enterprise-grade AI chat interfaces in minutes. Whether you're building a chatGPT clone, a customer support chatbot, an AI assistant, or a complex multi agent application, assistant-ui provides the frontend primative components and state management layers to focus on what makes your application unique.
|
|
9
|
-
|
|
10
|
-
## Key Features
|
|
11
|
-
|
|
12
|
-
<Cards>
|
|
13
|
-
|
|
14
|
-
<Card icon={<PanelsTopLeft className="text-purple-300" />} title='Instant Chat UI'>
|
|
15
|
-
|
|
16
|
-
Pre-built beautiful, customizable chat interfaces out of the box. Easy to quickly iterate on your idea.
|
|
17
|
-
|
|
18
|
-
</Card>
|
|
19
|
-
|
|
20
|
-
<Card icon={<PanelsTopLeft className="text-blue-300" />} title='Chat State Management'>
|
|
21
|
-
|
|
22
|
-
Powerful state management for chat interactions, optimized for streaming responses and efficient rendering.
|
|
23
|
-
|
|
24
|
-
</Card>
|
|
25
|
-
|
|
26
|
-
<Card icon={<Database className="text-green-300" />} title='High Performance'>
|
|
27
|
-
|
|
28
|
-
Optimized for speed and efficiency with minimal bundle size, ensuring your AI chat interfaces remain responsive.
|
|
29
|
-
|
|
30
|
-
</Card>
|
|
31
|
-
|
|
32
|
-
<Card icon={<Terminal className="text-orange-300" />} title='Framework Agnostic'>
|
|
33
|
-
|
|
34
|
-
Easily integrate with any backend system, whether using Vercel AI SDK, direct LLM connections, or custom solutions.
|
|
35
|
-
Works with any React-based framework.
|
|
36
|
-
|
|
37
|
-
</Card>
|
|
38
|
-
|
|
39
|
-
</Cards>
|
|
40
|
-
|
|
41
|
-
<Callout title="Want to try it out?">
|
|
42
|
-
[Get Started in 30 Seconds](/docs).
|
|
43
|
-
</Callout>
|
|
44
|
-
|
|
45
|
-
## AI Accessible Documentation
|
|
46
|
-
|
|
47
|
-
Our docs are easily accessible to AI assistants through several methods:
|
|
48
|
-
|
|
49
|
-
- **[MCP Docs Server](/docs/mcp-docs-server)** - Direct MCP integration for IDEs and agents
|
|
50
|
-
- **`/llms.txt`** - Structured index of all documentation pages
|
|
51
|
-
- **`/llms-full.txt`** - Complete documentation in a single file
|
|
52
|
-
- **`.mdx` suffix** - Add `.mdx` to any page's URL for raw markdown content
|
|
53
|
-
|
|
54
|
-
|