@assistant-ui/mcp-docs-server 0.1.14 → 0.1.16

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.
Files changed (57) hide show
  1. package/.docs/organized/code-examples/store-example.md +628 -0
  2. package/.docs/organized/code-examples/with-ag-ui.md +792 -178
  3. package/.docs/organized/code-examples/with-ai-sdk-v5.md +762 -209
  4. package/.docs/organized/code-examples/with-assistant-transport.md +707 -254
  5. package/.docs/organized/code-examples/with-cloud.md +848 -202
  6. package/.docs/organized/code-examples/with-custom-thread-list.md +1855 -0
  7. package/.docs/organized/code-examples/with-external-store.md +788 -172
  8. package/.docs/organized/code-examples/with-ffmpeg.md +796 -196
  9. package/.docs/organized/code-examples/with-langgraph.md +864 -230
  10. package/.docs/organized/code-examples/with-parent-id-grouping.md +785 -255
  11. package/.docs/organized/code-examples/with-react-hook-form.md +804 -226
  12. package/.docs/organized/code-examples/with-tanstack.md +1574 -0
  13. package/.docs/raw/blog/2024-07-29-hello/index.mdx +2 -3
  14. package/.docs/raw/docs/api-reference/overview.mdx +6 -6
  15. package/.docs/raw/docs/api-reference/primitives/ActionBar.mdx +85 -4
  16. package/.docs/raw/docs/api-reference/primitives/AssistantIf.mdx +200 -0
  17. package/.docs/raw/docs/api-reference/primitives/Composer.mdx +0 -20
  18. package/.docs/raw/docs/api-reference/primitives/Message.mdx +0 -45
  19. package/.docs/raw/docs/api-reference/primitives/Thread.mdx +0 -50
  20. package/.docs/raw/docs/cli.mdx +396 -0
  21. package/.docs/raw/docs/cloud/persistence/ai-sdk.mdx +2 -3
  22. package/.docs/raw/docs/cloud/persistence/langgraph.mdx +2 -3
  23. package/.docs/raw/docs/devtools.mdx +2 -3
  24. package/.docs/raw/docs/getting-started.mdx +37 -1109
  25. package/.docs/raw/docs/guides/Attachments.mdx +3 -25
  26. package/.docs/raw/docs/guides/Branching.mdx +1 -1
  27. package/.docs/raw/docs/guides/Speech.mdx +1 -1
  28. package/.docs/raw/docs/guides/ToolUI.mdx +1 -1
  29. package/.docs/raw/docs/legacy/styled/AssistantModal.mdx +2 -3
  30. package/.docs/raw/docs/legacy/styled/Decomposition.mdx +6 -5
  31. package/.docs/raw/docs/legacy/styled/Markdown.mdx +2 -3
  32. package/.docs/raw/docs/legacy/styled/Thread.mdx +2 -3
  33. package/.docs/raw/docs/react-compatibility.mdx +2 -5
  34. package/.docs/raw/docs/runtimes/ai-sdk/use-chat.mdx +3 -4
  35. package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +3 -6
  36. package/.docs/raw/docs/runtimes/assistant-transport.mdx +891 -0
  37. package/.docs/raw/docs/runtimes/custom/external-store.mdx +2 -3
  38. package/.docs/raw/docs/runtimes/custom/local.mdx +11 -41
  39. package/.docs/raw/docs/runtimes/data-stream.mdx +15 -11
  40. package/.docs/raw/docs/runtimes/langgraph/index.mdx +4 -4
  41. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +1 -1
  42. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +2 -3
  43. package/.docs/raw/docs/runtimes/langserve.mdx +2 -3
  44. package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +2 -3
  45. package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +2 -3
  46. package/.docs/raw/docs/ui/AssistantModal.mdx +3 -25
  47. package/.docs/raw/docs/ui/AssistantSidebar.mdx +2 -24
  48. package/.docs/raw/docs/ui/Attachment.mdx +3 -25
  49. package/.docs/raw/docs/ui/Markdown.mdx +2 -24
  50. package/.docs/raw/docs/ui/Mermaid.mdx +2 -24
  51. package/.docs/raw/docs/ui/Reasoning.mdx +2 -24
  52. package/.docs/raw/docs/ui/Scrollbar.mdx +4 -6
  53. package/.docs/raw/docs/ui/SyntaxHighlighting.mdx +3 -47
  54. package/.docs/raw/docs/ui/Thread.mdx +38 -53
  55. package/.docs/raw/docs/ui/ThreadList.mdx +4 -47
  56. package/.docs/raw/docs/ui/ToolFallback.mdx +2 -24
  57. package/package.json +15 -8
@@ -2,10 +2,10 @@
2
2
  title: Attachments
3
3
  ---
4
4
 
5
- import { AttachmentSample } from "../../../components/samples/attachment-sample";
5
+ import { AttachmentSample } from "@/components/samples/attachment-sample";
6
6
  import { Steps, Step } from "fumadocs-ui/components/steps";
