veryfront 0.1.997 → 0.1.998

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 (374) hide show
  1. package/esm/cli/templates/manifest.js +1 -1
  2. package/esm/deno.d.ts +7 -0
  3. package/esm/deno.js +11 -3
  4. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +2 -0
  5. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +1 -0
  6. package/esm/deps/esm.sh/react-dom@19.2.4.js +3 -0
  7. package/esm/react/react-dom.d.ts +3 -0
  8. package/esm/react/react-dom.d.ts.map +1 -0
  9. package/esm/react/react-dom.js +2 -0
  10. package/esm/src/agent/ag-ui/host-support.d.ts.map +1 -1
  11. package/esm/src/agent/ag-ui/host-support.js +12 -0
  12. package/esm/src/agent/react/index.d.ts +4 -2
  13. package/esm/src/agent/react/index.d.ts.map +1 -1
  14. package/esm/src/agent/react/index.js +2 -1
  15. package/esm/src/agent/react/use-agent-metadata.d.ts +5 -0
  16. package/esm/src/agent/react/use-agent-metadata.d.ts.map +1 -1
  17. package/esm/src/agent/react/use-agent-metadata.js +18 -9
  18. package/esm/src/agent/react/use-agents.d.ts +33 -0
  19. package/esm/src/agent/react/use-agents.d.ts.map +1 -0
  20. package/esm/src/agent/react/use-agents.js +72 -0
  21. package/esm/src/agent/react/use-chat/index.d.ts +1 -1
  22. package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
  23. package/esm/src/agent/react/use-chat/types.d.ts +3 -2
  24. package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
  25. package/esm/src/agent/react/use-chat/use-chat.d.ts +12 -1
  26. package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
  27. package/esm/src/agent/react/use-chat/use-chat.js +47 -7
  28. package/esm/src/agent/react/use-chat/utils.d.ts.map +1 -1
  29. package/esm/src/agent/react/use-chat/utils.js +4 -0
  30. package/esm/src/agent/runtime/message-adapter.d.ts.map +1 -1
  31. package/esm/src/agent/runtime/message-adapter.js +3 -1
  32. package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
  33. package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +6 -2
  34. package/esm/src/chat/index.d.ts +17 -7
  35. package/esm/src/chat/index.d.ts.map +1 -1
  36. package/esm/src/chat/index.js +33 -7
  37. package/esm/src/chat/protocol.d.ts +13 -1
  38. package/esm/src/chat/protocol.d.ts.map +1 -1
  39. package/esm/src/chat/upload-handler.d.ts +55 -0
  40. package/esm/src/chat/upload-handler.d.ts.map +1 -0
  41. package/esm/src/chat/upload-handler.js +180 -0
  42. package/esm/src/discovery/import-rewriter.d.ts +1 -1
  43. package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
  44. package/esm/src/discovery/import-rewriter.js +2 -0
  45. package/esm/src/discovery/transpiler.d.ts.map +1 -1
  46. package/esm/src/discovery/transpiler.js +2 -0
  47. package/esm/src/react/components/chat/agent-card.d.ts +84 -11
  48. package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
  49. package/esm/src/react/components/chat/agent-card.js +151 -57
  50. package/esm/src/react/components/chat/agent-picker.d.ts +166 -0
  51. package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -0
  52. package/esm/src/react/components/chat/agent-picker.js +183 -0
  53. package/esm/src/react/components/chat/chat/components/animations.js +1 -1
  54. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +125 -3
  55. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
  56. package/esm/src/react/components/chat/chat/components/attachment-pill.js +209 -25
  57. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +149 -0
  58. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -0
  59. package/esm/src/react/components/chat/chat/components/attachments-panel.js +187 -0
  60. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +13 -2
  61. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
  62. package/esm/src/react/components/chat/chat/components/branch-picker.js +6 -8
  63. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +20 -0
  64. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -0
  65. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +31 -0
  66. package/esm/src/react/components/chat/chat/components/code-block.d.ts +9 -1
  67. package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
  68. package/esm/src/react/components/chat/chat/components/code-block.js +14 -6
  69. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +11 -4
  70. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
  71. package/esm/src/react/components/chat/chat/components/drop-zone.js +10 -8
  72. package/esm/src/react/components/chat/chat/components/empty-state.d.ts +2 -1
  73. package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
  74. package/esm/src/react/components/chat/chat/components/empty-state.js +7 -8
  75. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +6 -2
  76. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
  77. package/esm/src/react/components/chat/chat/components/inference-badge.js +5 -4
  78. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +9 -1
  79. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
  80. package/esm/src/react/components/chat/chat/components/inline-citation.js +19 -20
  81. package/esm/src/react/components/chat/chat/components/message-actions.d.ts +28 -5
  82. package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
  83. package/esm/src/react/components/chat/chat/components/message-actions.js +24 -36
  84. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +7 -2
  85. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
  86. package/esm/src/react/components/chat/chat/components/message-edit-form.js +5 -5
  87. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +11 -1
  88. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
  89. package/esm/src/react/components/chat/chat/components/message-feedback.js +9 -11
  90. package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
  91. package/esm/src/react/components/chat/chat/components/quick-actions.js +3 -1
  92. package/esm/src/react/components/chat/chat/components/reasoning.d.ts +66 -3
  93. package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
  94. package/esm/src/react/components/chat/chat/components/reasoning.js +95 -21
  95. package/esm/src/react/components/chat/chat/components/sidebar.d.ts +178 -12
  96. package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
  97. package/esm/src/react/components/chat/chat/components/sidebar.js +228 -45
  98. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +6 -1
  99. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
  100. package/esm/src/react/components/chat/chat/components/skill-badge.js +6 -5
  101. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +37 -0
  102. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -0
  103. package/esm/src/react/components/chat/chat/components/skill-tool.js +46 -0
  104. package/esm/src/react/components/chat/chat/components/sources.d.ts +55 -3
  105. package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
  106. package/esm/src/react/components/chat/chat/components/sources.js +50 -16
  107. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +42 -3
  108. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
  109. package/esm/src/react/components/chat/chat/components/step-indicator.js +55 -12
  110. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +1 -1
  111. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
  112. package/esm/src/react/components/chat/chat/components/tab-switcher.js +3 -3
  113. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +96 -3
  114. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
  115. package/esm/src/react/components/chat/chat/components/tool-ui.js +158 -36
  116. package/esm/src/react/components/chat/chat/composition/api.d.ts +4 -2
  117. package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
  118. package/esm/src/react/components/chat/chat/composition/api.js +4 -2
  119. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +112 -5
  120. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
  121. package/esm/src/react/components/chat/chat/composition/chat-composer.js +251 -61
  122. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +78 -0
  123. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -0
  124. package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +63 -0
  125. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +4 -1
  126. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
  127. package/esm/src/react/components/chat/chat/composition/chat-empty.js +11 -10
  128. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +11 -3
  129. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
  130. package/esm/src/react/components/chat/chat/composition/chat-message-list.js +81 -111
  131. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +4 -0
  132. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
  133. package/esm/src/react/components/chat/chat/composition/chat-root.js +3 -1
  134. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +4 -0
  135. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
  136. package/esm/src/react/components/chat/chat/composition/error-banner.js +10 -7
  137. package/esm/src/react/components/chat/chat/composition/message.d.ts +123 -5
  138. package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
  139. package/esm/src/react/components/chat/chat/composition/message.js +332 -53
  140. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +6 -1
  141. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
  142. package/esm/src/react/components/chat/chat/composition/model-avatar.js +3 -4
  143. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +31 -0
  144. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -0
  145. package/esm/src/react/components/chat/chat/composition/pending-message.js +31 -0
  146. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +4 -0
  147. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
  148. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +1 -0
  149. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
  150. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +29 -0
  151. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -0
  152. package/esm/src/react/components/chat/chat/contexts/conversations-context.js +39 -0
  153. package/esm/src/react/components/chat/chat/contexts/index.d.ts +1 -1
  154. package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -1
  155. package/esm/src/react/components/chat/chat/contexts/index.js +1 -1
  156. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +2 -0
  157. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
  158. package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts +10 -0
  159. package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts.map +1 -0
  160. package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +34 -0
  161. package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts +21 -0
  162. package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts.map +1 -0
  163. package/esm/src/react/components/chat/chat/hooks/use-conversation.js +54 -0
  164. package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts +67 -0
  165. package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -0
  166. package/esm/src/react/components/chat/chat/hooks/use-conversations.js +317 -0
  167. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +27 -0
  168. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -0
  169. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +50 -0
  170. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +49 -0
  171. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -0
  172. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +120 -0
  173. package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts +34 -0
  174. package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts.map +1 -0
  175. package/esm/src/react/components/chat/chat/hooks/use-upload.js +147 -0
  176. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts +37 -0
  177. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts.map +1 -0
  178. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +178 -0
  179. package/esm/src/react/components/chat/chat/index.d.ts +171 -31
  180. package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
  181. package/esm/src/react/components/chat/chat/index.js +371 -77
  182. package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts +63 -0
  183. package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts.map +1 -0
  184. package/esm/src/react/components/chat/chat/persistence/conversation-store.js +1 -0
  185. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts +13 -0
  186. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts.map +1 -0
  187. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.js +102 -0
  188. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts +11 -0
  189. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts.map +1 -0
  190. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.js +33 -0
  191. package/esm/src/react/components/chat/chat/utils/message-parts.d.ts +4 -1
  192. package/esm/src/react/components/chat/chat/utils/message-parts.d.ts.map +1 -1
  193. package/esm/src/react/components/chat/chat/utils/message-parts.js +4 -0
  194. package/esm/src/react/components/chat/chat-actions.d.ts +164 -0
  195. package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -0
  196. package/esm/src/react/components/chat/chat-actions.js +191 -0
  197. package/esm/src/react/components/chat/chat-agent-picker.d.ts +50 -0
  198. package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -0
  199. package/esm/src/react/components/chat/chat-agent-picker.js +40 -0
  200. package/esm/src/react/components/chat/chat-theme-scope.d.ts +26 -0
  201. package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -0
  202. package/esm/src/react/components/chat/chat-theme-scope.js +27 -0
  203. package/esm/src/react/components/chat/chat-tokens-style.d.ts +21 -0
  204. package/esm/src/react/components/chat/chat-tokens-style.d.ts.map +1 -0
  205. package/esm/src/react/components/chat/chat-tokens-style.js +24 -0
  206. package/esm/src/react/components/chat/chat.d.ts +5 -5
  207. package/esm/src/react/components/chat/chat.d.ts.map +1 -1
  208. package/esm/src/react/components/chat/chat.js +5 -5
  209. package/esm/src/react/components/chat/color-mode.d.ts +46 -0
  210. package/esm/src/react/components/chat/color-mode.d.ts.map +1 -0
  211. package/esm/src/react/components/chat/color-mode.js +123 -0
  212. package/esm/src/react/components/chat/error-boundary.js +2 -2
  213. package/esm/src/react/components/chat/icons/index.d.ts +8 -0
  214. package/esm/src/react/components/chat/icons/index.d.ts.map +1 -1
  215. package/esm/src/react/components/chat/icons/index.js +64 -0
  216. package/esm/src/react/components/chat/markdown.d.ts +24 -1
  217. package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
  218. package/esm/src/react/components/chat/markdown.js +122 -38
  219. package/esm/src/react/components/chat/model-selector.d.ts +130 -8
  220. package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
  221. package/esm/src/react/components/chat/model-selector.js +148 -121
  222. package/esm/src/react/components/chat/theme.d.ts +9 -12
  223. package/esm/src/react/components/chat/theme.d.ts.map +1 -1
  224. package/esm/src/react/components/chat/theme.js +149 -93
  225. package/esm/src/react/components/chat/ui/alert.d.ts +30 -0
  226. package/esm/src/react/components/chat/ui/alert.d.ts.map +1 -0
  227. package/esm/src/react/components/chat/ui/alert.js +35 -0
  228. package/esm/src/react/components/chat/ui/app-shell.d.ts +155 -0
  229. package/esm/src/react/components/chat/ui/app-shell.d.ts.map +1 -0
  230. package/esm/src/react/components/chat/ui/app-shell.js +276 -0
  231. package/esm/src/react/components/chat/ui/avatar.d.ts +24 -0
  232. package/esm/src/react/components/chat/ui/avatar.d.ts.map +1 -0
  233. package/esm/src/react/components/chat/ui/avatar.js +44 -0
  234. package/esm/src/react/components/chat/ui/badge.d.ts +24 -0
  235. package/esm/src/react/components/chat/ui/badge.d.ts.map +1 -0
  236. package/esm/src/react/components/chat/ui/badge.js +30 -0
  237. package/esm/src/react/components/chat/ui/button.d.ts +44 -0
  238. package/esm/src/react/components/chat/ui/button.d.ts.map +1 -0
  239. package/esm/src/react/components/chat/ui/button.js +108 -0
  240. package/esm/src/react/components/chat/ui/card.d.ts +42 -0
  241. package/esm/src/react/components/chat/ui/card.d.ts.map +1 -0
  242. package/esm/src/react/components/chat/ui/card.js +55 -0
  243. package/esm/src/react/components/chat/ui/checkbox.d.ts +28 -0
  244. package/esm/src/react/components/chat/ui/checkbox.d.ts.map +1 -0
  245. package/esm/src/react/components/chat/ui/checkbox.js +36 -0
  246. package/esm/src/react/components/chat/ui/code-block.d.ts +89 -0
  247. package/esm/src/react/components/chat/ui/code-block.d.ts.map +1 -0
  248. package/esm/src/react/components/chat/ui/code-block.js +277 -0
  249. package/esm/src/react/components/chat/ui/collapsible.d.ts +30 -0
  250. package/esm/src/react/components/chat/ui/collapsible.d.ts.map +1 -0
  251. package/esm/src/react/components/chat/ui/collapsible.js +44 -0
  252. package/esm/src/react/components/chat/ui/command.d.ts +65 -0
  253. package/esm/src/react/components/chat/ui/command.d.ts.map +1 -0
  254. package/esm/src/react/components/chat/ui/command.js +121 -0
  255. package/esm/src/react/components/chat/ui/cva.d.ts +36 -0
  256. package/esm/src/react/components/chat/ui/cva.d.ts.map +1 -0
  257. package/esm/src/react/components/chat/ui/cva.js +45 -0
  258. package/esm/src/react/components/chat/ui/dialog.d.ts +55 -0
  259. package/esm/src/react/components/chat/ui/dialog.d.ts.map +1 -0
  260. package/esm/src/react/components/chat/ui/dialog.js +116 -0
  261. package/esm/src/react/components/chat/ui/drawer.d.ts +41 -0
  262. package/esm/src/react/components/chat/ui/drawer.d.ts.map +1 -0
  263. package/esm/src/react/components/chat/ui/drawer.js +92 -0
  264. package/esm/src/react/components/chat/ui/dropdown-menu.d.ts +63 -0
  265. package/esm/src/react/components/chat/ui/dropdown-menu.d.ts.map +1 -0
  266. package/esm/src/react/components/chat/ui/dropdown-menu.js +76 -0
  267. package/esm/src/react/components/chat/ui/file-type.d.ts +26 -0
  268. package/esm/src/react/components/chat/ui/file-type.d.ts.map +1 -0
  269. package/esm/src/react/components/chat/ui/file-type.js +235 -0
  270. package/esm/src/react/components/chat/ui/floating.d.ts +29 -0
  271. package/esm/src/react/components/chat/ui/floating.d.ts.map +1 -0
  272. package/esm/src/react/components/chat/ui/floating.js +90 -0
  273. package/esm/src/react/components/chat/ui/icon-button.d.ts +19 -0
  274. package/esm/src/react/components/chat/ui/icon-button.d.ts.map +1 -0
  275. package/esm/src/react/components/chat/ui/icon-button.js +20 -0
  276. package/esm/src/react/components/chat/ui/index.d.ts +43 -0
  277. package/esm/src/react/components/chat/ui/index.d.ts.map +1 -0
  278. package/esm/src/react/components/chat/ui/index.js +42 -0
  279. package/esm/src/react/components/chat/ui/input.d.ts +27 -0
  280. package/esm/src/react/components/chat/ui/input.d.ts.map +1 -0
  281. package/esm/src/react/components/chat/ui/input.js +41 -0
  282. package/esm/src/react/components/chat/ui/label.d.ts +29 -0
  283. package/esm/src/react/components/chat/ui/label.d.ts.map +1 -0
  284. package/esm/src/react/components/chat/ui/label.js +40 -0
  285. package/esm/src/react/components/chat/ui/list.d.ts +47 -0
  286. package/esm/src/react/components/chat/ui/list.d.ts.map +1 -0
  287. package/esm/src/react/components/chat/ui/list.js +40 -0
  288. package/esm/src/react/components/chat/ui/pill.d.ts +26 -0
  289. package/esm/src/react/components/chat/ui/pill.d.ts.map +1 -0
  290. package/esm/src/react/components/chat/ui/pill.js +39 -0
  291. package/esm/src/react/components/chat/ui/popover.d.ts +47 -0
  292. package/esm/src/react/components/chat/ui/popover.d.ts.map +1 -0
  293. package/esm/src/react/components/chat/ui/popover.js +68 -0
  294. package/esm/src/react/components/chat/ui/progress-bar.d.ts +20 -0
  295. package/esm/src/react/components/chat/ui/progress-bar.d.ts.map +1 -0
  296. package/esm/src/react/components/chat/ui/progress-bar.js +31 -0
  297. package/esm/src/react/components/chat/ui/radio.d.ts +25 -0
  298. package/esm/src/react/components/chat/ui/radio.d.ts.map +1 -0
  299. package/esm/src/react/components/chat/ui/radio.js +29 -0
  300. package/esm/src/react/components/chat/ui/scroll-fade.d.ts +23 -0
  301. package/esm/src/react/components/chat/ui/scroll-fade.d.ts.map +1 -0
  302. package/esm/src/react/components/chat/ui/scroll-fade.js +40 -0
  303. package/esm/src/react/components/chat/ui/select.d.ts +64 -0
  304. package/esm/src/react/components/chat/ui/select.d.ts.map +1 -0
  305. package/esm/src/react/components/chat/ui/select.js +148 -0
  306. package/esm/src/react/components/chat/ui/shimmer.d.ts +25 -0
  307. package/esm/src/react/components/chat/ui/shimmer.d.ts.map +1 -0
  308. package/esm/src/react/components/chat/ui/shimmer.js +24 -0
  309. package/esm/src/react/components/chat/ui/skeleton.d.ts +14 -0
  310. package/esm/src/react/components/chat/ui/skeleton.d.ts.map +1 -0
  311. package/esm/src/react/components/chat/ui/skeleton.js +12 -0
  312. package/esm/src/react/components/chat/ui/slot.d.ts +21 -0
  313. package/esm/src/react/components/chat/ui/slot.d.ts.map +1 -0
  314. package/esm/src/react/components/chat/ui/slot.js +70 -0
  315. package/esm/src/react/components/chat/ui/status.d.ts +28 -0
  316. package/esm/src/react/components/chat/ui/status.d.ts.map +1 -0
  317. package/esm/src/react/components/chat/ui/status.js +23 -0
  318. package/esm/src/react/components/chat/ui/switch.d.ts +34 -0
  319. package/esm/src/react/components/chat/ui/switch.d.ts.map +1 -0
  320. package/esm/src/react/components/chat/ui/switch.js +58 -0
  321. package/esm/src/react/components/chat/ui/tabs.d.ts +44 -0
  322. package/esm/src/react/components/chat/ui/tabs.d.ts.map +1 -0
  323. package/esm/src/react/components/chat/ui/tabs.js +51 -0
  324. package/esm/src/react/components/chat/ui/tag.d.ts +22 -0
  325. package/esm/src/react/components/chat/ui/tag.d.ts.map +1 -0
  326. package/esm/src/react/components/chat/ui/tag.js +27 -0
  327. package/esm/src/react/components/chat/ui/textarea.d.ts +22 -0
  328. package/esm/src/react/components/chat/ui/textarea.d.ts.map +1 -0
  329. package/esm/src/react/components/chat/ui/textarea.js +35 -0
  330. package/esm/src/react/components/chat/ui/tooltip.d.ts +40 -0
  331. package/esm/src/react/components/chat/ui/tooltip.d.ts.map +1 -0
  332. package/esm/src/react/components/chat/ui/tooltip.js +132 -0
  333. package/esm/src/react/primitives/input-box.d.ts.map +1 -1
  334. package/esm/src/react/primitives/input-box.js +17 -4
  335. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  336. package/esm/src/server/handlers/dev/framework-candidates.generated.js +9437 -1064
  337. package/esm/src/server/handlers/dev/projects/html-shell.d.ts +1 -1
  338. package/esm/src/server/handlers/dev/projects/html-shell.d.ts.map +1 -1
  339. package/esm/src/server/handlers/dev/projects/html-shell.js +1 -12
  340. package/esm/src/server/handlers/request/public-agents-list.handler.d.ts +18 -0
  341. package/esm/src/server/handlers/request/public-agents-list.handler.d.ts.map +1 -0
  342. package/esm/src/server/handlers/request/public-agents-list.handler.js +44 -0
  343. package/esm/src/server/runtime-handler/index.d.ts +1 -1
  344. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  345. package/esm/src/server/runtime-handler/index.js +3 -0
  346. package/esm/src/studio/bridge/bridge-bundle.generated.d.ts +1 -1
  347. package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
  348. package/esm/src/studio/bridge/bridge-bundle.generated.js +3 -2
  349. package/esm/src/utils/version-constant.d.ts +1 -1
  350. package/esm/src/utils/version-constant.js +1 -1
  351. package/esm/src/workflow/blob/local-storage.d.ts +32 -0
  352. package/esm/src/workflow/blob/local-storage.d.ts.map +1 -0
  353. package/esm/src/workflow/blob/local-storage.js +179 -0
  354. package/esm/src/workflow/blob/types.d.ts +5 -0
  355. package/esm/src/workflow/blob/types.d.ts.map +1 -1
  356. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts +11 -0
  357. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts.map +1 -1
  358. package/esm/src/workflow/blob/veryfront-cloud-storage.js +36 -0
  359. package/package.json +5 -1
  360. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts +0 -20
  361. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +0 -1
  362. package/esm/src/react/components/chat/chat/components/uploads-panel.js +0 -49
  363. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts +0 -28
  364. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +0 -1
  365. package/esm/src/react/components/chat/chat/contexts/thread-list-context.js +0 -27
  366. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts +0 -28
  367. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +0 -1
  368. package/esm/src/react/components/chat/chat/hooks/use-threads.js +0 -151
  369. package/esm/src/react/components/chat/chat-with-sidebar.d.ts +0 -110
  370. package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +0 -1
  371. package/esm/src/react/components/chat/chat-with-sidebar.js +0 -167
  372. package/esm/src/react/components/chat/message.d.ts +0 -42
  373. package/esm/src/react/components/chat/message.d.ts.map +0 -1
  374. package/esm/src/react/components/chat/message.js +0 -69
