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

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 (247) hide show
  1. package/.docs/organized/code-examples/waterfall.md +8 -8
  2. package/.docs/organized/code-examples/with-a2a.md +10 -10
  3. package/.docs/organized/code-examples/with-ag-ui.md +11 -11
  4. package/.docs/organized/code-examples/with-ai-sdk-v6.md +13 -13
  5. package/.docs/organized/code-examples/with-artifacts.md +13 -13
  6. package/.docs/organized/code-examples/with-assistant-transport.md +10 -10
  7. package/.docs/organized/code-examples/with-browser-extension.md +345 -0
  8. package/.docs/organized/code-examples/with-chain-of-thought.md +54 -17
  9. package/.docs/organized/code-examples/with-cloud-standalone.md +13 -13
  10. package/.docs/organized/code-examples/with-cloud.md +13 -13
  11. package/.docs/organized/code-examples/with-custom-thread-list.md +13 -13
  12. package/.docs/organized/code-examples/with-elevenlabs-conversational.md +17 -16
  13. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +17 -16
  14. package/.docs/organized/code-examples/with-expo.md +24 -24
  15. package/.docs/organized/code-examples/with-external-store.md +10 -10
  16. package/.docs/organized/code-examples/with-ffmpeg.md +13 -13
  17. package/.docs/organized/code-examples/with-generative-ui.md +210 -13
  18. package/.docs/organized/code-examples/with-google-adk.md +10 -10
  19. package/.docs/organized/code-examples/with-heat-graph.md +8 -8
  20. package/.docs/organized/code-examples/with-image-generation.md +454 -0
  21. package/.docs/organized/code-examples/with-interactables.md +13 -13
  22. package/.docs/organized/code-examples/with-langchain.md +12 -12
  23. package/.docs/organized/code-examples/with-langgraph.md +15 -12
  24. package/.docs/organized/code-examples/with-livekit.md +18 -17
  25. package/.docs/organized/code-examples/with-mcp.md +748 -0
  26. package/.docs/organized/code-examples/with-opencode.md +11 -11
  27. package/.docs/organized/code-examples/with-parent-id-grouping.md +11 -11
  28. package/.docs/organized/code-examples/with-react-hook-form.md +14 -14
  29. package/.docs/organized/code-examples/with-react-ink.md +4 -4
  30. package/.docs/organized/code-examples/with-react-router.md +15 -15
  31. package/.docs/organized/code-examples/with-resumable-stream.md +660 -0
  32. package/.docs/organized/code-examples/with-store.md +8 -8
  33. package/.docs/organized/code-examples/with-tanstack.md +14 -14
  34. package/.docs/organized/code-examples/with-tap-runtime.md +11 -10
  35. package/.docs/raw/docs/(docs)/cli.mdx +1 -0
  36. package/.docs/raw/docs/(docs)/index.mdx +2 -2
  37. package/.docs/raw/docs/(docs)/installation.mdx +1 -1
  38. package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +26 -24
  39. package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +20 -0
  40. package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +20 -12
  41. package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +44 -0
  42. package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +37 -16
  43. package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +12 -23
  44. package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +20 -0
  45. package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +37 -8
  46. package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +11 -9
  47. package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +64 -0
  48. package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +22 -0
  49. package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +52 -0
  50. package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +36 -0
  51. package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +98 -0
  52. package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +18 -13
  53. package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +18 -57
  54. package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +640 -0
  55. package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +15 -28
  56. package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +64 -18
  57. package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +434 -0
  58. package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +24 -0
  59. package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +11 -12
  60. package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +79 -0
  61. package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +52 -0
  62. package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +22 -0
  63. package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +20 -0
  64. package/.docs/raw/docs/(reference)/api-reference/overview.mdx +110 -131
  65. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +78 -221
  66. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +127 -242
  67. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +39 -20
  68. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +66 -87
  69. package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +50 -58
  70. package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +80 -48
  71. package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +67 -0
  72. package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +323 -461
  73. package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +36 -43
  74. package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +29 -24
  75. package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +63 -245
  76. package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +175 -591
  77. package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +65 -0
  78. package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +35 -22
  79. package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +57 -140
  80. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +70 -161
  81. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +84 -108
  82. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +77 -96
  83. package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +173 -349
  84. package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +9 -21
  85. package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +10 -21
  86. package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +15 -70
  87. package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +18 -13
  88. package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +25 -28
  89. package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +11 -63
  90. package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +20 -0
  91. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +11 -48
  92. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +10 -47
  93. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +18 -30
  94. package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +68 -0
  95. package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +39 -0
  96. package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +79 -0
  97. package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +42 -0
  98. package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +92 -0
  99. package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +48 -0
  100. package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +62 -0
  101. package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +22 -0
  102. package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +19 -0
  103. package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +131 -0
  104. package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +22 -0
  105. package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +54 -0
  106. package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +36 -0
  107. package/.docs/raw/docs/cloud/ai-sdk.mdx +1 -1
  108. package/.docs/raw/docs/cloud/index.mdx +2 -2
  109. package/.docs/raw/docs/guides/attachments.mdx +4 -4
  110. package/.docs/raw/docs/guides/branching.mdx +1 -1
  111. package/.docs/raw/docs/guides/chain-of-thought.mdx +5 -5
  112. package/.docs/raw/docs/guides/context-api.mdx +4 -4
  113. package/.docs/raw/docs/guides/dictation.mdx +2 -2
  114. package/.docs/raw/docs/guides/editing.mdx +1 -1
  115. package/.docs/raw/docs/guides/generative-ui.mdx +142 -0
  116. package/.docs/raw/docs/guides/image-generation.mdx +74 -0
  117. package/.docs/raw/docs/guides/index.mdx +2 -2
  118. package/.docs/raw/docs/guides/interactables.mdx +2 -2
  119. package/.docs/raw/docs/guides/latex.mdx +2 -2
  120. package/.docs/raw/docs/guides/mcp-apps.mdx +231 -0
  121. package/.docs/raw/docs/guides/mentions.mdx +2 -2
  122. package/.docs/raw/docs/guides/message-timing.mdx +38 -5
  123. package/.docs/raw/docs/guides/multi-agent.mdx +2 -2
  124. package/.docs/raw/docs/guides/quoting.mdx +1 -1
  125. package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +212 -0
  126. package/.docs/raw/docs/guides/resumable-stream-stores.mdx +152 -0
  127. package/.docs/raw/docs/guides/resumable-streams.mdx +210 -0
  128. package/.docs/raw/docs/guides/slash-commands.mdx +1 -1
  129. package/.docs/raw/docs/guides/speech.mdx +2 -2
  130. package/.docs/raw/docs/guides/suggestions.mdx +88 -4
  131. package/.docs/raw/docs/guides/tool-ui.mdx +2 -2
  132. package/.docs/raw/docs/guides/tools.mdx +66 -5
  133. package/.docs/raw/docs/guides/voice.mdx +2 -2
  134. package/.docs/raw/docs/ink/adapters.mdx +37 -1
  135. package/.docs/raw/docs/ink/custom-backend.mdx +59 -8
  136. package/.docs/raw/docs/ink/index.mdx +10 -11
  137. package/.docs/raw/docs/ink/primitives.mdx +349 -8
  138. package/.docs/raw/docs/integrations/auth/better-auth.mdx +1 -1
  139. package/.docs/raw/docs/integrations/auth/clerk.mdx +1 -1
  140. package/.docs/raw/docs/integrations/auth/next-auth.mdx +1 -1
  141. package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +2 -2
  142. package/.docs/raw/docs/integrations/frameworks/cloudflare-agents/overview.mdx +282 -0
  143. package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +2 -2
  144. package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +1 -1
  145. package/.docs/raw/docs/integrations/gateways/index.mdx +9 -4
  146. package/.docs/raw/docs/integrations/index.mdx +15 -3
  147. package/.docs/raw/docs/integrations/observability/langfuse.mdx +8 -1
  148. package/.docs/raw/docs/integrations/observability/langsmith.mdx +8 -4
  149. package/.docs/raw/docs/integrations/tools/react-mcp.mdx +337 -0
  150. package/.docs/raw/docs/primitives/composer.mdx +53 -0
  151. package/.docs/raw/docs/primitives/index.mdx +2 -2
  152. package/.docs/raw/docs/primitives/suggestion.mdx +9 -0
  153. package/.docs/raw/docs/react-native/hooks.mdx +2 -2
  154. package/.docs/raw/docs/react-native/index.mdx +4 -4
  155. package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +4 -4
  156. package/.docs/raw/docs/runtimes/a2a/overview.mdx +2 -2
  157. package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +2 -2
  158. package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +32 -1
  159. package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +2 -2
  160. package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +7 -2
  161. package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +1 -1
  162. package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +7 -0
  163. package/.docs/raw/docs/runtimes/custom/data-stream.mdx +27 -2
  164. package/.docs/raw/docs/runtimes/custom/external-store.mdx +9 -1
  165. package/.docs/raw/docs/runtimes/custom/overview.mdx +2 -2
  166. package/.docs/raw/docs/runtimes/google-adk/overview.mdx +2 -2
  167. package/.docs/raw/docs/runtimes/langchain.mdx +2 -2
  168. package/.docs/raw/docs/runtimes/langgraph/overview.mdx +2 -2
  169. package/.docs/raw/docs/runtimes/opencode/overview.mdx +2 -2
  170. package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +1 -1
  171. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +12 -5
  172. package/.docs/raw/docs/ui/composer-trigger-popover.mdx +11 -1
  173. package/.docs/raw/docs/ui/mcp-config.mdx +102 -0
  174. package/.docs/raw/docs/ui/model-selector.mdx +8 -8
  175. package/.docs/raw/docs/ui/sources.mdx +17 -0
  176. package/.docs/raw/docs/ui/streamdown.mdx +34 -2
  177. package/.docs/raw/docs/ui/thread-list.mdx +2 -2
  178. package/.docs/raw/docs/ui/thread.mdx +2 -2
  179. package/README.md +14 -72
  180. package/dist/constants.d.ts +12 -9
  181. package/dist/constants.d.ts.map +1 -1
  182. package/dist/constants.js +13 -9
  183. package/dist/constants.js.map +1 -1
  184. package/dist/index.d.ts +7 -3
  185. package/dist/index.d.ts.map +1 -1
  186. package/dist/index.js +25 -24
  187. package/dist/index.js.map +1 -1
  188. package/dist/prepare-docs/code-examples.d.ts +4 -1
  189. package/dist/prepare-docs/code-examples.d.ts.map +1 -1
  190. package/dist/prepare-docs/code-examples.js +109 -121
  191. package/dist/prepare-docs/code-examples.js.map +1 -1
  192. package/dist/prepare-docs/copy-raw.d.ts +4 -1
  193. package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
  194. package/dist/prepare-docs/copy-raw.js +45 -42
  195. package/dist/prepare-docs/copy-raw.js.map +1 -1
  196. package/dist/prepare-docs/prepare.d.ts +1 -2
  197. package/dist/prepare-docs/prepare.js +17 -17
  198. package/dist/prepare-docs/prepare.js.map +1 -1
  199. package/dist/stdio.d.ts +1 -3
  200. package/dist/stdio.js +6 -3
  201. package/dist/stdio.js.map +1 -1
  202. package/dist/tools/docs.d.ts +20 -15
  203. package/dist/tools/docs.d.ts.map +1 -1
  204. package/dist/tools/docs.js +140 -161
  205. package/dist/tools/docs.js.map +1 -1
  206. package/dist/tools/examples.d.ts +20 -15
  207. package/dist/tools/examples.d.ts.map +1 -1
  208. package/dist/tools/examples.js +74 -86
  209. package/dist/tools/examples.js.map +1 -1
  210. package/dist/tools/tests/test-setup.d.ts +5 -2
  211. package/dist/tools/tests/test-setup.d.ts.map +1 -1
  212. package/dist/tools/tests/test-setup.js +21 -28
  213. package/dist/tools/tests/test-setup.js.map +1 -1
  214. package/dist/utils/logger.d.ts +8 -5
  215. package/dist/utils/logger.d.ts.map +1 -1
  216. package/dist/utils/logger.js +17 -17
  217. package/dist/utils/logger.js.map +1 -1
  218. package/dist/utils/mcp-format.d.ts +8 -5
  219. package/dist/utils/mcp-format.d.ts.map +1 -1
  220. package/dist/utils/mcp-format.js +9 -9
  221. package/dist/utils/mcp-format.js.map +1 -1
  222. package/dist/utils/mdx.d.ts +8 -6
  223. package/dist/utils/mdx.d.ts.map +1 -1
  224. package/dist/utils/mdx.js +22 -22
  225. package/dist/utils/mdx.js.map +1 -1
  226. package/dist/utils/paths.d.ts +9 -6
  227. package/dist/utils/paths.d.ts.map +1 -1
  228. package/dist/utils/paths.js +66 -76
  229. package/dist/utils/paths.js.map +1 -1
  230. package/dist/utils/security.d.ts +4 -1
  231. package/dist/utils/security.d.ts.map +1 -1
  232. package/dist/utils/security.js +19 -40
  233. package/dist/utils/security.js.map +1 -1
  234. package/package.json +5 -5
  235. package/.docs/raw/docs/(reference)/api-reference/adapters/feedback-speech.mdx +0 -41
  236. package/.docs/raw/docs/(reference)/api-reference/context-providers/text-message-part-provider.mdx +0 -40
  237. package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -260
  238. package/.docs/raw/docs/(reference)/api-reference/integrations/react-hook-form.mdx +0 -103
  239. package/.docs/raw/docs/(reference)/api-reference/integrations/vercel-ai-sdk.mdx +0 -254
  240. package/dist/prepare-docs/prepare.d.ts.map +0 -1
  241. package/dist/stdio.d.ts.map +0 -1
  242. /package/.docs/raw/docs/{(reference)/migrations → migrations}/deprecation-policy.mdx +0 -0
  243. /package/.docs/raw/docs/{(reference) → migrations}/react-compatibility.mdx +0 -0
  244. /package/.docs/raw/docs/{(reference)/migrations → migrations}/react-langgraph-v0-7.mdx +0 -0
  245. /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-11.mdx +0 -0
  246. /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-12.mdx +0 -0
  247. /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-14.mdx +0 -0
