@assistant-ui/mcp-docs-server 0.1.29 → 0.1.31

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 (214) hide show
  1. package/.docs/organized/code-examples/waterfall.md +15 -7
  2. package/.docs/organized/code-examples/with-a2a.md +9 -21
  3. package/.docs/organized/code-examples/with-ag-ui.md +11 -8
  4. package/.docs/organized/code-examples/with-ai-sdk-v6.md +10 -10
  5. package/.docs/organized/code-examples/with-artifacts.md +12 -10
  6. package/.docs/organized/code-examples/with-assistant-transport.md +11 -12
  7. package/.docs/organized/code-examples/with-chain-of-thought.md +83 -54
  8. package/.docs/organized/code-examples/with-cloud-standalone.md +14 -11
  9. package/.docs/organized/code-examples/with-cloud.md +9 -10
  10. package/.docs/organized/code-examples/with-custom-thread-list.md +61 -16
  11. package/.docs/organized/code-examples/with-elevenlabs-conversational.md +17 -12
  12. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +13 -13
  13. package/.docs/organized/code-examples/with-expo.md +25 -21
  14. package/.docs/organized/code-examples/with-external-store.md +8 -8
  15. package/.docs/organized/code-examples/with-ffmpeg.md +17 -12
  16. package/.docs/organized/code-examples/with-generative-ui.md +9 -9
  17. package/.docs/organized/code-examples/with-google-adk.md +8 -8
  18. package/.docs/organized/code-examples/with-heat-graph.md +5 -5
  19. package/.docs/organized/code-examples/with-interactables.md +10 -25
  20. package/.docs/organized/code-examples/with-langchain.md +437 -0
  21. package/.docs/organized/code-examples/with-langgraph.md +16 -16
  22. package/.docs/organized/code-examples/with-livekit.md +18 -13
  23. package/.docs/organized/code-examples/with-opencode.md +105 -62
  24. package/.docs/organized/code-examples/with-parent-id-grouping.md +10 -10
  25. package/.docs/organized/code-examples/with-react-hook-form.md +220 -148
  26. package/.docs/organized/code-examples/with-react-ink.md +2 -2
  27. package/.docs/organized/code-examples/with-react-router.md +12 -12
  28. package/.docs/organized/code-examples/with-store.md +8 -5
  29. package/.docs/organized/code-examples/with-tanstack.md +10 -10
  30. package/.docs/organized/code-examples/with-tap-runtime.md +10 -6
  31. package/.docs/raw/docs/(docs)/cli.mdx +2 -1
  32. package/.docs/raw/docs/(docs)/copilots/assistant-frame.mdx +1 -0
  33. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +10 -3
  34. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +8 -3
  35. package/.docs/raw/docs/(docs)/copilots/make-assistant-visible.mdx +1 -0
  36. package/.docs/raw/docs/(docs)/copilots/model-context.mdx +1 -0
  37. package/.docs/raw/docs/(docs)/copilots/motivation.mdx +1 -0
  38. package/.docs/raw/docs/(docs)/copilots/use-assistant-instructions.mdx +1 -0
  39. package/.docs/raw/docs/(docs)/devtools.mdx +1 -0
  40. package/.docs/raw/docs/(docs)/index.mdx +1 -0
  41. package/.docs/raw/docs/(docs)/installation.mdx +1 -0
  42. package/.docs/raw/docs/(docs)/rtl.mdx +80 -0
  43. package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +34 -0
  44. package/.docs/raw/docs/(reference)/api-reference/adapters/feedback-speech.mdx +41 -0
  45. package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +26 -0
  46. package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +34 -0
  47. package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +31 -0
  48. package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +20 -0
  49. package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +26 -0
  50. package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +72 -0
  51. package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +41 -0
  52. package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +48 -0
  53. package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +30 -0
  54. package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +23 -0
  55. package/.docs/raw/docs/(reference)/api-reference/overview.mdx +21 -0
  56. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +7 -0
  57. package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +149 -40
  58. package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +65 -0
  59. package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +2 -0
  60. package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +50 -6
  61. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +15 -0
  62. package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +36 -1
  63. package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +38 -0
  64. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +9 -0
  65. package/.docs/raw/docs/(reference)/migrations/v0-14.mdx +144 -6
  66. package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +231 -3
  67. package/.docs/raw/docs/cloud/ai-sdk.mdx +221 -3
  68. package/.docs/raw/docs/cloud/langgraph.mdx +274 -2
  69. package/.docs/raw/docs/{(docs)/guides → guides}/attachments.mdx +41 -36
  70. package/.docs/raw/docs/guides/branching.mdx +76 -0
  71. package/.docs/raw/docs/guides/chain-of-thought.mdx +166 -0
  72. package/.docs/raw/docs/{(docs)/guides → guides}/context-api.mdx +50 -22
  73. package/.docs/raw/docs/{(docs)/guides → guides}/dictation.mdx +2 -0
  74. package/.docs/raw/docs/guides/editing.mdx +102 -0
  75. package/.docs/raw/docs/guides/index.mdx +103 -0
  76. package/.docs/raw/docs/{(docs)/guides → guides}/interactables.mdx +49 -0
  77. package/.docs/raw/docs/{(docs)/guides → guides}/latex.mdx +51 -8
  78. package/.docs/raw/docs/guides/mentions.mdx +520 -0
  79. package/.docs/raw/docs/{(docs)/guides → guides}/message-timing.mdx +8 -2
  80. package/.docs/raw/docs/{(docs)/guides → guides}/multi-agent.mdx +64 -4
  81. package/.docs/raw/docs/{(docs)/guides → guides}/quoting.mdx +10 -17
  82. package/.docs/raw/docs/guides/slash-commands.mdx +361 -0
  83. package/.docs/raw/docs/guides/speech.mdx +156 -0
  84. package/.docs/raw/docs/{(docs)/guides → guides}/suggestions.mdx +21 -83
  85. package/.docs/raw/docs/{(docs)/guides → guides}/tool-ui.mdx +108 -36
  86. package/.docs/raw/docs/{(docs)/guides → guides}/tools.mdx +131 -35
  87. package/.docs/raw/docs/{(docs)/guides → guides}/voice.mdx +39 -0
  88. package/.docs/raw/docs/ink/index.mdx +1 -3
  89. package/.docs/raw/docs/ink/migration.mdx +1 -3
  90. package/.docs/raw/docs/ink/primitives.mdx +37 -1
  91. package/.docs/raw/docs/integrations/attachments/custom-adapter.mdx +520 -0
  92. package/.docs/raw/docs/integrations/auth/better-auth.mdx +191 -0
  93. package/.docs/raw/docs/integrations/auth/clerk.mdx +172 -0
  94. package/.docs/raw/docs/integrations/auth/next-auth.mdx +196 -0
  95. package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +79 -0
  96. package/.docs/raw/docs/integrations/frameworks/mastra/full-stack.mdx +188 -0
  97. package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +57 -0
  98. package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +201 -0
  99. package/.docs/raw/docs/integrations/gateways/index.mdx +157 -0
  100. package/.docs/raw/docs/integrations/index.mdx +173 -0
  101. package/.docs/raw/docs/integrations/observability/helicone.mdx +130 -0
  102. package/.docs/raw/docs/integrations/observability/langfuse.mdx +156 -0
  103. package/.docs/raw/docs/integrations/observability/langsmith.mdx +146 -0
  104. package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +712 -0
  105. package/.docs/raw/docs/integrations/tools/mcp.mdx +267 -0
  106. package/.docs/raw/docs/primitives/action-bar.mdx +1 -0
  107. package/.docs/raw/docs/primitives/assistant-modal.mdx +1 -0
  108. package/.docs/raw/docs/primitives/attachment.mdx +1 -0
  109. package/.docs/raw/docs/primitives/branch-picker.mdx +1 -0
  110. package/.docs/raw/docs/primitives/chain-of-thought.mdx +90 -85
  111. package/.docs/raw/docs/primitives/composer.mdx +96 -63
  112. package/.docs/raw/docs/primitives/error.mdx +1 -0
  113. package/.docs/raw/docs/primitives/index.mdx +2 -1
  114. package/.docs/raw/docs/primitives/message.mdx +68 -5
  115. package/.docs/raw/docs/primitives/selection-toolbar.mdx +1 -0
  116. package/.docs/raw/docs/primitives/suggestion.mdx +1 -0
  117. package/.docs/raw/docs/primitives/thread-list.mdx +39 -0
  118. package/.docs/raw/docs/primitives/thread.mdx +16 -13
  119. package/.docs/raw/docs/react-native/index.mdx +1 -3
  120. package/.docs/raw/docs/react-native/migration.mdx +1 -3
  121. package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +396 -0
  122. package/.docs/raw/docs/runtimes/a2a/overview.mdx +60 -0
  123. package/.docs/raw/docs/runtimes/a2a/quickstart.mdx +216 -0
  124. package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +70 -0
  125. package/.docs/raw/docs/runtimes/ag-ui/quickstart.mdx +243 -0
  126. package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +123 -0
  127. package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +52 -0
  128. package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +71 -131
  129. package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +69 -63
  130. package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +365 -101
  131. package/.docs/raw/docs/runtimes/concepts/adapters.mdx +265 -0
  132. package/.docs/raw/docs/runtimes/concepts/architecture.mdx +125 -0
  133. package/.docs/raw/docs/runtimes/concepts/stability.mdx +67 -0
  134. package/.docs/raw/docs/runtimes/concepts/threads.mdx +428 -0
  135. package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +703 -0
  136. package/.docs/raw/docs/runtimes/custom/data-stream.mdx +323 -0
  137. package/.docs/raw/docs/runtimes/custom/external-store.mdx +253 -1236
  138. package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +746 -0
  139. package/.docs/raw/docs/runtimes/custom/overview.mdx +71 -0
  140. package/.docs/raw/docs/runtimes/google-adk/api.mdx +256 -0
  141. package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +717 -0
  142. package/.docs/raw/docs/runtimes/google-adk/overview.mdx +69 -0
  143. package/.docs/raw/docs/runtimes/google-adk/quickstart.mdx +229 -0
  144. package/.docs/raw/docs/runtimes/langchain.mdx +533 -0
  145. package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +305 -0
  146. package/.docs/raw/docs/runtimes/langgraph/interrupts.mdx +104 -0
  147. package/.docs/raw/docs/runtimes/langgraph/overview.mdx +84 -0
  148. package/.docs/raw/docs/runtimes/langgraph/quickstart.mdx +496 -0
  149. package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +127 -0
  150. package/.docs/raw/docs/runtimes/langgraph/threads.mdx +113 -0
  151. package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +3 -3
  152. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +0 -23
  153. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +1 -1
  154. package/.docs/raw/docs/runtimes/opencode/hooks.mdx +191 -0
  155. package/.docs/raw/docs/runtimes/opencode/overview.mdx +48 -0
  156. package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +119 -0
  157. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +74 -198
  158. package/.docs/raw/docs/ui/accordion.mdx +1 -0
  159. package/.docs/raw/docs/ui/assistant-modal.mdx +1 -0
  160. package/.docs/raw/docs/ui/assistant-sidebar.mdx +1 -0
  161. package/.docs/raw/docs/ui/attachment.mdx +1 -0
  162. package/.docs/raw/docs/ui/badge.mdx +1 -0
  163. package/.docs/raw/docs/ui/composer-trigger-popover.mdx +200 -0
  164. package/.docs/raw/docs/ui/context-display.mdx +1 -0
  165. package/.docs/raw/docs/ui/diff-viewer.mdx +1 -0
  166. package/.docs/raw/docs/ui/directive-text.mdx +114 -0
  167. package/.docs/raw/docs/ui/file.mdx +1 -0
  168. package/.docs/raw/docs/ui/image.mdx +1 -0
  169. package/.docs/raw/docs/ui/markdown.mdx +2 -14
  170. package/.docs/raw/docs/ui/mermaid.mdx +1 -0
  171. package/.docs/raw/docs/ui/message-timing.mdx +3 -2
  172. package/.docs/raw/docs/ui/model-selector.mdx +1 -0
  173. package/.docs/raw/docs/ui/part-grouping.mdx +325 -313
  174. package/.docs/raw/docs/ui/quote.mdx +1 -0
  175. package/.docs/raw/docs/ui/reasoning.mdx +69 -32
  176. package/.docs/raw/docs/ui/scrollbar.mdx +1 -0
  177. package/.docs/raw/docs/ui/select.mdx +1 -0
  178. package/.docs/raw/docs/ui/sources.mdx +1 -0
  179. package/.docs/raw/docs/ui/streamdown.mdx +1 -0
  180. package/.docs/raw/docs/ui/syntax-highlighting.mdx +1 -0
  181. package/.docs/raw/docs/ui/tabs.mdx +1 -0
  182. package/.docs/raw/docs/ui/thread-list.mdx +17 -0
  183. package/.docs/raw/docs/ui/thread.mdx +56 -1
  184. package/.docs/raw/docs/ui/tool-fallback.mdx +1 -0
  185. package/.docs/raw/docs/ui/tool-group.mdx +39 -11
  186. package/.docs/raw/docs/ui/voice.mdx +1 -0
  187. package/.docs/raw/docs/utilities/heat-graph.mdx +1 -0
  188. package/.docs/raw/docs/utilities/react-o11y.mdx +278 -0
  189. package/.docs/raw/docs/utilities/tw-shimmer.mdx +1 -0
  190. package/dist/utils/logger.js +1 -1
  191. package/dist/utils/logger.js.map +1 -1
  192. package/package.json +4 -4
  193. package/src/tools/tests/path-traversal.test.ts +1 -1
  194. package/src/utils/logger.ts +1 -1
  195. package/.docs/raw/docs/(docs)/guides/branching.mdx +0 -65
  196. package/.docs/raw/docs/(docs)/guides/chain-of-thought.mdx +0 -164
  197. package/.docs/raw/docs/(docs)/guides/editing.mdx +0 -66
  198. package/.docs/raw/docs/(docs)/guides/mentions.mdx +0 -406
  199. package/.docs/raw/docs/(docs)/guides/slash-commands.mdx +0 -275
  200. package/.docs/raw/docs/(docs)/guides/speech.mdx +0 -38
  201. package/.docs/raw/docs/runtimes/a2a/index.mdx +0 -298
  202. package/.docs/raw/docs/runtimes/assistant-transport.mdx +0 -1033
  203. package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +0 -268
  204. package/.docs/raw/docs/runtimes/custom/local.mdx +0 -1464
  205. package/.docs/raw/docs/runtimes/data-stream.mdx +0 -422
  206. package/.docs/raw/docs/runtimes/google-adk/index.mdx +0 -686
  207. package/.docs/raw/docs/runtimes/helicone.mdx +0 -61
  208. package/.docs/raw/docs/runtimes/langgraph/index.mdx +0 -607
  209. package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +0 -12
  210. package/.docs/raw/docs/runtimes/langserve.mdx +0 -116
  211. package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +0 -218
  212. package/.docs/raw/docs/runtimes/mastra/overview.mdx +0 -18
  213. package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +0 -217
  214. package/.docs/raw/docs/ui/mention.mdx +0 -168
