veryfront 0.1.997 → 0.1.999

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 (386) hide show
  1. package/esm/cli/templates/manifest.d.ts +1 -1
  2. package/esm/cli/templates/manifest.js +15 -15
  3. package/esm/deno.d.ts +7 -0
  4. package/esm/deno.js +11 -3
  5. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +2 -0
  6. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +1 -0
  7. package/esm/deps/esm.sh/react-dom@19.2.4.js +3 -0
  8. package/esm/react/react-dom.d.ts +3 -0
  9. package/esm/react/react-dom.d.ts.map +1 -0
  10. package/esm/react/react-dom.js +2 -0
  11. package/esm/src/agent/ag-ui/host-support.d.ts.map +1 -1
  12. package/esm/src/agent/ag-ui/host-support.js +12 -0
  13. package/esm/src/agent/react/index.d.ts +4 -2
  14. package/esm/src/agent/react/index.d.ts.map +1 -1
  15. package/esm/src/agent/react/index.js +2 -1
  16. package/esm/src/agent/react/use-agent-metadata.d.ts +5 -0
  17. package/esm/src/agent/react/use-agent-metadata.d.ts.map +1 -1
  18. package/esm/src/agent/react/use-agent-metadata.js +18 -9
  19. package/esm/src/agent/react/use-agents.d.ts +33 -0
  20. package/esm/src/agent/react/use-agents.d.ts.map +1 -0
  21. package/esm/src/agent/react/use-agents.js +72 -0
  22. package/esm/src/agent/react/use-chat/index.d.ts +1 -1
  23. package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
  24. package/esm/src/agent/react/use-chat/types.d.ts +3 -2
  25. package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
  26. package/esm/src/agent/react/use-chat/use-chat.d.ts +12 -1
  27. package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
  28. package/esm/src/agent/react/use-chat/use-chat.js +47 -7
  29. package/esm/src/agent/react/use-chat/utils.d.ts.map +1 -1
  30. package/esm/src/agent/react/use-chat/utils.js +4 -0
  31. package/esm/src/agent/runtime/message-adapter.d.ts.map +1 -1
  32. package/esm/src/agent/runtime/message-adapter.js +3 -1
  33. package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
  34. package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +6 -2
  35. package/esm/src/chat/index.d.ts +17 -7
  36. package/esm/src/chat/index.d.ts.map +1 -1
  37. package/esm/src/chat/index.js +33 -7
  38. package/esm/src/chat/protocol.d.ts +13 -1
  39. package/esm/src/chat/protocol.d.ts.map +1 -1
  40. package/esm/src/chat/upload-handler.d.ts +55 -0
  41. package/esm/src/chat/upload-handler.d.ts.map +1 -0
  42. package/esm/src/chat/upload-handler.js +180 -0
  43. package/esm/src/discovery/import-rewriter.d.ts +1 -1
  44. package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
  45. package/esm/src/discovery/import-rewriter.js +2 -0
  46. package/esm/src/discovery/transpiler.d.ts.map +1 -1
  47. package/esm/src/discovery/transpiler.js +2 -0
  48. package/esm/src/embedding/index.d.ts +0 -2
  49. package/esm/src/embedding/index.d.ts.map +1 -1
  50. package/esm/src/embedding/index.js +0 -1
  51. package/esm/src/embedding/upload-handler.d.ts +2 -13
  52. package/esm/src/embedding/upload-handler.d.ts.map +1 -1
  53. package/esm/src/embedding/upload-handler.js +24 -17
  54. package/esm/src/modules/import-map/default-import-map.d.ts.map +1 -1
  55. package/esm/src/modules/import-map/default-import-map.js +0 -5
  56. package/esm/src/react/components/chat/agent-card.d.ts +84 -11
  57. package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
  58. package/esm/src/react/components/chat/agent-card.js +151 -57
  59. package/esm/src/react/components/chat/agent-picker.d.ts +166 -0
  60. package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -0
  61. package/esm/src/react/components/chat/agent-picker.js +183 -0
  62. package/esm/src/react/components/chat/chat/components/animations.js +1 -1
  63. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +125 -3
  64. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
  65. package/esm/src/react/components/chat/chat/components/attachment-pill.js +209 -25
  66. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +149 -0
  67. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -0
  68. package/esm/src/react/components/chat/chat/components/attachments-panel.js +187 -0
  69. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +13 -2
  70. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
  71. package/esm/src/react/components/chat/chat/components/branch-picker.js +6 -8
  72. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +20 -0
  73. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -0
  74. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +31 -0
  75. package/esm/src/react/components/chat/chat/components/code-block.d.ts +9 -1
  76. package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
  77. package/esm/src/react/components/chat/chat/components/code-block.js +14 -6
  78. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +11 -4
  79. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
  80. package/esm/src/react/components/chat/chat/components/drop-zone.js +10 -8
  81. package/esm/src/react/components/chat/chat/components/empty-state.d.ts +2 -1
  82. package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
  83. package/esm/src/react/components/chat/chat/components/empty-state.js +7 -8
  84. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +6 -2
  85. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
  86. package/esm/src/react/components/chat/chat/components/inference-badge.js +5 -4
  87. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +9 -1
  88. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
  89. package/esm/src/react/components/chat/chat/components/inline-citation.js +19 -20
  90. package/esm/src/react/components/chat/chat/components/message-actions.d.ts +28 -5
  91. package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
  92. package/esm/src/react/components/chat/chat/components/message-actions.js +24 -36
  93. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +7 -2
  94. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
  95. package/esm/src/react/components/chat/chat/components/message-edit-form.js +5 -5
  96. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +11 -1
  97. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
  98. package/esm/src/react/components/chat/chat/components/message-feedback.js +9 -11
  99. package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
  100. package/esm/src/react/components/chat/chat/components/quick-actions.js +3 -1
  101. package/esm/src/react/components/chat/chat/components/reasoning.d.ts +66 -3
  102. package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
  103. package/esm/src/react/components/chat/chat/components/reasoning.js +95 -21
  104. package/esm/src/react/components/chat/chat/components/sidebar.d.ts +178 -12
  105. package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
  106. package/esm/src/react/components/chat/chat/components/sidebar.js +228 -45
  107. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +6 -1
  108. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
  109. package/esm/src/react/components/chat/chat/components/skill-badge.js +6 -5
  110. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +37 -0
  111. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -0
  112. package/esm/src/react/components/chat/chat/components/skill-tool.js +46 -0
  113. package/esm/src/react/components/chat/chat/components/sources.d.ts +55 -3
  114. package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
  115. package/esm/src/react/components/chat/chat/components/sources.js +50 -16
  116. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +42 -3
  117. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
  118. package/esm/src/react/components/chat/chat/components/step-indicator.js +55 -12
  119. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +1 -1
  120. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
  121. package/esm/src/react/components/chat/chat/components/tab-switcher.js +3 -3
  122. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +96 -3
  123. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
  124. package/esm/src/react/components/chat/chat/components/tool-ui.js +158 -36
  125. package/esm/src/react/components/chat/chat/composition/api.d.ts +4 -2
  126. package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
  127. package/esm/src/react/components/chat/chat/composition/api.js +4 -2
  128. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +112 -5
  129. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
  130. package/esm/src/react/components/chat/chat/composition/chat-composer.js +251 -61
  131. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +78 -0
  132. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -0
  133. package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +63 -0
  134. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +4 -1
  135. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
  136. package/esm/src/react/components/chat/chat/composition/chat-empty.js +11 -10
  137. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +11 -3
  138. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
  139. package/esm/src/react/components/chat/chat/composition/chat-message-list.js +81 -111
  140. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +4 -0
  141. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
  142. package/esm/src/react/components/chat/chat/composition/chat-root.js +3 -1
  143. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +4 -0
  144. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
  145. package/esm/src/react/components/chat/chat/composition/error-banner.js +10 -7
  146. package/esm/src/react/components/chat/chat/composition/message.d.ts +123 -5
  147. package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
  148. package/esm/src/react/components/chat/chat/composition/message.js +332 -53
  149. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +6 -1
  150. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
  151. package/esm/src/react/components/chat/chat/composition/model-avatar.js +3 -4
  152. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +31 -0
  153. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -0
  154. package/esm/src/react/components/chat/chat/composition/pending-message.js +31 -0
  155. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +4 -0
  156. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
  157. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +1 -0
  158. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
  159. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +29 -0
  160. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -0
  161. package/esm/src/react/components/chat/chat/contexts/conversations-context.js +39 -0
  162. package/esm/src/react/components/chat/chat/contexts/index.d.ts +1 -1
  163. package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -1
  164. package/esm/src/react/components/chat/chat/contexts/index.js +1 -1
  165. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +2 -0
  166. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
  167. package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts +10 -0
  168. package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts.map +1 -0
  169. package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +34 -0
  170. package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts +21 -0
  171. package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts.map +1 -0
  172. package/esm/src/react/components/chat/chat/hooks/use-conversation.js +54 -0
  173. package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts +67 -0
  174. package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -0
  175. package/esm/src/react/components/chat/chat/hooks/use-conversations.js +317 -0
  176. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +27 -0
  177. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -0
  178. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +50 -0
  179. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +49 -0
  180. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -0
  181. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +120 -0
  182. package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts +34 -0
  183. package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts.map +1 -0
  184. package/esm/src/react/components/chat/chat/hooks/use-upload.js +147 -0
  185. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts +37 -0
  186. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts.map +1 -0
  187. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +178 -0
  188. package/esm/src/react/components/chat/chat/index.d.ts +171 -31
  189. package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
  190. package/esm/src/react/components/chat/chat/index.js +371 -77
  191. package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts +63 -0
  192. package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts.map +1 -0
  193. package/esm/src/react/components/chat/chat/persistence/conversation-store.js +1 -0
  194. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts +13 -0
  195. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts.map +1 -0
  196. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.js +102 -0
  197. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts +11 -0
  198. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts.map +1 -0
  199. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.js +33 -0
  200. package/esm/src/react/components/chat/chat/utils/message-parts.d.ts +4 -1
  201. package/esm/src/react/components/chat/chat/utils/message-parts.d.ts.map +1 -1
  202. package/esm/src/react/components/chat/chat/utils/message-parts.js +4 -0
  203. package/esm/src/react/components/chat/chat-actions.d.ts +164 -0
  204. package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -0
  205. package/esm/src/react/components/chat/chat-actions.js +191 -0
  206. package/esm/src/react/components/chat/chat-agent-picker.d.ts +50 -0
  207. package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -0
  208. package/esm/src/react/components/chat/chat-agent-picker.js +40 -0
  209. package/esm/src/react/components/chat/chat-theme-scope.d.ts +26 -0
  210. package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -0
  211. package/esm/src/react/components/chat/chat-theme-scope.js +27 -0
  212. package/esm/src/react/components/chat/chat-tokens-style.d.ts +21 -0
  213. package/esm/src/react/components/chat/chat-tokens-style.d.ts.map +1 -0
  214. package/esm/src/react/components/chat/chat-tokens-style.js +24 -0
  215. package/esm/src/react/components/chat/chat.d.ts +5 -5
  216. package/esm/src/react/components/chat/chat.d.ts.map +1 -1
  217. package/esm/src/react/components/chat/chat.js +5 -5
  218. package/esm/src/react/components/chat/color-mode.d.ts +46 -0
  219. package/esm/src/react/components/chat/color-mode.d.ts.map +1 -0
  220. package/esm/src/react/components/chat/color-mode.js +123 -0
  221. package/esm/src/react/components/chat/error-boundary.js +2 -2
  222. package/esm/src/react/components/chat/icons/index.d.ts +8 -0
  223. package/esm/src/react/components/chat/icons/index.d.ts.map +1 -1
  224. package/esm/src/react/components/chat/icons/index.js +64 -0
  225. package/esm/src/react/components/chat/markdown.d.ts +24 -1
  226. package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
  227. package/esm/src/react/components/chat/markdown.js +122 -38
  228. package/esm/src/react/components/chat/model-selector.d.ts +130 -8
  229. package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
  230. package/esm/src/react/components/chat/model-selector.js +148 -121
  231. package/esm/src/react/components/chat/theme.d.ts +9 -12
  232. package/esm/src/react/components/chat/theme.d.ts.map +1 -1
  233. package/esm/src/react/components/chat/theme.js +149 -93
  234. package/esm/src/react/components/chat/ui/alert.d.ts +30 -0
  235. package/esm/src/react/components/chat/ui/alert.d.ts.map +1 -0
  236. package/esm/src/react/components/chat/ui/alert.js +35 -0
  237. package/esm/src/react/components/chat/ui/app-shell.d.ts +155 -0
  238. package/esm/src/react/components/chat/ui/app-shell.d.ts.map +1 -0
  239. package/esm/src/react/components/chat/ui/app-shell.js +276 -0
  240. package/esm/src/react/components/chat/ui/avatar.d.ts +24 -0
  241. package/esm/src/react/components/chat/ui/avatar.d.ts.map +1 -0
  242. package/esm/src/react/components/chat/ui/avatar.js +44 -0
  243. package/esm/src/react/components/chat/ui/badge.d.ts +24 -0
  244. package/esm/src/react/components/chat/ui/badge.d.ts.map +1 -0
  245. package/esm/src/react/components/chat/ui/badge.js +30 -0
  246. package/esm/src/react/components/chat/ui/button.d.ts +44 -0
  247. package/esm/src/react/components/chat/ui/button.d.ts.map +1 -0
  248. package/esm/src/react/components/chat/ui/button.js +108 -0
  249. package/esm/src/react/components/chat/ui/card.d.ts +42 -0
  250. package/esm/src/react/components/chat/ui/card.d.ts.map +1 -0
  251. package/esm/src/react/components/chat/ui/card.js +55 -0
  252. package/esm/src/react/components/chat/ui/checkbox.d.ts +28 -0
  253. package/esm/src/react/components/chat/ui/checkbox.d.ts.map +1 -0
  254. package/esm/src/react/components/chat/ui/checkbox.js +36 -0
  255. package/esm/src/react/components/chat/ui/code-block.d.ts +89 -0
  256. package/esm/src/react/components/chat/ui/code-block.d.ts.map +1 -0
  257. package/esm/src/react/components/chat/ui/code-block.js +277 -0
  258. package/esm/src/react/components/chat/ui/collapsible.d.ts +30 -0
  259. package/esm/src/react/components/chat/ui/collapsible.d.ts.map +1 -0
  260. package/esm/src/react/components/chat/ui/collapsible.js +44 -0
  261. package/esm/src/react/components/chat/ui/command.d.ts +65 -0
  262. package/esm/src/react/components/chat/ui/command.d.ts.map +1 -0
  263. package/esm/src/react/components/chat/ui/command.js +121 -0
  264. package/esm/src/react/components/chat/ui/cva.d.ts +36 -0
  265. package/esm/src/react/components/chat/ui/cva.d.ts.map +1 -0
  266. package/esm/src/react/components/chat/ui/cva.js +45 -0
  267. package/esm/src/react/components/chat/ui/dialog.d.ts +55 -0
  268. package/esm/src/react/components/chat/ui/dialog.d.ts.map +1 -0
  269. package/esm/src/react/components/chat/ui/dialog.js +116 -0
  270. package/esm/src/react/components/chat/ui/drawer.d.ts +41 -0
  271. package/esm/src/react/components/chat/ui/drawer.d.ts.map +1 -0
  272. package/esm/src/react/components/chat/ui/drawer.js +92 -0
  273. package/esm/src/react/components/chat/ui/dropdown-menu.d.ts +63 -0
  274. package/esm/src/react/components/chat/ui/dropdown-menu.d.ts.map +1 -0
  275. package/esm/src/react/components/chat/ui/dropdown-menu.js +76 -0
  276. package/esm/src/react/components/chat/ui/file-type.d.ts +26 -0
  277. package/esm/src/react/components/chat/ui/file-type.d.ts.map +1 -0
  278. package/esm/src/react/components/chat/ui/file-type.js +235 -0
  279. package/esm/src/react/components/chat/ui/floating.d.ts +29 -0
  280. package/esm/src/react/components/chat/ui/floating.d.ts.map +1 -0
  281. package/esm/src/react/components/chat/ui/floating.js +90 -0
  282. package/esm/src/react/components/chat/ui/icon-button.d.ts +19 -0
  283. package/esm/src/react/components/chat/ui/icon-button.d.ts.map +1 -0
  284. package/esm/src/react/components/chat/ui/icon-button.js +20 -0
  285. package/esm/src/react/components/chat/ui/index.d.ts +43 -0
  286. package/esm/src/react/components/chat/ui/index.d.ts.map +1 -0
  287. package/esm/src/react/components/chat/ui/index.js +42 -0
  288. package/esm/src/react/components/chat/ui/input.d.ts +27 -0
  289. package/esm/src/react/components/chat/ui/input.d.ts.map +1 -0
  290. package/esm/src/react/components/chat/ui/input.js +41 -0
  291. package/esm/src/react/components/chat/ui/label.d.ts +29 -0
  292. package/esm/src/react/components/chat/ui/label.d.ts.map +1 -0
  293. package/esm/src/react/components/chat/ui/label.js +40 -0
  294. package/esm/src/react/components/chat/ui/list.d.ts +47 -0
  295. package/esm/src/react/components/chat/ui/list.d.ts.map +1 -0
  296. package/esm/src/react/components/chat/ui/list.js +40 -0
  297. package/esm/src/react/components/chat/ui/pill.d.ts +26 -0
  298. package/esm/src/react/components/chat/ui/pill.d.ts.map +1 -0
  299. package/esm/src/react/components/chat/ui/pill.js +39 -0
  300. package/esm/src/react/components/chat/ui/popover.d.ts +47 -0
  301. package/esm/src/react/components/chat/ui/popover.d.ts.map +1 -0
  302. package/esm/src/react/components/chat/ui/popover.js +68 -0
  303. package/esm/src/react/components/chat/ui/progress-bar.d.ts +20 -0
  304. package/esm/src/react/components/chat/ui/progress-bar.d.ts.map +1 -0
  305. package/esm/src/react/components/chat/ui/progress-bar.js +31 -0
  306. package/esm/src/react/components/chat/ui/radio.d.ts +25 -0
  307. package/esm/src/react/components/chat/ui/radio.d.ts.map +1 -0
  308. package/esm/src/react/components/chat/ui/radio.js +29 -0
  309. package/esm/src/react/components/chat/ui/scroll-fade.d.ts +23 -0
  310. package/esm/src/react/components/chat/ui/scroll-fade.d.ts.map +1 -0
  311. package/esm/src/react/components/chat/ui/scroll-fade.js +40 -0
  312. package/esm/src/react/components/chat/ui/select.d.ts +64 -0
  313. package/esm/src/react/components/chat/ui/select.d.ts.map +1 -0
  314. package/esm/src/react/components/chat/ui/select.js +148 -0
  315. package/esm/src/react/components/chat/ui/shimmer.d.ts +25 -0
  316. package/esm/src/react/components/chat/ui/shimmer.d.ts.map +1 -0
  317. package/esm/src/react/components/chat/ui/shimmer.js +24 -0
  318. package/esm/src/react/components/chat/ui/skeleton.d.ts +14 -0
  319. package/esm/src/react/components/chat/ui/skeleton.d.ts.map +1 -0
  320. package/esm/src/react/components/chat/ui/skeleton.js +12 -0
  321. package/esm/src/react/components/chat/ui/slot.d.ts +21 -0
  322. package/esm/src/react/components/chat/ui/slot.d.ts.map +1 -0
  323. package/esm/src/react/components/chat/ui/slot.js +70 -0
  324. package/esm/src/react/components/chat/ui/status.d.ts +28 -0
  325. package/esm/src/react/components/chat/ui/status.d.ts.map +1 -0
  326. package/esm/src/react/components/chat/ui/status.js +23 -0
  327. package/esm/src/react/components/chat/ui/switch.d.ts +34 -0
  328. package/esm/src/react/components/chat/ui/switch.d.ts.map +1 -0
  329. package/esm/src/react/components/chat/ui/switch.js +58 -0
  330. package/esm/src/react/components/chat/ui/tabs.d.ts +44 -0
  331. package/esm/src/react/components/chat/ui/tabs.d.ts.map +1 -0
  332. package/esm/src/react/components/chat/ui/tabs.js +51 -0
  333. package/esm/src/react/components/chat/ui/tag.d.ts +22 -0
  334. package/esm/src/react/components/chat/ui/tag.d.ts.map +1 -0
  335. package/esm/src/react/components/chat/ui/tag.js +27 -0
  336. package/esm/src/react/components/chat/ui/textarea.d.ts +22 -0
  337. package/esm/src/react/components/chat/ui/textarea.d.ts.map +1 -0
  338. package/esm/src/react/components/chat/ui/textarea.js +35 -0
  339. package/esm/src/react/components/chat/ui/tooltip.d.ts +40 -0
  340. package/esm/src/react/components/chat/ui/tooltip.d.ts.map +1 -0
  341. package/esm/src/react/components/chat/ui/tooltip.js +132 -0
  342. package/esm/src/react/primitives/input-box.d.ts.map +1 -1
  343. package/esm/src/react/primitives/input-box.js +17 -4
  344. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  345. package/esm/src/server/handlers/dev/framework-candidates.generated.js +9437 -1064
  346. package/esm/src/server/handlers/dev/projects/html-shell.d.ts +1 -1
  347. package/esm/src/server/handlers/dev/projects/html-shell.d.ts.map +1 -1
  348. package/esm/src/server/handlers/dev/projects/html-shell.js +1 -12
  349. package/esm/src/server/handlers/request/public-agents-list.handler.d.ts +18 -0
  350. package/esm/src/server/handlers/request/public-agents-list.handler.d.ts.map +1 -0
  351. package/esm/src/server/handlers/request/public-agents-list.handler.js +44 -0
  352. package/esm/src/server/runtime-handler/index.d.ts +1 -1
  353. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  354. package/esm/src/server/runtime-handler/index.js +3 -0
  355. package/esm/src/studio/bridge/bridge-bundle.generated.d.ts +1 -1
  356. package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
  357. package/esm/src/studio/bridge/bridge-bundle.generated.js +3 -2
  358. package/esm/src/utils/version-constant.d.ts +1 -1
  359. package/esm/src/utils/version-constant.js +1 -1
  360. package/esm/src/workflow/blob/local-storage.d.ts +32 -0
  361. package/esm/src/workflow/blob/local-storage.d.ts.map +1 -0
  362. package/esm/src/workflow/blob/local-storage.js +179 -0
  363. package/esm/src/workflow/blob/types.d.ts +5 -0
  364. package/esm/src/workflow/blob/types.d.ts.map +1 -1
  365. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts +11 -0
  366. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts.map +1 -1
  367. package/esm/src/workflow/blob/veryfront-cloud-storage.js +36 -0
  368. package/package.json +5 -1
  369. package/esm/src/embedding/react/use-uploads.d.ts +0 -33
  370. package/esm/src/embedding/react/use-uploads.d.ts.map +0 -1
  371. package/esm/src/embedding/react/use-uploads.js +0 -76
  372. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts +0 -20
  373. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +0 -1
  374. package/esm/src/react/components/chat/chat/components/uploads-panel.js +0 -49
  375. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts +0 -28
  376. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +0 -1
  377. package/esm/src/react/components/chat/chat/contexts/thread-list-context.js +0 -27
  378. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts +0 -28
  379. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +0 -1
  380. package/esm/src/react/components/chat/chat/hooks/use-threads.js +0 -151
  381. package/esm/src/react/components/chat/chat-with-sidebar.d.ts +0 -110
  382. package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +0 -1
  383. package/esm/src/react/components/chat/chat-with-sidebar.js +0 -167
  384. package/esm/src/react/components/chat/message.d.ts +0 -42
  385. package/esm/src/react/components/chat/message.d.ts.map +0 -1
  386. package/esm/src/react/components/chat/message.js +0 -69