@@ -1,10 +1,49 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  /** Props accepted by step indicator. */
3
- export interface StepIndicatorProps {
3
+ export interface StepIndicatorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className"> {
4
4
  stepIndex: number;
5
5
  isComplete: boolean;
6
6
  className?: string;
7
+ /** Override the complete/pending status glyph. */
8
+ icon?: React.ReactNode;
9
+ /** Compose your own divider; when omitted, the default anatomy is rendered. */
10
+ children?: React.ReactNode;
7
11
  }
8
- /** Render step indicator. */
9
- export declare function StepIndicator({ stepIndex, isComplete, className, }: StepIndicatorProps): React.ReactElement;
12
+ /** Per-indicator state shared with `StepIndicator.*` sub-parts. */
13
+ export interface StepIndicatorContextValue {
14
+ stepIndex: number;
15
+ isComplete: boolean;
16
+ /** Optional override for the complete/pending status glyph. */
17
+ icon?: React.ReactNode;
18
+ }
19
+ /**
20
+ * Read the enclosing `StepIndicator` state. Throws when used outside a
21
+ * `StepIndicator`.
22
+ */
23
+ export declare function useStepIndicator(): StepIndicatorContextValue;
24
+ /** `StepIndicator.Rule` — one of the flanking horizontal rules. */
25
+ declare function StepIndicatorRule({ className }: {
26
+ className?: string;
27
+ }): React.JSX.Element;
28
+ declare namespace StepIndicatorRule {
29
+ var displayName: string;
30
+ }
31
+ /** `StepIndicator.Label` — the status glyph + `Step N` pill. */
32
+ declare function StepIndicatorLabel({ className }: {
33
+ className?: string;
34
+ }): React.JSX.Element;
35
+ declare namespace StepIndicatorLabel {
36
+ var displayName: string;
37
+ }
38
+ /**
39
+ * StepIndicator — render `<StepIndicator stepIndex={…} isComplete />` for the
40
+ * default divider, or compose `StepIndicator.Root` + `.Rule` / `.Label` for a
41
+ * custom layout. Mirrors the `ToolCall` / `Sources` compounds.
42
+ */
43
+ export declare const StepIndicator: React.ForwardRefExoticComponent<StepIndicatorProps & React.RefAttributes<HTMLDivElement>> & {
44
+ Root: React.ForwardRefExoticComponent<StepIndicatorProps & React.RefAttributes<HTMLDivElement>>;
45
+ Rule: typeof StepIndicatorRule;
46
+ Label: typeof StepIndicatorLabel;
47
+ };
48
+ export {};
10
49
  //# sourceMappingURL=step-indicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"step-indicator.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/step-indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAI1D,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,6BAA6B;AAC7B,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,UAAU,EACV,SAAS,GACV,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,CAkBzC"}
