veryfront 0.1.996 → 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 (380) hide show
  1. package/esm/cli/templates/manifest.js +1 -1
  2. package/esm/deno.d.ts +8 -0
  3. package/esm/deno.js +12 -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/task/discovery.d.ts +95 -0
  350. package/esm/src/task/discovery.d.ts.map +1 -0
  351. package/esm/src/task/discovery.js +192 -0
  352. package/esm/src/task/index.d.ts +27 -0
  353. package/esm/src/task/index.d.ts.map +1 -0
  354. package/esm/src/task/index.js +22 -0
  355. package/esm/src/utils/version-constant.d.ts +1 -1
  356. package/esm/src/utils/version-constant.js +1 -1
  357. package/esm/src/workflow/blob/local-storage.d.ts +32 -0
  358. package/esm/src/workflow/blob/local-storage.d.ts.map +1 -0
  359. package/esm/src/workflow/blob/local-storage.js +179 -0
  360. package/esm/src/workflow/blob/types.d.ts +5 -0
  361. package/esm/src/workflow/blob/types.d.ts.map +1 -1
  362. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts +11 -0
  363. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts.map +1 -1
  364. package/esm/src/workflow/blob/veryfront-cloud-storage.js +36 -0
  365. package/package.json +9 -1
  366. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts +0 -20
  367. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +0 -1
  368. package/esm/src/react/components/chat/chat/components/uploads-panel.js +0 -49
  369. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts +0 -28
  370. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +0 -1
  371. package/esm/src/react/components/chat/chat/contexts/thread-list-context.js +0 -27
  372. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts +0 -28
  373. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +0 -1
  374. package/esm/src/react/components/chat/chat/hooks/use-threads.js +0 -151
  375. package/esm/src/react/components/chat/chat-with-sidebar.d.ts +0 -110
  376. package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +0 -1
  377. package/esm/src/react/components/chat/chat-with-sidebar.js +0 -167
  378. package/esm/src/react/components/chat/message.d.ts +0 -42
  379. package/esm/src/react/components/chat/message.d.ts.map +0 -1
  380. package/esm/src/react/components/chat/message.js +0 -69
@@ -3,9 +3,9 @@ import { cn } from "../../theme.js";
3
3
  import { ArrowDownIcon } from "../../icons/index.js";
4
4
  /** Render suggestion. */