@@ -0,0 +1,72 @@
1
+ import { useCallback, useEffect, useState } from "../../../react/react.js";
2
+ import { ensureError } from "../../errors/veryfront-error.js";
3
+ import { normalizeAgentMetadata } from "./use-agent-metadata.js";
4
+ function isRecord(value) {
5
+ return value !== null && typeof value === "object" && !Array.isArray(value);
6
+ }
7
+ /** Normalize the wire response from `GET /api/agents`. */
8
+ export function normalizeAgentsListResponse(value) {
9
+ if (!isRecord(value) || !Array.isArray(value.agents)) {
10
+ throw new Error("Invalid agents list response: agents must be an array");
11
+ }
12
+ return value.agents.map(normalizeAgentMetadata);
13
+ }
14
+ /**
15
+ * React hook that lists the browser-safe agents a project exposes, via
16
+ * `GET /api/agents`. Companion to {@link useAgentMetadata} (single agent) — use
17
+ * it to drive an agent switcher, e.g. only rendering a picker when
18
+ * `agents.length > 1`.
19
+ *
20
+ * The in-flight request is aborted on unmount, on option change, and before a
21
+ * `refetch`, so state never lands from a stale response.
22
+ */
23
+ export function useAgents(options = {}) {
24
+ const { enabled = true } = options;
25
+ const [agents, setAgents] = useState([]);
26
+ const [isLoading, setIsLoading] = useState(enabled);
27
+ const [error, setError] = useState(null);
28
+ // Bumping this re-runs the effect below to force a fresh request.
29
+ const [reloadToken, setReloadToken] = useState(0);
30
+ const refetch = useCallback(() => {
31
+ setReloadToken((token) => token + 1);
32
+ }, []);
33
+ useEffect(() => {
34
+ if (!enabled) {
35
+ setAgents([]);
36
+ setIsLoading(false);
37
+ setError(null);
38
+ return;
39
+ }
40
+ const abortController = new AbortController();
41
+ setIsLoading(true);
42
+ setError(null);
43
+ async function loadAgents() {
44
+ try {
45
+ const response = await fetch("/api/agents", {
46
+ headers: { accept: "application/json" },
47
+ signal: abortController.signal,
48
+ });
49
+ if (!response.ok) {
50
+ throw new Error(`Agents list request failed: ${response.status}`);
51
+ }
52
+ setAgents(normalizeAgentsListResponse(await response.json()));
53
+ }
54
+ catch (caught) {
55
+ if (caught instanceof Error && caught.name === "AbortError")
56
+ return;
57
+ setAgents([]);
58
+ setError(ensureError(caught));
59
+ }
60
+ finally {
61
+ if (!abortController.signal.aborted) {
62
+ setIsLoading(false);
63
+ }
64
+ }
65
+ }
66
+ void loadAgents();
67
+ return () => {
68
+ abortController.abort();
69
+ };
70
+ }, [enabled, reloadToken]);
71
+ return { agents, isLoading, error, refetch };
72
+ }
@@ -5,6 +5,6 @@
5
5
  * Build any interface you want.
