@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
@@ -223,11 +223,34 @@ export function MyRuntimeProvider({
223
223
  "use client";
224
224
 
225
225
  import { Thread } from "@/components/assistant-ui/thread";
226
+ import { useAui, AuiProvider, Suggestions } from "@assistant-ui/react";
227
+
228
+ function ThreadWithSuggestions() {
229
+ const aui = useAui({
230
+ suggestions: Suggestions([
231
+ {
232
+ title: "Send a test message",
233
+ label: "to see the external store in action",
234
+ prompt: "Hello! How does the external store work?",
235
+ },
236
+ {
237
+ title: "Tell me a story",
238
+ label: "to generate multiple messages",
239
+ prompt: "Tell me a short story about a robot learning to paint.",
240
+ },
241
+ ]),
242
+ });
243
+ return (
244
+ <AuiProvider value={aui}>
245
+ <Thread />
246
+ </AuiProvider>
247
+ );
248
+ }
226
249
 
227
250
  export default function Home() {
228
251
  return (
229
252
  <main className="h-dvh">
230
- <Thread />
253
+ <ThreadWithSuggestions />
231
254
  </main>
232
255
  );
233
256
  }
@@ -264,18 +287,6 @@ export default function Home() {
264
287
 
265
288
  ```
266
289
 
267
- ## lib/utils.ts
268
-
269
- ```typescript
270
- import { clsx, type ClassValue } from "clsx";
271
- import { twMerge } from "tailwind-merge";
272
-
273
- export function cn(...inputs: ClassValue[]) {
274
- return twMerge(clsx(inputs));
275
- }
276
-
277
- ```
278
-
279
290
  ## next.config.ts
280
291
 
281
292
  ```typescript
@@ -303,31 +314,26 @@ export default nextConfig;
303
314
  "start": "next start"
304
315
  },
305
316
  "dependencies": {
306
- "@ai-sdk/openai": "^3.0.25",
317
+ "@ai-sdk/openai": "^3.0.33",
307
318
  "@assistant-ui/react": "workspace:*",
308
319
  "@assistant-ui/react-markdown": "workspace:*",
309
320
  "@assistant-ui/ui": "workspace:*",
310
- "@radix-ui/react-avatar": "^1.1.11",
311
- "@radix-ui/react-collapsible": "^1.1.12",
312
- "@radix-ui/react-dialog": "^1.1.15",
313
- "@radix-ui/react-slot": "^1.2.4",
314
- "@radix-ui/react-tooltip": "^1.2.8",
315
321
  "class-variance-authority": "^0.7.1",
316
322
  "clsx": "^2.1.1",
317
- "lucide-react": "^0.563.0",
323
+ "lucide-react": "^0.575.0",
318
324
  "next": "^16.1.6",
319
325
  "react": "^19.2.4",
320
326
  "react-dom": "^19.2.4",
321
- "tailwind-merge": "^3.4.0"
327
+ "tailwind-merge": "^3.5.0"
322
328
  },
323
329
  "devDependencies": {
324
330
  "@assistant-ui/x-buildutils": "workspace:*",
325
- "@tailwindcss/postcss": "^4.1.18",
326
- "@types/node": "^25.2.1",
327
- "@types/react": "^19.2.13",
331
+ "@tailwindcss/postcss": "^4.2.1",
332
+ "@types/node": "^25.3.0",
333
+ "@types/react": "^19.2.14",
328
334
  "@types/react-dom": "^19.2.3",
329
335
  "postcss": "^8.5.6",
330
- "tailwindcss": "^4.1.18",
336
+ "tailwindcss": "^4.2.1",
331
337
  "tw-animate-css": "^1.4.0",
332
338
  "typescript": "^5.9.3"
333
339
  }
@@ -391,6 +397,7 @@ npm run dev
391
397
  "../../packages/ui/src/components/assistant-ui/*"
392
398
  ],
393
399
  "@/components/ui/*": ["../../packages/ui/src/components/ui/*"],
400
+ "@/lib/utils": ["../../packages/ui/src/lib/utils"],
394
401
  "@assistant-ui/ui/*": ["../../packages/ui/src/*"]
395
402
  }