@@ -4,7 +4,12 @@
4
4
 
5
5
  ```typescript
6
6
  import { openai } from "@ai-sdk/openai";
7
- import { streamText, UIMessage, convertToModelMessages, stepCountIs } from "ai";
7
+ import {
8
+ streamText,
9
+ type UIMessage,
10
+ convertToModelMessages,
11
+ stepCountIs,
12
+ } from "ai";
8
13
 
9
14
  export const maxDuration = 30;
10
15
 
@@ -548,27 +553,27 @@ export default nextConfig;
548
553
  "version": "0.0.0",
549
554
  "type": "module",
550
555
  "dependencies": {
551
- "@ai-sdk/openai": "^3.0.52",
552
- "@ai-sdk/react": "^3.0.161",
556
+ "@ai-sdk/openai": "^3.0.61",
557
+ "@ai-sdk/react": "^3.0.177",
553
558
  "@assistant-ui/react": "workspace:^",
554
559
  "@assistant-ui/react-ai-sdk": "workspace:*",
555
560
  "@assistant-ui/react-markdown": "workspace:^",
556
561
  "@assistant-ui/ui": "workspace:*",
557
- "@tailwindcss/postcss": "^4.2.2",
558
- "ai": "^6.0.159",
562
+ "@tailwindcss/postcss": "^4.2.4",
563
+ "ai": "^6.0.175",
559
564
  "class-variance-authority": "^0.7.1",
560
565
  "clsx": "^2.1.1",
561
- "livekit-client": "^2.18.1",
562
- "livekit-server-sdk": "^2.15.1",
563
- "lucide-react": "^1.8.0",
566
+ "livekit-client": "^2.18.9",
567
+ "livekit-server-sdk": "^2.15.2",
568
+ "lucide-react": "^1.14.0",
564
569
  "motion": "^12.38.0",
565
- "next": "^16.2.3",
566
- "postcss": "^8.5.9",
570
+ "next": "^16.2.4",
571
+ "postcss": "^8.5.14",
567
572
  "react": "^19.2.5",
568
573
  "react-dom": "^19.2.5",
569
574
  "tailwind-merge": "^3.5.0",
570
- "tailwindcss": "^4.2.2",
571
- "zod": "^4.3.6"
575
+ "tailwindcss": "^4.2.4",
576
+ "zod": "^4.4.3"
572
577
  },
573
578
  "devDependencies": {
574
579
  "@assistant-ui/x-buildutils": "workspace:*",
@@ -576,7 +581,7 @@ export default nextConfig;
576
581
  "@types/react": "^19.2.14",
577
582
  "@types/react-dom": "^19.2.3",
578
583
  "tw-animate-css": "^1.4.0",
579
- "typescript": "^6.0.2"
584
+ "typescript": "^6.0.3"
580
585
  },
581
586
  "scripts": {
582
587
  "dev": "next dev",
@@ -205,7 +205,7 @@ import { Thread } from "../components/assistant-ui/thread";
205
205
  export default function Home() {
206
206
  const runtime = useOpenCodeRuntime({
207
207
  baseUrl:
208
- process.env["NEXT_PUBLIC_OPENCODE_BASE_URL"] ?? "http://localhost:4096",
208
+ process.env.NEXT_PUBLIC_OPENCODE_BASE_URL ?? "http://localhost:4096",
209
209
  });
210
210
 
211
211
  return (
@@ -394,7 +394,7 @@ import {
394
394
  AskQuestionInline,
395
395
  withOpenCodeToolInteractions,
396
396
  } from "@/components/tools/opencode-tool-interactions";
397
- import { ReasoningGroup } from "@/components/tools/reasoning-ghost";
397
+ import { ReasoningGroup as ReasoningGhostGroup } from "@/components/tools/reasoning-ghost";
398
398
  import { BashTerminal } from "@/components/tools/tool-ui-bash";
399
399
  import { ApplyPatchDiff } from "@/components/tools/tool-ui-apply-patch";
400
400
  import {
@@ -407,7 +407,7 @@ import {
407
407
  WebSearchInline,
408
408
  WriteInline,
409
409
  } from "@/components/tools/tool-ui-inline";
410
- import { ToolGroup } from "@/components/tools/tool-group";
410
+ import { ToolGroup as ToolCallGroup } from "@/components/tools/tool-group";
411
411
  import { TooltipIconButton } from "@/components/assistant-ui/tooltip-icon-button";
412
412
  import { OpenCodeDataPart } from "@/components/opencode-data-part";
413
413
  import { Button } from "@/components/ui/button";
@@ -437,7 +437,7 @@ import {
437
437
  RefreshCwIcon,
438
438
  SquareIcon,
439
439
  } from "lucide-react";
440
- import type { FC } from "react";
440
+ import type { ComponentProps, FC } from "react";
441
441
 
442
442
  const ReadTool = withOpenCodeToolInteractions(ReadInline);
443
443
  const EditTool = withOpenCodeToolInteractions(EditInline);
@@ -451,6 +451,44 @@ const ApplyPatchTool = withOpenCodeToolInteractions(ApplyPatchDiff);
451
451
  const AskQuestionTool = withOpenCodeToolInteractions(AskQuestionInline);
452
452
  const FallbackTool = withOpenCodeToolInteractions(ToolCallFallback);
453
453
 
454
+ const renderOpenCodeTool = (
455
+ part: Extract<
456
+ Parameters<
457
+ NonNullable<
458
+ ComponentProps<typeof MessagePrimitive.GroupedParts>["children"]
459
+ >
460
+ >[0]["part"],
461
+ { type: "tool-call" }
462
+ >,
463
+ ) => {
464
+ switch (part.toolName) {
465
+ case "read":
466
+ return <ReadTool {...part} />;
467
+ case "edit":
468
+ return <EditTool {...part} />;
469
+ case "write":
470
+ return <WriteTool {...part} />;
471
+ case "bash":
472
+ return <BashTool {...part} />;
473
+ case "grep":
474
+ return <GrepTool {...part} />;
475
+ case "glob":
476
+ return <GlobTool {...part} />;
477
+ case "webSearch":
478
+ return <WebSearchTool {...part} />;
479
+ case "webFetch":
480
+ return <WebFetchTool {...part} />;
481
+ case "apply_patch":
482
+ return <ApplyPatchTool {...part} />;
483
+ case "ask_question":
484
+ case "request_user_input":
485
+ case "requestUserInput":
486
+ return <AskQuestionTool {...part} />;
487
+ default:
488
+ return <FallbackTool {...part} />;
489
+ }
490
+ };
491
+
454
492
  export const Thread: FC = () => {
455
493
  return (
456
494
  <ThreadPrimitive.Root
@@ -624,44 +662,40 @@ const AssistantMessage: FC = () => {
624
662
  data-role="assistant"
625
663
  >
626
664
  <div className="aui-assistant-message-content wrap-break-word px-2 text-foreground leading-relaxed">
627
- <MessagePrimitive.Parts
628
- components={{
629
- Text: MarkdownText,
630
- Reasoning,
631
- ReasoningGroup,
632
- tools: {
633
- by_name: {
634
- read: ReadTool,
635
- edit: EditTool,
636
- write: WriteTool,
637
- bash: BashTool,
638
- grep: GrepTool,
639
- glob: GlobTool,
640
- webSearch: WebSearchTool,
641
- webFetch: WebFetchTool,
642
- apply_patch: ApplyPatchTool,
643
- ask_question: AskQuestionTool,
644
- request_user_input: AskQuestionTool,
645
- requestUserInput: AskQuestionTool,
646
- },
647
- Fallback: FallbackTool,
648
- },
649
- ToolGroup,
650
- data: {
651
- by_name: {
652
- "opencode-step-start": OpenCodeDataPart,
653
- "opencode-step-finish": OpenCodeDataPart,
654
- "opencode-patch": OpenCodeDataPart,
655
- "opencode-snapshot": OpenCodeDataPart,
656
- "opencode-retry": OpenCodeDataPart,
657
- "opencode-compaction": OpenCodeDataPart,
658
- "opencode-agent": OpenCodeDataPart,
659
- "opencode-subtask": OpenCodeDataPart,
660
- },
661
- Fallback: OpenCodeDataPart,
662
- },
665
+ <MessagePrimitive.GroupedParts
666
+ groupBy={(part) => {
667
+ if (part.type === "reasoning")
668
+ return ["group-chainOfThought", "group-reasoning"];
669
+ if (part.type === "tool-call")
670
+ return ["group-chainOfThought", "group-tool"];
671
+ return null;
663
672
  }}
664
- />
673
+ >
674
+ {({ part, children }) => {
675
+ switch (part.type) {
676
+ case "group-chainOfThought":
677
+ return <div data-slot="aui_chain-of-thought">{children}</div>;
678
+ case "group-reasoning":
679
+ return (
680
+ <ReasoningGhostGroup group={part}>
681
+ {children}
682
+ </ReasoningGhostGroup>
683
+ );
684
+ case "group-tool":
685
+ return <ToolCallGroup group={part}>{children}</ToolCallGroup>;
686
+ case "text":
687
+ return <MarkdownText />;
688
+ case "reasoning":
689
+ return <Reasoning {...part} />;
690
+ case "tool-call":
691
+ return renderOpenCodeTool(part);
692
+ case "data":
693
+ return <OpenCodeDataPart {...part} />;
694
+ default:
695
+ return null;
696
+ }
697
+ }}
698
+ </MessagePrimitive.GroupedParts>
665
699
  <MessageError />
666
700
  </div>
667
701
 
@@ -1572,16 +1606,21 @@ AskQuestionInline.displayName = "AskQuestionInline";
1572
1606
  ```tsx
