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
@@ -2,18 +2,68 @@ import * as React from "../../../../react/react.js";
2
2
  import { cn } from "./theme.js";
3
3
  import { isBrowserEnvironment } from "../../../platform/compat/runtime.js";
4
4
  import { validateTrustedHtml } from "../../../security/client/html-sanitizer.js";
5
- import { RichCodeBlock } from "./chat/components/code-block.js";
5
+ import { CodeBlock as SyntaxCodeBlock } from "./ui/code-block.js";
6
6
  const ESM_REACT_MARKDOWN = "https://esm.sh/react-markdown@9.0.3?target=es2022&pin=v135&deps=react@19.2.4";
7
7
  const ESM_REMARK_GFM = "https://esm.sh/remark-gfm@4.0.1?target=es2022&pin=v135";
8
- const ESM_REHYPE_HIGHLIGHT = "https://esm.sh/rehype-highlight@7.0.2?target=es2022&pin=v135";
9
8
  const ESM_MERMAID = "https://esm.sh/mermaid@11.4.1?pin=v135";
10
- const MARKDOWN_CONTAINER_CLASS = "prose prose-sm max-w-none min-w-0 overflow-hidden break-words [overflow-wrap:anywhere] [&_*]:max-w-full";
9
+ // Self-contained prose styling. Studio's ChatMessageText leans on the
10
+ // `@tailwindcss/typography` `prose` plugin for element defaults (list markers,
11
+ // heading sizes, spacing). This package is dependency-light and must not
12
+ // require consumers to install that plugin, so the element styles are declared
13
+ // explicitly with arbitrary-variant descendant selectors — mirroring Studio's
14
+ // `variantStyles.default` (`prose-p:my-4 prose-ul:my-4 prose-li:my-1.5
15
+ // prose-h1:text-lg … prose-hr:my-5`). Tailwind's preflight strips list markers,
16
+ // so `list-disc`/`list-decimal` + padding are restored here.
17
+ const MARKDOWN_CONTAINER_CLASS = [
18
+ "max-w-none min-w-0 overflow-hidden break-words text-base leading-relaxed text-[var(--foreground)] [overflow-wrap:anywhere]",
19
+ // paragraph rhythm
20
+ "[&_p]:my-4",
21
+ // lists — restore markers + indentation preflight removes
22
+ "[&_ul]:my-4 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-4 [&_ol]:list-decimal [&_ol]:pl-6 [&_li]:my-1.5 [&_li]:pl-1",
23
+ "[&_ul_ul]:my-1 [&_ol_ol]:my-1 [&_ul_ol]:my-1 [&_ol_ul]:my-1",
24
+ "[&_li>p]:my-0 [&_li_p]:my-2",
25
+ // headings — Studio sizes; font-semibold (Inter reads lighter than Söhne)
26
+ "[&_h1]:mt-6 [&_h1]:mb-2 [&_h1]:text-lg [&_h1]:font-semibold",
27
+ "[&_h2]:mt-5 [&_h2]:mb-2 [&_h2]:text-base [&_h2]:font-semibold",
28
+ "[&_h3]:mt-4 [&_h3]:mb-1 [&_h3]:text-sm [&_h3]:font-semibold",
29
+ "[&_h4]:mt-3 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:font-semibold",
30
+ // inline emphasis
31
+ "[&_strong]:font-semibold [&_em]:italic",
32
+ // inline code — `:not(pre)>code` targets bare inline code (block code lives
33
+ // inside the CodeBlock's own <pre>). Mirrors Studio's `prose-inline-code`
34
+ // (bg-accent, rounded-xs, px-1 py-0.5, font-mono font-medium).
35
+ "[&_:not(pre)>code]:rounded-[var(--radius-xs)] [&_:not(pre)>code]:bg-[var(--accent)] [&_:not(pre)>code]:px-1 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:font-mono [&_:not(pre)>code]:text-[0.9em] [&_:not(pre)>code]:font-medium [&_:not(pre)>code]:text-[var(--foreground)]",
36
+ // horizontal rule
37
+ "[&_hr]:my-6 [&_hr]:border-0 [&_hr]:border-t [&_hr]:border-[var(--edge-medium)]",
38
+ // margin reset for the container edges + width guard
39
+ "[&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_*]:max-w-full",
40
+ ].join(" ");
11
41
  async function importFromUrl(url) {
12
42
  return await import(/* @vite-ignore */ url);
13
43
  }