396
403
  },
@@ -268,7 +268,10 @@ export default dynamic(() => Promise.resolve(NoSSRWrapper), {
268
268
  import {
269
269
  useAssistantInstructions,
270
270
  useAssistantTool,
271
+ useAui,
271
272
  useAuiState,
273
+ AuiProvider,
274
+ Suggestions,
272
275
  } from "@assistant-ui/react";
273
276
  import { z } from "zod";
274
277
  import { FFmpeg } from "@ffmpeg/ffmpeg";
@@ -417,13 +420,28 @@ const FfmpegTool: FC<{ file: File }> = ({ file }) => {
417
420
 
418
421
  export default function Home() {
419
422
  const [lastFile, setLastFile] = useState<File | null>(null);
420
- const attachments = useAuiState(({ thread }) => thread.composer.attachments);
423
+ const attachments = useAuiState((s) => s.thread.composer.attachments);
421
424
  useEffect(() => {
422
425
  const lastAttachment = attachments[attachments.length - 1];
423
426
  if (!lastAttachment) return;
424
427
  setLastFile(lastAttachment.file!);
425
428
  }, [attachments]);
426
429
 
430
+ const aui = useAui({
431
+ suggestions: Suggestions([
432
+ {
433
+ title: "Convert video to GIF",
434
+ label: "attach a video file first",
435
+ prompt: "Convert my video to an animated GIF.",
436
+ },
437
+ {
438
+ title: "Compress an MP4",
439
+ label: "to reduce file size",
440
+ prompt: "Compress my video file to reduce its size.",
441
+ },
442
+ ]),
443
+ });
444
+
427
445
  return (
428
446
  <div className="flex h-full flex-col">
429
447
  <div className="border-b">
@@ -438,7 +456,9 @@ export default function Home() {
438
456
  )
439
457
  </p>
440
458
  </div>
441
- <Thread />
459
+ <AuiProvider value={aui}>
460
+ <Thread />
461
+ </AuiProvider>
442
462
  {lastFile && <FfmpegTool file={lastFile} />}
443
463
  </div>
444
464
  );
@@ -476,18 +496,6 @@ export default function Home() {
476
496
 
477
497
  ```
478
498
 
479
- ## lib/utils.ts
480
-
481
- ```typescript
482
- import { type ClassValue, clsx } from "clsx";
483
- import { twMerge } from "tailwind-merge";
484
-
485
- export function cn(...inputs: ClassValue[]) {
486
- return twMerge(clsx(inputs));
487
- }
488
-
489
- ```
490
-
491
499
  ## next.config.ts
492
500
 
493
501
  ```typescript
@@ -515,36 +523,31 @@ export default nextConfig;
515
523
  "start": "next start"
516
524
  },
517
525
  "dependencies": {
518
- "@ai-sdk/openai": "^3.0.25",
526
+ "@ai-sdk/openai": "^3.0.33",
519
527
  "@assistant-ui/react": "workspace:*",
520
528
  "@assistant-ui/react-ai-sdk": "workspace:*",
521
529
  "@assistant-ui/react-markdown": "workspace:*",
522
530
  "@assistant-ui/ui": "workspace:*",
523
531
  "@ffmpeg/ffmpeg": "^0.12.15",
524
532
  "@ffmpeg/util": "^0.12.2",
525
- "@radix-ui/react-avatar": "^1.1.11",
526
- "@radix-ui/react-collapsible": "^1.1.12",
527
- "@radix-ui/react-dialog": "^1.1.15",
528
- "@radix-ui/react-slot": "^1.2.4",
529
- "@radix-ui/react-tooltip": "^1.2.8",
530
- "ai": "^6.0.73",
533
+ "ai": "^6.0.98",
531
534
  "class-variance-authority": "^0.7.1",
532
535
  "clsx": "^2.1.1",
533
- "lucide-react": "^0.563.0",
536
+ "lucide-react": "^0.575.0",
534
537
  "next": "^16.1.6",
535
538
  "react": "^19.2.4",
536
539
  "react-dom": "^19.2.4",
537
- "tailwind-merge": "^3.4.0",
540
+ "tailwind-merge": "^3.5.0",
538
541
  "zod": "^4.3.6"
539
542
  },
540
543
  "devDependencies": {
541
544
  "@assistant-ui/x-buildutils": "workspace:*",
542
- "@tailwindcss/postcss": "^4.1.18",
543
- "@types/node": "^25.2.1",
544
- "@types/react": "^19.2.13",
545
+ "@tailwindcss/postcss": "^4.2.1",
546
+ "@types/node": "^25.3.0",
547
+ "@types/react": "^19.2.14",
545
548
  "@types/react-dom": "^19.2.3",
546
549
  "postcss": "^8.5.6",
547
- "tailwindcss": "^4.1.18",
550
+ "tailwindcss": "^4.2.1",
548
551
  "tw-animate-css": "^1.4.0",
549
552
  "typescript": "^5.9.3"
550
553
  }
@@ -609,6 +612,7 @@ npm run dev
609
612
  "../../packages/ui/src/components/assistant-ui/*"
610
613
  ],
611
614
  "@/components/ui/*": ["../../packages/ui/src/components/ui/*"],
615
+ "@/lib/utils": ["../../packages/ui/src/lib/utils"],
612
616
  "@assistant-ui/ui/*": ["../../packages/ui/src/*"]
613
617
  }
614
618
  },
@@ -242,7 +242,12 @@ export default function RootLayout({
242
242
 
243
243
  import { AssistantRuntimeProvider } from "@assistant-ui/react";
244
244
  import { useLangGraphRuntime } from "@assistant-ui/react-langgraph";
245
- import { createThread, getThreadState, sendMessage } from "@/lib/chatApi";
245
+ import {
246
+ createThread,
247
+ getThreadState,
248
+ getCheckpointId,
249
+ sendMessage,
250
+ } from "@/lib/chatApi";
246
251
  import { LangChainMessage } from "@assistant-ui/react-langgraph";
247
252
 
248
253
  export function MyRuntimeProvider({
@@ -251,13 +256,14 @@ export function MyRuntimeProvider({
251
256
  children: React.ReactNode;
252
257
  }>) {
253
258
  const runtime = useLangGraphRuntime({
254
- stream: async function* (messages, { initialize }) {
259
+ stream: async function* (messages, { initialize, ...config }) {
255
260
  const { externalId } = await initialize();
256
261
  if (!externalId) throw new Error("Thread not found");
257
262
 
258
263
  const generator = sendMessage({
259
264
  threadId: externalId,
260
265
  messages,
266
+ config,
261
267
  });
262
268
 
263
269
  yield* generator;
@@ -274,6 +280,13 @@ export function MyRuntimeProvider({
274
280
  interrupts: state.tasks[0]?.interrupts ?? [],
275
281
  };
276
282
  },
283
+ getCheckpointId,
284
+ eventHandlers: {
285
+ onMessageChunk: (chunk, metadata) => {
286
+ console.log("[messages-tuple] chunk:", chunk);
287
+ console.log("[messages-tuple] metadata:", metadata);
288
+ },
289
+ },
277
290
  });
278
291
 
279
292
  return (
@@ -294,6 +307,29 @@ import { Thread } from "@/components/assistant-ui/thread";
294
307
  import { PriceSnapshotTool } from "@/components/tools/price-snapshot/PriceSnapshotTool";
295
308
  import { PurchaseStockTool } from "@/components/tools/purchase-stock/PurchaseStockTool";
296
309
  import { ThreadList } from "@/components/assistant-ui/thread-list";
310
+ import { useAui, AuiProvider, Suggestions } from "@assistant-ui/react";
311
+
312
+ function ThreadWithSuggestions() {
313
+ const aui = useAui({
314
+ suggestions: Suggestions([
315
+ {
316
+ title: "Check stock price",
317
+ label: "get the latest AAPL snapshot",
318
+ prompt: "What's the current price of AAPL?",
319
+ },
320
+ {
321
+ title: "Buy shares",
322
+ label: "execute a stock purchase",
323
+ prompt: "Buy 10 shares of TSLA.",
324
+ },
325
+ ]),
326
+ });
327
+ return (
328
+ <AuiProvider value={aui}>
329
+ <Thread />
330
+ </AuiProvider>
331
+ );
332
+ }
297
333
 
298
334
  export default function Home() {
299
335
  return (
@@ -302,7 +338,7 @@ export default function Home() {
302
338
  <ThreadList />
303
339
  </div>
304
340
  <div className="flex-grow">
305
- <Thread />
341
+ <ThreadWithSuggestions />
306
342
  <PriceSnapshotTool />
307
343
  <PurchaseStockTool />
308
344
  </div>
@@ -687,6 +723,7 @@ import { ThreadState, Client } from "@langchain/langgraph-sdk";
687
723
  import {
688
724
  LangChainMessage,
689
725
  LangGraphMessagesEvent,
726
+ LangGraphSendMessageConfig,
690
727
  } from "@assistant-ui/react-langgraph";
691
728
 
692
729
  const createClient = () => {
@@ -715,6 +752,43 @@ export const getThreadState = async (
715
752
  return client.threads.getState(threadId);
716
753
  };
717
754
 
755
+ const matchesParentMessages = (
756
+ stateMessages: LangChainMessage[] | undefined,
757
+ parentMessages: LangChainMessage[],
758
+ ) => {
759
+ if (!stateMessages || stateMessages.length !== parentMessages.length) {
760
+ return false;
761
+ }
762
+
763
+ const hasStableIds =
764
+ parentMessages.every((message) => typeof message.id === "string") &&
765
+ stateMessages.every((message) => typeof message.id === "string");
766
+
767
+ if (!hasStableIds) {
768
+ return false;
769
+ }
770
+
771
+ return parentMessages.every(
772
+ (message, index) => message.id === stateMessages[index]?.id,
773
+ );
774
+ };
775
+
776
+ export const getCheckpointId = async (
777
+ threadId: string,
778
+ parentMessages: LangChainMessage[],
779
+ ): Promise<string | null> => {
780
+ const client = createClient();
781
+ const history = await client.threads.getHistory(threadId);
782
+ for (const state of history) {
783
+ const stateMessages = (state.values as { messages?: LangChainMessage[] })
784
+ .messages;
785
+ if (matchesParentMessages(stateMessages, parentMessages)) {
786
+ return state.checkpoint.checkpoint_id ?? null;
787
+ }
788
+ }
789
+ return null;
790
+ };
791
+
718
792
  export const updateState = async (
719
793
  threadId: string,
720
794
  fields: {
@@ -732,43 +806,31 @@ export const updateState = async (
732
806
  export const sendMessage = (params: {
733
807
  threadId: string;
734
808
  messages: LangChainMessage[];
809
+ config?: LangGraphSendMessageConfig;
735
810
  }): AsyncGenerator<LangGraphMessagesEvent<LangChainMessage>> => {
736
811
  const client = createClient();
737
812
 
738
- const input: Record<string, unknown> | null = {
739
- messages: params.messages,
740
- };
741
- const config = {
742
- configurable: {
743
- model_name: "openai",
744
- },
745
- };
813
+ const { checkpointId, ...restConfig } = params.config ?? {};
746
814
 
747
815
  return client.runs.stream(
748
816
  params.threadId,
749
817
  process.env["NEXT_PUBLIC_LANGGRAPH_ASSISTANT_ID"]!,
750
818
  {
751
- input,
752
- config,
753
- streamMode: "messages",
819
+ input: params.messages.length > 0 ? { messages: params.messages } : null,
820
+ config: {
821
+ configurable: {
822
+ model_name: "openai",
823
+ },
824
+ },
825
+ streamMode: "messages-tuple",
826
+ ...(checkpointId && { checkpoint_id: checkpointId }),
827
+ ...restConfig,
754
828
  },
755
829
  ) as AsyncGenerator<LangGraphMessagesEvent<LangChainMessage>>;
756
830
  };
757
831
 
758
832
  ```
759
833
 
760
- ## lib/utils.ts
761
-
762
- ```typescript
763
- import { type ClassValue, clsx } from "clsx";
764
- import { twMerge } from "tailwind-merge";
765
-
766
- export function cn(...inputs: ClassValue[]) {
767
- return twMerge(clsx(inputs));
768
- }
769
-
770
- ```
771
-
772
834
  ## next.config.ts
773
835
 
774
836
  ```typescript
@@ -807,28 +869,23 @@ export default nextConfig;
807
869
  "@assistant-ui/react-langgraph": "workspace:*",
808
870
  "@assistant-ui/react-markdown": "workspace:*",
809
871
  "@assistant-ui/ui": "workspace:*",
810
- "@langchain/langgraph-sdk": "^1.5.6",
811
- "@radix-ui/react-avatar": "^1.1.11",
812
- "@radix-ui/react-collapsible": "^1.1.12",
813
- "@radix-ui/react-dialog": "^1.1.15",
814
- "@radix-ui/react-slot": "^1.2.4",
815
- "@radix-ui/react-tooltip": "^1.2.8",
872
+ "@langchain/langgraph-sdk": "^1.6.4",
816
873
  "class-variance-authority": "^0.7.1",
817
874
  "clsx": "^2.1.1",
818
- "lucide-react": "^0.563.0",
875
+ "lucide-react": "^0.575.0",
819
876
  "next": "^16.1.6",
820
877
  "react": "^19.2.4",
821
878
  "react-dom": "^19.2.4",
822
- "tailwind-merge": "^3.4.0"
879
+ "tailwind-merge": "^3.5.0"
823
880
  },
824
881
  "devDependencies": {
825
882
  "@assistant-ui/x-buildutils": "workspace:*",
826
- "@tailwindcss/postcss": "^4.1.18",
827
- "@types/node": "^25.2.1",
828
- "@types/react": "^19.2.13",
883
+ "@tailwindcss/postcss": "^4.2.1",
884
+ "@types/node": "^25.3.0",
885
+ "@types/react": "^19.2.14",
829
886
  "@types/react-dom": "^19.2.3",
830
887
  "postcss": "^8.5.6",
831
- "tailwindcss": "^4.1.18",
888
+ "tailwindcss": "^4.2.1",
832
889
  "tw-animate-css": "^1.4.0",
833
890
  "typescript": "^5.9.3"
834
891
  }
@@ -896,6 +953,7 @@ npm run dev
896
953
  "../../packages/ui/src/components/assistant-ui/*"
897
954
  ],
898
955
  "@/components/ui/*": ["../../packages/ui/src/components/ui/*"],
956
+ "@/lib/utils": ["../../packages/ui/src/lib/utils"],
899
957
  "@assistant-ui/ui/*": ["../../packages/ui/src/*"]
900
958
  }
901
959
  },
@@ -383,11 +383,34 @@ export function MyRuntimeProvider({
383
383
  "use client";
384
384
 
385
385
  import { Thread } from "@/components/assistant-ui/thread";
386
+ import { useAui, AuiProvider, Suggestions } from "@assistant-ui/react";
387
+
388
+ function ThreadWithSuggestions() {
389
+ const aui = useAui({
390
+ suggestions: Suggestions([
391
+ {
392
+ title: "Tell me a story",
393
+ label: "with multiple parts",
394
+ prompt: "Tell me a short story with a beginning, middle, and end.",
395
+ },
396
+ {
397
+ title: "Explain quantum computing",
398
+ label: "in simple terms",
399
+ prompt: "Explain quantum computing like I'm five years old.",
400
+ },
401
+ ]),
402
+ });
403
+ return (
404
+ <AuiProvider value={aui}>
405
+ <Thread />
406
+ </AuiProvider>
407
+ );
408
+ }
386
409
 
387
410
  export default function Home() {
388
411
  return (
389
412
  <main className="h-dvh">
390
- <Thread />
413
+ <ThreadWithSuggestions />
391
414
  </main>
392
415
  );
393
416
  }
@@ -424,18 +447,6 @@ export default function Home() {
424
447
 
425
448
  ```
426
449
 
427
- ## lib/utils.ts
428
-
429
- ```typescript
430
- import { clsx, type ClassValue } from "clsx";
431
- import { twMerge } from "tailwind-merge";
432
-
433
- export function cn(...inputs: ClassValue[]) {
434
- return twMerge(clsx(inputs));
435
- }
436
-
437
- ```
438
-
439
450
  ## next.config.ts
440
451
 
441
452
  ```typescript
@@ -463,31 +474,26 @@ export default nextConfig;
463
474
  "start": "next start"
464
475
  },
465
476
  "dependencies": {
466
- "@ai-sdk/openai": "^3.0.25",
477
+ "@ai-sdk/openai": "^3.0.33",
467
478
  "@assistant-ui/react": "workspace:*",
468
479
  "@assistant-ui/react-markdown": "workspace:*",
469
480
  "@assistant-ui/ui": "workspace:*",
470
- "@radix-ui/react-avatar": "^1.1.11",
471
- "@radix-ui/react-collapsible": "^1.1.12",
472
- "@radix-ui/react-dialog": "^1.1.15",
473
- "@radix-ui/react-slot": "^1.2.4",
474
- "@radix-ui/react-tooltip": "^1.2.8",
475
481
  "class-variance-authority": "^0.7.1",
476
482
  "clsx": "^2.1.1",
477
- "lucide-react": "^0.563.0",
483
+ "lucide-react": "^0.575.0",
478
484
  "next": "^16.1.6",
479
485
  "react": "^19.2.4",
480
486
  "react-dom": "^19.2.4",
481
- "tailwind-merge": "^3.4.0"
487
+ "tailwind-merge": "^3.5.0"
482
488
  },
483
489
  "devDependencies": {
484
490
  "@assistant-ui/x-buildutils": "workspace:*",
485
- "@tailwindcss/postcss": "^4.1.18",
486
- "@types/node": "^25.2.1",
487
- "@types/react": "^19.2.13",
491
+ "@tailwindcss/postcss": "^4.2.1",
492
+ "@types/node": "^25.3.0",
493
+ "@types/react": "^19.2.14",
488
494
  "@types/react-dom": "^19.2.3",
489
495
  "postcss": "^8.5.6",
490
- "tailwindcss": "^4.1.18",
496
+ "tailwindcss": "^4.2.1",
491
497
  "tw-animate-css": "^1.4.0",
492
498
  "typescript": "^5.9.3"
493
499
  }
@@ -578,6 +584,7 @@ This pattern is useful for:
578
584
  "../../packages/ui/src/components/assistant-ui/*"
579
585
  ],
580
586
  "@/components/ui/*": ["../../packages/ui/src/components/ui/*"],
587
+ "@/lib/utils": ["../../packages/ui/src/lib/utils"],
581
588
  "@assistant-ui/ui/*": ["../../packages/ui/src/*"]
582
589
  }
583
590
  },