1573
1607
  "use client";
1574
1608
 
1575
- import { memo } from "react";
1609
+ import { memo, type FC, type PropsWithChildren } from "react";
1576
1610
  import { BrainIcon } from "lucide-react";
1577
- import { useAuiState, type ReasoningGroupComponent } from "@assistant-ui/react";
1611
+ import { useAuiState } from "@assistant-ui/react";
1578
1612
  import { cn } from "@/lib/utils";
1579
1613
 
1580
- const ReasoningGroupImpl: ReasoningGroupComponent = ({
1581
- children,
1582
- startIndex,
1583
- endIndex,
1584
- }) => {
1614
+ type GroupedPartsGroup = {
1615
+ indices: readonly number[];
1616
+ };
1617
+
1618
+ const ReasoningGroupImpl: FC<
1619
+ PropsWithChildren<{ group: GroupedPartsGroup }>
1620
+ > = ({ children, group }) => {
1621
+ const startIndex = group.indices[0]!;
1622
+ const endIndex = group.indices.at(-1)!;
1623
+
1585
1624
  const isMultiLine = useAuiState((s) => {
1586
1625
  let totalLength = 0;
1587
1626
  for (let i = startIndex; i <= endIndex; i++) {
@@ -1630,10 +1669,16 @@ import { cn } from "@/lib/utils";
1630
1669
  import { useAuiState } from "@assistant-ui/react";
1631
1670
  import { memo, type FC, type PropsWithChildren } from "react";
1632
1671
 
1633
- // ── ToolGroup — lightweight wrapper for spacing ─────────────────────────
1672
+ type GroupedPartsGroup = {
1673
+ indices: readonly number[];
1674
+ };
1675
+
1634
1676
  export const ToolGroupImpl: FC<
1635
- PropsWithChildren<{ startIndex: number; endIndex: number }>
1636
- > = ({ children, startIndex, endIndex }) => {
1677
+ PropsWithChildren<{ group: GroupedPartsGroup }>
1678
+ > = ({ children, group }) => {
1679
+ const startIndex = group.indices[0]!;
1680
+ const endIndex = group.indices.at(-1)!;
1681
+
1637
1682
  const textBefore = useAuiState((s) => {
1638
1683
  for (let i = startIndex - 1; i >= 0; i--) {
1639
1684
  const type = s.message.parts[i]?.type;
@@ -1716,9 +1761,7 @@ function parseClaudePatchBlocks(patchText: string): PatchBlock[] {
1716
1761
  const headerRegex = /^\*\*\*\s+(Update|Add|Delete)\s+File:\s+(.+)$/gm;
1717
1762
  const blocks: PatchBlock[] = [];
1718
1763
  let lastIndex = 0;
1719
- let match;
1720
-
1721
- while ((match = headerRegex.exec(cleaned)) !== null) {
1764
+ for (const match of cleaned.matchAll(headerRegex)) {
1722
1765
  if (blocks.length > 0) {
1723
1766
  blocks[blocks.length - 1]!.body = cleaned.slice(lastIndex, match.index);
1724
1767
  }
@@ -2326,26 +2369,26 @@ export default nextConfig;
2326
2369
  "@assistant-ui/react-markdown": "workspace:*",
2327
2370
  "@assistant-ui/react-opencode": "workspace:*",
2328
2371
  "@assistant-ui/ui": "workspace:*",
2329
- "@pierre/diffs": "^1.1.15",
2372
+ "@pierre/diffs": "^1.1.20",
2330
2373
  "class-variance-authority": "^0.7.1",
2331
2374
  "clsx": "^2.1.1",
2332
- "lucide-react": "^1.8.0",
2333
- "next": "^16.2.3",
2375
+ "lucide-react": "^1.14.0",
2376
+ "next": "^16.2.4",
2334
2377
  "react": "^19.2.5",
2335
2378
  "react-dom": "^19.2.5",
2336
2379
  "tailwind-merge": "^3.5.0",
2337
- "zod": "^4.3.6"
2380
+ "zod": "^4.4.3"
2338
2381
  },
2339
2382
  "devDependencies": {
2340
2383
  "@assistant-ui/x-buildutils": "workspace:*",
2341
- "@tailwindcss/postcss": "^4.2.2",
2384
+ "@tailwindcss/postcss": "^4.2.4",
2342
2385
  "@types/node": "^25.6.0",
2343
2386
  "@types/react": "^19.2.14",
2344
2387
  "@types/react-dom": "^19.2.3",
2345
- "postcss": "^8.5.9",
2346
- "tailwindcss": "^4.2.2",
2388
+ "postcss": "^8.5.14",
2389
+ "tailwindcss": "^4.2.4",
2347
2390
  "tw-animate-css": "^1.4.0",
2348
- "typescript": "^6.0.2"
2391
+ "typescript": "^6.0.3"
2349
2392
  }
2350
2393
  }
2351
2394
 
@@ -163,8 +163,8 @@ export default function RootLayout({
163
163
  "use client";
164
164
 
165
165
  import {
166
- ThreadMessageLike,
167
- AppendMessage,
166
+ type ThreadMessageLike,
167
+ type AppendMessage,
168
168
  AssistantRuntimeProvider,
169
169
  useExternalStoreRuntime,
170
170
  } from "@assistant-ui/react";
@@ -474,28 +474,28 @@ export default nextConfig;
474
474
  "start": "next start"
475
475
  },
476
476
  "dependencies": {
477
- "@ai-sdk/openai": "^3.0.52",
477
+ "@ai-sdk/openai": "^3.0.61",
478
478
  "@assistant-ui/react": "workspace:*",
479
479
  "@assistant-ui/react-markdown": "workspace:*",
480
480
  "@assistant-ui/ui": "workspace:*",
481
481
  "class-variance-authority": "^0.7.1",
482
482
  "clsx": "^2.1.1",
483
- "lucide-react": "^1.8.0",
484
- "next": "^16.2.3",
483
+ "lucide-react": "^1.14.0",
484
+ "next": "^16.2.4",
485
485
  "react": "^19.2.5",
486
486
  "react-dom": "^19.2.5",
487
487
  "tailwind-merge": "^3.5.0"
488
488
  },
489
489
  "devDependencies": {
490
490
  "@assistant-ui/x-buildutils": "workspace:*",
491
- "@tailwindcss/postcss": "^4.2.2",
491
+ "@tailwindcss/postcss": "^4.2.4",
492
492
  "@types/node": "^25.6.0",
493
493
  "@types/react": "^19.2.14",
494
494
  "@types/react-dom": "^19.2.3",
495
- "postcss": "^8.5.9",
496
- "tailwindcss": "^4.2.2",
495
+ "postcss": "^8.5.14",
496
+ "tailwindcss": "^4.2.4",
497
497
  "tw-animate-css": "^1.4.0",
498
- "typescript": "^6.0.2"
498
+ "typescript": "^6.0.3"
499
499
  }
500
500
  }
501
501
 
@@ -552,7 +552,7 @@ Open [http://localhost:3000](http://localhost:3000) to see the example.
552
552
  }
553
553
  ```
554
554
 
555
- 2. **Grouping Component**: Uses `MessagePrimitive.Unstable_PartsGroupedByParentId` which automatically groups parts by their `parentId`
555
+ 2. **Non-adjacent grouping component**: Uses the unstable `MessagePrimitive.Unstable_PartsGroupedByParentId` API to collect parts by `parentId`, even when related parts are not adjacent. For normal adjacent grouping, prefer `MessagePrimitive.GroupedParts`.
556
556
 
557
557
  3. **Custom Rendering**: The `ParentIdGroup` component provides collapsible sections for each group
558
558