veryfront 0.1.1048 → 0.1.1049

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 (513) hide show
  1. package/esm/cli/templates/manifest.js +3 -3
  2. package/esm/deno.d.ts +3 -0
  3. package/esm/deno.js +10 -6
  4. package/esm/src/agent/react/use-agent-metadata.js +1 -1
  5. package/esm/src/agent/react/use-agent.js +1 -1
  6. package/esm/src/agent/react/use-agents.js +1 -1
  7. package/esm/src/agent/react/use-chat/types.d.ts +0 -6
  8. package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
  9. package/esm/src/agent/react/use-chat/use-chat.d.ts +5 -0
  10. package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
  11. package/esm/src/agent/react/use-chat/use-chat.js +87 -34
  12. package/esm/src/agent/react/use-completion.js +1 -1
  13. package/esm/src/agent/react/use-streaming.js +1 -1
  14. package/esm/src/agent/react/use-voice-input.js +1 -1
  15. package/esm/src/cache/backends/api.d.ts.map +1 -1
  16. package/esm/src/cache/backends/api.js +10 -7
  17. package/esm/src/chat/index.d.ts +8 -15
  18. package/esm/src/chat/index.d.ts.map +1 -1
  19. package/esm/src/chat/index.js +7 -16
  20. package/esm/src/modules/component-registry/registry.d.ts +1 -1
  21. package/esm/src/modules/component-registry/registry.d.ts.map +1 -1
  22. package/esm/src/modules/react-loader/component-loader.d.ts +1 -1
  23. package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
  24. package/esm/src/modules/react-loader/extract-component.d.ts +1 -1
  25. package/esm/src/modules/react-loader/extract-component.d.ts.map +1 -1
  26. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts +1 -1
  27. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
  28. package/esm/src/modules/react-loader/types.d.ts +1 -1
  29. package/esm/src/modules/react-loader/types.d.ts.map +1 -1
  30. package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.d.ts +3 -1
  31. package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.d.ts.map +1 -1
  32. package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.js +2 -0
  33. package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts +4 -0
  34. package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts.map +1 -1
  35. package/esm/src/platform/adapters/fs/veryfront/request-context.js +1 -0
  36. package/esm/src/proxy/main.js +6 -5
  37. package/esm/src/proxy/retry.d.ts +14 -6
  38. package/esm/src/proxy/retry.d.ts.map +1 -1
  39. package/esm/src/proxy/retry.js +82 -20
  40. package/esm/src/react/compat/hooks-adapter.d.ts +1 -1
  41. package/esm/src/react/compat/hooks-adapter.d.ts.map +1 -1
  42. package/esm/src/react/compat/hooks-adapter.js +1 -1
  43. package/esm/src/react/compat/ssr-adapter/response-builder.d.ts +1 -1
  44. package/esm/src/react/compat/ssr-adapter/response-builder.d.ts.map +1 -1
  45. package/esm/src/react/compat/ssr-adapter/server-loader.d.ts +5 -5
  46. package/esm/src/react/compat/ssr-adapter/server-loader.d.ts.map +1 -1
  47. package/esm/src/react/compat/ssr-adapter/stream-renderer.d.ts +1 -1
  48. package/esm/src/react/compat/ssr-adapter/stream-renderer.d.ts.map +1 -1
  49. package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts +1 -1
  50. package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts.map +1 -1
  51. package/esm/src/react/compat/version-detector/feature-detector.js +1 -1
  52. package/esm/src/react/components/AppWrapper.d.ts +1 -1
  53. package/esm/src/react/components/AppWrapper.d.ts.map +1 -1
  54. package/esm/src/react/components/AppWrapper.js +1 -1
  55. package/esm/src/react/components/LayoutComponent.d.ts +1 -1
  56. package/esm/src/react/components/LayoutComponent.d.ts.map +1 -1
  57. package/esm/src/react/components/LayoutComponent.js +1 -1
  58. package/esm/src/react/components/MDXProvider.d.ts +1 -1
  59. package/esm/src/react/components/MDXProvider.d.ts.map +1 -1
  60. package/esm/src/react/components/MDXProvider.js +1 -1
  61. package/esm/src/react/components/ProviderComponent.d.ts +1 -1
  62. package/esm/src/react/components/ProviderComponent.d.ts.map +1 -1
  63. package/esm/src/react/components/ProviderComponent.js +1 -1
  64. package/esm/src/react/components/chat/agent-card.d.ts +15 -7
  65. package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
  66. package/esm/src/react/components/chat/agent-card.js +9 -10
  67. package/esm/src/react/components/chat/agent-picker-actions.d.ts +20 -0
  68. package/esm/src/react/components/chat/agent-picker-actions.d.ts.map +1 -0
  69. package/esm/src/react/components/chat/agent-picker-actions.js +24 -0
  70. package/esm/src/react/components/chat/agent-picker-context.d.ts +19 -0
  71. package/esm/src/react/components/chat/agent-picker-context.d.ts.map +1 -0
  72. package/esm/src/react/components/chat/agent-picker-context.js +13 -0
  73. package/esm/src/react/components/chat/agent-picker.d.ts +35 -42
  74. package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -1
  75. package/esm/src/react/components/chat/agent-picker.js +59 -50
  76. package/esm/src/react/components/chat/chat/app-mode-chat.d.ts +14 -0
  77. package/esm/src/react/components/chat/chat/app-mode-chat.d.ts.map +1 -0
  78. package/esm/src/react/components/chat/chat/app-mode-chat.js +137 -0
  79. package/esm/src/react/components/chat/chat/chat-attachments.d.ts +7 -0
  80. package/esm/src/react/components/chat/chat/chat-attachments.d.ts.map +1 -0
  81. package/esm/src/react/components/chat/chat/chat-attachments.js +16 -0
  82. package/esm/src/react/components/chat/chat/chat-component.d.ts +21 -0
  83. package/esm/src/react/components/chat/chat/chat-component.d.ts.map +1 -0
  84. package/esm/src/react/components/chat/chat/chat-component.js +1 -0
  85. package/esm/src/react/components/chat/chat/chat-props.d.ts +114 -0
  86. package/esm/src/react/components/chat/chat/chat-props.d.ts.map +1 -0
  87. package/esm/src/react/components/chat/chat/chat-props.js +1 -0
  88. package/esm/src/react/components/chat/chat/components/animations.d.ts +1 -1
  89. package/esm/src/react/components/chat/chat/components/animations.d.ts.map +1 -1
  90. package/esm/src/react/components/chat/chat/components/animations.js +1 -1
  91. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +18 -18
  92. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
  93. package/esm/src/react/components/chat/chat/components/attachment-pill.js +11 -15
  94. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +14 -3
  95. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -1
  96. package/esm/src/react/components/chat/chat/components/attachments-panel.js +3 -3
  97. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +44 -14
  98. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
  99. package/esm/src/react/components/chat/chat/components/branch-picker.js +55 -12
  100. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +1 -1
  101. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -1
  102. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +1 -1
  103. package/esm/src/react/components/chat/chat/components/code-block.d.ts +7 -2
  104. package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
  105. package/esm/src/react/components/chat/chat/components/code-block.js +3 -3
  106. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +1 -1
  107. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
  108. package/esm/src/react/components/chat/chat/components/drop-zone.js +1 -1
  109. package/esm/src/react/components/chat/chat/components/empty-state.d.ts +1 -1
  110. package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
  111. package/esm/src/react/components/chat/chat/components/empty-state.js +1 -1
  112. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +1 -1
  113. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
  114. package/esm/src/react/components/chat/chat/components/inference-badge.js +1 -1
  115. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +33 -10
  116. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
  117. package/esm/src/react/components/chat/chat/components/inline-citation.js +145 -51
  118. package/esm/src/react/components/chat/chat/components/message-actions.d.ts +49 -20
  119. package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
  120. package/esm/src/react/components/chat/chat/components/message-actions.js +72 -18
  121. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +1 -1
  122. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
  123. package/esm/src/react/components/chat/chat/components/message-edit-form.js +1 -1
  124. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +34 -14
  125. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
  126. package/esm/src/react/components/chat/chat/components/message-feedback.js +54 -15
  127. package/esm/src/react/components/chat/chat/components/quick-actions.d.ts +1 -1
  128. package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
  129. package/esm/src/react/components/chat/chat/components/quick-actions.js +1 -1
  130. package/esm/src/react/components/chat/chat/components/reasoning.d.ts +14 -6
  131. package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
  132. package/esm/src/react/components/chat/chat/components/reasoning.js +3 -5
  133. package/esm/src/react/components/chat/chat/components/sidebar.d.ts +70 -16
  134. package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
  135. package/esm/src/react/components/chat/chat/components/sidebar.js +72 -23
  136. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +1 -1
  137. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
  138. package/esm/src/react/components/chat/chat/components/skill-badge.js +1 -1
  139. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +1 -1
  140. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -1
  141. package/esm/src/react/components/chat/chat/components/skill-tool.js +1 -1
  142. package/esm/src/react/components/chat/chat/components/sources.d.ts +25 -15
  143. package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
  144. package/esm/src/react/components/chat/chat/components/sources.js +7 -7
  145. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +14 -3
  146. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
  147. package/esm/src/react/components/chat/chat/components/step-indicator.js +3 -3
  148. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +1 -1
  149. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
  150. package/esm/src/react/components/chat/chat/components/tab-switcher.js +1 -1
  151. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +16 -9
  152. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
  153. package/esm/src/react/components/chat/chat/components/tool-ui.js +10 -14
  154. package/esm/src/react/components/chat/chat/composition/agent-avatar.d.ts +1 -1
  155. package/esm/src/react/components/chat/chat/composition/agent-avatar.d.ts.map +1 -1
  156. package/esm/src/react/components/chat/chat/composition/agent-avatar.js +1 -1
  157. package/esm/src/react/components/chat/chat/composition/api.d.ts +3 -3
  158. package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
  159. package/esm/src/react/components/chat/chat/composition/api.js +2 -2
  160. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +72 -29
  161. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
  162. package/esm/src/react/components/chat/chat/composition/chat-composer.js +92 -82
  163. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +1 -1
  164. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -1
  165. package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +1 -1
  166. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +7 -2
  167. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
  168. package/esm/src/react/components/chat/chat/composition/chat-empty.js +3 -3
  169. package/esm/src/react/components/chat/chat/composition/chat-if.d.ts +1 -1
  170. package/esm/src/react/components/chat/chat/composition/chat-if.d.ts.map +1 -1
  171. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +25 -11
  172. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
  173. package/esm/src/react/components/chat/chat/composition/chat-message-list.js +67 -29
  174. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +7 -3
  175. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
  176. package/esm/src/react/components/chat/chat/composition/chat-root.js +3 -5
  177. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +7 -2
  178. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
  179. package/esm/src/react/components/chat/chat/composition/error-banner.js +3 -3
  180. package/esm/src/react/components/chat/chat/composition/message.d.ts +85 -34
  181. package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
  182. package/esm/src/react/components/chat/chat/composition/message.js +146 -122
  183. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +1 -1
  184. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
  185. package/esm/src/react/components/chat/chat/composition/model-avatar.js +1 -1
  186. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +1 -1
  187. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -1
  188. package/esm/src/react/components/chat/chat/composition/pending-message.js +1 -1
  189. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +2 -3
  190. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
  191. package/esm/src/react/components/chat/chat/contexts/chat-context.js +1 -1
  192. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +2 -2
  193. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
  194. package/esm/src/react/components/chat/chat/contexts/composer-context.js +1 -1
  195. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +2 -2
  196. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -1
  197. package/esm/src/react/components/chat/chat/contexts/conversations-context.js +1 -1
  198. package/esm/src/react/components/chat/chat/contexts/index.d.ts +1 -1
  199. package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -1
  200. package/esm/src/react/components/chat/chat/contexts/index.js +1 -1
  201. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +15 -2
  202. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
  203. package/esm/src/react/components/chat/chat/contexts/message-context.js +11 -1
  204. package/esm/src/react/components/chat/chat/controlled-chat.d.ts +15 -0
  205. package/esm/src/react/components/chat/chat/controlled-chat.d.ts.map +1 -0
  206. package/esm/src/react/components/chat/chat/controlled-chat.js +97 -0
  207. package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +1 -1
  208. package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts +54 -0
  209. package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts.map +1 -0
  210. package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.js +179 -0
  211. package/esm/src/react/components/chat/chat/hooks/use-conversation.js +1 -1
  212. package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -1
  213. package/esm/src/react/components/chat/chat/hooks/use-conversations.js +3 -6
  214. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +8 -5
  215. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -1
  216. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +6 -6
  217. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +1 -1
  218. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -1
  219. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +1 -1
  220. package/esm/src/react/components/chat/chat/hooks/use-upload.js +1 -1
  221. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +1 -1
  222. package/esm/src/react/components/chat/chat/index.d.ts +13 -230
  223. package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
  224. package/esm/src/react/components/chat/chat/index.js +27 -383
  225. package/esm/src/react/components/chat/chat-actions.d.ts +1 -1
  226. package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -1
  227. package/esm/src/react/components/chat/chat-actions.js +1 -1
  228. package/esm/src/react/components/chat/chat-agent-picker.d.ts +1 -1
  229. package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -1
  230. package/esm/src/react/components/chat/chat-agent-picker.js +1 -1
  231. package/esm/src/react/components/chat/chat-theme-scope.d.ts +1 -1
  232. package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -1
  233. package/esm/src/react/components/chat/chat-theme-scope.js +1 -1
  234. package/esm/src/react/components/chat/chat.d.ts +6 -6
  235. package/esm/src/react/components/chat/chat.d.ts.map +1 -1
  236. package/esm/src/react/components/chat/chat.js +4 -4
  237. package/esm/src/react/components/chat/error-boundary.d.ts +1 -1
  238. package/esm/src/react/components/chat/error-boundary.d.ts.map +1 -1
  239. package/esm/src/react/components/chat/error-boundary.js +1 -1
  240. package/esm/src/react/components/chat/markdown.d.ts +3 -5
  241. package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
  242. package/esm/src/react/components/chat/markdown.js +4 -72
  243. package/esm/src/react/components/chat/model-selector.d.ts +21 -27
  244. package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
  245. package/esm/src/react/components/chat/model-selector.js +26 -31
  246. package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts +1 -1
  247. package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts.map +1 -1
  248. package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.js +1 -1
  249. package/esm/src/react/components/optimized-image/OptimizedImage.d.ts +1 -1
  250. package/esm/src/react/components/optimized-image/OptimizedImage.d.ts.map +1 -1
  251. package/esm/src/react/components/optimized-image/OptimizedImage.js +1 -1
  252. package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts +1 -1
  253. package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts.map +1 -1
  254. package/esm/src/react/components/optimized-image/utils.d.ts +1 -1
  255. package/esm/src/react/components/optimized-image/utils.d.ts.map +1 -1
  256. package/esm/src/react/components/optimized-image/utils.js +1 -1
  257. package/esm/src/react/components/ui/alert.d.ts +1 -1
  258. package/esm/src/react/components/ui/alert.d.ts.map +1 -1
  259. package/esm/src/react/components/ui/alert.js +1 -1
  260. package/esm/src/react/components/ui/app-shell.d.ts +1 -1
  261. package/esm/src/react/components/ui/app-shell.d.ts.map +1 -1
  262. package/esm/src/react/components/ui/app-shell.js +1 -1
  263. package/esm/src/react/components/ui/avatar.d.ts +1 -1
  264. package/esm/src/react/components/ui/avatar.d.ts.map +1 -1
  265. package/esm/src/react/components/ui/avatar.js +1 -1
  266. package/esm/src/react/components/ui/badge.d.ts +1 -1
  267. package/esm/src/react/components/ui/badge.d.ts.map +1 -1
  268. package/esm/src/react/components/ui/badge.js +1 -1
  269. package/esm/src/react/components/ui/button.d.ts +1 -1
  270. package/esm/src/react/components/ui/button.d.ts.map +1 -1
  271. package/esm/src/react/components/ui/button.js +1 -1
  272. package/esm/src/react/components/ui/card.d.ts +1 -1
  273. package/esm/src/react/components/ui/card.d.ts.map +1 -1
  274. package/esm/src/react/components/ui/card.js +1 -1
  275. package/esm/src/react/components/ui/checkbox.d.ts +1 -1
  276. package/esm/src/react/components/ui/checkbox.d.ts.map +1 -1
  277. package/esm/src/react/components/ui/checkbox.js +1 -1
  278. package/esm/src/react/components/ui/code-block.d.ts +1 -1
  279. package/esm/src/react/components/ui/code-block.d.ts.map +1 -1
  280. package/esm/src/react/components/ui/code-block.js +1 -1
  281. package/esm/src/react/components/ui/collapsible.d.ts +1 -1
  282. package/esm/src/react/components/ui/collapsible.d.ts.map +1 -1
  283. package/esm/src/react/components/ui/collapsible.js +1 -1
  284. package/esm/src/react/components/ui/color-mode.d.ts +2 -2
  285. package/esm/src/react/components/ui/color-mode.d.ts.map +1 -1
  286. package/esm/src/react/components/ui/color-mode.js +1 -1
  287. package/esm/src/react/components/ui/command.d.ts +1 -1
  288. package/esm/src/react/components/ui/command.d.ts.map +1 -1
  289. package/esm/src/react/components/ui/command.js +1 -1
  290. package/esm/src/react/components/ui/dialog.d.ts +1 -1
  291. package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
  292. package/esm/src/react/components/ui/dialog.js +1 -1
  293. package/esm/src/react/components/ui/drawer.d.ts +1 -1
  294. package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
  295. package/esm/src/react/components/ui/drawer.js +1 -1
  296. package/esm/src/react/components/ui/dropdown-menu.d.ts +1 -1
  297. package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
  298. package/esm/src/react/components/ui/dropdown-menu.js +1 -1
  299. package/esm/src/react/components/ui/file-type.d.ts +1 -1
  300. package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
  301. package/esm/src/react/components/ui/file-type.js +1 -1
  302. package/esm/src/react/components/ui/floating.d.ts +1 -1
  303. package/esm/src/react/components/ui/floating.d.ts.map +1 -1
  304. package/esm/src/react/components/ui/floating.js +2 -2
  305. package/esm/src/react/components/ui/icon-button.d.ts +1 -1
  306. package/esm/src/react/components/ui/icon-button.d.ts.map +1 -1
  307. package/esm/src/react/components/ui/icon-button.js +1 -1
  308. package/esm/src/react/components/ui/icons/index.d.ts +1 -1
  309. package/esm/src/react/components/ui/icons/index.d.ts.map +1 -1
  310. package/esm/src/react/components/ui/icons/index.js +1 -1
  311. package/esm/src/react/components/ui/input.d.ts +1 -1
  312. package/esm/src/react/components/ui/input.d.ts.map +1 -1
  313. package/esm/src/react/components/ui/input.js +1 -1
  314. package/esm/src/react/components/ui/label.d.ts +1 -1
  315. package/esm/src/react/components/ui/label.d.ts.map +1 -1
  316. package/esm/src/react/components/ui/label.js +1 -1
  317. package/esm/src/react/components/ui/list.d.ts +1 -1
  318. package/esm/src/react/components/ui/list.d.ts.map +1 -1
  319. package/esm/src/react/components/ui/list.js +1 -1
  320. package/esm/src/react/components/ui/pill.d.ts +1 -1
  321. package/esm/src/react/components/ui/pill.d.ts.map +1 -1
  322. package/esm/src/react/components/ui/pill.js +1 -1
  323. package/esm/src/react/components/ui/popover.d.ts +1 -1
  324. package/esm/src/react/components/ui/popover.d.ts.map +1 -1
  325. package/esm/src/react/components/ui/popover.js +1 -1
  326. package/esm/src/react/components/ui/progress-bar.d.ts +1 -1
  327. package/esm/src/react/components/ui/progress-bar.d.ts.map +1 -1
  328. package/esm/src/react/components/ui/progress-bar.js +1 -1
  329. package/esm/src/react/components/ui/radio.d.ts +1 -1
  330. package/esm/src/react/components/ui/radio.d.ts.map +1 -1
  331. package/esm/src/react/components/ui/radio.js +1 -1
  332. package/esm/src/react/components/ui/scroll-fade.d.ts +1 -1
  333. package/esm/src/react/components/ui/scroll-fade.d.ts.map +1 -1
  334. package/esm/src/react/components/ui/scroll-fade.js +1 -1
  335. package/esm/src/react/components/ui/select.d.ts +1 -1
  336. package/esm/src/react/components/ui/select.d.ts.map +1 -1
  337. package/esm/src/react/components/ui/select.js +1 -1
  338. package/esm/src/react/components/ui/shimmer.d.ts +1 -1
  339. package/esm/src/react/components/ui/shimmer.d.ts.map +1 -1
  340. package/esm/src/react/components/ui/shimmer.js +1 -1
  341. package/esm/src/react/components/ui/skeleton.d.ts +1 -1
  342. package/esm/src/react/components/ui/skeleton.d.ts.map +1 -1
  343. package/esm/src/react/components/ui/skeleton.js +1 -1
  344. package/esm/src/react/components/ui/slot.d.ts +1 -1
  345. package/esm/src/react/components/ui/slot.d.ts.map +1 -1
  346. package/esm/src/react/components/ui/slot.js +1 -1
  347. package/esm/src/react/components/ui/status.d.ts +1 -1
  348. package/esm/src/react/components/ui/status.d.ts.map +1 -1
  349. package/esm/src/react/components/ui/status.js +1 -1
  350. package/esm/src/react/components/ui/switch.d.ts +1 -1
  351. package/esm/src/react/components/ui/switch.d.ts.map +1 -1
  352. package/esm/src/react/components/ui/switch.js +1 -1
  353. package/esm/src/react/components/ui/tabs.d.ts +3 -3
  354. package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
  355. package/esm/src/react/components/ui/tabs.js +1 -1
  356. package/esm/src/react/components/ui/tag.d.ts +1 -1
  357. package/esm/src/react/components/ui/tag.d.ts.map +1 -1
  358. package/esm/src/react/components/ui/tag.js +1 -1
  359. package/esm/src/react/components/ui/textarea.d.ts +1 -1
  360. package/esm/src/react/components/ui/textarea.d.ts.map +1 -1
  361. package/esm/src/react/components/ui/textarea.js +1 -1
  362. package/esm/src/react/components/ui/tokens.d.ts +1 -1
  363. package/esm/src/react/components/ui/tokens.d.ts.map +1 -1
  364. package/esm/src/react/components/ui/tokens.js +1 -1
  365. package/esm/src/react/components/ui/tooltip.d.ts +1 -1
  366. package/esm/src/react/components/ui/tooltip.d.ts.map +1 -1
  367. package/esm/src/react/components/ui/tooltip.js +2 -2
  368. package/esm/src/react/fonts/index.d.ts +1 -1
  369. package/esm/src/react/fonts/index.d.ts.map +1 -1
  370. package/esm/src/react/fonts/index.js +1 -1
  371. package/esm/src/react/primitives/agent-primitives.d.ts +4 -4
  372. package/esm/src/react/primitives/agent-primitives.d.ts.map +1 -1
  373. package/esm/src/react/primitives/agent-primitives.js +1 -1
  374. package/esm/src/react/primitives/chat-container.d.ts +2 -2
  375. package/esm/src/react/primitives/chat-container.d.ts.map +1 -1
  376. package/esm/src/react/primitives/chat-container.js +1 -1
  377. package/esm/src/react/primitives/input-box.d.ts +4 -4
  378. package/esm/src/react/primitives/input-box.d.ts.map +1 -1
  379. package/esm/src/react/primitives/input-box.js +1 -1
  380. package/esm/src/react/primitives/message-list.d.ts +5 -5
  381. package/esm/src/react/primitives/message-list.d.ts.map +1 -1
  382. package/esm/src/react/primitives/message-list.js +1 -1
  383. package/esm/src/react/primitives/tool-primitives.d.ts +4 -4
  384. package/esm/src/react/primitives/tool-primitives.d.ts.map +1 -1
  385. package/esm/src/react/primitives/tool-primitives.js +1 -1
  386. package/esm/src/react/runtime/core.d.ts +1 -1
  387. package/esm/src/react/runtime/core.d.ts.map +1 -1
  388. package/esm/src/react/runtime/core.js +1 -1
  389. package/esm/src/rendering/app-reserved.d.ts +1 -1
  390. package/esm/src/rendering/app-reserved.d.ts.map +1 -1
  391. package/esm/src/rendering/app-reserved.js +1 -1
  392. package/esm/src/rendering/component-handling.d.ts +1 -1
  393. package/esm/src/rendering/component-handling.d.ts.map +1 -1
  394. package/esm/src/rendering/element-validator/element-normalizer.d.ts +1 -1
  395. package/esm/src/rendering/element-validator/element-normalizer.d.ts.map +1 -1
  396. package/esm/src/rendering/element-validator/element-normalizer.js +1 -1
  397. package/esm/src/rendering/element-validator/primitive-checks.d.ts +1 -1
  398. package/esm/src/rendering/element-validator/primitive-checks.d.ts.map +1 -1
  399. package/esm/src/rendering/element-validator/primitive-checks.js +1 -1
  400. package/esm/src/rendering/element-validator/validator-core.d.ts +1 -1
  401. package/esm/src/rendering/element-validator/validator-core.d.ts.map +1 -1
  402. package/esm/src/rendering/layouts/layout-applicator.d.ts +1 -1
  403. package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
  404. package/esm/src/rendering/layouts/utils/applicator.d.ts +1 -1
  405. package/esm/src/rendering/layouts/utils/applicator.d.ts.map +1 -1
  406. package/esm/src/rendering/layouts/utils/component-loader.d.ts +1 -1
  407. package/esm/src/rendering/layouts/utils/component-loader.d.ts.map +1 -1
  408. package/esm/src/rendering/layouts/utils/ensure-valid-child.d.ts +1 -1
  409. package/esm/src/rendering/layouts/utils/ensure-valid-child.d.ts.map +1 -1
  410. package/esm/src/rendering/orchestrator/layout.d.ts +1 -1
  411. package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
  412. package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts +1 -1
  413. package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts.map +1 -1
  414. package/esm/src/rendering/page-renderer.d.ts +1 -1
  415. package/esm/src/rendering/page-renderer.d.ts.map +1 -1
  416. package/esm/src/rendering/page-rendering.d.ts +1 -1
  417. package/esm/src/rendering/page-rendering.d.ts.map +1 -1
  418. package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts +1 -1
  419. package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts.map +1 -1
  420. package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts +1 -1
  421. package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts.map +1 -1
  422. package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts +1 -1
  423. package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts.map +1 -1
  424. package/esm/src/rendering/rsc/server-renderer/tree-processor.js +1 -1
  425. package/esm/src/rendering/snippet-renderer.js +2 -2
  426. package/esm/src/rendering/ssr/component-registry.d.ts +1 -1
  427. package/esm/src/rendering/ssr/component-registry.d.ts.map +1 -1
  428. package/esm/src/rendering/ssr/component-registry.js +1 -1
  429. package/esm/src/rendering/ssr/mdx-renderer.d.ts +1 -1
  430. package/esm/src/rendering/ssr/mdx-renderer.d.ts.map +1 -1
  431. package/esm/src/rendering/ssr/mdx-renderer.js +1 -1
  432. package/esm/src/rendering/ssr/types.d.ts +1 -1
  433. package/esm/src/rendering/ssr/types.d.ts.map +1 -1
  434. package/esm/src/rendering/ssr-renderer.d.ts +1 -1
  435. package/esm/src/rendering/ssr-renderer.d.ts.map +1 -1
  436. package/esm/src/rendering/utils/react-helpers.d.ts +1 -1
  437. package/esm/src/rendering/utils/react-helpers.d.ts.map +1 -1
  438. package/esm/src/rendering/utils/react-helpers.js +1 -1
  439. package/esm/src/security/http/base-handler.d.ts +2 -0
  440. package/esm/src/security/http/base-handler.d.ts.map +1 -1
  441. package/esm/src/security/http/base-handler.js +1 -0
  442. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  443. package/esm/src/server/handlers/dev/framework-candidates.generated.js +841 -596
  444. package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
  445. package/esm/src/server/handlers/request/agent-stream.handler.js +4 -1
  446. package/esm/src/transforms/mdx/esm-module-loader/components/resolver.d.ts +1 -1
  447. package/esm/src/transforms/mdx/esm-module-loader/components/resolver.d.ts.map +1 -1
  448. package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.js +1 -1
  449. package/esm/src/transforms/mdx/index.d.ts +1 -1
  450. package/esm/src/transforms/mdx/index.d.ts.map +1 -1
  451. package/esm/src/transforms/mdx/index.js +1 -1
  452. package/esm/src/transforms/mdx/mdx-cache-adapter.js +1 -1
  453. package/esm/src/transforms/mdx/module-loader/types.d.ts +1 -1
  454. package/esm/src/transforms/mdx/module-loader/types.d.ts.map +1 -1
  455. package/esm/src/transforms/mdx/types.d.ts +2 -2
  456. package/esm/src/transforms/mdx/types.d.ts.map +1 -1
  457. package/esm/src/types/app.d.ts +1 -1
  458. package/esm/src/types/app.d.ts.map +1 -1
  459. package/esm/src/types/global-guards.d.ts +1 -1
  460. package/esm/src/types/global-guards.d.ts.map +1 -1
  461. package/esm/src/types/index.d.ts +1 -1
  462. package/esm/src/types/index.d.ts.map +1 -1
  463. package/esm/src/utils/id.d.ts +7 -0
  464. package/esm/src/utils/id.d.ts.map +1 -1
  465. package/esm/src/utils/id.js +22 -0
  466. package/esm/src/utils/version-constant.d.ts +1 -1
  467. package/esm/src/utils/version-constant.js +1 -1
  468. package/esm/src/workflow/claude-code/react/use-claude-code-stream.js +1 -1
  469. package/esm/src/workflow/claude-code/react/use-claude-code-websocket.js +1 -1
  470. package/esm/src/workflow/react/use-approval.js +1 -1
  471. package/esm/src/workflow/react/use-workflow-list.js +1 -1
  472. package/esm/src/workflow/react/use-workflow-start.js +1 -1
  473. package/esm/src/workflow/react/use-workflow.js +1 -1
  474. package/package.json +4 -5
  475. package/esm/deps/esm.sh/react-dom@19.2.4/client.d.ts +0 -3
  476. package/esm/deps/esm.sh/react-dom@19.2.4/client.d.ts.map +0 -1
  477. package/esm/deps/esm.sh/react-dom@19.2.4/client.js +0 -3
  478. package/esm/deps/esm.sh/react-dom@19.2.4/server.d.ts +0 -3
  479. package/esm/deps/esm.sh/react-dom@19.2.4/server.d.ts.map +0 -1
  480. package/esm/deps/esm.sh/react-dom@19.2.4/server.js +0 -3
  481. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +0 -3
  482. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +0 -1
  483. package/esm/deps/esm.sh/react-dom@19.2.4.js +0 -3
  484. package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.d.ts +0 -3
  485. package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.d.ts.map +0 -1
  486. package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.js +0 -3
  487. package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.d.ts +0 -3
  488. package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.d.ts.map +0 -1
  489. package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.js +0 -3
  490. package/esm/deps/esm.sh/react@19.2.4.d.ts +0 -3
  491. package/esm/deps/esm.sh/react@19.2.4.d.ts.map +0 -1
  492. package/esm/deps/esm.sh/react@19.2.4.js +0 -3
  493. package/esm/deps/esm.sh/scheduler@^0.27.0.d.ts +0 -3
  494. package/esm/deps/esm.sh/scheduler@^0.27.0.d.ts.map +0 -1
  495. package/esm/deps/esm.sh/scheduler@^0.27.0.js +0 -3
  496. package/esm/react/jsx-dev-runtime.d.ts +0 -2
  497. package/esm/react/jsx-dev-runtime.d.ts.map +0 -1
  498. package/esm/react/jsx-dev-runtime.js +0 -1
  499. package/esm/react/jsx-runtime.d.ts +0 -2
  500. package/esm/react/jsx-runtime.d.ts.map +0 -1
  501. package/esm/react/jsx-runtime.js +0 -1
  502. package/esm/react/react-dom-client.d.ts +0 -3
  503. package/esm/react/react-dom-client.d.ts.map +0 -1
  504. package/esm/react/react-dom-client.js +0 -2
  505. package/esm/react/react-dom-server.d.ts +0 -3
  506. package/esm/react/react-dom-server.d.ts.map +0 -1
  507. package/esm/react/react-dom-server.js +0 -2
  508. package/esm/react/react-dom.d.ts +0 -3
  509. package/esm/react/react-dom.d.ts.map +0 -1
  510. package/esm/react/react-dom.js +0 -2
  511. package/esm/react/react.d.ts +0 -6
  512. package/esm/react/react.d.ts.map +0 -1
  513. package/esm/react/react.js +0 -7