@@ -1,11 +1,17 @@
1
1
  ---
2
2
  title: ActionBarPrimitive
3
- description: Buttons for message actions like copy, edit, reload, speak, and feedback.
3
+ description: Composable message action controls for copy, edit, reload, speech, and feedback in assistant-ui chat interfaces.
4
4
  ---
5
5
 
6
- Buttons to interact with the message.
6
+ import { ActionBarPrimitiveCopyProps, ActionBarPrimitiveEditProps, ActionBarPrimitiveExportMarkdownProps, ActionBarPrimitiveFeedbackNegativeProps, ActionBarPrimitiveFeedbackPositiveProps, ActionBarPrimitiveReloadProps, ActionBarPrimitiveRootProps, ActionBarPrimitiveSpeakProps, ActionBarPrimitiveStopSpeakingProps } from "@/generated/typeDocs";
7
+ import { ActionBarPrimitive as ActionBarPrimitiveDocs } from "@/generated/primitiveDocs";
7
8
 
9
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
10
+ {/* Do not edit manually. */}
8
11
 
12
+ For examples and usage patterns, see [ActionBar](/docs/primitives/action-bar).
13
+
14
+ {/* api-manual:start */}
9
15
  ## Anatomy
10
16
 
11
17
  ```tsx
@@ -25,300 +31,179 @@ const AssistantMessageBar = () => (
25
31
  </ActionBarPrimitive.Root>
26
32
  );
27
33
  ```
