@assistant-ui/mcp-docs-server 0.1.22 → 0.1.23

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 (74) hide show
  1. package/.docs/organized/code-examples/waterfall.md +801 -0
  2. package/.docs/organized/code-examples/with-ag-ui.md +38 -26
  3. package/.docs/organized/code-examples/with-ai-sdk-v6.md +38 -28
  4. package/.docs/organized/code-examples/with-artifacts.md +467 -0
  5. package/.docs/organized/code-examples/with-assistant-transport.md +31 -24
  6. package/.docs/organized/code-examples/with-chain-of-thought.md +41 -32
  7. package/.docs/organized/code-examples/with-cloud-standalone.md +675 -0
  8. package/.docs/organized/code-examples/with-cloud.md +34 -27
  9. package/.docs/organized/code-examples/with-custom-thread-list.md +34 -27
  10. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +41 -30
  11. package/.docs/organized/code-examples/with-expo.md +2031 -0
  12. package/.docs/organized/code-examples/with-external-store.md +32 -25
  13. package/.docs/organized/code-examples/with-ffmpeg.md +31 -27
  14. package/.docs/organized/code-examples/with-langgraph.md +96 -38
  15. package/.docs/organized/code-examples/with-parent-id-grouping.md +32 -25
  16. package/.docs/organized/code-examples/with-react-hook-form.md +63 -58
  17. package/.docs/organized/code-examples/with-react-router.md +38 -30
  18. package/.docs/organized/code-examples/with-store.md +16 -24
  19. package/.docs/organized/code-examples/with-tanstack.md +36 -26
  20. package/.docs/organized/code-examples/with-tap-runtime.md +10 -24
  21. package/.docs/raw/docs/(docs)/cli.mdx +13 -6
  22. package/.docs/raw/docs/(docs)/guides/attachments.mdx +26 -3
  23. package/.docs/raw/docs/(docs)/guides/chain-of-thought.mdx +5 -5
  24. package/.docs/raw/docs/(docs)/guides/context-api.mdx +53 -52
  25. package/.docs/raw/docs/(docs)/guides/dictation.mdx +0 -2
  26. package/.docs/raw/docs/(docs)/guides/message-timing.mdx +169 -0
  27. package/.docs/raw/docs/(docs)/guides/quoting.mdx +327 -0
  28. package/.docs/raw/docs/(docs)/guides/speech.mdx +0 -1
  29. package/.docs/raw/docs/(docs)/index.mdx +12 -2
  30. package/.docs/raw/docs/(docs)/installation.mdx +8 -2
  31. package/.docs/raw/docs/(docs)/llm.mdx +9 -7
  32. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +1 -1
  33. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +2 -2
  34. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +27 -27
  35. package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +60 -0
  36. package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +78 -4
  37. package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +32 -0
  38. package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +61 -0
  39. package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +1 -1
  40. package/.docs/raw/docs/(reference)/legacy/styled/assistant-modal.mdx +1 -6
  41. package/.docs/raw/docs/(reference)/legacy/styled/decomposition.mdx +2 -2
  42. package/.docs/raw/docs/(reference)/legacy/styled/markdown.mdx +1 -6
  43. package/.docs/raw/docs/(reference)/legacy/styled/thread.mdx +1 -5
  44. package/.docs/raw/docs/(reference)/migrations/v0-12.mdx +17 -17
  45. package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +205 -0
  46. package/.docs/raw/docs/cloud/ai-sdk.mdx +292 -0
  47. package/.docs/raw/docs/cloud/authorization.mdx +178 -79
  48. package/.docs/raw/docs/cloud/{persistence/langgraph.mdx → langgraph.mdx} +2 -2
  49. package/.docs/raw/docs/cloud/overview.mdx +29 -39
  50. package/.docs/raw/docs/react-native/adapters.mdx +118 -0
  51. package/.docs/raw/docs/react-native/custom-backend.mdx +210 -0
  52. package/.docs/raw/docs/react-native/hooks.mdx +364 -0
  53. package/.docs/raw/docs/react-native/index.mdx +332 -0
  54. package/.docs/raw/docs/react-native/primitives.mdx +653 -0
  55. package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +7 -15
  56. package/.docs/raw/docs/runtimes/assistant-transport.mdx +103 -0
  57. package/.docs/raw/docs/runtimes/custom/external-store.mdx +25 -2
  58. package/.docs/raw/docs/runtimes/data-stream.mdx +1 -3
  59. package/.docs/raw/docs/runtimes/langgraph/index.mdx +113 -9
  60. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +1 -4
  61. package/.docs/raw/docs/ui/attachment.mdx +4 -2
  62. package/.docs/raw/docs/ui/message-timing.mdx +92 -0
  63. package/.docs/raw/docs/ui/part-grouping.mdx +1 -1
  64. package/.docs/raw/docs/ui/reasoning.mdx +4 -4
  65. package/.docs/raw/docs/ui/scrollbar.mdx +2 -2
  66. package/.docs/raw/docs/ui/syntax-highlighting.mdx +55 -50
  67. package/.docs/raw/docs/ui/thread.mdx +16 -9
  68. package/dist/index.d.ts +1 -1
  69. package/dist/index.d.ts.map +1 -1
  70. package/package.json +3 -3
  71. package/src/tools/tests/integration.test.ts +2 -2
  72. package/src/tools/tests/json-parsing.test.ts +1 -1
  73. package/src/tools/tests/mcp-protocol.test.ts +1 -3
  74. 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
