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
@@ -18,21 +18,25 @@
18
18
  * @module react/components/chat/composition/message
19
19
  */
20
20
  import * as React from "../../../../../../react/react.js";
21
- import { cn } from "../../theme.js";
21
+ import { cn, defaultChatTheme } from "../../theme.js";
22
22
  import { Markdown } from "../../markdown.js";
23
23
  import { MessageItem } from "../../../../primitives/index.js";
24
24
  import { MessageContextProvider, useMessageContext } from "../contexts/message-context.js";
25
25
  import { useChatContextOptional } from "../contexts/chat-context.js";
26
- import { MessageActions as ActionsImpl } from "../components/message-actions.js";
26
+ import { useClipboard } from "../hooks/use-clipboard.js";
27
+ import { Slot } from "../../ui/slot.js";
28
+ import { CheckIcon, CopyIcon, PencilIcon, RefreshCwIcon } from "../../icons/index.js";
27
29
  import { MessageFeedback as FeedbackImpl } from "../components/message-feedback.js";
28
30
  import { BranchPicker as BranchPickerImpl } from "../components/branch-picker.js";
29
31
  import { ReasoningCard } from "../components/reasoning.js";
30
- import { SkillBadge } from "../components/skill-badge.js";
32
+ import { Shimmer } from "../../ui/shimmer.js";
31
33
  import { ToolCallCard } from "../components/tool-ui.js";
32
34
  import { StepIndicator } from "../components/step-indicator.js";
35
+ import { AttachmentPill } from "../components/attachment-pill.js";
33
36
  import { Sources as SourcesImpl } from "../components/sources.js";
34
37
  import { AgentAvatar as AvatarImpl } from "./agent-avatar.js";
35
- import { extractSourcesFromParts, getAnswerPartsForRendering, getTextContentFromParts, groupPartsInOrder, isSkillToolPart, } from "../utils/message-parts.js";
38
+ import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
39
+ import { extractSourcesFromParts, getAnswerPartsForRendering, getTextContentFromParts, groupPartsInOrder, } from "../utils/message-parts.js";
36
40
  // ---------------------------------------------------------------------------
37
41
  // Message.Root
38
42
  // ---------------------------------------------------------------------------