@@ -1,23 +1,43 @@
1
- import * as React from "../../../../../../react/react.js";
1
+ import * as React from "react";
2
2
  /** Public API contract for feedback value. */
3
3
  export type FeedbackValue = "positive" | "negative";
4
- /**
5
- * Icon overrides for {@link MessageFeedback}. Each defaults to the built-in
6
- * thumbs glyph.
7
- */
8
- export interface MessageFeedbackIcons {
9
- positive?: React.ReactNode;
10
- negative?: React.ReactNode;
11
- }
12
4
  /** Props accepted by message feedback. */
13
- export interface MessageFeedbackProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onClick" | "className"> {
5
+ export interface MessageFeedbackProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "className" | "onClick"> {
14
6
  messageId: string;
15
7
  feedback?: FeedbackValue | null;
16
8
  onFeedback: (messageId: string, feedback: FeedbackValue) => void;
9
+ /** Compose the controls. The default renders positive and negative actions. */
10
+ children?: React.ReactNode;
11
+ className?: string;
12
+ /** React 19: ref is a regular prop. */
13
+ ref?: React.Ref<HTMLDivElement>;
14
+ }
15
+ /** Props shared by `MessageFeedback.Positive` and `MessageFeedback.Negative`. */
16
+ export interface MessageFeedbackActionProps {
17
+ /** Override the feedback glyph. */
18
+ icon?: React.ReactNode;
17
19
  className?: string;
18
- /** Override either of the thumbs icons. */
19
- icons?: MessageFeedbackIcons;
20
20
  }
