veryfront 0.1.997 → 0.1.998

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/esm/cli/templates/manifest.js +1 -1
  2. package/esm/deno.d.ts +7 -0
  3. package/esm/deno.js +11 -3
  4. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +2 -0
  5. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +1 -0
  6. package/esm/deps/esm.sh/react-dom@19.2.4.js +3 -0
  7. package/esm/react/react-dom.d.ts +3 -0
  8. package/esm/react/react-dom.d.ts.map +1 -0
  9. package/esm/react/react-dom.js +2 -0
  10. package/esm/src/agent/ag-ui/host-support.d.ts.map +1 -1
  11. package/esm/src/agent/ag-ui/host-support.js +12 -0
  12. package/esm/src/agent/react/index.d.ts +4 -2
  13. package/esm/src/agent/react/index.d.ts.map +1 -1
  14. package/esm/src/agent/react/index.js +2 -1
  15. package/esm/src/agent/react/use-agent-metadata.d.ts +5 -0
  16. package/esm/src/agent/react/use-agent-metadata.d.ts.map +1 -1
  17. package/esm/src/agent/react/use-agent-metadata.js +18 -9
  18. package/esm/src/agent/react/use-agents.d.ts +33 -0
  19. package/esm/src/agent/react/use-agents.d.ts.map +1 -0
  20. package/esm/src/agent/react/use-agents.js +72 -0
  21. package/esm/src/agent/react/use-chat/index.d.ts +1 -1
  22. package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
  23. package/esm/src/agent/react/use-chat/types.d.ts +3 -2
  24. package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
  25. package/esm/src/agent/react/use-chat/use-chat.d.ts +12 -1
  26. package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
  27. package/esm/src/agent/react/use-chat/use-chat.js +47 -7
  28. package/esm/src/agent/react/use-chat/utils.d.ts.map +1 -1
  29. package/esm/src/agent/react/use-chat/utils.js +4 -0
  30. package/esm/src/agent/runtime/message-adapter.d.ts.map +1 -1
  31. package/esm/src/agent/runtime/message-adapter.js +3 -1
  32. package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
  33. package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +6 -2
  34. package/esm/src/chat/index.d.ts +17 -7
  35. package/esm/src/chat/index.d.ts.map +1 -1
  36. package/esm/src/chat/index.js +33 -7
  37. package/esm/src/chat/protocol.d.ts +13 -1
  38. package/esm/src/chat/protocol.d.ts.map +1 -1
  39. package/esm/src/chat/upload-handler.d.ts +55 -0
  40. package/esm/src/chat/upload-handler.d.ts.map +1 -0
  41. package/esm/src/chat/upload-handler.js +180 -0
  42. package/esm/src/discovery/import-rewriter.d.ts +1 -1
  43. package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
  44. package/esm/src/discovery/import-rewriter.js +2 -0
  45. package/esm/src/discovery/transpiler.d.ts.map +1 -1
  46. package/esm/src/discovery/transpiler.js +2 -0
  47. package/esm/src/react/components/chat/agent-card.d.ts +84 -11
  48. package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
  49. package/esm/src/react/components/chat/agent-card.js +151 -57
  50. package/esm/src/react/components/chat/agent-picker.d.ts +166 -0
  51. package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -0
  52. package/esm/src/react/components/chat/agent-picker.js +183 -0
  53. package/esm/src/react/components/chat/chat/components/animations.js +1 -1
  54. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +125 -3
  55. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
  56. package/esm/src/react/components/chat/chat/components/attachment-pill.js +209 -25
  57. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +149 -0
  58. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -0
  59. package/esm/src/react/components/chat/chat/components/attachments-panel.js +187 -0
  60. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +13 -2
  61. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
  62. package/esm/src/react/components/chat/chat/components/branch-picker.js +6 -8
  63. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +20 -0
  64. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -0
  65. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +31 -0
  66. package/esm/src/react/components/chat/chat/components/code-block.d.ts +9 -1
  67. package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
  68. package/esm/src/react/components/chat/chat/components/code-block.js +14 -6
  69. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +11 -4
  70. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
  71. package/esm/src/react/components/chat/chat/components/drop-zone.js +10 -8
  72. package/esm/src/react/components/chat/chat/components/empty-state.d.ts +2 -1
  73. package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
  74. package/esm/src/react/components/chat/chat/components/empty-state.js +7 -8
  75. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +6 -2
  76. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
  77. package/esm/src/react/components/chat/chat/components/inference-badge.js +5 -4
  78. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +9 -1
  79. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
  80. package/esm/src/react/components/chat/chat/components/inline-citation.js +19 -20
  81. package/esm/src/react/components/chat/chat/components/message-actions.d.ts +28 -5
  82. package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
  83. package/esm/src/react/components/chat/chat/components/message-actions.js +24 -36
  84. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +7 -2
  85. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
  86. package/esm/src/react/components/chat/chat/components/message-edit-form.js +5 -5
  87. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +11 -1
  88. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
  89. package/esm/src/react/components/chat/chat/components/message-feedback.js +9 -11
  90. package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
  91. package/esm/src/react/components/chat/chat/components/quick-actions.js +3 -1
  92. package/esm/src/react/components/chat/chat/components/reasoning.d.ts +66 -3
  93. package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
  94. package/esm/src/react/components/chat/chat/components/reasoning.js +95 -21
  95. package/esm/src/react/components/chat/chat/components/sidebar.d.ts +178 -12
  96. package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
  97. package/esm/src/react/components/chat/chat/components/sidebar.js +228 -45
  98. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +6 -1
  99. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
  100. package/esm/src/react/components/chat/chat/components/skill-badge.js +6 -5
  101. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +37 -0
  102. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -0
  103. package/esm/src/react/components/chat/chat/components/skill-tool.js +46 -0
  104. package/esm/src/react/components/chat/chat/components/sources.d.ts +55 -3
  105. package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
  106. package/esm/src/react/components/chat/chat/components/sources.js +50 -16
  107. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +42 -3
  108. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
  109. package/esm/src/react/components/chat/chat/components/step-indicator.js +55 -12
  110. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +1 -1
  111. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
  112. package/esm/src/react/components/chat/chat/components/tab-switcher.js +3 -3
  113. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +96 -3
  114. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
  115. package/esm/src/react/components/chat/chat/components/tool-ui.js +158 -36
  116. package/esm/src/react/components/chat/chat/composition/api.d.ts +4 -2
  117. package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
  118. package/esm/src/react/components/chat/chat/composition/api.js +4 -2
  119. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +112 -5
  120. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
  121. package/esm/src/react/components/chat/chat/composition/chat-composer.js +251 -61
  122. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +78 -0
  123. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -0
  124. package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +63 -0
  125. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +4 -1
  126. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
  127. package/esm/src/react/components/chat/chat/composition/chat-empty.js +11 -10
  128. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +11 -3
  129. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
  130. package/esm/src/react/components/chat/chat/composition/chat-message-list.js +81 -111
  131. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +4 -0
  132. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
  133. package/esm/src/react/components/chat/chat/composition/chat-root.js +3 -1
  134. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +4 -0
  135. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
  136. package/esm/src/react/components/chat/chat/composition/error-banner.js +10 -7
  137. package/esm/src/react/components/chat/chat/composition/message.d.ts +123 -5
  138. package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
  139. package/esm/src/react/components/chat/chat/composition/message.js +332 -53
  140. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +6 -1
  141. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
  142. package/esm/src/react/components/chat/chat/composition/model-avatar.js +3 -4
  143. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +31 -0
  144. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -0
  145. package/esm/src/react/components/chat/chat/composition/pending-message.js +31 -0
  146. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +4 -0
  147. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
  148. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +1 -0
  149. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
  150. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +29 -0
  151. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -0
  152. package/esm/src/react/components/chat/chat/contexts/conversations-context.js +39 -0
  153. package/esm/src/react/components/chat/chat/contexts/index.d.ts +1 -1
  154. package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -1
  155. package/esm/src/react/components/chat/chat/contexts/index.js +1 -1
  156. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +2 -0
  157. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
  158. package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts +10 -0
  159. package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts.map +1 -0
  160. package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +34 -0
  161. package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts +21 -0
  162. package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts.map +1 -0
  163. package/esm/src/react/components/chat/chat/hooks/use-conversation.js +54 -0
  164. package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts +67 -0
  165. package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -0
  166. package/esm/src/react/components/chat/chat/hooks/use-conversations.js +317 -0
  167. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +27 -0
  168. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -0
  169. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +50 -0
  170. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +49 -0
  171. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -0
  172. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +120 -0
  173. package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts +34 -0
  174. package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts.map +1 -0
  175. package/esm/src/react/components/chat/chat/hooks/use-upload.js +147 -0
  176. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts +37 -0
  177. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts.map +1 -0
  178. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +178 -0
  179. package/esm/src/react/components/chat/chat/index.d.ts +171 -31
  180. package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
  181. package/esm/src/react/components/chat/chat/index.js +371 -77
  182. package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts +63 -0
  183. package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts.map +1 -0
  184. package/esm/src/react/components/chat/chat/persistence/conversation-store.js +1 -0
  185. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts +13 -0
  186. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts.map +1 -0
  187. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.js +102 -0
  188. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts +11 -0
  189. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts.map +1 -0
  190. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.js +33 -0
  191. package/esm/src/react/components/chat/chat/utils/message-parts.d.ts +4 -1
  192. package/esm/src/react/components/chat/chat/utils/message-parts.d.ts.map +1 -1
  193. package/esm/src/react/components/chat/chat/utils/message-parts.js +4 -0
  194. package/esm/src/react/components/chat/chat-actions.d.ts +164 -0
  195. package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -0
  196. package/esm/src/react/components/chat/chat-actions.js +191 -0
  197. package/esm/src/react/components/chat/chat-agent-picker.d.ts +50 -0
  198. package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -0
  199. package/esm/src/react/components/chat/chat-agent-picker.js +40 -0
  200. package/esm/src/react/components/chat/chat-theme-scope.d.ts +26 -0
  201. package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -0
  202. package/esm/src/react/components/chat/chat-theme-scope.js +27 -0
  203. package/esm/src/react/components/chat/chat-tokens-style.d.ts +21 -0
  204. package/esm/src/react/components/chat/chat-tokens-style.d.ts.map +1 -0
  205. package/esm/src/react/components/chat/chat-tokens-style.js +24 -0
  206. package/esm/src/react/components/chat/chat.d.ts +5 -5
  207. package/esm/src/react/components/chat/chat.d.ts.map +1 -1
  208. package/esm/src/react/components/chat/chat.js +5 -5
  209. package/esm/src/react/components/chat/color-mode.d.ts +46 -0
  210. package/esm/src/react/components/chat/color-mode.d.ts.map +1 -0
  211. package/esm/src/react/components/chat/color-mode.js +123 -0
  212. package/esm/src/react/components/chat/error-boundary.js +2 -2
  213. package/esm/src/react/components/chat/icons/index.d.ts +8 -0
  214. package/esm/src/react/components/chat/icons/index.d.ts.map +1 -1
  215. package/esm/src/react/components/chat/icons/index.js +64 -0
  216. package/esm/src/react/components/chat/markdown.d.ts +24 -1
  217. package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
  218. package/esm/src/react/components/chat/markdown.js +122 -38
  219. package/esm/src/react/components/chat/model-selector.d.ts +130 -8
  220. package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
  221. package/esm/src/react/components/chat/model-selector.js +148 -121
  222. package/esm/src/react/components/chat/theme.d.ts +9 -12
  223. package/esm/src/react/components/chat/theme.d.ts.map +1 -1
  224. package/esm/src/react/components/chat/theme.js +149 -93
  225. package/esm/src/react/components/chat/ui/alert.d.ts +30 -0
  226. package/esm/src/react/components/chat/ui/alert.d.ts.map +1 -0
  227. package/esm/src/react/components/chat/ui/alert.js +35 -0
  228. package/esm/src/react/components/chat/ui/app-shell.d.ts +155 -0
  229. package/esm/src/react/components/chat/ui/app-shell.d.ts.map +1 -0
  230. package/esm/src/react/components/chat/ui/app-shell.js +276 -0
  231. package/esm/src/react/components/chat/ui/avatar.d.ts +24 -0
  232. package/esm/src/react/components/chat/ui/avatar.d.ts.map +1 -0
  233. package/esm/src/react/components/chat/ui/avatar.js +44 -0
  234. package/esm/src/react/components/chat/ui/badge.d.ts +24 -0
  235. package/esm/src/react/components/chat/ui/badge.d.ts.map +1 -0
  236. package/esm/src/react/components/chat/ui/badge.js +30 -0
  237. package/esm/src/react/components/chat/ui/button.d.ts +44 -0
  238. package/esm/src/react/components/chat/ui/button.d.ts.map +1 -0
  239. package/esm/src/react/components/chat/ui/button.js +108 -0
  240. package/esm/src/react/components/chat/ui/card.d.ts +42 -0
  241. package/esm/src/react/components/chat/ui/card.d.ts.map +1 -0
  242. package/esm/src/react/components/chat/ui/card.js +55 -0
  243. package/esm/src/react/components/chat/ui/checkbox.d.ts +28 -0
  244. package/esm/src/react/components/chat/ui/checkbox.d.ts.map +1 -0
  245. package/esm/src/react/components/chat/ui/checkbox.js +36 -0
  246. package/esm/src/react/components/chat/ui/code-block.d.ts +89 -0
  247. package/esm/src/react/components/chat/ui/code-block.d.ts.map +1 -0
  248. package/esm/src/react/components/chat/ui/code-block.js +277 -0
  249. package/esm/src/react/components/chat/ui/collapsible.d.ts +30 -0
  250. package/esm/src/react/components/chat/ui/collapsible.d.ts.map +1 -0
  251. package/esm/src/react/components/chat/ui/collapsible.js +44 -0
  252. package/esm/src/react/components/chat/ui/command.d.ts +65 -0
  253. package/esm/src/react/components/chat/ui/command.d.ts.map +1 -0
  254. package/esm/src/react/components/chat/ui/command.js +121 -0
  255. package/esm/src/react/components/chat/ui/cva.d.ts +36 -0
  256. package/esm/src/react/components/chat/ui/cva.d.ts.map +1 -0
  257. package/esm/src/react/components/chat/ui/cva.js +45 -0
  258. package/esm/src/react/components/chat/ui/dialog.d.ts +55 -0
  259. package/esm/src/react/components/chat/ui/dialog.d.ts.map +1 -0
  260. package/esm/src/react/components/chat/ui/dialog.js +116 -0
  261. package/esm/src/react/components/chat/ui/drawer.d.ts +41 -0
  262. package/esm/src/react/components/chat/ui/drawer.d.ts.map +1 -0
  263. package/esm/src/react/components/chat/ui/drawer.js +92 -0
  264. package/esm/src/react/components/chat/ui/dropdown-menu.d.ts +63 -0
  265. package/esm/src/react/components/chat/ui/dropdown-menu.d.ts.map +1 -0
  266. package/esm/src/react/components/chat/ui/dropdown-menu.js +76 -0
  267. package/esm/src/react/components/chat/ui/file-type.d.ts +26 -0
  268. package/esm/src/react/components/chat/ui/file-type.d.ts.map +1 -0
  269. package/esm/src/react/components/chat/ui/file-type.js +235 -0
  270. package/esm/src/react/components/chat/ui/floating.d.ts +29 -0
  271. package/esm/src/react/components/chat/ui/floating.d.ts.map +1 -0
  272. package/esm/src/react/components/chat/ui/floating.js +90 -0
  273. package/esm/src/react/components/chat/ui/icon-button.d.ts +19 -0
  274. package/esm/src/react/components/chat/ui/icon-button.d.ts.map +1 -0
  275. package/esm/src/react/components/chat/ui/icon-button.js +20 -0
  276. package/esm/src/react/components/chat/ui/index.d.ts +43 -0
  277. package/esm/src/react/components/chat/ui/index.d.ts.map +1 -0
  278. package/esm/src/react/components/chat/ui/index.js +42 -0
  279. package/esm/src/react/components/chat/ui/input.d.ts +27 -0
  280. package/esm/src/react/components/chat/ui/input.d.ts.map +1 -0
  281. package/esm/src/react/components/chat/ui/input.js +41 -0
  282. package/esm/src/react/components/chat/ui/label.d.ts +29 -0
  283. package/esm/src/react/components/chat/ui/label.d.ts.map +1 -0
  284. package/esm/src/react/components/chat/ui/label.js +40 -0
  285. package/esm/src/react/components/chat/ui/list.d.ts +47 -0
  286. package/esm/src/react/components/chat/ui/list.d.ts.map +1 -0
  287. package/esm/src/react/components/chat/ui/list.js +40 -0
  288. package/esm/src/react/components/chat/ui/pill.d.ts +26 -0
  289. package/esm/src/react/components/chat/ui/pill.d.ts.map +1 -0
  290. package/esm/src/react/components/chat/ui/pill.js +39 -0
  291. package/esm/src/react/components/chat/ui/popover.d.ts +47 -0
  292. package/esm/src/react/components/chat/ui/popover.d.ts.map +1 -0
  293. package/esm/src/react/components/chat/ui/popover.js +68 -0
  294. package/esm/src/react/components/chat/ui/progress-bar.d.ts +20 -0
  295. package/esm/src/react/components/chat/ui/progress-bar.d.ts.map +1 -0
  296. package/esm/src/react/components/chat/ui/progress-bar.js +31 -0
  297. package/esm/src/react/components/chat/ui/radio.d.ts +25 -0
  298. package/esm/src/react/components/chat/ui/radio.d.ts.map +1 -0
  299. package/esm/src/react/components/chat/ui/radio.js +29 -0
  300. package/esm/src/react/components/chat/ui/scroll-fade.d.ts +23 -0
  301. package/esm/src/react/components/chat/ui/scroll-fade.d.ts.map +1 -0
  302. package/esm/src/react/components/chat/ui/scroll-fade.js +40 -0
  303. package/esm/src/react/components/chat/ui/select.d.ts +64 -0
  304. package/esm/src/react/components/chat/ui/select.d.ts.map +1 -0
  305. package/esm/src/react/components/chat/ui/select.js +148 -0
  306. package/esm/src/react/components/chat/ui/shimmer.d.ts +25 -0
  307. package/esm/src/react/components/chat/ui/shimmer.d.ts.map +1 -0
  308. package/esm/src/react/components/chat/ui/shimmer.js +24 -0
  309. package/esm/src/react/components/chat/ui/skeleton.d.ts +14 -0
  310. package/esm/src/react/components/chat/ui/skeleton.d.ts.map +1 -0
  311. package/esm/src/react/components/chat/ui/skeleton.js +12 -0
  312. package/esm/src/react/components/chat/ui/slot.d.ts +21 -0
  313. package/esm/src/react/components/chat/ui/slot.d.ts.map +1 -0
  314. package/esm/src/react/components/chat/ui/slot.js +70 -0
  315. package/esm/src/react/components/chat/ui/status.d.ts +28 -0
  316. package/esm/src/react/components/chat/ui/status.d.ts.map +1 -0
  317. package/esm/src/react/components/chat/ui/status.js +23 -0
  318. package/esm/src/react/components/chat/ui/switch.d.ts +34 -0
  319. package/esm/src/react/components/chat/ui/switch.d.ts.map +1 -0
  320. package/esm/src/react/components/chat/ui/switch.js +58 -0
  321. package/esm/src/react/components/chat/ui/tabs.d.ts +44 -0
  322. package/esm/src/react/components/chat/ui/tabs.d.ts.map +1 -0
  323. package/esm/src/react/components/chat/ui/tabs.js +51 -0
  324. package/esm/src/react/components/chat/ui/tag.d.ts +22 -0
  325. package/esm/src/react/components/chat/ui/tag.d.ts.map +1 -0
  326. package/esm/src/react/components/chat/ui/tag.js +27 -0
  327. package/esm/src/react/components/chat/ui/textarea.d.ts +22 -0
  328. package/esm/src/react/components/chat/ui/textarea.d.ts.map +1 -0
  329. package/esm/src/react/components/chat/ui/textarea.js +35 -0
  330. package/esm/src/react/components/chat/ui/tooltip.d.ts +40 -0
  331. package/esm/src/react/components/chat/ui/tooltip.d.ts.map +1 -0
  332. package/esm/src/react/components/chat/ui/tooltip.js +132 -0
  333. package/esm/src/react/primitives/input-box.d.ts.map +1 -1
  334. package/esm/src/react/primitives/input-box.js +17 -4
  335. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  336. package/esm/src/server/handlers/dev/framework-candidates.generated.js +9437 -1064
  337. package/esm/src/server/handlers/dev/projects/html-shell.d.ts +1 -1
  338. package/esm/src/server/handlers/dev/projects/html-shell.d.ts.map +1 -1
  339. package/esm/src/server/handlers/dev/projects/html-shell.js +1 -12
  340. package/esm/src/server/handlers/request/public-agents-list.handler.d.ts +18 -0
  341. package/esm/src/server/handlers/request/public-agents-list.handler.d.ts.map +1 -0
  342. package/esm/src/server/handlers/request/public-agents-list.handler.js +44 -0
  343. package/esm/src/server/runtime-handler/index.d.ts +1 -1
  344. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  345. package/esm/src/server/runtime-handler/index.js +3 -0
  346. package/esm/src/studio/bridge/bridge-bundle.generated.d.ts +1 -1
  347. package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
  348. package/esm/src/studio/bridge/bridge-bundle.generated.js +3 -2
  349. package/esm/src/utils/version-constant.d.ts +1 -1
  350. package/esm/src/utils/version-constant.js +1 -1
  351. package/esm/src/workflow/blob/local-storage.d.ts +32 -0
  352. package/esm/src/workflow/blob/local-storage.d.ts.map +1 -0
  353. package/esm/src/workflow/blob/local-storage.js +179 -0
  354. package/esm/src/workflow/blob/types.d.ts +5 -0
  355. package/esm/src/workflow/blob/types.d.ts.map +1 -1
  356. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts +11 -0
  357. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts.map +1 -1
  358. package/esm/src/workflow/blob/veryfront-cloud-storage.js +36 -0
  359. package/package.json +5 -1
  360. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts +0 -20
  361. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +0 -1
  362. package/esm/src/react/components/chat/chat/components/uploads-panel.js +0 -49
  363. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts +0 -28
  364. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +0 -1
  365. package/esm/src/react/components/chat/chat/contexts/thread-list-context.js +0 -27
  366. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts +0 -28
  367. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +0 -1
  368. package/esm/src/react/components/chat/chat/hooks/use-threads.js +0 -151
  369. package/esm/src/react/components/chat/chat-with-sidebar.d.ts +0 -110
  370. package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +0 -1
  371. package/esm/src/react/components/chat/chat-with-sidebar.js +0 -167
  372. package/esm/src/react/components/chat/message.d.ts +0 -42
  373. package/esm/src/react/components/chat/message.d.ts.map +0 -1
  374. package/esm/src/react/components/chat/message.js +0 -69
