@assistant-ui/mcp-docs-server 0.1.22 → 0.1.24
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 +801 -0
- package/.docs/organized/code-examples/with-ag-ui.md +39 -27
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +39 -29
- package/.docs/organized/code-examples/with-artifacts.md +467 -0
- package/.docs/organized/code-examples/with-assistant-transport.md +32 -25
- package/.docs/organized/code-examples/with-chain-of-thought.md +42 -33
- package/.docs/organized/code-examples/with-cloud-standalone.md +674 -0
- package/.docs/organized/code-examples/with-cloud.md +35 -28
- package/.docs/organized/code-examples/with-custom-thread-list.md +35 -28
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +42 -31
- package/.docs/organized/code-examples/with-expo.md +2012 -0
- package/.docs/organized/code-examples/with-external-store.md +32 -26
- package/.docs/organized/code-examples/with-ffmpeg.md +32 -28
- package/.docs/organized/code-examples/with-langgraph.md +97 -39
- package/.docs/organized/code-examples/with-parent-id-grouping.md +33 -26
- package/.docs/organized/code-examples/with-react-hook-form.md +63 -61
- package/.docs/organized/code-examples/with-react-router.md +38 -31
- package/.docs/organized/code-examples/with-store.md +17 -25
- package/.docs/organized/code-examples/with-tanstack.md +36 -26
- package/.docs/organized/code-examples/with-tap-runtime.md +11 -25
- package/.docs/raw/docs/(docs)/cli.mdx +13 -6
- package/.docs/raw/docs/(docs)/guides/attachments.mdx +26 -3
- package/.docs/raw/docs/(docs)/guides/chain-of-thought.mdx +5 -5
- package/.docs/raw/docs/(docs)/guides/context-api.mdx +53 -52
- package/.docs/raw/docs/(docs)/guides/dictation.mdx +0 -2
- package/.docs/raw/docs/(docs)/guides/message-timing.mdx +169 -0
- package/.docs/raw/docs/(docs)/guides/quoting.mdx +327 -0
- package/.docs/raw/docs/(docs)/guides/speech.mdx +0 -1
- package/.docs/raw/docs/(docs)/index.mdx +12 -2
- package/.docs/raw/docs/(docs)/installation.mdx +8 -2
- package/.docs/raw/docs/(docs)/llm.mdx +9 -7
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +1 -1
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +2 -2
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +27 -27
- package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +60 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +78 -4
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +32 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +61 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +1 -1
- package/.docs/raw/docs/(reference)/legacy/styled/assistant-modal.mdx +1 -6
- package/.docs/raw/docs/(reference)/legacy/styled/decomposition.mdx +2 -2
- package/.docs/raw/docs/(reference)/legacy/styled/markdown.mdx +1 -6
- package/.docs/raw/docs/(reference)/legacy/styled/thread.mdx +1 -5
- package/.docs/raw/docs/(reference)/migrations/v0-12.mdx +17 -17
- package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +209 -0
- package/.docs/raw/docs/cloud/ai-sdk.mdx +296 -0
- package/.docs/raw/docs/cloud/authorization.mdx +178 -79
- package/.docs/raw/docs/cloud/{persistence/langgraph.mdx → langgraph.mdx} +2 -2
- package/.docs/raw/docs/cloud/overview.mdx +29 -39
- package/.docs/raw/docs/react-native/adapters.mdx +118 -0
- package/.docs/raw/docs/react-native/custom-backend.mdx +210 -0
- package/.docs/raw/docs/react-native/hooks.mdx +364 -0
- package/.docs/raw/docs/react-native/index.mdx +332 -0
- package/.docs/raw/docs/react-native/primitives.mdx +653 -0
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +60 -15
- package/.docs/raw/docs/runtimes/assistant-transport.mdx +103 -0
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +25 -2
- package/.docs/raw/docs/runtimes/data-stream.mdx +1 -3
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +113 -9
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +1 -4
- package/.docs/raw/docs/ui/attachment.mdx +4 -2
- package/.docs/raw/docs/ui/context-display.mdx +147 -0
- package/.docs/raw/docs/ui/message-timing.mdx +92 -0
- package/.docs/raw/docs/ui/part-grouping.mdx +1 -1
- package/.docs/raw/docs/ui/reasoning.mdx +4 -4
- package/.docs/raw/docs/ui/scrollbar.mdx +2 -2
- package/.docs/raw/docs/ui/syntax-highlighting.mdx +55 -50
- package/.docs/raw/docs/ui/thread.mdx +16 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/tools/tests/integration.test.ts +2 -2
- package/src/tools/tests/json-parsing.test.ts +1 -1
- package/src/tools/tests/mcp-protocol.test.ts +1 -3
- package/.docs/raw/docs/cloud/persistence/ai-sdk.mdx +0 -108
|
@@ -314,13 +314,36 @@ export function MyRuntimeProvider({ children }: MyRuntimeProviderProps) {
|
|
|
314
314
|
"use client";
|
|
315
315
|
|
|
316
316
|
import { Thread } from "@/components/assistant-ui/thread";
|
|
317
|
+
import { useAui, AuiProvider, Suggestions } from "@assistant-ui/react";
|
|
317
318
|
import { MyRuntimeProvider } from "./MyRuntimeProvider";
|
|
318
319
|
|
|
320
|
+
function ThreadWithSuggestions() {
|
|
321
|
+
const aui = useAui({
|
|
322
|
+
suggestions: Suggestions([
|
|
323
|
+
{
|
|
324
|
+
title: "What's the weather",
|
|
325
|
+
label: "in San Francisco?",
|
|
326
|
+
prompt: "What's the weather like in San Francisco today?",
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
title: "Tell me about yourself",
|
|
330
|
+
label: "and your capabilities",
|
|
331
|
+
prompt: "What can you help me with?",
|
|
332
|
+
},
|
|
333
|
+
]),
|
|
334
|
+
});
|
|
335
|
+
return (
|
|
336
|
+
<AuiProvider value={aui}>
|
|
337
|
+
<Thread />
|
|
338
|
+
</AuiProvider>
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
|
|
319
342
|
export default function Home() {
|
|
320
343
|
return (
|
|
321
344
|
<MyRuntimeProvider>
|
|
322
345
|
<div className="h-full">
|
|
323
|
-
<
|
|
346
|
+
<ThreadWithSuggestions />
|
|
324
347
|
</div>
|
|
325
348
|
</MyRuntimeProvider>
|
|
326
349
|
);
|
|
@@ -358,18 +381,6 @@ export default function Home() {
|
|
|
358
381
|
|
|
359
382
|
```
|
|
360
383
|
|
|
361
|
-
## lib/utils.ts
|
|
362
|
-
|
|
363
|
-
```typescript
|
|
364
|
-
import { clsx, type ClassValue } from "clsx";
|
|
365
|
-
import { twMerge } from "tailwind-merge";
|
|
366
|
-
|
|
367
|
-
export function cn(...inputs: ClassValue[]) {
|
|
368
|
-
return twMerge(clsx(inputs));
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
```
|
|
372
|
-
|
|
373
384
|
## next.config.js
|
|
374
385
|
|
|
375
386
|
```javascript
|
|
@@ -410,28 +421,23 @@ export default nextConfig;
|
|
|
410
421
|
"@assistant-ui/react-langgraph": "workspace:*",
|
|
411
422
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
412
423
|
"@assistant-ui/ui": "workspace:*",
|
|
413
|
-
"@radix-ui/react-avatar": "^1.1.11",
|
|
414
|
-
"@radix-ui/react-collapsible": "^1.1.12",
|
|
415
|
-
"@radix-ui/react-dialog": "^1.1.15",
|
|
416
|
-
"@radix-ui/react-slot": "^1.2.4",
|
|
417
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
418
424
|
"class-variance-authority": "^0.7.1",
|
|
419
425
|
"clsx": "^2.1.1",
|
|
420
|
-
"lucide-react": "^0.
|
|
426
|
+
"lucide-react": "^0.576.0",
|
|
421
427
|
"next": "^16.1.6",
|
|
422
428
|
"react": "^19.2.4",
|
|
423
429
|
"react-dom": "^19.2.4",
|
|
424
|
-
"tailwind-merge": "^3.
|
|
430
|
+
"tailwind-merge": "^3.5.0",
|
|
425
431
|
"zod": "^4.3.6"
|
|
426
432
|
},
|
|
427
433
|
"devDependencies": {
|
|
428
434
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
429
|
-
"@tailwindcss/postcss": "^4.1
|
|
430
|
-
"@types/node": "^25.
|
|
431
|
-
"@types/react": "^19.2.
|
|
435
|
+
"@tailwindcss/postcss": "^4.2.1",
|
|
436
|
+
"@types/node": "^25.3.3",
|
|
437
|
+
"@types/react": "^19.2.14",
|
|
432
438
|
"@types/react-dom": "^19.2.3",
|
|
433
|
-
"postcss": "^8.5.
|
|
434
|
-
"tailwindcss": "^4.1
|
|
439
|
+
"postcss": "^8.5.8",
|
|
440
|
+
"tailwindcss": "^4.2.1",
|
|
435
441
|
"tw-animate-css": "^1.4.0",
|
|
436
442
|
"typescript": "^5.9.3"
|
|
437
443
|
}
|
|
@@ -531,6 +537,7 @@ Your backend server should:
|
|
|
531
537
|
"../../packages/ui/src/components/assistant-ui/*"
|
|
532
538
|
],
|
|
533
539
|
"@/components/ui/*": ["../../packages/ui/src/components/ui/*"],
|
|
540
|
+
"@/lib/utils": ["../../packages/ui/src/lib/utils"],
|
|
534
541
|
"@assistant-ui/ui/*": ["../../packages/ui/src/*"]
|
|
535
542
|
}
|
|
536
543
|
},
|
|
@@ -306,15 +306,15 @@ const ChainOfThought: FC = () => {
|
|
|
306
306
|
return (
|
|
307
307
|
<ChainOfThoughtPrimitive.Root className="my-2 rounded-lg border">
|
|
308
308
|
<ChainOfThoughtPrimitive.AccordionTrigger className="flex w-full cursor-pointer items-center gap-2 px-4 py-2 font-medium text-sm hover:bg-muted/50">
|
|
309
|
-
<AuiIf condition={(
|
|
309
|
+
<AuiIf condition={(s) => s.chainOfThought.collapsed}>
|
|
310
310
|
<ChevronRightIcon className="size-4 shrink-0" />
|
|
311
311
|
</AuiIf>
|
|
312
|
-
<AuiIf condition={(
|
|
312
|
+
<AuiIf condition={(s) => !s.chainOfThought.collapsed}>
|
|
313
313
|
<ChevronDownIcon className="size-4 shrink-0" />
|
|
314
314
|
</AuiIf>
|
|
315
315
|
Thinking
|
|
316
316
|
</ChainOfThoughtPrimitive.AccordionTrigger>
|
|
317
|
-
<AuiIf condition={(
|
|
317
|
+
<AuiIf condition={(s) => !s.chainOfThought.collapsed}>
|
|
318
318
|
<ChainOfThoughtPrimitive.Parts
|
|
319
319
|
components={{
|
|
320
320
|
Reasoning,
|
|
@@ -328,7 +328,7 @@ const ChainOfThought: FC = () => {
|
|
|
328
328
|
};
|
|
329
329
|
|
|
330
330
|
const PartLayout: FC<PropsWithChildren> = ({ children }) => {
|
|
331
|
-
const partType = useAuiState((
|
|
331
|
+
const partType = useAuiState((s) => s.part.type);
|
|
332
332
|
const [open, setOpen] = useState(true);
|
|
333
333
|
|
|
334
334
|
const label = partType === "reasoning" ? "Thinking" : "Taking action";
|
|
@@ -370,7 +370,7 @@ const Composer: FC = () => {
|
|
|
370
370
|
autoFocus
|
|
371
371
|
/>
|
|
372
372
|
<div className="relative mx-2 mb-2 flex items-center justify-end">
|
|
373
|
-
<AuiIf condition={(
|
|
373
|
+
<AuiIf condition={(s) => !s.thread.isRunning}>
|
|
374
374
|
<ComposerPrimitive.Send asChild>
|
|
375
375
|
<TooltipIconButton
|
|
376
376
|
tooltip="Send"
|
|
@@ -383,7 +383,7 @@ const Composer: FC = () => {
|
|
|
383
383
|
</TooltipIconButton>
|
|
384
384
|
</ComposerPrimitive.Send>
|
|
385
385
|
</AuiIf>
|
|
386
|
-
<AuiIf condition={(
|
|
386
|
+
<AuiIf condition={(s) => s.thread.isRunning}>
|
|
387
387
|
<ComposerPrimitive.Cancel asChild>
|
|
388
388
|
<Button
|
|
389
389
|
type="button"
|
|
@@ -410,6 +410,9 @@ const Composer: FC = () => {
|
|
|
410
410
|
import {
|
|
411
411
|
AssistantRuntimeProvider,
|
|
412
412
|
makeAssistantTool,
|
|
413
|
+
useAui,
|
|
414
|
+
AuiProvider,
|
|
415
|
+
Suggestions,
|
|
413
416
|
} from "@assistant-ui/react";
|
|
414
417
|
import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
|
|
415
418
|
import { z } from "zod";
|
|
@@ -451,6 +454,28 @@ const ExecuteJsTool = makeAssistantTool({
|
|
|
451
454
|
),
|
|
452
455
|
});
|
|
453
456
|
|
|
457
|
+
function MyThreadWithSuggestions() {
|
|
458
|
+
const aui = useAui({
|
|
459
|
+
suggestions: Suggestions([
|
|
460
|
+
{
|
|
461
|
+
title: "Calculate Fibonacci(20)",
|
|
462
|
+
label: "step by step with code",
|
|
463
|
+
prompt: "Calculate the 20th Fibonacci number using JavaScript.",
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
title: "What is 2^16?",
|
|
467
|
+
label: "show your reasoning",
|
|
468
|
+
prompt: "What is 2 to the power of 16? Show your work step by step.",
|
|
469
|
+
},
|
|
470
|
+
]),
|
|
471
|
+
});
|
|
472
|
+
return (
|
|
473
|
+
<AuiProvider value={aui}>
|
|
474
|
+
<MyThread />
|
|
475
|
+
</AuiProvider>
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
|
|
454
479
|
export default function Home() {
|
|
455
480
|
const runtime = useChatRuntime({
|
|
456
481
|
sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithApprovalResponses,
|
|
@@ -460,7 +485,7 @@ export default function Home() {
|
|
|
460
485
|
<AssistantRuntimeProvider runtime={runtime}>
|
|
461
486
|
<ExecuteJsTool />
|
|
462
487
|
<div className="h-full">
|
|
463
|
-
<
|
|
488
|
+
<MyThreadWithSuggestions />
|
|
464
489
|
</div>
|
|
465
490
|
</AssistantRuntimeProvider>
|
|
466
491
|
);
|
|
@@ -498,18 +523,6 @@ export default function Home() {
|
|
|
498
523
|
|
|
499
524
|
```
|
|
500
525
|
|
|
501
|
-
## lib/utils.ts
|
|
502
|
-
|
|
503
|
-
```typescript
|
|
504
|
-
import { clsx, type ClassValue } from "clsx";
|
|
505
|
-
import { twMerge } from "tailwind-merge";
|
|
506
|
-
|
|
507
|
-
export function cn(...inputs: ClassValue[]) {
|
|
508
|
-
return twMerge(clsx(inputs));
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
```
|
|
512
|
-
|
|
513
526
|
## next.config.js
|
|
514
527
|
|
|
515
528
|
```javascript
|
|
@@ -536,34 +549,29 @@ export default nextConfig;
|
|
|
536
549
|
"start": "next start"
|
|
537
550
|
},
|
|
538
551
|
"dependencies": {
|
|
539
|
-
"@ai-sdk/openai": "^3.0.
|
|
552
|
+
"@ai-sdk/openai": "^3.0.39",
|
|
540
553
|
"@assistant-ui/react": "workspace:*",
|
|
541
554
|
"@assistant-ui/react-ai-sdk": "workspace:*",
|
|
542
555
|
"@assistant-ui/react-markdown": "workspace:*",
|
|
543
556
|
"@assistant-ui/ui": "workspace:*",
|
|
544
|
-
"
|
|
545
|
-
"@radix-ui/react-collapsible": "^1.1.12",
|
|
546
|
-
"@radix-ui/react-dialog": "^1.1.15",
|
|
547
|
-
"@radix-ui/react-slot": "^1.2.4",
|
|
548
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
549
|
-
"ai": "^6.0.73",
|
|
557
|
+
"ai": "^6.0.111",
|
|
550
558
|
"class-variance-authority": "^0.7.1",
|
|
551
559
|
"clsx": "^2.1.1",
|
|
552
|
-
"lucide-react": "^0.
|
|
560
|
+
"lucide-react": "^0.576.0",
|
|
553
561
|
"next": "^16.1.6",
|
|
554
562
|
"react": "^19.2.4",
|
|
555
563
|
"react-dom": "^19.2.4",
|
|
556
|
-
"tailwind-merge": "^3.
|
|
564
|
+
"tailwind-merge": "^3.5.0",
|
|
557
565
|
"zod": "^4.3.6"
|
|
558
566
|
},
|
|
559
567
|
"devDependencies": {
|
|
560
568
|
"@assistant-ui/x-buildutils": "workspace:*",
|
|
561
|
-
"@tailwindcss/postcss": "^4.1
|
|
562
|
-
"@types/node": "^25.
|
|
563
|
-
"@types/react": "^19.2.
|
|
569
|
+
"@tailwindcss/postcss": "^4.2.1",
|
|
570
|
+
"@types/node": "^25.3.3",
|
|
571
|
+
"@types/react": "^19.2.14",
|
|
564
572
|
"@types/react-dom": "^19.2.3",
|
|
565
|
-
"postcss": "^8.5.
|
|
566
|
-
"tailwindcss": "^4.1
|
|
573
|
+
"postcss": "^8.5.8",
|
|
574
|
+
"tailwindcss": "^4.2.1",
|
|
567
575
|
"tw-animate-css": "^1.4.0",
|
|
568
576
|
"typescript": "^5.9.3"
|
|
569
577
|
}
|
|
@@ -583,6 +591,7 @@ export default nextConfig;
|
|
|
583
591
|
"../../packages/ui/src/components/assistant-ui/*"
|
|
584
592
|
],
|
|
585
593
|
"@/components/ui/*": ["../../packages/ui/src/components/ui/*"],
|
|
594
|
+
"@/lib/utils": ["../../packages/ui/src/lib/utils"],
|
|
586
595
|
"@assistant-ui/ui/*": ["../../packages/ui/src/*"],
|
|
587
596
|
"@assistant-ui/*": ["../../packages/*/src"],
|
|
588
597
|
"@assistant-ui/react/*": ["../../packages/react/src/*"],
|