21
- /** Render message feedback. */
22
- export declare const MessageFeedback: React.ForwardRefExoticComponent<MessageFeedbackProps & React.RefAttributes<HTMLDivElement>>;
21
+ /** Positive feedback action. */
22
+ declare function MessageFeedbackPositive({ icon, className, }: MessageFeedbackActionProps): React.ReactElement;
23
+ declare namespace MessageFeedbackPositive {
24
+ var displayName: string;
25
+ }
26
+ /** Negative feedback action. */
27
+ declare function MessageFeedbackNegative({ icon, className, }: MessageFeedbackActionProps): React.ReactElement;
28
+ declare namespace MessageFeedbackNegative {
29
+ var displayName: string;
30
+ }
31
+ /** Render the feedback default or compose its addressable actions. */
32
+ declare function MessageFeedbackRoot({ messageId, feedback, onFeedback, children, className, ref, ...props }: MessageFeedbackProps): React.ReactElement;
33
+ declare namespace MessageFeedbackRoot {
34
+ var displayName: string;
35
+ }
36
+ /** Message feedback with addressable positive and negative action leaves. */
37
+ export declare const MessageFeedback: typeof MessageFeedbackRoot & {
38
+ Root: typeof MessageFeedbackRoot;
39
+ Positive: typeof MessageFeedbackPositive;
40
+ Negative: typeof MessageFeedbackNegative;
41
+ };
42
+ export {};
23
43
  //# sourceMappingURL=message-feedback.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message-feedback.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/message-feedback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,0CAA0C;AAC1C,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B;AAKD,+BAA+B;AAC/B,eAAO,MAAM,eAAe,6FAkE3B,CAAC"}