- <Thread />
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.563.0",
426
+ "lucide-react": "^0.575.0",
421
427
  "next": "^16.1.6",
422
428
  "react": "^19.2.4",
423
429
  "react-dom": "^19.2.4",
424
- "tailwind-merge": "^3.4.0",
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.18",
430
- "@types/node": "^25.2.1",
431
- "@types/react": "^19.2.13",
435
+ "@tailwindcss/postcss": "^4.2.1",
436
+ "@types/node": "^25.3.0",
437
+ "@types/react": "^19.2.14",
432
438
  "@types/react-dom": "^19.2.3",
433
439
  "postcss": "^8.5.6",
434
- "tailwindcss": "^4.1.18",
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={({ chainOfThought }) => chainOfThought.collapsed}>
309
+ <AuiIf condition={(s) => s.chainOfThought.collapsed}>
310
310
  <ChevronRightIcon className="size-4 shrink-0" />
311
311
  </AuiIf>
312
- <AuiIf condition={({ chainOfThought }) => !chainOfThought.collapsed}>
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={({ chainOfThought }) => !chainOfThought.collapsed}>
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(({ part }) => part.type);
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={({ thread }) => !thread.isRunning}>
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={({ thread }) => thread.isRunning}>
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
- <MyThread />
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.25",
552
+ "@ai-sdk/openai": "^3.0.33",
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
- "@radix-ui/react-avatar": "^1.1.11",
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.98",
550
558
  "class-variance-authority": "^0.7.1",
551
559
  "clsx": "^2.1.1",
552
- "lucide-react": "^0.563.0",
560
+ "lucide-react": "^0.575.0",
553
561
  "next": "^16.1.6",
554
562
  "react": "^19.2.4",
555
563
  "react-dom": "^19.2.4",
556
- "tailwind-merge": "^3.4.0",
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.18",
562
- "@types/node": "^25.2.1",
563
- "@types/react": "^19.2.13",
569
+ "@tailwindcss/postcss": "^4.2.1",
570
+ "@types/node": "^25.3.0",
571
+ "@types/react": "^19.2.14",
564
572
  "@types/react-dom": "^19.2.3",
565
573
  "postcss": "^8.5.6",
566
- "tailwindcss": "^4.1.18",
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/*"],