@assistant-ui/mcp-docs-server 0.2.1 → 0.2.2
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 +1 -1
- package/.docs/organized/code-examples/with-a2a.md +2 -2
- package/.docs/organized/code-examples/with-ag-ui.md +3 -3
- package/.docs/organized/code-examples/with-ai-sdk-v7.md +5 -5
- package/.docs/organized/code-examples/with-artifacts.md +5 -5
- package/.docs/organized/code-examples/with-assistant-transport.md +3 -3
- package/.docs/organized/code-examples/with-browser-extension.md +4 -4
- package/.docs/organized/code-examples/with-chain-of-thought.md +5 -5
- package/.docs/organized/code-examples/with-cloud-standalone.md +5 -5
- package/.docs/organized/code-examples/with-cloud.md +5 -5
- package/.docs/organized/code-examples/with-custom-thread-list.md +6 -6
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +7 -7
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +8 -8
- package/.docs/organized/code-examples/with-eve.md +3 -3
- package/.docs/organized/code-examples/with-expo.md +13 -19
- package/.docs/organized/code-examples/with-external-store.md +3 -3
- package/.docs/organized/code-examples/with-ffmpeg.md +5 -5
- package/.docs/organized/code-examples/with-generative-ui.md +259 -23
- package/.docs/organized/code-examples/with-google-adk.md +2 -2
- package/.docs/organized/code-examples/with-heat-graph.md +1 -1
- package/.docs/organized/code-examples/with-image-generation.md +4 -4
- package/.docs/organized/code-examples/with-interactables.md +5 -5
- package/.docs/organized/code-examples/with-langchain.md +7 -7
- package/.docs/organized/code-examples/with-langgraph.md +4 -4
- package/.docs/organized/code-examples/with-livekit.md +7 -7
- package/.docs/organized/code-examples/with-mcp.md +6 -6
- package/.docs/organized/code-examples/with-nuxt.md +500 -564
- package/.docs/organized/code-examples/with-opencode.md +2 -2
- package/.docs/organized/code-examples/with-openui.md +449 -0
- package/.docs/organized/code-examples/with-pi.md +2 -2
- package/.docs/organized/code-examples/with-react-hook-form.md +7 -7
- package/.docs/organized/code-examples/with-react-ink-web.md +4 -4
- package/.docs/organized/code-examples/with-react-ink.md +2 -2
- package/.docs/organized/code-examples/with-react-router.md +4 -4
- package/.docs/organized/code-examples/with-resumable-stream.md +7 -7
- package/.docs/organized/code-examples/with-store.md +1 -1
- package/.docs/organized/code-examples/with-svelte.md +415 -0
- package/.docs/organized/code-examples/with-sveltekit.md +1061 -0
- package/.docs/organized/code-examples/with-tanstack.md +5 -5
- package/.docs/organized/code-examples/with-tap-runtime.md +2 -2
- package/.docs/organized/code-examples/with-virtualized-thread.md +2 -2
- package/.docs/organized/code-examples/with-vue.md +1 -1
- package/.docs/raw/docs/(docs)/cli.mdx +6 -1
- package/.docs/raw/docs/(docs)/installation.mdx +2 -2
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/slack.mdx +5 -1
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/teams.mdx +9 -2
- package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +2 -2
- package/.docs/raw/docs/(reference)/api-reference/integrations/eve.mdx +39 -1
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +29 -4
- package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +1 -1
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +29 -1
- package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +1 -1
- package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +1 -1
- package/.docs/raw/docs/cloud/ai-sdk.mdx +2 -2
- package/.docs/raw/docs/cloud/index.mdx +1 -1
- package/.docs/raw/docs/guides/attachments.mdx +2 -2
- package/.docs/raw/docs/guides/context-api.mdx +15 -17
- package/.docs/raw/docs/guides/dictation.mdx +1 -1
- package/.docs/raw/docs/guides/mentions.mdx +2 -0
- package/.docs/raw/docs/guides/suggestions.mdx +6 -3
- package/.docs/raw/docs/ink/primitives.mdx +1 -1
- package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +146 -128
- package/.docs/raw/docs/migrations/v0-15.mdx +34 -0
- package/.docs/raw/docs/primitives/suggestion.mdx +3 -1
- package/.docs/raw/docs/primitives/thread.mdx +1 -1
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +35 -5
- package/.docs/raw/docs/runtimes/claude-managed-agents.mdx +118 -0
- package/.docs/raw/docs/runtimes/concepts/stability.mdx +2 -1
- package/.docs/raw/docs/runtimes/concepts/threads.mdx +68 -28
- package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +1 -1
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +6 -2
- package/.docs/raw/docs/runtimes/langchain.mdx +1 -1
- package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +4 -0
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +8 -1
- package/.docs/raw/docs/tools/defining-tools.mdx +19 -0
- package/.docs/raw/docs/tools/generative-ui-primitive.mdx +180 -0
- package/.docs/raw/docs/tools/generative-ui-slack.mdx +167 -0
- package/.docs/raw/docs/tools/generative-ui-teams.mdx +160 -0
- package/.docs/raw/docs/tools/generative-ui.mdx +224 -211
- package/.docs/raw/docs/tools/index.mdx +2 -1
- package/.docs/raw/docs/tools/interactables.mdx +5 -4
- package/.docs/raw/docs/tools/openui.mdx +175 -0
- package/.docs/raw/docs/tools/tool-ui.mdx +1 -2
- package/.docs/raw/docs/tools/user-managed-mcp.mdx +5 -1
- package/.docs/raw/docs/ui/attachment.mdx +27 -0
- package/.docs/raw/docs/ui/file.mdx +1 -1
- package/.docs/raw/docs/ui/image.mdx +1 -1
- package/package.json +4 -4
- package/.docs/raw/docs/tools/interactables-legacy.mdx +0 -423
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: OpenUI
|
|
3
|
+
description: Render streaming OpenUI Lang interfaces in an assistant-ui conversation with @openuidev/assistant-ui, the integration package published by OpenUI.
|
|
4
|
+
platforms: ["react"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[OpenUI](https://www.openui.com) is a generative UI system in which the model writes **OpenUI Lang**, a streaming markup language, and an OpenUI renderer turns it into interactive React components. [`@openuidev/assistant-ui`](https://www.npmjs.com/package/@openuidev/assistant-ui) connects that renderer to assistant-ui: it ships a ready-made toolkit, model instructions generated from the OpenUI component library, and Tool UI renderers that stream, handle interactions, and replay.
|
|
8
|
+
|
|
9
|
+
<Callout type="info">
|
|
10
|
+
`@openuidev/assistant-ui` is a third-party package. OpenUI owns the package, its [documentation](https://www.openui.com/docs/api-reference/assistant-ui), and its releases; assistant-ui does not ship or version any OpenUI code. Use OpenUI's reference for the package API and OpenUI Lang itself; this page covers the assistant-ui side of the wiring.
|
|
11
|
+
</Callout>
|
|
12
|
+
|
|
13
|
+
The integration rides entirely on the [Tool UI](/docs/tools/tool-ui) lifecycle, so assistant-ui stays in charge of the conversation, streaming, and tool calls. The toolkit registers two standalone tools:
|
|
14
|
+
|
|
15
|
+
- `present_openui` is a **frontend tool** for display-only interfaces (cards, tables, charts). It completes as soon as the streamed `ui` argument is available, and the turn ends there.
|
|
16
|
+
- `prompt_openui` is a **human tool** for forms and choices. It completes only when the user submits an OpenUI `@ToAssistant(...)` action, and the submitted values continue the conversation.
|
|
17
|
+
|
|
18
|
+
## How it relates to the `present` tool
|
|
19
|
+
|
|
20
|
+
assistant-ui's first-party [Generative UI](/docs/tools/generative-ui) follows the same shape: one tool, a component vocabulary, and a model that composes an interface at runtime. The difference is the representation and who owns it. `present` takes a JSON tree validated against a schema generated from a vocabulary you ship and restyle; `present_openui` takes an OpenUI Lang program rendered by OpenUI's component kit, taught to the model through instructions. Pick `present` when you want the interface built from your own components on assistant-ui's append-only surface, and OpenUI when you are already invested in the OpenUI ecosystem or want its renderer and component library.
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
23
|
+
|
|
24
|
+
The complete setup below runs in [`examples/with-openui`](https://github.com/assistant-ui/assistant-ui/tree/main/examples/with-openui). To scaffold a standalone copy, run `npx assistant-ui create my-app --example with-openui`.
|
|
25
|
+
|
|
26
|
+
<Steps>
|
|
27
|
+
|
|
28
|
+
<Step>
|
|
29
|
+
|
|
30
|
+
### Install the packages
|
|
31
|
+
|
|
32
|
+
Alongside an existing `@assistant-ui/react` setup, add the integration and its OpenUI peer dependencies:
|
|
33
|
+
|
|
34
|
+
<InstallCommand npm={["@openuidev/assistant-ui", "@openuidev/react-ui", "@openuidev/react-lang", "@openuidev/react-headless", "zustand@^4.5.5"]} />
|
|
35
|
+
|
|
36
|
+
The package also expects `zod` and React 18 or 19, which an assistant-ui app already has. The current OpenUI peers support AI SDK 6 and 7 and require Zustand 4.
|
|
37
|
+
|
|
38
|
+
</Step>
|
|
39
|
+
|
|
40
|
+
<Step>
|
|
41
|
+
|
|
42
|
+
### Load the OpenUI stylesheet
|
|
43
|
+
|
|
44
|
+
Import the layered stylesheet once, for example in `app/globals.css`:
|
|
45
|
+
|
|
46
|
+
```css
|
|
47
|
+
@import "@openuidev/react-ui/layered/styles/index.css";
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
</Step>
|
|
51
|
+
|
|
52
|
+
<Step>
|
|
53
|
+
|
|
54
|
+
### Register the toolkit and instructions
|
|
55
|
+
|
|
56
|
+
`openuiIntegration` bundles a toolkit and an instruction string created from the same OpenUI component library, so the model and the renderer share one vocabulary. Register the toolkit with [`Tools`](/docs/api-reference/tools) and mount `OpenUIInstructions` so the vocabulary reaches the model as assistant instructions:
|
|
57
|
+
|
|
58
|
+
```tsx title="app/page.tsx"
|
|
59
|
+
"use client";
|
|
60
|
+
|
|
61
|
+
import {
|
|
62
|
+
AssistantRuntimeProvider,
|
|
63
|
+
AuiConfig,
|
|
64
|
+
Tools,
|
|
65
|
+
} from "@assistant-ui/react";
|
|
66
|
+
import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
|
|
67
|
+
import { OpenUIInstructions, openuiIntegration } from "@openuidev/assistant-ui";
|
|
68
|
+
import { shouldContinueAfterOpenUIPrompt } from "@openuidev/assistant-ui/ai-sdk";
|
|
69
|
+
import { Thread } from "@/components/assistant-ui/thread";
|
|
70
|
+
|
|
71
|
+
export default function Home() {
|
|
72
|
+
const runtime = useChatRuntime({
|
|
73
|
+
sendAutomaticallyWhen: shouldContinueAfterOpenUIPrompt,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const config = AuiConfig({
|
|
77
|
+
tools: Tools({ toolkit: openuiIntegration.toolkit }),
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<AssistantRuntimeProvider config={config} runtime={runtime}>
|
|
82
|
+
<OpenUIInstructions />
|
|
83
|
+
<Thread />
|
|
84
|
+
</AssistantRuntimeProvider>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`sendAutomaticallyWhen` is the continuation gate. OpenUI's predicate continues the run only after `prompt_openui` has received a submitted result, so a display-only `present_openui` call ends the turn instead of triggering an empty follow-up request.
|
|
90
|
+
|
|
91
|
+
<Callout type="info">
|
|
92
|
+
`sendAutomaticallyWhen` is a single slot. OpenUI's predicate is a strict refinement of `lastAssistantMessageIsCompleteWithToolCalls` (the predicate the other guides in this section use), so it replaces it cleanly when OpenUI's tools are the only ones that resume the run. If your app mixes in other tools whose flows must also resume, write one predicate that decides by tool name; a naive `||` with the generic predicate collapses to the generic predicate alone and re-enables the empty follow-up after display-only calls.
|
|
93
|
+
</Callout>
|
|
94
|
+
|
|
95
|
+
</Step>
|
|
96
|
+
|
|
97
|
+
<Step>
|
|
98
|
+
|
|
99
|
+
### Forward the tools in your API route
|
|
100
|
+
|
|
101
|
+
The default `AssistantChatTransport` forwards the registered instructions and both frontend tool schemas to the backend, so the route stays generic:
|
|
102
|
+
|
|
103
|
+
```ts title="app/api/chat/route.ts"
|
|
104
|
+
import { openai } from "@ai-sdk/openai";
|
|
105
|
+
import { frontendTools } from "@assistant-ui/react-ai-sdk";
|
|
106
|
+
import {
|
|
107
|
+
type JSONSchema7,
|
|
108
|
+
streamText,
|
|
109
|
+
convertToModelMessages,
|
|
110
|
+
type UIMessage,
|
|
111
|
+
createUIMessageStreamResponse,
|
|
112
|
+
toUIMessageStream,
|
|
113
|
+
} from "ai";
|
|
114
|
+
|
|
115
|
+
export const maxDuration = 30;
|
|
116
|
+
|
|
117
|
+
export async function POST(req: Request) {
|
|
118
|
+
const {
|
|
119
|
+
messages,
|
|
120
|
+
system,
|
|
121
|
+
tools,
|
|
122
|
+
}: {
|
|
123
|
+
messages: UIMessage[];
|
|
124
|
+
system?: string;
|
|
125
|
+
tools?: Record<string, { description?: string; parameters: JSONSchema7 }>;
|
|
126
|
+
} = await req.json();
|
|
127
|
+
|
|
128
|
+
const result = streamText({
|
|
129
|
+
model: openai("gpt-5.6-luna"),
|
|
130
|
+
messages: await convertToModelMessages(messages),
|
|
131
|
+
...(system ? { system } : {}),
|
|
132
|
+
tools: frontendTools(tools ?? {}),
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
return createUIMessageStreamResponse({
|
|
136
|
+
stream: toUIMessageStream({ stream: result.stream }),
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
</Step>
|
|
142
|
+
|
|
143
|
+
</Steps>
|
|
144
|
+
|
|
145
|
+
## Interaction and replay
|
|
146
|
+
|
|
147
|
+
When the user submits a `prompt_openui` form or choice, the integration reports the action, message, parameters, and form state through the standard human-tool `addResult`, and `sendAutomaticallyWhen` resumes the run with that result. On replay of a persisted thread, the stored result hydrates the submitted form state back into the renderer, so completed forms render as submitted instead of resetting.
|
|
148
|
+
|
|
149
|
+
<Callout type="tip">
|
|
150
|
+
The core integration is runtime-agnostic: the toolkit, renderers, and instructions work with any assistant-ui runtime that forwards tool schemas and results. Only the `shouldContinueAfterOpenUIPrompt` helper on the `/ai-sdk` subpath is AI SDK-specific.
|
|
151
|
+
</Callout>
|
|
152
|
+
|
|
153
|
+
## Customization
|
|
154
|
+
|
|
155
|
+
`createOpenUIIntegration` keeps a custom component library, tool names, and renderer options aligned across the toolkit and the instructions:
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
import { createOpenUIIntegration } from "@openuidev/assistant-ui";
|
|
159
|
+
import { library } from "./library";
|
|
160
|
+
|
|
161
|
+
const openui = createOpenUIIntegration({
|
|
162
|
+
library,
|
|
163
|
+
presentToolName: "show_panel",
|
|
164
|
+
promptToolName: "ask_panel",
|
|
165
|
+
});
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The result exposes `toolkit`, `instructions`, and the resolved `toolNames`. See [OpenUI's integration reference](https://www.openui.com/docs/api-reference/assistant-ui) for the full option surface, including custom descriptions, prompt options, renderer props, and error handling.
|
|
169
|
+
|
|
170
|
+
## Related
|
|
171
|
+
|
|
172
|
+
- [`examples/with-openui`](https://github.com/assistant-ui/assistant-ui/tree/main/examples/with-openui): the runnable setup from this page
|
|
173
|
+
- [OpenUI assistant-ui integration reference](https://www.openui.com/docs/api-reference/assistant-ui): the canonical package documentation
|
|
174
|
+
- [Generative UI](/docs/tools/generative-ui): the first-party `present` tool this integration sits alongside
|
|
175
|
+
- [Tool UI](/docs/tools/tool-ui): the lifecycle both OpenUI tools build on
|
|
@@ -21,8 +21,7 @@ Tool UIs in assistant-ui allow you to create custom interfaces that appear when
|
|
|
21
21
|
|
|
22
22
|
This guide demonstrates building tool UIs with the **Vercel AI SDK**.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
see the [Generative UI primitive guide](/docs/tools/generative-ui).
|
|
24
|
+
To let the model compose UI from a vocabulary instead of binding one component per tool, see [Generative UI](/docs/tools/generative-ui).
|
|
26
25
|
|
|
27
26
|
## Creating Tool UIs
|
|
28
27
|
|
|
@@ -24,6 +24,10 @@ AuiConfig({ mcp: McpManagerResource({ connectors }) })
|
|
|
24
24
|
|
|
25
25
|
The manager is a single resource. Mount it with `AuiProvider` like any other scope. OAuth (PKCE + RFC 7591 dynamic client registration), bearer, and "no auth" are first-class. Token refresh runs inside the MCP SDK on 401; this package mediates persistence and the redirect step.
|
|
26
26
|
|
|
27
|
+
<Callout type="info">
|
|
28
|
+
The [2026-07-28 spec revision](https://modelcontextprotocol.io/specification/2026-07-28/changelog) deprecates RFC 7591 dynamic client registration in favor of [Client ID Metadata Documents](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/client-registration#client-id-metadata-documents), which clients should prefer over DCR when the authorization server advertises `client_id_metadata_document_supported`. Dynamic client registration remains available for backwards compatibility with authorization servers that do not support CIMD, and the spec's deprecation policy sets a minimum twelve-month window before removal, so the flow described here keeps working. Against a CIMD-only authorization server that exposes no `registration_endpoint`, supply a pre-registered [`clientId`](#auth) instead.
|
|
29
|
+
</Callout>
|
|
30
|
+
|
|
27
31
|
## Setup
|
|
28
32
|
|
|
29
33
|
<Steps>
|
|
@@ -341,7 +345,7 @@ Three modes, declared per-connector or per-custom-record:
|
|
|
341
345
|
}
|
|
342
346
|
```
|
|
343
347
|
|
|
344
|
-
The OAuth provider implements the MCP SDK's `OAuthClientProvider`. The SDK handles discovery (RFC 8414), DCR (RFC 7591), PKCE, token exchange, and refresh; this package mediates `MCPStorage` reads/writes and the redirect step. The server id is embedded in the OAuth `state` parameter so a single `/mcp/callback` route knows which server to complete.
|
|
348
|
+
The OAuth provider implements the MCP SDK's `OAuthClientProvider`. The SDK handles discovery (RFC 8414), DCR (RFC 7591 — [deprecated in favor of CIMD](#how-it-works) but still supported), PKCE, token exchange, and refresh; this package mediates `MCPStorage` reads/writes and the redirect step. The server id is embedded in the OAuth `state` parameter so a single `/mcp/callback` route knows which server to complete.
|
|
345
349
|
|
|
346
350
|
## State & methods
|
|
347
351
|
|
|
@@ -7,6 +7,11 @@ platforms: ["react"]
|
|
|
7
7
|
import { AttachmentSample } from "@/components/docs/samples/attachment";
|
|
8
8
|
import * as AttachmentRadixSamples from "@/components/docs/samples/attachment.radix";
|
|
9
9
|
import { Flavored, FlavorSwitcher } from "@/components/docs/contexts/flavor.server";
|
|
10
|
+
import { PreviewCode } from "@/components/docs/preview-code.server";
|
|
11
|
+
import { AttachmentComposerSample } from "@/components/docs/samples/attachment/composer-attachments";
|
|
12
|
+
import * as AttachmentComposerRadixSample from "@/components/docs/samples/attachment/composer-attachments.radix";
|
|
13
|
+
import { AttachmentMessageContextSample } from "@/components/docs/samples/attachment/message-attachments";
|
|
14
|
+
import * as AttachmentMessageRadixSample from "@/components/docs/samples/attachment/message-attachments.radix";
|
|
10
15
|
|
|
11
16
|
<FlavorSwitcher />
|
|
12
17
|
|
|
@@ -35,6 +40,8 @@ This adds a `/components/assistant-ui/attachment.tsx` file to your project, whic
|
|
|
35
40
|
|
|
36
41
|
### Use in your application
|
|
37
42
|
|
|
43
|
+
Add `ComposerAttachments` and `ComposerAddAttachment` to your composer:
|
|
44
|
+
|
|
38
45
|
```tsx title="/components/assistant-ui/thread.tsx" {1-4,9-10}
|
|
39
46
|
import {
|
|
40
47
|
ComposerAttachments,
|
|
@@ -59,6 +66,8 @@ const Composer: FC = () => {
|
|
|
59
66
|
};
|
|
60
67
|
```
|
|
61
68
|
|
|
69
|
+
Add `UserMessageAttachments` to your user message:
|
|
70
|
+
|
|
62
71
|
```tsx title="/components/assistant-ui/thread.tsx" {1,8}
|
|
63
72
|
import { UserMessageAttachments } from "@/components/assistant-ui/attachment";
|
|
64
73
|
|
|
@@ -82,6 +91,24 @@ const UserMessage: FC = () => {
|
|
|
82
91
|
</Step>
|
|
83
92
|
</Steps>
|
|
84
93
|
|
|
94
|
+
## Examples
|
|
95
|
+
|
|
96
|
+
### Composer
|
|
97
|
+
|
|
98
|
+
In the composer, each attachment tile shows a remove button that deletes the attachment from the composer. Use the plus button to add your own files.
|
|
99
|
+
|
|
100
|
+
<PreviewCode file="components/docs/samples/attachment/composer-attachments" name="ComposerWithAttachments" base={<AttachmentComposerSample />}>
|
|
101
|
+
<AttachmentComposerRadixSample.AttachmentComposerSample />
|
|
102
|
+
</PreviewCode>
|
|
103
|
+
|
|
104
|
+
### User Message
|
|
105
|
+
|
|
106
|
+
Message attachments are read-only. The same tile in a sent user message does not show a remove button.
|
|
107
|
+
|
|
108
|
+
<PreviewCode file="components/docs/samples/attachment/message-attachments" name="UserMessageWithAttachments" base={<AttachmentMessageContextSample />}>
|
|
109
|
+
<AttachmentMessageRadixSample.AttachmentMessageContextSample />
|
|
110
|
+
</PreviewCode>
|
|
111
|
+
|
|
85
112
|
## API Reference
|
|
86
113
|
|
|
87
114
|
### Composer Attachments
|
|
@@ -22,7 +22,7 @@ import { FileSample } from "@/components/docs/samples/file";
|
|
|
22
22
|
|
|
23
23
|
### Use in your application
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
The shipped `Thread` component renders `file` parts through `File` by default, in both assistant and user messages. In a custom thread, pass `File` to `MessagePrimitive.Parts`:
|
|
26
26
|
|
|
27
27
|
```tsx title="/components/assistant-ui/thread.tsx" {1,8}
|
|
28
28
|
import { File } from "@/components/assistant-ui/file";
|
|
@@ -22,7 +22,7 @@ import { ImageSample } from "@/components/docs/samples/image";
|
|
|
22
22
|
|
|
23
23
|
### Use in your application
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
The shipped `Thread` component renders `image` parts through `Image` by default, in both assistant and user messages. In a custom thread, pass `Image` to `MessagePrimitive.Parts`:
|
|
26
26
|
|
|
27
27
|
```tsx title="/components/assistant-ui/thread.tsx" {1,8}
|
|
28
28
|
import { Image } from "@/components/assistant-ui/image";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/mcp-docs-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "MCP server for assistant-ui documentation and examples",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@modelcontextprotocol/core": "^2.0.0",
|
|
41
|
-
"@types/node": "^26.
|
|
42
|
-
"tsx": "^4.23.
|
|
41
|
+
"@types/node": "^26.2.0",
|
|
42
|
+
"tsx": "^4.23.12",
|
|
43
43
|
"vitest": "^4.1.10",
|
|
44
|
-
"@assistant-ui/x-buildutils": "0.0.
|
|
44
|
+
"@assistant-ui/x-buildutils": "0.0.23"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public",
|