@@ -43,28 +47,22 @@ function metadataString(metadata, key) {
43
47
  const MessageRoot = React.forwardRef(function MessageRoot({ message, isStreaming = false, children, className, ...overrides }, ref) {
44
48
  const chat = useChatContextOptional();
45
49
  const role = message.role;
46
- const answerParts = React.useMemo(() => getAnswerPartsForRendering(message.parts, { isAssistant: role !== "user" }), [message.parts, role]);
47
- const parts = React.useMemo(() => groupPartsInOrder(answerParts), [answerParts]);
50
+ const answerParts = React.useMemo(() => getAnswerPartsForRendering(message.parts, {
51
+ isAssistant: role !== "user",
52
+ }), [message.parts, role]);
53
+ const parts = React.useMemo(() => groupPartsInOrder(answerParts), [
54
+ answerParts,
55
+ ]);
48
56
  const textContent = React.useMemo(() => getTextContentFromParts(answerParts), [answerParts]);
49
57
  const editMessage = overrides.editMessage ?? chat?.editMessage;
50
58
  const getBranches = overrides.getBranches ?? chat?.getBranches;
51
59
  const switchBranch = overrides.switchBranch ?? chat?.switchBranch;
52
60
  const onFeedbackProp = overrides.onFeedback ?? chat?.onFeedback;
61
+ // Regenerate only applies to assistant turns (Studio `chat.regenerate()`).
62
+ const onReload = overrides.onReload ?? chat?.onReload;
53
63
  const branch = React.useMemo(() => getBranches?.(message.id) ?? null, [getBranches, message.id]);
54
- const onCopy = React.useCallback(async () => {
55
- try {
56
- await navigator.clipboard.writeText(textContent);
57
- }
58
- catch (_) {
59
- /* expected: clipboard API unavailable, using fallback */
60
- const textarea = document.createElement("textarea");
61
- textarea.value = textContent;
62
- document.body.appendChild(textarea);
63
- textarea.select();
64
- document.execCommand("copy");
65
- document.body.removeChild(textarea);
66
- }
67
- }, [textContent]);
64
+ const { copied, copy } = useClipboard();
65
+ const onCopy = React.useCallback(() => copy(textContent), [copy, textContent]);
68
66
  const contextValue = React.useMemo(() => ({
69
67
  message,
70
68
  role,
@@ -79,6 +77,7 @@ const MessageRoot = React.forwardRef(function MessageRoot({ message, isStreaming
79
77
  ? () => switchBranch(message.id, branch.current)
80
78
  : undefined,
81
79
  onCopy,
80
+ copied,
82
81
  onEdit: editMessage
83
82
  ? (content) => {
84
83
  editMessage(message.id, content);
@@ -87,6 +86,7 @@ const MessageRoot = React.forwardRef(function MessageRoot({ message, isStreaming
87
86
  onFeedback: onFeedbackProp
88
87
  ? (value) => onFeedbackProp(message.id, value)
89
88
  : undefined,
89
+ onRegenerate: role !== "user" && onReload ? onReload : undefined,
90
90
  feedback: overrides.feedback,
91
91
  }), [
92
92
  message,
@@ -94,68 +94,250 @@ const MessageRoot = React.forwardRef(function MessageRoot({ message, isStreaming
94
94
  role,
95
95
  isStreaming,
96
96
  parts,
97
+ onReload,
97
98
  textContent,
98
99
  branch,
99
100
  switchBranch,
100
101
  onCopy,
102
+ copied,
101
103
  editMessage,
102
104
  onFeedbackProp,
103
105
  overrides.feedback,
104
106
  ]);
105
107
  const isUser = role === "user";
106
108
  return (React.createElement(MessageContextProvider, { value: contextValue },
107
- React.createElement(MessageItem, { ref: ref, role: message.role, className: cn(isUser
108
- ? "flex flex-col items-end group/msg"
109
- : "flex items-start gap-3 justify-start group/msg", className) }, children)));
109
+ React.createElement(MessageItem, { ref: ref, role: message.role,
110
+ // Studio `Message` anatomy: a full-width vertical column. Assistant
111
+ // turns are left-aligned with a header (avatar + name + timestamp) on
112
+ // top; user turns are right-aligned and capped at `max-w-[80%]`.
113
+ className: cn("group/msg flex w-full flex-col gap-1.5 text-[var(--foreground)]", isUser ? "ml-auto max-w-[80%] items-end" : "items-start", className) }, children)));
110
114
  });
111
115
  MessageRoot.displayName = "Message.Root";
112
116
  function MessageAvatar({ className }) {
113
117
  const { message, role } = useMessageContext();
118
+ const chat = useChatContextOptional();
114
119
  if (role === "user")
115
120
  return null;
116
121
  return (React.createElement(AvatarImpl, { name: metadataString(message.metadata, "agentName") ??
117
- metadataString(message.metadata, "agentId"), avatarUrl: metadataString(message.metadata, "agentAvatarUrl"), model: metadataString(message.metadata, "model"), className: className }));
122
+ chat?.agent?.name ??
123
+ metadataString(message.metadata, "agentId"), avatarUrl: metadataString(message.metadata, "agentAvatarUrl") ??
124
+ chat?.agent?.avatarUrl, model: metadataString(message.metadata, "model"), className: className }));
118
125
  }
119
126
  MessageAvatar.displayName = "Message.Avatar";
120
- function MessageContent({ renderTool, showSteps = false, showSources = false, onSourceClick, className, }) {
127
+ /** Format a timestamp as a short `HH:MM` label (matches Studio's meta line). */
128
+ function formatTimestamp(createdAt) {
129
+ if (!createdAt)
130
+ return "";
131
+ const date = createdAt instanceof Date ? createdAt : new Date(createdAt);
132
+ if (Number.isNaN(date.getTime()))
133
+ return "";
134
+ return date.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
135
+ }
136
+ /**
137
+ * Assistant message header — agent avatar (`size-8`) + name on the left, a
138
+ * right-aligned timestamp. Ported 1:1 from Studio's `ChatMessageHeader`
139
+ * (`pt-px pb-2`, `flex items-center gap-2`, name `font-medium`, timestamp
140
+ * `text-sm ml-auto`). User turns have no header.
141
+ */
142
+ function MessageHeader({ className }) {
143
+ const { message, role } = useMessageContext();
144
+ const chat = useChatContextOptional();
145
+ if (role === "user")
146
+ return null;
147
+ // The avatar gets only REAL agent identity (like `Message.Avatar`): with no
148
+ // agent, `AgentAvatar` falls back to the provider logomark for
149
+ // `metadata.model`. Folding the "Assistant" placeholder into `name` would
150
+ // make that fallback unreachable — the label below still shows it.
151
+ const agentName = metadataString(message.metadata, "agentName") ??
152
+ chat?.agent?.name ??
153
+ metadataString(message.metadata, "agentId");
154
+ const displayName = agentName ?? "Assistant";
155
+ const avatarUrl = metadataString(message.metadata, "agentAvatarUrl") ??
156
+ chat?.agent?.avatarUrl;
157
+ const timestamp = formatTimestamp(message.createdAt);
158
+ return (
159
+ // `w-full` so the timestamp's `ml-auto` reaches the right edge — the Root
160
+ // is `items-start`, which would otherwise shrink the header to its content.
161
+ React.createElement("div", { className: cn("flex w-full items-center gap-2 pt-px pb-3", className) },
162
+ React.createElement(AvatarImpl, { name: agentName, avatarUrl: avatarUrl, model: metadataString(message.metadata, "model"), className: "size-8" }),
163
+ React.createElement("span", { className: "min-w-0 truncate font-medium" }, displayName),
164
+ timestamp && (React.createElement("span", { className: "ml-auto text-sm text-[var(--faint)]", suppressHydrationWarning: true }, timestamp))));
165
+ }
166
+ MessageHeader.displayName = "Message.Header";
167
+ // ---------------------------------------------------------------------------
168
+ // Message.Content
169
+ // ---------------------------------------------------------------------------
170
+ /** A stable React key for a grouped part (preserves streaming reconciliation). */
171
+ function groupKey(group, index) {
172
+ switch (group.type) {
173
+ case "text":
174
+ return `text-${index}`;
175
+ case "reasoning":
176
+ return `reasoning-${index}`;
177
+ case "step":
178
+ return `step-${group.stepIndex}`;
179
+ case "file":
180
+ return `file-${index}`;
181
+ default:
182
+ return group.tool.toolCallId;
183
+ }
184
+ }
185
+ /**
186
+ * Render one grouped assistant part with the default anatomy. Extracted so both
187
+ * the default `Message.Content` loop and the `Message.Part` sub-part share one
188
+ * source of truth — the composed path never drifts from the preset.
189
+ */
190
+ function renderAnswerPart(group, opts) {
191
+ if (group.type === "text") {
192
+ // `my-2` gives the answer text extra breathing room from an adjacent tool
193
+ // card. In the flex-col container the gap doesn't collapse with margins, so
194
+ // this widens text↔tool boundaries while tool↔tool stays at the base gap.
195
+ return (React.createElement(Markdown, { className: "my-2 text-[15px] leading-7", renderCodeBlock: opts.codeBlock, components: opts.markdownComponents }, group.content));
196
+ }
197
+ if (group.type === "reasoning") {
198
+ return React.createElement(ReasoningCard, { text: group.text, isStreaming: group.isStreaming });
199
+ }
200
+ if (group.type === "step") {
201
+ return opts.showSteps && opts.stepCount > 1
202
+ ? (React.createElement(StepIndicator, { stepIndex: group.stepIndex, isComplete: group.isComplete }))
203
+ : null;
204
+ }
205
+ if (group.type === "file") {
206
+ const isImage = group.file.mediaType.startsWith("image/");
207
+ return (React.createElement("div", { className: "my-1.5" },
208
+ React.createElement(AttachmentPill, { className: "w-[200px]", attachment: {
209
+ id: "file",
210
+ name: group.file.filename ?? "Attachment",
211
+ type: group.file.mediaType,
212
+ url: group.file.url,
213
+ // No lifecycle `state`: this is a sent, read-only attachment, so
214
+ // the pill shows the file type/size rather than an "Uploaded" badge.
215
+ ...(group.file.size != null ? { size: group.file.size } : {}),
216
+ preview: isImage ? group.file.url : undefined,
217
+ } })));
218
+ }
219
+ // ToolCall renders the compact skill row for skill tools and the full
220
+ // params/result card for everything else — one component either way.
221
+ return opts.renderTool ? opts.renderTool(group.tool) : React.createElement(ToolCallCard, { tool: group.tool });
222
+ }
223
+ function MessageContent({ renderTool, showSteps = false, showSources = false, onSourceClick, className, codeBlock, markdownComponents, children, }) {
121
224
  const { message, role, parts, textContent } = useMessageContext();
122
225
  const chat = useChatContextOptional();
123
226
  const shouldShowSources = showSources || chat?.showSources || false;
124
227
  const sourceClickHandler = onSourceClick ?? chat?.onSourceClick;
125
228
  if (role === "user") {
126
- return (React.createElement("div", { className: cn(chat?.theme.message?.user, className) },
127
- React.createElement("p", { className: "whitespace-pre-wrap text-[15px] leading-relaxed" }, textContent)));
229
+ const fileParts = message.parts.filter((p) => p.type === "file");
230
+ return (React.createElement("div", { className: cn(chat?.theme.message?.user ?? defaultChatTheme.message?.user, className) },
231
+ fileParts.length > 0 && (React.createElement("div", { className: "mb-2 flex flex-wrap justify-end gap-2" }, fileParts.map((file, index) => (React.createElement(AttachmentPill, { key: `file-${index}`, className: "w-[200px]", attachment: {
232
+ id: `file-${index}`,
233
+ name: file.filename ?? "Attachment",
234
+ type: file.mediaType,
235
+ url: file.url,
236
+ // Read-only sent attachment → show type/size, not "Uploaded".
237
+ ...(file.size != null ? { size: file.size } : {}),
238
+ preview: file.mediaType.startsWith("image/") ? file.url : undefined,
239
+ } }))))),
240
+ textContent && (React.createElement("p", { className: "whitespace-pre-wrap text-[15px] leading-relaxed" }, textContent))));
128
241
  }
129
242
  const stepCount = parts.filter((g) => g.type === "step").length;
243
+ const compose = typeof children === "function";
130
244
  const messageSources = shouldShowSources ? extractSourcesFromParts(message.parts) : [];
131
- return (React.createElement("div", { className: cn(chat?.theme.message?.assistant, "flex-1 min-w-0", className) },
132
- parts.map((group, index) => {
133
- if (group.type === "text") {
134
- return (React.createElement(Markdown, { key: `text-${index}`, className: "text-[15px] leading-7" }, group.content));
135
- }
136
- if (group.type === "reasoning") {
137
- return (React.createElement(ReasoningCard, { key: `reasoning-${index}`, text: group.text, isStreaming: group.isStreaming }));
138
- }
139
- if (group.type === "step") {
140
- return showSteps && stepCount > 1
141
- ? (React.createElement(StepIndicator, { key: `step-${group.stepIndex}`, stepIndex: group.stepIndex, isComplete: group.isComplete }))
142
- : null;
143
- }
144
- const isSkill = isSkillToolPart(group.tool);
145
- return (React.createElement("div", { key: group.tool.toolCallId, className: isSkill ? "my-2" : "my-3" }, renderTool
146
- ? renderTool(group.tool)
147
- : isSkill
148
- ? React.createElement(SkillBadge, { tool: group.tool })
149
- : React.createElement(ToolCallCard, { tool: group.tool })));
150
- }),
151
- messageSources.length > 0 && (React.createElement(SourcesImpl, { sources: messageSources, onSourceClick: sourceClickHandler }))));
245
+ return (React.createElement("div", { className: cn(chat?.theme.message?.assistant ?? defaultChatTheme.message?.assistant,
246
+ // `w-full` because `Message.Root` is `items-start`, which would
247
+ // otherwise shrink this column to its widest child — a lone tool card
248
+ // (`w-full`) would render narrow until streamed text widened the
249
+ // column. Mirrors the same workaround on `Message.Header`.
250
+ // `flex flex-col gap-2.5` owns the spacing *between* parts (text,
251
+ // reasoning, tool cards) gaps apply between siblings only, so there's
252
+ // no leading gap under the header and no per-part margins to juggle.
253
+ "flex w-full flex-col gap-2.5 flex-1 min-w-0", className) },
254
+ parts.map((group, index) => (React.createElement(React.Fragment, { key: groupKey(group, index) }, compose ? children(group, index) : renderAnswerPart(group, {
255
+ renderTool,
256
+ showSteps,
257
+ stepCount,
258
+ codeBlock,
259
+ markdownComponents,
260
+ })))),
261
+ !compose && messageSources.length > 0 && (React.createElement(SourcesImpl, { sources: messageSources, onSourceClick: sourceClickHandler }))));
152
262
  }
153
263
  MessageContent.displayName = "Message.Content";
154
- function MessageActionsWrapper({ className }) {
155
- const { textContent, onEdit } = useMessageContext();
264
+ /** Render a single grouped part with the default `Message.Content` anatomy. */
265
+ function MessagePart({ part, renderTool, showSteps = true, codeBlock, markdownComponents, }) {
266
+ const { parts } = useMessageContext();
267
+ const stepCount = parts.filter((g) => g.type === "step").length;
268
+ return (React.createElement(React.Fragment, null, renderAnswerPart(part, {
269
+ renderTool,
270
+ showSteps,
271
+ stepCount,
272
+ codeBlock,
273
+ markdownComponents,
274
+ })));
275
+ }
276
+ MessagePart.displayName = "Message.Part";
277
+ /** The inline citation sources extracted from this message's tool results. */
278
+ function MessageSources({ onSourceClick, className }) {
279
+ const { message } = useMessageContext();
280
+ const chat = useChatContextOptional();
281
+ const sources = extractSourcesFromParts(message.parts);
282
+ if (sources.length === 0)
283
+ return null;
284
+ return (React.createElement(SourcesImpl, { sources: sources, onSourceClick: onSourceClick ?? chat?.onSourceClick, className: className }));
285
+ }
286
+ MessageSources.displayName = "Message.Sources";
287
+ // ---------------------------------------------------------------------------
288
+ // Message.Actions — the reference render-or-compose pattern.
289
+ //
290
+ // `<Message.Actions />` renders the default cluster (copy / regenerate); pass
291
+ // children to compose your own bar from the individual action sub-parts
292
+ // (`Message.CopyAction`, `Message.EditAction`, …), each of which reads its
293
+ // handler + state from context. `Message.EditAction` stays available but is off
294
+ // by default. Every sub-part accepts `icon`, `className`, `asChild`, and an
295
+ // `onClick(e, next)` wrap-signature so you can log-then-run or fully replace the
296
+ // default without ejecting.
297
+ // ---------------------------------------------------------------------------
298
+ 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)]";
299
+ /** Internal button shared by every action sub-part. */
300
+ const ActionButton = React.forwardRef(function ActionButton({ icon, asChild, onClick, className, children, label, defaultIcon, action, ...props }, ref) {
301
+ const handleClick = (e) => onClick ? onClick(e, action) : action();
302
+ if (asChild) {
303
+ return (React.createElement(Slot, { ref: ref, ...props, className: cn(ACTION_BUTTON, className), onClick: handleClick }, children));
304
+ }
305
+ return (React.createElement("button", { ref: ref, type: "button", ...props, "aria-label": label, title: label, className: cn(ACTION_BUTTON, className), onClick: handleClick }, icon ?? defaultIcon));
306
+ });
307
+ ActionButton.displayName = "Message.ActionButton";
308
+ /** Copy the message text. Reads `onCopy`/`copied`/`textContent` from context. */
309
+ export const MessageCopyAction = React.forwardRef(function MessageCopyAction(props, ref) {
310
+ const { onCopy, copied, textContent } = useMessageContext();
156
311
  if (!textContent)
157
312
  return null;
158
- return React.createElement(ActionsImpl, { content: textContent, onEdit: onEdit, className: className });
313
+ return (React.createElement(ActionButton, { ref: ref, ...props, label: copied ? "Copied!" : "Copy to clipboard", defaultIcon: copied
314
+ ? React.createElement(CheckIcon, { className: "size-3.5" })
315
+ : React.createElement(CopyIcon, { className: "size-3.5" }), action: () => void onCopy() }));
316
+ });
317
+ MessageCopyAction.displayName = "Message.CopyAction";
318
+ /** Regenerate this turn. Renders only when `onRegenerate` is available. */
319
+ export const MessageRegenerateAction = React.forwardRef(function MessageRegenerateAction(props, ref) {
320
+ const { onRegenerate } = useMessageContext();
321
+ if (!onRegenerate)
322
+ return null;
323
+ return (React.createElement(ActionButton, { ref: ref, ...props, label: "Regenerate response", defaultIcon: React.createElement(RefreshCwIcon, { className: "size-3.5" }), action: onRegenerate }));
324
+ });
325
+ MessageRegenerateAction.displayName = "Message.RegenerateAction";
326
+ /** Edit this message. Renders only when `onEdit` is available. */
327
+ export const MessageEditAction = React.forwardRef(function MessageEditAction(props, ref) {
328
+ const { onEdit, textContent } = useMessageContext();
329
+ if (!onEdit || !textContent)
330
+ return null;
331
+ return (React.createElement(ActionButton, { ref: ref, ...props, label: "Edit message", defaultIcon: React.createElement(PencilIcon, { className: "size-3.5" }), action: () => onEdit(textContent) }));
332
+ });
333
+ MessageEditAction.displayName = "Message.EditAction";
334
+ function MessageActionsWrapper({ children, className, ...props }) {
335
+ const { textContent } = useMessageContext();
336
+ if (!textContent)
337
+ return null;
338
+ return (React.createElement("div", { ...props, className: cn("flex items-center gap-0.5 opacity-0 group-hover/msg:opacity-100 transition-all duration-200", className) }, children ?? (React.createElement(React.Fragment, null,
339
+ React.createElement(MessageCopyAction, null),
340
+ React.createElement(MessageRegenerateAction, null)))));
159
341
  }
160
342
  MessageActionsWrapper.displayName = "Message.Actions";
161
343
  function MessageFeedbackWrapper({ className }) {
@@ -165,6 +347,66 @@ function MessageFeedbackWrapper({ className }) {
165
347
  return (React.createElement(FeedbackImpl, { messageId: message.id, feedback: feedback, onFeedback: (_msgId, value) => onFeedback(value), className: className }));
166
348
  }
167
349
  MessageFeedbackWrapper.displayName = "Message.Feedback";
350
+ /** Compact token count — `726`, `79.8k`. */
351
+ function formatTokens(n) {
352
+ return n >= 1000 ? `${(n / 1000).toFixed(1)}k` : String(n);
353
+ }
354
+ function readUsage(metadata) {
355
+ const usage = metadata?.usage;
356
+ if (!usage || typeof usage !== "object")
357
+ return undefined;
358
+ const u = usage;
359
+ const num = (v) => (typeof v === "number" ? v : undefined);
360
+ return {
361
+ inputTokens: num(u.inputTokens),
362
+ outputTokens: num(u.outputTokens),
363
+ reasoningTokens: num(u.reasoningTokens),
364
+ };
365
+ }
366
+ function TokenRow({ label, value, bold }) {
367
+ return (React.createElement("div", { className: "flex items-center justify-between gap-6 text-sm" },
368
+ React.createElement("span", { className: "text-[var(--faint)]" }, label),
369
+ React.createElement("span", { className: cn("tabular-nums", bold ? "font-semibold" : "text-[var(--foreground)]") }, value)));
370
+ }
371
+ /**
372
+ * Token-usage popover. A subtle total count in the message footer opens a
373
+ * breakdown (Model · Input · Output · Total). Tightened vs Studio's
374
+ * `ChatTokenUsage` (smaller title, tighter rows, clearer hierarchy) and drops
375
+ * the "Credits used" row (not relevant to open-source chat). Renders nothing
376
+ * when the message carries no usage metadata.
377
+ */
378
+ function MessageTokens({ className, renderRow }) {
379
+ const { message, role } = useMessageContext();
380
+ const [open, setOpen] = React.useState(false);
381
+ if (role === "user")
382
+ return null;
383
+ const usage = readUsage(message.metadata);
384
+ const input = usage?.inputTokens ?? 0;
385
+ const output = usage?.outputTokens ?? 0;
386
+ const reasoning = usage?.reasoningTokens ?? 0;
387
+ const total = input + output + reasoning;
388
+ if (total === 0)
389
+ return null;
390
+ const model = metadataString(message.metadata, "model");
391
+ const rows = [
392
+ ...(model ? [{ label: "Model", value: model }] : []),
393
+ { label: "Input", value: formatTokens(input) },
394
+ { label: "Output", value: formatTokens(output) },
395
+ { label: "Total", value: formatTokens(total), bold: true },
396
+ ];
397
+ return (React.createElement(Popover, { open: open, onOpenChange: setOpen },
398
+ React.createElement(PopoverTrigger, { asChild: true },
399
+ React.createElement("button", { type: "button", className: cn("inline-flex items-center rounded-full px-2 h-7 text-xs tabular-nums text-[var(--faint)] transition-all hover:bg-[var(--tertiary)] hover:text-[var(--foreground)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)]",
400
+ // Hidden until the message is hovered — matching the action
401
+ // buttons — but stays visible while its popover is open.
402
+ "opacity-0 transition-opacity group-hover/msg:opacity-100 focus-visible:opacity-100", open && "opacity-100", className), "aria-label": `Token usage: ${total} total` }, formatTokens(total))),
403
+ React.createElement(PopoverContent, { align: "start", className: "min-w-[200px] rounded-lg p-3" },
404
+ React.createElement("p", { className: "mb-2 text-xs font-medium text-[var(--faint)]" }, "Token usage"),
405
+ React.createElement("div", { className: "flex flex-col gap-1.5" }, rows.map((row) => renderRow
406
+ ? React.createElement(React.Fragment, { key: row.label }, renderRow(row))
407
+ : React.createElement(TokenRow, { key: row.label, ...row }))))));
408
+ }
409
+ MessageTokens.displayName = "Message.Tokens";
168
410
  // ---------------------------------------------------------------------------
169
411
  // Message.BranchPicker
170
412
  // ---------------------------------------------------------------------------
@@ -175,12 +417,49 @@ function MessageBranchPicker() {
175
417
  return (React.createElement(BranchPickerImpl, { current: branch.current, total: branch.total, onPrev: onBranchPrev ?? (() => { }), onNext: onBranchNext ?? (() => { }) }));
176
418
  }
177
419
  MessageBranchPicker.displayName = "Message.BranchPicker";
178
- /** Message shape for message. */
179
- export const Message = Object.assign(MessageRoot, {
420
+ // ---------------------------------------------------------------------------
421
+ // Message.Continuing "Continuing…" shimmer while the turn is still streaming
422
+ // (Studio `ChatMessageView` showContinuing). Renders nothing when not streaming.
423
+ // ---------------------------------------------------------------------------
424
+ function MessageContinuing({ className, children }) {
425
+ const { isStreaming } = useMessageContext();
426
+ if (!isStreaming)
427
+ return null;
428
+ return (React.createElement("div", { className: cn("mt-3 text-sm", className) }, children ?? React.createElement(Shimmer, { duration: 1 }, "Continuing...")));
429
+ }
430
+ MessageContinuing.displayName = "Message.Continuing";
431
+ /** The default anatomy rendered when `<Message>` gets no children. */
432
+ function MessageDefault({ showSources = true, showSteps = true }) {
433
+ return (React.createElement(React.Fragment, null,
434
+ React.createElement(MessageHeader, null),
435
+ React.createElement(MessageContent, { showSources: showSources, showSteps: showSteps }),
436
+ React.createElement(MessageContinuing, null),
437
+ React.createElement("div", { className: "mt-1.5 flex items-center gap-0.5" },
438
+ React.createElement(MessageActionsWrapper, null),
439
+ React.createElement(MessageTokens, null))));
440
+ }
441
+ const MessageComponent = React.forwardRef(function Message({ children, showSources, showSteps, ...root }, ref) {
442
+ return (React.createElement(MessageRoot, { ref: ref, ...root }, children ??
443
+ React.createElement(MessageDefault, { showSources: showSources, showSteps: showSteps })));
444
+ });
445
+ MessageComponent.displayName = "Message";
446
+ /**
447
+ * Message — render `<Message message={msg} />` for the default turn, or compose
448
+ * `Message.Root` + `Message.Header`/`Content`/`Actions`/… for a custom layout.
449
+ */
450
+ export const Message = Object.assign(MessageComponent, {
180
451
  Root: MessageRoot,
181
452
  Avatar: MessageAvatar,
453
+ Header: MessageHeader,
182
454
  Content: MessageContent,
455
+ Part: MessagePart,
456
+ Sources: MessageSources,
183
457
  Actions: MessageActionsWrapper,
458
+ CopyAction: MessageCopyAction,
459
+ RegenerateAction: MessageRegenerateAction,
460
+ EditAction: MessageEditAction,
184
461
  Feedback: MessageFeedbackWrapper,
185
462
  BranchPicker: MessageBranchPicker,
463
+ Tokens: MessageTokens,
464
+ Continuing: MessageContinuing,
186
465
  });
@@ -10,7 +10,12 @@ import * as React from "../../../../../../react/react.js";
10
10
  export interface ModelAvatarProps {
11
11
  model?: string;
12
12
  className?: string;
13
+ /**
14
+ * Fallback glyph shown when the provider can't be resolved to a brand logo.
15
+ * Defaults to the built-in {@link SparklesIcon}.
16
+ */
17
+ icon?: React.ReactNode;
13
18
  }
14
19
  /** Render model avatar. */
15
- export declare function ModelAvatar({ model, className }: ModelAvatarProps): React.ReactElement;
20
+ export declare function ModelAvatar({ model, className, icon }: ModelAvatarProps): React.ReactElement;
16
21
  //# sourceMappingURL=model-avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-avatar.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/model-avatar.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAI1D,sCAAsC;AACtC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+CD,2BAA2B;AAC3B,wBAAgB,WAAW,CACzB,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,gBAAgB,GACrC,KAAK,CAAC,YAAY,CAsCpB"}
1
+ {"version":3,"file":"model-avatar.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/model-avatar.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAI1D,sCAAsC;AACtC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AA+CD,2BAA2B;AAC3B,wBAAgB,WAAW,CACzB,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,gBAAgB,GAC3C,KAAK,CAAC,YAAY,CAsCpB"}
@@ -38,10 +38,10 @@ const PROVIDER_STYLES = {
38
38
  anthropic: "bg-[#181818]",
39
39
  openai: "bg-[var(--foreground)]",
40
40
  google: "bg-[var(--foreground)]",
41
- unknown: "bg-[var(--muted-foreground)]",
41
+ unknown: "bg-[var(--faint)]",
42
42
  };
43
43
  /** Render model avatar. */
44
- export function ModelAvatar({ model, className }) {
44
+ export function ModelAvatar({ model, className, icon }) {
45
45
  const provider = resolveProvider(model ?? "");
46
46
  const base = cn("mt-1 shrink-0 size-8 rounded-full flex items-center justify-center", PROVIDER_STYLES[provider], className);
47
47
  if (provider === "anthropic") {
@@ -56,6 +56,5 @@ export function ModelAvatar({ model, className }) {
56
56
  return (React.createElement("div", { className: base },
57
57
  React.createElement(GeminiLogo, { className: "size-4 text-[var(--background)]" })));
58
58
  }
59
- return (React.createElement("div", { className: base },
60
- React.createElement(SparklesIcon, { className: "size-4 text-[var(--background)]" })));
59
+ return (React.createElement("div", { className: base }, icon ?? React.createElement(SparklesIcon, { className: "size-4 text-[var(--background)]" })));
61
60
  }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * PendingMessage — the "waiting for a response" placeholder shown while the
3
+ * assistant turn hasn't started streaming yet.
4
+ *
5
+ * Rather than a floating avatar + bouncing dots, it mirrors the real assistant
6
+ * `Message.Header` anatomy: a `size-8` skeleton circle where the avatar sits
7
+ * (same size and position) and a skeleton bar where the agent name goes. When
8
+ * the first token arrives the real `Message` takes over in the same slot, so
9
+ * there's no layout jump.
10
+ *
11
+ * @module react/components/chat/composition/pending-message
12
+ */
13
+ import * as React from "../../../../../../react/react.js";
14
+ /** Props accepted by `<PendingMessage>`. */
15
+ export interface PendingMessageProps {
16
+ className?: string;
17
+ }
18
+ /**
19
+ * Render the pending assistant header — a skeleton avatar + name. Matches
20
+ * `Message.Header`'s layout (`flex items-center gap-2 pt-px pb-1`) and the
21
+ * `AgentAvatar`'s `mt-1 size-8` so the skeleton circle lands exactly where the
22
+ * real avatar will.
23
+ *
24
+ * `!` overrides are required because the `Skeleton` primitive ships a base
25
+ * `h-4 w-full rounded-md` and `cn` does not tailwind-merge.
26
+ */
27
+ export declare function PendingMessage({ className }: PendingMessageProps): React.ReactElement;
28
+ export declare namespace PendingMessage {
29
+ var displayName: string;
30
+ }
31
+ //# sourceMappingURL=pending-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pending-message.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/pending-message.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAI1D,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,EAAE,SAAS,EAAE,EAAE,mBAAmB,GACjC,KAAK,CAAC,YAAY,CAcpB;yBAhBe,cAAc"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * PendingMessage — the "waiting for a response" placeholder shown while the
3
+ * assistant turn hasn't started streaming yet.
4
+ *
5
+ * Rather than a floating avatar + bouncing dots, it mirrors the real assistant
6
+ * `Message.Header` anatomy: a `size-8` skeleton circle where the avatar sits
7
+ * (same size and position) and a skeleton bar where the agent name goes. When
8
+ * the first token arrives the real `Message` takes over in the same slot, so
9
+ * there's no layout jump.
10
+ *
11
+ * @module react/components/chat/composition/pending-message
12
+ */
13
+ import * as React from "../../../../../../react/react.js";
14
+ import { cn } from "../../theme.js";
15
+ import { Skeleton } from "../../ui/skeleton.js";
16
+ /**
17
+ * Render the pending assistant header — a skeleton avatar + name. Matches
18
+ * `Message.Header`'s layout (`flex items-center gap-2 pt-px pb-1`) and the
19
+ * `AgentAvatar`'s `mt-1 size-8` so the skeleton circle lands exactly where the
20
+ * real avatar will.
21
+ *
22
+ * `!` overrides are required because the `Skeleton` primitive ships a base
23
+ * `h-4 w-full rounded-md` and `cn` does not tailwind-merge.
24
+ */
25
+ export function PendingMessage({ className }) {
26
+ return (React.createElement("output", { "aria-busy": "true", className: cn("flex w-full items-center gap-2 pt-px pb-1", className) },
27
+ React.createElement(Skeleton, { className: "mt-1 size-8! shrink-0 rounded-full! bg-[var(--edge)]!" }),
28
+ React.createElement(Skeleton, { className: "h-3.5! w-28! rounded-md! bg-[var(--edge)]!" }),
29
+ React.createElement("span", { className: "sr-only" }, "Waiting for a response...")));
30
+ }
31
+ PendingMessage.displayName = "PendingMessage";
@@ -26,6 +26,10 @@ export interface ChatContextValue {
26
26
  model?: string;
27
27
  models: ModelOption[];
28
28
  onModelChange?: (modelId: string) => void;
29
+ agent?: {
30
+ name?: string;
31
+ avatarUrl?: string;
32
+ };
29
33
  attachments: AttachmentInfo[];
30
34
  onAttach?: (files: FileList) => void;
31
35
  onRemoveAttachment?: (id: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"chat-context.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/contexts/chat-context.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEtE,kDAAkD;AAClD,MAAM,WAAW,gBAAgB;IAE/B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAGpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAGlC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAGtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAG1C,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACrC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAG1C,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,UAAU,CAAC;IAChD,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAGhE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IAGlE,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAGxD,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,IAAI,CAAC;IAG3B,KAAK,EAAE,SAAS,CAAC;CAClB;AAID,4BAA4B;AAC5B,wBAAgB,cAAc,IAAI,gBAAgB,CAQjD;AAED,4CAA4C;AAC5C,wBAAgB,sBAAsB,IAAI,gBAAgB,GAAG,IAAI,CAEhE;AAED,oCAAoC;AACpC,eAAO,MAAM,mBAAmB,yCAAuB,CAAC"}
1
+ {"version":3,"file":"chat-context.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/contexts/chat-context.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEtE,kDAAkD;AAClD,MAAM,WAAW,gBAAgB;IAE/B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAGpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAGlC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAGtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAK1C,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAG9C,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACrC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAG1C,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,UAAU,CAAC;IAChD,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAGhE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IAGlE,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAGxD,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,IAAI,CAAC;IAG3B,KAAK,EAAE,SAAS,CAAC;CAClB;AAID,4BAA4B;AAC5B,wBAAgB,cAAc,IAAI,gBAAgB,CAQjD;AAED,4CAA4C;AAC5C,wBAAgB,sBAAsB,IAAI,gBAAgB,GAAG,IAAI,CAEhE;AAED,oCAAoC;AACpC,eAAO,MAAM,mBAAmB,yCAAuB,CAAC"}
@@ -16,6 +16,7 @@ export interface ComposerContextValue {
16
16
  onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
17
17
  attachments: AttachmentInfo[];
18
18
  onAttach?: (files: FileList) => void;
19
+ onSelectAttachment?: () => void;
19
20
  onRemoveAttachment?: (id: string) => void;
20
21
  attachAccept?: string;
21
22
  onSubmit: (e?: React.FormEvent) => void;