14
44
  let ReactMarkdown = null;
15
45
  let remarkGfm = null;
16
- let rehypeHighlight = null;
46
+ /**
47
+ * Recursively flatten a react-markdown child tree to plain text. Fenced code
48
+ * arrives as a string, but some remark/rehype plugins wrap it in nested
49
+ * element nodes; naive `String(children)` on those yields "[object Object]".
50
+ * Walking the tree keeps the raw source text intact for the shiki-based
51
+ * CodeBlock to highlight itself.
52
+ */
53
+ function extractText(node) {
54
+ if (node == null || node === false || node === true)
55
+ return "";
56
+ if (typeof node === "string")
57
+ return node;
58
+ if (typeof node === "number")
59
+ return String(node);
60
+ if (Array.isArray(node))
61
+ return node.map(extractText).join("");
62
+ if (React.isValidElement(node)) {
63
+ return extractText(node.props.children);
64
+ }
65
+ return "";
66
+ }
17
67
  let mermaidPromise = null;
18
68
  let mermaidModule = null;
19
69
  async function loadMermaid() {
@@ -61,52 +111,55 @@ function MermaidDiagram({ code }) {
61
111
  };
62
112
  }, [code]);
63
113
  if (!isBrowserEnvironment()) {
64
- return (React.createElement("pre", { className: "my-4 p-4 bg-[var(--accent)] rounded-lg overflow-auto" },
114
+ return (React.createElement("pre", { className: "my-4 overflow-auto rounded-[var(--radius-lg)] bg-[var(--secondary)] p-4" },
65
115
  React.createElement("code", null, code)));
66
116
  }
67
117
  if (error) {
68
- return (React.createElement("div", { className: "my-4 p-4 bg-red-50 rounded-lg text-red-600 text-sm" },
118
+ return (React.createElement("div", { className: "my-4 rounded-[var(--radius-lg)] bg-red-50 p-4 text-sm text-red-600" },
69
119
  React.createElement("p", { className: "font-medium" }, "Mermaid Error"),
70
120
  React.createElement("p", null, error),
71
121
  React.createElement("pre", { className: "mt-2 text-xs overflow-auto" }, code)));
72
122
  }
73
123
  if (!svg) {
74
- return (React.createElement("div", { className: "my-4 p-4 bg-[var(--accent)] rounded-lg animate-pulse" },
75
- React.createElement("div", { className: "h-32 flex items-center justify-center text-[var(--muted-foreground)]" }, "Loading diagram...")));
124
+ return (React.createElement("div", { className: "my-4 animate-pulse rounded-[var(--radius-lg)] bg-[var(--secondary)] p-4" },
125
+ React.createElement("div", { className: "flex h-32 items-center justify-center text-[var(--faint)]" }, "Loading diagram...")));
76
126
  }
77
127
  return (React.createElement("div", { className: "my-4 flex justify-center overflow-auto", dangerouslySetInnerHTML: { __html: svg } }));
78
128
  }
79
- function CodeBlock({ language, code, inline, enableMermaid, renderCodeBlock, }) {
129
+ /**
130
+ * Render a fenced (block) code region. Inline code is NOT handled here — it
131
+ * renders as a bare `<code>` styled by the container class (see
132
+ * `MARKDOWN_CONTAINER_CLASS`), matching Studio, which overrides `pre` (not
133
+ * `code`) so only block code reaches the syntax highlighter.
134
+ */
135
+ function CodeBlock({ language, code, enableMermaid, renderCodeBlock, }) {
80
136
  if (renderCodeBlock) {
81
- return React.createElement(React.Fragment, null, renderCodeBlock({ language, code, inline }));
82
- }
83
- if (inline) {
84
- return (React.createElement("code", { className: "bg-[var(--accent)] px-1.5 py-0.5 rounded text-sm font-mono" }, code));
137
+ return React.createElement(React.Fragment, null, renderCodeBlock({ language, code, inline: false }));
85
138
  }
86
139
  if (enableMermaid && language === "mermaid") {
87
140
  return React.createElement(MermaidDiagram, { code: code });
88
141
  }
89
- return React.createElement(RichCodeBlock, { language: language, code: code });
142
+ // Block fences render through the shared syntax-highlight primitive (shiki +
143
+ // copy + language label + collapsible), forked from Studio's ChatCodeBlock.
144
+ return React.createElement(SyntaxCodeBlock, { code: code, language: language });
90
145
  }
91
146
  function FallbackMarkdown({ children, className, }) {
92
147
  return (React.createElement("div", { className: cn(MARKDOWN_CONTAINER_CLASS, className) },
93
148
  React.createElement("p", { className: "whitespace-pre-wrap" }, children)));
94
149
  }
95
150
  /** Render markdown. */
96
- export function Markdown({ children, className, enableMermaid = true, renderCodeBlock, }) {
151
+ export function Markdown({ children, className, enableMermaid = true, renderCodeBlock, components, remarkPlugins, rehypePlugins, }) {
97
152
  const [isLoaded, setIsLoaded] = React.useState(false);
98
153
  React.useEffect(() => {
99
154
  let cancelled = false;
100
155
  async function load() {
101
156
  if (!ReactMarkdown) {
102
- const [rmModule, gfmModule, highlightModule] = await Promise.all([
157
+ const [rmModule, gfmModule] = await Promise.all([
103
158
  importFromUrl(ESM_REACT_MARKDOWN),
104
159
  importFromUrl(ESM_REMARK_GFM),
105
- importFromUrl(ESM_REHYPE_HIGHLIGHT),
106
160
  ]);
107
161
  ReactMarkdown = rmModule.default;
108
162
  remarkGfm = gfmModule.default;
109
- rehypeHighlight = highlightModule.default;
110
163
  }
111
164
  if (cancelled)
112
165
  return;
@@ -120,25 +173,56 @@ export function Markdown({ children, className, enableMermaid = true, renderCode
120
173
  if (!isLoaded || !ReactMarkdown) {
121
174
  return React.createElement(FallbackMarkdown, { className: className }, children);
122
175
  }
176
+ const builtinComponents = {
177
+ // Override `pre` (not `code`) — Studio's approach. Block code arrives
178
+ // as `<pre><code class="language-x">…</code></pre>`; we pull the
179
+ // language + text off the inner (default-rendered) `<code>` element
180
+ // and hand it to the syntax highlighter. Inline code is left as a bare
181
+ // `<code>`, styled by the container class.
182
+ pre(props) {
183
+ const child = React.Children.toArray(props.children).find(React.isValidElement);
184
+ if (!child) {
185
+ return React.createElement("pre", null, props.children);
186
+ }
187
+ const codeClassName = child.props.className;
188
+ const match = /language-(\w+)/.exec(codeClassName || "");
189
+ const language = match ? match[1] : undefined;
190
+ const code = extractText(child.props.children).replace(/\n$/, "");
191
+ return (React.createElement(CodeBlock, { language: language, code: code, enableMermaid: enableMermaid, renderCodeBlock: renderCodeBlock }));
192
+ },
193
+ table(props) {
194
+ // Borders live on the rows, scoped by section so the header always
195
+ // keeps its divider (a `tr:last-child` rule would wrongly strip the
196
+ // lone header row in <thead>). Only the final body row drops its
197
+ // border so it doesn't double up with the container edge.
198
+ return (React.createElement("div", { className: "my-4 max-w-full overflow-x-auto rounded-[var(--radius-md)] border border-[var(--outline-border)]" },
199
+ React.createElement("table", { className: "w-full text-sm [&_thead_tr]:border-b [&_thead_tr]:border-[var(--edge)] [&_tbody_tr]:border-b [&_tbody_tr]:border-[var(--edge)] [&_tbody_tr:last-child]:border-b-0" }, props.children)));
200
+ },
201
+ th(props) {
202
+ return (React.createElement("th", { style: props.style, className: "px-4 py-2 text-left font-medium text-[var(--foreground)]" }, props.children));
203
+ },
204
+ td(props) {
205
+ return (React.createElement("td", { style: props.style, className: "px-4 py-2 text-[var(--foreground)]" }, props.children));
206
+ },
207
+ a(props) {
208
+ // Studio: links are foreground (black), underlined, and drop the
209
+ // underline on hover — not the default browser blue.
210
+ return (React.createElement("a", { href: props.href, className: "break-words text-[var(--foreground)] underline underline-offset-4 hover:no-underline [overflow-wrap:anywhere]", target: "_blank", rel: "noopener noreferrer" }, props.children));
211
+ },
212
+ blockquote(props) {
213
+ return (React.createElement("blockquote", { className: "border-l-4 border-[var(--outline-border)] pl-4 my-4 text-[var(--foreground)] italic" }, props.children));
214
+ },
215
+ };
216
+ // Consumer entries win over the built-ins (merge order matters). Cast is
217
+ // needed because the built-ins are typed with local prop interfaces while
218
+ // `components` uses react-markdown's `Components`.
219
+ const mergedComponents = {
220
+ ...builtinComponents,
221
+ ...components,
222
+ };
123
223
  return (React.createElement("div", { className: cn(MARKDOWN_CONTAINER_CLASS, className) },
124
- React.createElement(ReactMarkdown, { remarkPlugins: remarkGfm ? [remarkGfm] : [], rehypePlugins: rehypeHighlight ? [rehypeHighlight] : [], components: {
125
- code(props) {
126
- const { className: codeClassName, children: codeChildren, node } = props;
127
- const match = /language-(\w+)/.exec(codeClassName || "");
128
- const language = match ? match[1] : undefined;
129
- const code = String(codeChildren).replace(/\n$/, "");
130
- const isInline = !node?.position?.start?.line;
131
- return (React.createElement(CodeBlock, { language: language, code: code, inline: isInline, enableMermaid: enableMermaid, renderCodeBlock: renderCodeBlock }));
132
- },
133
- table(props) {
134
- return (React.createElement("div", { className: "my-4 max-w-full overflow-x-auto rounded-md border border-[var(--border)]" },
135
- React.createElement("table", { className: "w-full divide-y divide-[var(--border)]" }, props.children)));
136
- },
137
- a(props) {
138
- return (React.createElement("a", { href: props.href, className: "break-words text-blue-600 hover:underline [overflow-wrap:anywhere]", target: "_blank", rel: "noopener noreferrer" }, props.children));
139
- },
140
- blockquote(props) {
141
- return (React.createElement("blockquote", { className: "border-l-4 border-[var(--border)] pl-4 my-4 text-[var(--card-foreground)] italic" }, props.children));
142
- },
143
- } }, children)));
224
+ React.createElement(ReactMarkdown, { remarkPlugins: [
225
+ ...(remarkGfm ? [remarkGfm] : []),
226
+ ...(remarkPlugins ?? []),
227
+ ], rehypePlugins: (rehypePlugins ?? []), components: mergedComponents }, children)));
144
228
  }
@@ -1,10 +1,13 @@
1
1
  /**
2
- * ModelSelector - Dropdown for switching models at runtime
2
+ * ModelSelector Popover + Command combobox for switching models at runtime.
3
3
  *
4
- * Opens upward from the trigger using fixed positioning
5
- * so it never affects the surrounding layout.
4
+ * Built on the same primitives as `AgentPicker` (Popover → Command), so the
5
+ * dropdown portals via `Floating` (never clips in the composer/iframe) and gets
6
+ * keyboard nav + search for free. Rows show the real provider logo from
7
+ * models.dev. Two trigger styles via `variant`: `pill` (logo + label + chevron)
8
+ * or `icon` (logo only, like Studio's desktop picker).
6
9
  *
7
- * Implements WAI-ARIA listbox pattern with full keyboard navigation.
10
+ * @module react/components/chat/model-selector
8
11
  */
9
12
  import * as React from "../../../../react/react.js";
10
13
  /** A "provider/model" value and its display label. */
@@ -13,7 +16,7 @@ export interface ModelOption {
13
16
  value: string;
14
17
  /** Display label (e.g. "GPT-4o") */
15
18
  label: string;
16
- /** Provider name for grouping (e.g. "openai") */
19
+ /** Provider name for grouping + logo (e.g. "openai") */
17
20
  provider?: string;
18
21
  /** Short description shown beneath the label */
19
22
  description?: string;
@@ -28,11 +31,130 @@ export interface ModelSelectorProps {
28
31
  value?: string;
29
32
  /** Called when user selects a model */
30
33
  onChange: (model: string) => void;
31
- /** Additional class names */
34
+ /** Additional class names for the trigger */
32
35
  className?: string;
33
36
  /** Disabled state */
34
37
  disabled?: boolean;
38
+ /**
39
+ * Trigger style: `pill` (logo + label + chevron) or `icon` (provider logo
40
+ * only, like Studio's desktop picker). @default "pill"
41
+ */
42
+ variant?: "pill" | "icon";
43
+ /**
44
+ * Custom trigger renderer. When provided, replaces the default pill/icon
45
+ * trigger. `model` is the currently-selected option (resolved from `value`);
46
+ * `open` is the popover open state. Rendered inside the existing
47
+ * `PopoverTrigger asChild`, so the returned element still toggles the popover.
48
+ */
49
+ renderTrigger?: (opts: {
50
+ model?: ModelOption;
51
+ open: boolean;
52
+ }) => React.ReactNode;
53
+ /**
54
+ * Custom row renderer. When provided, each option renders through it instead
55
+ * of the default `ModelRow`. Wire `onSelect` to trigger selection (which also
56
+ * closes the popover).
57
+ */
58
+ renderRow?: (opts: {
59
+ model: ModelOption;
60
+ selected: boolean;
61
+ onSelect: () => void;
62
+ }) => React.ReactNode;
63
+ /**
64
+ * Compose your own menu from `ModelSelector.Trigger` / `Content` / `List` /
65
+ * `Item`. When omitted, the default data-driven preset is rendered.
66
+ */
67
+ children?: React.ReactNode;
35
68
  }
36
- /** Render model selector. */
37
- export declare function ModelSelector({ models, value, onChange, className, disabled, }: ModelSelectorProps): React.ReactElement;
69
+ /** Shared selection + open state exposed to `ModelSelector.*` sub-parts. */
70
+ export interface ModelSelectorContextValue {
71
+ /** Selected model value ("provider/model"). */
72
+ value?: string;
73
+ /** The resolved selected option (from `value`, else the first model). */
74
+ selected?: ModelOption;
75
+ /** Select a model by value (also closes the menu). */
76
+ onSelect: (value: string) => void;
77
+ /** Popover open state. */
78
+ open: boolean;
79
+ /** Set the popover open state. */
80
+ setOpen: (open: boolean) => void;
81
+ /** Whether the selector is disabled. */
82
+ disabled?: boolean;
83
+ }
84
+ /**
85
+ * Read the enclosing `ModelSelector` selection + open state. Throws when used
86
+ * outside a `<ModelSelector>`.
87
+ */
88
+ export declare function useModelSelector(): ModelSelectorContextValue;
89
+ /** Props for `ModelSelector.Trigger` — the pill/icon combobox button. */
90
+ export interface ModelSelectorTriggerProps {
91
+ /** Trigger style. @default "pill" */
92
+ variant?: "pill" | "icon";
93
+ /** Override the trigger contents; defaults to the selected model. */
94
+ children?: React.ReactNode;
95
+ className?: string;
96
+ }
97
+ /** The pill (or icon) combobox trigger. Toggles the popover. */
98
+ declare function ModelSelectorTrigger({ variant, children, className }: ModelSelectorTriggerProps): React.ReactElement;
99
+ declare namespace ModelSelectorTrigger {
100
+ var displayName: string;
101
+ }
102
+ /** Props for `ModelSelector.Content` — the popover surface + `Command` shell. */
103
+ export interface ModelSelectorContentProps {
104
+ /** Show the search input above the list. */
105
+ showSearch?: boolean;
106
+ /** Search input placeholder. */
107
+ searchPlaceholder?: string;
108
+ children?: React.ReactNode;
109
+ className?: string;
110
+ }
111
+ /** The popover surface wrapping a `Command` (search + list region). */
112
+ declare function ModelSelectorContent({ showSearch, searchPlaceholder, children, className, }: ModelSelectorContentProps): React.ReactElement;
113
+ declare namespace ModelSelectorContent {
114
+ var displayName: string;
115
+ }
116
+ /** The scrollable `Command` list region. */
117
+ declare function ModelSelectorList({ children, className }: {
118
+ children?: React.ReactNode;
119
+ className?: string;
120
+ }): React.ReactElement;
121
+ declare namespace ModelSelectorList {
122
+ var displayName: string;
123
+ }
124
+ /** Props for `ModelSelector.Item` — a single selectable model row. */
125
+ export interface ModelSelectorItemProps {
126
+ /** The model this row represents. Its `value` is the selection value. */
127
+ model: ModelOption;
128
+ /** Force selected styling; defaults to matching the context `value`. */
129
+ selected?: boolean;
130
+ className?: string;
131
+ }
132
+ /** A single model row (provider logo + label + optional badge + check). */
133
+ declare function ModelSelectorItem({ model, selected, className }: ModelSelectorItemProps): React.ReactElement;
134
+ declare namespace ModelSelectorItem {
135
+ var displayName: string;
136
+ }
137
+ /**
138
+ * `ModelSelector.Root` — context provider + the popover shell. No children
139
+ * renders the default data-driven preset; pass children to recompose from
140
+ * `ModelSelector.Trigger` / `Content` / `List` / `Item`.
141
+ */
142
+ declare function ModelSelectorRoot({ models, value, onChange, className, disabled, variant, renderTrigger, renderRow, children, }: ModelSelectorProps): React.ReactElement;
143
+ declare namespace ModelSelectorRoot {
144
+ var displayName: string;
145
+ }
146
+ /**
147
+ * ModelSelector — render `<ModelSelector models={...} .../>` for the default
148
+ * data-driven combobox, or compose `ModelSelector.Trigger` / `Content` /
149
+ * `List` / `Item` for a custom menu. Mirrors the `ToolCall` compound: render
150
+ * it, or compose it.
151
+ */
152
+ export declare const ModelSelector: typeof ModelSelectorRoot & {
153
+ Root: typeof ModelSelectorRoot;
154
+ Trigger: typeof ModelSelectorTrigger;
155
+ Content: typeof ModelSelectorContent;
156
+ List: typeof ModelSelectorList;
157
+ Item: typeof ModelSelectorItem;
158
+ };
159
+ export {};
38
160
  //# sourceMappingURL=model-selector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-selector.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/model-selector.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAIpD,sDAAsD;AACtD,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,2CAA2C;AAC3C,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAgBD,6BAA6B;AAC7B,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,CAwMzC"}
1
+ {"version":3,"file":"model-selector.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/model-selector.tsx"],"names":[],"mappings":"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"}