34
+ {/* api-manual:end */}
35
+
36
+ {/* api-reference:start */}
37
+ {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
38
+ {/* Do not edit this block manually. */}
28
39
 
29
40
  ## API Reference
30
41
 
31
42
  ### Root
32
43
 
33
- Contains all parts of the action bar.
34
-
35
- This primitive renders a `<div>` element unless `asChild` is set.
36
-
37
- <ParametersTable
38
- type="ActionBarPrimitiveRootProps"
39
- parameters={[
40
- {
41
- name: "asChild",
42
- },
43
- {
44
- name: "hideWhenRunning",
45
- type: "boolean",
46
- default: "false",
47
- description: (
48
- <span>
49
- Do not render the ActionBar when the thread is in running state.
50
- </span>
51
- ),
52
- },
53
- {
54
- name: "autohide",
55
- type: '"always" | "not-last" | "never"',
56
- default: '"never"',
57
- description: (
58
- <span>
59
- Do not render the ActionBar unless the mouse is hovering over the
60
- message.
61
- <br />
62
- <br />
63
- <Code>"always"</Code>: always autohide.
64
- <br />
65
- <Code>"not-last"</Code>: only autohide if the message is not the last
66
- one in the thread.
67
- </span>
68
- ),
69
- },
70
- {
71
- name: "autohideFloat",
72
- type: '"always" | "single-branch" | "never"',
73
- default: '"never"',
74
- description: (
75
- <span>
76
- Float the ActionBar during autohide.
77
- <br />
78
- <br />
79
- <Code>"always"</Code>: always float during autohide.
80
- <br />
81
- <Code>"single-branch"</Code>: only float if the message is the only
82
- one in the thread.
83
- <br />
84
- <br />
85
- Note: this only sets `data-floating` on the ActionBar. You need to set
86
- the appropriate styles on the ActionBar to make it float.
87
- </span>
88
- ),
89
- },
90
- ]}
91
- />
44
+ {ActionBarPrimitiveDocs.Root?.deprecated && (
45
+ <Callout type="warn">
46
+ <strong>Deprecated.</strong> {ActionBarPrimitiveDocs.Root.deprecated}
47
+ </Callout>
48
+ )}
49
+
50
+ {ActionBarPrimitiveDocs.Root?.description}
51
+
52
+ {ActionBarPrimitiveDocs.Root?.element && (
53
+ <p>This primitive renders a <code>{`<${ActionBarPrimitiveDocs.Root?.element}>`}</code> element unless <code>asChild</code> is set.</p>
54
+ )}
55
+
56
+ <ParametersTable {...ActionBarPrimitiveRootProps} />
92
57
 
58
+ {/* api-manual:ActionBarPrimitive.Root:start */}
93
59
  | Data attribute | Values |
94
60
  | --- | --- |
95
61
  | `[data-floating]` | Present when floating |
62
+ {/* api-manual:ActionBarPrimitive.Root:end */}
96
63
 
97
- ### Edit
64
+ ### Copy
98
65
 
99
- Enables edit mode on user message.
66
+ {ActionBarPrimitiveDocs.Copy?.deprecated && (
67
+ <Callout type="warn">
68
+ <strong>Deprecated.</strong> {ActionBarPrimitiveDocs.Copy.deprecated}
69
+ </Callout>
70
+ )}
100
71
 
101
- This primitive renders a `<button>` element unless `asChild` is set.
72
+ {ActionBarPrimitiveDocs.Copy?.description}
102
73
 
103
- <ParametersTable
104
- type="ActionBarPrimitiveEditProps"
105
- parameters={[
106
- {
107
- name: "asChild",
108
- },
109
- ]}
110
- />
74
+ {ActionBarPrimitiveDocs.Copy?.element && (
75
+ <p>This primitive renders a <code>{`<${ActionBarPrimitiveDocs.Copy?.element}>`}</code> element unless <code>asChild</code> is set.</p>
76
+ )}
111
77
 
112
- ### Reload
78
+ <ParametersTable {...ActionBarPrimitiveCopyProps} />
113
79
 
114
- Regenerates the assistant message.
80
+ {/* api-manual:ActionBarPrimitive.Copy:start */}
81
+ | Data attribute | Values |
82
+ | --- | --- |
83
+ | `[data-copied]` | Present when the message was recently copied. |
84
+ {/* api-manual:ActionBarPrimitive.Copy:end */}
115
85
 
116
- This primitive renders a `<button>` element unless `asChild` is set.
86
+ ### Reload
117
87
 
118
- <ParametersTable
119
- type="ActionBarPrimitiveReloadProps"
120
- parameters={[
121
- {
122
- name: "asChild",
123
- },
124
- ]}
125
- />
88
+ {ActionBarPrimitiveDocs.Reload?.deprecated && (
89
+ <Callout type="warn">
90
+ <strong>Deprecated.</strong> {ActionBarPrimitiveDocs.Reload.deprecated}
91
+ </Callout>
92
+ )}
126
93
 
127
- ### Copy
94
+ {ActionBarPrimitiveDocs.Reload?.description}
128
95
 
129
- Copies the message to the clipboard.
130
-
131
- This primitive renders a `<button>` element unless `asChild` is set.
132
-
133
- <ParametersTable
134
- type="ActionBarPrimitiveCopyProps"
135
- parameters={[
136
- {
137
- name: "asChild",
138
- },
139
- {
140
- name: "copiedDuration",
141
- type: "number",
142
- description:
143
- "The duration in milliseconds to change the message status to 'copied'.",
144
- default: "3000",
145
- },
146
- ]}
147
- />
96
+ {ActionBarPrimitiveDocs.Reload?.element && (
97
+ <p>This primitive renders a <code>{`<${ActionBarPrimitiveDocs.Reload?.element}>`}</code> element unless <code>asChild</code> is set.</p>
98
+ )}
148
99
 
149
- | Data attribute | Values |
150
- | --- | --- |
151
- | `[data-copied]` | Present when the message was recently copied. |
100
+ <ParametersTable {...ActionBarPrimitiveReloadProps} />
152
101
 
153
- #### Copied state
102
+ ### Edit
154
103
 
155
- Show a different icon for a few seconds after the message is copied.
104
+ {ActionBarPrimitiveDocs.Edit?.deprecated && (
105
+ <Callout type="warn">
106
+ <strong>Deprecated.</strong> {ActionBarPrimitiveDocs.Edit.deprecated}
107
+ </Callout>
108
+ )}
156
109
 
157
- ```tsx
158
- <ActionBarPrimitive.Copy>
159
- <AuiIf condition={(s) => !s.message.isCopied}>
160
- <CopyIcon />
161
- </AuiIf>
162
- <AuiIf condition={(s) => s.message.isCopied}>
163
- <CopySuccessIcon />
164
- </AuiIf>
165
- </ActionBarPrimitive.Copy>
166
- ```
110
+ {ActionBarPrimitiveDocs.Edit?.description}
167
111
 
168
- or using the `data-copied` attribute:
112
+ {ActionBarPrimitiveDocs.Edit?.element && (
113
+ <p>This primitive renders a <code>{`<${ActionBarPrimitiveDocs.Edit?.element}>`}</code> element unless <code>asChild</code> is set.</p>
114
+ )}
169
115
 
170
- ```tsx
171
- <ActionBarPrimitive.Copy className="group">
172
- <CopyIcon className="group-data-[copied]:hidden" />
173
- <CheckIcon className="hidden group-data-[copied]:block" />
174
- </ActionBarPrimitive.Copy>
175
- ```
116
+ <ParametersTable {...ActionBarPrimitiveEditProps} />
176
117
 
177
118
  ### Speak
178
119
 
179
- Plays the message text as speech.
120
+ {ActionBarPrimitiveDocs.Speak?.deprecated && (
121
+ <Callout type="warn">
122
+ <strong>Deprecated.</strong> {ActionBarPrimitiveDocs.Speak.deprecated}
123
+ </Callout>
124
+ )}
125
+
126
+ {ActionBarPrimitiveDocs.Speak?.description}
180
127
 
181
- This primitive renders a `<button>` element unless `asChild` is set.
128
+ {ActionBarPrimitiveDocs.Speak?.element && (
129
+ <p>This primitive renders a <code>{`<${ActionBarPrimitiveDocs.Speak?.element}>`}</code> element unless <code>asChild</code> is set.</p>
130
+ )}
182
131
 
183
- <ParametersTable
184
- type="ActionBarPrimitiveSpeakProps"
185
- parameters={[
186
- {
187
- name: "asChild",
188
- },
189
- ]}
190
- />
132
+ <ParametersTable {...ActionBarPrimitiveSpeakProps} />
191
133
 
192
134
  ### StopSpeaking
193
135
 
194
- Stops the message text from being played as speech.
136
+ {ActionBarPrimitiveDocs.StopSpeaking?.deprecated && (
137
+ <Callout type="warn">
138
+ <strong>Deprecated.</strong> {ActionBarPrimitiveDocs.StopSpeaking.deprecated}
139
+ </Callout>
140
+ )}
141
+
142
+ {ActionBarPrimitiveDocs.StopSpeaking?.description}
143
+
144
+ {ActionBarPrimitiveDocs.StopSpeaking?.element && (
145
+ <p>This primitive renders a <code>{`<${ActionBarPrimitiveDocs.StopSpeaking?.element}>`}</code> element unless <code>asChild</code> is set.</p>
146
+ )}
195
147
 
196
- This primitive renders a `<button>` element unless `asChild` is set.
148
+ <ParametersTable {...ActionBarPrimitiveStopSpeakingProps} />
197
149
 
198
- <ParametersTable
199
- type="ActionBarPrimitiveStopSpeakingProps"
200
- parameters={[
201
- {
202
- name: "asChild",
203
- },
204
- ]}
205
- />
150
+ ### FeedbackPositive
206
151
 
207
- ### Feedback Positive
152
+ {ActionBarPrimitiveDocs.FeedbackPositive?.deprecated && (
153
+ <Callout type="warn">
154
+ <strong>Deprecated.</strong> {ActionBarPrimitiveDocs.FeedbackPositive.deprecated}
155
+ </Callout>
156
+ )}
208
157
 
209
- Shows a positive feedback submission button.
158
+ {ActionBarPrimitiveDocs.FeedbackPositive?.description}
210
159
 
211
- This primitive renders a `<button>` element unless `asChild` is set.
160
+ {ActionBarPrimitiveDocs.FeedbackPositive?.element && (
161
+ <p>This primitive renders a <code>{`<${ActionBarPrimitiveDocs.FeedbackPositive?.element}>`}</code> element unless <code>asChild</code> is set.</p>
162
+ )}
212
163
 
213
- <ParametersTable
214
- type="ActionBarPrimitiveFeedbackPositiveProps"
215
- parameters={[
216
- {
217
- name: "asChild",
218
- },
219
- ]}
220
- />
164
+ <ParametersTable {...ActionBarPrimitiveFeedbackPositiveProps} />
221
165
 
166
+ {/* api-manual:ActionBarPrimitive.FeedbackPositive:start */}
222
167
  | Data attribute | Values |
223
168
  | --- | --- |
224
169
  | `[data-submitted]` | Present when positive feedback was submitted. |
170
+ {/* api-manual:ActionBarPrimitive.FeedbackPositive:end */}
225
171
 
226
- ### Feedback Negative
172
+ ### FeedbackNegative
227
173
 
228
- Shows a negative feedback submission button.
174
+ {ActionBarPrimitiveDocs.FeedbackNegative?.deprecated && (
175
+ <Callout type="warn">
176
+ <strong>Deprecated.</strong> {ActionBarPrimitiveDocs.FeedbackNegative.deprecated}
177
+ </Callout>
178
+ )}
229
179
 
230
- This primitive renders a `<button>` element unless `asChild` is set.
180
+ {ActionBarPrimitiveDocs.FeedbackNegative?.description}
231
181
 
232
- <ParametersTable
233
- type="ActionBarPrimitiveFeedbackNegativeProps"
234
- parameters={[
235
- {
236
- name: "asChild",
237
- },
238
- ]}
239
- />
182
+ {ActionBarPrimitiveDocs.FeedbackNegative?.element && (
183
+ <p>This primitive renders a <code>{`<${ActionBarPrimitiveDocs.FeedbackNegative?.element}>`}</code> element unless <code>asChild</code> is set.</p>
184
+ )}
240
185
 
186
+ <ParametersTable {...ActionBarPrimitiveFeedbackNegativeProps} />
187
+
188
+ {/* api-manual:ActionBarPrimitive.FeedbackNegative:start */}
241
189
  | Data attribute | Values |
242
190
  | --- | --- |
243
191
  | `[data-submitted]` | Present when negative feedback was submitted. |
192
+ {/* api-manual:ActionBarPrimitive.FeedbackNegative:end */}
244
193
 
245
194
  ### ExportMarkdown
246
195
 
247
- Exports the message content as a Markdown file download by default, or calls a custom export handler when `onExport` is provided.
248
-
249
- This primitive renders a `<button>` element unless `asChild` is set.
250
-
251
- <ParametersTable
252
- type="ActionBarPrimitiveExportMarkdownProps"
253
- parameters={[
254
- {
255
- name: "asChild",
256
- },
257
- {
258
- name: "filename",
259
- type: "string",
260
- description:
261
- "The filename for the downloaded Markdown file. Defaults to 'message-{timestamp}.md'. Ignored when onExport is provided.",
262
- },
263
- {
264
- name: "onExport",
265
- type: "(content: string) => void | Promise<void>",
266
- description:
267
- "Optional callback function that receives the message content. When provided, overrides the default Markdown download behavior. Use this to implement custom export logic (PDF, JSON, TXT, etc.).",
268
- },
269
- ]}
270
- />
271
-
272
- #### Examples
273
-
274
- Default Markdown export:
275
-
276
- ```tsx
277
- <ActionBarPrimitive.ExportMarkdown>
278
- <DownloadIcon />
279
- Export as Markdown
280
- </ActionBarPrimitive.ExportMarkdown>
281
- ```
282
-
283
- With custom filename:
196
+ {ActionBarPrimitiveDocs.ExportMarkdown?.deprecated && (
197
+ <Callout type="warn">
198
+ <strong>Deprecated.</strong> {ActionBarPrimitiveDocs.ExportMarkdown.deprecated}
199
+ </Callout>
200
+ )}
284
201
 
285
- ```tsx
286
- <ActionBarPrimitive.ExportMarkdown filename="chat-response.md">
287
- <DownloadIcon />
288
- Download
289
- </ActionBarPrimitive.ExportMarkdown>
290
- ```
202
+ {ActionBarPrimitiveDocs.ExportMarkdown?.description}
291
203
 
292
- Export as PDF (with custom logic):
204
+ {ActionBarPrimitiveDocs.ExportMarkdown?.element && (
205
+ <p>This primitive renders a <code>{`<${ActionBarPrimitiveDocs.ExportMarkdown?.element}>`}</code> element unless <code>asChild</code> is set.</p>
206
+ )}
293
207
 
294
- ```tsx
295
- <ActionBarPrimitive.ExportMarkdown
296
- onExport={async (content) => {
297
- const pdf = await generatePdf(content);
298
- downloadFile(pdf, "message.pdf");
299
- }}
300
- >
301
- <FileIcon />
302
- Export PDF
303
- </ActionBarPrimitive.ExportMarkdown>
304
- ```
305
-
306
- Export as JSON:
307
-
308
- ```tsx
309
- <ActionBarPrimitive.ExportMarkdown
310
- onExport={(content) => {
311
- const json = JSON.stringify({ content, timestamp: Date.now() });
312
- const blob = new Blob([json], { type: "application/json" });
313
- const url = URL.createObjectURL(blob);
314
- const a = document.createElement("a");
315
- a.href = url;
316
- a.download = "message.json";
317
- a.click();
318
- URL.revokeObjectURL(url);
319
- }}
320
- >
321
- <CodeIcon />
322
- Export JSON
323
- </ActionBarPrimitive.ExportMarkdown>
324
- ```
208
+ <ParametersTable {...ActionBarPrimitiveExportMarkdownProps} />
209
+ {/* api-reference:end */}
@@ -1,10 +1,11 @@
1
1
  ---
2
2
  title: AuiIf
3
- description: Conditional rendering component based on thread, message, or composer state.
3
+ description: Conditional rendering primitive for showing React UI from assistant-ui thread, message, composer, and runtime state.
4
4
  ---
5
5
 
6
- Conditionally render children based on assistant state.
6
+ {/* api-reference:skip-auto-generation */}
7
7
 
8
+ {/* api-manual:start */}
8
9
 
9
10
  ## Anatomy
10
11
 
@@ -13,7 +14,7 @@ import { AuiIf } from "@assistant-ui/react";
13
14
 
14
15
  <AuiIf condition={(s) => s.thread.isEmpty}>
15
16
  <WelcomeScreen />
16
- </AuiIf>
17
+ </AuiIf>;
17
18
  ```
18
19
 
19
20
  ## Overview
@@ -29,7 +30,8 @@ import { AuiIf } from "@assistant-ui/react";
29
30
  name: "condition",
30
31
  type: "(state: AssistantState) => boolean",
31
32
  required: true,
32
- description: "A function that receives the assistant state and returns whether to render children.",
33
+ description:
34
+ "A function that receives the assistant state and returns whether to render children.",
33
35
  },
34
36
  {
35
37
  name: "children",
@@ -54,7 +56,8 @@ The condition function receives an `AssistantState` object with the following pr
54
56
  {
55
57
  name: "message",
56
58
  type: "MessageState",
57
- description: "The current message state (available within a message context).",
59
+ description:
60
+ "The current message state (available within a message context).",
58
61
  },
59
62
  {
60
63
  name: "composer",
@@ -64,12 +67,14 @@ The condition function receives an `AssistantState` object with the following pr
64
67
  {
65
68
  name: "part",
66
69
  type: "PartState",
67
- description: "The current message part state (available within a part context).",
70
+ description:
71
+ "The current message part state (available within a part context).",
68
72
  },
69
73
  {
70
74
  name: "attachment",
71
75
  type: "AttachmentState",
72
- description: "The current attachment state (available within an attachment context).",
76
+ description:
77
+ "The current attachment state (available within an attachment context).",
73
78
  },
74
79
  ]}
75
80
  />
@@ -184,23 +189,37 @@ const isThreadEmpty: AuiIf.Condition = (s) => s.thread.isEmpty;
184
189
 
185
190
  <AuiIf condition={isThreadEmpty}>
186
191
  <WelcomeScreen />
187
- </AuiIf>
192
+ </AuiIf>;
188
193
  ```
189
194
 
190
195
  ## Migration from Deprecated Components
191
196
 
192
197
  <Callout type="warn">
193
- `ThreadPrimitive.If`, `MessagePrimitive.If`, and `ComposerPrimitive.If` are deprecated. Use `AuiIf` instead.
198
+ `ThreadPrimitive.If`, `MessagePrimitive.If`, and `ComposerPrimitive.If` are
199
+ deprecated. Use `AuiIf` instead.
200
+ </Callout>
201
+
202
+ | Before | After |
203
+ | -------------------------------------- | ----------------------------------------------------------- |
204
+ | `<ThreadPrimitive.If empty>` | `<AuiIf condition={(s) => s.thread.isEmpty}>` |
205
+ | `<ThreadPrimitive.If running>` | `<AuiIf condition={(s) => s.thread.isRunning}>` |
206
+ | `<ThreadPrimitive.If running={false}>` | `<AuiIf condition={(s) => !s.thread.isRunning}>` |
207
+ | `<MessagePrimitive.If user>` | `<AuiIf condition={(s) => s.message.role === "user"}>` |
208
+ | `<MessagePrimitive.If assistant>` | `<AuiIf condition={(s) => s.message.role === "assistant"}>` |
209
+ | `<MessagePrimitive.If copied>` | `<AuiIf condition={(s) => s.message.isCopied}>` |
210
+ | `<MessagePrimitive.If speaking>` | `<AuiIf condition={(s) => s.message.speech != null}>` |
211
+ | `<MessagePrimitive.If last>` | `<AuiIf condition={(s) => s.message.isLast}>` |
212
+ | `<ComposerPrimitive.If editing>` | `<AuiIf condition={(s) => s.composer.isEditing}>` |
213
+
214
+ ## AssistantIf
215
+
216
+ <Callout type="warn">
217
+ <strong>Deprecated:</strong> Use `AuiIf` instead. This alias was removed in
218
+ v0.13.
194
219
  </Callout>
195
220
 
196
- | Before | After |
197
- |--------|-------|
198
- | `<ThreadPrimitive.If empty>` | `<AuiIf condition={(s) => s.thread.isEmpty}>` |
199
- | `<ThreadPrimitive.If running>` | `<AuiIf condition={(s) => s.thread.isRunning}>` |
200
- | `<ThreadPrimitive.If running={false}>` | `<AuiIf condition={(s) => !s.thread.isRunning}>` |
201
- | `<MessagePrimitive.If user>` | `<AuiIf condition={(s) => s.message.role === "user"}>` |
202
- | `<MessagePrimitive.If assistant>` | `<AuiIf condition={(s) => s.message.role === "assistant"}>` |
203
- | `<MessagePrimitive.If copied>` | `<AuiIf condition={(s) => s.message.isCopied}>` |
204
- | `<MessagePrimitive.If speaking>` | `<AuiIf condition={(s) => s.message.speech != null}>` |
205
- | `<MessagePrimitive.If last>` | `<AuiIf condition={(s) => s.message.isLast}>` |
206
- | `<ComposerPrimitive.If editing>` | `<AuiIf condition={(s) => s.composer.isEditing}>` |
221
+ ```tsx
222
+ import { AssistantIf } from "@assistant-ui/react";
223
+ ```
224
+
225
+ {/* api-manual:end */}