@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
|
@@ -56,6 +56,26 @@ This command uses `create-next-app` with assistant-ui starter templates.
|
|
|
56
56
|
| `langgraph` | LangGraph integration | `npx assistant-ui create -t langgraph` |
|
|
57
57
|
| `mcp` | Model Context Protocol support | `npx assistant-ui create -t mcp` |
|
|
58
58
|
|
|
59
|
+
**Available Examples**
|
|
60
|
+
|
|
61
|
+
Use `--example` to create a project from one of the monorepo examples with full feature demonstrations:
|
|
62
|
+
|
|
63
|
+
| Example | Description | Command |
|
|
64
|
+
|---------|-------------|---------|
|
|
65
|
+
| `with-ai-sdk-v6` | Vercel AI SDK v6 integration | `npx assistant-ui create my-app -e with-ai-sdk-v6` |
|
|
66
|
+
| `with-langgraph` | LangGraph agent with custom tools | `npx assistant-ui create my-app -e with-langgraph` |
|
|
67
|
+
| `with-cloud` | Assistant Cloud persistence | `npx assistant-ui create my-app -e with-cloud` |
|
|
68
|
+
| `with-ag-ui` | AG-UI protocol integration | `npx assistant-ui create my-app -e with-ag-ui` |
|
|
69
|
+
| `with-assistant-transport` | Custom backend via Assistant Transport | `npx assistant-ui create my-app -e with-assistant-transport` |
|
|
70
|
+
| `with-external-store` | External message store | `npx assistant-ui create my-app -e with-external-store` |
|
|
71
|
+
| `with-custom-thread-list` | Custom thread list UI | `npx assistant-ui create my-app -e with-custom-thread-list` |
|
|
72
|
+
| `with-react-hook-form` | React Hook Form integration | `npx assistant-ui create my-app -e with-react-hook-form` |
|
|
73
|
+
| `with-ffmpeg` | FFmpeg video processing tool | `npx assistant-ui create my-app -e with-ffmpeg` |
|
|
74
|
+
| `with-elevenlabs-scribe` | ElevenLabs voice transcription | `npx assistant-ui create my-app -e with-elevenlabs-scribe` |
|
|
75
|
+
| `with-parent-id-grouping` | Message part grouping | `npx assistant-ui create my-app -e with-parent-id-grouping` |
|
|
76
|
+
| `with-react-router` | React Router v7 integration | `npx assistant-ui create my-app -e with-react-router` |
|
|
77
|
+
| `with-tanstack` | TanStack Start integration | `npx assistant-ui create my-app -e with-tanstack` |
|
|
78
|
+
|
|
59
79
|
**Examples**
|
|
60
80
|
|
|
61
81
|
```bash
|
|
@@ -65,6 +85,9 @@ npx assistant-ui@latest create my-app
|
|
|
65
85
|
# Create with cloud template
|
|
66
86
|
npx assistant-ui@latest create my-app -t cloud
|
|
67
87
|
|
|
88
|
+
# Create from an example
|
|
89
|
+
npx assistant-ui@latest create my-app --example with-langgraph
|
|
90
|
+
|
|
68
91
|
# Create with specific package manager
|
|
69
92
|
npx assistant-ui@latest create my-app --use-pnpm
|
|
70
93
|
|
|
@@ -84,6 +107,7 @@ Arguments:
|
|
|
84
107
|
|
|
85
108
|
Options:
|
|
86
109
|
-t, --template <template> template to use (default, cloud, langgraph, mcp)
|
|
110
|
+
-e, --example <example> create from an example (e.g., with-langgraph)
|
|
87
111
|
--use-npm explicitly use npm
|
|
88
112
|
--use-pnpm explicitly use pnpm
|
|
89
113
|
--use-yarn explicitly use yarn
|
|
@@ -262,6 +286,48 @@ Options:
|
|
|
262
286
|
-h, --help display help for command
|
|
263
287
|
```
|
|
264
288
|
|
|
289
|
+
## mcp
|
|
290
|
+
|
|
291
|
+
Use the `mcp` command to install the assistant-ui MCP docs server for your IDE.
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
npx assistant-ui@latest mcp
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
This command configures the [Model Context Protocol](/docs/llm#mcp) server, giving your AI assistant direct access to assistant-ui documentation.
|
|
298
|
+
|
|
299
|
+
**Examples**
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
# Interactive - prompts to select IDE
|
|
303
|
+
npx assistant-ui mcp
|
|
304
|
+
|
|
305
|
+
# Install for specific IDE
|
|
306
|
+
npx assistant-ui mcp --cursor
|
|
307
|
+
npx assistant-ui mcp --windsurf
|
|
308
|
+
npx assistant-ui mcp --vscode
|
|
309
|
+
npx assistant-ui mcp --zed
|
|
310
|
+
npx assistant-ui mcp --claude-code
|
|
311
|
+
npx assistant-ui mcp --claude-desktop
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**Options**
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
Usage: assistant-ui mcp [options]
|
|
318
|
+
|
|
319
|
+
install assistant-ui MCP docs server for your IDE
|
|
320
|
+
|
|
321
|
+
Options:
|
|
322
|
+
--cursor install for Cursor
|
|
323
|
+
--windsurf install for Windsurf
|
|
324
|
+
--vscode install for VSCode
|
|
325
|
+
--zed install for Zed
|
|
326
|
+
--claude-code install for Claude Code
|
|
327
|
+
--claude-desktop install for Claude Desktop
|
|
328
|
+
-h, --help display help for command
|
|
329
|
+
```
|
|
330
|
+
|
|
265
331
|
## Common Workflows
|
|
266
332
|
|
|
267
333
|
### Starting a new project
|
|
@@ -3,7 +3,6 @@ title: makeAssistantToolUI
|
|
|
3
3
|
description: Register custom UI components to render tool executions and their status.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { ParametersTable } from "@/components/docs/tables/ParametersTable";
|
|
7
6
|
|
|
8
7
|
The `makeAssistantToolUI` utility is used to register a tool UI component with the Assistant.
|
|
9
8
|
|
|
@@ -3,7 +3,6 @@ title: makeAssistantTool
|
|
|
3
3
|
description: Create React components that provide reusable tools to the assistant.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { ParametersTable } from "@/components/docs/tables/ParametersTable";
|
|
7
6
|
|
|
8
7
|
`makeAssistantTool` creates a React component that provides a tool to the assistant. This is useful for defining reusable tools that can be composed into your application.
|
|
9
8
|
|
|
@@ -75,12 +75,12 @@ function Form() {
|
|
|
75
75
|
The context provider system allows components to contribute to the model context. Here's a typical usage pattern:
|
|
76
76
|
|
|
77
77
|
```tsx
|
|
78
|
-
import {
|
|
78
|
+
import { useAui, tool } from "@assistant-ui/react";
|
|
79
79
|
import { useEffect } from "react";
|
|
80
80
|
import { z } from "zod";
|
|
81
81
|
|
|
82
82
|
function MyComponent() {
|
|
83
|
-
const
|
|
83
|
+
const aui = useAui();
|
|
84
84
|
|
|
85
85
|
// Define tool using the tool() helper
|
|
86
86
|
const myTool = tool({
|
|
@@ -95,13 +95,13 @@ function MyComponent() {
|
|
|
95
95
|
|
|
96
96
|
useEffect(() => {
|
|
97
97
|
// Register context provider
|
|
98
|
-
return
|
|
98
|
+
return aui.modelContext().register({
|
|
99
99
|
getModelContext: () => ({
|
|
100
100
|
system: "You are a helpful search assistant...",
|
|
101
101
|
tools: { myTool },
|
|
102
102
|
}),
|
|
103
103
|
});
|
|
104
|
-
}, [
|
|
104
|
+
}, [aui]); // Re-register if api changes
|
|
105
105
|
|
|
106
106
|
return <div>{/* component content */}</div>;
|
|
107
107
|
}
|
|
@@ -144,14 +144,14 @@ function SmartTransactionHistory() {
|
|
|
144
144
|
Finally, let's add dynamic context based on the user's transaction patterns:
|
|
145
145
|
|
|
146
146
|
```tsx
|
|
147
|
-
import {
|
|
147
|
+
import { useAui } from "@assistant-ui/react";
|
|
148
148
|
import { useEffect } from "react";
|
|
149
149
|
|
|
150
150
|
function SmartTransactionHistory({ userProfile }) {
|
|
151
|
-
const
|
|
151
|
+
const aui = useAui();
|
|
152
152
|
|
|
153
153
|
useEffect(() => {
|
|
154
|
-
return
|
|
154
|
+
return aui.modelContext().register({
|
|
155
155
|
getModelContext: () => ({
|
|
156
156
|
system: `
|
|
157
157
|
User spending patterns:
|
|
@@ -3,7 +3,6 @@ title: DevTools
|
|
|
3
3
|
description: Inspect runtime state, context, and events in the browser.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
|
|
7
6
|
|
|
8
7
|
Hey, the assistant-ui DevTools allows you to debug the assistant-ui state and context, and events without resorting to `console.log`. It's an easy way to see how data flows to the assistant-ui's runtime layer.
|
|
9
8
|
|
|
@@ -4,7 +4,6 @@ description: Let users attach files, images, and documents to messages.
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import { AttachmentSample } from "@/components/docs/samples/attachment";
|
|
7
|
-
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
|
|
8
7
|
|
|
9
8
|
Enable users to attach files to their messages, enhancing conversations with images, documents, and other content.
|
|
10
9
|
|
|
@@ -485,14 +484,14 @@ class ValidatedImageAdapter implements AttachmentAdapter {
|
|
|
485
484
|
Enable multi-file selection with custom limits:
|
|
486
485
|
|
|
487
486
|
```tsx
|
|
488
|
-
const
|
|
487
|
+
const aui = useAui();
|
|
489
488
|
|
|
490
489
|
const handleMultipleFiles = async (files: FileList) => {
|
|
491
490
|
const maxFiles = 5;
|
|
492
491
|
const filesToAdd = Array.from(files).slice(0, maxFiles);
|
|
493
492
|
|
|
494
493
|
for (const file of filesToAdd) {
|
|
495
|
-
await
|
|
494
|
+
await aui.composer().addAttachment({ file });
|
|
496
495
|
}
|
|
497
496
|
};
|
|
498
497
|
```
|