1
+ {"version":3,"file":"step-indicator.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/step-indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAK1D,wCAAwC;AACxC,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAWD,mEAAmE;AACnE,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAMD;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,yBAAyB,CAQ5D;AAyCD,mEAAmE;AACnE,iBAAS,iBAAiB,CACxB,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,KAAK,CAAC,GAAG,CAAC,OAAO,CAEnB;kBAJQ,iBAAiB;;;AAO1B,gEAAgE;AAChE,iBAAS,kBAAkB,CACzB,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,KAAK,CAAC,GAAG,CAAC,OAAO,CAenB;kBAjBQ,kBAAkB;;;AAoB3B;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;CAIxB,CAAC"}
@@ -1,16 +1,59 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  import { cn } from "../../theme.js";
3
3
  import { CheckCircleIcon } from "../../icons/index.js";
4
- /** Render step indicator. */
5
- export function StepIndicator({ stepIndex, isComplete, className, }) {
6
- return (React.createElement("div", { className: cn("flex items-center gap-3 py-3 text-xs text-[var(--muted-foreground)]", className) },
7
- React.createElement("div", { className: "flex-1 h-px bg-[var(--border)]" }),
8
- React.createElement("div", { className: "flex items-center gap-1.5 px-2 py-0.5 rounded-full border border-[var(--border)] bg-[var(--accent)]" },
9
- isComplete
10
- ? React.createElement(CheckCircleIcon, { className: "size-3.5 text-[var(--success)]" })
11
- : React.createElement("span", { className: "size-2 rounded-full bg-[var(--muted-foreground)] animate-pulse" }),
12
- React.createElement("span", { className: "font-medium" },
13
- "Step ",
14
- stepIndex + 1)),
15
- React.createElement("div", { className: "flex-1 h-px bg-[var(--border)]" })));
4
+ import { COMPONENT_ERROR } from "../../../../../errors/error-registry.js";
5
+ const StepIndicatorContext = React.createContext(null);
6
+ /**
7
+ * Read the enclosing `StepIndicator` state. Throws when used outside a
8
+ * `StepIndicator`.
9
+ */
10
+ export function useStepIndicator() {
11
+ const ctx = React.useContext(StepIndicatorContext);
12
+ if (!ctx) {
13
+ throw COMPONENT_ERROR.create({
14
+ detail: "useStepIndicator must be used within a StepIndicator",
15
+ });
16
+ }
17
+ return ctx;
16
18
  }
19
+ /**
20
+ * `StepIndicator.Root` — context provider + the flex container. No children
21
+ * renders the default anatomy (`Rule` + `Label` + `Rule`); pass children to
22
+ * recompose.
23
+ */
24
+ const StepIndicatorRoot = React.forwardRef(function StepIndicator({ stepIndex, isComplete, className, icon, children, ...props }, ref) {
25
+ const context = { stepIndex, isComplete, icon };
26
+ return (React.createElement(StepIndicatorContext.Provider, { value: context },
27
+ React.createElement("div", { ...props, ref: ref, className: cn("flex items-center gap-3 py-3 text-xs text-[var(--faint)]", className) }, children ?? (React.createElement(React.Fragment, null,
28
+ React.createElement(StepIndicatorRule, null),
29
+ React.createElement(StepIndicatorLabel, null),
30
+ React.createElement(StepIndicatorRule, null))))));
31
+ });
32
+ StepIndicatorRoot.displayName = "StepIndicator.Root";
33
+ /** `StepIndicator.Rule` — one of the flanking horizontal rules. */
34
+ function StepIndicatorRule({ className }) {
35
+ return React.createElement("div", { className: cn("flex-1 h-px bg-[var(--edge)]", className) });
36
+ }
37
+ StepIndicatorRule.displayName = "StepIndicator.Rule";
38
+ /** `StepIndicator.Label` — the status glyph + `Step N` pill. */
39
+ function StepIndicatorLabel({ className }) {
40
+ const { stepIndex, isComplete, icon } = useStepIndicator();
41
+ return (React.createElement("div", { className: cn("flex items-center gap-1.5 px-2 py-0.5 rounded-full border border-[var(--outline-border)] bg-transparent", className) },
42
+ icon ?? (isComplete
43
+ ? React.createElement(CheckCircleIcon, { className: "size-3.5 text-[var(--success)]" })
44
+ : React.createElement("span", { className: "size-2 rounded-full bg-[var(--faint)] animate-pulse" })),
45
+ React.createElement("span", { className: "font-medium" },
46
+ "Step ",
47
+ stepIndex + 1)));
48
+ }
49
+ StepIndicatorLabel.displayName = "StepIndicator.Label";
50
+ /**
51
+ * StepIndicator — render `<StepIndicator stepIndex={…} isComplete />` for the
52
+ * default divider, or compose `StepIndicator.Root` + `.Rule` / `.Label` for a
53
+ * custom layout. Mirrors the `ToolCall` / `Sources` compounds.
54
+ */
55
+ export const StepIndicator = Object.assign(StepIndicatorRoot, {
56
+ Root: StepIndicatorRoot,
57
+ Rule: StepIndicatorRule,
58
+ Label: StepIndicatorLabel,
59
+ });
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import * as React from "../../../../../../react/react.js";
9
9
  /** Public API contract for chat tab. */
10
- export type ChatTab = "chat" | "uploads";
10
+ export type ChatTab = "chat" | "attachments";
11
11
  /** Props accepted by tab switcher. */
12
12
  export interface TabSwitcherProps {
13
13
  activeTab: ChatTab;
@@ -1 +1 @@
1
- {"version":3,"file":"tab-switcher.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/tab-switcher.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEzC,sCAAsC;AACtC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAOD,2BAA2B;AAC3B,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,WAAW,EACX,SAAS,GACV,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAwCvC"}
1
+ {"version":3,"file":"tab-switcher.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/tab-switcher.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC;AAE7C,sCAAsC;AACtC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAOD,2BAA2B;AAC3B,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,WAAW,EACX,SAAS,GACV,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAwCvC"}
@@ -9,7 +9,7 @@ import * as React from "../../../../../../react/react.js";
9
9
  import { cn } from "../../theme.js";
10
10
  const TABS = [
11
11
  { value: "chat", label: "Chat" },
12
- { value: "uploads", label: "Uploads" },
12
+ { value: "attachments", label: "Attachments" },
13
13
  ];
14
14
  /** Render tab switcher. */
15
15
  export function TabSwitcher({ activeTab, onTabChange, className, }) {
@@ -19,10 +19,10 @@ export function TabSwitcher({ activeTab, onTabChange, className, }) {
19
19
  return (React.createElement("button", { key: tab.value, type: "button", role: "tab", "aria-selected": isActive, tabIndex: isActive ? 0 : -1, onClick: () => onTabChange(tab.value), onKeyDown: (e) => {
20
20
  if (e.key === "ArrowRight" || e.key === "ArrowLeft") {
21
21
  e.preventDefault();
22
- const next = tab.value === "chat" ? "uploads" : "chat";
22
+ const next = tab.value === "chat" ? "attachments" : "chat";
23
23
  onTabChange(next);
24
24
  }
25
- }, className: cn("inline-flex items-center h-full px-5 text-sm font-medium rounded-full transition-colors cursor-pointer", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]", isActive
25
+ }, className: cn("inline-flex items-center h-full px-5 text-sm font-medium rounded-full transition-colors cursor-pointer", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)]", isActive
26
26
  ? "bg-[var(--tab-active-background)] text-[var(--tab-active-foreground)]"
27
27
  : "text-[var(--tab-foreground)]") }, tab.label));
28
28
  }))));