5
5
  export function Suggestion({ suggestion, onClick, className, icon, }) {
6
- return (React.createElement("button", { type: "button", onClick: () => onClick?.(suggestion), className: cn("group flex items-center gap-2 rounded-full border border-[var(--border)] px-4 py-2 text-left text-sm text-[var(--muted-foreground)] transition-all hover:bg-[var(--accent)] hover:border-[var(--input-border)] hover:text-[var(--foreground)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2", className) },
6
+ return (React.createElement("button", { type: "button", onClick: () => onClick?.(suggestion), className: cn("group flex items-center gap-2 rounded-[var(--radius-md)] border border-[var(--outline-border)] px-3 py-2 text-left text-sm text-[var(--faint)] transition-colors hover:border-[var(--edge-medium)] hover:bg-[var(--tertiary)] hover:text-[var(--foreground)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--background)]", className) },
7
7
  icon
8
- ? (React.createElement("span", { className: "shrink-0 text-[var(--input-placeholder)] transition-colors group-hover:text-[var(--foreground)]" }, icon))
8
+ ? (React.createElement("span", { className: "shrink-0 text-[var(--faint)] transition-colors group-hover:text-[var(--foreground)]" }, icon))
9
9
  : null,
10
10
  React.createElement("span", { className: "line-clamp-1" }, suggestion)));
11
11
  }
@@ -20,18 +20,17 @@ export function Suggestions({ children, className, layout = "grid", }) {
20
20
  export function ConversationEmptyState({ icon, title = "What can I help with?", description, children, className, }) {
21
21
  return (React.createElement("div", { className: cn("flex flex-col items-center justify-center text-center", className) },
22
22
  icon
23
- ? (React.createElement("div", { className: "mb-4 text-[var(--muted-foreground)]" }, icon))
23
+ ? (React.createElement("div", { className: "mb-4 text-[var(--faint)]" }, icon))
24
24
  : null,
25
- React.createElement("h1", { className: "text-2xl font-medium text-[var(--foreground)] tracking-tight" }, title),
25
+ React.createElement("h1", { className: "text-xl font-medium text-[var(--foreground)]" }, title),
26
26
  description
27
- ? (React.createElement("p", { className: "mt-2 max-w-sm text-sm text-[var(--muted-foreground)] leading-relaxed" }, description))
27
+ ? (React.createElement("p", { className: "mt-2 max-w-sm text-sm leading-6 text-[var(--faint)]" }, description))
28
28
  : null,
29
29
  children));
30
30
  }
31
31
  /** Render conversation scroll button. */
32
- export function ConversationScrollButton({ onClick, visible = true, className, }) {
32
+ export function ConversationScrollButton({ onClick, visible = true, className, icon, }) {
33
33
  if (!visible)
34
34
  return null;
35
- return (React.createElement("button", { type: "button", onClick: onClick, className: cn("absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full border border-[var(--border)] bg-[var(--card)] p-2 shadow-lg transition-all hover:bg-[var(--accent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2", className) },
36
- React.createElement(ArrowDownIcon, { className: "size-4" })));
35
+ return (React.createElement("button", { type: "button", onClick: onClick, "aria-label": "Scroll to bottom", className: cn("absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full border border-[var(--outline-border)] bg-[var(--secondary)] p-2 shadow-sm transition-colors hover:bg-[var(--tertiary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--background)]", className) }, icon ?? React.createElement(ArrowDownIcon, { className: "size-4" })));
37
36
  }
@@ -1,9 +1,13 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  import type { InferenceMode } from "../../../../../agent/react/index.js";
3
3
  /** Props accepted by inference badge. */
4
- export interface InferenceBadgeProps {
4
+ export interface InferenceBadgeProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  inferenceMode: InferenceMode;
6
+ /** Override the badge label. Defaults to "Running locally". */
7
+ label?: string;
8
+ /** Override the leading green status dot. */
9
+ icon?: React.ReactNode;
6
10
  }
7
11
  /** Render inference badge. */
8
- export declare function InferenceBadge({ inferenceMode }: InferenceBadgeProps): React.ReactElement | null;
12
+ export declare function InferenceBadge({ inferenceMode, label, icon, className, ...props }: InferenceBadgeProps): React.ReactElement | null;
9
13
  //# sourceMappingURL=inference-badge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inference-badge.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/inference-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEzE,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,8BAA8B;AAC9B,wBAAgB,cAAc,CAAC,EAAE,aAAa,EAAE,EAAE,mBAAmB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAShG"}
1
+ {"version":3,"file":"inference-badge.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/inference-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEzE,yCAAyC;AACzC,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/E,aAAa,EAAE,aAAa,CAAC;IAC7B,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,8BAA8B;AAC9B,wBAAgB,cAAc,CAC5B,EACE,aAAa,EACb,KAAyB,EACzB,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,GACrB,KAAK,CAAC,YAAY,GAAG,IAAI,CAe3B"}
@@ -1,9 +1,10 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
+ import { cn } from "../../theme.js";
2
3
  /** Render inference badge. */
3
- export function InferenceBadge({ inferenceMode }) {
4
+ export function InferenceBadge({ inferenceMode, label = "Running locally", icon, className, ...props }) {
4
5
  if (inferenceMode === "cloud")
5
6
  return null;
6
- return (React.createElement("div", { className: "flex items-center gap-1.5 px-3 py-1 text-xs text-[var(--muted-foreground)]" },
7
- React.createElement("span", { className: "size-1.5 rounded-full bg-green-500" }),
8
- React.createElement("span", null, "Running locally")));
7
+ return (React.createElement("div", { ...props, className: cn("flex items-center gap-1.5 px-3 py-1 text-xs text-[var(--faint)]", className) },
8
+ icon ?? React.createElement("span", { className: "size-1.5 rounded-full bg-green-500" }),
9
+ React.createElement("span", null, label)));
9
10
  }
@@ -6,7 +6,15 @@ export interface InlineCitationProps {
6
6
  source?: Source;
7
7
  className?: string;
8
8
  onClick?: (index: number) => void;
9
+ /**
10
+ * When provided, replaces the entire default hover-card body with the
11
+ * consumer's node. The positioning/visibility timing wrapper is preserved;
12
+ * only the card contents are replaced.
13
+ */
14
+ renderCard?: (source: Source, index: number) => React.ReactNode;
15
+ /** Merged onto the hover-card container. */
16
+ cardClassName?: string;
9
17
  }
10
18
  /** Render inline citation. */
11
- export declare function InlineCitation({ index, source, className, onClick, }: InlineCitationProps): React.ReactElement;
19
+ export declare function InlineCitation({ index, source, className, onClick, renderCard, cardClassName, }: InlineCitationProps): React.ReactElement;
12
20
  //# sourceMappingURL=inline-citation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inline-citation.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/inline-citation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,8BAA8B;AAC9B,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,GACR,EAAE,mBAAmB,GAAG,KAAK,CAAC,YAAY,CAoI1C"}
1
+ {"version":3,"file":"inline-citation.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/inline-citation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAChE,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,8BAA8B;AAC9B,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,UAAU,EACV,aAAa,GACd,EAAE,mBAAmB,GAAG,KAAK,CAAC,YAAY,CAmI1C"}
@@ -1,7 +1,7 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  import { cn } from "../../theme.js";
3
3
  /** Render inline citation. */
4
- export function InlineCitation({ index, source, className, onClick, }) {
4
+ export function InlineCitation({ index, source, className, onClick, renderCard, cardClassName, }) {
5
5
  const [showCard, setShowCard] = React.useState(false);
6
6
  const timerRef = React.useRef(undefined);
7
7
  const buttonRef = React.useRef(null);
@@ -30,30 +30,29 @@ export function InlineCitation({ index, source, className, onClick, }) {
30
30
  React.useEffect(() => () => clearTimeout(timerRef.current), []);
31
31
  return (React.createElement(React.Fragment, null,
32
32
  React.createElement("span", { className: "relative inline-block" },
33
- React.createElement("button", { ref: buttonRef, type: "button", onClick: () => onClick?.(index), onMouseEnter: show, onMouseLeave: hide, className: cn("inline-flex items-center justify-center", "size-4 rounded text-[10px] font-medium leading-none", "bg-[var(--border)] text-[var(--card-foreground)]", "hover:bg-[var(--accent)] transition-colors", "align-super -translate-y-0.5 mx-0.5", className) }, index + 1)),
34
- showCard && source && (React.createElement("div", { style: cardStyle, className: "w-80 animate-in fade-in duration-150", onMouseEnter: show, onMouseLeave: hide },
35
- React.createElement("div", { className: "bg-[var(--card)] border border-[var(--border)] rounded-xl shadow-xl p-3.5 text-left" },
36
- React.createElement("div", { className: "flex items-start gap-2" },
37
- React.createElement("span", { className: "flex-shrink-0 flex items-center justify-center size-5 rounded bg-[var(--border)] text-[10px] font-bold text-[var(--card-foreground)] mt-0.5" }, index + 1),
38
- React.createElement("div", { className: "min-w-0 flex-1" },
39
- React.createElement("p", { className: "text-sm font-medium text-[var(--foreground)] line-clamp-2" }, source.title),
40
- source.url && (React.createElement("p", { className: "text-[10px] text-[var(--muted-foreground)] truncate mt-0.5 flex items-center gap-1" },
41
- React.createElement("svg", { className: "size-2.5 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" },
42
- React.createElement("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
43
- React.createElement("polyline", { points: "15 3 21 3 21 9" }),
44
- React.createElement("line", { x1: "10", y1: "14", x2: "21", y2: "3" })),
45
- source.url)))),
46
- source.snippet && (React.createElement("div", { className: "mt-2.5 pl-3 border-l-2 border-[var(--border)]" },
47
- React.createElement("p", { className: "text-xs text-[var(--card-foreground)] line-clamp-4 leading-relaxed italic" }, source.snippet))),
33
+ React.createElement("button", { ref: buttonRef, type: "button", onClick: () => onClick?.(index), onMouseEnter: show, onMouseLeave: hide, className: cn("inline-flex items-center justify-center", "size-[15px] rounded-full border border-[var(--outline-border)] text-[10px] font-semibold leading-none tabular-nums", "bg-[var(--secondary)] text-[var(--soft)] shadow-sm", "hover:border-[var(--faint)] hover:text-[var(--foreground)] transition-colors", "cursor-pointer align-super -translate-y-px ml-0.5", className) }, index + 1)),
34
+ showCard && source && (React.createElement("div", { style: cardStyle, className: cn("w-80 animate-in fade-in duration-150", cardClassName), onMouseEnter: show, onMouseLeave: hide }, renderCard
35
+ ? renderCard(source, index)
36
+ : (React.createElement("div", { className: "rounded-lg bg-[var(--popover)] p-3.5 text-left shadow-sm" },
37
+ React.createElement("div", { className: "min-w-0" },
38
+ React.createElement("p", { className: "text-sm font-medium text-[var(--foreground)] line-clamp-2" }, source.title),
39
+ source.url && (React.createElement("p", { className: "text-[10px] text-[var(--faint)] truncate mt-1 flex items-center gap-1" },
40
+ React.createElement("svg", { className: "size-2.5 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" },
41
+ React.createElement("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
42
+ React.createElement("polyline", { points: "15 3 21 3 21 9" }),
43
+ React.createElement("line", { x1: "10", y1: "14", x2: "21", y2: "3" })),
44
+ source.url))),
45
+ source.snippet && (React.createElement("div", { className: "mt-2.5 border-l-2 border-[var(--outline-border)] pl-3" },
46
+ React.createElement("p", { className: "text-xs text-[var(--foreground)] line-clamp-4 leading-relaxed italic" }, source.snippet))),
48
47
  source.score != null && (React.createElement("div", { className: "mt-2.5 flex items-center gap-2" },
49
- React.createElement("span", { className: "text-[10px] text-[var(--input-placeholder)] shrink-0" }, "Relevance"),
50
- React.createElement("div", { className: "flex-1 h-1 rounded-full bg-[var(--border)] overflow-hidden" },
48
+ React.createElement("span", { className: "text-[10px] text-[var(--faint)] shrink-0" }, "Relevance"),
49
+ React.createElement("div", { className: "flex-1 h-1 rounded-full bg-[var(--edge-medium)] overflow-hidden" },
51
50
  React.createElement("div", { className: cn("h-full rounded-full transition-all", source.score >= 0.7
52
51
  ? "bg-emerald-500"
53
52
  : source.score >= 0.4
54
53
  ? "bg-amber-500"
55
54
  : "bg-neutral-400"), style: { width: `${Math.round(source.score * 100)}%` } })),
56
- React.createElement("span", { className: "text-[10px] tabular-nums text-[var(--input-placeholder)]" },
55
+ React.createElement("span", { className: "text-[10px] tabular-nums text-[var(--faint)]" },
57
56
  Math.round(source.score * 100),
58
- "%"))))))));
57
+ "%")))))))));
59
58
  }
@@ -1,11 +1,34 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
- /** Props accepted by message actions. */
3
- export interface MessageActionsProps {
2
+ /**
3
+ * Icon overrides for {@link MessageActionBar}. Each defaults to the built-in
4
+ * glyph; `copied` shows briefly after a successful copy.
5
+ */
6
+ export interface MessageActionBarIcons {
7
+ copy?: React.ReactNode;
8
+ copied?: React.ReactNode;
9
+ edit?: React.ReactNode;
10
+ regenerate?: React.ReactNode;
11
+ }
12
+ /** Props accepted by the context-free message action bar. */
13
+ export interface MessageActionBarProps {
4
14
  content: string;
5
15
  className?: string;
6
- /** When provided, renders an edit button that calls this handler */
16
+ /** Override any of the action icons. */
17
+ icons?: MessageActionBarIcons;
18
+ /** Wrap the built-in copy; call `next()` to run it (or skip it). */
19
+ onCopy?: (event: React.MouseEvent<HTMLButtonElement>, next: () => void) => void;
20
+ /** When provided, renders an edit button that calls this handler. */
7
21
  onEdit?: (content: string) => void;
22
+ /** When provided, renders a regenerate button that calls this handler. */
23
+ onRegenerate?: () => void;
8
24
  }
9
- /** Render message actions. */
10
- export declare const MessageActions: React.ForwardRefExoticComponent<MessageActionsProps & React.RefAttributes<HTMLDivElement>>;
25
+ /**
26
+ * MessageActionBar the low-level, context-free hover action bar (copy / edit /
27
+ * regenerate). Used where there is no `Message.Root` context (e.g. the legacy
28
+ * message-list row). Inside a `Message`, prefer `Message.Actions` +
29
+ * `Message.CopyAction`/… which read from context.
30
+ *
31
+ * Renamed from `MessageActions` to end the collision with `Message.Actions`.
32
+ */
33
+ export declare const MessageActionBar: React.ForwardRefExoticComponent<MessageActionBarProps & React.RefAttributes<HTMLDivElement>>;
11
34
  //# sourceMappingURL=message-actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message-actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/message-actions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAO1D,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,8BAA8B;AAC9B,eAAO,MAAM,cAAc,4FAuE1B,CAAC"}
1
+ {"version":3,"file":"message-actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/message-actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAQ1D;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,oEAAoE;IACpE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAChF,qEAAqE;IACrE,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,8FAyD5B,CAAC"}
@@ -1,39 +1,27 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  import { cn } from "../../theme.js";
3
- import { CheckIcon, CopyIcon } from "../../icons/index.js";
4
- const ACTION_BUTTON = "inline-flex items-center justify-center size-7 text-[var(--input-placeholder)] hover:text-[var(--foreground)] hover:bg-[var(--foreground)]/5 rounded-full transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2";
5
- /** Render message actions. */
6
- export const MessageActions = React.forwardRef(function MessageActions({ content, className, onEdit }, ref) {
7
- const [copied, setCopied] = React.useState(false);
8
- const setCopiedWithTimeout = React.useCallback(() => {
9
- setCopied(true);
10
- globalThis.setTimeout(() => setCopied(false), 2000);
11
- }, []);
12
- const fallbackCopy = React.useCallback(() => {
13
- const textarea = document.createElement("textarea");
14
- textarea.value = content;
15
- document.body.appendChild(textarea);
16
- textarea.select();
17
- document.execCommand("copy");
18
- document.body.removeChild(textarea);
19
- }, [content]);
20
- const handleCopy = React.useCallback(async () => {
21
- try {
22
- await navigator.clipboard.writeText(content);
23
- }
24
- catch (_) {
25
- /* expected: clipboard API unavailable in older browsers */
26
- fallbackCopy();
27
- }
28
- finally {
29
- setCopiedWithTimeout();
30
- }
31
- }, [content, fallbackCopy, setCopiedWithTimeout]);
32
- return (React.createElement("div", { ref: ref, className: cn("flex items-center gap-0.5 mt-1.5 opacity-0 group-hover/msg:opacity-100 transition-all duration-200", className) },
33
- React.createElement("button", { type: "button", onClick: handleCopy, className: ACTION_BUTTON, title: copied ? "Copied!" : "Copy to clipboard", "aria-label": copied ? "Copied!" : "Copy to clipboard" }, copied ? React.createElement(CheckIcon, { className: "size-3.5" }) : React.createElement(CopyIcon, { className: "size-3.5" })),
34
- onEdit && (React.createElement("button", { type: "button", onClick: () => onEdit(content), className: ACTION_BUTTON, title: "Edit message", "aria-label": "Edit message" },
35
- React.createElement("svg", { className: "size-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
36
- React.createElement("path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" }),
37
- React.createElement("path", { d: "m15 5 4 4" }))))));
3
+ import { CheckIcon, CopyIcon, PencilIcon, RefreshCwIcon } from "../../icons/index.js";
4
+ import { useClipboard } from "../hooks/use-clipboard.js";
5
+ const ACTION_BUTTON = "inline-flex items-center justify-center size-7 rounded-full text-[var(--faint)] transition-colors hover:bg-[var(--tertiary)] hover:text-[var(--foreground)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--background)]";
6
+ /**
7
+ * MessageActionBar — the low-level, context-free hover action bar (copy / edit /
8
+ * regenerate). Used where there is no `Message.Root` context (e.g. the legacy
9
+ * message-list row). Inside a `Message`, prefer `Message.Actions` +
10
+ * `Message.CopyAction`/… which read from context.
11
+ *
12
+ * Renamed from `MessageActions` to end the collision with `Message.Actions`.
13
+ */
14
+ export const MessageActionBar = React.forwardRef(function MessageActionBar({ content, className, icons, onCopy, onEdit, onRegenerate }, ref) {
15
+ const { copied, copy } = useClipboard();
16
+ const doCopy = React.useCallback(() => void copy(content), [copy, content]);
17
+ return (React.createElement("div", { ref: ref, className: cn(
18
+ // No vertical margin here — the footer row owns spacing/alignment so
19
+ // the buttons stay centered with the token count beside them.
20
+ "flex items-center gap-0.5 opacity-0 group-hover/msg:opacity-100 transition-all duration-200", className) },
21
+ React.createElement("button", { type: "button", onClick: (e) => (onCopy ? onCopy(e, doCopy) : doCopy()), className: ACTION_BUTTON, title: copied ? "Copied!" : "Copy to clipboard", "aria-label": copied ? "Copied!" : "Copy to clipboard" }, copied
22
+ ? (icons?.copied ?? React.createElement(CheckIcon, { className: "size-3.5" }))
23
+ : (icons?.copy ?? React.createElement(CopyIcon, { className: "size-3.5" }))),
24
+ onRegenerate && (React.createElement("button", { type: "button", onClick: onRegenerate, className: ACTION_BUTTON, title: "Regenerate response", "aria-label": "Regenerate response" }, icons?.regenerate ?? React.createElement(RefreshCwIcon, { className: "size-3.5" }))),
25
+ onEdit && (React.createElement("button", { type: "button", onClick: () => onEdit(content), className: ACTION_BUTTON, title: "Edit message", "aria-label": "Edit message" }, icons?.edit ?? React.createElement(PencilIcon, { className: "size-3.5" })))));
38
26
  });
39
- MessageActions.displayName = "MessageActions";
27
+ MessageActionBar.displayName = "MessageActionBar";
@@ -1,10 +1,15 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  /** Props accepted by message edit form. */
3
- export interface MessageEditFormProps {
3
+ export interface MessageEditFormProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className"> {
4
4
  initialContent: string;
5
5
  onSave: (content: string) => void;
6
6
  onCancel: () => void;
7
+ className?: string;
8
+ /** Label for the save/submit button. Defaults to "Save & Submit". */
9
+ saveLabel?: string;
10
+ /** Label for the cancel button. Defaults to "Cancel". */
11
+ cancelLabel?: string;
7
12
  }
8
13
  /** Render message edit form. */
9
- export declare function MessageEditForm({ initialContent, onSave, onCancel, }: MessageEditFormProps): React.ReactElement;
14
+ export declare function MessageEditForm({ initialContent, onSave, onCancel, className, saveLabel, cancelLabel, ...props }: MessageEditFormProps): React.ReactElement;
10
15
  //# sourceMappingURL=message-edit-form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message-edit-form.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/message-edit-form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,2CAA2C;AAC3C,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,gCAAgC;AAChC,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,MAAM,EACN,QAAQ,GACT,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAiF3C"}
1
+ {"version":3,"file":"message-edit-form.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/message-edit-form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,2CAA2C;AAC3C,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC;IAC/D,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,gCAAgC;AAChC,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAA2B,EAC3B,WAAsB,EACtB,GAAG,KAAK,EACT,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAgF3C"}
@@ -1,7 +1,7 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  import { cn } from "../../theme.js";
3
3
  /** Render message edit form. */
4
- export function MessageEditForm({ initialContent, onSave, onCancel, }) {
4
+ export function MessageEditForm({ initialContent, onSave, onCancel, className, saveLabel = "Save & Submit", cancelLabel = "Cancel", ...props }) {
5
5
  const [content, setContent] = React.useState(initialContent);
6
6
  const textareaRef = React.useRef(null);
7
7
  React.useEffect(() => {
@@ -32,16 +32,16 @@ export function MessageEditForm({ initialContent, onSave, onCancel, }) {
32
32
  onSave(trimmed);
33
33
  }
34
34
  }, [content, onSave, onCancel]);
35
- return (React.createElement("div", { className: "w-full" },
35
+ return (React.createElement("div", { ...props, className: cn("w-full", className) },
36
36
  React.createElement("textarea", { ref: textareaRef, value: content, onChange: (e) => {
37
37
  setContent(e.target.value);
38
38
  resize();
39
- }, onKeyDown: handleKeyDown, rows: 1, className: cn("w-full resize-none rounded-xl px-4 py-3 text-[15px] leading-relaxed", "bg-[var(--accent)]", "border border-[var(--border)]", "focus:outline-none focus-visible:border-[var(--ring)]", "text-[var(--foreground)]") }),
39
+ }, onKeyDown: handleKeyDown, rows: 1, className: cn("w-full resize-none rounded-[var(--radius-lg)] px-4 py-3 text-[15px] leading-relaxed", "border border-[var(--outline-border)] bg-[var(--secondary)]", "focus:outline-none focus-visible:border-[var(--edge-medium)]", "text-[var(--foreground)]") }),
40
40
  React.createElement("div", { className: "flex items-center gap-2 mt-2" },
41
41
  React.createElement("button", { type: "button", onClick: () => {
42
42
  const trimmed = content.trim();
43
43
  if (trimmed)
44
44
  onSave(trimmed);
45
- }, disabled: !content.trim(), className: cn("px-3 py-1.5 text-xs font-medium rounded-full transition-all", "bg-[var(--primary)] text-[var(--primary-foreground)]", "hover:opacity-90", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2", "disabled:opacity-50 disabled:pointer-events-none") }, "Save & Submit"),
46
- React.createElement("button", { type: "button", onClick: onCancel, className: "px-3 py-1.5 text-xs font-medium rounded-full text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:bg-[var(--foreground)]/5 transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2" }, "Cancel"))));
45
+ }, disabled: !content.trim(), className: cn("px-3 py-1.5 text-xs font-medium rounded-full transition-all", "bg-[var(--primary)] text-[var(--secondary)]", "hover:bg-[var(--secondary)] hover:text-[var(--foreground)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--background)]", "disabled:opacity-50 disabled:pointer-events-none") }, saveLabel),
46
+ React.createElement("button", { type: "button", onClick: onCancel, className: "px-3 py-1.5 text-xs font-medium rounded-full text-[var(--faint)] hover:bg-[var(--tertiary)] hover:text-[var(--foreground)] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--background)]" }, cancelLabel))));
47
47
  }
@@ -1,12 +1,22 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  /** Public API contract for feedback value. */
3
3
  export type FeedbackValue = "positive" | "negative";
4
+ /**
5
+ * Icon overrides for {@link MessageFeedback}. Each defaults to the built-in
6
+ * thumbs glyph.
7
+ */
8
+ export interface MessageFeedbackIcons {
9
+ positive?: React.ReactNode;
10
+ negative?: React.ReactNode;
11
+ }
4
12
  /** Props accepted by message feedback. */
5
- export interface MessageFeedbackProps {
13
+ export interface MessageFeedbackProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onClick" | "className"> {
6
14
  messageId: string;
7
15
  feedback?: FeedbackValue | null;
8
16
  onFeedback: (messageId: string, feedback: FeedbackValue) => void;
9
17
  className?: string;
18
+ /** Override either of the thumbs icons. */
19
+ icons?: MessageFeedbackIcons;
10
20
  }
11
21
  /** Render message feedback. */
12
22
  export declare const MessageFeedback: React.ForwardRefExoticComponent<MessageFeedbackProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"message-feedback.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/message-feedback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,CAAC;AAEpD,0CAA0C;AAC1C,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,+BAA+B;AAC/B,eAAO,MAAM,eAAe,6FAuD3B,CAAC"}
1
+ {"version":3,"file":"message-feedback.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/message-feedback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,0CAA0C;AAC1C,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B;AAKD,+BAA+B;AAC/B,eAAO,MAAM,eAAe,6FAkE3B,CAAC"}
@@ -1,20 +1,18 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  import { cn } from "../../theme.js";
3
- const BUTTON_BASE = "inline-flex items-center justify-center size-7 rounded-full transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2";
3
+ const BUTTON_BASE = "inline-flex items-center justify-center size-7 rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--background)]";
4
4
  /** Render message feedback. */
5
- export const MessageFeedback = React.forwardRef(function MessageFeedback({ messageId, feedback, onFeedback, className }, ref) {
6
- return (React.createElement("div", { ref: ref, className: cn("flex items-center gap-1", className) },
5
+ export const MessageFeedback = React.forwardRef(function MessageFeedback({ messageId, feedback, onFeedback, className, icons, ...props }, ref) {
6
+ return (React.createElement("div", { ref: ref, ...props, className: cn("flex items-center gap-1", className) },
7
7
  React.createElement("button", { type: "button", onClick: () => onFeedback(messageId, "positive"), className: cn(BUTTON_BASE, feedback === "positive"
8
8
  ? "text-emerald-500 bg-emerald-500/10"
9
- : "text-[var(--input-placeholder)] hover:text-emerald-500 hover:bg-[var(--accent)]"), title: "Helpful" },
10
- React.createElement("svg", { className: "size-3.5", viewBox: "0 0 24 24", fill: feedback === "positive" ? "currentColor" : "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
11
- React.createElement("path", { d: "M7 10v12" }),
12
- React.createElement("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z" }))),
9
+ : "text-[var(--faint)] hover:bg-[var(--tertiary)] hover:text-emerald-500"), title: "Helpful" }, icons?.positive ?? (React.createElement("svg", { className: "size-3.5", viewBox: "0 0 24 24", fill: feedback === "positive" ? "currentColor" : "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
10
+ React.createElement("path", { d: "M7 10v12" }),
11
+ React.createElement("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z" })))),
13
12
  React.createElement("button", { type: "button", onClick: () => onFeedback(messageId, "negative"), className: cn(BUTTON_BASE, feedback === "negative"
14
13
  ? "text-red-500 bg-red-500/10"
15
- : "text-[var(--input-placeholder)] hover:text-[var(--destructive)] hover:bg-[var(--accent)]"), title: "Not helpful" },
16
- React.createElement("svg", { className: "size-3.5", viewBox: "0 0 24 24", fill: feedback === "negative" ? "currentColor" : "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
17
- React.createElement("path", { d: "M17 14V2" }),
18
- React.createElement("path", { d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z" })))));
14
+ : "text-[var(--faint)] hover:bg-[var(--tertiary)] hover:text-[var(--destructive)]"), title: "Not helpful" }, icons?.negative ?? (React.createElement("svg", { className: "size-3.5", viewBox: "0 0 24 24", fill: feedback === "negative" ? "currentColor" : "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
15
+ React.createElement("path", { d: "M17 14V2" }),
16
+ React.createElement("path", { d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z" }))))));
19
17
  });
20
18
  MessageFeedback.displayName = "MessageFeedback";
@@ -1 +1 @@
1
- {"version":3,"file":"quick-actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/quick-actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,4CAA4C;AAC5C,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,4BAA4B;AAC5B,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,aAAa,EACb,SAAS,GACV,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAiB/C"}
1
+ {"version":3,"file":"quick-actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/quick-actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,4CAA4C;AAC5C,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,4BAA4B;AAC5B,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,aAAa,EACb,SAAS,GACV,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAkB/C"}
@@ -4,5 +4,7 @@ import { cn } from "../../theme.js";
4
4
  export function QuickActions({ actions, onActionClick, className, }) {
5
5
  if (!actions || actions.length === 0)
6
6
  return null;
7
- return (React.createElement("div", { className: cn("flex flex-wrap gap-2", className) }, actions.map((action) => (React.createElement("button", { key: action.id, type: "button", onClick: () => onActionClick?.(action), className: "rounded-full border border-[var(--border)] px-4 py-2 text-sm text-[var(--muted-foreground)] transition-colors hover:bg-[var(--foreground)]/[0.03] hover:text-[var(--foreground)] hover:border-[var(--input-border)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]" }, action.label)))));
7
+ return (React.createElement("div", { className: cn("flex flex-wrap gap-2", className) }, actions.map((action) => (React.createElement("button", { key: action.id, type: "button", onClick: () => onActionClick?.(action), className: "rounded-full border border-[var(--outline-border)] px-4 py-2 text-sm text-[var(--faint)] transition-colors hover:border-[var(--edge-medium)] hover:bg-[var(--tertiary)] hover:text-[var(--foreground)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--background)]" },
8
+ action.icon,
9
+ action.label)))));
8
10
  }
@@ -1,10 +1,73 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
- type ReasoningCardProps = {
2
+ /** Per-card state shared with `Reasoning.*` sub-parts. */
3
+ export interface ReasoningContextValue {
4
+ text: string;
5
+ isStreaming: boolean;
6
+ isOpen: boolean;
7
+ toggle: () => void;
8
+ }
9
+ /** Read the enclosing `Reasoning` state. Throws when used outside a `Reasoning`. */
10
+ export declare function useReasoning(): ReasoningContextValue;
11
+ /** Props accepted by `Reasoning` / `Reasoning.Root` (aka `ReasoningCard`). */
12
+ export interface ReasoningProps {
3
13
  text: string;
4
14
  isStreaming?: boolean;
5
15
  className?: string;
16
+ /** Overrides the chevron glyph. Rotation-on-open styling is applied to the
17
+ * wrapper, so a custom icon does not need to know about open state. */
18
+ icon?: React.ReactNode;
19
+ /** Override the two labels; each defaults to the current string. */
20
+ labels?: {
21
+ thinking?: string;
22
+ thought?: string;
23
+ };
24
+ /** Controlled open state. When provided, the component is controlled and the
25
+ * auto open/collapse behaviour is disabled (the parent owns the state). */
26
+ open?: boolean;
27
+ /** Initial open value when uncontrolled. Defaults to whether the card is
28
+ * streaming at mount — so a completed / reloaded reasoning starts collapsed
29
+ * and never animates, while a live one opens as tokens arrive. */
30
+ defaultOpen?: boolean;
31
+ /** Called whenever the open state should change (both controlled and not). */
32
+ onOpenChange?: (open: boolean) => void;
33
+ /** Compose your own disclosure; when omitted, the default anatomy renders. */
34
+ children?: React.ReactNode;
35
+ }
36
+ /** Props for `Reasoning.Trigger` — the disclosure button. */
37
+ export interface ReasoningTriggerProps {
38
+ /** Overrides the chevron glyph. */
39
+ icon?: React.ReactNode;
40
+ /** Override the two labels; each defaults to the current string. */
41
+ labels?: {
42
+ thinking?: string;
43
+ thought?: string;
44
+ };
45
+ className?: string;
46
+ }
47
+ /** The header row: a "Thinking…" / "Thought process" label + expand chevron. */
48
+ declare function ReasoningTrigger({ icon, labels, className }: ReasoningTriggerProps): React.JSX.Element;
49
+ declare namespace ReasoningTrigger {
50
+ var displayName: string;
51
+ }
52
+ /** The reasoning body. Renders when open; pass children to replace the markdown. */
53
+ declare function ReasoningContent({ className, children }: {
54
+ className?: string;
55
+ children?: React.ReactNode;
56
+ }): React.JSX.Element | null;
57
+ declare namespace ReasoningContent {
58
+ var displayName: string;
59
+ }
60
+ /**
61
+ * Reasoning — render `<Reasoning text={…} />` for the default disclosure, or
62
+ * compose `Reasoning.Trigger` + `Reasoning.Content` for a custom layout.
63
+ * Mirrors the `Message` / `ToolCall` compounds: render it, or compose it.
64
+ */
65
+ export declare const Reasoning: React.ForwardRefExoticComponent<ReasoningProps & React.RefAttributes<HTMLDivElement>> & {
66
+ Root: React.ForwardRefExoticComponent<ReasoningProps & React.RefAttributes<HTMLDivElement>>;
67
+ Trigger: typeof ReasoningTrigger;
68
+ Content: typeof ReasoningContent;
6
69
  };
7
- /** Render reasoning card. */
8
- export declare const ReasoningCard: React.ForwardRefExoticComponent<ReasoningCardProps & React.RefAttributes<HTMLDivElement>>;
70
+ /** Back-compat alias — `message.tsx` and `agent-card.tsx` import `ReasoningCard`. */
71
+ export declare const ReasoningCard: React.ForwardRefExoticComponent<ReasoningProps & React.RefAttributes<HTMLDivElement>>;
9
72
  export {};
10
73
  //# sourceMappingURL=reasoning.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/reasoning.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAM1D,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,6BAA6B;AAC7B,eAAO,MAAM,aAAa,2FAyCzB,CAAC"}
1
+ {"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/reasoning.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAgB1D,0DAA0D;AAC1D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAID,oFAAoF;AACpF,wBAAgB,YAAY,IAAI,qBAAqB,CAQpD;AAED,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;4EACwE;IACxE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,oEAAoE;IACpE,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD;gFAC4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;uEAEmE;IACnE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAqFD,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,oEAAoE;IACpE,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,gFAAgF;AAChF,iBAAS,gBAAgB,CACvB,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,qBAAqB,GACjD,KAAK,CAAC,GAAG,CAAC,OAAO,CA0BnB;kBA5BQ,gBAAgB;;;AA+BzB,oFAAoF;AACpF,iBAAS,gBAAgB,CACvB,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,CAY1B;kBAdQ,gBAAgB;;;AAiBzB;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;;CAIpB,CAAC;AAEH,qFAAqF;AACrF,eAAO,MAAM,aAAa,uFAAgB,CAAC"}