6
6
  */
7
7
  export { useChat } from "./use-chat.js";
8
- export type { BranchInfo, ChatDynamicToolPart, ChatMessage, ChatMessagePart, ChatReasoningPart, ChatStepPart, ChatTextPart, ChatToolPart, ChatToolResultPart, ChatToolState, InferenceMode, OnToolCallArg, ToolOutput, UseChatOptions, UseChatResult, } from "./types.js";
8
+ export type { BranchInfo, ChatDynamicToolPart, ChatFilePart, ChatMessage, ChatMessagePart, ChatReasoningPart, ChatStepPart, ChatTextPart, ChatToolPart, ChatToolResultPart, ChatToolState, InferenceMode, OnToolCallArg, ToolOutput, UseChatOptions, UseChatResult, } from "./types.js";
9
9
  export type { ChatFinishReason, ChatStreamEvent, } from "./stream-protocol.js";
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EACV,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,cAAc,EACd,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,gBAAgB,EAChB,eAAe,GAChB,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EACV,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,cAAc,EACd,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,gBAAgB,EAChB,eAAe,GAChB,MAAM,sBAAsB,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { ChatDataPart, ChatDynamicToolPart, ChatMessage, ChatMessagePart, ChatReasoningPart, ChatStepPart, ChatTextPart, ChatToolPart, ChatToolResultPart, ChatToolState } from "../../../chat/protocol.js";
1
+ import type { ChatDataPart, ChatDynamicToolPart, ChatFilePart, ChatMessage, ChatMessagePart, ChatReasoningPart, ChatStepPart, ChatTextPart, ChatToolPart, ChatToolResultPart, ChatToolState } from "../../../chat/protocol.js";
2
2
  /** Where inference is happening. */