1
+ {"version":3,"file":"message-feedback.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/message-feedback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,CAAC;AAEpD,0CAA0C;AAC1C,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACjE,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,iFAAiF;AACjF,MAAM,WAAW,0BAA0B;IACzC,mCAAmC;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2DD,gCAAgC;AAChC,iBAAS,uBAAuB,CAAC,EAC/B,IAAI,EACJ,SAAS,GACV,EAAE,0BAA0B,GAAG,KAAK,CAAC,YAAY,CAoBjD;kBAvBQ,uBAAuB;;;AA0BhC,gCAAgC;AAChC,iBAAS,uBAAuB,CAAC,EAC/B,IAAI,EACJ,SAAS,GACV,EAAE,0BAA0B,GAAG,KAAK,CAAC,YAAY,CAoBjD;kBAvBQ,uBAAuB;;;AA0BhC,sEAAsE;AACtE,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAqB3C;kBA7BQ,mBAAmB;;;AAgC5B,6EAA6E;AAC7E,eAAO,MAAM,eAAe;;;;CAI1B,CAAC"}
@@ -1,18 +1,57 @@
1
- import * as React from "../../../../../../react/react.js";
1
+ import * as React from "react";
2
+ import { COMPONENT_ERROR } from "../../../../../errors/error-registry.js";
2
3
  import { cn } from "../../theme.js";