@@ -5,14 +5,107 @@
5
5
  import * as React from "../../../../../../react/react.js";
6
6
  import type { ChatDynamicToolPart, ChatToolPart } from "../../../../../agent/react/index.js";
7
7
  /** Render tool status badge. */
8
- export declare function ToolStatusBadge({ state }: {
8
+ export declare function ToolStatusBadge({ state, className }: {
9
9
  state: string;
10
+ className?: string;
10
11
  }): React.JSX.Element;
11
12
  /**
12
13
  * Tool call card component - renders tool invocations with parameters and results
13
14
  * Styled to match AI Elements (https://ai-sdk.dev/elements)
15
+ *
16
+ * Skill tools (`load_skill`, `load_skill_reference`, `execute_skill_script`)
17
+ * are a compact single-line variant of a tool call, so they render as the
18
+ * `SkillTool` row rather than the full params/result card. This keeps skills
19
+ * and tools under one component — callers render `<ToolCall tool={part} />` for
20
+ * either.
14
21
  */
15
- export declare function ToolCallCard({ tool, }: {
22
+ /** Per-tool state shared with `ToolCall.*` sub-parts. */
23
+ export interface ToolCallContextValue {
16
24
  tool: ChatToolPart | ChatDynamicToolPart;
17
- }): React.JSX.Element;
25
+ isExpanded: boolean;
26
+ toggle: (e: React.MouseEvent<HTMLButtonElement>) => void;
27
+ hasOutput: boolean;
28
+ hasError: boolean;
29
+ }
30
+ /** Read the enclosing `ToolCall` state. Throws when used outside a `ToolCall`. */
31
+ export declare function useToolCall(): ToolCallContextValue;
32
+ /** Props accepted by `ToolCall` / `ToolCall.Root` (aka `ToolCallCard`). */
33
+ export interface ToolCallProps {
34
+ tool: ChatToolPart | ChatDynamicToolPart;
35
+ className?: string;
36
+ /** Override the leading tool icon (card variant). */
37
+ icon?: React.ReactNode;
38
+ /**
39
+ * `card` (full params/result) or `compact` (single-line row). Defaults to
40
+ * `compact` for skill tools, `card` otherwise. This is a presentation axis —
41
+ * NOT a severity/type.
42
+ */
43
+ variant?: "card" | "compact";
44
+ /** Initial expanded state of the card (default: auto from tool state). */
45
+ defaultExpanded?: boolean;
46
+ /** Called when the card is toggled; receives the next state + event. */
47
+ onToggle?: (next: boolean, e: React.MouseEvent<HTMLButtonElement>) => void;
48
+ /** Override the compact/skill row rendering. */
49
+ renderSkill?: (tool: ChatToolPart | ChatDynamicToolPart) => React.ReactNode;
50
+ /** Compose your own card; when omitted, the default anatomy is rendered. */
51
+ children?: React.ReactNode;
52
+ }
53
+ /** Props for `ToolCall.Trigger` — the header button. */
54
+ export interface ToolCallTriggerProps {
55
+ /** Override the leading tool icon. */
56
+ icon?: React.ReactNode;
57
+ className?: string;
58
+ }
59
+ /** The header row: tool icon + name + status badge + expand chevron. */
60
+ declare function ToolCallTrigger({ icon, className }: ToolCallTriggerProps): React.JSX.Element;
61
+ declare namespace ToolCallTrigger {
62
+ var displayName: string;
63
+ }
64
+ /** The collapsible region below the trigger. Renders only when expanded. */
65
+ declare function ToolCallBody({ className, children }: {
66
+ className?: string;
67
+ children?: React.ReactNode;
68
+ }): React.JSX.Element | null;
69
+ declare namespace ToolCallBody {
70
+ var displayName: string;
71
+ }
72
+ /** The `Parameters` block. Pass children to replace the highlighted JSON. */
73
+ declare function ToolCallInput({ className, children }: {
74
+ className?: string;
75
+ children?: React.ReactNode;
76
+ }): React.JSX.Element | null;
77
+ declare namespace ToolCallInput {
78
+ var displayName: string;
79
+ }
80
+ /** The `Result` block. Pass children to replace the JSON / auto-table output. */
81
+ declare function ToolCallOutput({ className, children }: {
82
+ className?: string;
83
+ children?: React.ReactNode;
84
+ }): React.JSX.Element | null;
85
+ declare namespace ToolCallOutput {
86
+ var displayName: string;
87
+ }
88
+ /** The error `Alert`. Renders only when the tool carries `errorText`. */
89
+ declare function ToolCallError({ className }: {
90
+ className?: string;
91
+ }): React.JSX.Element | null;
92
+ declare namespace ToolCallError {
93
+ var displayName: string;
94
+ }
95
+ /**
96
+ * ToolCall — render `<ToolCall tool={part} />` for the default card, or compose
97
+ * `ToolCall.Trigger` / `Body` / `Input` / `Output` / `Error` for a custom
98
+ * layout. Mirrors the `Message` compound: render it, or compose it.
99
+ */
100
+ export declare const ToolCall: React.ForwardRefExoticComponent<ToolCallProps & React.RefAttributes<HTMLDivElement>> & {
101
+ Root: React.ForwardRefExoticComponent<ToolCallProps & React.RefAttributes<HTMLDivElement>>;
102
+ Trigger: typeof ToolCallTrigger;
103
+ Body: typeof ToolCallBody;
104
+ Input: typeof ToolCallInput;
105
+ Output: typeof ToolCallOutput;
106
+ Error: typeof ToolCallError;
107
+ };
108
+ /** Back-compat alias — `message.tsx` and others import `ToolCallCard`. */
109
+ export declare const ToolCallCard: React.ForwardRefExoticComponent<ToolCallProps & React.RefAttributes<HTMLDivElement>>;
110
+ export {};
18
111
  //# sourceMappingURL=tool-ui.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool-ui.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/tool-ui.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAU1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AA4B7F,gCAAgC;AAChC,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAS/E;AAkFD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,GACL,EAAE;IACD,IAAI,EAAE,YAAY,GAAG,mBAAmB,CAAC;CAC1C,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiEpB"}
1
+ {"version":3,"file":"tool-ui.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/tool-ui.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAY1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAyD7F,gCAAgC;AAChC,wBAAgB,eAAe,CAC7B,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1D,KAAK,CAAC,GAAG,CAAC,OAAO,CAcnB;AAwFD;;;;;;;;;GASG;AAaH,yDAAyD;AACzD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,YAAY,GAAG,mBAAmB,CAAC;IACzC,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAID,kFAAkF;AAClF,wBAAgB,WAAW,IAAI,oBAAoB,CAQlD;AAED,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,YAAY,GAAG,mBAAmB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,0EAA0E;IAC1E,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC3E,gDAAgD;IAChD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,GAAG,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5E,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAoED,wDAAwD;AACxD,MAAM,WAAW,oBAAoB;IACnC,sCAAsC;IACtC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wEAAwE;AACxE,iBAAS,eAAe,CACtB,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,oBAAoB,GACxC,KAAK,CAAC,GAAG,CAAC,OAAO,CA0BnB;kBA5BQ,eAAe;;;AA+BxB,4EAA4E;AAC5E,iBAAS,YAAY,CACnB,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAC1E,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAc1B;kBAhBQ,YAAY;;;AAmBrB,6EAA6E;AAC7E,iBAAS,aAAa,CACpB,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAC1E,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAa1B;kBAfQ,aAAa;;;AAkBtB,iFAAiF;AACjF,iBAAS,cAAc,CACrB,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAC1E,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAuB1B;kBAzBQ,cAAc;;;AA4BvB,yEAAyE;AACzE,iBAAS,aAAa,CACpB,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAa1B;kBAfQ,aAAa;;;AAkBtB;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;CAOnB,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,YAAY,sFAAe,CAAC"}
@@ -5,11 +5,21 @@
5
5
  import * as React from "../../../../../../react/react.js";
6
6
  import { cn } from "../../theme.js";
7
7
  import { CheckCircleIcon, ChevronDownIcon, CircleIcon, ClockIcon, WrenchIcon, XCircleIcon, } from "../../icons/index.js";
8
+ import { Alert, AlertContent, AlertIcon } from "../../ui/alert.js";
9
+ import { COMPONENT_ERROR } from "../../../../../errors/error-registry.js";
8
10
  import { escapeHtml } from "../../../../../utils/html-escape.js";
11
+ import { isSkillToolPart } from "../utils/message-parts.js";
12
+ import { getSkillToolProps, SkillTool } from "./skill-tool.js";
9
13
  /** Tool status configuration mapping state to label and icon */
10
14
  const TOOL_STATUS_CONFIG = {
11
- "input-streaming": { label: "Pending", icon: React.createElement(CircleIcon, { className: "size-3.5" }) },
12
- "input-available": { label: "Running", icon: React.createElement(ClockIcon, { className: "size-3.5 animate-pulse" }) },
15
+ "input-streaming": {
16
+ label: "Pending",
17
+ icon: React.createElement(CircleIcon, { className: "size-3.5" }),
18
+ },
19
+ "input-available": {
20
+ label: "Running",
21
+ icon: React.createElement(ClockIcon, { className: "size-3.5 animate-pulse" }),
22
+ },
13
23
  "approval-requested": {
14
24
  label: "Awaiting Approval",
15
25
  icon: React.createElement(ClockIcon, { className: "size-3.5 text-yellow-600" }),
@@ -22,18 +32,36 @@ const TOOL_STATUS_CONFIG = {
22
32
  label: "Completed",
23
33
  icon: React.createElement(CheckCircleIcon, { className: "size-3.5 text-green-600" }),
24
34
  },
25
- "output-error": { label: "Error", icon: React.createElement(XCircleIcon, { className: "size-3.5 text-red-600" }) },
26
- "output-denied": { label: "Denied", icon: React.createElement(XCircleIcon, { className: "size-3.5 text-orange-600" }) },
35
+ "output-error": {
36
+ label: "Error",
37
+ icon: React.createElement(XCircleIcon, { className: "size-3.5 text-red-600" }),
38
+ },
39
+ "output-denied": {
40
+ label: "Denied",
41
+ icon: React.createElement(XCircleIcon, { className: "size-3.5 text-orange-600" }),
42
+ },
27
43
  // Legacy states
28
- call: { label: "Running", icon: React.createElement(ClockIcon, { className: "size-3.5 animate-pulse" }) },
29
- "partial-call": { label: "Running", icon: React.createElement(ClockIcon, { className: "size-3.5 animate-pulse" }) },
30
- result: { label: "Completed", icon: React.createElement(CheckCircleIcon, { className: "size-3.5 text-green-600" }) },
31
- error: { label: "Error", icon: React.createElement(XCircleIcon, { className: "size-3.5 text-red-600" }) },
44
+ call: {
45
+ label: "Running",
46
+ icon: React.createElement(ClockIcon, { className: "size-3.5 animate-pulse" }),
47
+ },
48
+ "partial-call": {
49
+ label: "Running",
50
+ icon: React.createElement(ClockIcon, { className: "size-3.5 animate-pulse" }),
51
+ },
52
+ result: {
53
+ label: "Completed",
54
+ icon: React.createElement(CheckCircleIcon, { className: "size-3.5 text-green-600" }),
55
+ },
56
+ error: {
57
+ label: "Error",
58
+ icon: React.createElement(XCircleIcon, { className: "size-3.5 text-red-600" }),
59
+ },
32
60
  };
33
61
  /** Render tool status badge. */
34
- export function ToolStatusBadge({ state }) {
62
+ export function ToolStatusBadge({ state, className }) {
35
63
  const config = TOOL_STATUS_CONFIG[state];
36
- return (React.createElement("span", { className: "inline-flex items-center gap-1.5 rounded-full bg-[var(--accent)] px-2.5 py-0.5 text-xs font-medium text-[var(--foreground)] border border-[var(--border)]" },
64
+ return (React.createElement("span", { className: cn("inline-flex items-center gap-1.5 rounded-full border border-[var(--outline-border)] px-2 py-0.5 text-[11px] font-medium leading-none text-[var(--foreground)]", className) },
37
65
  config?.icon ?? React.createElement(CircleIcon, { className: "size-3.5" }),
38
66
  config?.label ?? state));
39
67
  }
@@ -52,7 +80,7 @@ function formatJsonWithHighlight(obj) {
52
80
  .replace(/: &quot;([^&]*)&quot;/g, ': <span class="text-amber-600">&quot;$1&quot;</span>')
53
81
  .replace(/: (\d+)/g, ': <span class="text-blue-600">$1</span>')
54
82
  .replace(/: (true|false)/g, ': <span class="text-purple-600">$1</span>');
55
- return (React.createElement("pre", { className: "text-sm font-mono whitespace-pre-wrap", dangerouslySetInnerHTML: { __html: highlighted } }));
83
+ return (React.createElement("pre", { className: "whitespace-pre-wrap font-mono text-sm", dangerouslySetInnerHTML: { __html: highlighted } }));
56
84
  }
57
85
  function renderOutputAsTable(output) {
58
86
  if (!Array.isArray(output) || output.length === 0)
@@ -66,40 +94,134 @@ function renderOutputAsTable(output) {
66
94
  return (React.createElement("div", { className: "overflow-x-auto" },
67
95
  React.createElement("table", { className: "min-w-full text-sm" },
68
96
  React.createElement("thead", null,
69
- React.createElement("tr", { className: "border-b border-[var(--border)]" }, keys.map((key) => (React.createElement("th", { key: key, className: "px-4 py-2 text-left font-semibold text-[var(--foreground)]" }, key.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase())))))),
97
+ React.createElement("tr", { className: "border-b border-[var(--edge)]" }, keys.map((key) => (React.createElement("th", { key: key, className: "px-4 py-2 text-left font-medium text-[var(--foreground)]" }, key.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase())))))),
70
98
  React.createElement("tbody", null, output.map((row, i) => {
71
99
  const record = row;
72
- return (React.createElement("tr", { key: i, className: "border-b border-[var(--border)]" }, keys.map((key) => (React.createElement("td", { key: key, className: "px-4 py-2 text-[var(--card-foreground)]" }, String(record?.[key] ?? ""))))));
100
+ return (React.createElement("tr", { key: i, className: "border-b border-[var(--edge)]" }, keys.map((key) => (React.createElement("td", { key: key, className: "px-4 py-2 text-[var(--foreground)]" }, String(record?.[key] ?? ""))))));
73
101
  })))));
74
102
  }
75
103
  function hasVisibleToolOutput(output) {
76
104
  return output !== undefined && output !== null;
77
105
  }
106
+ const ToolCallContext = React.createContext(null);
107
+ /** Read the enclosing `ToolCall` state. Throws when used outside a `ToolCall`. */
108
+ export function useToolCall() {
109
+ const ctx = React.useContext(ToolCallContext);
110
+ if (!ctx) {
111
+ throw COMPONENT_ERROR.create({
112
+ detail: "useToolCall must be used within a ToolCall",
113
+ });
114
+ }
115
+ return ctx;
116
+ }
78
117
  /**
79
- * Tool call card component - renders tool invocations with parameters and results
80
- * Styled to match AI Elements (https://ai-sdk.dev/elements)
118
+ * `ToolCall.Root` context provider + the card wrapper. No children renders
119
+ * the default anatomy (`Trigger` + `Body`); pass children to recompose. Skill /
120
+ * compact tools short-circuit to the single-line row (not composable).
81
121
  */
82
- export function ToolCallCard({ tool, }) {
122
+ const ToolCallRoot = React.forwardRef(function ToolCall({ tool, className, icon, variant, defaultExpanded, onToggle, renderSkill, children }, ref) {
83
123
  const hasOutput = hasVisibleToolOutput(tool.output);
84
124
  const hasError = Boolean(tool.errorText);
85
- const shouldExpandByDefault = tool.state !== "output-available" || hasOutput || hasError;
86
- const [isExpanded, setIsExpanded] = React.useState(shouldExpandByDefault);
87
- const tableOutput = hasOutput ? renderOutputAsTable(tool.output) : null;
88
- return (React.createElement("div", { className: "not-prose w-full rounded-xl border border-[var(--border)] bg-[var(--card)]" },
89
- React.createElement("button", { type: "button", onClick: () => setIsExpanded((v) => !v), className: "group flex w-full items-center justify-between gap-4 p-3 hover:bg-[var(--accent)] transition-all rounded-t-xl" },
90
- React.createElement("div", { className: "flex items-center gap-2" },
91
- React.createElement(WrenchIcon, { className: "size-4 text-[var(--muted-foreground)]" }),
92
- React.createElement("span", { className: "font-medium text-sm text-[var(--foreground)]" }, tool.toolName),
93
- React.createElement(ToolStatusBadge, { state: tool.state })),
94
- React.createElement(ChevronDownIcon, { className: cn("size-4 text-[var(--muted-foreground)] transition-transform", isExpanded && "rotate-180") })),
95
- !isExpanded ? null : (React.createElement("div", { className: "border-t border-[var(--border)]" },
96
- tool.input === undefined ? null : (React.createElement("div", { className: "space-y-2 overflow-hidden p-4" },
97
- React.createElement("h4", { className: "font-medium text-[var(--muted-foreground)] text-xs uppercase tracking-wide" }, "Parameters"),
98
- React.createElement("div", { className: "rounded-lg bg-[var(--accent)] p-3" }, formatJsonWithHighlight(tool.input)))),
99
- !hasOutput ? null : (React.createElement("div", { className: "space-y-2 p-4 border-t border-[var(--border)]" },
100
- React.createElement("h4", { className: "font-medium text-[var(--muted-foreground)] text-xs uppercase tracking-wide" }, "Result"),
101
- React.createElement("div", { className: "overflow-x-auto rounded-lg bg-[var(--accent)] text-[var(--foreground)]" }, tableOutput ?? React.createElement("div", { className: "p-3" }, formatJsonWithHighlight(tool.output))))),
102
- !tool.errorText ? null : (React.createElement("div", { className: "space-y-2 p-4 border-t border-[var(--border)]" },
103
- React.createElement("h4", { className: "font-medium text-[var(--destructive)] text-xs uppercase tracking-wide" }, "Error"),
104
- React.createElement("div", { className: "rounded-lg bg-[var(--destructive)]/10 text-[var(--destructive)] p-3 text-sm" }, tool.errorText)))))));
125
+ // Collapse tool cards by default. Fast server-side tools (e.g.
126
+ // `search_knowledge`) resolve near-instantly and otherwise stack up
127
+ // expanded, burying the assistant's actual reply. The trigger row still
128
+ // shows the tool name + status badge, and the chevron expands on demand.
129
+ // Errors stay open so failures aren't hidden behind a click.
130
+ const shouldExpandByDefault = hasError;
131
+ const [isExpanded, setIsExpanded] = React.useState(defaultExpanded ?? shouldExpandByDefault);
132
+ // Compact row for skill tools (or when forced) a presentation variant.
133
+ const isCompact = variant === "compact" ||
134
+ (variant !== "card" && isSkillToolPart(tool));
135
+ if (isCompact) {
136
+ if (renderSkill)
137
+ return React.createElement(React.Fragment, null, renderSkill(tool));
138
+ return React.createElement(SkillTool, { ...getSkillToolProps(tool) });
139
+ }
140
+ const toggle = (e) => {
141
+ const next = !isExpanded;
142
+ setIsExpanded(next);
143
+ onToggle?.(next, e);
144
+ };
145
+ const context = {
146
+ tool,
147
+ isExpanded,
148
+ toggle,
149
+ hasOutput,
150
+ hasError,
151
+ };
152
+ return (React.createElement(ToolCallContext.Provider, { value: context },
153
+ React.createElement("div", { ref: ref, className: cn("not-prose w-full overflow-hidden rounded-[var(--radius-md)] border border-[var(--outline-border)] bg-transparent px-4 py-2.5", className) }, children ?? (React.createElement(React.Fragment, null,
154
+ React.createElement(ToolCallTrigger, { icon: icon }),
155
+ React.createElement(ToolCallBody, null))))));
156
+ });
157
+ ToolCallRoot.displayName = "ToolCall.Root";
158
+ /** The header row: tool icon + name + status badge + expand chevron. */
159
+ function ToolCallTrigger({ icon, className }) {
160
+ const { tool, isExpanded, toggle } = useToolCall();
161
+ return (React.createElement("button", { type: "button", onClick: toggle, className: cn("group flex w-full items-center justify-between gap-3 text-left transition-colors hover:text-[var(--foreground)]", className) },
162
+ React.createElement("div", { className: "flex min-w-0 items-center gap-2" },
163
+ icon ?? React.createElement(WrenchIcon, { className: "size-3.5 shrink-0 text-[var(--foreground)]" }),
164
+ React.createElement("span", { className: "min-w-0 truncate text-sm font-medium leading-tight text-[var(--foreground)]" }, tool.toolName),
165
+ React.createElement(ToolStatusBadge, { state: tool.state })),
166
+ React.createElement(ChevronDownIcon, { className: cn("size-3.5 shrink-0 text-[var(--faint)] transition-transform", isExpanded && "rotate-180") })));
105
167
  }
168
+ ToolCallTrigger.displayName = "ToolCall.Trigger";
169
+ /** The collapsible region below the trigger. Renders only when expanded. */
170
+ function ToolCallBody({ className, children }) {
171
+ const { isExpanded } = useToolCall();
172
+ if (!isExpanded)
173
+ return null;
174
+ return (React.createElement("div", { className: cn("mt-3 border-t border-[var(--edge)] pt-3", className) }, children ?? (React.createElement(React.Fragment, null,
175
+ React.createElement(ToolCallInput, null),
176
+ React.createElement(ToolCallOutput, null),
177
+ React.createElement(ToolCallError, null)))));
178
+ }
179
+ ToolCallBody.displayName = "ToolCall.Body";
180
+ /** The `Parameters` block. Pass children to replace the highlighted JSON. */
181
+ function ToolCallInput({ className, children }) {
182
+ const { tool } = useToolCall();
183
+ if (tool.input === undefined)
184
+ return null;
185
+ return (React.createElement("div", { className: cn("space-y-2 overflow-hidden", className) },
186
+ React.createElement("h4", { className: "text-xs font-medium text-[var(--faint)]" }, "Parameters"),
187
+ React.createElement("div", { className: "rounded-[var(--radius-md)] bg-[var(--secondary)] p-3" }, children ?? formatJsonWithHighlight(tool.input))));
188
+ }
189
+ ToolCallInput.displayName = "ToolCall.Input";
190
+ /** The `Result` block. Pass children to replace the JSON / auto-table output. */
191
+ function ToolCallOutput({ className, children }) {
192
+ const { tool, hasOutput } = useToolCall();
193
+ if (!hasOutput)
194
+ return null;
195
+ const tableOutput = renderOutputAsTable(tool.output);
196
+ return (React.createElement("div", { className: cn("mt-3 space-y-2 border-t border-[var(--edge)] pt-3", className) },
197
+ React.createElement("h4", { className: "text-xs font-medium text-[var(--faint)]" }, "Result"),
198
+ React.createElement("div", { className: "overflow-x-auto rounded-[var(--radius-md)] bg-[var(--secondary)] text-[var(--foreground)]" }, children ?? tableOutput ?? (React.createElement("div", { className: "p-3" }, formatJsonWithHighlight(tool.output))))));
199
+ }
200
+ ToolCallOutput.displayName = "ToolCall.Output";
201
+ /** The error `Alert`. Renders only when the tool carries `errorText`. */
202
+ function ToolCallError({ className }) {
203
+ const { tool } = useToolCall();
204
+ if (!tool.errorText)
205
+ return null;
206
+ return (React.createElement("div", { className: cn("mt-3 border-t border-[var(--edge)] pt-3", className) },
207
+ React.createElement(Alert, { variant: "error" },
208
+ React.createElement(AlertIcon, null,
209
+ React.createElement(XCircleIcon, { className: "size-4" })),
210
+ React.createElement(AlertContent, null, tool.errorText))));
211
+ }
212
+ ToolCallError.displayName = "ToolCall.Error";
213
+ /**
214
+ * ToolCall — render `<ToolCall tool={part} />` for the default card, or compose
215
+ * `ToolCall.Trigger` / `Body` / `Input` / `Output` / `Error` for a custom
216
+ * layout. Mirrors the `Message` compound: render it, or compose it.
217
+ */
218
+ export const ToolCall = Object.assign(ToolCallRoot, {
219
+ Root: ToolCallRoot,
220
+ Trigger: ToolCallTrigger,
221
+ Body: ToolCallBody,
222
+ Input: ToolCallInput,
223
+ Output: ToolCallOutput,
224
+ Error: ToolCallError,
225
+ });
226
+ /** Back-compat alias — `message.tsx` and others import `ToolCallCard`. */
227
+ export const ToolCallCard = ToolCallRoot;
@@ -5,11 +5,13 @@
5
5
  */
6
6
  export { ChatRoot, type ChatRootProps } from "./chat-root.js";
7
7
  export { ChatMessageList, type ChatMessageListProps } from "./chat-message-list.js";
8
- export { ChatComposer, type ChatComposerProps } from "./chat-composer.js";
8
+ export { ChatInput, type ChatInputProps } from "./chat-composer.js";
9
9
  export { ChatEmpty, type ChatEmptyProps } from "./chat-empty.js";
10
+ export { ChatEmptyState, type ChatEmptyStateAvatarProps, type ChatEmptyStateHeadingProps, type ChatEmptyStateRootProps, type ChatEmptyStateSuggestionProps, type ChatEmptyStateSuggestionsProps, } from "./chat-empty-state.js";
10
11
  export { ChatIf, type ChatIfProps } from "./chat-if.js";
11
12
  export { AgentAvatar, type AgentAvatarProps } from "./agent-avatar.js";
12
13
  export { ModelAvatar, type ModelAvatarProps } from "./model-avatar.js";
13
14
  export { ErrorBanner, type ErrorBannerProps } from "./error-banner.js";
14
- export { Message, type MessageRootProps } from "./message.js";
15
+ export { PendingMessage, type PendingMessageProps } from "./pending-message.js";
16
+ export { Message, type MessageProps, type MessageRootProps } from "./message.js";
15
17
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/api.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGvE,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/api.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,cAAc,EACd,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,GACpC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
@@ -6,11 +6,13 @@
6
6
  // Root / Layout
7
7
  export { ChatRoot } from "./chat-root.js";
8
8
  export { ChatMessageList } from "./chat-message-list.js";
9
- export { ChatComposer } from "./chat-composer.js";
9
+ export { ChatInput } from "./chat-composer.js";
10
10
  export { ChatEmpty } from "./chat-empty.js";
11
+ export { ChatEmptyState, } from "./chat-empty-state.js";
11
12
  export { ChatIf } from "./chat-if.js";
12
13
  export { AgentAvatar } from "./agent-avatar.js";
13
14
  export { ModelAvatar } from "./model-avatar.js";
14
15
  export { ErrorBanner } from "./error-banner.js";
15
- // Message compound
16
+ export { PendingMessage } from "./pending-message.js";
17
+ // Message — render-or-compose (`<Message />` or `Message.Root` + parts)
16
18
  export { Message } from "./message.js";