@@ -1,5 +1,13 @@
1
1
  /**
2
- * ChatComposerInput area with attachments, model selector, voice, and submit.
2
+ * ChatInputthe composer: input area with attachments, model selector, voice,
3
+ * and submit. Canonical name is `ChatInput` (the composer of a chat message).
4
+ *
5
+ * Render-or-compose: `<ChatInput … />` renders the batteries-included toolbar,
6
+ * or compose your own from the sub-parts (`ChatInput.Field`, `ChatInput.Send`,
7
+ * `ChatInput.Stop`, `ChatInput.Voice`, `ChatInput.Model`, `ChatInput.Attach`) —
8
+ * each reads its state/handlers from `useComposerContext`, which `ChatInput`
9
+ * provides. Every action sub-part takes `icon`, `className`, `asChild`, and an
10
+ * `onClick(e, next)` wrap-signature.
3
11
  *
4
12
  * @module react/components/chat/composition/chat-composer
5
13
  */
@@ -8,8 +16,52 @@ import { type ModelOption } from "../../model-selector.js";
8
16
  import type { ChatTheme } from "../../theme.js";
9
17
  import type { AttachmentInfo } from "../components/attachment-pill.js";
10
18
  import type { ChatMessage } from "../../../../../agent/react/index.js";
11
- /** Props accepted by chat composer. */
12
- export interface ChatComposerProps {
19
+ /** Icon overrides for the batteries-included `ChatInput` toolbar. */
20
+ export interface ChatInputIcons {
21
+ send?: React.ReactNode;
22
+ attach?: React.ReactNode;
23
+ voice?: React.ReactNode;
24
+ stop?: React.ReactNode;
25
+ export?: React.ReactNode;
26
+ }
27
+ /** Wrap-signature onClick shared by the interactive `ChatInput` sub-parts. */
28
+ type WrapClick = (event: React.MouseEvent<HTMLElement>, next: () => void) => void;
29
+ /** Props accepted by `<ChatInput.Field>`. */
30
+ export interface ChatInputFieldProps {
31
+ placeholder?: string;
32
+ className?: string;
33
+ "aria-label"?: string;
34
+ }
35
+ /** The multiline text editor. */
36
+ export declare function ChatInputField({ placeholder, className, ...props }: ChatInputFieldProps): React.ReactElement;
37
+ /** Props shared by the icon action sub-parts. */
38
+ export interface ChatInputActionProps {
39
+ icon?: React.ReactNode;
40
+ className?: string;
41
+ asChild?: boolean;
42
+ onClick?: WrapClick;
43
+ }
44
+ /** Send button — shows when there is input (and not streaming). */
45
+ export declare const ChatInputSend: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
46
+ /** Stop button — shows while streaming. */
47
+ export declare const ChatInputStop: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
48
+ /** Voice button — shows when the field is empty and voice is available. */
49
+ export declare const ChatInputVoice: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
50
+ /** Model selector — shows when models are configured. */
51
+ export declare function ChatInputModel({ className }: {
52
+ className?: string;
53
+ }): React.ReactElement | null;
54
+ /**
55
+ * Attachment `+` control — a portalled `+` menu (Studio `PromptForm`'s
56
+ * `PlusMenu`). The menu leads with "Attach files to chat" (opens the file
57
+ * dialog) and adds "Select document" when `onSelectAttachment` is set.
58
+ */
59
+ export declare function ChatInputAttach({ icon, onClick }: {
60
+ icon?: React.ReactNode;
61
+ onClick?: WrapClick;
62
+ }): React.ReactElement | null;
63
+ /** Props accepted by `ChatInput`. */
64
+ export interface ChatInputProps {
13
65
  input: string;
14
66
  onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
15
67
  onSubmit?: (e?: React.FormEvent) => void;
@@ -23,16 +75,71 @@ export interface ChatComposerProps {
23
75
  models?: ModelOption[];
24
76
  model?: string;
25
77
  onModelChange?: (model: string) => void;
78
+ toolbarStart?: React.ReactNode;
26
79
  onAttach?: (files: FileList) => void;
27
80
  onSelectAttachment?: () => void;
81
+ /**
82
+ * Files dropped onto the composer. Defaults to `onAttach` — pass this only to
83
+ * treat a drop differently from the `+` menu upload.
84
+ */
85
+ onDrop?: (files: FileList) => void;
28
86
  attachAccept?: string;
29
87
  attachments?: AttachmentInfo[];
30
88
  onRemoveAttachment?: (id: string) => void;
31
89
  showExport?: boolean;
32
90
  messages?: ChatMessage[];
91
+ /** Override the toolbar button icons. */
92
+ icons?: ChatInputIcons;
93
+ /** Wrap the built-in attachment `+` click; call `next()` to run it. */
94
+ onAttachClick?: WrapClick;
95
+ /** Wrap the built-in export click; call `next()` to run it. */
96
+ onExportClick?: WrapClick;
33
97
  className?: string;
34
98
  children?: React.ReactNode;
35
99
  }
36
- /** Render chat composer. */
37
- export declare const ChatComposer: React.ForwardRefExoticComponent<ChatComposerProps & React.RefAttributes<HTMLDivElement>>;
100
+ /** Composer state the context is built from (shared by `ChatInput` + `ChatInput.Root`). */
101
+ export interface ComposerStateProps {
102
+ input: string;
103
+ onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
104
+ onSubmit?: (e?: React.FormEvent) => void;
105
+ isLoading?: boolean;
106
+ stop?: () => void;
107
+ onVoice?: () => void;
108
+ isListening?: boolean;
109
+ transcript?: string;
110
+ models?: ModelOption[];
111
+ model?: string;
112
+ onModelChange?: (model: string) => void;
113
+ onAttach?: (files: FileList) => void;
114
+ onSelectAttachment?: () => void;
115
+ attachAccept?: string;
116
+ attachments?: AttachmentInfo[];
117
+ onRemoveAttachment?: (id: string) => void;
118
+ }
119
+ /** Props accepted by `<ChatInput.Root>`. */
120
+ export interface ChatInputRootProps extends ComposerStateProps {
121
+ className?: string;
122
+ children: React.ReactNode;
123
+ }
124
+ /**
125
+ * `ChatInput.Root` — the provider shell for a fully custom composer. Supplies
126
+ * `ComposerContext` from props and renders your children, so you arrange
127
+ * `ChatInput.Field` + the toolbar sub-parts yourself (like `Message.Root`). The
128
+ * default `<ChatInput>` is exactly this Root plus the standard body.
129
+ */
130
+ export declare const ChatInputRoot: React.ForwardRefExoticComponent<ChatInputRootProps & React.RefAttributes<HTMLDivElement>>;
131
+ /**
132
+ * ChatInput — render `<ChatInput … />` for the default composer, or compose
133
+ * `ChatInput.Field` + `ChatInput.Send`/`Stop`/`Voice`/`Model`/`Attach`.
134
+ */
135
+ export declare const ChatInput: React.ForwardRefExoticComponent<ChatInputProps & React.RefAttributes<HTMLDivElement>> & {
136
+ Root: React.ForwardRefExoticComponent<ChatInputRootProps & React.RefAttributes<HTMLDivElement>>;
137
+ Field: typeof ChatInputField;
138
+ Send: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
139
+ Stop: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
140
+ Voice: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
141
+ Model: typeof ChatInputModel;
142
+ Attach: typeof ChatInputAttach;
143
+ };
144
+ export {};
38
145
  //# sourceMappingURL=chat-composer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-composer.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/chat-composer.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAI1D,OAAO,EAAE,KAAK,WAAW,EAAiB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAEvE,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACjF,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAGlB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAGxC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAG1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IAEzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,4BAA4B;AAC5B,eAAO,MAAM,YAAY,0FA4MxB,CAAC"}
1
+ {"version":3,"file":"chat-composer.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/chat-composer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAa1D,OAAO,EAAE,KAAK,WAAW,EAAiB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAIvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AA4CvE,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,8EAA8E;AAC9E,KAAK,SA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erInput area with attachments, model selector, voice, and submit.
2
+ * ChatInputthe composer: input area with attachments, model selector, voice,
3
+ * and submit. Canonical name is `ChatInput` (the composer of a chat message).
4
+ *
5
+ * Render-or-compose: `<ChatInput … />` renders the batteries-included toolbar,
6
+ * or compose your own from the sub-parts (`ChatInput.Field`, `ChatInput.Send`,
7
+ * `ChatInput.Stop`, `ChatInput.Voice`, `ChatInput.Model`, `ChatInput.Attach`) —
8
+ * each reads its state/handlers from `useComposerContext`, which `ChatInput`
9
+ * provides. Every action sub-part takes `icon`, `className`, `asChild`, and an
10
+ * `onClick(e, next)` wrap-signature.
3
11
  *
4
12
  * @module react/components/chat/composition/chat-composer
5
13
  */
6
14
  import * as React from "../../../../../../react/react.js";
7
- import { InputBox, SubmitButton } from "../../../../primitives/index.js";
15
+ import { InputBox } from "../../../../primitives/index.js";
8
16
  import { cn } from "../../theme.js";
9
- import { PlusIcon } from "../../icons/index.js";
17
+ import { ArrowUpIcon, FileTextIcon, PaperclipIcon, PlusIcon, StopIcon } from "../../icons/index.js";
18
+ import { Button } from "../../ui/button.js";
19
+ import { IconButton } from "../../ui/icon-button.js";
20
+ import { Slot } from "../../ui/slot.js";
21
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "../../ui/dropdown-menu.js";
10
22
  import { ModelSelector } from "../../model-selector.js";
11
23
  import { AttachmentPill } from "../components/attachment-pill.js";
24
+ import { DropZoneOverlay } from "../components/drop-zone.js";
25
+ import { useDropZone } from "../hooks/use-drop-zone.js";
12
26
  import { downloadMarkdown } from "../utils/export.js";
13
- /** Render chat composer. */
14
- export const ChatComposer = React.forwardRef(function ChatComposer({ input, onChange, onSubmit, isLoading, placeholder = "Type a message...", theme, stop, onVoice, isListening = false, transcript, models, model, onModelChange, onAttach, onSelectAttachment, attachAccept, attachments, onRemoveAttachment, showExport = false, messages, className, children, }, ref) {
27
+ import { ComposerContextProvider, useComposerContext, } from "../contexts/composer-context.js";
28
+ /** Microphone glyph for the idle-composer voice button (not in the barrel). */
29
+ function MicGlyph() {
30
+ return (React.createElement("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" },
31
+ React.createElement("path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" }),
32
+ React.createElement("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
33
+ React.createElement("line", { x1: "12", x2: "12", y1: "19", y2: "22" })));
34
+ }
35
+ /** Default export (download) glyph. */
36
+ function ExportGlyph() {
37
+ return (React.createElement("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
38
+ React.createElement("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
39
+ React.createElement("polyline", { points: "7 10 12 15 17 10" }),
40
+ React.createElement("line", { x1: "12", y1: "15", x2: "12", y2: "3" })));
41
+ }
42
+ /** The multiline text editor. */
43
+ export function ChatInputField({ placeholder = "Type a message...", className, ...props }) {
44
+ const c = useComposerContext();
45
+ const value = c.isListening ? c.transcript || c.input : c.input;
46
+ const label = props["aria-label"] ?? placeholder ?? "Message";
47
+ return (React.createElement(InputBox, { value: value, onChange: c.onChange, onSubmit: () => c.onSubmit(), placeholder: placeholder, "aria-label": label, disabled: c.isLoading || c.isListening, multiline: true, className: cn("min-h-9 w-full min-w-0 py-1.5 text-base leading-6 text-[var(--foreground)] placeholder:text-[var(--faint)]", className) }));
48
+ }
49
+ /** Send button — shows when there is input (and not streaming). */
50
+ export const ChatInputSend = React.forwardRef(function ChatInputSend({ icon, className, asChild, onClick }, ref) {
51
+ const c = useComposerContext();
52
+ if (c.isLoading)
53
+ return null;
54
+ if (!c.canSubmit && c.onVoice)
55
+ return null;
56
+ const run = () => c.onSubmit();
57
+ const Comp = asChild ? Slot : Button;
58
+ return (React.createElement(Comp, { ref: ref, type: "button", variant: "icon-primary", on: "card", size: "icon-lg", "aria-label": "Send", disabled: !c.canSubmit, onClick: (e) => (onClick ? onClick(e, run) : run()), className: cn("shrink-0", className) }, icon ?? React.createElement(ArrowUpIcon, null)));
59
+ });
60
+ ChatInputSend.displayName = "ChatInput.Send";
61
+ /** Stop button — shows while streaming. */
62
+ export const ChatInputStop = React.forwardRef(function ChatInputStop({ icon, className, asChild, onClick }, ref) {
63
+ const c = useComposerContext();
64
+ if (!c.isLoading)
65
+ return null;
66
+ const run = () => c.onStop?.();
67
+ const Comp = asChild ? Slot : Button;
68
+ return (React.createElement(Comp, { ref: ref, type: "button", variant: "icon-ghost", size: "icon-lg", "aria-label": "Stop", onClick: (e) => (onClick ? onClick(e, run) : run()), className: cn("shrink-0", className) }, icon ?? React.createElement(StopIcon, null)));
69
+ });
70
+ ChatInputStop.displayName = "ChatInput.Stop";
71
+ /** Voice button — shows when the field is empty and voice is available. */
72
+ export const ChatInputVoice = React.forwardRef(function ChatInputVoice({ icon, className, asChild, onClick }, ref) {
73
+ const c = useComposerContext();
74
+ if (c.isLoading || c.canSubmit || !c.onVoice)
75
+ return null;
76
+ const run = () => c.onVoice?.();
77
+ const Comp = asChild ? Slot : Button;
78
+ return (React.createElement(Comp, { ref: ref, type: "button", variant: "icon-ghost", on: "card", size: "icon-lg", "aria-label": "Voice input", "aria-pressed": c.isListening, onClick: (e) => (onClick ? onClick(e, run) : run()), className: cn("shrink-0", c.isListening && "bg-[var(--primary)] text-[var(--secondary)]", className) }, icon ?? React.createElement(MicGlyph, null)));
79
+ });
80
+ ChatInputVoice.displayName = "ChatInput.Voice";
81
+ /** Model selector — shows when models are configured. */
82
+ export function ChatInputModel({ className }) {
83
+ const c = useComposerContext();
84
+ if (!c.models || c.models.length === 0 || !c.onModelChange)
85
+ return null;
86
+ return (React.createElement(ModelSelector, { variant: "icon", models: c.models, value: c.model, onChange: c.onModelChange, disabled: c.isLoading, className: className }));
87
+ }
88
+ /**
89
+ * Attachment `+` control — a portalled `+` menu (Studio `PromptForm`'s
90
+ * `PlusMenu`). The menu leads with "Attach files to chat" (opens the file
91
+ * dialog) and adds "Select document" when `onSelectAttachment` is set.
92
+ */
93
+ export function ChatInputAttach({ icon, onClick }) {
94
+ const c = useComposerContext();
15
95
  const fileInputRef = React.useRef(null);
16
- const [attachmentMenuOpen, setAttachmentMenuOpen] = React.useState(false);
17
- const inputPlaceholder = isListening ? "Listening..." : placeholder;
18
- const inputLabel = inputPlaceholder || "Message";
19
- return (React.createElement("div", { ref: ref, className: cn("flex-shrink-0 pb-6 pt-2", className) },
20
- React.createElement("div", { className: "mx-auto w-full max-w-3xl px-4" },
21
- children && (React.createElement("div", { className: "flex flex-wrap items-center gap-1.5 pb-3" }, children)),
22
- attachments && attachments.length > 0 && (React.createElement("div", { className: "flex flex-wrap gap-1.5 px-2 pb-2" }, attachments.map((file) => (React.createElement(AttachmentPill, { key: file.id, attachment: file, onRemove: onRemoveAttachment }))))),
23
- React.createElement("form", { onSubmit: (e) => {
24
- e.preventDefault();
25
- onSubmit?.(e);
26
- } },
27
- React.createElement("div", { className: "relative rounded-full border border-[var(--input-border)] bg-[var(--card)] px-3 py-1.5 shadow-sm transition-[border-color,box-shadow] focus-within:border-[var(--foreground)] focus-within:shadow-md" },
28
- React.createElement("div", { className: "flex min-h-[42px] items-end gap-2" },
29
- (onAttach || onSelectAttachment) && (React.createElement("div", { className: "relative flex shrink-0 items-center" },
30
- onAttach && (React.createElement("input", { ref: fileInputRef, type: "file", accept: attachAccept, multiple: true, "aria-label": "Upload file", onChange: (e) => {
31
- if (e.target.files?.length)
32
- onAttach(e.target.files);
33
- e.target.value = "";
34
- }, style: {
35
- position: "absolute",
36
- width: 1,
37
- height: 1,
38
- padding: 0,
39
- margin: -1,
40
- overflow: "hidden",
41
- clip: "rect(0,0,0,0)",
42
- whiteSpace: "nowrap",
43
- border: 0,
44
- } })),
45
- React.createElement("button", { type: "button", onClick: () => {
46
- if (onAttach && !onSelectAttachment) {
47
- fileInputRef.current?.click();
48
- return;
49
- }
50
- setAttachmentMenuOpen((open) => !open);
51
- }, className: "size-9 flex items-center justify-center rounded-full text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:bg-[var(--foreground)]/5 transition-colors shrink-0", "aria-label": "Add document", "aria-expanded": attachmentMenuOpen },
52
- React.createElement(PlusIcon, { className: "size-5" })),
53
- attachmentMenuOpen && (React.createElement("div", { role: "menu", className: "absolute bottom-11 left-0 z-20 overflow-hidden rounded-2xl border border-[var(--border)] bg-[var(--card)] shadow-lg", style: { minWidth: 224 } },
54
- onAttach && (React.createElement("button", { type: "button", role: "menuitem", className: "block w-full whitespace-nowrap px-4 py-3 text-left text-sm text-[var(--foreground)] transition-colors hover:bg-[var(--foreground)]/5", onClick: () => {
55
- setAttachmentMenuOpen(false);
56
- fileInputRef.current?.click();
57
- } }, "Upload document")),
58
- onSelectAttachment && (React.createElement("button", { type: "button", role: "menuitem", className: "block w-full whitespace-nowrap px-4 py-3 text-left text-sm text-[var(--foreground)] transition-colors hover:bg-[var(--foreground)]/5", onClick: () => {
59
- setAttachmentMenuOpen(false);
60
- onSelectAttachment();
61
- } }, "Select document")))))),
62
- React.createElement(InputBox, { value: isListening ? transcript || input : input, onChange: onChange, onSubmit: () => onSubmit?.(), placeholder: inputPlaceholder, "aria-label": inputLabel, disabled: isLoading || isListening, multiline: true, className: cn("min-h-9 min-w-0 flex-1 py-2 text-[15px] leading-normal text-[var(--foreground)] placeholder:text-[var(--input-placeholder)]", theme?.input) }),
63
- React.createElement("div", { className: "flex items-center gap-2" },
64
- models && models.length > 0 && onModelChange && (React.createElement(ModelSelector, { models: models, value: model, onChange: onModelChange, disabled: isLoading })),
65
- showExport && messages && messages.length > 0 && (React.createElement("button", { type: "button", onClick: () => downloadMarkdown(messages), className: "size-9 flex items-center justify-center rounded-full text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:bg-[var(--foreground)]/5 transition-colors shrink-0", "aria-label": "Export conversation", title: "Export as Markdown" },
66
- React.createElement("svg", { className: "size-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
67
- React.createElement("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
68
- React.createElement("polyline", { points: "7 10 12 15 17 10" }),
69
- React.createElement("line", { x1: "12", y1: "15", x2: "12", y2: "3" })))),
70
- React.createElement(SubmitButton, { isLoading: isLoading || isListening, hasInput: !!input.trim(), onStop: isListening ? undefined : stop, onVoice: onVoice, disabled: !input.trim(), className: cn("size-9 shrink-0 rounded-full bg-[var(--foreground)] text-[var(--background)] transition-[background-color,color,box-shadow] hover:bg-[var(--card)] hover:text-[var(--foreground)] hover:shadow-[inset_0_0_0_1px_var(--foreground)] disabled:opacity-100", theme?.button) }))))))));
96
+ const [menuOpen, setMenuOpen] = React.useState(false);
97
+ if (!c.onAttach && !c.onSelectAttachment)
98
+ return null;
99
+ const openDialog = () => fileInputRef.current?.click();
100
+ // Menu selection carries no mouse event; pass a stub so the `onClick` wrap
101
+ // (e.g. `onAttachClick`) still gets its `next()` continuation.
102
+ const runUpload = () => onClick ? onClick({}, openDialog) : openDialog();
103
+ return (React.createElement("div", { className: "relative flex shrink-0 items-center" },
104
+ c.onAttach && (React.createElement("input", { ref: fileInputRef, type: "file", accept: c.attachAccept, multiple: true, "aria-label": "Upload file", onChange: (e) => {
105
+ if (e.target.files?.length)
106
+ c.onAttach?.(e.target.files);
107
+ e.target.value = "";
108
+ }, style: {
109
+ position: "absolute",
110
+ width: 1,
111
+ height: 1,
112
+ padding: 0,
113
+ margin: -1,
114
+ overflow: "hidden",
115
+ clip: "rect(0,0,0,0)",
116
+ whiteSpace: "nowrap",
117
+ border: 0,
118
+ } })),
119
+ React.createElement(DropdownMenu, { open: menuOpen, onOpenChange: setMenuOpen },
120
+ React.createElement(DropdownMenuTrigger, { asChild: true },
121
+ React.createElement(Button, { type: "button", variant: "icon-tertiary", size: "icon-lg", "aria-label": "Add document", className: "shrink-0" }, icon ?? React.createElement(PlusIcon, null))),
122
+ React.createElement(DropdownMenuContent, { align: "start" },
123
+ c.onAttach && (React.createElement(DropdownMenuItem, { onSelect: runUpload },
124
+ React.createElement(PaperclipIcon, null),
125
+ "Attach files to chat")),
126
+ c.onSelectAttachment && (React.createElement(DropdownMenuItem, { onSelect: c.onSelectAttachment },
127
+ React.createElement(FileTextIcon, null),
128
+ "Select document"))))));
129
+ }
130
+ /** Build the ComposerContext value from composer state props. */
131
+ function useComposerValue(p) {
132
+ const hasResolvedAttachment = p.attachments?.some((attachment) => Boolean(attachment.url) &&
133
+ attachment.state !== "uploading" &&
134
+ attachment.state !== "processing" &&
135
+ attachment.state !== "error") ?? false;
136
+ return React.useMemo(() => ({
137
+ input: p.input,
138
+ setInput: () => { },
139
+ onChange: p.onChange,
140
+ attachments: p.attachments ?? [],
141
+ onAttach: p.onAttach,
142
+ onSelectAttachment: p.onSelectAttachment,
143
+ onRemoveAttachment: p.onRemoveAttachment,
144
+ attachAccept: p.attachAccept,
145
+ onSubmit: (e) => p.onSubmit?.(e),
146
+ isLoading: p.isLoading ?? false,
147
+ canSubmit: p.input.trim().length > 0 || hasResolvedAttachment,
148
+ onStop: p.stop,
149
+ onVoice: p.onVoice,
150
+ isListening: p.isListening ?? false,
151
+ transcript: p.transcript,
152
+ model: p.model,
153
+ models: p.models ?? [],
154
+ onModelChange: p.onModelChange,
155
+ }), [
156
+ p.input,
157
+ p.onChange,
158
+ p.attachments,
159
+ p.onAttach,
160
+ p.onSelectAttachment,
161
+ p.onRemoveAttachment,
162
+ p.attachAccept,
163
+ p.onSubmit,
164
+ p.isLoading,
165
+ hasResolvedAttachment,
166
+ p.stop,
167
+ p.onVoice,
168
+ p.isListening,
169
+ p.transcript,
170
+ p.model,
171
+ p.models,
172
+ p.onModelChange,
173
+ ]);
174
+ }
175
+ /**
176
+ * `ChatInput.Root` — the provider shell for a fully custom composer. Supplies
177
+ * `ComposerContext` from props and renders your children, so you arrange
178
+ * `ChatInput.Field` + the toolbar sub-parts yourself (like `Message.Root`). The
179
+ * default `<ChatInput>` is exactly this Root plus the standard body.
180
+ */
181
+ export const ChatInputRoot = React.forwardRef(function ChatInputRoot({ className, children, ...state }, ref) {
182
+ const ctxValue = useComposerValue(state);
183
+ return (React.createElement(ComposerContextProvider, { value: ctxValue },
184
+ React.createElement("div", { ref: ref, className: cn("flex-shrink-0 pb-6 pt-2", className) },
185
+ React.createElement("div", { className: "mx-auto w-full max-w-[850px] px-4" }, children))));
186
+ });
187
+ ChatInputRoot.displayName = "ChatInput.Root";
188
+ /** Render the composer. */
189
+ const ChatInputBase = React.forwardRef(function ChatInput({ input, onChange, onSubmit, isLoading = false, placeholder = "Type a message...", theme, stop, onVoice, isListening = false, transcript, models, model, onModelChange, toolbarStart, onAttach, onSelectAttachment, onDrop, attachAccept, attachments, onRemoveAttachment, showExport = false, messages, icons, onAttachClick, onExportClick, className, children, }, ref) {
190
+ // Return focus to the editor after attaching (menu pick or drop) so the
191
+ // user can keep typing without clicking back into the field.
192
+ const fieldContainerRef = React.useRef(null);
193
+ const focusField = React.useCallback(() => {
194
+ fieldContainerRef.current?.querySelector("textarea")?.focus();
195
+ }, []);
196
+ const withFocus = React.useCallback((fn) => fn
197
+ ? (files) => {
198
+ fn(files);
199
+ focusField();
200
+ }
201
+ : undefined, [focusField]);
202
+ const handleAttach = withFocus(onAttach);
203
+ const { isDragActive, dragProps } = useDropZone(withFocus(onDrop ?? onAttach));
204
+ const ctxValue = useComposerValue({
205
+ input,
206
+ onChange,
207
+ onSubmit,
208
+ isLoading,
209
+ stop,
210
+ onVoice,
211
+ isListening,
212
+ transcript,
213
+ models,
214
+ model,
215
+ onModelChange,
216
+ onAttach: handleAttach,
217
+ onSelectAttachment,
218
+ attachAccept,
219
+ attachments,
220
+ onRemoveAttachment,
221
+ });
222
+ const exportDownload = () => {
223
+ if (messages)
224
+ downloadMarkdown(messages);
225
+ };
226
+ return (React.createElement(ComposerContextProvider, { value: ctxValue },
227
+ React.createElement("div", { ref: ref, className: cn("flex-shrink-0 pb-6", className) },
228
+ React.createElement("div", { className: "mx-auto w-full max-w-[850px] px-4" },
229
+ React.Children.toArray(children).length > 0 && (React.createElement("div", { className: "flex flex-wrap items-center gap-1.5 pb-3" }, children)),
230
+ attachments && attachments.length > 0 && (React.createElement("div", { className: "flex flex-wrap items-center gap-2 pb-4" }, attachments.map((file) => (React.createElement(AttachmentPill, { key: file.id, attachment: file, onRemove: onRemoveAttachment, className: "w-[200px]" }))))),
231
+ React.createElement("form", { onSubmit: (e) => {
232
+ e.preventDefault();
233
+ onSubmit?.(e);
234
+ } },
235
+ React.createElement("div", { ...dragProps, ref: fieldContainerRef, className: cn("relative overflow-hidden rounded-[var(--radius-lg)] border border-transparent bg-[var(--secondary)] px-3 py-2 shadow-sm transition-all md:px-4 md:py-3", isDragActive && "border-dashed border-[var(--edge-medium)]") },
236
+ React.createElement(DropZoneOverlay, { visible: isDragActive }),
237
+ React.createElement(ChatInputField, { placeholder: placeholder, className: theme?.input }),
238
+ React.createElement("div", { className: "mt-2.5 flex min-h-[44px] items-center justify-between gap-1.5 md:gap-2" },
239
+ React.createElement("div", { className: "flex min-w-0 items-center gap-1.5 md:gap-2" },
240
+ React.createElement(ChatInputAttach, { icon: icons?.attach, onClick: onAttachClick }),
241
+ toolbarStart),
242
+ React.createElement("div", { className: "flex shrink-0 items-center gap-1.5 md:gap-2" },
243
+ React.createElement(ChatInputModel, null),
244
+ showExport && messages && messages.length > 0 && (React.createElement(IconButton, { type: "button", variant: "icon-ghost", size: "icon-lg", on: "card", onClick: (e) => onExportClick ? onExportClick(e, exportDownload) : exportDownload(), "aria-label": "Export conversation", tooltip: "Export as Markdown", tooltipSide: "top", className: "shrink-0" }, icons?.export ?? React.createElement(ExportGlyph, null))),
245
+ React.createElement(ChatInputStop, { icon: icons?.stop }),
246
+ React.createElement(ChatInputVoice, { icon: icons?.voice }),
247
+ React.createElement(ChatInputSend, { icon: icons?.send, className: theme?.button })))))))));
248
+ });
249
+ ChatInputBase.displayName = "ChatInput";
250
+ /**
251
+ * ChatInput — render `<ChatInput … />` for the default composer, or compose
252
+ * `ChatInput.Field` + `ChatInput.Send`/`Stop`/`Voice`/`Model`/`Attach`.
253
+ */
254
+ export const ChatInput = Object.assign(ChatInputBase, {
255
+ Root: ChatInputRoot,
256
+ Field: ChatInputField,
257
+ Send: ChatInputSend,
258
+ Stop: ChatInputStop,
259
+ Voice: ChatInputVoice,
260
+ Model: ChatInputModel,
261
+ Attach: ChatInputAttach,
71
262
  });
72
- ChatComposer.displayName = "ChatComposer";
@@ -0,0 +1,78 @@
1
+ /**
2
+ * ChatEmptyState — the conversation idle / empty view: an agent avatar, a
3
+ * heading, and a row of suggestion chips. Ported 1:1 from Veryfront Studio's
4
+ * `ChatIdleView` family (`ChatIdleView` + `…Avatar` + `…Heading` +
5
+ * `Suggestions`/`SuggestionItem`), restyled onto the chat primitives.
6
+ *
7
+ * Composed via children — every part is a small, focused piece you arrange
8
+ * yourself, so there is no monolithic prop surface:
9
+ *
10
+ * ```tsx
11
+ * <ChatEmptyState.Root>
12
+ * <ChatEmptyState.Avatar src={agent.avatarUrl} alt={agent.name} />
13
+ * <ChatEmptyState.Heading>{agent.name}</ChatEmptyState.Heading>
14
+ * <ChatEmptyState.Suggestions>
15
+ * <ChatEmptyState.Suggestion onClick={() => send("Create a plan")}>
16
+ * Create a plan
17
+ * </ChatEmptyState.Suggestion>
18
+ * </ChatEmptyState.Suggestions>
19
+ * </ChatEmptyState.Root>
20
+ * ```
21
+ *
22
+ * @module react/components/chat/composition/chat-empty-state
23
+ */
24
+ import * as React from "../../../../../../react/react.js";
25
+ import { type ButtonProps } from "../../ui/index.js";
26
+ /** Props accepted by `<ChatEmptyState.Root>`. */
27
+ export interface ChatEmptyStateRootProps extends React.HTMLAttributes<HTMLDivElement> {
28
+ ref?: React.Ref<HTMLDivElement>;
29
+ }
30
+ /** Centered container for the empty-state pieces. */
31
+ declare function Root({ className, children, ref, ...props }: ChatEmptyStateRootProps): React.ReactElement;
32
+ /** Props accepted by `<ChatEmptyState.Avatar>`. */
33
+ export interface ChatEmptyStateAvatarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
34
+ src?: string;
35
+ alt?: string;
36
+ /** Pulse while the agent is being provisioned. */
37
+ isCreating?: boolean;
38
+ ref?: React.Ref<HTMLDivElement>;
39
+ }
40
+ /**
41
+ * Hero agent avatar (64px). Renders the generic {@link Avatar} in `muted`
42
+ * tone — the agent's image when `src` resolves, otherwise its initial. Same as
43
+ * Studio's `ChatIdleView` avatar: agent identity comes from the data, not a
44
+ * bespoke component.
45
+ */
46
+ declare function EmptyStateAvatar({ className, isCreating, src, alt, ...props }: ChatEmptyStateAvatarProps): React.ReactElement;
47
+ /** Props accepted by `<ChatEmptyState.Heading>`. */
48
+ export interface ChatEmptyStateHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
49
+ /** Heading level, `1`–`6`. Defaults to `2`. */
50
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
51
+ ref?: React.Ref<HTMLHeadingElement>;
52
+ }
53
+ /** Balanced, centered title (e.g. the agent name). */
54
+ declare function Heading({ level, className, children, ref, ...props }: ChatEmptyStateHeadingProps): React.ReactElement;
55
+ /** Props accepted by `<ChatEmptyState.Suggestions>`. */
56
+ export interface ChatEmptyStateSuggestionsProps extends React.HTMLAttributes<HTMLDivElement> {
57
+ ref?: React.Ref<HTMLDivElement>;
58
+ }
59
+ /** Wrapping, centered row of suggestion chips. */
60
+ declare function Suggestions({ className, role, children, ref, ...props }: ChatEmptyStateSuggestionsProps): React.ReactElement;
61
+ /** Props accepted by `<ChatEmptyState.Suggestion>`. */
62
+ export interface ChatEmptyStateSuggestionProps extends Omit<ButtonProps, "variant"> {
63
+ }
64
+ /** A single filled suggestion chip. */
65
+ declare function Suggestion({ className, size, children, ...props }: ChatEmptyStateSuggestionProps): React.ReactElement;
66
+ /**
67
+ * Compound empty state. Use the namespaced parts to compose the view:
68
+ * `Root`, `Avatar`, `Heading`, `Suggestions`, `Suggestion`.
69
+ */
70
+ export declare const ChatEmptyState: {
71
+ Root: typeof Root;
72
+ Avatar: typeof EmptyStateAvatar;
73
+ Heading: typeof Heading;
74
+ Suggestions: typeof Suggestions;
75
+ Suggestion: typeof Suggestion;
76
+ };
77
+ export {};
78
+ //# sourceMappingURL=chat-empty-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-empty-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/chat-empty-state.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAE1D,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErE,iDAAiD;AACjD,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACnF,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,qDAAqD;AACrD,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,CAa9C;AAED,mDAAmD;AACnD,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED;;;;;GAKG;AACH,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,UAAU,EACV,GAAG,EACH,GAAuB,EACvB,GA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