4
+ const MessageFeedbackContext = React.createContext(null);
5
+ function useMessageFeedback() {
6
+ const context = React.useContext(MessageFeedbackContext);
7
+ if (!context) {
8
+ throw COMPONENT_ERROR.create({
9
+ detail: "MessageFeedback.* must be used within <MessageFeedback>",
10
+ });
11
+ }
12
+ return context;
13
+ }
3
14
  const BUTTON_BASE = "inline-flex items-center justify-center size-7 rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--background)]";
4
- /** Render message feedback. */
5
- export const MessageFeedback = React.forwardRef(function MessageFeedback({ messageId, feedback, onFeedback, className, icons, ...props }, ref) {
6
- return (React.createElement("div", { ref: ref, ...props, className: cn("flex items-center gap-1", className) },
7
- React.createElement("button", { type: "button", onClick: () => onFeedback(messageId, "positive"), className: cn(BUTTON_BASE, feedback === "positive"
8
- ? "text-emerald-500 bg-emerald-500/10"
9
- : "text-[var(--faint)] hover:bg-[var(--tertiary)] hover:text-emerald-500"), title: "Helpful" }, icons?.positive ?? (React.createElement("svg", { className: "size-3.5", viewBox: "0 0 24 24", fill: feedback === "positive" ? "currentColor" : "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
10
- React.createElement("path", { d: "M7 10v12" }),
11
- React.createElement("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z" })))),
12
- React.createElement("button", { type: "button", onClick: () => onFeedback(messageId, "negative"), className: cn(BUTTON_BASE, feedback === "negative"
13
- ? "text-red-500 bg-red-500/10"
14
- : "text-[var(--faint)] hover:bg-[var(--tertiary)] hover:text-[var(--destructive)]"), title: "Not helpful" }, icons?.negative ?? (React.createElement("svg", { className: "size-3.5", viewBox: "0 0 24 24", fill: feedback === "negative" ? "currentColor" : "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
15
- React.createElement("path", { d: "M17 14V2" }),
16
- React.createElement("path", { d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z" }))))));
15
+ function PositiveIcon({ active }) {
16
+ return (React.createElement("svg", { "aria-hidden": "true", className: "size-3.5", viewBox: "0 0 24 24", fill: active ? "currentColor" : "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
17
+ React.createElement("path", { d: "M7 10v12" }),
18
+ React.createElement("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z" })));
19
+ }
20
+ function NegativeIcon({ active }) {
21
+ return (React.createElement("svg", { "aria-hidden": "true", className: "size-3.5", viewBox: "0 0 24 24", fill: active ? "currentColor" : "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
22
+ React.createElement("path", { d: "M17 14V2" }),
23
+ React.createElement("path", { d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z" })));
24
+ }
25
+ /** Positive feedback action. */
26
+ function MessageFeedbackPositive({ icon, className, }) {
27
+ const { messageId, feedback, onFeedback } = useMessageFeedback();
28
+ const active = feedback === "positive";
29
+ return (React.createElement("button", { type: "button", onClick: () => onFeedback(messageId, "positive"), className: cn(BUTTON_BASE, active
30
+ ? "text-emerald-500 bg-emerald-500/10"
31
+ : "text-[var(--faint)] hover:bg-[var(--tertiary)] hover:text-emerald-500", className), title: "Helpful", "aria-label": "Helpful" }, icon ?? React.createElement(PositiveIcon, { active: active })));
32
+ }
33
+ MessageFeedbackPositive.displayName = "MessageFeedback.Positive";
34
+ /** Negative feedback action. */
35
+ function MessageFeedbackNegative({ icon, className, }) {
36
+ const { messageId, feedback, onFeedback } = useMessageFeedback();
37
+ const active = feedback === "negative";
38
+ return (React.createElement("button", { type: "button", onClick: () => onFeedback(messageId, "negative"), className: cn(BUTTON_BASE, active
39
+ ? "text-red-500 bg-red-500/10"
40
+ : "text-[var(--faint)] hover:bg-[var(--tertiary)] hover:text-[var(--destructive)]", className), title: "Not helpful", "aria-label": "Not helpful" }, icon ?? React.createElement(NegativeIcon, { active: active })));
41
+ }
42
+ MessageFeedbackNegative.displayName = "MessageFeedback.Negative";
43
+ /** Render the feedback default or compose its addressable actions. */
44
+ function MessageFeedbackRoot({ messageId, feedback, onFeedback, children, className, ref, ...props }) {
45
+ const context = React.useMemo(() => ({ messageId, feedback, onFeedback }), [messageId, feedback, onFeedback]);
46
+ return (React.createElement(MessageFeedbackContext.Provider, { value: context },
47
+ React.createElement("div", { ref: ref, ...props, className: cn("flex items-center gap-1", className) }, children ?? (React.createElement(React.Fragment, null,
48
+ React.createElement(MessageFeedbackPositive, null),
49
+ React.createElement(MessageFeedbackNegative, null))))));
50
+ }
51
+ MessageFeedbackRoot.displayName = "MessageFeedback";
52
+ /** Message feedback with addressable positive and negative action leaves. */
53
+ export const MessageFeedback = Object.assign(MessageFeedbackRoot, {
54
+ Root: MessageFeedbackRoot,
55
+ Positive: MessageFeedbackPositive,
56
+ Negative: MessageFeedbackNegative,
17
57
  });
18
- MessageFeedback.displayName = "MessageFeedback";
@@ -1,4 +1,4 @@
1
- import * as React from "../../../../../../react/react.js";
1
+ import * as React from "react";
2
2
  /** Public API contract for quick action. */
3
3
  export interface QuickAction {
4
4
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"quick-actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/quick-actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,4CAA4C;AAC5C,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,4BAA4B;AAC5B,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,aAAa,EACb,SAAS,GACV,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAkB/C"}
1
+ {"version":3,"file":"quick-actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/quick-actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,4CAA4C;AAC5C,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,4BAA4B;AAC5B,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,aAAa,EACb,SAAS,GACV,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAkB/C"}
@@ -1,4 +1,4 @@
1
- import * as React from "../../../../../../react/react.js";
1
+ import * as React from "react";
2
2
  import { cn } from "../../theme.js";
3
3
  /** Render quick actions. */
4
4
  export function QuickActions({ actions, onActionClick, className, }) {
@@ -1,4 +1,4 @@
1
- import * as React from "../../../../../../react/react.js";
1
+ import * as React from "react";
2
2
  /** Per-card state shared with `Reasoning.*` sub-parts. */
3
3
  export interface ReasoningContextValue {
4
4
  text: string;
@@ -8,7 +8,7 @@ export interface ReasoningContextValue {
8
8
  }
9
9
  /** Read the enclosing `Reasoning` state. Throws when used outside a `Reasoning`. */
10
10
  export declare function useReasoning(): ReasoningContextValue;
11
- /** Props accepted by `Reasoning` / `Reasoning.Root` (aka `ReasoningCard`). */
11
+ /** Props accepted by `Reasoning` / `Reasoning.Root`. */
12
12
  export interface ReasoningProps {
13
13
  text: string;
14
14
  isStreaming?: boolean;
@@ -32,6 +32,16 @@ export interface ReasoningProps {
32
32
  onOpenChange?: (open: boolean) => void;
33
33
  /** Compose your own disclosure; when omitted, the default anatomy renders. */
34
34
  children?: React.ReactNode;
35
+ /** React 19: ref is a regular prop. */
36
+ ref?: React.Ref<HTMLDivElement>;
37
+ }
38
+ /**
39
+ * `Reasoning.Root` — context provider + wrapper. No children renders the
40
+ * default anatomy (`Trigger` + `Content`); pass children to recompose.
41
+ */
42
+ declare function ReasoningRoot({ text, isStreaming, className, icon, labels, open, defaultOpen, onOpenChange, children, ref, }: ReasoningProps): React.ReactElement;
43
+ declare namespace ReasoningRoot {
44
+ var displayName: string;
35
45
  }
36
46
  /** Props for `Reasoning.Trigger` — the disclosure button. */
37
47
  export interface ReasoningTriggerProps {
@@ -62,12 +72,10 @@ declare namespace ReasoningContent {
62
72
  * compose `Reasoning.Trigger` + `Reasoning.Content` for a custom layout.
63
73
  * Mirrors the `Message` / `ToolCall` compounds: render it, or compose it.
64
74
  */
65
- export declare const Reasoning: React.ForwardRefExoticComponent<ReasoningProps & React.RefAttributes<HTMLDivElement>> & {
66
- Root: React.ForwardRefExoticComponent<ReasoningProps & React.RefAttributes<HTMLDivElement>>;
75
+ export declare const Reasoning: typeof ReasoningRoot & {
76
+ Root: typeof ReasoningRoot;
67
77
  Trigger: typeof ReasoningTrigger;
68
78
  Content: typeof ReasoningContent;
69
79
  };
70
- /** Back-compat alias — `message.tsx` and `agent-card.tsx` import `ReasoningCard`. */
71
- export declare const ReasoningCard: React.ForwardRefExoticComponent<ReasoningProps & React.RefAttributes<HTMLDivElement>>;
72
80
  export {};
73
81
  //# sourceMappingURL=reasoning.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/reasoning.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAgB1D,0DAA0D;AAC1D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAID,oFAAoF;AACpF,wBAAgB,YAAY,IAAI,qBAAqB,CAQpD;AAED,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SA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AAO,MAAM,aAAa,uFAAgB,CAAC"}
1
+ {"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/reasoning.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,0DAA0D;AAC1D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAID,oFAAoF;AACpF,wBAAgB,YAAY,IAAI,qBAAqB,CAQpD;AAED,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;4EACwE;IACxE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,oEAAoE;IACpE,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD;gFAC4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;uEAEmE;IACnE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,uCAAuC;IACvC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED;;;GAGG;AACH,iBAAS,aAAa,CACpB,EACE,IAAI,EACJ,WAAmB,EACnB,SAAS,EACT,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,GAAG,GACJ,EAAE,cAAc,GAChB,KAAK,CAAC,YAAY,CA6DpB;kBA1EQ,aAAa;;;AA6EtB,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,oEAAoE;IACpE,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,gFAAgF;AAChF,iBAAS,gBAAgB,CACvB,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,qBAAqB,GACjD,KAAK,CAAC,GAAG,CAAC,OAAO,CA0BnB;kBA5BQ,gBAAgB;;;AA+BzB,oFAAoF;AACpF,iBAAS,gBAAgB,CACvB,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAC1E,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAY1B;kBAdQ,gBAAgB;;;AAiBzB;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;;CAIpB,CAAC"}
@@ -1,4 +1,4 @@
1
- import * as React from "../../../../../../react/react.js";
1
+ import * as React from "react";
2
2
  import { cn } from "../../theme.js";
3
3
  import { Markdown } from "../../markdown.js";
4
4
  import { ChevronDownIcon } from "../../../ui/icons/index.js";
@@ -19,7 +19,7 @@ export function useReasoning() {
19
19
  * `Reasoning.Root` — context provider + wrapper. No children renders the
20
20
  * default anatomy (`Trigger` + `Content`); pass children to recompose.
21
21
  */
22
- const ReasoningRoot = React.forwardRef(function Reasoning({ text, isStreaming = false, className, icon, labels, open, defaultOpen, onOpenChange, children, }, ref) {
22
+ function ReasoningRoot({ text, isStreaming = false, className, icon, labels, open, defaultOpen, onOpenChange, children, ref, }) {
23
23
  const isControlled = open !== undefined;
24
24
  // Uncontrolled default: open only if we mount mid-stream. A completed /
25
25
  // reloaded card (isStreaming === false) starts collapsed, so it never
@@ -66,7 +66,7 @@ const ReasoningRoot = React.forwardRef(function Reasoning({ text, isStreaming =
66
66
  React.createElement("div", { ref: ref, className: cn("not-prose mb-3", className) }, children ?? (React.createElement(React.Fragment, null,
67
67
  React.createElement(ReasoningTrigger, { icon: icon, labels: labels }),
68
68
  React.createElement(ReasoningContent, null))))));
69
- });
69
+ }
70
70
  ReasoningRoot.displayName = "Reasoning.Root";
71
71
  /** The header row: a "Thinking…" / "Thought process" label + expand chevron. */
72
72
  function ReasoningTrigger({ icon, labels, className }) {
@@ -100,5 +100,3 @@ export const Reasoning = Object.assign(ReasoningRoot, {
100
100
  Trigger: ReasoningTrigger,
101
101
  Content: ReasoningContent,
102
102
  });
103
- /** Back-compat alias — `message.tsx` and `agent-card.tsx` import `ReasoningCard`. */
104
- export const ReasoningCard = ReasoningRoot;
@@ -39,18 +39,8 @@
39
39
  *
40
40
  * @module react/components/chat/chat/components/sidebar
41
41
  */
42
- import * as React from "../../../../../../react/react.js";
42
+ import * as React from "react";
43
43
  import type { ConversationSummary } from "../persistence/conversation-store.js";
44
- /**
45
- * Icon overrides for {@link ChatSidebar}. Each defaults to the built-in glyph
46
- * (or, for `newConversation`, to no icon at all).
47
- */
48
- export interface ChatSidebarIcons {
49
- newConversation?: React.ReactNode;
50
- rename?: React.ReactNode;
51
- delete?: React.ReactNode;
52
- more?: React.ReactNode;
53
- }
54
44
  /** Per-row handlers/state handed to a custom {@link ChatSidebarRootProps.renderItem}. */
55
45
  export interface ChatSidebarItemRenderOptions {
56
46
  isActive: boolean;
@@ -78,7 +68,6 @@ interface ChatSidebarControlProps {
78
68
  /** Props accepted by {@link ChatSidebarRoot}. */
79
69
  export interface ChatSidebarRootProps extends ChatSidebarControlProps {
80
70
  /** Override any of the sidebar icons. */
81
- icons?: ChatSidebarIcons;
82
71
  /**
83
72
  * Show the loading skeleton instead of the list — e.g. while conversations
84
73
  * are being fetched. When omitted, the auto {@link ChatSidebarList} shows a
@@ -105,23 +94,82 @@ export declare namespace ChatSidebarRoot {
105
94
  export interface ChatSidebarNewButtonProps {
106
95
  /** Button label. Defaults to "New chat". */
107
96
  children?: React.ReactNode;
97
+ /** Optional leading icon. */
98
+ icon?: React.ReactNode;
108
99
  className?: string;
109
100
  }
110
101
  /** The primary "new conversation" action. Wires `onNew` from context. */
111
- export declare function ChatSidebarNewButton({ children, className, }: ChatSidebarNewButtonProps): React.ReactElement;
102
+ export declare function ChatSidebarNewButton({ children, icon, className, }: ChatSidebarNewButtonProps): React.ReactElement;
112
103
  export declare namespace ChatSidebarNewButton {
113
104
  var displayName: string;
114
105
  }
115
106
  /** Props accepted by {@link ChatSidebarItem}. */
107
+ /**
108
+ * Per-row state + actions shared with `ChatSidebar.Item.*` leaves, so a swapped
109
+ * or extended row menu keeps rename/delete/select behaviour (the acid test).
110
+ */
111
+ export interface ChatSidebarItemContextValue {
112
+ conversation: ConversationSummary;
113
+ isActive: boolean;
114
+ /** Rename is available (the surrounding sidebar wired an `onRename`). */
115
+ canRename: boolean;
116
+ /** Enter inline-rename mode (no-op when rename is unavailable). */
117
+ startRename: () => void;
118
+ /** Delete this conversation. */
119
+ remove: () => void;
120
+ /** `…` menu open state (drives the row's active styling). */
121
+ menuOpen: boolean;
122
+ setMenuOpen: (open: boolean) => void;
123
+ }
124
+ /** Read the enclosing `ChatSidebar.Item` row state. Throws when used outside one. */
125
+ export declare function useChatSidebarItem(): ChatSidebarItemContextValue;
116
126
  export interface ChatSidebarItemProps {
117
127
  conversation: ConversationSummary;
118
128
  className?: string;
129
+ /**
130
+ * Compose the row's action slot — typically a `<ChatSidebar.Item.Menu>`.
131
+ * Omit for the default `…` rename/delete menu.
132
+ */
133
+ children?: React.ReactNode;
119
134
  }
120
- /** A single conversation row — select on click, rename/delete via a "…" menu. */
121
- export declare function ChatSidebarItem({ conversation, className, }: ChatSidebarItemProps): React.ReactElement;
135
+ /**
136
+ * A single conversation row — select on click, rename/delete via a "…" menu.
137
+ * The menu is a composable compound: pass a `<ChatSidebar.Item.Menu>` child to
138
+ * add or reorder entries without re-implementing the row.
139
+ */
140
+ export declare function ChatSidebarItem({ conversation, className, children, }: ChatSidebarItemProps): React.ReactElement;
122
141
  export declare namespace ChatSidebarItem {
123
142
  var displayName: string;
124
143
  }
144
+ /** Props for {@link ChatSidebarItemMenu}. */
145
+ export interface ChatSidebarItemMenuProps {
146
+ /** Override the trigger glyph. */
147
+ icon?: React.ReactNode;
148
+ /** Compose the entries; omit for the default `Rename` + `Delete`. */
149
+ children?: React.ReactNode;
150
+ }
151
+ /** The row's `…` dropdown. Reads row state from {@link useChatSidebarItem}. */
152
+ export declare function ChatSidebarItemMenu({ icon, children, }: ChatSidebarItemMenuProps): React.ReactElement;
153
+ export declare namespace ChatSidebarItemMenu {
154
+ var displayName: string;
155
+ }
156
+ /** Props for {@link ChatSidebarItemRename} / {@link ChatSidebarItemDelete}. */
157
+ export interface ChatSidebarItemActionProps {
158
+ /** Override the entry glyph. */
159
+ icon?: React.ReactNode;
160
+ /** Override the entry label. */
161
+ children?: React.ReactNode;
162
+ }
163
+ /** `Rename` menu entry — enters inline rename. Renders nothing if unavailable. */
164
+ export declare function ChatSidebarItemRename({ icon, children, }: ChatSidebarItemActionProps): React.ReactElement | null;
165
+ export declare namespace ChatSidebarItemRename {
166
+ var displayName: string;
167
+ }
168
+ /** `Delete` menu entry. */
169
+ export declare function ChatSidebarItemDelete({ icon, children, }: ChatSidebarItemActionProps): React.ReactElement;
170
+ export declare namespace ChatSidebarItemDelete {
171
+ var displayName: string;
172
+ }
125
173
  /** Props accepted by {@link ChatSidebarGroup}. */
126
174
  export interface ChatSidebarGroupProps {
127
175
  /** Section heading (e.g. a recency bucket). Omit for an unlabeled group. */
@@ -167,13 +215,19 @@ declare function ChatSidebarBase(props: ChatSidebarProps): React.ReactElement |
167
215
  declare namespace ChatSidebarBase {
168
216
  var displayName: string;
169
217
  }
218
+ /** `ChatSidebar.Item` compound — the row plus its composable menu leaves. */
219
+ export type ChatSidebarItemComponent = typeof ChatSidebarItem & {
220
+ Menu: typeof ChatSidebarItemMenu;
221
+ Rename: typeof ChatSidebarItemRename;
222
+ Delete: typeof ChatSidebarItemDelete;
223
+ };
170
224
  /** Compound type — the preset plus its namespaced sub-components. */
171
225
  export type ChatSidebarComponent = typeof ChatSidebarBase & {
172
226
  Root: typeof ChatSidebarRoot;
173
227
  NewButton: typeof ChatSidebarNewButton;
174
228
  List: typeof ChatSidebarList;
175
229
  Group: typeof ChatSidebarGroup;
176
- Item: typeof ChatSidebarItem;
230
+ Item: ChatSidebarItemComponent;
177
231
  Empty: typeof ChatSidebarEmpty;
178
232
  };
179
233
  /** Render a chat sidebar — usable as `<ChatSidebar />` or `<ChatSidebar.Root>…`. */
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/sidebar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAc1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAmBhF;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,yFAAyF;AACzF,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,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9B,QAAQ,EACR,SAAS,GACV,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CA4D3C;yBA/De,eAAe;;;AAsE/B,wDAAwD;AACxD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC;CAAG;AAEnF,mEAAmE;AACnE,iBAAS,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAU3E;kBAVQ,eAAe;;;AAaxB,6EAA6E;AAC7E,MAAM,MAAM,wBAAwB,GAAG,OAAO,eAAe,GAAG;IAC9D,IAAI,EAAE,OAAO,mBAAmB,CAAC;IACjC,MAAM,EAAE,OAAO,qBAAqB,CAAC;IACrC,MAAM,EAAE,OAAO,qBAAqB,CAAC;CACtC,CAAC;AAWF,qEAAqE;AACrE,MAAM,MAAM,oBAAoB,GAAG,OAAO,eAAe,GAAG;IAC1D,IAAI,EAAE,OAAO,eAAe,CAAC;IAC7B,SAAS,EAAE,OAAO,oBAAoB,CAAC;IACvC,IAAI,EAAE,OAAO,eAAe,CAAC;IAC7B,KAAK,EAAE,OAAO,gBAAgB,CAAC;IAC/B,IAAI,EAAE,wBAAwB,CAAC;IAC/B,KAAK,EAAE,OAAO,gBAAgB,CAAC;CAChC,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,WAAW,EAAE,oBAOxB,CAAC"}
@@ -39,7 +39,7 @@
39
39
  *
40
40
  * @module react/components/chat/chat/components/sidebar
41
41
  */
42
- import * as React from "../../../../../../react/react.js";
42
+ import * as React from "react";
43
43
  import { COMPONENT_ERROR } from "../../../../../errors/error-registry.js";
44
44
  import { cn } from "../../theme.js";
45
45
  import { PencilIcon, TrashIcon } from "../../../ui/icons/index.js";
@@ -118,9 +118,9 @@ function groupConversations(conversations) {
118
118
  }
119
119
  /** Context provider + outer rail container for the compound sidebar. */
120
120
  export function ChatSidebarRoot(props) {
121
- const { icons, loading, isOpen = true, fill = false, className, children } = props;
121
+ const { loading, isOpen = true, fill = false, className, children } = props;
122
122
  const resolved = useResolvedSidebar(props);
123
- const value = React.useMemo(() => ({ ...resolved, icons, loading }), [
123
+ const value = React.useMemo(() => ({ ...resolved, loading }), [
124
124
  resolved.conversations,
125
125
  resolved.activeId,
126
126
  resolved.onSelect,
@@ -128,7 +128,6 @@ export function ChatSidebarRoot(props) {
128
128
  resolved.onRename,
129
129
  resolved.onNew,
130
130
  resolved.renderItem,
131
- icons,
132
131
  loading,
133
132
  ]);
134
133
  if (!isOpen)
@@ -141,17 +140,32 @@ export function ChatSidebarRoot(props) {
141
140
  }
142
141
  ChatSidebarRoot.displayName = "ChatSidebar.Root";
143
142
  /** The primary "new conversation" action. Wires `onNew` from context. */
144
- export function ChatSidebarNewButton({ children, className, }) {
145
- const { onNew, icons } = useChatSidebarContext();
143
+ export function ChatSidebarNewButton({ children, icon, className, }) {
144
+ const { onNew } = useChatSidebarContext();
146
145
  return (React.createElement("div", { className: "px-3 pt-4 pb-1" },
147
146
  React.createElement(Button, { type: "button", variant: "primary", onClick: onNew, className: cn("w-full", className) },
148
- icons?.newConversation,
147
+ icon,
149
148
  children ?? "New chat")));
150
149
  }
151
150
  ChatSidebarNewButton.displayName = "ChatSidebar.NewButton";
152
- /** A single conversation row — select on click, rename/delete via a "…" menu. */
153
- export function ChatSidebarItem({ conversation, className, }) {
154
- const { activeId, onSelect, onDelete, onRename, icons, } = useChatSidebarContext();
151
+ const ChatSidebarItemContext = React.createContext(null);
152
+ /** Read the enclosing `ChatSidebar.Item` row state. Throws when used outside one. */
153
+ export function useChatSidebarItem() {
154
+ const ctx = React.useContext(ChatSidebarItemContext);
155
+ if (!ctx) {
156
+ throw COMPONENT_ERROR.create({
157
+ detail: "ChatSidebar.Item.* must be used within <ChatSidebar.Item>",
158
+ });
159
+ }
160
+ return ctx;
161
+ }
162
+ /**
163
+ * A single conversation row — select on click, rename/delete via a "…" menu.
164
+ * The menu is a composable compound: pass a `<ChatSidebar.Item.Menu>` child to
165
+ * add or reorder entries without re-implementing the row.
166
+ */
167
+ export function ChatSidebarItem({ conversation, className, children, }) {
168
+ const { activeId, onSelect, onDelete, onRename } = useChatSidebarContext();
155
169
  const isActive = conversation.id === activeId;
156
170
  const [editing, setEditing] = React.useState(false);
157
171
  const [editValue, setEditValue] = React.useState(conversation.title);
@@ -161,12 +175,12 @@ export function ChatSidebarItem({ conversation, className, }) {
161
175
  if (editing)
162
176
  inputRef.current?.select();
163
177
  }, [editing]);
164
- function startRename() {
178
+ const startRename = React.useCallback(() => {
165
179
  if (!onRename)
166
180
  return;
167
181
  setEditValue(conversation.title);
168
182
  setEditing(true);
169
- }
183
+ }, [onRename, conversation.title]);
170
184
  function commitRename() {
171
185
  setEditing(false);
172
186
  const trimmed = editValue.trim();
@@ -174,6 +188,15 @@ export function ChatSidebarItem({ conversation, className, }) {
174
188
  onRename?.(conversation.id, trimmed);
175
189
  }
176
190
  }
191
+ const itemContext = React.useMemo(() => ({
192
+ conversation,
193
+ isActive,
194
+ canRename: Boolean(onRename),
195
+ startRename,
196
+ remove: () => onDelete(conversation.id),
197
+ menuOpen,
198
+ setMenuOpen,
199
+ }), [conversation, isActive, onRename, startRename, onDelete, menuOpen]);
177
200
  if (editing) {
178
201
  // Fixed `h-8` = the display row's height (py-1.5 + a size-5 action button),
179
202
  // so entering rename mode never resizes the row.
@@ -185,18 +208,39 @@ export function ChatSidebarItem({ conversation, className, }) {
185
208
  setEditing(false);
186
209
  }, className: "min-w-0 flex-1 appearance-none border-0 bg-transparent p-0 text-[13px] leading-snug outline-none" })));
187
210
  }
188
- return (React.createElement(ListItem, { title: conversation.title, active: isActive || menuOpen, className: className, onClick: () => onSelect(conversation.id), action: React.createElement(DropdownMenu, { open: menuOpen, onOpenChange: setMenuOpen },
189
- React.createElement(DropdownMenuTrigger, { asChild: true },
190
- React.createElement(Button, { type: "button", variant: "icon-ghost", size: "icon-xs", on: "card", "aria-label": `More actions for ${conversation.title}` }, icons?.more ?? React.createElement(MoreGlyph, null))),
191
- React.createElement(DropdownMenuContent, { align: "end", className: "min-w-[160px]" },
192
- onRename && (React.createElement(DropdownMenuItem, { onSelect: startRename },
193
- icons?.rename ?? React.createElement(PencilIcon, null),
194
- "Rename")),
195
- React.createElement(DropdownMenuItem, { onSelect: () => onDelete(conversation.id), className: "text-[var(--destructive)] hover:bg-[color-mix(in_oklch,var(--destructive),transparent_92%)]" },
196
- icons?.delete ?? React.createElement(TrashIcon, null),
197
- "Delete"))) }));
211
+ return (React.createElement(ChatSidebarItemContext.Provider, { value: itemContext },
212
+ React.createElement(ListItem, { title: conversation.title, active: isActive || menuOpen, className: className, onClick: () => onSelect(conversation.id), action: children ?? React.createElement(ChatSidebarItemMenu, null) })));
198
213
  }
199
214
  ChatSidebarItem.displayName = "ChatSidebar.Item";
215
+ /** The row's `…` dropdown. Reads row state from {@link useChatSidebarItem}. */
216
+ export function ChatSidebarItemMenu({ icon, children, }) {
217
+ const { conversation, menuOpen, setMenuOpen } = useChatSidebarItem();
218
+ return (React.createElement(DropdownMenu, { open: menuOpen, onOpenChange: setMenuOpen },
219
+ React.createElement(DropdownMenuTrigger, { asChild: true },
220
+ React.createElement(Button, { type: "button", variant: "icon-ghost", size: "icon-xs", on: "card", "aria-label": `More actions for ${conversation.title}` }, icon ?? React.createElement(MoreGlyph, null))),
221
+ React.createElement(DropdownMenuContent, { align: "end", className: "min-w-[160px]" }, children ?? (React.createElement(React.Fragment, null,
222
+ React.createElement(ChatSidebarItemRename, null),
223
+ React.createElement(ChatSidebarItemDelete, null))))));
224
+ }
225
+ ChatSidebarItemMenu.displayName = "ChatSidebar.Item.Menu";
226
+ /** `Rename` menu entry — enters inline rename. Renders nothing if unavailable. */
227
+ export function ChatSidebarItemRename({ icon, children, }) {
228
+ const { canRename, startRename } = useChatSidebarItem();
229
+ if (!canRename)
230
+ return null;
231
+ return (React.createElement(DropdownMenuItem, { onSelect: startRename },
232
+ icon ?? React.createElement(PencilIcon, null),
233
+ children ?? "Rename"));
234
+ }
235
+ ChatSidebarItemRename.displayName = "ChatSidebar.Item.Rename";
236
+ /** `Delete` menu entry. */
237
+ export function ChatSidebarItemDelete({ icon, children, }) {
238
+ const { remove } = useChatSidebarItem();
239
+ return (React.createElement(DropdownMenuItem, { onSelect: remove, className: "text-[var(--destructive)] hover:bg-[color-mix(in_oklch,var(--destructive),transparent_92%)]" },
240
+ icon ?? React.createElement(TrashIcon, null),
241
+ children ?? "Delete"));
242
+ }
243
+ ChatSidebarItemDelete.displayName = "ChatSidebar.Item.Delete";
200
244
  /** A labeled cluster of conversation rows. */
201
245
  export function ChatSidebarGroup({ label, children, className, }) {
202
246
  return (React.createElement(List, { className: className },
@@ -265,12 +309,17 @@ function ChatSidebarBase(props) {
265
309
  React.createElement(ChatSidebarList, null)));
266
310
  }
267
311
  ChatSidebarBase.displayName = "ChatSidebar";
312
+ const ChatSidebarItemCompound = Object.assign(ChatSidebarItem, {
313
+ Menu: ChatSidebarItemMenu,
314
+ Rename: ChatSidebarItemRename,
315
+ Delete: ChatSidebarItemDelete,
316
+ });
268
317
  /** Render a chat sidebar — usable as `<ChatSidebar />` or `<ChatSidebar.Root>…`. */
269
318
  export const ChatSidebar = Object.assign(ChatSidebarBase, {
270
319
  Root: ChatSidebarRoot,
271
320
  NewButton: ChatSidebarNewButton,
272
321
  List: ChatSidebarList,
273
322
  Group: ChatSidebarGroup,
274
- Item: ChatSidebarItem,
323
+ Item: ChatSidebarItemCompound,
275
324
  Empty: ChatSidebarEmpty,
276
325
  });
@@ -2,7 +2,7 @@
2
2
  * Skill Badge - compact indicator for skill tool calls (load_skill, load_skill_reference, execute_skill_script).
3
3
  * @module react/components/chat/components/skill-badge
4
4
  */
5
- import * as React from "../../../../../../react/react.js";
5
+ import * as React from "react";
6
6
  import type { ChatDynamicToolPart, ChatToolPart } from "../../../../../agent/react/index.js";
7
7
  /** Props accepted by skill badge. */
8
8
  export interface SkillBadgeProps {
@@ -1 +1 @@
1
- {"version":3,"file":"skill-badge.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/skill-badge.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAE7F,qCAAqC;AACrC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,YAAY,GAAG,mBAAmB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,0BAA0B;AAC1B,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2CxF"}
1
+ {"version":3,"file":"skill-badge.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/skill-badge.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAE7F,qCAAqC;AACrC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,YAAY,GAAG,mBAAmB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,0BAA0B;AAC1B,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2CxF"}
@@ -2,7 +2,7 @@
2
2
  * Skill Badge - compact indicator for skill tool calls (load_skill, load_skill_reference, execute_skill_script).
3
3
  * @module react/components/chat/components/skill-badge
4
4
  */
5
- import * as React from "../../../../../../react/react.js";
5
+ import * as React from "react";
6
6
  import { cn } from "../../theme.js";
7
7
  import { CheckCircleIcon, SparklesIcon, XCircleIcon } from "../../../ui/icons/index.js";
8
8
  /** Render skill badge. */
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * @module react/components/chat/components/skill-tool
13
13
  */
14
- import * as React from "../../../../../../react/react.js";
14
+ import * as React from "react";
15
15
  import type { ChatDynamicToolPart, ChatToolPart } from "../../../../../agent/react/index.js";
16
16
  /** Props accepted by {@link SkillTool}. */
17
17
  export interface SkillToolProps {
@@ -1 +1 @@
1
- {"version":3,"file":"skill-tool.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/skill-tool.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAW7F,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yCAAyC;AACzC,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAgB,EAChB,SAAS,GACV,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkBpC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,YAAY,GAAG,mBAAmB,GACvC,cAAc,CAQhB"}
1
+ {"version":3,"file":"skill-tool.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/skill-tool.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAW7F,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yCAAyC;AACzC,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAgB,EAChB,SAAS,GACV,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkBpC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,YAAY,GAAG,mBAAmB,GACvC,cAAc,CAQhB"}