7
7
  import { Callout } from "fumadocs-ui/components/callout";
8
- import { Tab, Tabs } from "fumadocs-ui/components/tabs";
8
+ import { InstallCommand } from "@/components/docs/install-command";
9
9
 
10
10
  Enable users to attach files to their messages, enhancing conversations with images, documents, and other content.
11
11
 
@@ -28,29 +28,7 @@ The attachment system in assistant-ui provides a flexible framework for handling
28
28
 
29
29
  First, add the attachment UI components to your project:
30
30
 
31
- <Tabs items={["assistant-ui", "shadcn (namespace)", "shadcn"]}>
32
- <Tab>
33
-
34
- ```sh
35
- npx assistant-ui@latest add attachment
36
- ```
37
-
38
- </Tab>
39
- <Tab>
40
-
41
- ```sh
42
- npx shadcn@latest add @assistant-ui/attachment
43
- ```
44
-
45
- </Tab>
46
- <Tab>
47
-
48
- ```sh
49
- npx shadcn@latest add "https://r.assistant-ui.com/attachment"
50
- ```
51
-
52
- </Tab>
53
- </Tabs>
31
+ <InstallCommand shadcn={["attachment"]} />
54
32
 
55
33
  This adds `/components/assistant-ui/attachment.tsx` to your project.
56
34
 
@@ -2,7 +2,7 @@
2
2
  title: Message Branching
3
3
  ---
4
4
 
5
- import { BranchingSample } from "../../../components/samples/branching-sample";
5
+ import { BranchingSample } from "@/components/samples/branching-sample";
6
6
 
7
7
  Switch between different conversation branches.
8
8
 
@@ -2,7 +2,7 @@
2
2
  title: Speech
3
3
  ---
4
4
 
5
- import { SpeechSample } from "../../../components/samples/speech-sample";
5
+ import { SpeechSample } from "@/components/samples/speech-sample";
6
6
 
7
7
  ## Text-to-Speech
8
8
 
@@ -2,7 +2,7 @@
2
2
  title: Generative UI
3
3
  ---
4
4
 
5
- import { ToolUISample } from "../../../components/samples/tool-ui-sample";
5
+ import { ToolUISample } from "@/components/samples/tool-ui-sample";
6
6
  import { Steps, Step } from "fumadocs-ui/components/steps";
7
7
  import { Callout } from "fumadocs-ui/components/callout";
8
8
 
@@ -4,6 +4,7 @@ title: AssistantModal
4
4
 
5
5
  import { Steps, Step } from "fumadocs-ui/components/steps";
6
6
  import { Tabs, Tab } from "fumadocs-ui/components/tabs";
7
+ import { InstallCommand } from "@/components/docs/install-command";
7
8
 
8
9
  ## Overview
9
10
 
@@ -16,9 +17,7 @@ A chat bubble shown in the bottom right corner of the screen. Useful for support
16
17
 
17
18
  ### Install `@assistant-ui/react-ui`
18
19
 
19
- ```sh npm2yarn
20
- npm install @assistant-ui/react-ui
21
- ```
20
+ <InstallCommand npm={["@assistant-ui/react-ui"]} />
22
21
 
23
22
  </Step>
24
23
  <Step>
@@ -174,17 +174,18 @@ The text input field for the user to type a new message.
174
174
  The button to send or cancel the message.
175
175
 
