@assistant-ui/mcp-docs-server 0.1.24 → 0.1.26

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 (151) hide show
  1. package/.docs/organized/code-examples/waterfall.md +8 -6
  2. package/.docs/organized/code-examples/with-a2a.md +676 -0
  3. package/.docs/organized/code-examples/with-ag-ui.md +10 -11
  4. package/.docs/organized/code-examples/with-ai-sdk-v6.md +31 -19
  5. package/.docs/organized/code-examples/with-artifacts.md +8 -8
  6. package/.docs/organized/code-examples/with-assistant-transport.md +6 -6
  7. package/.docs/organized/code-examples/with-chain-of-thought.md +37 -29
  8. package/.docs/organized/code-examples/with-cloud-standalone.md +14 -11
  9. package/.docs/organized/code-examples/with-cloud.md +8 -8
  10. package/.docs/organized/code-examples/with-custom-thread-list.md +10 -10
  11. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +11 -11
  12. package/.docs/organized/code-examples/with-expo.md +571 -520
  13. package/.docs/organized/code-examples/with-external-store.md +6 -6
  14. package/.docs/organized/code-examples/with-ffmpeg.md +8 -8
  15. package/.docs/organized/code-examples/with-google-adk.md +353 -0
  16. package/.docs/organized/code-examples/with-heat-graph.md +304 -0
  17. package/.docs/organized/code-examples/with-interactables.md +778 -0
  18. package/.docs/organized/code-examples/with-langgraph.md +28 -26
  19. package/.docs/organized/code-examples/with-parent-id-grouping.md +7 -7
  20. package/.docs/organized/code-examples/with-react-hook-form.md +9 -9
  21. package/.docs/organized/code-examples/with-react-ink.md +265 -0
  22. package/.docs/organized/code-examples/with-react-router.md +12 -12
  23. package/.docs/organized/code-examples/with-store.md +33 -22
  24. package/.docs/organized/code-examples/with-tanstack.md +10 -10
  25. package/.docs/organized/code-examples/with-tap-runtime.md +12 -10
  26. package/.docs/raw/blog/2025-01-31-changelog/index.mdx +1 -1
  27. package/.docs/raw/blog/2026-03-launch-week/index.mdx +258 -0
  28. package/.docs/raw/docs/(docs)/architecture.mdx +1 -1
  29. package/.docs/raw/docs/(docs)/cli.mdx +74 -9
  30. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +8 -3
  31. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +5 -1
  32. package/.docs/raw/docs/(docs)/copilots/{make-assistant-readable.mdx → make-assistant-visible.mdx} +14 -5
  33. package/.docs/raw/docs/(docs)/copilots/model-context.mdx +11 -11
  34. package/.docs/raw/docs/(docs)/copilots/motivation.mdx +2 -2
  35. package/.docs/raw/docs/(docs)/devtools.mdx +3 -2
  36. package/.docs/raw/docs/(docs)/guides/attachments.mdx +74 -15
  37. package/.docs/raw/docs/(docs)/guides/branching.mdx +11 -6
  38. package/.docs/raw/docs/(docs)/guides/chain-of-thought.mdx +18 -16
  39. package/.docs/raw/docs/(docs)/guides/context-api.mdx +81 -43
  40. package/.docs/raw/docs/(docs)/guides/dictation.mdx +5 -5
  41. package/.docs/raw/docs/(docs)/guides/editing.mdx +16 -7
  42. package/.docs/raw/docs/(docs)/guides/interactables.mdx +292 -0
  43. package/.docs/raw/docs/(docs)/guides/latex.mdx +3 -0
  44. package/.docs/raw/docs/(docs)/guides/message-timing.mdx +5 -4
  45. package/.docs/raw/docs/(docs)/guides/multi-agent.mdx +174 -0
  46. package/.docs/raw/docs/(docs)/guides/quoting.mdx +55 -206
  47. package/.docs/raw/docs/(docs)/guides/speech.mdx +1 -4
  48. package/.docs/raw/docs/(docs)/guides/suggestions.mdx +9 -15
  49. package/.docs/raw/docs/(docs)/guides/tool-ui.mdx +17 -7
  50. package/.docs/raw/docs/(docs)/guides/tools.mdx +24 -9
  51. package/.docs/raw/docs/(docs)/index.mdx +3 -3
  52. package/.docs/raw/docs/(docs)/installation.mdx +69 -46
  53. package/.docs/raw/docs/(reference)/api-reference/context-providers/text-message-part-provider.mdx +20 -6
  54. package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +24 -4
  55. package/.docs/raw/docs/(reference)/api-reference/integrations/react-hook-form.mdx +1 -1
  56. package/.docs/raw/docs/(reference)/api-reference/integrations/vercel-ai-sdk.mdx +20 -19
  57. package/.docs/raw/docs/(reference)/api-reference/overview.mdx +28 -53
  58. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +4 -4
  59. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +7 -1
  60. package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +20 -14
  61. package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +1 -1
  62. package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +226 -44
  63. package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +52 -40
  64. package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +343 -23
  65. package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +4 -6
  66. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +4 -2
  67. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +3 -5
  68. package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +169 -22
  69. package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +14 -4
  70. package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +15 -26
  71. package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +39 -21
  72. package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +33 -9
  73. package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +48 -21
  74. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +36 -7
  75. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +30 -10
  76. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +12 -10
  77. package/.docs/raw/docs/(reference)/migrations/deprecation-policy.mdx +1 -1
  78. package/.docs/raw/docs/(reference)/migrations/react-langgraph-v0-7.mdx +9 -4
  79. package/.docs/raw/docs/(reference)/migrations/v0-11.mdx +7 -5
  80. package/.docs/raw/docs/(reference)/migrations/v0-12.mdx +9 -7
  81. package/.docs/raw/docs/(reference)/migrations/v0-14.mdx +159 -0
  82. package/.docs/raw/docs/(reference)/react-compatibility.mdx +5 -134
  83. package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +90 -6
  84. package/.docs/raw/docs/cloud/ai-sdk.mdx +95 -5
  85. package/.docs/raw/docs/cloud/langgraph.mdx +13 -3
  86. package/.docs/raw/docs/ink/adapters.mdx +41 -0
  87. package/.docs/raw/docs/ink/custom-backend.mdx +203 -0
  88. package/.docs/raw/docs/ink/hooks.mdx +448 -0
  89. package/.docs/raw/docs/ink/index.mdx +239 -0
  90. package/.docs/raw/docs/ink/migration.mdx +140 -0
  91. package/.docs/raw/docs/ink/primitives.mdx +840 -0
  92. package/.docs/raw/docs/primitives/action-bar.mdx +351 -0
  93. package/.docs/raw/docs/primitives/assistant-modal.mdx +215 -0
  94. package/.docs/raw/docs/primitives/attachment.mdx +216 -0
  95. package/.docs/raw/docs/primitives/branch-picker.mdx +221 -0
  96. package/.docs/raw/docs/primitives/chain-of-thought.mdx +311 -0
  97. package/.docs/raw/docs/primitives/composer.mdx +526 -0
  98. package/.docs/raw/docs/primitives/error.mdx +141 -0
  99. package/.docs/raw/docs/primitives/index.mdx +98 -0
  100. package/.docs/raw/docs/primitives/message.mdx +524 -0
  101. package/.docs/raw/docs/primitives/selection-toolbar.mdx +165 -0
  102. package/.docs/raw/docs/primitives/suggestion.mdx +242 -0
  103. package/.docs/raw/docs/primitives/thread-list.mdx +404 -0
  104. package/.docs/raw/docs/primitives/thread.mdx +482 -0
  105. package/.docs/raw/docs/react-native/adapters.mdx +63 -87
  106. package/.docs/raw/docs/react-native/custom-backend.mdx +11 -14
  107. package/.docs/raw/docs/react-native/hooks.mdx +214 -232
  108. package/.docs/raw/docs/react-native/index.mdx +118 -159
  109. package/.docs/raw/docs/react-native/migration.mdx +144 -0
  110. package/.docs/raw/docs/react-native/primitives.mdx +431 -302
  111. package/.docs/raw/docs/runtimes/a2a/index.mdx +294 -0
  112. package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +9 -9
  113. package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +14 -3
  114. package/.docs/raw/docs/runtimes/assistant-transport.mdx +59 -25
  115. package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +13 -6
  116. package/.docs/raw/docs/runtimes/custom/external-store.mdx +138 -38
  117. package/.docs/raw/docs/runtimes/custom/local.mdx +184 -42
  118. package/.docs/raw/docs/runtimes/data-stream.mdx +92 -19
  119. package/.docs/raw/docs/runtimes/google-adk/index.mdx +624 -0
  120. package/.docs/raw/docs/runtimes/helicone.mdx +6 -6
  121. package/.docs/raw/docs/runtimes/langgraph/index.mdx +38 -27
  122. package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +1 -1
  123. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +15 -20
  124. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +7 -11
  125. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +8 -11
  126. package/.docs/raw/docs/runtimes/langserve.mdx +6 -7
  127. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +18 -3
  128. package/.docs/raw/docs/ui/file.mdx +5 -4
  129. package/.docs/raw/docs/ui/image.mdx +5 -4
  130. package/.docs/raw/docs/ui/markdown.mdx +3 -1
  131. package/.docs/raw/docs/ui/mention.mdx +168 -0
  132. package/.docs/raw/docs/ui/model-selector.mdx +8 -8
  133. package/.docs/raw/docs/ui/part-grouping.mdx +7 -10
  134. package/.docs/raw/docs/ui/quote.mdx +210 -0
  135. package/.docs/raw/docs/ui/reasoning.mdx +12 -11
  136. package/.docs/raw/docs/ui/sources.mdx +88 -17
  137. package/.docs/raw/docs/ui/streamdown.mdx +16 -7
  138. package/.docs/raw/docs/ui/thread-list.mdx +11 -13
  139. package/.docs/raw/docs/ui/thread.mdx +28 -33
  140. package/.docs/raw/docs/ui/tool-fallback.mdx +5 -6
  141. package/.docs/raw/docs/ui/tool-group.mdx +9 -8
  142. package/.docs/raw/docs/utilities/heat-graph.mdx +236 -0
  143. package/.docs/raw/docs/utilities/tw-shimmer.mdx +211 -0
  144. package/package.json +5 -5
  145. package/.docs/raw/docs/(reference)/legacy/styled/assistant-modal.mdx +0 -77
  146. package/.docs/raw/docs/(reference)/legacy/styled/decomposition.mdx +0 -635
  147. package/.docs/raw/docs/(reference)/legacy/styled/markdown.mdx +0 -77
  148. package/.docs/raw/docs/(reference)/legacy/styled/scrollbar.mdx +0 -72
  149. package/.docs/raw/docs/(reference)/legacy/styled/thread-width.mdx +0 -22
  150. package/.docs/raw/docs/(reference)/legacy/styled/thread.mdx +0 -77
  151. /package/.docs/raw/docs/cloud/{overview.mdx → index.mdx} +0 -0
