@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
|
@@ -106,10 +106,10 @@ export default function Home() {
|
|
|
106
106
|
|
|
107
107
|
import { useState } from "react";
|
|
108
108
|
import {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
useAui,
|
|
110
|
+
AuiProvider,
|
|
111
|
+
useAuiState,
|
|
112
|
+
useAuiEvent,
|
|
113
113
|
} from "@assistant-ui/store";
|
|
114
114
|
import { FooList, FooListResource } from "./store/foo-store";
|
|
115
115
|
|
|
@@ -117,12 +117,12 @@ import { FooList, FooListResource } from "./store/foo-store";
|
|
|
117
117
|
* Single Foo component - displays and allows editing a single foo
|
|
118
118
|
*/
|
|
119
119
|
const Foo = () => {
|
|
120
|
-
const aui =
|
|
121
|
-
const fooId =
|
|
122
|
-
const fooBar =
|
|
120
|
+
const aui = useAui();
|
|
121
|
+
const fooId = useAuiState(({ foo }) => foo.id);
|
|
122
|
+
const fooBar = useAuiState(({ foo }) => foo.bar);
|
|
123
123
|
|
|
124
124
|
// Each foo logs its own events - only receives events from THIS foo instance
|
|
125
|
-
|
|
125
|
+
useAuiEvent("foo.updated", (payload) => {
|
|
126
126
|
console.log(`[${fooId}] Updated to: ${payload.newValue}`);
|
|
127
127
|
});
|
|
128
128
|
|
|
@@ -167,7 +167,7 @@ const Foo = () => {
|
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
const FooListLength = () => {
|
|
170
|
-
const fooListLength =
|
|
170
|
+
const fooListLength = useAuiState(({ fooList }) => fooList.foos.length);
|
|
171
171
|
return (
|
|
172
172
|
<span className="text-gray-500 dark:text-gray-400">
|
|
173
173
|
({fooListLength} items)
|
|
@@ -176,7 +176,7 @@ const FooListLength = () => {
|
|
|
176
176
|
};
|
|
177
177
|
|
|
178
178
|
const AddFooButton = () => {
|
|
179
|
-
const aui =
|
|
179
|
+
const aui = useAui();
|
|
180
180
|
return (
|
|
181
181
|
<button
|
|
182
182
|
onClick={() => aui.fooList().addFoo()}
|
|
@@ -202,7 +202,7 @@ const EventLog = () => {
|
|
|
202
202
|
const [logs, setLogs] = useState<EventLogEntry[]>([]);
|
|
203
203
|
|
|
204
204
|
// Subscribe to all events using the wildcard selector
|
|
205
|
-
|
|
205
|
+
useAuiEvent("*", (data) => {
|
|
206
206
|
setLogs((prev) => [
|
|
207
207
|
{
|
|
208
208
|
id: ++idCounter,
|
|
@@ -254,12 +254,12 @@ const EventLog = () => {
|
|
|
254
254
|
* but we're explicitly passing it here for clarity in the example.
|
|
255
255
|
*/
|
|
256
256
|
export const ExampleApp = () => {
|
|
257
|
-
const aui =
|
|
257
|
+
const aui = useAui({
|
|
258
258
|
fooList: FooListResource({ initialValues: true }),
|
|
259
259
|
});
|
|
260
260
|
|
|
261
261
|
return (
|
|
262
|
-
<
|
|
262
|
+
<AuiProvider value={aui}>
|
|
263
263
|
<div className="space-y-6">
|
|
264
264
|
<div className="rounded-lg border border-gray-200 bg-white p-4 shadow-sm dark:border-gray-700 dark:bg-gray-800">
|
|
265
265
|
<div className="flex items-center justify-between">
|
|
@@ -277,7 +277,7 @@ export const ExampleApp = () => {
|
|
|
277
277
|
</div>
|
|
278
278
|
<EventLog />
|
|
279
279
|
</div>
|
|
280
|
-
</
|
|
280
|
+
</AuiProvider>
|
|
281
281
|
);
|
|
282
282
|
};
|
|
283
283
|
|
|
@@ -286,6 +286,8 @@ export const ExampleApp = () => {
|
|
|
286
286
|
## lib/store/foo-scope.ts
|
|
287
287
|
|
|
288
288
|
```typescript
|
|
289
|
+
import "@assistant-ui/store";
|
|
290
|
+
|
|
289
291
|
type FooState = { id: string; bar: string };
|
|
290
292
|
type FooMethods = {
|
|
291
293
|
getState: () => FooState;
|
|
@@ -327,8 +329,6 @@ declare module "@assistant-ui/store" {
|
|
|
327
329
|
}
|
|
328
330
|
}
|
|
329
331
|
|
|
330
|
-
export default {};
|
|
331
|
-
|
|
332
332
|
```
|
|
333
333
|
|
|
334
334
|
## lib/store/foo-store.tsx
|
|
@@ -341,11 +341,11 @@ import "./foo-scope";
|
|
|
341
341
|
import React from "react";
|
|
342
342
|
import { resource, tapMemo, tapState } from "@assistant-ui/tap";
|
|
343
343
|
import {
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
useAui,
|
|
345
|
+
AuiProvider,
|
|
346
346
|
tapClientList,
|
|
347
347
|
Derived,
|
|
348
|
-
|
|
348
|
+
useAuiState,
|
|
349
349
|
tapAssistantEmit,
|
|
350
350
|
type ClientOutput,
|
|
351
351
|
} from "@assistant-ui/store";
|
|
@@ -425,7 +425,7 @@ export const FooProvider = ({
|
|
|
425
425
|
index: number;
|
|
426
426
|
children: React.ReactNode;
|
|
427
427
|
}) => {
|
|
428
|
-
const aui =
|
|
428
|
+
const aui = useAui({
|
|
429
429
|
foo: Derived({
|
|
430
430
|
source: "fooList",
|
|
431
431
|
query: { index: index },
|
|
@@ -433,7 +433,7 @@ export const FooProvider = ({
|
|
|
433
433
|
}),
|
|
434
434
|
});
|
|
435
435
|
|
|
436
|
-
return <
|
|
436
|
+
return <AuiProvider value={aui}>{children}</AuiProvider>;
|
|
437
437
|
};
|
|
438
438
|
|
|
439
439
|
export const FooList = ({
|
|
@@ -441,7 +441,7 @@ export const FooList = ({
|
|
|
441
441
|
}: {
|
|
442
442
|
components: { Foo: React.ComponentType };
|
|
443
443
|
}) => {
|
|
444
|
-
const fooListState =
|
|
444
|
+
const fooListState = useAuiState(({ fooList }) => fooList.foos.length);
|
|
445
445
|
|
|
446
446
|
return (
|
|
447
447
|
<>
|
|
@@ -485,15 +485,15 @@ export default nextConfig;
|
|
|
485
485
|
"dependencies": {
|
|
486
486
|
"@assistant-ui/store": "workspace:*",
|
|
487
487
|
"@assistant-ui/tap": "workspace:*",
|
|
488
|
-
"next": "^16.1.
|
|
489
|
-
"react": "^19.2.
|
|
490
|
-
"react-dom": "^19.2.
|
|
488
|
+
"next": "^16.1.6",
|
|
489
|
+
"react": "^19.2.4",
|
|
490
|
+
"react-dom": "^19.2.4"
|
|
491
491
|
},
|
|
492
492
|
"devDependencies": {
|
|
493
493
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
494
494
|
"@tailwindcss/postcss": "^4.1.18",
|
|
495
|
-
"@types/node": "^25.0
|
|
496
|
-
"@types/react": "^19.2.
|
|
495
|
+
"@types/node": "^25.2.0",
|
|
496
|
+
"@types/react": "^19.2.10",
|
|
497
497
|
"@types/react-dom": "^19.2.3",
|
|
498
498
|
"postcss": "^8.5.6",
|
|
499
499
|
"tailwindcss": "^4.1.18",
|
|
@@ -604,14 +604,14 @@ const FooListResource = resource(
|
|
|
604
604
|
|
|
605
605
|
```typescript
|
|
606
606
|
const FooProvider = ({ index, children }) => {
|
|
607
|
-
const aui =
|
|
607
|
+
const aui = useAui({
|
|
608
608
|
foo: Derived({
|
|
609
609
|
source: "fooList",
|
|
610
610
|
query: { index },
|
|
611
611
|
get: (aui) => aui.fooList().foo({ index }),
|
|
612
612
|
}),
|
|
613
613
|
});
|
|
614
|
-
return <
|
|
614
|
+
return <AuiProvider value={aui}>{children}</AuiProvider>;
|
|
615
615
|
};
|
|
616
616
|
```
|
|
617
617
|
|
|
@@ -619,12 +619,12 @@ const FooProvider = ({ index, children }) => {
|
|
|
619
619
|
|
|
620
620
|
```typescript
|
|
621
621
|
// Subscribe to specific events within a scope
|
|
622
|
-
|
|
622
|
+
useAuiEvent("foo.updated", (payload) => {
|
|
623
623
|
console.log(`Updated to: ${payload.newValue}`);
|
|
624
624
|
});
|
|
625
625
|
|
|
626
626
|
// Subscribe to all events using wildcard
|
|
627
|
-
|
|
627
|
+
useAuiEvent("*", (data) => {
|
|
628
628
|
console.log(data.event, data.payload);
|
|
629
629
|
});
|
|
630
630
|
```
|