176
176
  ```tsx
177
- import { Composer, ThreadPrimitive } from "@assistant-ui/react-ui";
177
+ import { Composer } from "@assistant-ui/react-ui";
178
+ import { AssistantIf } from "@assistant-ui/react";
178
179
 
179
180
  const MyComposerAction: FC = () => {
180
181
  return (
181
182
  <>
182
- <ThreadPrimitive.If running={false}>
183
+ <AssistantIf condition={({ thread }) => !thread.isRunning}>
183
184
  <Composer.Send />
184
- </ThreadPrimitive.If>
185
- <ThreadPrimitive.If running>
185
+ </AssistantIf>
186
+ <AssistantIf condition={({ thread }) => thread.isRunning}>
186
187
  <Composer.Cancel />
187
- </ThreadPrimitive.If>
188
+ </AssistantIf>
188
189
  </>
189
190
  );
190
191
  };
@@ -7,6 +7,7 @@ Allow the assistant to display rich text using markdown.
7
7
  import { Step, Steps } from "fumadocs-ui/components/steps";
8
8
  import { Callout } from "fumadocs-ui/components/callout";
9
9
  import { Tabs } from "fumadocs-ui/components/tabs";
10
+ import { InstallCommand } from "@/components/docs/install-command";
10
11
 
11
12
  ## Enabling markdown support
12
13
 
@@ -15,9 +16,7 @@ import { Tabs } from "fumadocs-ui/components/tabs";
15
16
  <Step>
16
17
  ### Install `@assistant-ui/react-markdown`
17
18
 
18
- ```sh npm2yarn
19
- npm install @assistant-ui/react-markdown
20
- ```
19
+ <InstallCommand npm={["@assistant-ui/react-markdown"]} />
21
20
 
22
21
  </Step>
23
22
  <Step>
@@ -4,6 +4,7 @@ title: Thread
4
4
 
5
5
  import { Steps, Step } from "fumadocs-ui/components/steps";
6
6
  import { Tabs, Tab } from "fumadocs-ui/components/tabs";
7
+ import { InstallCommand } from "@/components/docs/install-command";
7
8
 
8
9
  ## Overview
9
10
 
@@ -16,9 +17,7 @@ The raw message list and message composer UI. Useful for full screen chat use ca
16
17
 
17
18
  ### Install `@assistant-ui/react-ui`
18
19
 
19
- ```sh npm2yarn
20
- npm install @assistant-ui/react-ui
21
- ```
20
+ <InstallCommand npm={["@assistant-ui/react-ui"]} />
22
21
 
23
22
  </Step>
24
23
  <Step>
@@ -4,6 +4,7 @@ description: Guide for using assistant-ui with older React versions (18, 17, 16)
4
4
  ---
5
5
 
6
6
  import { Callout } from "fumadocs-ui/components/callout";
7
+ import { InstallCommand } from "@/components/docs/install-command";
7
8
 
8
9
  <Callout type="warning" title="Older React Versions">
9
10
  Older React versions are not continuously tested. If you encounter any issues
@@ -78,11 +79,7 @@ Since the assistant-ui uses zustand internally, which depends on `useSyncExterna
78
79
 
79
80
  1. Install the required packages:
80
81
 
81
- ```bash
82
- npm install use-sync-external-store patch-package
83
- # or
84
- yarn add use-sync-external-store patch-package
85
- ```
82
+ <InstallCommand npm={["use-sync-external-store", "patch-package"]} />
86
83
 
87
84
  2. Add a postinstall script to your package.json:
88
85
 
@@ -3,10 +3,11 @@ title: AI SDK v5
3
3
  ---
4
4
 
5
5
  import { Callout } from "fumadocs-ui/components/callout";
6
+ import { InstallCommand } from "@/components/docs/install-command";
6
7
 
7
8
  ## Overview
8
9
 
9
- Integration with the Vercel AI SDK v5 using the new `useChatRuntime` hook from `@assistant-ui/react-ai-sdk`.
10
+ Integration with the Vercel AI SDK v5 using the new `useChatRuntime` hook from `@assistant-ui/react-ai-sdk`.
10
11
  This provides a streamlined way to integrate AI SDK v5 features including the new streamText API and improved TypeScript support.
11
12
 
12
13
  ## Getting Started
@@ -27,9 +28,7 @@ cd my-app
27
28
 
28
29
  ### Install AI SDK v5 and `@assistant-ui/react`
29
30
 
30
- ```sh npm2yarn
31
- npm install @assistant-ui/react @assistant-ui/react-ai-sdk ai @ai-sdk/openai
32
- ```
31
+ <InstallCommand npm={["@assistant-ui/react", "@assistant-ui/react-ai-sdk", "ai", "@ai-sdk/openai"]} />
33
32
 
34
33
  </Step>
35
34
  <Step>
@@ -3,6 +3,7 @@ title: AI SDK v4 (Legacy)
3
3
  ---
4
4
 
5
5
  import { Callout } from "fumadocs-ui/components/callout";
6
+ import { InstallCommand } from "@/components/docs/install-command";
6
7
 
7
8
  ## Overview
8
9
 
@@ -27,9 +28,7 @@ import { Steps, Step } from "fumadocs-ui/components/steps";
27
28
 
28
29
  Install `@assistant-ui/react-data-stream` alongside assistant-ui and AI SDK v4:
29
30
 
30
- ```sh npm2yarn
31
- npm install @assistant-ui/react @assistant-ui/react-data-stream ai@^4
32
- ```
31
+ <InstallCommand npm={["@assistant-ui/react", "@assistant-ui/react-data-stream", "ai@^4"]} />
33
32
 
34
33
  </Step>
35
34
  <Step>
@@ -92,9 +91,7 @@ export default function Home() {
92
91
 
93
92
  Alternatively, you can use the older version of the AI SDK integration package, though this version is no longer actively maintained:
94
93
 
95
- ```sh npm2yarn
96
- npm install @assistant-ui/react @assistant-ui/react-ai-sdk@0.1.10 ai@^4
97
- ```
94
+ <InstallCommand npm={["@assistant-ui/react", "@assistant-ui/react-ai-sdk@0.1.10", "ai@^4"]} />
98
95
 
99
96
  <Callout type="warning">
100
97
  Version 0.1.10 of `@assistant-ui/react-ai-sdk` is no longer actively