3
3
  export type InferenceMode = "cloud" | "server-local";
4
- export type { ChatDataPart, ChatDynamicToolPart, ChatMessage, ChatMessagePart, ChatReasoningPart, ChatStepPart, ChatTextPart, ChatToolPart, ChatToolResultPart, ChatToolState, };
4
+ export type { ChatDataPart, ChatDynamicToolPart, ChatFilePart, ChatMessage, ChatMessagePart, ChatReasoningPart, ChatStepPart, ChatTextPart, ChatToolPart, ChatToolResultPart, ChatToolState, };
5
5
  type ToolOutputState = "output-available" | "output-error";
6
6
  /** Output from tool. */
7
7
  export interface ToolOutput {
@@ -59,6 +59,7 @@ export interface UseChatResult {
59
59
  setModel: (model: string | undefined) => void;
60
60
  sendMessage: (message: {
61
61
  text: string;
62
+ files?: ChatFilePart[];
62
63
  }) => Promise<void>;
63
64
  /** Edit a user message and resubmit — truncates history to that point */
64
65
  editMessage: (messageId: string, newText: string) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACd,MAAM,2BAA2B,CAAC;AAEnC,oCAAoC;AACpC,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,cAAc,CAAC;AAErD,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,GACd,CAAC;AAEF,KAAK,eAAe,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE3D,wBAAwB;AACxB,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,OAAO,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED,oCAAoC;AACpC,MAAM,WAAW,cAAc;IAC7B,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,CAAC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I,CAAC,CAAC;IACnE,yFAAyF;IACzF,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,UAAU,CAAC;IAC/C,sDAAsD;IACtD,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,WAAW,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAC/C,aAAa,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC1F,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,sFAAsF;IACtF,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACjF,iFAAiF;IACjF,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,kFAAkF;IAClF,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACpD"}
@@ -9,7 +9,7 @@
9
9
  * - server-local: explicit local model on the server
10
10
  */
11
11
  import { handleAgUiStreamingResponse } from "./streaming/index.js";
12
- import type { ChatMessage, UseChatOptions, UseChatResult } from "./types.js";
12
+ import type { ChatFilePart, ChatMessage, ChatMessagePart, UseChatOptions, UseChatResult } from "./types.js";
13
13
  type UseChatStreamHandler = typeof handleAgUiStreamingResponse;
14
14
  /** A snapshot of messages from a branch point onward */
15
15
  interface Branch {
@@ -24,6 +24,17 @@ interface BranchState {
24
24
  export declare function isLatestRequest(activeRequestId: number, requestId: number): boolean;
25
25
  export declare function resolveBranchKey(messageId: string, branchMap: Map<string, BranchState>, branchKeyByMessageId: Map<string, string>): string | undefined;
26
26
  export declare function findBranchUserMessageIndex(messages: ChatMessage[], branchKey: string, branchKeyByMessageId: Map<string, string>): number;
27
+ /**
28
+ * Build the parts for an outgoing user message. File attachments lead (before
29
+ * the text) so the model sees the referenced files first — matching how AI-SDK
30
+ * orders multimodal parts. Exported for unit testing.
31
+ */
32
+ export declare function buildUserMessageParts(text: string, files?: ChatFilePart[]): ChatMessagePart[];
33
+ /** Extract the text and file payload from a user message for regenerate. */
34
+ export declare function userMessagePayload(message: ChatMessage): {
35
+ text: string;
36
+ files?: ChatFilePart[];
37
+ } | null;
27
38
  export declare function resolveUseChatStreamHandler(transport: UseChatOptions["transport"]): UseChatStreamHandler;
28
39
  export declare function useChat(options?: UseChatOptions): UseChatResult;
29
40
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"use-chat.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/use-chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAEV,WAAW,EAGX,cAAc,EACd,aAAa,EACd,MAAM,YAAY,CAAC;AAGpB,KAAK,oBAAoB,GAAG,OAAO,2BAA2B,CAAC;AAE/D,wDAAwD;AACxD,UAAU,MAAM;IACd,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,sEAAsE;AACtE,UAAU,WAAW;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,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CAAC,EACnC,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,MAAM,GAAG,SAAS,CAGpB;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,WAAW,EAAE,EACvB,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,MAAM,CAIR;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,YAAY,EAAE,GACrB,eAAe,EAAE,CAEnB;AAMD,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAA;CAAE,GAAG,IAAI,CAQjD;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC,GACrC,oBAAoB,CAGtB;AAOD,wBAAgB,OAAO,CAAC,OAAO,GAAE,cAAmB,GAAG,aAAa,CAsbnE"}
@@ -22,6 +22,28 @@ export function resolveBranchKey(messageId, branchMap, branchKeyByMessageId) {
22
22
  export function findBranchUserMessageIndex(messages, branchKey, branchKeyByMessageId) {
23
23
  return messages.findIndex((m) => m.role === "user" && branchKeyByMessageId.get(m.id) === branchKey);
24
24
  }
25
+ /**
26
+ * Build the parts for an outgoing user message. File attachments lead (before
27
+ * the text) so the model sees the referenced files first — matching how AI-SDK
28
+ * orders multimodal parts. Exported for unit testing.
29
+ */
30
+ export function buildUserMessageParts(text, files) {
31
+ return [...(files ?? []), { type: "text", text }];
32
+ }
33
+ function isFilePart(part) {
34
+ return part.type === "file";
35
+ }
36
+ /** Extract the text and file payload from a user message for regenerate. */
37
+ export function userMessagePayload(message) {
38
+ const text = message.parts
39
+ .filter((part) => part.type === "text")
40
+ .map((part) => part.text)
41
+ .join("");
42
+ const files = message.parts.filter(isFilePart);
43
+ if (!text && files.length === 0)
44
+ return null;
45
+ return { text, ...(files.length > 0 ? { files } : {}) };
46
+ }
25
47
  export function resolveUseChatStreamHandler(transport) {
26
48
  void transport;
27
49
  return handleAgUiStreamingResponse;
@@ -88,7 +110,8 @@ export function useChat(options = {}) {
88
110
  const userMessage = {
89
111
  id: message.userMessageId ?? generateClientId("msg"),
90
112
  role: "user",
91
- parts: [{ type: "text", text: message.text }],
113
+ parts: buildUserMessageParts(message.text, message.files),
114
+ createdAt: new Date().toISOString(),
92
115
  };
93
116
  const base = message.baseMessages ?? messagesRef.current;
94
117
  setMessages([...base, userMessage]);
@@ -151,7 +174,12 @@ export function useChat(options = {}) {
151
174
  if (!hasAddedStreamingMessage)
152
175
  return [...prev, withMeta];
153
176
  return prev.map((m) => (m.id === currentMessageIdRef.current
154
- ? { ...withMeta, metadata: { ...m.metadata, ...withMeta.metadata } }
177
+ ? {
178
+ ...withMeta,
179
+ // Keep the timestamp from when the turn first streamed in.
180
+ createdAt: m.createdAt ?? withMeta.createdAt,
181
+ metadata: { ...m.metadata, ...withMeta.metadata },
182
+ }
155
183
  : m));
156
184
  });
157
185
  options.onFinish?.(withMeta);
@@ -187,7 +215,17 @@ export function useChat(options = {}) {
187
215
  }
188
216
  if (!hasAddedStreamingMessage) {
189
217
  hasAddedStreamingMessage = true;
190
- setMessages((prev) => [...prev, { id, role: "assistant", parts, metadata }]);
218
+ setMessages((prev) => [
219
+ ...prev,
220
+ {
221
+ id,
222
+ role: "assistant",
223
+ parts,
224
+ metadata,
225
+ // Stamp when the turn first appears; `onMessage` preserves it.
226
+ createdAt: new Date().toISOString(),
227
+ },
228
+ ]);
191
229
  return;
192
230
  }
193
231
  setMessages((prev) => prev.map((m) => m.id === currentMessageIdRef.current
@@ -223,11 +261,13 @@ export function useChat(options = {}) {
223
261
  if (lastUserIndex === -1)
224
262
  return;
225
263
  const lastUserMessage = currentMessages[lastUserIndex];
226
- const textPart = lastUserMessage?.parts.find((p) => p.type === "text");
227
- if (!textPart || !("text" in textPart))
264
+ if (!lastUserMessage)
265
+ return;
266
+ const payload = userMessagePayload(lastUserMessage);
267
+ if (!payload)
228
268
  return;
229
269
  const base = currentMessages.slice(0, lastUserIndex);
230
- await sendMessage({ text: textPart.text, baseMessages: base });
270
+ await sendMessage({ ...payload, baseMessages: base });
231
271
  }, [sendMessage]);
232
272
  /**
233
273
  * Stop generation
@@ -368,7 +408,7 @@ export function useChat(options = {}) {
368
408
  data,
369
409
  handleInputChange,
370
410
  handleSubmit,
371
- // Aliases that match ChatProps / ChatWithSidebarProps so users can spread {...chat}
411
+ // Aliases that match ChatProps so users can spread {...chat}
372
412
  onChange: handleInputChange,
373
413
  onSubmit: handleSubmit,
374
414
  onModelChange: setModel,
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE/D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,eAAe,EAAE,EACxB,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,GACjC,WAAW,CAOb"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE/D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,eAAe,EAAE,EACxB,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,GACjC,WAAW,CAWb"}
@@ -2,10 +2,14 @@ export function generateClientId(prefix) {
2
2
  return `${prefix}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
3
3
  }
4
4
  export function createAssistantMessage(messageId, parts, metadata) {
5
+ // Prefer a server-supplied timestamp (from message metadata); otherwise stamp
6
+ // the client clock so the message header always has a time to render.
7
+ const metaCreatedAt = typeof metadata?.createdAt === "string" ? metadata.createdAt : undefined;
5
8
  return {
6
9
  id: messageId || generateClientId("msg"),
7
10
  role: "assistant",
8
11
  parts,
12
+ createdAt: metaCreatedAt ?? new Date().toISOString(),
9
13
  ...(metadata && Object.keys(metadata).length > 0 ? { metadata } : {}),
10
14
  };
11
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"message-adapter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/message-adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,kBAAkB,EAEvB,KAAK,oBAAoB,EAE1B,MAAM,qBAAqB,CAAC;AAO7B,KAAK,2BAA2B,GAC5B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/E;IACA,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B,GACC;IACA,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,GACC;IACA,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,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2D;AAC3D,wBAAgB,6CAA6C,CAC3D,QAAQ,EAAE,SAAS,oBAAoB,EAAE,GACxC,mBAAmB,EAAE,CAOvB;AAED,2DAA2D;AAC3D,wBAAgB,6CAA6C,CAC3D,QAAQ,EAAE,aAAa,CACrB,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,GAAG;IAAE,KAAK,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAA;CAAE,CAC1F,GACA,oBAAoB,EAAE,CAQxB"}
@@ -27,7 +27,9 @@ function createTextAgentRuntimePart(text) {
27
27
  function toNativeFilePart(type, part) {
28
28
  const url = getOptionalStringField(part, "url");
29
29
  const mediaType = getOptionalStringField(part, "mediaType");
30
- if (!url || url.startsWith("data:") || !mediaType) {
30
+ // `data:` URLs (inline base64) are kept: guest / no-project attachments ride
31
+ // inline so the model sees them without a fetchable upload URL.
32
+ if (!url || !mediaType) {
31
33
  return null;
32
34
  }
33
35
  return type === "file"
@@ -1 +1 @@
1
- {"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAK7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAsC,KAAK,OAAO,EAAqB,MAAM,aAAa,CAAC;AAwMlG;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,2BAA2B,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAO,GAC1D,4BAA4B,CA6F9B;AAuHD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAyChC;AAED;;;;;;;GAOG;AACH,wBAAgB,6CAA6C,CAC3D,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAQhC"}
1
+ {"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAK7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAsC,KAAK,OAAO,EAAqB,MAAM,aAAa,CAAC;AA4MlG;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,2BAA2B,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAO,GAC1D,4BAA4B,CA6F9B;AAuHD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAyChC;AAED;;;;;;;GAOG;AACH,wBAAgB,6CAA6C,CAC3D,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAQhC"}
@@ -125,7 +125,9 @@ function buildAttachmentContextFromParts(parts) {
125
125
  mediaType,
126
126
  ...(uploadId ? { uploadId } : {}),
127
127
  ...(uploadPath ? { path: uploadPath } : {}),
128
- ...(url ? { url } : {}),
128
+ // Never inline a `data:` URL here — it would dump the whole base64 blob
129
+ // into the prompt as text. The bytes ride in the native file part below.
130
+ ...(url && !url.startsWith("data:") ? { url } : {}),
129
131
  }];
130
132
  });
131
133
  return refs.length > 0 ? buildDataFileAnnotation(refs) : "";
@@ -154,7 +156,9 @@ function getUserFileParts(parts) {
154
156
  return [];
155
157
  const mediaType = getStringPartField(part, "mediaType");
156
158
  const url = getStringPartField(part, "url");
157
- if (!mediaType || !url || url.startsWith("data:"))
159
+ // `data:` URLs (inline base64) are kept so the model receives the bytes as a
160
+ // native image/file part (guest / no-project attachments have no fetchable URL).
161
+ if (!mediaType || !url)
158
162
  return [];
159
163
  return [{
160
164
  type,
@@ -30,7 +30,7 @@
30
30
  * <Chat.Root messages={chat.messages} input={chat.input}>
31
31
  * <Chat.Empty title="Ask me anything" />
32
32
  * <Chat.MessageList messages={chat.messages} />
33
- * <Chat.Composer input={chat.input} onChange={chat.handleInputChange} onSubmit={chat.handleSubmit} />
33
+ * <Chat.Input input={chat.input} onChange={chat.handleInputChange} onSubmit={chat.handleSubmit} />
34
34
  * </Chat.Root>
35
35
  * );
36
36
  * }
@@ -48,17 +48,27 @@
48
48
  * ```
49
49
  */
50
50
  export { Chat, ChatComponents, type ChatProps } from "../react/components/chat/chat.js";
51
- export { ChatComposer, type ChatComposerProps, ChatEmpty, type ChatEmptyProps, ChatIf, type ChatIfProps, ChatMessageList, type ChatMessageListProps, ChatRoot, type ChatRootProps, ErrorBanner, type ErrorBannerProps, Message, type MessageRootProps, ModelAvatar, type ModelAvatarProps, } from "../react/components/chat/chat.js";
52
- export { ChatContextProvider, type ChatContextValue, ComposerContextProvider, type ComposerContextValue, MessageContextProvider, type MessageContextValue, ThreadListContextProvider, type ThreadListContextValue, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, useThreadListContext, useThreadListContextOptional, } from "../react/components/chat/chat.js";
53
- export { type AttachmentInfo, AttachmentPill, type AttachmentPillProps, BranchPicker, type BranchPickerProps, ChatSidebar, type ChatSidebarProps, type ChatTab, ChatWithSidebar, type ChatWithSidebarAttachmentConfig, type ChatWithSidebarChatController, type ChatWithSidebarFeatureConfig, type ChatWithSidebarGroupedProps, type ChatWithSidebarMessageConfig, type ChatWithSidebarModelConfig, type ChatWithSidebarProps, type ChatWithSidebarQuickActionsConfig, type ChatWithSidebarSidebarConfig, type ChatWithSidebarTabsConfig, type ChatWithSidebarVoiceConfig, type CodeBlockProps, ConversationEmptyState, type ConversationEmptyStateProps, ConversationScrollButton, type ConversationScrollButtonProps, downloadMarkdown, DropZoneOverlay, type DropZoneOverlayProps, exportAsMarkdown, extractSourcesFromParts, FadeIn, type FeedbackValue, getTextContent, groupPartsInOrder, InferenceBadge, type InferenceBadgeProps, InlineCitation, type InlineCitationProps, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActions, type MessageActionsProps, MessageEditForm, type MessageEditFormProps, MessageFeedback, type MessageFeedbackProps, type ModelOption, ModelSelector, type ModelSelectorProps, type PartGroup, type QuickAction, QuickActions, type QuickActionsProps, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, type SkillBadgeProps, type Source, Sources, type SourcesProps, StepIndicator, type StepIndicatorProps, Suggestion, type SuggestionProps, Suggestions, type SuggestionsProps, TabSwitcher, type TabSwitcherProps, type Thread, ToolCallCard, ToolStatusBadge, type UploadedFile, UploadsPanel, type UploadsPanelProps, useThreads, type UseThreadsOptions, type UseThreadsResult, } from "../react/components/chat/chat.js";
54
- export { Message as StandaloneMessage, type MessageProps, StreamingMessage, type StreamingMessageProps, } from "../react/components/chat/message.js";
55
- export { AgentCard, type AgentCardProps } from "../react/components/chat/agent-card.js";
51
+ export { ChatEmpty, type ChatEmptyProps, ChatEmptyState, type ChatEmptyStateAvatarProps, type ChatEmptyStateHeadingProps, type ChatEmptyStateRootProps, type ChatEmptyStateSuggestionProps, type ChatEmptyStateSuggestionsProps, ChatIf, type ChatIfProps, ChatMessageList, type ChatMessageListProps, ChatRoot, type ChatRootProps, ErrorBanner, type ErrorBannerProps, Message, type MessageProps, type MessageRootProps, ModelAvatar, type ModelAvatarProps, } from "../react/components/chat/chat.js";
52
+ export { ChatContextProvider, type ChatContextValue, ComposerContextProvider, type ComposerContextValue, MessageContextProvider, type MessageContextValue, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, } from "../react/components/chat/chat.js";
53
+ export { AgentAvatar, type AgentAvatarProps, type AttachmentInfo, AttachmentsPanel, type AttachmentsPanelActionProps, type AttachmentsPanelContextValue, type AttachmentsPanelEmptyProps, type AttachmentsPanelItemProps, type AttachmentsPanelListProps, type AttachmentsPanelLoadingProps, type AttachmentsPanelProps, BranchPicker, type BranchPickerProps, ChatMessagesSkeleton, type ChatMessagesSkeletonProps, ChatSidebar, type ChatSidebarComponent, type ChatSidebarEmptyProps, type ChatSidebarGroupProps, type ChatSidebarIcons, type ChatSidebarItemProps, type ChatSidebarListProps, type ChatSidebarNewButtonProps, type ChatSidebarProps, type ChatSidebarRootProps, type ChatTab, type CodeBlockProps, ConversationEmptyState, type ConversationEmptyStateProps, ConversationScrollButton, type ConversationScrollButtonProps, downloadMarkdown, DropZoneOverlay, type DropZoneOverlayProps, exportAsMarkdown, extractSourcesFromParts, FadeIn, type FeedbackValue, getTextContent, groupPartsInOrder, InferenceBadge, type InferenceBadgeProps, InlineCitation, type InlineCitationProps, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, type MessageActionBarProps, MessageEditForm, type MessageEditFormProps, MessageFeedback, type MessageFeedbackProps, type ModelOption, ModelSelector, type ModelSelectorContentProps, type ModelSelectorContextValue, type ModelSelectorItemProps, type ModelSelectorProps, type ModelSelectorTriggerProps, type PartGroup, type QuickAction, QuickActions, type QuickActionsProps, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, type SkillBadgeProps, type Source, SourcePill, type SourcePillProps, Sources, type SourcesContextValue, type SourcesListProps, type SourcesProps, StepIndicator, type StepIndicatorContextValue, type StepIndicatorProps, Suggestion, type SuggestionProps, Suggestions, type SuggestionsProps, TabSwitcher, type TabSwitcherProps, ToolCallCard, ToolStatusBadge, type UploadedFile, useAttachmentsPanel, useModelSelector, useSources, useStepIndicator, useStickToBottom, type UseStickToBottomOptions, type UseStickToBottomResult, useUpload, type UseUploadOptions, type UseUploadResult, useUploadsRegistry, type UseUploadsRegistryOptions, type UseUploadsRegistryResult, } from "../react/components/chat/chat.js";
54
+ export { type Conversation, type ConversationPatch, ConversationsContextProvider, ConversationsProvider, type ConversationsProviderProps, type ConversationStore, type ConversationSummary, localConversationStore, memoryConversationStore, type StorageLike, useConversation, type UseConversationOptions, type UseConversationResult, useConversations, useConversationsContext, useConversationsContextOptional, type UseConversationsOptions, type UseConversationsResult, } from "../react/components/chat/chat.js";
55
+ export { AttachmentPill, AttachmentPill as Attachment, type AttachmentPillContextValue, type AttachmentPillProps, type AttachmentPillProps as AttachmentProps, AttachmentsPanel as UploadsPanel, type AttachmentsPanelProps as UploadsPanelProps, ChatInput, ChatInput as ChatComposer, type ChatInputProps, type ChatInputProps as ChatComposerProps, Message as StandaloneMessage, Message as StreamingMessage, MessageActionBar as MessageActions, type MessageActionBarProps as MessageActionsProps, type MessageProps as StandaloneMessageProps, type MessageProps as StreamingMessageProps, Reasoning, type ReasoningContextValue, type ReasoningProps, type ReasoningTriggerProps, ToolCall, type ToolCallContextValue, type ToolCallProps, type ToolCallTriggerProps, useAttachmentPill, useReasoning, useToolCall, } from "../react/components/chat/chat.js";
56
+ export { Markdown, type MarkdownProps } from "../react/components/chat/markdown.js";
57
+ export { AppShell, type AppShellHeaderProps, type AppShellOpenState, type AppShellProps, type AppShellSide, type AppShellSidebarProps, type AppShellTriggerProps, useAppShell, } from "../react/components/chat/ui/app-shell.js";
58
+ export { Tabs, TabsItem, type TabsItemProps, type TabsProps, } from "../react/components/chat/ui/tabs.js";
59
+ export { ChatThemeScope, type ChatThemeScopeProps, } from "../react/components/chat/chat-theme-scope.js";
60
+ export { type AgentOption, AgentPicker, type AgentPickerContentProps, type AgentPickerContextValue, type AgentPickerItemProps, type AgentPickerProps, type AgentPickerSection, type AgentPickerTriggerProps, useAgentPicker, } from "../react/components/chat/agent-picker.js";
61
+ export { agentsToPickerOptions, ChatAgentPicker, type ChatAgentPickerProps, } from "../react/components/chat/chat-agent-picker.js";
62
+ export { type ChatActionItem, ChatActions, type ChatActionsContentProps, type ChatActionsContextValue, type ChatActionsItemProps, type ChatActionsProps, type ChatActionsSettings, type ChatActionsTriggerProps, useChatActions, } from "../react/components/chat/chat-actions.js";
63
+ export { CodeBlock, CodeSurface, type CodeSurfaceProps, CopyButton, type CopyButtonProps, useClipboard, type UseClipboardResult, } from "../react/components/chat/ui/code-block.js";
64
+ export { AgentCard, type AgentCardContextValue, type AgentCardProps, useAgentCard, } from "../react/components/chat/agent-card.js";
56
65
  export { ChatErrorBoundary, type ChatErrorBoundaryProps, useChatErrorHandler, } from "../react/components/chat/error-boundary.js";
57
66
  export type { AgentTheme, ChatTheme } from "../react/components/chat/theme.js";
58
67
  export { type BranchInfo, type ChatDynamicToolPart, type ChatFinishReason, type ChatMessage, type ChatMessagePart, type ChatReasoningPart, type ChatStepPart, type ChatStreamEvent, type ChatTextPart, type ChatToolPart, type ChatToolResultPart, type ChatToolState, type InferenceMode, type OnToolCallArg, type ToolOutput, useChat, type UseChatOptions, type UseChatResult, } from "../agent/react/use-chat/index.js";
59
68
  export type { ChatMessageMetadata, ChatMessageMetadataUsage, ChatUiMessageChunk, ChildRunAudit, ChildRunAuditToolCall, ChildRunAuditToolResult, } from "./protocol.js";
60
69
  export { useAgent, type UseAgentOptions, type UseAgentResult, } from "../agent/react/use-agent.js";
61
- export { type AgentMetadata, type AgentMetadataPromptSuggestion, type AgentMetadataSuggestion, type AgentMetadataSuggestions, type AgentMetadataTaskSuggestion, getAgentPromptSuggestions, normalizeAgentMetadataResponse, useAgentMetadata, type UseAgentMetadataResult, } from "../agent/react/use-agent-metadata.js";
70
+ export { type AgentMetadata, type AgentMetadataPromptSuggestion, type AgentMetadataSuggestion, type AgentMetadataSuggestions, type AgentMetadataTaskSuggestion, getAgentPromptSuggestions, normalizeAgentMetadata, normalizeAgentMetadataResponse, useAgentMetadata, type UseAgentMetadataResult, } from "../agent/react/use-agent-metadata.js";
71
+ export { normalizeAgentsListResponse, useAgents, type UseAgentsOptions, type UseAgentsResult, } from "../agent/react/use-agents.js";
62
72
  export { buildChatStreamChunkMessageMetadata, type BuildChatStreamChunkMessageMetadataInput, dedupeChatUiMessageChunks, extractChatMessageMetadata, normalizeChatMessageMetadata, normalizeChatUiMessageChunk, normalizeChatUiMessageStream, } from "./chat-ui-message-helpers.js";
63
73
  export { type HostedStreamPartForUiChunkMapping, type HostedUiChunkMappingOptions, mapHostedStreamPartToChatUiChunks, } from "./hosted-ui-chunk-mapping.js";
64
74
  export { useCompletion, type UseCompletionOptions, type UseCompletionResult, } from "../agent/react/use-completion.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAExF,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,SAAS,EACT,KAAK,cAAc,EACnB,MAAM,EACN,KAAK,WAAW,EAChB,eAAe,EACf,KAAK,oBAAoB,EACzB,QAAQ,EACR,KAAK,aAAa,EAClB,WAAW,EACX,KAAK,gBAAgB,EACrB,OAAO,EACP,KAAK,gBAAgB,EACrB,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,cAAc,EACd,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,EAC1B,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,KAAK,cAAc,EACnB,cAAc,EACd,KAAK,mBAAmB,EACxB,YAAY,EACZ,KAAK,iBAAiB,EACtB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,eAAe,EACf,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,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,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,mCAAmC,EACnC,KAAK,wCAAwC,EAC7C,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,iCAAiC,EACtC,KAAK,2BAA2B,EAChC,iCAAiC,GAClC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,0BAA0B,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,wBAAwB,EACxB,6BAA6B,EAC7B,mCAAmC,EACnC,2CAA2C,EAC3C,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,sBAAsB,CAAC"}
@@ -30,7 +30,7 @@
30
30
  * <Chat.Root messages={chat.messages} input={chat.input}>
31
31
  * <Chat.Empty title="Ask me anything" />
32
32
  * <Chat.MessageList messages={chat.messages} />
33
- * <Chat.Composer input={chat.input} onChange={chat.handleInputChange} onSubmit={chat.handleSubmit} />
33
+ * <Chat.Input input={chat.input} onChange={chat.handleInputChange} onSubmit={chat.handleSubmit} />
34
34
  * </Chat.Root>
35
35
  * );
36
36
  * }
@@ -48,15 +48,41 @@
48
48
  * ```
49
49
  */
50
50
  export { Chat, ChatComponents } from "../react/components/chat/chat.js";
51
- export { ChatComposer, ChatEmpty, ChatIf, ChatMessageList, ChatRoot, ErrorBanner, Message, ModelAvatar, } from "../react/components/chat/chat.js";
52
- export { ChatContextProvider, ComposerContextProvider, MessageContextProvider, ThreadListContextProvider, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, useThreadListContext, useThreadListContextOptional, } from "../react/components/chat/chat.js";
53
- export { AttachmentPill, BranchPicker, ChatSidebar, ChatWithSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActions, MessageEditForm, MessageFeedback, ModelSelector, QuickActions, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolCallCard, ToolStatusBadge, UploadsPanel, useThreads, } from "../react/components/chat/chat.js";
54
- export { Message as StandaloneMessage, StreamingMessage, } from "../react/components/chat/message.js";
55
- export { AgentCard } from "../react/components/chat/agent-card.js";
51
+ export { ChatEmpty, ChatEmptyState, ChatIf, ChatMessageList, ChatRoot, ErrorBanner, Message, ModelAvatar, } from "../react/components/chat/chat.js";
52
+ export { ChatContextProvider, ComposerContextProvider, MessageContextProvider, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, } from "../react/components/chat/chat.js";
53
+ export { AgentAvatar, AttachmentsPanel, BranchPicker, ChatMessagesSkeleton, ChatSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, MessageEditForm, MessageFeedback, ModelSelector, QuickActions, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, SourcePill, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolCallCard, ToolStatusBadge, useAttachmentsPanel, useModelSelector, useSources, useStepIndicator, useStickToBottom, useUpload, useUploadsRegistry, } from "../react/components/chat/chat.js";
54
+ // Conversation persistence adapters swappable async stores behind the
55
+ // (upcoming) `useConversations` hook. localStorage default; idb/api are follow-ups.
56
+ export { ConversationsContextProvider, ConversationsProvider, localConversationStore, memoryConversationStore, useConversation, useConversations, useConversationsContext, useConversationsContextOptional, } from "../react/components/chat/chat.js";
57
+ // ---------------------------------------------------------------------------
58
+ // Target component names. This chat surface intentionally completes the
59
+ // migration away from the old Thread, Composer, and standalone message exports.
60
+ // Use these names for new code and see the chat UI guide for migration notes.
61
+ // ---------------------------------------------------------------------------
62
+ export { AttachmentPill, AttachmentPill as Attachment, AttachmentsPanel as UploadsPanel, ChatInput, ChatInput as ChatComposer, Message as StandaloneMessage, Message as StreamingMessage, MessageActionBar as MessageActions, Reasoning, ToolCall, useAttachmentPill, useReasoning, useToolCall, } from "../react/components/chat/chat.js";
63
+ export { Markdown } from "../react/components/chat/markdown.js";
64
+ // Layout primitives — chat-independent, promoted from the private `chat/ui`
65
+ // barrel so consuming apps can compose their own shell (sidebar in the layout,
66
+ // pages in the content slot). Eventual home is a top-level `veryfront/ui`.
67
+ export { AppShell, useAppShell, } from "../react/components/chat/ui/app-shell.js";
68
+ export { Tabs, TabsItem, } from "../react/components/chat/ui/tabs.js";
69
+ export { ChatThemeScope, } from "../react/components/chat/chat-theme-scope.js";
70
+ // New target components (Studio 1:1, dependency-light forks).
71
+ export { AgentPicker, useAgentPicker, } from "../react/components/chat/agent-picker.js";
72
+ export { agentsToPickerOptions, ChatAgentPicker, } from "../react/components/chat/chat-agent-picker.js";
73
+ export { ChatActions, useChatActions, } from "../react/components/chat/chat-actions.js";
74
+ // `SkillTool` retired as a standalone export — a skill tool is now a presentation
75
+ // variant of `ToolCall` (`<ToolCall variant="compact" />`, auto-default for skill
76
+ // parts). The row impl stays internal to `tool-ui.tsx`.
77
+ // Shared syntax-highlight primitive (`CodeBlockProps` name is already taken by
78
+ // the Markdown code-block props, so only the runtime `CodeBlock` is re-exported).
79
+ export { CodeBlock, CodeSurface, CopyButton, useClipboard, } from "../react/components/chat/ui/code-block.js";
80
+ export { AgentCard, useAgentCard, } from "../react/components/chat/agent-card.js";
56
81
  export { ChatErrorBoundary, useChatErrorHandler, } from "../react/components/chat/error-boundary.js";
57
82
  export { useChat, } from "../agent/react/use-chat/index.js";
58
83
  export { useAgent, } from "../agent/react/use-agent.js";
59
- export { getAgentPromptSuggestions, normalizeAgentMetadataResponse, useAgentMetadata, } from "../agent/react/use-agent-metadata.js";
84
+ export { getAgentPromptSuggestions, normalizeAgentMetadata, normalizeAgentMetadataResponse, useAgentMetadata, } from "../agent/react/use-agent-metadata.js";
85
+ export { normalizeAgentsListResponse, useAgents, } from "../agent/react/use-agents.js";
60
86
  export { buildChatStreamChunkMessageMetadata, dedupeChatUiMessageChunks, extractChatMessageMetadata, normalizeChatMessageMetadata, normalizeChatUiMessageChunk, normalizeChatUiMessageStream, } from "./chat-ui-message-helpers.js";
61
87
  export { mapHostedStreamPartToChatUiChunks, } from "./hosted-ui-chunk-mapping.js";
62
88
  export { useCompletion, } from "../agent/react/use-completion.js";
@@ -19,6 +19,18 @@ export interface ChatReasoningPart {
19
19
  redactedData?: string;
20
20
  state?: ChatPartState;
21
21
  }
22
+ /** Chat message part that carries an uploaded file or image attachment. */
23
+ export interface ChatFilePart {
24
+ type: "file";
25
+ /** MIME type of the file, e.g. "image/png" or "application/pdf". */
26
+ mediaType: string;
27
+ /** Resolved URL of the uploaded file (from the upload endpoint). */
28
+ url: string;
29
+ /** Original filename shown to the user. */
30
+ filename?: string;
31
+ /** File size in bytes, when known — shown in the read-only message pill. */
32
+ size?: number;
33
+ }
22
34
  /** State for chat tool. */
23
35
  export type ChatToolState = "input-streaming" | "input-available" | "output-streaming" | "output-available" | "output-error";
24
36
  /** Public API contract for chat tool part. */
@@ -60,7 +72,7 @@ export interface ChatDataPart {
60
72
  data: unknown;
61
73
  }
62
74
  /** Public API contract for chat message part. */
63
- export type ChatMessagePart = ChatTextPart | ChatReasoningPart | ChatToolPart | ChatToolResultPart | ChatDynamicToolPart | ChatStepPart | ChatDataPart;
75
+ export type ChatMessagePart = ChatTextPart | ChatReasoningPart | ChatFilePart | ChatToolPart | ChatToolResultPart | ChatDynamicToolPart | ChatStepPart | ChatDataPart;
64
76
  /** Message shape for chat. */
65
77
  export interface ChatMessage {
66
78
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/src/chat/protocol.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,yBAAyB,CAAC;AAGjC,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,MAAM,CAAC;AAEjD,2CAA2C;AAC3C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,qDAAqD;AACrD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,2BAA2B;AAC3B,MAAM,MAAM,aAAa,GACrB,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,CAAC;AAEnB,8CAA8C;AAC9C,MAAM,WAAW,YAAY,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO;IAC3F,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,IAAI,CAAC;IACf,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC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