@@ -261,7 +261,6 @@ export function MyRuntimeProvider({
261
261
  "use client";
262
262
 
263
263
  import {
264
- useAssistantRuntime,
265
264
  useAssistantTool,
266
265
  useAui,
267
266
  AuiProvider,
@@ -289,7 +288,7 @@ function BrowserAlertTool() {
289
288
  return { status: "shown" };
290
289
  },
291
290
  render: ({ args, result }) => (
292
- <div className="mt-3 w-full max-w-[var(--thread-max-width)] rounded-lg border px-4 py-3 text-sm">
291
+ <div className="mt-3 w-full max-w-(--thread-max-width) rounded-lg border px-4 py-3 text-sm">
293
292
  <p className="font-semibold text-muted-foreground">browser_alert</p>
294
293
  <p className="mt-1">
295
294
  Requested alert with message:
@@ -310,11 +309,11 @@ function BrowserAlertTool() {
310
309
  }
311
310
 
312
311
  function NewThreadButton() {
313
- const runtime = useAssistantRuntime();
312
+ const aui = useAui();
314
313
 
315
314
  return (
316
315
  <button
317
- onClick={() => runtime.switchToNewThread()}
316
+ onClick={() => aui.threads().switchToNewThread()}
318
317
  className="absolute top-4 right-4 z-10 flex items-center gap-2 rounded-lg border bg-background px-3 py-2 font-medium text-sm shadow-sm transition-colors hover:bg-accent"
319
318
  >
320
319
  <PlusIcon className="size-4" />
@@ -414,29 +413,29 @@ export default nextConfig;
414
413
  "start": "next start"
415
414
  },
416
415
  "dependencies": {
417
- "@ag-ui/client": "^0.0.47",
416
+ "@ag-ui/client": "^0.0.48",
418
417
  "@assistant-ui/react": "workspace:*",
419
418
  "@assistant-ui/react-ag-ui": "workspace:*",
420
419
  "@assistant-ui/react-markdown": "workspace:*",
421
420
  "@assistant-ui/ui": "workspace:*",
422
421
  "class-variance-authority": "^0.7.1",
423
422
  "clsx": "^2.1.1",
424
- "lucide-react": "^0.576.0",
425
- "next": "^16.1.6",
423
+ "lucide-react": "^1.7.0",
424
+ "next": "^16.2.1",
426
425
  "react": "^19.2.4",
427
426
  "react-dom": "^19.2.4",
428
427
  "tailwind-merge": "^3.5.0"
429
428
  },
430
429
  "devDependencies": {
431
430
  "@assistant-ui/x-buildutils": "workspace:*",
432
- "@tailwindcss/postcss": "^4.2.1",
433
- "@types/node": "^25.3.3",
431
+ "@tailwindcss/postcss": "^4.2.2",
432
+ "@types/node": "^25.5.0",
434
433
  "@types/react": "^19.2.14",
435
434
  "@types/react-dom": "^19.2.3",
436
435
  "postcss": "^8.5.8",
437
- "tailwindcss": "^4.2.1",
436
+ "tailwindcss": "^4.2.2",
438
437
  "tw-animate-css": "^1.4.0",
439
- "typescript": "^5.9.3"
438
+ "typescript": "5.9.3"
440
439
  }
441
440
  }
442
441
 
@@ -4,27 +4,39 @@
4
4
 
5
5
  ```typescript
6
6
  import { openai } from "@ai-sdk/openai";
7
+ import { frontendTools } from "@assistant-ui/react-ai-sdk";
7
8
  import {
9
+ JSONSchema7,
8
10
  streamText,
9
11
  convertToModelMessages,
12
+ type UIMessage,
10
13
  tool,
11
14
  stepCountIs,
12
15
  zodSchema,
13
16
  } from "ai";
14
- import type { UIMessage } from "ai";
15
17
  import { z } from "zod";
16
18
 
17
19
  // Allow streaming responses up to 30 seconds
18
20
  export const maxDuration = 30;
19
21
 
20
22
  export async function POST(req: Request) {
21
- const { messages }: { messages: UIMessage[] } = await req.json();
23
+ const {
24
+ messages,
25
+ system,
26
+ tools,
27
+ }: {
28
+ messages: UIMessage[];
29
+ system?: string;
30
+ tools?: Record<string, { description?: string; parameters: JSONSchema7 }>;
31
+ } = await req.json();
22
32
 
23
33
  const result = streamText({
24
34
  model: openai("gpt-4o"),
25
35
  messages: await convertToModelMessages(messages),
36
+ ...(system ? { system } : {}),
26
37
  stopWhen: stepCountIs(10),
27
38
  tools: {
39
+ ...frontendTools(tools ?? {}),
28
40
  get_current_weather: tool({
29
41
  description: "Get the current weather",
30
42
  inputSchema: zodSchema(
@@ -179,8 +191,8 @@ import type { Metadata } from "next";
179
191
  import "./globals.css";
180
192
 
181
193
  export const metadata: Metadata = {
182
- title: "AI SDK v5 Example",
183
- description: "Example using @assistant-ui/react with AI SDK v5",
194
+ title: "AI SDK v6 Example",
195
+ description: "Example using @assistant-ui/react with AI SDK v6",
184
196
  };
185
197
 
186
198
  export default function RootLayout({
@@ -303,16 +315,16 @@ export default nextConfig;
303
315
  "start": "next start"
304
316
  },
305
317
  "dependencies": {
306
- "@ai-sdk/openai": "^3.0.39",
318
+ "@ai-sdk/openai": "^3.0.48",
307
319
  "@assistant-ui/react": "workspace:*",
308
320
  "@assistant-ui/react-ai-sdk": "workspace:*",
309
321
  "@assistant-ui/react-markdown": "workspace:*",
310
322
  "@assistant-ui/ui": "workspace:*",
311
- "ai": "^6.0.111",
323
+ "ai": "^6.0.138",
312
324
  "class-variance-authority": "^0.7.1",
313
325
  "clsx": "^2.1.1",
314
- "lucide-react": "^0.576.0",
315
- "next": "^16.1.6",
326
+ "lucide-react": "^1.7.0",
327
+ "next": "^16.2.1",
316
328
  "react": "^19.2.4",
317
329
  "react-dom": "^19.2.4",
318
330
  "tailwind-merge": "^3.5.0",
@@ -320,14 +332,14 @@ export default nextConfig;
320
332
  },
321
333
  "devDependencies": {
322
334
  "@assistant-ui/x-buildutils": "workspace:*",
323
- "@tailwindcss/postcss": "^4.2.1",
324
- "@types/node": "^25.3.3",
335
+ "@tailwindcss/postcss": "^4.2.2",
336
+ "@types/node": "^25.5.0",
325
337
  "@types/react": "^19.2.14",
326
338
  "@types/react-dom": "^19.2.3",
327
339
  "postcss": "^8.5.8",
328
- "tailwindcss": "^4.2.1",
340
+ "tailwindcss": "^4.2.2",
329
341
  "tw-animate-css": "^1.4.0",
330
- "typescript": "^5.9.3"
342
+ "typescript": "5.9.3"
331
343
  }
332
344
  }
333
345
 
@@ -353,26 +365,26 @@ cd my-app
353
365
 
354
366
  Create `.env.local`:
355
367
 
356
- ```
357
- ANTHROPIC_API_KEY=your-api-key-here
368
+ ```sh
369
+ OPENAI_API_KEY=your-api-key-here
358
370
  ```
359
371
 
360
372
  ### Run
361
373
 
362
374
  ```bash
363
- npm install
364
- npm run dev
375
+ pnpm install
376
+ pnpm dev
365
377
  ```
366
378
 
367
379
  Open [http://localhost:3000](http://localhost:3000) to see the result.
368
380
 
369
381
  ## Key Features
370
382
 
371
- - Uses the new AI SDK v6 with `@ai-sdk/react` and `@ai-sdk/anthropic`
383
+ - Uses the new AI SDK v6 with `@ai-sdk/openai`
372
384
  - Integrates with `@assistant-ui/react` using the new `useChatRuntime` hook
373
385
  - No RSC support (client-side only)
374
386
  - Simplified integration with the `useChatRuntime` hook that wraps AI SDK v6's `useChat`
375
- - Automatically uses `AssistantChatTransport` to pass system messages and frontend tools to the backend
387
+ - Uses `AssistantChatTransport` to pass system messages and frontend tools to the backend
376
388
 
377
389
  ## Custom Transport Configuration
378
390
 
@@ -406,7 +418,7 @@ const runtime = useChatRuntime({
406
418
 
407
419
  ## API Route
408
420
 
409
- The API route at `/api/chat` uses the new `streamText` function from AI SDK v6 to handle chat completions.
421
+ The API route at `/api/chat` uses AI SDK v6 `streamText`, forwards `system` and frontend `tools`, and merges them with a server-defined weather tool.
410
422
 
411
423
  ## Related Documentation
412
424
 
@@ -413,16 +413,16 @@ export default nextConfig;
413
413
  "start": "next start"
414
414
  },
415
415
  "dependencies": {
416
- "@ai-sdk/openai": "^3.0.39",
416
+ "@ai-sdk/openai": "^3.0.48",
417
417
  "@assistant-ui/react": "workspace:*",
418
418
  "@assistant-ui/react-ai-sdk": "workspace:*",
419
419
  "@assistant-ui/react-markdown": "workspace:*",
420
420
  "@assistant-ui/ui": "workspace:*",
421
- "ai": "^6.0.111",
421
+ "ai": "^6.0.138",
422
422
  "class-variance-authority": "^0.7.1",
423
423
  "clsx": "^2.1.1",
424
- "lucide-react": "^0.576.0",
425
- "next": "^16.1.6",
424
+ "lucide-react": "^1.7.0",
425
+ "next": "^16.2.1",
426
426
  "react": "^19.2.4",
427
427
  "react-dom": "^19.2.4",
428
428
  "tailwind-merge": "^3.5.0",
@@ -430,14 +430,14 @@ export default nextConfig;
430
430
  },
431
431
  "devDependencies": {
432
432
  "@assistant-ui/x-buildutils": "workspace:*",
433
- "@tailwindcss/postcss": "^4.2.1",
434
- "@types/node": "^25.3.3",
433
+ "@tailwindcss/postcss": "^4.2.2",
434
+ "@types/node": "^25.5.0",
435
435
  "@types/react": "^19.2.14",
436
436
  "@types/react-dom": "^19.2.3",
437
437
  "postcss": "^8.5.8",
438
- "tailwindcss": "^4.2.1",
438
+ "tailwindcss": "^4.2.2",
439
439
  "tw-animate-css": "^1.4.0",
440
- "typescript": "^5.9.3"
440
+ "typescript": "5.9.3"
441
441
  }
442
442
  }
443
443
 
@@ -423,8 +423,8 @@ export default nextConfig;
423
423
  "@assistant-ui/ui": "workspace:*",
424
424
  "class-variance-authority": "^0.7.1",
425
425
  "clsx": "^2.1.1",
426
- "lucide-react": "^0.576.0",
427
- "next": "^16.1.6",
426
+ "lucide-react": "^1.7.0",
427
+ "next": "^16.2.1",
428
428
  "react": "^19.2.4",
429
429
  "react-dom": "^19.2.4",
430
430
  "tailwind-merge": "^3.5.0",
@@ -432,14 +432,14 @@ export default nextConfig;
432
432
  },
433
433
  "devDependencies": {
434
434
  "@assistant-ui/x-buildutils": "workspace:*",
435
- "@tailwindcss/postcss": "^4.2.1",
436
- "@types/node": "^25.3.3",
435
+ "@tailwindcss/postcss": "^4.2.2",
436
+ "@types/node": "^25.5.0",
437
437
  "@types/react": "^19.2.14",
438
438
  "@types/react-dom": "^19.2.3",
439
439
  "postcss": "^8.5.8",
440
- "tailwindcss": "^4.2.1",
440
+ "tailwindcss": "^4.2.2",
441
441
  "tw-animate-css": "^1.4.0",
442
- "typescript": "^5.9.3"
442
+ "typescript": "5.9.3"
443
443
  }
444
444
  }
445
445
 
@@ -212,7 +212,6 @@ export default function RootLayout({
212
212
 
213
213
  import { type FC, type PropsWithChildren, useState } from "react";
214
214
  import { MarkdownText } from "@/components/assistant-ui/markdown-text";
215
- import { ToolFallback } from "@/components/assistant-ui/tool-fallback";
216
215
  import { TooltipIconButton } from "@/components/assistant-ui/tooltip-icon-button";
217
216
  import { Button } from "@/components/ui/button";
218
217
  import {
@@ -238,9 +237,12 @@ export const MyThread: FC = () => {
238
237
  style={{ ["--thread-max-width" as string]: "44rem" }}
239
238
  >
240
239
  <ThreadPrimitive.Viewport className="flex flex-1 flex-col overflow-y-scroll scroll-smooth px-4 pt-8">
241
- <ThreadPrimitive.Messages
242
- components={{ UserMessage, AssistantMessage }}
243
- />
240
+ <ThreadPrimitive.Messages>
241
+ {({ message }) => {
242
+ if (message.role === "user") return <UserMessage />;
243
+ return <AssistantMessage />;
244
+ }}
245
+ </ThreadPrimitive.Messages>
244
246
 
245
247
  <ThreadPrimitive.ViewportFooter className="sticky bottom-0 mx-auto mt-auto flex w-full max-w-(--thread-max-width) flex-col gap-4 pb-4">
246
248
  <ThreadPrimitive.ScrollToBottom asChild>
@@ -268,7 +270,12 @@ const UserMessage: FC = () => {
268
270
  <MessagePrimitive.Root className="mx-auto w-full max-w-(--thread-max-width) py-3">
269
271
  <div className="flex justify-end">
270
272
  <div className="max-w-[80%] rounded-2xl bg-primary px-4 py-2 text-primary-foreground">
271
- <MessagePrimitive.Parts components={{ Text }} />
273
+ <MessagePrimitive.Parts>
274
+ {({ part }) => {
275
+ if (part.type === "text") return <Text {...part} />;
276
+ return null;
277
+ }}
278
+ </MessagePrimitive.Parts>
272
279
  </div>
273
280
  </div>
274
281
  </MessagePrimitive.Root>
@@ -279,17 +286,14 @@ const AssistantMessage: FC = () => {
279
286
  return (
280
287
  <MessagePrimitive.Root className="mx-auto w-full max-w-(--thread-max-width) py-3">
281
288
  <div className="flex flex-col gap-2 px-2 leading-relaxed">
282
- {/*
283
- The ChainOfThought component is passed to MessagePrimitive.Parts.
284
- When set, consecutive reasoning + tool-call parts are grouped together
285
- and rendered through this component instead of individually.
286
- */}
287
- <MessagePrimitive.Parts
288
- components={{
289
- Text: MarkdownText,
290
- ChainOfThought,
289
+ {/* Text parts are rendered inline; ChainOfThought is rendered separately below. */}
290
+ <MessagePrimitive.Parts>
291
+ {({ part }) => {
292
+ if (part.type === "text") return <MarkdownText />;
293
+ return null;
291
294
  }}
292
- />
295
+ </MessagePrimitive.Parts>
296
+ <ChainOfThought />
293
297
  </div>
294
298
  </MessagePrimitive.Root>
295
299
  );
@@ -315,13 +319,17 @@ const ChainOfThought: FC = () => {
315
319
  Thinking
316
320
  </ChainOfThoughtPrimitive.AccordionTrigger>
317
321
  <AuiIf condition={(s) => !s.chainOfThought.collapsed}>
318
- <ChainOfThoughtPrimitive.Parts
319
- components={{
320
- Reasoning,
321
- tools: { Fallback: ToolFallback },
322
- Layout: PartLayout,
322
+ <ChainOfThoughtPrimitive.Parts>
323
+ {({ part }) => {
324
+ if (part.type === "reasoning")
325
+ return (
326
+ <PartLayout>
327
+ <Reasoning {...part} />
328
+ </PartLayout>
329
+ );
330
+ return null;
323
331
  }}
324
- />
332
+ </ChainOfThoughtPrimitive.Parts>
325
333
  </AuiIf>
326
334
  </ChainOfThoughtPrimitive.Root>
327
335
  );
@@ -549,16 +557,16 @@ export default nextConfig;
549
557
  "start": "next start"
550
558
  },
551
559
  "dependencies": {
552
- "@ai-sdk/openai": "^3.0.39",
560
+ "@ai-sdk/openai": "^3.0.48",
553
561
  "@assistant-ui/react": "workspace:*",
554
562
  "@assistant-ui/react-ai-sdk": "workspace:*",
555
563
  "@assistant-ui/react-markdown": "workspace:*",
556
564
  "@assistant-ui/ui": "workspace:*",
557
- "ai": "^6.0.111",
565
+ "ai": "^6.0.138",
558
566
  "class-variance-authority": "^0.7.1",
559
567
  "clsx": "^2.1.1",
560
- "lucide-react": "^0.576.0",
561
- "next": "^16.1.6",
568
+ "lucide-react": "^1.7.0",
569
+ "next": "^16.2.1",
562
570
  "react": "^19.2.4",
563
571
  "react-dom": "^19.2.4",
564
572
  "tailwind-merge": "^3.5.0",
@@ -566,14 +574,14 @@ export default nextConfig;
566
574
  },
567
575
  "devDependencies": {
568
576
  "@assistant-ui/x-buildutils": "workspace:*",
569
- "@tailwindcss/postcss": "^4.2.1",
570
- "@types/node": "^25.3.3",
577
+ "@tailwindcss/postcss": "^4.2.2",
578
+ "@types/node": "^25.5.0",
571
579
  "@types/react": "^19.2.14",
572
580
  "@types/react-dom": "^19.2.3",
573
581
  "postcss": "^8.5.8",
574
- "tailwindcss": "^4.2.1",
582
+ "tailwindcss": "^4.2.2",
575
583
  "tw-animate-css": "^1.4.0",
576
- "typescript": "^5.9.3"
584
+ "typescript": "5.9.3"
577
585
  }
578
586
  }
579
587
 
@@ -19,10 +19,14 @@ export async function POST(req: Request) {
19
19
 
20
20
  return result.toUIMessageStreamResponse({
21
21
  messageMetadata: ({ part }) => {
22
+ if (part.type === "finish") {
23
+ return {
24
+ usage: part.totalUsage,
25
+ };
26
+ }
22
27
  if (part.type === "finish-step") {
23
28
  return {
24
29
  modelId: part.response.modelId,
25
- usage: part.usage,
26
30
  };
27
31
  }
28
32
  return undefined;
@@ -561,28 +565,27 @@ export default nextConfig;
561
565
  "start": "next start"
562
566
  },
563
567
  "dependencies": {
564
- "@ai-sdk/openai": "^3.0.39",
568
+ "@ai-sdk/openai": "^3.0.48",
565
569
  "@assistant-ui/cloud-ai-sdk": "workspace:*",
566
- "ai": "^6.0.111",
567
- "assistant-cloud": "workspace:*",
570
+ "ai": "^6.0.138",
568
571
  "class-variance-authority": "^0.7.1",
569
572
  "clsx": "^2.1.1",
570
- "lucide-react": "^0.576.0",
571
- "next": "^16.1.6",
573
+ "lucide-react": "^1.7.0",
574
+ "next": "^16.2.1",
572
575
  "react": "^19.2.4",
573
576
  "react-dom": "^19.2.4",
574
577
  "tailwind-merge": "^3.5.0"
575
578
  },
576
579
  "devDependencies": {
577
580
  "@assistant-ui/x-buildutils": "workspace:*",
578
- "@tailwindcss/postcss": "^4.2.1",
579
- "@types/node": "^25.3.3",
581
+ "@tailwindcss/postcss": "^4.2.2",
582
+ "@types/node": "^25.5.0",
580
583
  "@types/react": "^19.2.14",
581
584
  "@types/react-dom": "^19.2.3",
582
585
  "postcss": "^8.5.8",
583
- "tailwindcss": "^4.2.1",
586
+ "tailwindcss": "^4.2.2",
584
587
  "tw-animate-css": "^1.4.0",
585
- "typescript": "^5.9.3"
588
+ "typescript": "5.9.3"
586
589
  }
587
590
  }
588
591
 
@@ -595,7 +598,7 @@ export default nextConfig;
595
598
 
596
599
  Lightweight cloud persistence for AI SDK apps without assistant-ui components.
597
600
 
598
- > **Want the full assistant-ui experience?** See [with-cloud](../with-cloud) instead, which uses `useChatRuntime` with `<Thread />` and other primitives.
601
+ > **Want the full assistant-ui experience?** See [with-cloud](https://github.com/assistant-ui/assistant-ui/tree/main/examples/with-cloud) instead, which uses `useChatRuntime` with `<Thread />` and other primitives.
599
602
 
600
603
  ## Setup
601
604
 
@@ -327,30 +327,30 @@ export default nextConfig;
327
327
  "start": "next start"
328
328
  },
329
329
  "dependencies": {
330
- "@ai-sdk/openai": "^3.0.39",
330
+ "@ai-sdk/openai": "^3.0.48",
331
331
  "@assistant-ui/react": "workspace:*",
332
332
  "@assistant-ui/react-ai-sdk": "workspace:*",
333
333
  "@assistant-ui/react-markdown": "workspace:*",
334
334
  "@assistant-ui/ui": "workspace:*",
335
- "ai": "^6.0.111",
335
+ "ai": "^6.0.138",
336
336
  "class-variance-authority": "^0.7.1",
337
337
  "clsx": "^2.1.1",
338
- "lucide-react": "^0.576.0",
339
- "next": "^16.1.6",
338
+ "lucide-react": "^1.7.0",
339
+ "next": "^16.2.1",
340
340
  "react": "^19.2.4",
341
341
  "react-dom": "^19.2.4",
342
342
  "tailwind-merge": "^3.5.0"
343
343
  },
344
344
  "devDependencies": {
345
345
  "@assistant-ui/x-buildutils": "workspace:*",
346
- "@tailwindcss/postcss": "^4.2.1",
347
- "@types/node": "^25.3.3",
346
+ "@tailwindcss/postcss": "^4.2.2",
347
+ "@types/node": "^25.5.0",
348
348
  "@types/react": "^19.2.14",
349
349
  "@types/react-dom": "^19.2.3",
350
350
  "postcss": "^8.5.8",
351
- "tailwindcss": "^4.2.1",
351
+ "tailwindcss": "^4.2.2",
352
352
  "tw-animate-css": "^1.4.0",
353
- "typescript": "^5.9.3"
353
+ "typescript": "5.9.3"
354
354
  }
355
355
  }
356
356
 
@@ -209,8 +209,8 @@ export default function RootLayout({
209
209
  import type { ReactNode } from "react";
210
210
  import {
211
211
  AssistantRuntimeProvider,
212
- unstable_useRemoteThreadListRuntime as useRemoteThreadListRuntime,
213
- type unstable_RemoteThreadListAdapter as RemoteThreadListAdapter,
212
+ useRemoteThreadListRuntime,
213
+ type RemoteThreadListAdapter,
214
214
  } from "@assistant-ui/react";
215
215
  import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
216
216
  import { createAssistantStream } from "assistant-stream";
@@ -414,17 +414,17 @@ export default nextConfig;
414
414
  "start": "next start"
415
415
  },
416
416
  "dependencies": {
417
- "@ai-sdk/openai": "^3.0.39",
417
+ "@ai-sdk/openai": "^3.0.48",
418
418
  "@assistant-ui/react": "workspace:*",
419
419
  "@assistant-ui/react-ai-sdk": "workspace:*",
420
420
  "@assistant-ui/react-markdown": "workspace:*",
421
421
  "@assistant-ui/ui": "workspace:*",
422
- "ai": "^6.0.111",
422
+ "ai": "^6.0.138",
423
423
  "assistant-stream": "workspace:*",
424
424
  "class-variance-authority": "^0.7.1",
425
425
  "clsx": "^2.1.1",
426
- "lucide-react": "^0.576.0",
427
- "next": "^16.1.6",
426
+ "lucide-react": "^1.7.0",
427
+ "next": "^16.2.1",
428
428
  "react": "^19.2.4",
429
429
  "react-dom": "^19.2.4",
430
430
  "tailwind-merge": "^3.5.0",
@@ -432,14 +432,14 @@ export default nextConfig;
432
432
  },
433
433
  "devDependencies": {
434
434
  "@assistant-ui/x-buildutils": "workspace:*",
435
- "@tailwindcss/postcss": "^4.2.1",
436
- "@types/node": "^25.3.3",
435
+ "@tailwindcss/postcss": "^4.2.2",
436
+ "@types/node": "^25.5.0",
437
437
  "@types/react": "^19.2.14",
438
438
  "@types/react-dom": "^19.2.3",
439
439
  "postcss": "^8.5.8",
440
- "tailwindcss": "^4.2.1",
440
+ "tailwindcss": "^4.2.2",
441
441
  "tw-animate-css": "^1.4.0",
442
- "typescript": "^5.9.3"
442
+ "typescript": "5.9.3"
443
443
  }
444
444
  }
445
445
 
@@ -562,34 +562,34 @@ export default nextConfig;
562
562
  "version": "0.0.0",
563
563
  "type": "module",
564
564
  "dependencies": {
565
- "@ai-sdk/openai": "^3.0.39",
566
- "@ai-sdk/react": "^3.0.113",
565
+ "@ai-sdk/openai": "^3.0.48",
566
+ "@ai-sdk/react": "^3.0.140",
567
567
  "@assistant-ui/react": "workspace:^",
568
568
  "@assistant-ui/react-ai-sdk": "workspace:*",
569
569
  "@assistant-ui/react-markdown": "workspace:^",
570
570
  "@assistant-ui/ui": "workspace:*",
571
- "@elevenlabs/client": "^0.15.0",
572
- "@tailwindcss/postcss": "^4.2.1",
573
- "ai": "^6.0.111",
571
+ "@elevenlabs/client": "^0.16.0",
572
+ "@tailwindcss/postcss": "^4.2.2",
573
+ "ai": "^6.0.138",
574
574
  "class-variance-authority": "^0.7.1",
575
575
  "clsx": "^2.1.1",
576
- "lucide-react": "^0.576.0",
577
- "motion": "^12.34.5",
578
- "next": "^16.1.6",
576
+ "lucide-react": "^1.7.0",
577
+ "motion": "^12.38.0",
578
+ "next": "^16.2.1",
579
579
  "postcss": "^8.5.8",
580
580
  "react": "^19.2.4",
581
581
  "react-dom": "^19.2.4",
582
582
  "tailwind-merge": "^3.5.0",
583
- "tailwindcss": "^4.2.1",
583
+ "tailwindcss": "^4.2.2",
584
584
  "zod": "^4.3.6"
585
585
  },
586
586
  "devDependencies": {
587
587
  "@assistant-ui/x-buildutils": "workspace:*",
588
- "@types/node": "^25.3.3",
588
+ "@types/node": "^25.5.0",
589
589
  "@types/react": "^19.2.14",
590
590
  "@types/react-dom": "^19.2.3",
591
591
  "tw-animate-css": "^1.4.0",
592
- "typescript": "^5.9.3"
592
+ "typescript": "5.9.3"
593
593
  },
594
594
  "scripts": {
595
595
  "dev": "next dev",