stream-chat-react-native-core 9.12.1 → 9.14.0

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 (939) hide show
  1. package/a2ui/package.json +6 -0
  2. package/ai-components/conversation/package.json +6 -0
  3. package/lib/commonjs/a11y/a11yUtils.js.map +1 -1
  4. package/lib/commonjs/a11y/hooks/useResolvedModalAccessibilityProps.js.map +1 -1
  5. package/lib/commonjs/a2ui/A2UIContexts.js +8 -0
  6. package/lib/commonjs/a2ui/A2UIContexts.js.map +1 -0
  7. package/lib/commonjs/a2ui/A2UIInstructions.js +49 -0
  8. package/lib/commonjs/a2ui/A2UIInstructions.js.map +1 -0
  9. package/lib/commonjs/a2ui/A2UIPlaceholder.js +37 -0
  10. package/lib/commonjs/a2ui/A2UIPlaceholder.js.map +1 -0
  11. package/lib/commonjs/a2ui/A2UIRenderer.js +363 -0
  12. package/lib/commonjs/a2ui/A2UIRenderer.js.map +1 -0
  13. package/lib/commonjs/a2ui/A2UIStream.js +91 -0
  14. package/lib/commonjs/a2ui/A2UIStream.js.map +1 -0
  15. package/lib/commonjs/a2ui/A2UISurface.js +237 -0
  16. package/lib/commonjs/a2ui/A2UISurface.js.map +1 -0
  17. package/lib/commonjs/a2ui/basicCatalog.json +1206 -0
  18. package/lib/commonjs/a2ui/basicFunctions.js +398 -0
  19. package/lib/commonjs/a2ui/basicFunctions.js.map +1 -0
  20. package/lib/commonjs/a2ui/catalogDocument.js +80 -0
  21. package/lib/commonjs/a2ui/catalogDocument.js.map +1 -0
  22. package/lib/commonjs/a2ui/catalogs.js +105 -0
  23. package/lib/commonjs/a2ui/catalogs.js.map +1 -0
  24. package/lib/commonjs/a2ui/components/DateTimeInput.js +445 -0
  25. package/lib/commonjs/a2ui/components/DateTimeInput.js.map +1 -0
  26. package/lib/commonjs/a2ui/components/Media.js +316 -0
  27. package/lib/commonjs/a2ui/components/Media.js.map +1 -0
  28. package/lib/commonjs/a2ui/components/basicComponents.js +975 -0
  29. package/lib/commonjs/a2ui/components/basicComponents.js.map +1 -0
  30. package/lib/commonjs/a2ui/components/iconPaths.js +66 -0
  31. package/lib/commonjs/a2ui/components/iconPaths.js.map +1 -0
  32. package/lib/commonjs/a2ui/components/types.js +4 -0
  33. package/lib/commonjs/a2ui/components/types.js.map +1 -0
  34. package/lib/commonjs/a2ui/index.js +70 -0
  35. package/lib/commonjs/a2ui/index.js.map +1 -0
  36. package/lib/commonjs/a2ui/instructions.js +268 -0
  37. package/lib/commonjs/a2ui/instructions.js.map +1 -0
  38. package/lib/commonjs/a2ui/secrets.js +169 -0
  39. package/lib/commonjs/a2ui/secrets.js.map +1 -0
  40. package/lib/commonjs/a2ui/useReplyState.js +35 -0
  41. package/lib/commonjs/a2ui/useReplyState.js.map +1 -0
  42. package/lib/commonjs/ai-components/AITypingIndicatorView.js +8 -18
  43. package/lib/commonjs/ai-components/AITypingIndicatorView.js.map +1 -1
  44. package/lib/commonjs/ai-components/README.md +64 -3
  45. package/lib/commonjs/ai-components/StreamingMessageView.js +26 -0
  46. package/lib/commonjs/ai-components/StreamingMessageView.js.map +1 -1
  47. package/lib/commonjs/ai-components/charts/components/PieLegend.js +2 -1
  48. package/lib/commonjs/ai-components/charts/components/PieLegend.js.map +1 -1
  49. package/lib/commonjs/ai-components/charts/components/VictoryChart.js +7 -2
  50. package/lib/commonjs/ai-components/charts/components/VictoryChart.js.map +1 -1
  51. package/lib/commonjs/ai-components/charts/utils/format-time-label.js +15 -0
  52. package/lib/commonjs/ai-components/charts/utils/format-time-label.js.map +1 -0
  53. package/lib/commonjs/ai-components/charts/vega-lite/schema.js +17 -2
  54. package/lib/commonjs/ai-components/charts/vega-lite/schema.js.map +1 -1
  55. package/lib/commonjs/ai-components/contexts/composer-context.js +13 -6
  56. package/lib/commonjs/ai-components/contexts/composer-context.js.map +1 -1
  57. package/lib/commonjs/ai-components/contexts/index.js +11 -0
  58. package/lib/commonjs/ai-components/contexts/index.js.map +1 -1
  59. package/lib/commonjs/ai-components/contexts/theme-context.js +33 -2
  60. package/lib/commonjs/ai-components/contexts/theme-context.js.map +1 -1
  61. package/lib/commonjs/ai-components/contexts/translation-context.js +29 -0
  62. package/lib/commonjs/ai-components/contexts/translation-context.js.map +1 -0
  63. package/lib/commonjs/ai-components/conversation/AIConversation.js +374 -0
  64. package/lib/commonjs/ai-components/conversation/AIConversation.js.map +1 -0
  65. package/lib/commonjs/ai-components/conversation/entries.js +98 -0
  66. package/lib/commonjs/ai-components/conversation/entries.js.map +1 -0
  67. package/lib/commonjs/ai-components/conversation/index.js +15 -0
  68. package/lib/commonjs/ai-components/conversation/index.js.map +1 -0
  69. package/lib/commonjs/ai-components/conversation/list/AIChatList.js +224 -0
  70. package/lib/commonjs/ai-components/conversation/list/AIChatList.js.map +1 -0
  71. package/lib/commonjs/ai-components/conversation/list/useChatListController.js +78 -0
  72. package/lib/commonjs/ai-components/conversation/list/useChatListController.js.map +1 -0
  73. package/lib/commonjs/ai-components/conversation/list/useEndInView.js +51 -0
  74. package/lib/commonjs/ai-components/conversation/list/useEndInView.js.map +1 -0
  75. package/lib/commonjs/ai-components/conversation/list/useKeyboardOverlap.js +53 -0
  76. package/lib/commonjs/ai-components/conversation/list/useKeyboardOverlap.js.map +1 -0
  77. package/lib/commonjs/ai-components/conversation/list/useLoadOlder.js +73 -0
  78. package/lib/commonjs/ai-components/conversation/list/useLoadOlder.js.map +1 -0
  79. package/lib/commonjs/ai-components/conversation/list/usePinnedAnchor.js +84 -0
  80. package/lib/commonjs/ai-components/conversation/list/usePinnedAnchor.js.map +1 -0
  81. package/lib/commonjs/ai-components/conversation/useConversationRows.js +117 -0
  82. package/lib/commonjs/ai-components/conversation/useConversationRows.js.map +1 -0
  83. package/lib/commonjs/ai-components/conversation-state/controller/AIAgentError.js +13 -0
  84. package/lib/commonjs/ai-components/conversation-state/controller/AIAgentError.js.map +1 -0
  85. package/lib/commonjs/ai-components/conversation-state/controller/AIConversationController.js +431 -0
  86. package/lib/commonjs/ai-components/conversation-state/controller/AIConversationController.js.map +1 -0
  87. package/lib/commonjs/ai-components/conversation-state/controller/AIConversationExchange.js +89 -0
  88. package/lib/commonjs/ai-components/conversation-state/controller/AIConversationExchange.js.map +1 -0
  89. package/lib/commonjs/ai-components/conversation-state/controller/index.js +48 -0
  90. package/lib/commonjs/ai-components/conversation-state/controller/index.js.map +1 -0
  91. package/lib/commonjs/ai-components/conversation-state/controller/offers.js +35 -0
  92. package/lib/commonjs/ai-components/conversation-state/controller/offers.js.map +1 -0
  93. package/lib/commonjs/ai-components/conversation-state/controller/types.js +13 -0
  94. package/lib/commonjs/ai-components/conversation-state/controller/types.js.map +1 -0
  95. package/lib/commonjs/ai-components/conversation-state/controller/useAIConversationState.js +8 -0
  96. package/lib/commonjs/ai-components/conversation-state/controller/useAIConversationState.js.map +1 -0
  97. package/lib/commonjs/ai-components/conversation-state/fromStreamMessage.js +67 -0
  98. package/lib/commonjs/ai-components/conversation-state/fromStreamMessage.js.map +1 -0
  99. package/lib/commonjs/ai-components/conversation-state/index.js +37 -0
  100. package/lib/commonjs/ai-components/conversation-state/index.js.map +1 -0
  101. package/lib/commonjs/ai-components/conversation-state/types.js +4 -0
  102. package/lib/commonjs/ai-components/conversation-state/types.js.map +1 -0
  103. package/lib/commonjs/ai-components/generative-ui/AIUIAction.js +30 -0
  104. package/lib/commonjs/ai-components/generative-ui/AIUIAction.js.map +1 -0
  105. package/lib/commonjs/ai-components/generative-ui/AIUIArguments.js +128 -0
  106. package/lib/commonjs/ai-components/generative-ui/AIUIArguments.js.map +1 -0
  107. package/lib/commonjs/ai-components/generative-ui/AIUIComponent.js +50 -0
  108. package/lib/commonjs/ai-components/generative-ui/AIUIComponent.js.map +1 -0
  109. package/lib/commonjs/ai-components/generative-ui/AIUIComponentDefinition.js +134 -0
  110. package/lib/commonjs/ai-components/generative-ui/AIUIComponentDefinition.js.map +1 -0
  111. package/lib/commonjs/ai-components/generative-ui/AIUIDocument.js +32 -0
  112. package/lib/commonjs/ai-components/generative-ui/AIUIDocument.js.map +1 -0
  113. package/lib/commonjs/ai-components/generative-ui/AIUIEntrance.js +197 -0
  114. package/lib/commonjs/ai-components/generative-ui/AIUIEntrance.js.map +1 -0
  115. package/lib/commonjs/ai-components/generative-ui/AIUIErrorBoundary.js +30 -0
  116. package/lib/commonjs/ai-components/generative-ui/AIUIErrorBoundary.js.map +1 -0
  117. package/lib/commonjs/ai-components/generative-ui/AIUIHelpers.js +54 -0
  118. package/lib/commonjs/ai-components/generative-ui/AIUIHelpers.js.map +1 -0
  119. package/lib/commonjs/ai-components/generative-ui/AIUIHost.js +259 -0
  120. package/lib/commonjs/ai-components/generative-ui/AIUIHost.js.map +1 -0
  121. package/lib/commonjs/ai-components/generative-ui/AIUIMedia.js +24 -0
  122. package/lib/commonjs/ai-components/generative-ui/AIUIMedia.js.map +1 -0
  123. package/lib/commonjs/ai-components/generative-ui/AIUIRenderer.js +10 -0
  124. package/lib/commonjs/ai-components/generative-ui/AIUIRenderer.js.map +1 -0
  125. package/lib/commonjs/ai-components/generative-ui/AIUIView.js +57 -0
  126. package/lib/commonjs/ai-components/generative-ui/AIUIView.js.map +1 -0
  127. package/lib/commonjs/ai-components/generative-ui/index.js +181 -0
  128. package/lib/commonjs/ai-components/generative-ui/index.js.map +1 -0
  129. package/lib/commonjs/ai-components/icons.js +44 -0
  130. package/lib/commonjs/ai-components/icons.js.map +1 -0
  131. package/lib/commonjs/ai-components/index.js +96 -0
  132. package/lib/commonjs/ai-components/index.js.map +1 -1
  133. package/lib/commonjs/ai-components/internal/Shimmer.js +36 -0
  134. package/lib/commonjs/ai-components/internal/Shimmer.js.map +1 -0
  135. package/lib/commonjs/ai-components/internal/format.js +66 -0
  136. package/lib/commonjs/ai-components/internal/format.js.map +1 -0
  137. package/lib/commonjs/ai-components/internal/hooks/useBottomSafeArea.js +12 -0
  138. package/lib/commonjs/ai-components/internal/hooks/useBottomSafeArea.js.map +1 -0
  139. package/lib/commonjs/ai-components/internal/icons/AgentIcons.js +74 -0
  140. package/lib/commonjs/ai-components/internal/icons/AgentIcons.js.map +1 -0
  141. package/lib/commonjs/ai-components/internal/keyboard.js +40 -0
  142. package/lib/commonjs/ai-components/internal/keyboard.js.map +1 -0
  143. package/lib/commonjs/ai-components/internal/tokens.js +11 -0
  144. package/lib/commonjs/ai-components/internal/tokens.js.map +1 -0
  145. package/lib/commonjs/ai-components/internal/uuid.js +21 -0
  146. package/lib/commonjs/ai-components/internal/uuid.js.map +1 -0
  147. package/lib/commonjs/ai-components/markdown/components/CodeBlock.js +4 -2
  148. package/lib/commonjs/ai-components/markdown/components/CodeBlock.js.map +1 -1
  149. package/lib/commonjs/ai-components/markdown/components/InlineCode.js +1 -0
  150. package/lib/commonjs/ai-components/markdown/components/InlineCode.js.map +1 -1
  151. package/lib/commonjs/ai-components/markdown/components/Text.js +11 -2
  152. package/lib/commonjs/ai-components/markdown/components/Text.js.map +1 -1
  153. package/lib/commonjs/ai-components/markdown/styles.js +27 -29
  154. package/lib/commonjs/ai-components/markdown/styles.js.map +1 -1
  155. package/lib/commonjs/ai-components/message/AIAssistantMessage.js +64 -0
  156. package/lib/commonjs/ai-components/message/AIAssistantMessage.js.map +1 -0
  157. package/lib/commonjs/ai-components/message/AIMessageAttachment.js +189 -0
  158. package/lib/commonjs/ai-components/message/AIMessageAttachment.js.map +1 -0
  159. package/lib/commonjs/ai-components/message/AIReplyActions.js +132 -0
  160. package/lib/commonjs/ai-components/message/AIReplyActions.js.map +1 -0
  161. package/lib/commonjs/ai-components/message/AIUserMessage.js +104 -0
  162. package/lib/commonjs/ai-components/message/AIUserMessage.js.map +1 -0
  163. package/lib/commonjs/ai-components/message/UserMessageMenu.js +150 -0
  164. package/lib/commonjs/ai-components/message/UserMessageMenu.js.map +1 -0
  165. package/lib/commonjs/ai-components/message/index.js +48 -0
  166. package/lib/commonjs/ai-components/message/index.js.map +1 -0
  167. package/lib/commonjs/ai-components/message-composer/ActionButton.js +4 -2
  168. package/lib/commonjs/ai-components/message-composer/ActionButton.js.map +1 -1
  169. package/lib/commonjs/ai-components/message-composer/ActionSheet.js +22 -6
  170. package/lib/commonjs/ai-components/message-composer/ActionSheet.js.map +1 -1
  171. package/lib/commonjs/ai-components/message-composer/AttachmentButton.js +5 -1
  172. package/lib/commonjs/ai-components/message-composer/AttachmentButton.js.map +1 -1
  173. package/lib/commonjs/ai-components/message-composer/ChatOptions.js +147 -0
  174. package/lib/commonjs/ai-components/message-composer/ChatOptions.js.map +1 -0
  175. package/lib/commonjs/ai-components/message-composer/ComposerView.js +146 -20
  176. package/lib/commonjs/ai-components/message-composer/ComposerView.js.map +1 -1
  177. package/lib/commonjs/ai-components/message-composer/EditingMessageChip.js +81 -0
  178. package/lib/commonjs/ai-components/message-composer/EditingMessageChip.js.map +1 -0
  179. package/lib/commonjs/ai-components/message-composer/MediaPreviewList.js +26 -1
  180. package/lib/commonjs/ai-components/message-composer/MediaPreviewList.js.map +1 -1
  181. package/lib/commonjs/ai-components/message-composer/index.js +11 -0
  182. package/lib/commonjs/ai-components/message-composer/index.js.map +1 -1
  183. package/lib/commonjs/ai-components/message-parts/AIMessageParts.js +133 -0
  184. package/lib/commonjs/ai-components/message-parts/AIMessageParts.js.map +1 -0
  185. package/lib/commonjs/ai-components/message-parts/AIToolApproval.js +197 -0
  186. package/lib/commonjs/ai-components/message-parts/AIToolApproval.js.map +1 -0
  187. package/lib/commonjs/ai-components/message-parts/AIToolAuthorization.js +250 -0
  188. package/lib/commonjs/ai-components/message-parts/AIToolAuthorization.js.map +1 -0
  189. package/lib/commonjs/ai-components/message-parts/AIToolCall.js +159 -0
  190. package/lib/commonjs/ai-components/message-parts/AIToolCall.js.map +1 -0
  191. package/lib/commonjs/ai-components/message-parts/callStates.js +54 -0
  192. package/lib/commonjs/ai-components/message-parts/callStates.js.map +1 -0
  193. package/lib/commonjs/ai-components/message-parts/index.js +70 -0
  194. package/lib/commonjs/ai-components/message-parts/index.js.map +1 -0
  195. package/lib/commonjs/ai-components/message-parts/parseMessageParts.js +126 -0
  196. package/lib/commonjs/ai-components/message-parts/parseMessageParts.js.map +1 -0
  197. package/lib/commonjs/ai-components/message-parts/types.js +2 -0
  198. package/lib/commonjs/ai-components/message-parts/types.js.map +1 -0
  199. package/lib/commonjs/ai-components/native-specs/NativeAIAgent.js +7 -0
  200. package/lib/commonjs/ai-components/native-specs/NativeAIAgent.js.map +1 -0
  201. package/lib/commonjs/ai-components/reasoning/AIReasoning.js +401 -0
  202. package/lib/commonjs/ai-components/reasoning/AIReasoning.js.map +1 -0
  203. package/lib/commonjs/ai-components/reasoning/index.js +26 -0
  204. package/lib/commonjs/ai-components/reasoning/index.js.map +1 -0
  205. package/lib/commonjs/ai-components/reasoning/thinkingClock.js +63 -0
  206. package/lib/commonjs/ai-components/reasoning/thinkingClock.js.map +1 -0
  207. package/lib/commonjs/ai-components/services/clipboard-service/expo.js +7 -2
  208. package/lib/commonjs/ai-components/services/clipboard-service/expo.js.map +1 -1
  209. package/lib/commonjs/ai-components/store/composer/store.js.map +1 -1
  210. package/lib/commonjs/ai-components/store/composer/useComposerChatOption.js +18 -0
  211. package/lib/commonjs/ai-components/store/composer/useComposerChatOption.js.map +1 -0
  212. package/lib/commonjs/ai-components/store/composer/useComposerIsEditing.js +18 -0
  213. package/lib/commonjs/ai-components/store/composer/useComposerIsEditing.js.map +1 -0
  214. package/lib/commonjs/ai-components/store/index.js +22 -0
  215. package/lib/commonjs/ai-components/store/index.js.map +1 -1
  216. package/lib/commonjs/ai-components/suggestions/AISuggestions.js +66 -0
  217. package/lib/commonjs/ai-components/suggestions/AISuggestions.js.map +1 -0
  218. package/lib/commonjs/ai-components/suggestions/index.js +15 -0
  219. package/lib/commonjs/ai-components/suggestions/index.js.map +1 -0
  220. package/lib/commonjs/ai-components/syntax-highlighting/utils/flatten-nodes.js +2 -1
  221. package/lib/commonjs/ai-components/syntax-highlighting/utils/flatten-nodes.js.map +1 -1
  222. package/lib/commonjs/ai-components/syntax-highlighting/utils/renderer.js +3 -2
  223. package/lib/commonjs/ai-components/syntax-highlighting/utils/renderer.js.map +1 -1
  224. package/lib/commonjs/ai-components/theme.js +137 -1
  225. package/lib/commonjs/ai-components/theme.js.map +1 -1
  226. package/lib/commonjs/ai-components/tool-calls/AIClientIdentity.js +22 -0
  227. package/lib/commonjs/ai-components/tool-calls/AIClientIdentity.js.map +1 -0
  228. package/lib/commonjs/ai-components/tool-calls/AIClientToolRunner.js +109 -0
  229. package/lib/commonjs/ai-components/tool-calls/AIClientToolRunner.js.map +1 -0
  230. package/lib/commonjs/ai-components/tool-calls/AIToolApprover.js +23 -0
  231. package/lib/commonjs/ai-components/tool-calls/AIToolApprover.js.map +1 -0
  232. package/lib/commonjs/ai-components/tool-calls/authSessionAuthorizer.js +88 -0
  233. package/lib/commonjs/ai-components/tool-calls/authSessionAuthorizer.js.map +1 -0
  234. package/lib/commonjs/ai-components/tool-calls/index.js +48 -0
  235. package/lib/commonjs/ai-components/tool-calls/index.js.map +1 -0
  236. package/lib/commonjs/ai-components/voice-visualization/glowShader.js.map +1 -1
  237. package/lib/commonjs/components/Accessibility/useAccessibilityAnnouncer.js.map +1 -1
  238. package/lib/commonjs/components/Message/MessageItemView/utils/renderText.js.map +1 -1
  239. package/lib/commonjs/contexts/translationContext/TranslationContext.js +2 -2
  240. package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
  241. package/lib/commonjs/i18n/ar.json +40 -1
  242. package/lib/commonjs/i18n/en.json +40 -1
  243. package/lib/commonjs/i18n/es.json +40 -1
  244. package/lib/commonjs/i18n/fr.json +40 -1
  245. package/lib/commonjs/i18n/he.json +40 -1
  246. package/lib/commonjs/i18n/hi.json +40 -1
  247. package/lib/commonjs/i18n/it.json +40 -1
  248. package/lib/commonjs/i18n/ja.json +40 -1
  249. package/lib/commonjs/i18n/ko.json +40 -1
  250. package/lib/commonjs/i18n/nl.json +40 -1
  251. package/lib/commonjs/i18n/pt-br.json +40 -1
  252. package/lib/commonjs/i18n/ru.json +40 -1
  253. package/lib/commonjs/i18n/tr.json +40 -1
  254. package/lib/commonjs/mock-builders/a2ui/ohrid.js +84 -0
  255. package/lib/commonjs/mock-builders/a2ui/ohrid.js.map +1 -0
  256. package/lib/commonjs/utils/i18n/Streami18n.js +9 -4
  257. package/lib/commonjs/utils/i18n/Streami18n.js.map +1 -1
  258. package/lib/commonjs/utils/i18n/utils.js +7 -0
  259. package/lib/commonjs/utils/i18n/utils.js.map +1 -0
  260. package/lib/commonjs/version.json +1 -1
  261. package/lib/module/a11y/a11yUtils.js.map +1 -1
  262. package/lib/module/a11y/hooks/useResolvedModalAccessibilityProps.js.map +1 -1
  263. package/lib/module/a2ui/A2UIContexts.js +8 -0
  264. package/lib/module/a2ui/A2UIContexts.js.map +1 -0
  265. package/lib/module/a2ui/A2UIInstructions.js +49 -0
  266. package/lib/module/a2ui/A2UIInstructions.js.map +1 -0
  267. package/lib/module/a2ui/A2UIPlaceholder.js +37 -0
  268. package/lib/module/a2ui/A2UIPlaceholder.js.map +1 -0
  269. package/lib/module/a2ui/A2UIRenderer.js +363 -0
  270. package/lib/module/a2ui/A2UIRenderer.js.map +1 -0
  271. package/lib/module/a2ui/A2UIStream.js +91 -0
  272. package/lib/module/a2ui/A2UIStream.js.map +1 -0
  273. package/lib/module/a2ui/A2UISurface.js +237 -0
  274. package/lib/module/a2ui/A2UISurface.js.map +1 -0
  275. package/lib/module/a2ui/basicCatalog.json +1206 -0
  276. package/lib/module/a2ui/basicFunctions.js +398 -0
  277. package/lib/module/a2ui/basicFunctions.js.map +1 -0
  278. package/lib/module/a2ui/catalogDocument.js +80 -0
  279. package/lib/module/a2ui/catalogDocument.js.map +1 -0
  280. package/lib/module/a2ui/catalogs.js +105 -0
  281. package/lib/module/a2ui/catalogs.js.map +1 -0
  282. package/lib/module/a2ui/components/DateTimeInput.js +445 -0
  283. package/lib/module/a2ui/components/DateTimeInput.js.map +1 -0
  284. package/lib/module/a2ui/components/Media.js +316 -0
  285. package/lib/module/a2ui/components/Media.js.map +1 -0
  286. package/lib/module/a2ui/components/basicComponents.js +975 -0
  287. package/lib/module/a2ui/components/basicComponents.js.map +1 -0
  288. package/lib/module/a2ui/components/iconPaths.js +66 -0
  289. package/lib/module/a2ui/components/iconPaths.js.map +1 -0
  290. package/lib/module/a2ui/components/types.js +4 -0
  291. package/lib/module/a2ui/components/types.js.map +1 -0
  292. package/lib/module/a2ui/index.js +70 -0
  293. package/lib/module/a2ui/index.js.map +1 -0
  294. package/lib/module/a2ui/instructions.js +268 -0
  295. package/lib/module/a2ui/instructions.js.map +1 -0
  296. package/lib/module/a2ui/secrets.js +169 -0
  297. package/lib/module/a2ui/secrets.js.map +1 -0
  298. package/lib/module/a2ui/useReplyState.js +35 -0
  299. package/lib/module/a2ui/useReplyState.js.map +1 -0
  300. package/lib/module/ai-components/AITypingIndicatorView.js +8 -18
  301. package/lib/module/ai-components/AITypingIndicatorView.js.map +1 -1
  302. package/lib/module/ai-components/README.md +64 -3
  303. package/lib/module/ai-components/StreamingMessageView.js +26 -0
  304. package/lib/module/ai-components/StreamingMessageView.js.map +1 -1
  305. package/lib/module/ai-components/charts/components/PieLegend.js +2 -1
  306. package/lib/module/ai-components/charts/components/PieLegend.js.map +1 -1
  307. package/lib/module/ai-components/charts/components/VictoryChart.js +7 -2
  308. package/lib/module/ai-components/charts/components/VictoryChart.js.map +1 -1
  309. package/lib/module/ai-components/charts/utils/format-time-label.js +15 -0
  310. package/lib/module/ai-components/charts/utils/format-time-label.js.map +1 -0
  311. package/lib/module/ai-components/charts/vega-lite/schema.js +17 -2
  312. package/lib/module/ai-components/charts/vega-lite/schema.js.map +1 -1
  313. package/lib/module/ai-components/contexts/composer-context.js +13 -6
  314. package/lib/module/ai-components/contexts/composer-context.js.map +1 -1
  315. package/lib/module/ai-components/contexts/index.js +11 -0
  316. package/lib/module/ai-components/contexts/index.js.map +1 -1
  317. package/lib/module/ai-components/contexts/theme-context.js +33 -2
  318. package/lib/module/ai-components/contexts/theme-context.js.map +1 -1
  319. package/lib/module/ai-components/contexts/translation-context.js +29 -0
  320. package/lib/module/ai-components/contexts/translation-context.js.map +1 -0
  321. package/lib/module/ai-components/conversation/AIConversation.js +374 -0
  322. package/lib/module/ai-components/conversation/AIConversation.js.map +1 -0
  323. package/lib/module/ai-components/conversation/entries.js +98 -0
  324. package/lib/module/ai-components/conversation/entries.js.map +1 -0
  325. package/lib/module/ai-components/conversation/index.js +15 -0
  326. package/lib/module/ai-components/conversation/index.js.map +1 -0
  327. package/lib/module/ai-components/conversation/list/AIChatList.js +224 -0
  328. package/lib/module/ai-components/conversation/list/AIChatList.js.map +1 -0
  329. package/lib/module/ai-components/conversation/list/useChatListController.js +78 -0
  330. package/lib/module/ai-components/conversation/list/useChatListController.js.map +1 -0
  331. package/lib/module/ai-components/conversation/list/useEndInView.js +51 -0
  332. package/lib/module/ai-components/conversation/list/useEndInView.js.map +1 -0
  333. package/lib/module/ai-components/conversation/list/useKeyboardOverlap.js +53 -0
  334. package/lib/module/ai-components/conversation/list/useKeyboardOverlap.js.map +1 -0
  335. package/lib/module/ai-components/conversation/list/useLoadOlder.js +73 -0
  336. package/lib/module/ai-components/conversation/list/useLoadOlder.js.map +1 -0
  337. package/lib/module/ai-components/conversation/list/usePinnedAnchor.js +84 -0
  338. package/lib/module/ai-components/conversation/list/usePinnedAnchor.js.map +1 -0
  339. package/lib/module/ai-components/conversation/useConversationRows.js +117 -0
  340. package/lib/module/ai-components/conversation/useConversationRows.js.map +1 -0
  341. package/lib/module/ai-components/conversation-state/controller/AIAgentError.js +13 -0
  342. package/lib/module/ai-components/conversation-state/controller/AIAgentError.js.map +1 -0
  343. package/lib/module/ai-components/conversation-state/controller/AIConversationController.js +431 -0
  344. package/lib/module/ai-components/conversation-state/controller/AIConversationController.js.map +1 -0
  345. package/lib/module/ai-components/conversation-state/controller/AIConversationExchange.js +89 -0
  346. package/lib/module/ai-components/conversation-state/controller/AIConversationExchange.js.map +1 -0
  347. package/lib/module/ai-components/conversation-state/controller/index.js +48 -0
  348. package/lib/module/ai-components/conversation-state/controller/index.js.map +1 -0
  349. package/lib/module/ai-components/conversation-state/controller/offers.js +35 -0
  350. package/lib/module/ai-components/conversation-state/controller/offers.js.map +1 -0
  351. package/lib/module/ai-components/conversation-state/controller/types.js +13 -0
  352. package/lib/module/ai-components/conversation-state/controller/types.js.map +1 -0
  353. package/lib/module/ai-components/conversation-state/controller/useAIConversationState.js +8 -0
  354. package/lib/module/ai-components/conversation-state/controller/useAIConversationState.js.map +1 -0
  355. package/lib/module/ai-components/conversation-state/fromStreamMessage.js +67 -0
  356. package/lib/module/ai-components/conversation-state/fromStreamMessage.js.map +1 -0
  357. package/lib/module/ai-components/conversation-state/index.js +37 -0
  358. package/lib/module/ai-components/conversation-state/index.js.map +1 -0
  359. package/lib/module/ai-components/conversation-state/types.js +4 -0
  360. package/lib/module/ai-components/conversation-state/types.js.map +1 -0
  361. package/lib/module/ai-components/generative-ui/AIUIAction.js +30 -0
  362. package/lib/module/ai-components/generative-ui/AIUIAction.js.map +1 -0
  363. package/lib/module/ai-components/generative-ui/AIUIArguments.js +128 -0
  364. package/lib/module/ai-components/generative-ui/AIUIArguments.js.map +1 -0
  365. package/lib/module/ai-components/generative-ui/AIUIComponent.js +50 -0
  366. package/lib/module/ai-components/generative-ui/AIUIComponent.js.map +1 -0
  367. package/lib/module/ai-components/generative-ui/AIUIComponentDefinition.js +134 -0
  368. package/lib/module/ai-components/generative-ui/AIUIComponentDefinition.js.map +1 -0
  369. package/lib/module/ai-components/generative-ui/AIUIDocument.js +32 -0
  370. package/lib/module/ai-components/generative-ui/AIUIDocument.js.map +1 -0
  371. package/lib/module/ai-components/generative-ui/AIUIEntrance.js +197 -0
  372. package/lib/module/ai-components/generative-ui/AIUIEntrance.js.map +1 -0
  373. package/lib/module/ai-components/generative-ui/AIUIErrorBoundary.js +30 -0
  374. package/lib/module/ai-components/generative-ui/AIUIErrorBoundary.js.map +1 -0
  375. package/lib/module/ai-components/generative-ui/AIUIHelpers.js +54 -0
  376. package/lib/module/ai-components/generative-ui/AIUIHelpers.js.map +1 -0
  377. package/lib/module/ai-components/generative-ui/AIUIHost.js +259 -0
  378. package/lib/module/ai-components/generative-ui/AIUIHost.js.map +1 -0
  379. package/lib/module/ai-components/generative-ui/AIUIMedia.js +24 -0
  380. package/lib/module/ai-components/generative-ui/AIUIMedia.js.map +1 -0
  381. package/lib/module/ai-components/generative-ui/AIUIRenderer.js +10 -0
  382. package/lib/module/ai-components/generative-ui/AIUIRenderer.js.map +1 -0
  383. package/lib/module/ai-components/generative-ui/AIUIView.js +57 -0
  384. package/lib/module/ai-components/generative-ui/AIUIView.js.map +1 -0
  385. package/lib/module/ai-components/generative-ui/index.js +181 -0
  386. package/lib/module/ai-components/generative-ui/index.js.map +1 -0
  387. package/lib/module/ai-components/icons.js +44 -0
  388. package/lib/module/ai-components/icons.js.map +1 -0
  389. package/lib/module/ai-components/index.js +96 -0
  390. package/lib/module/ai-components/index.js.map +1 -1
  391. package/lib/module/ai-components/internal/Shimmer.js +36 -0
  392. package/lib/module/ai-components/internal/Shimmer.js.map +1 -0
  393. package/lib/module/ai-components/internal/format.js +66 -0
  394. package/lib/module/ai-components/internal/format.js.map +1 -0
  395. package/lib/module/ai-components/internal/hooks/useBottomSafeArea.js +12 -0
  396. package/lib/module/ai-components/internal/hooks/useBottomSafeArea.js.map +1 -0
  397. package/lib/module/ai-components/internal/icons/AgentIcons.js +74 -0
  398. package/lib/module/ai-components/internal/icons/AgentIcons.js.map +1 -0
  399. package/lib/module/ai-components/internal/keyboard.js +40 -0
  400. package/lib/module/ai-components/internal/keyboard.js.map +1 -0
  401. package/lib/module/ai-components/internal/tokens.js +11 -0
  402. package/lib/module/ai-components/internal/tokens.js.map +1 -0
  403. package/lib/module/ai-components/internal/uuid.js +21 -0
  404. package/lib/module/ai-components/internal/uuid.js.map +1 -0
  405. package/lib/module/ai-components/markdown/components/CodeBlock.js +4 -2
  406. package/lib/module/ai-components/markdown/components/CodeBlock.js.map +1 -1
  407. package/lib/module/ai-components/markdown/components/InlineCode.js +1 -0
  408. package/lib/module/ai-components/markdown/components/InlineCode.js.map +1 -1
  409. package/lib/module/ai-components/markdown/components/Text.js +11 -2
  410. package/lib/module/ai-components/markdown/components/Text.js.map +1 -1
  411. package/lib/module/ai-components/markdown/styles.js +27 -29
  412. package/lib/module/ai-components/markdown/styles.js.map +1 -1
  413. package/lib/module/ai-components/message/AIAssistantMessage.js +64 -0
  414. package/lib/module/ai-components/message/AIAssistantMessage.js.map +1 -0
  415. package/lib/module/ai-components/message/AIMessageAttachment.js +189 -0
  416. package/lib/module/ai-components/message/AIMessageAttachment.js.map +1 -0
  417. package/lib/module/ai-components/message/AIReplyActions.js +132 -0
  418. package/lib/module/ai-components/message/AIReplyActions.js.map +1 -0
  419. package/lib/module/ai-components/message/AIUserMessage.js +104 -0
  420. package/lib/module/ai-components/message/AIUserMessage.js.map +1 -0
  421. package/lib/module/ai-components/message/UserMessageMenu.js +150 -0
  422. package/lib/module/ai-components/message/UserMessageMenu.js.map +1 -0
  423. package/lib/module/ai-components/message/index.js +48 -0
  424. package/lib/module/ai-components/message/index.js.map +1 -0
  425. package/lib/module/ai-components/message-composer/ActionButton.js +4 -2
  426. package/lib/module/ai-components/message-composer/ActionButton.js.map +1 -1
  427. package/lib/module/ai-components/message-composer/ActionSheet.js +22 -6
  428. package/lib/module/ai-components/message-composer/ActionSheet.js.map +1 -1
  429. package/lib/module/ai-components/message-composer/AttachmentButton.js +5 -1
  430. package/lib/module/ai-components/message-composer/AttachmentButton.js.map +1 -1
  431. package/lib/module/ai-components/message-composer/ChatOptions.js +147 -0
  432. package/lib/module/ai-components/message-composer/ChatOptions.js.map +1 -0
  433. package/lib/module/ai-components/message-composer/ComposerView.js +146 -20
  434. package/lib/module/ai-components/message-composer/ComposerView.js.map +1 -1
  435. package/lib/module/ai-components/message-composer/EditingMessageChip.js +81 -0
  436. package/lib/module/ai-components/message-composer/EditingMessageChip.js.map +1 -0
  437. package/lib/module/ai-components/message-composer/MediaPreviewList.js +26 -1
  438. package/lib/module/ai-components/message-composer/MediaPreviewList.js.map +1 -1
  439. package/lib/module/ai-components/message-composer/index.js +11 -0
  440. package/lib/module/ai-components/message-composer/index.js.map +1 -1
  441. package/lib/module/ai-components/message-parts/AIMessageParts.js +133 -0
  442. package/lib/module/ai-components/message-parts/AIMessageParts.js.map +1 -0
  443. package/lib/module/ai-components/message-parts/AIToolApproval.js +197 -0
  444. package/lib/module/ai-components/message-parts/AIToolApproval.js.map +1 -0
  445. package/lib/module/ai-components/message-parts/AIToolAuthorization.js +250 -0
  446. package/lib/module/ai-components/message-parts/AIToolAuthorization.js.map +1 -0
  447. package/lib/module/ai-components/message-parts/AIToolCall.js +159 -0
  448. package/lib/module/ai-components/message-parts/AIToolCall.js.map +1 -0
  449. package/lib/module/ai-components/message-parts/callStates.js +54 -0
  450. package/lib/module/ai-components/message-parts/callStates.js.map +1 -0
  451. package/lib/module/ai-components/message-parts/index.js +70 -0
  452. package/lib/module/ai-components/message-parts/index.js.map +1 -0
  453. package/lib/module/ai-components/message-parts/parseMessageParts.js +126 -0
  454. package/lib/module/ai-components/message-parts/parseMessageParts.js.map +1 -0
  455. package/lib/module/ai-components/message-parts/types.js +2 -0
  456. package/lib/module/ai-components/message-parts/types.js.map +1 -0
  457. package/lib/module/ai-components/native-specs/NativeAIAgent.js +7 -0
  458. package/lib/module/ai-components/native-specs/NativeAIAgent.js.map +1 -0
  459. package/lib/module/ai-components/reasoning/AIReasoning.js +401 -0
  460. package/lib/module/ai-components/reasoning/AIReasoning.js.map +1 -0
  461. package/lib/module/ai-components/reasoning/index.js +26 -0
  462. package/lib/module/ai-components/reasoning/index.js.map +1 -0
  463. package/lib/module/ai-components/reasoning/thinkingClock.js +63 -0
  464. package/lib/module/ai-components/reasoning/thinkingClock.js.map +1 -0
  465. package/lib/module/ai-components/services/clipboard-service/expo.js +7 -2
  466. package/lib/module/ai-components/services/clipboard-service/expo.js.map +1 -1
  467. package/lib/module/ai-components/store/composer/store.js.map +1 -1
  468. package/lib/module/ai-components/store/composer/useComposerChatOption.js +18 -0
  469. package/lib/module/ai-components/store/composer/useComposerChatOption.js.map +1 -0
  470. package/lib/module/ai-components/store/composer/useComposerIsEditing.js +18 -0
  471. package/lib/module/ai-components/store/composer/useComposerIsEditing.js.map +1 -0
  472. package/lib/module/ai-components/store/index.js +22 -0
  473. package/lib/module/ai-components/store/index.js.map +1 -1
  474. package/lib/module/ai-components/suggestions/AISuggestions.js +66 -0
  475. package/lib/module/ai-components/suggestions/AISuggestions.js.map +1 -0
  476. package/lib/module/ai-components/suggestions/index.js +15 -0
  477. package/lib/module/ai-components/suggestions/index.js.map +1 -0
  478. package/lib/module/ai-components/syntax-highlighting/utils/flatten-nodes.js +2 -1
  479. package/lib/module/ai-components/syntax-highlighting/utils/flatten-nodes.js.map +1 -1
  480. package/lib/module/ai-components/syntax-highlighting/utils/renderer.js +3 -2
  481. package/lib/module/ai-components/syntax-highlighting/utils/renderer.js.map +1 -1
  482. package/lib/module/ai-components/theme.js +137 -1
  483. package/lib/module/ai-components/theme.js.map +1 -1
  484. package/lib/module/ai-components/tool-calls/AIClientIdentity.js +22 -0
  485. package/lib/module/ai-components/tool-calls/AIClientIdentity.js.map +1 -0
  486. package/lib/module/ai-components/tool-calls/AIClientToolRunner.js +109 -0
  487. package/lib/module/ai-components/tool-calls/AIClientToolRunner.js.map +1 -0
  488. package/lib/module/ai-components/tool-calls/AIToolApprover.js +23 -0
  489. package/lib/module/ai-components/tool-calls/AIToolApprover.js.map +1 -0
  490. package/lib/module/ai-components/tool-calls/authSessionAuthorizer.js +88 -0
  491. package/lib/module/ai-components/tool-calls/authSessionAuthorizer.js.map +1 -0
  492. package/lib/module/ai-components/tool-calls/index.js +48 -0
  493. package/lib/module/ai-components/tool-calls/index.js.map +1 -0
  494. package/lib/module/ai-components/voice-visualization/glowShader.js.map +1 -1
  495. package/lib/module/components/Accessibility/useAccessibilityAnnouncer.js.map +1 -1
  496. package/lib/module/components/Message/MessageItemView/utils/renderText.js.map +1 -1
  497. package/lib/module/contexts/translationContext/TranslationContext.js +2 -2
  498. package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
  499. package/lib/module/i18n/ar.json +40 -1
  500. package/lib/module/i18n/en.json +40 -1
  501. package/lib/module/i18n/es.json +40 -1
  502. package/lib/module/i18n/fr.json +40 -1
  503. package/lib/module/i18n/he.json +40 -1
  504. package/lib/module/i18n/hi.json +40 -1
  505. package/lib/module/i18n/it.json +40 -1
  506. package/lib/module/i18n/ja.json +40 -1
  507. package/lib/module/i18n/ko.json +40 -1
  508. package/lib/module/i18n/nl.json +40 -1
  509. package/lib/module/i18n/pt-br.json +40 -1
  510. package/lib/module/i18n/ru.json +40 -1
  511. package/lib/module/i18n/tr.json +40 -1
  512. package/lib/module/mock-builders/a2ui/ohrid.js +84 -0
  513. package/lib/module/mock-builders/a2ui/ohrid.js.map +1 -0
  514. package/lib/module/utils/i18n/Streami18n.js +9 -4
  515. package/lib/module/utils/i18n/Streami18n.js.map +1 -1
  516. package/lib/module/utils/i18n/utils.js +7 -0
  517. package/lib/module/utils/i18n/utils.js.map +1 -0
  518. package/lib/module/version.json +1 -1
  519. package/lib/typescript/a11y/a11yUtils.d.ts +0 -1
  520. package/lib/typescript/a11y/a11yUtils.d.ts.map +1 -1
  521. package/lib/typescript/a11y/hooks/useResolvedModalAccessibilityProps.d.ts +2 -3
  522. package/lib/typescript/a11y/hooks/useResolvedModalAccessibilityProps.d.ts.map +1 -1
  523. package/lib/typescript/a2ui/A2UIContexts.d.ts +9 -0
  524. package/lib/typescript/a2ui/A2UIContexts.d.ts.map +1 -0
  525. package/lib/typescript/a2ui/A2UIInstructions.d.ts +47 -0
  526. package/lib/typescript/a2ui/A2UIInstructions.d.ts.map +1 -0
  527. package/lib/typescript/a2ui/A2UIPlaceholder.d.ts +4 -0
  528. package/lib/typescript/a2ui/A2UIPlaceholder.d.ts.map +1 -0
  529. package/lib/typescript/a2ui/A2UIRenderer.d.ts +130 -0
  530. package/lib/typescript/a2ui/A2UIRenderer.d.ts.map +1 -0
  531. package/lib/typescript/a2ui/A2UIStream.d.ts +23 -0
  532. package/lib/typescript/a2ui/A2UIStream.d.ts.map +1 -0
  533. package/lib/typescript/a2ui/A2UISurface.d.ts +19 -0
  534. package/lib/typescript/a2ui/A2UISurface.d.ts.map +1 -0
  535. package/lib/typescript/a2ui/basicFunctions.d.ts +10 -0
  536. package/lib/typescript/a2ui/basicFunctions.d.ts.map +1 -0
  537. package/lib/typescript/a2ui/catalogDocument.d.ts +56 -0
  538. package/lib/typescript/a2ui/catalogDocument.d.ts.map +1 -0
  539. package/lib/typescript/a2ui/catalogs.d.ts +42 -0
  540. package/lib/typescript/a2ui/catalogs.d.ts.map +1 -0
  541. package/lib/typescript/a2ui/components/DateTimeInput.d.ts +44 -0
  542. package/lib/typescript/a2ui/components/DateTimeInput.d.ts.map +1 -0
  543. package/lib/typescript/a2ui/components/Media.d.ts +27 -0
  544. package/lib/typescript/a2ui/components/Media.d.ts.map +1 -0
  545. package/lib/typescript/a2ui/components/basicComponents.d.ts +4 -0
  546. package/lib/typescript/a2ui/components/basicComponents.d.ts.map +1 -0
  547. package/lib/typescript/a2ui/components/iconPaths.d.ts +2 -0
  548. package/lib/typescript/a2ui/components/iconPaths.d.ts.map +1 -0
  549. package/lib/typescript/a2ui/components/types.d.ts +23 -0
  550. package/lib/typescript/a2ui/components/types.d.ts.map +1 -0
  551. package/lib/typescript/a2ui/index.d.ts +8 -0
  552. package/lib/typescript/a2ui/index.d.ts.map +1 -0
  553. package/lib/typescript/a2ui/instructions.d.ts +39 -0
  554. package/lib/typescript/a2ui/instructions.d.ts.map +1 -0
  555. package/lib/typescript/a2ui/secrets.d.ts +20 -0
  556. package/lib/typescript/a2ui/secrets.d.ts.map +1 -0
  557. package/lib/typescript/a2ui/useReplyState.d.ts +4 -0
  558. package/lib/typescript/a2ui/useReplyState.d.ts.map +1 -0
  559. package/lib/typescript/ai-components/AITypingIndicatorView.d.ts.map +1 -1
  560. package/lib/typescript/ai-components/StreamingMessageView.d.ts +4 -1
  561. package/lib/typescript/ai-components/StreamingMessageView.d.ts.map +1 -1
  562. package/lib/typescript/ai-components/charts/components/PieLegend.d.ts.map +1 -1
  563. package/lib/typescript/ai-components/charts/components/VictoryChart.d.ts.map +1 -1
  564. package/lib/typescript/ai-components/charts/utils/format-time-label.d.ts +7 -0
  565. package/lib/typescript/ai-components/charts/utils/format-time-label.d.ts.map +1 -0
  566. package/lib/typescript/ai-components/charts/vega-lite/schema.d.ts +8 -8
  567. package/lib/typescript/ai-components/charts/vega-lite/schema.d.ts.map +1 -1
  568. package/lib/typescript/ai-components/contexts/composer-context.d.ts +3 -0
  569. package/lib/typescript/ai-components/contexts/composer-context.d.ts.map +1 -1
  570. package/lib/typescript/ai-components/contexts/index.d.ts +1 -0
  571. package/lib/typescript/ai-components/contexts/index.d.ts.map +1 -1
  572. package/lib/typescript/ai-components/contexts/theme-context.d.ts.map +1 -1
  573. package/lib/typescript/ai-components/contexts/translation-context.d.ts +19 -0
  574. package/lib/typescript/ai-components/contexts/translation-context.d.ts.map +1 -0
  575. package/lib/typescript/ai-components/conversation/AIConversation.d.ts +133 -0
  576. package/lib/typescript/ai-components/conversation/AIConversation.d.ts.map +1 -0
  577. package/lib/typescript/ai-components/conversation/entries.d.ts +47 -0
  578. package/lib/typescript/ai-components/conversation/entries.d.ts.map +1 -0
  579. package/lib/typescript/ai-components/conversation/index.d.ts +3 -0
  580. package/lib/typescript/ai-components/conversation/index.d.ts.map +1 -0
  581. package/lib/typescript/ai-components/conversation/list/AIChatList.d.ts +30 -0
  582. package/lib/typescript/ai-components/conversation/list/AIChatList.d.ts.map +1 -0
  583. package/lib/typescript/ai-components/conversation/list/useChatListController.d.ts +45 -0
  584. package/lib/typescript/ai-components/conversation/list/useChatListController.d.ts.map +1 -0
  585. package/lib/typescript/ai-components/conversation/list/useEndInView.d.ts +26 -0
  586. package/lib/typescript/ai-components/conversation/list/useEndInView.d.ts.map +1 -0
  587. package/lib/typescript/ai-components/conversation/list/useKeyboardOverlap.d.ts +17 -0
  588. package/lib/typescript/ai-components/conversation/list/useKeyboardOverlap.d.ts.map +1 -0
  589. package/lib/typescript/ai-components/conversation/list/useLoadOlder.d.ts +24 -0
  590. package/lib/typescript/ai-components/conversation/list/useLoadOlder.d.ts.map +1 -0
  591. package/lib/typescript/ai-components/conversation/list/usePinnedAnchor.d.ts +26 -0
  592. package/lib/typescript/ai-components/conversation/list/usePinnedAnchor.d.ts.map +1 -0
  593. package/lib/typescript/ai-components/conversation/useConversationRows.d.ts +66 -0
  594. package/lib/typescript/ai-components/conversation/useConversationRows.d.ts.map +1 -0
  595. package/lib/typescript/ai-components/conversation-state/controller/AIAgentError.d.ts +10 -0
  596. package/lib/typescript/ai-components/conversation-state/controller/AIAgentError.d.ts.map +1 -0
  597. package/lib/typescript/ai-components/conversation-state/controller/AIConversationController.d.ts +173 -0
  598. package/lib/typescript/ai-components/conversation-state/controller/AIConversationController.d.ts.map +1 -0
  599. package/lib/typescript/ai-components/conversation-state/controller/AIConversationExchange.d.ts +23 -0
  600. package/lib/typescript/ai-components/conversation-state/controller/AIConversationExchange.d.ts.map +1 -0
  601. package/lib/typescript/ai-components/conversation-state/controller/index.d.ts +5 -0
  602. package/lib/typescript/ai-components/conversation-state/controller/index.d.ts.map +1 -0
  603. package/lib/typescript/ai-components/conversation-state/controller/offers.d.ts +25 -0
  604. package/lib/typescript/ai-components/conversation-state/controller/offers.d.ts.map +1 -0
  605. package/lib/typescript/ai-components/conversation-state/controller/types.d.ts +142 -0
  606. package/lib/typescript/ai-components/conversation-state/controller/types.d.ts.map +1 -0
  607. package/lib/typescript/ai-components/conversation-state/controller/useAIConversationState.d.ts +9 -0
  608. package/lib/typescript/ai-components/conversation-state/controller/useAIConversationState.d.ts.map +1 -0
  609. package/lib/typescript/ai-components/conversation-state/fromStreamMessage.d.ts +25 -0
  610. package/lib/typescript/ai-components/conversation-state/fromStreamMessage.d.ts.map +1 -0
  611. package/lib/typescript/ai-components/conversation-state/index.d.ts +4 -0
  612. package/lib/typescript/ai-components/conversation-state/index.d.ts.map +1 -0
  613. package/lib/typescript/ai-components/conversation-state/types.d.ts +55 -0
  614. package/lib/typescript/ai-components/conversation-state/types.d.ts.map +1 -0
  615. package/lib/typescript/ai-components/generative-ui/AIUIAction.d.ts +48 -0
  616. package/lib/typescript/ai-components/generative-ui/AIUIAction.d.ts.map +1 -0
  617. package/lib/typescript/ai-components/generative-ui/AIUIArguments.d.ts +15 -0
  618. package/lib/typescript/ai-components/generative-ui/AIUIArguments.d.ts.map +1 -0
  619. package/lib/typescript/ai-components/generative-ui/AIUIComponent.d.ts +51 -0
  620. package/lib/typescript/ai-components/generative-ui/AIUIComponent.d.ts.map +1 -0
  621. package/lib/typescript/ai-components/generative-ui/AIUIComponentDefinition.d.ts +84 -0
  622. package/lib/typescript/ai-components/generative-ui/AIUIComponentDefinition.d.ts.map +1 -0
  623. package/lib/typescript/ai-components/generative-ui/AIUIDocument.d.ts +50 -0
  624. package/lib/typescript/ai-components/generative-ui/AIUIDocument.d.ts.map +1 -0
  625. package/lib/typescript/ai-components/generative-ui/AIUIEntrance.d.ts +76 -0
  626. package/lib/typescript/ai-components/generative-ui/AIUIEntrance.d.ts.map +1 -0
  627. package/lib/typescript/ai-components/generative-ui/AIUIErrorBoundary.d.ts +26 -0
  628. package/lib/typescript/ai-components/generative-ui/AIUIErrorBoundary.d.ts.map +1 -0
  629. package/lib/typescript/ai-components/generative-ui/AIUIHelpers.d.ts +23 -0
  630. package/lib/typescript/ai-components/generative-ui/AIUIHelpers.d.ts.map +1 -0
  631. package/lib/typescript/ai-components/generative-ui/AIUIHost.d.ts +160 -0
  632. package/lib/typescript/ai-components/generative-ui/AIUIHost.d.ts.map +1 -0
  633. package/lib/typescript/ai-components/generative-ui/AIUIMedia.d.ts +22 -0
  634. package/lib/typescript/ai-components/generative-ui/AIUIMedia.d.ts.map +1 -0
  635. package/lib/typescript/ai-components/generative-ui/AIUIRenderer.d.ts +53 -0
  636. package/lib/typescript/ai-components/generative-ui/AIUIRenderer.d.ts.map +1 -0
  637. package/lib/typescript/ai-components/generative-ui/AIUIView.d.ts +35 -0
  638. package/lib/typescript/ai-components/generative-ui/AIUIView.d.ts.map +1 -0
  639. package/lib/typescript/ai-components/generative-ui/index.d.ts +11 -0
  640. package/lib/typescript/ai-components/generative-ui/index.d.ts.map +1 -0
  641. package/lib/typescript/ai-components/icons.d.ts +66 -0
  642. package/lib/typescript/ai-components/icons.d.ts.map +1 -0
  643. package/lib/typescript/ai-components/index.d.ts +8 -0
  644. package/lib/typescript/ai-components/index.d.ts.map +1 -1
  645. package/lib/typescript/ai-components/internal/Shimmer.d.ts +14 -0
  646. package/lib/typescript/ai-components/internal/Shimmer.d.ts.map +1 -0
  647. package/lib/typescript/ai-components/internal/format.d.ts +7 -0
  648. package/lib/typescript/ai-components/internal/format.d.ts.map +1 -0
  649. package/lib/typescript/ai-components/internal/hooks/useBottomSafeArea.d.ts +3 -0
  650. package/lib/typescript/ai-components/internal/hooks/useBottomSafeArea.d.ts.map +1 -0
  651. package/lib/typescript/ai-components/internal/icons/AgentIcons.d.ts +31 -0
  652. package/lib/typescript/ai-components/internal/icons/AgentIcons.d.ts.map +1 -0
  653. package/lib/typescript/ai-components/internal/keyboard.d.ts +9 -0
  654. package/lib/typescript/ai-components/internal/keyboard.d.ts.map +1 -0
  655. package/lib/typescript/ai-components/internal/tokens.d.ts +2 -0
  656. package/lib/typescript/ai-components/internal/tokens.d.ts.map +1 -0
  657. package/lib/typescript/ai-components/internal/uuid.d.ts +2 -0
  658. package/lib/typescript/ai-components/internal/uuid.d.ts.map +1 -0
  659. package/lib/typescript/ai-components/markdown/components/CodeBlock.d.ts.map +1 -1
  660. package/lib/typescript/ai-components/markdown/components/InlineCode.d.ts.map +1 -1
  661. package/lib/typescript/ai-components/markdown/components/Text.d.ts.map +1 -1
  662. package/lib/typescript/ai-components/markdown/styles.d.ts +23 -4
  663. package/lib/typescript/ai-components/markdown/styles.d.ts.map +1 -1
  664. package/lib/typescript/ai-components/markdown/types.d.ts +1 -0
  665. package/lib/typescript/ai-components/markdown/types.d.ts.map +1 -1
  666. package/lib/typescript/ai-components/message/AIAssistantMessage.d.ts +40 -0
  667. package/lib/typescript/ai-components/message/AIAssistantMessage.d.ts.map +1 -0
  668. package/lib/typescript/ai-components/message/AIMessageAttachment.d.ts +33 -0
  669. package/lib/typescript/ai-components/message/AIMessageAttachment.d.ts.map +1 -0
  670. package/lib/typescript/ai-components/message/AIReplyActions.d.ts +19 -0
  671. package/lib/typescript/ai-components/message/AIReplyActions.d.ts.map +1 -0
  672. package/lib/typescript/ai-components/message/AIUserMessage.d.ts +17 -0
  673. package/lib/typescript/ai-components/message/AIUserMessage.d.ts.map +1 -0
  674. package/lib/typescript/ai-components/message/UserMessageMenu.d.ts +31 -0
  675. package/lib/typescript/ai-components/message/UserMessageMenu.d.ts.map +1 -0
  676. package/lib/typescript/ai-components/message/index.d.ts +5 -0
  677. package/lib/typescript/ai-components/message/index.d.ts.map +1 -0
  678. package/lib/typescript/ai-components/message-composer/ActionButton.d.ts +1 -1
  679. package/lib/typescript/ai-components/message-composer/ActionButton.d.ts.map +1 -1
  680. package/lib/typescript/ai-components/message-composer/ActionSheet.d.ts +2 -2
  681. package/lib/typescript/ai-components/message-composer/ActionSheet.d.ts.map +1 -1
  682. package/lib/typescript/ai-components/message-composer/AttachmentButton.d.ts.map +1 -1
  683. package/lib/typescript/ai-components/message-composer/ChatOptions.d.ts +35 -0
  684. package/lib/typescript/ai-components/message-composer/ChatOptions.d.ts.map +1 -0
  685. package/lib/typescript/ai-components/message-composer/ComposerView.d.ts +39 -3
  686. package/lib/typescript/ai-components/message-composer/ComposerView.d.ts.map +1 -1
  687. package/lib/typescript/ai-components/message-composer/EditingMessageChip.d.ts +7 -0
  688. package/lib/typescript/ai-components/message-composer/EditingMessageChip.d.ts.map +1 -0
  689. package/lib/typescript/ai-components/message-composer/MediaPreviewList.d.ts.map +1 -1
  690. package/lib/typescript/ai-components/message-composer/index.d.ts +1 -0
  691. package/lib/typescript/ai-components/message-composer/index.d.ts.map +1 -1
  692. package/lib/typescript/ai-components/message-parts/AIMessageParts.d.ts +40 -0
  693. package/lib/typescript/ai-components/message-parts/AIMessageParts.d.ts.map +1 -0
  694. package/lib/typescript/ai-components/message-parts/AIToolApproval.d.ts +38 -0
  695. package/lib/typescript/ai-components/message-parts/AIToolApproval.d.ts.map +1 -0
  696. package/lib/typescript/ai-components/message-parts/AIToolAuthorization.d.ts +48 -0
  697. package/lib/typescript/ai-components/message-parts/AIToolAuthorization.d.ts.map +1 -0
  698. package/lib/typescript/ai-components/message-parts/AIToolCall.d.ts +11 -0
  699. package/lib/typescript/ai-components/message-parts/AIToolCall.d.ts.map +1 -0
  700. package/lib/typescript/ai-components/message-parts/callStates.d.ts +9 -0
  701. package/lib/typescript/ai-components/message-parts/callStates.d.ts.map +1 -0
  702. package/lib/typescript/ai-components/message-parts/index.d.ts +7 -0
  703. package/lib/typescript/ai-components/message-parts/index.d.ts.map +1 -0
  704. package/lib/typescript/ai-components/message-parts/parseMessageParts.d.ts +47 -0
  705. package/lib/typescript/ai-components/message-parts/parseMessageParts.d.ts.map +1 -0
  706. package/lib/typescript/ai-components/message-parts/types.d.ts +137 -0
  707. package/lib/typescript/ai-components/message-parts/types.d.ts.map +1 -0
  708. package/lib/typescript/ai-components/native-specs/NativeAIAgent.d.ts +22 -0
  709. package/lib/typescript/ai-components/native-specs/NativeAIAgent.d.ts.map +1 -0
  710. package/lib/typescript/ai-components/reasoning/AIReasoning.d.ts +63 -0
  711. package/lib/typescript/ai-components/reasoning/AIReasoning.d.ts.map +1 -0
  712. package/lib/typescript/ai-components/reasoning/index.d.ts +3 -0
  713. package/lib/typescript/ai-components/reasoning/index.d.ts.map +1 -0
  714. package/lib/typescript/ai-components/reasoning/thinkingClock.d.ts +29 -0
  715. package/lib/typescript/ai-components/reasoning/thinkingClock.d.ts.map +1 -0
  716. package/lib/typescript/ai-components/services/clipboard-service/expo.d.ts.map +1 -1
  717. package/lib/typescript/ai-components/store/composer/store.d.ts +8 -0
  718. package/lib/typescript/ai-components/store/composer/store.d.ts.map +1 -1
  719. package/lib/typescript/ai-components/store/composer/useComposerChatOption.d.ts +5 -0
  720. package/lib/typescript/ai-components/store/composer/useComposerChatOption.d.ts.map +1 -0
  721. package/lib/typescript/ai-components/store/composer/useComposerIsEditing.d.ts +5 -0
  722. package/lib/typescript/ai-components/store/composer/useComposerIsEditing.d.ts.map +1 -0
  723. package/lib/typescript/ai-components/store/index.d.ts +2 -0
  724. package/lib/typescript/ai-components/store/index.d.ts.map +1 -1
  725. package/lib/typescript/ai-components/suggestions/AISuggestions.d.ts +13 -0
  726. package/lib/typescript/ai-components/suggestions/AISuggestions.d.ts.map +1 -0
  727. package/lib/typescript/ai-components/suggestions/index.d.ts +2 -0
  728. package/lib/typescript/ai-components/suggestions/index.d.ts.map +1 -0
  729. package/lib/typescript/ai-components/syntax-highlighting/utils/flatten-nodes.d.ts.map +1 -1
  730. package/lib/typescript/ai-components/syntax-highlighting/utils/renderer.d.ts +1 -1
  731. package/lib/typescript/ai-components/syntax-highlighting/utils/renderer.d.ts.map +1 -1
  732. package/lib/typescript/ai-components/theme.d.ts +200 -0
  733. package/lib/typescript/ai-components/theme.d.ts.map +1 -1
  734. package/lib/typescript/ai-components/tool-calls/AIClientIdentity.d.ts +14 -0
  735. package/lib/typescript/ai-components/tool-calls/AIClientIdentity.d.ts.map +1 -0
  736. package/lib/typescript/ai-components/tool-calls/AIClientToolRunner.d.ts +109 -0
  737. package/lib/typescript/ai-components/tool-calls/AIClientToolRunner.d.ts.map +1 -0
  738. package/lib/typescript/ai-components/tool-calls/AIToolApprover.d.ts +48 -0
  739. package/lib/typescript/ai-components/tool-calls/AIToolApprover.d.ts.map +1 -0
  740. package/lib/typescript/ai-components/tool-calls/authSessionAuthorizer.d.ts +57 -0
  741. package/lib/typescript/ai-components/tool-calls/authSessionAuthorizer.d.ts.map +1 -0
  742. package/lib/typescript/ai-components/tool-calls/index.d.ts +5 -0
  743. package/lib/typescript/ai-components/tool-calls/index.d.ts.map +1 -0
  744. package/lib/typescript/ai-components/voice-visualization/glowShader.d.ts.map +1 -1
  745. package/lib/typescript/ai-components/voice-visualization/simplex.d.ts +1 -1
  746. package/lib/typescript/components/Accessibility/NotificationAnnouncer.d.ts +5 -5
  747. package/lib/typescript/components/Accessibility/hooks/useIncomingMessageAnnouncements.d.ts +1 -1
  748. package/lib/typescript/components/Accessibility/useAccessibilityAnnouncer.d.ts +0 -2
  749. package/lib/typescript/components/Accessibility/useAccessibilityAnnouncer.d.ts.map +1 -1
  750. package/lib/typescript/components/Message/MessageItemView/utils/renderText.d.ts.map +1 -1
  751. package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +1 -1
  752. package/lib/typescript/contexts/translationContext/TranslationContext.d.ts.map +1 -1
  753. package/lib/typescript/i18n/ar.json +40 -1
  754. package/lib/typescript/i18n/en.json +40 -1
  755. package/lib/typescript/i18n/es.json +40 -1
  756. package/lib/typescript/i18n/fr.json +40 -1
  757. package/lib/typescript/i18n/he.json +40 -1
  758. package/lib/typescript/i18n/hi.json +40 -1
  759. package/lib/typescript/i18n/it.json +40 -1
  760. package/lib/typescript/i18n/ja.json +40 -1
  761. package/lib/typescript/i18n/ko.json +40 -1
  762. package/lib/typescript/i18n/nl.json +40 -1
  763. package/lib/typescript/i18n/pt-br.json +40 -1
  764. package/lib/typescript/i18n/ru.json +40 -1
  765. package/lib/typescript/i18n/tr.json +40 -1
  766. package/lib/typescript/utils/i18n/Streami18n.d.ts +41 -2
  767. package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
  768. package/lib/typescript/utils/i18n/utils.d.ts +3 -0
  769. package/lib/typescript/utils/i18n/utils.d.ts.map +1 -0
  770. package/package.json +10 -2
  771. package/src/a11y/a11yUtils.ts +0 -1
  772. package/src/a11y/hooks/useResolvedModalAccessibilityProps.ts +2 -3
  773. package/src/a2ui/A2UIContexts.ts +15 -0
  774. package/src/a2ui/A2UIInstructions.ts +102 -0
  775. package/src/a2ui/A2UIPlaceholder.tsx +24 -0
  776. package/src/a2ui/A2UIRenderer.tsx +504 -0
  777. package/src/a2ui/A2UIStream.ts +105 -0
  778. package/src/a2ui/A2UISurface.tsx +270 -0
  779. package/src/a2ui/__tests__/A2UIInstructions.test.ts +233 -0
  780. package/src/a2ui/__tests__/A2UIRenderer.test.tsx +1559 -0
  781. package/src/a2ui/__tests__/conformance.test.ts +579 -0
  782. package/src/a2ui/basicCatalog.json +1206 -0
  783. package/src/a2ui/basicFunctions.ts +429 -0
  784. package/src/a2ui/catalogDocument.ts +119 -0
  785. package/src/a2ui/catalogs.ts +185 -0
  786. package/src/a2ui/components/DateTimeInput.tsx +381 -0
  787. package/src/a2ui/components/Media.tsx +278 -0
  788. package/src/a2ui/components/basicComponents.tsx +832 -0
  789. package/src/a2ui/components/iconPaths.ts +116 -0
  790. package/src/a2ui/components/types.ts +24 -0
  791. package/src/a2ui/index.ts +18 -0
  792. package/src/a2ui/instructions.ts +341 -0
  793. package/src/a2ui/secrets.ts +154 -0
  794. package/src/a2ui/useReplyState.ts +26 -0
  795. package/src/ai-components/AITypingIndicatorView.tsx +6 -22
  796. package/src/ai-components/README.md +64 -3
  797. package/src/ai-components/StreamingMessageView.tsx +27 -3
  798. package/src/ai-components/__tests__/ComposerView.test.tsx +247 -2
  799. package/src/ai-components/__tests__/Markdown.test.tsx +13 -0
  800. package/src/ai-components/__tests__/StreamingMessageView.test.tsx +69 -0
  801. package/src/ai-components/__tests__/charts.test.ts +75 -0
  802. package/src/ai-components/__tests__/clientToolRunner.test.ts +239 -0
  803. package/src/ai-components/__tests__/conversation.test.tsx +787 -0
  804. package/src/ai-components/__tests__/conversationController.test.ts +1561 -0
  805. package/src/ai-components/__tests__/conversationExchange.test.ts +187 -0
  806. package/src/ai-components/__tests__/conversationRows.test.ts +207 -0
  807. package/src/ai-components/__tests__/conversationUI.test.tsx +606 -0
  808. package/src/ai-components/__tests__/format.test.ts +32 -0
  809. package/src/ai-components/__tests__/generativeUI.test.ts +634 -0
  810. package/src/ai-components/__tests__/keyboard.test.ts +14 -0
  811. package/src/ai-components/__tests__/messagePartViews.test.tsx +385 -0
  812. package/src/ai-components/__tests__/messageParts.test.ts +336 -0
  813. package/src/ai-components/__tests__/messageViews.test.tsx +321 -0
  814. package/src/ai-components/__tests__/signIn.test.tsx +324 -0
  815. package/src/ai-components/__tests__/theme.test.tsx +18 -0
  816. package/src/ai-components/__tests__/translation.test.tsx +85 -0
  817. package/src/ai-components/__tests__/voiceDriver.test.ts +0 -3
  818. package/src/ai-components/__tests__/voicePalette.test.ts +1 -1
  819. package/src/ai-components/__tests__/withoutKeyboardController.test.tsx +60 -0
  820. package/src/ai-components/charts/components/PieLegend.tsx +2 -1
  821. package/src/ai-components/charts/components/VictoryChart.tsx +10 -2
  822. package/src/ai-components/charts/utils/format-time-label.ts +18 -0
  823. package/src/ai-components/charts/vega-lite/schema.ts +19 -2
  824. package/src/ai-components/contexts/composer-context.tsx +13 -5
  825. package/src/ai-components/contexts/index.ts +1 -0
  826. package/src/ai-components/contexts/theme-context.tsx +19 -4
  827. package/src/ai-components/contexts/translation-context.tsx +44 -0
  828. package/src/ai-components/conversation/AIConversation.tsx +612 -0
  829. package/src/ai-components/conversation/entries.ts +177 -0
  830. package/src/ai-components/conversation/index.ts +2 -0
  831. package/src/ai-components/conversation/list/AIChatList.tsx +227 -0
  832. package/src/ai-components/conversation/list/useChatListController.ts +91 -0
  833. package/src/ai-components/conversation/list/useEndInView.ts +61 -0
  834. package/src/ai-components/conversation/list/useKeyboardOverlap.ts +52 -0
  835. package/src/ai-components/conversation/list/useLoadOlder.ts +97 -0
  836. package/src/ai-components/conversation/list/usePinnedAnchor.ts +113 -0
  837. package/src/ai-components/conversation/useConversationRows.ts +231 -0
  838. package/src/ai-components/conversation-state/controller/AIAgentError.ts +14 -0
  839. package/src/ai-components/conversation-state/controller/AIConversationController.ts +628 -0
  840. package/src/ai-components/conversation-state/controller/AIConversationExchange.ts +132 -0
  841. package/src/ai-components/conversation-state/controller/index.ts +4 -0
  842. package/src/ai-components/conversation-state/controller/offers.ts +53 -0
  843. package/src/ai-components/conversation-state/controller/types.ts +154 -0
  844. package/src/ai-components/conversation-state/controller/useAIConversationState.ts +21 -0
  845. package/src/ai-components/conversation-state/fromStreamMessage.ts +89 -0
  846. package/src/ai-components/conversation-state/index.ts +3 -0
  847. package/src/ai-components/conversation-state/types.ts +57 -0
  848. package/src/ai-components/generative-ui/AIUIAction.ts +73 -0
  849. package/src/ai-components/generative-ui/AIUIArguments.ts +117 -0
  850. package/src/ai-components/generative-ui/AIUIComponent.tsx +106 -0
  851. package/src/ai-components/generative-ui/AIUIComponentDefinition.ts +163 -0
  852. package/src/ai-components/generative-ui/AIUIDocument.ts +77 -0
  853. package/src/ai-components/generative-ui/AIUIEntrance.tsx +229 -0
  854. package/src/ai-components/generative-ui/AIUIErrorBoundary.tsx +39 -0
  855. package/src/ai-components/generative-ui/AIUIHelpers.ts +86 -0
  856. package/src/ai-components/generative-ui/AIUIHost.ts +358 -0
  857. package/src/ai-components/generative-ui/AIUIMedia.ts +45 -0
  858. package/src/ai-components/generative-ui/AIUIRenderer.ts +60 -0
  859. package/src/ai-components/generative-ui/AIUIView.tsx +87 -0
  860. package/src/ai-components/generative-ui/index.ts +48 -0
  861. package/src/ai-components/icons.ts +101 -0
  862. package/src/ai-components/index.ts +10 -0
  863. package/src/ai-components/internal/Shimmer.tsx +40 -0
  864. package/src/ai-components/internal/format.ts +69 -0
  865. package/src/ai-components/internal/hooks/useBottomSafeArea.ts +6 -0
  866. package/src/ai-components/internal/icons/AgentIcons.tsx +138 -0
  867. package/src/ai-components/internal/keyboard.tsx +34 -0
  868. package/src/ai-components/internal/tokens.ts +4 -0
  869. package/src/ai-components/internal/uuid.ts +17 -0
  870. package/src/ai-components/markdown/components/CodeBlock.tsx +13 -2
  871. package/src/ai-components/markdown/components/InlineCode.tsx +1 -0
  872. package/src/ai-components/markdown/components/Text.tsx +7 -2
  873. package/src/ai-components/markdown/styles.ts +29 -27
  874. package/src/ai-components/markdown/types.ts +1 -0
  875. package/src/ai-components/message/AIAssistantMessage.tsx +100 -0
  876. package/src/ai-components/message/AIMessageAttachment.tsx +245 -0
  877. package/src/ai-components/message/AIReplyActions.tsx +139 -0
  878. package/src/ai-components/message/AIUserMessage.tsx +121 -0
  879. package/src/ai-components/message/UserMessageMenu.tsx +149 -0
  880. package/src/ai-components/message/index.ts +4 -0
  881. package/src/ai-components/message-composer/ActionButton.tsx +10 -5
  882. package/src/ai-components/message-composer/ActionSheet.tsx +28 -6
  883. package/src/ai-components/message-composer/AttachmentButton.tsx +9 -1
  884. package/src/ai-components/message-composer/ChatOptions.tsx +144 -0
  885. package/src/ai-components/message-composer/ComposerView.tsx +194 -30
  886. package/src/ai-components/message-composer/EditingMessageChip.tsx +62 -0
  887. package/src/ai-components/message-composer/MediaPreviewList.tsx +34 -8
  888. package/src/ai-components/message-composer/index.ts +1 -0
  889. package/src/ai-components/message-parts/AIMessageParts.tsx +145 -0
  890. package/src/ai-components/message-parts/AIToolApproval.tsx +196 -0
  891. package/src/ai-components/message-parts/AIToolAuthorization.tsx +279 -0
  892. package/src/ai-components/message-parts/AIToolCall.tsx +117 -0
  893. package/src/ai-components/message-parts/callStates.ts +44 -0
  894. package/src/ai-components/message-parts/index.ts +6 -0
  895. package/src/ai-components/message-parts/parseMessageParts.ts +195 -0
  896. package/src/ai-components/message-parts/types.ts +157 -0
  897. package/src/ai-components/native-specs/NativeAIAgent.ts +25 -0
  898. package/src/ai-components/reasoning/AIReasoning.tsx +509 -0
  899. package/src/ai-components/reasoning/index.ts +2 -0
  900. package/src/ai-components/reasoning/thinkingClock.ts +109 -0
  901. package/src/ai-components/services/clipboard-service/expo.ts +18 -4
  902. package/src/ai-components/store/composer/store.ts +9 -0
  903. package/src/ai-components/store/composer/useComposerChatOption.ts +15 -0
  904. package/src/ai-components/store/composer/useComposerIsEditing.ts +15 -0
  905. package/src/ai-components/store/index.ts +2 -0
  906. package/src/ai-components/suggestions/AISuggestions.tsx +73 -0
  907. package/src/ai-components/suggestions/index.ts +1 -0
  908. package/src/ai-components/syntax-highlighting/utils/flatten-nodes.ts +2 -1
  909. package/src/ai-components/syntax-highlighting/utils/renderer.tsx +4 -2
  910. package/src/ai-components/theme.ts +334 -0
  911. package/src/ai-components/tool-calls/AIClientIdentity.ts +33 -0
  912. package/src/ai-components/tool-calls/AIClientToolRunner.ts +200 -0
  913. package/src/ai-components/tool-calls/AIToolApprover.tsx +60 -0
  914. package/src/ai-components/tool-calls/authSessionAuthorizer.ts +137 -0
  915. package/src/ai-components/tool-calls/index.ts +4 -0
  916. package/src/ai-components/voice-visualization/glowShader.ts +1 -3
  917. package/src/ai-components/voice-visualization/simplex.ts +1 -1
  918. package/src/components/Accessibility/NotificationAnnouncer.tsx +5 -5
  919. package/src/components/Accessibility/hooks/useIncomingMessageAnnouncements.ts +1 -1
  920. package/src/components/Accessibility/useAccessibilityAnnouncer.ts +0 -2
  921. package/src/components/Message/MessageItemView/utils/renderText.tsx +1 -2
  922. package/src/contexts/translationContext/TranslationContext.tsx +2 -2
  923. package/src/i18n/ar.json +40 -1
  924. package/src/i18n/en.json +40 -1
  925. package/src/i18n/es.json +40 -1
  926. package/src/i18n/fr.json +40 -1
  927. package/src/i18n/he.json +40 -1
  928. package/src/i18n/hi.json +40 -1
  929. package/src/i18n/it.json +40 -1
  930. package/src/i18n/ja.json +40 -1
  931. package/src/i18n/ko.json +40 -1
  932. package/src/i18n/nl.json +40 -1
  933. package/src/i18n/pt-br.json +40 -1
  934. package/src/i18n/ru.json +40 -1
  935. package/src/i18n/tr.json +40 -1
  936. package/src/mock-builders/a2ui/ohrid.ts +106 -0
  937. package/src/utils/i18n/Streami18n.ts +4 -1
  938. package/src/utils/i18n/utils.ts +3 -0
  939. package/src/version.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIConversation.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/conversation/AIConversation.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,47 @@
1
+ import type { AIMessage, AIPendingMessage } from '../conversation-state/types';
2
+ import type { AIUIDocument } from '../generative-ui/AIUIDocument';
3
+ import type { AIMessageAttachmentData } from '../message/AIMessageAttachment';
4
+ /** A row of the conversation: a message, or a message the person sent that is on its way. */
5
+ export type AIConversationEntry = {
6
+ /** The message's id, or, for the copy of a message that was on its way, that message's. */
7
+ id: string;
8
+ isFromUser: boolean;
9
+ /** Whether it is a reply that ends the conversation. */
10
+ isLatestReply: boolean;
11
+ /** The message, or `undefined` for one on its way. */
12
+ message?: AIMessage;
13
+ /** The message on its way, until its copy arrives. */
14
+ pending?: AIPendingMessage;
15
+ /** What the person sent with a message on its way, which its copy shows rather than load it again. */
16
+ sentAttachments: AIMessageAttachmentData[];
17
+ };
18
+ /** The person's message and the replies to it. */
19
+ export type AIConversationTurn = {
20
+ entries: AIConversationEntry[];
21
+ id: string;
22
+ };
23
+ /** Whether a reply's generated UI shows, such as `AIUIHost.canShow`. */
24
+ export type AIConversationCanShowUI = (document: AIUIDocument) => boolean;
25
+ /**
26
+ * Whether the reply is being written, took steps that are all over, and shows no UI: once its
27
+ * answer stops growing, the agent is thinking again, between its steps. An agent's backend can
28
+ * write a round of reasoning as a step only once it is done, so nothing would show meanwhile. A
29
+ * step still going, such as a call waiting for the person, shows itself instead.
30
+ */
31
+ export declare const hasFinishedSteps: (message: AIMessage | undefined, canShowUI?: AIConversationCanShowUI) => message is AIMessage;
32
+ /** Groups the rows into turns, each starting with one of the person's messages. */
33
+ export declare const turnsOf: (entries: AIConversationEntry[]) => AIConversationTurn[];
34
+ /**
35
+ * Follows a message the person sent until its copy arrives in the messages, so the copy takes
36
+ * over its row (and its key) without a flicker, and tells whether the agent is surely about to
37
+ * answer.
38
+ */
39
+ export declare class AIPendingMessageTracker {
40
+ private seen;
41
+ private copies;
42
+ private lastPending?;
43
+ entries(messages: AIMessage[], pending?: AIPendingMessage | null, canShowUI?: AIConversationCanShowUI): AIConversationEntry[];
44
+ private copyOf;
45
+ isAwaitingReply(messages: AIMessage[], pending?: AIPendingMessage | null, canShowUI?: AIConversationCanShowUI): boolean;
46
+ }
47
+ //# sourceMappingURL=entries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/conversation/entries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAG9E,6FAA6F;AAC7F,MAAM,MAAM,mBAAmB,GAAG;IAChC,2FAA2F;IAC3F,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,aAAa,EAAE,OAAO,CAAC;IACvB,sDAAsD;IACtD,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,sDAAsD;IACtD,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,sGAAsG;IACtG,eAAe,EAAE,uBAAuB,EAAE,CAAC;CAC5C,CAAC;AAEF,kDAAkD;AAClD,MAAM,MAAM,kBAAkB,GAAG;IAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhF,wEAAwE;AACxE,MAAM,MAAM,uBAAuB,GAAG,CAAC,QAAQ,EAAE,YAAY,KAAK,OAAO,CAAC;AAsB1E;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,SAAS,GAAG,SAAS,EAC9B,YAAW,uBAAmC,KAC7C,OAAO,IAAI,SAM0C,CAAC;AAEzD,mFAAmF;AACnF,eAAO,MAAM,OAAO,GAAI,SAAS,mBAAmB,EAAE,yBAM9C,CAAC;AAET;;;;GAIG;AACH,qBAAa,uBAAuB;IAGlC,OAAO,CAAC,IAAI,CAAkC;IAE9C,OAAO,CAAC,MAAM,CAAuC;IAGrD,OAAO,CAAC,WAAW,CAAC,CAAmB;IAIvC,OAAO,CACL,QAAQ,EAAE,SAAS,EAAE,EACrB,OAAO,CAAC,EAAE,gBAAgB,GAAG,IAAI,EACjC,SAAS,GAAE,uBAAmC,GAC7C,mBAAmB,EAAE;IAoDxB,OAAO,CAAC,MAAM;IAiBd,eAAe,CACb,QAAQ,EAAE,SAAS,EAAE,EACrB,OAAO,CAAC,EAAE,gBAAgB,GAAG,IAAI,EACjC,SAAS,GAAE,uBAAmC;CAUjD"}
@@ -0,0 +1,3 @@
1
+ export * from './AIConversation';
2
+ export type { AIConversationCanShowUI, AIConversationEntry, AIConversationTurn } from './entries';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/conversation/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,YAAY,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,30 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import type { LegendListRenderItemProps } from '@legendapp/list/react-native';
3
+ export type AIChatListProps<T> = {
4
+ /** The key of the row to pin to the top of what is visible, such as the latest question's. */
5
+ anchorKey: string | undefined;
6
+ data: T[];
7
+ getItemType: (item: T) => string;
8
+ keyExtractor: (item: T) => string;
9
+ renderItem: (props: LegendListRenderItemProps<T>) => ReactNode;
10
+ /** The room for a composer floating over the bottom of the list. */
11
+ bottomInset?: number;
12
+ /** What shows while there are no rows, centered. */
13
+ emptyContent?: ReactNode;
14
+ /**
15
+ * How far above the bottom of the screen the composer sits, such as above a tab bar: the
16
+ * keyboard covers the list only as far as it rises past that. Defaults to the bottom safe area.
17
+ */
18
+ keyboardOffset?: number;
19
+ /** Loads the rows before the first one. `undefined` once there are none left. */
20
+ loadOlderMessages?: () => Promise<void> | void;
21
+ testID?: string;
22
+ };
23
+ /**
24
+ * The list of a chat with an agent: virtualised on Reanimated LegendList, reusing the views of
25
+ * rows scrolled out of sight. It pins `anchorKey`'s row to the top of what is visible, opens at the
26
+ * end, loads older rows as the person scrolls to the start, and offers a button back to the latest
27
+ * row when the end is out of view. What the rows are is the caller's.
28
+ */
29
+ export declare const AIChatList: <T>({ anchorKey, bottomInset, data, emptyContent, getItemType, keyboardOffset: keyboardOffsetProp, keyExtractor, loadOlderMessages, renderItem, testID, }: AIChatListProps<T>) => React.JSX.Element;
30
+ //# sourceMappingURL=AIChatList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIChatList.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation/list/AIChatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAC;AAK/D,OAAO,KAAK,EAAiB,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAU7F,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAC/B,8FAA8F;IAC9F,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IACjC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAClC,UAAU,EAAE,CAAC,KAAK,EAAE,yBAAyB,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;IAC/D,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA6DF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAG,uJAW5B,eAAe,CAAC,CAAC,CAAC,sBAsFpB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { type RefObject } from 'react';
2
+ import type { LegendListRef } from '@legendapp/list/react-native';
3
+ export type ChatListControllerOptions<T> = {
4
+ /** The key of the row to pin to the top, such as the latest question's. */
5
+ anchorKey: string | undefined;
6
+ /** The room for a composer floating over the bottom of the list. */
7
+ bottomInset: number;
8
+ data: readonly T[];
9
+ keyExtractor: (item: T) => string;
10
+ listRef: RefObject<LegendListRef | null>;
11
+ /** Loads the rows before the first one. `undefined` once there are none left. */
12
+ loadOlderMessages?: () => Promise<void> | void;
13
+ };
14
+ /**
15
+ * How a chat list behaves, apart from how it looks: the row to pin, whether the end is in view,
16
+ * and loading older rows. Renders nothing: `listProps` go on a LegendList given `listRef`, and
17
+ * the rest is for the views around it. Any LegendList that keeps `anchoredEndSpace` works.
18
+ */
19
+ export declare const useChatListController: <T>({ anchorKey, bottomInset, data, keyExtractor, listRef, loadOlderMessages, }: ChatListControllerOptions<T>) => {
20
+ isEndInView: boolean;
21
+ /** The keyboard, for views that ride it, such as the button back to the latest row. */
22
+ keyboard: import("react-native-reanimated").SharedValue<import("./useKeyboardOverlap").KeyboardFrame>;
23
+ /** How far above the bottom of the screen the list ends; the list's view sets it. */
24
+ keyboardOffset: RefObject<number>;
25
+ /** Whether older rows load as the list nears its start, so it shows that they are loading. */
26
+ loadsOlder: boolean;
27
+ listProps: {
28
+ onMomentumScrollBegin?: (() => void) | undefined;
29
+ onMomentumScrollEnd?: (() => void) | undefined;
30
+ onScrollBeginDrag?: (() => void) | undefined;
31
+ onScrollEndDrag?: (() => void) | undefined;
32
+ onStartReached?: (() => void) | undefined;
33
+ onStartReachedThreshold?: number | undefined;
34
+ anchoredEndSpace: import("@legendapp/list/react-native").AnchoredEndSpaceConfig | undefined;
35
+ freeze: import("react-native-reanimated").SharedValue<boolean>;
36
+ onLayout: () => void;
37
+ onItemSizeChanged: () => void;
38
+ onMetricsChange: ({ headerSize: size }: {
39
+ headerSize: number;
40
+ }) => void;
41
+ onScroll: () => void;
42
+ };
43
+ scrollToEnd: () => void;
44
+ };
45
+ //# sourceMappingURL=useChatListController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChatListController.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation/list/useChatListController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAG5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AASlE,MAAM,MAAM,yBAAyB,CAAC,CAAC,IAAI;IACzC,2EAA2E;IAC3E,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,oEAAoE;IACpE,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAClC,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACzC,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAChD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,EAAE,6EAOtC,yBAAyB,CAAC,CAAC,CAAC;;IAoC3B,uFAAuF;;IAEvF,qFAAqF;;IAErF,8FAA8F;;;;;;;;;;;;;;;;;;;CAcjG,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type RefObject } from 'react';
2
+ import type { SharedValue } from 'react-native-reanimated';
3
+ import type { LegendListRef } from '@legendapp/list/react-native';
4
+ import { type KeyboardFrame } from './useKeyboardOverlap';
5
+ export type UseEndInViewOptions = {
6
+ /** The room for a composer floating over the bottom of the list, which is not in view. */
7
+ bottomInset: number;
8
+ /** The height of the list's header, which its positions leave out. */
9
+ headerSize: RefObject<number>;
10
+ /** The keyboard, which covers the bottom of the list by as much as it reaches over it. */
11
+ keyboard: SharedValue<KeyboardFrame>;
12
+ /** How far above the bottom of the screen the list ends. */
13
+ keyboardOffset: RefObject<number>;
14
+ listRef: RefObject<LegendListRef | null>;
15
+ };
16
+ /**
17
+ * Whether the end of the last row's content is in view: not the room the anchored latest turn
18
+ * leaves under a short reply, nor the room for the floating composer. Call `scheduleCheckEnd`
19
+ * whenever that may have changed: a scroll, or a row changing size without one, such as an answer
20
+ * typing out, or the keyboard moving. It checks once a frame at most.
21
+ */
22
+ export declare const useEndInView: ({ bottomInset, headerSize, keyboard, keyboardOffset, listRef, }: UseEndInViewOptions) => {
23
+ isEndInView: boolean;
24
+ scheduleCheckEnd: () => void;
25
+ };
26
+ //# sourceMappingURL=useEndInView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEndInView.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation/list/useEndInView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AAEjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,EAAE,KAAK,aAAa,EAAqB,MAAM,sBAAsB,CAAC;AAK7E,MAAM,MAAM,mBAAmB,GAAG;IAChC,0FAA0F;IAC1F,WAAW,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC9B,0FAA0F;IAC1F,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IACrC,4DAA4D;IAC5D,cAAc,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAClC,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,iEAM1B,mBAAmB;;;CAyBrB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type SharedValue } from 'react-native-reanimated';
2
+ export type KeyboardFrame = {
3
+ height: number;
4
+ progress: number;
5
+ };
6
+ /**
7
+ * How far the keyboard reaches over a view that ends `offset` above the bottom of the screen, as
8
+ * `KeyboardAwareLegendList` reckons it: the keyboard's height less the offset, scaled by how far
9
+ * the keyboard is open. In a worklet or on the JS thread.
10
+ */
11
+ export declare const keyboardOverlapOf: (keyboard: KeyboardFrame, offset: number) => number;
12
+ /**
13
+ * The keyboard's height and how far it is open, as it moves. `onSettled` runs on the JS thread
14
+ * once it has finished moving.
15
+ */
16
+ export declare const useKeyboardFrame: (onSettled?: () => void) => SharedValue<KeyboardFrame>;
17
+ //# sourceMappingURL=useKeyboardOverlap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useKeyboardOverlap.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation/list/useKeyboardOverlap.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,WAAW,EAAkB,MAAM,yBAAyB,CAAC;AAIpF,MAAM,MAAM,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,aAAa,EAAE,QAAQ,MAAM,WAGxE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,YAAY,MAAM,IAAI,KAAG,WAAW,CAAC,aAAa,CA8BlF,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { type RefObject } from 'react';
2
+ import type { LegendListRef } from '@legendapp/list/react-native';
3
+ export type UseLoadOlderOptions = {
4
+ listRef: RefObject<LegendListRef | null>;
5
+ /** Loads the rows before the first one. `undefined` once there are none left. */
6
+ loadOlderMessages?: () => Promise<void> | void;
7
+ };
8
+ /**
9
+ * Loads older messages once the spinner above the turns has been in view a moment, and again
10
+ * while it stays in view after a load that failed, or brought nothing while there is more. Only
11
+ * while the list is at rest: on iOS, what arrives above while a finger holds the list, or while
12
+ * it glides or bounces, pushes what is in view down rather than staying out of sight.
13
+ *
14
+ * Returns the list's handlers for it, or none while there is nothing to load.
15
+ */
16
+ export declare const useLoadOlder: ({ listRef, loadOlderMessages }: UseLoadOlderOptions) => {
17
+ onMomentumScrollBegin: () => void;
18
+ onMomentumScrollEnd: () => void;
19
+ onScrollBeginDrag: () => void;
20
+ onScrollEndDrag: () => void;
21
+ onStartReached: () => void;
22
+ onStartReachedThreshold: number;
23
+ } | undefined;
24
+ //# sourceMappingURL=useLoadOlder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLoadOlder.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation/list/useLoadOlder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAUlE,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACzC,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAChD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,gCAAgC,mBAAmB;;;;;;;aAsE/E,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type RefObject } from 'react';
2
+ import type { AnchoredEndSpaceConfig, LegendListRef } from '@legendapp/list/react-native';
3
+ export type UsePinnedAnchorOptions<T> = {
4
+ /** The key of the row to pin to the top, such as the latest question's. */
5
+ anchorKey: string | undefined;
6
+ data: readonly T[];
7
+ /** The height of the list's header, which its positions leave out. */
8
+ headerSize: RefObject<number>;
9
+ keyExtractor: (item: T) => string;
10
+ listRef: RefObject<LegendListRef | null>;
11
+ /** Called once the anchor is laid out, and whenever the room the list leaves under it changes. */
12
+ onAnchorLayout?: () => void;
13
+ };
14
+ /**
15
+ * Pins a row to the top of what is visible: the list leaves room under it (`anchoredEndSpace`),
16
+ * and a new anchor is scrolled to once it is laid out. The keyboard-aware list keeps that room as
17
+ * the scroll view's inset, which follows what is below the row shrinking, and which the keyboard
18
+ * takes before it lifts anything.
19
+ */
20
+ export declare const usePinnedAnchor: <T>({ anchorKey, data, headerSize, keyExtractor, listRef, onAnchorLayout, }: UsePinnedAnchorOptions<T>) => {
21
+ anchoredEndSpace: AnchoredEndSpaceConfig | undefined;
22
+ onMetricsChange: ({ headerSize: size }: {
23
+ headerSize: number;
24
+ }) => void;
25
+ };
26
+ //# sourceMappingURL=usePinnedAnchor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePinnedAnchor.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation/list/usePinnedAnchor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAiD,MAAM,OAAO,CAAC;AAEtF,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAI1F,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI;IACtC,2EAA2E;IAC3E,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;IACnB,sEAAsE;IACtE,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC9B,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAClC,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACzC,kGAAkG;IAClG,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,yEAOhC,sBAAsB,CAAC,CAAC,CAAC;;4CAsDD;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE;CA2BhD,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type AIConversationCanShowUI, type AIConversationEntry } from './entries';
3
+ import type { AIMessage, AIPendingMessage } from '../conversation-state/types';
4
+ import { AIThinkingClock } from '../reasoning/thinkingClock';
5
+ /**
6
+ * Where a row is: the first of a turn, or within one. The first turn has the same room above it as
7
+ * the others, so older messages arriving above it leave it where it is.
8
+ */
9
+ export type RowPosition = 'turn' | 'message';
10
+ /** A row of the list: one message, with the turn it belongs to. */
11
+ export type EntryRow = {
12
+ entry: AIConversationEntry;
13
+ key: string;
14
+ kind: 'entry';
15
+ position: RowPosition;
16
+ turnKey: string;
17
+ /** The turn's first reasoning step, which takes over the seconds the turn was seen thinking. */
18
+ firstStepId?: string;
19
+ /**
20
+ * When the agent started thinking again between the steps of this reply, which is being
21
+ * written, and which its seconds count from. It thinks under the reply, in the reply's row, so
22
+ * it moves with the reply's steps as they fold.
23
+ */
24
+ thinkingSince?: number;
25
+ };
26
+ /**
27
+ * What ends the latest turn: the agent thinking, and the app's footer. A row of its own rather than
28
+ * the list's footer: the list lays its rows out itself, together with the room it leaves under the
29
+ * latest turn, while a footer that goes away shrinks the content at once, which moves the view.
30
+ */
31
+ export type TailRow = {
32
+ isThinking: boolean;
33
+ key: string;
34
+ kind: 'tail';
35
+ turnKey: string;
36
+ firstStepId?: string;
37
+ footer?: ReactNode;
38
+ };
39
+ export type ConversationRow = EntryRow | TailRow;
40
+ export type UseConversationRowsOptions = {
41
+ messages: AIMessage[];
42
+ /** Whether a reply's generated UI shows, so a reply that shows only UI has a row. */
43
+ canShowUI?: AIConversationCanShowUI;
44
+ footer?: ReactNode;
45
+ isThinking?: boolean;
46
+ /** Whether `isThinking` alone says whether the agent is thinking, rather than the rows too. */
47
+ isThinkingKnown?: boolean;
48
+ pendingMessage?: AIPendingMessage | null;
49
+ };
50
+ export type ConversationRows = {
51
+ /** The key of the latest turn's first row, which pins to the top: `undefined` with no turns. */
52
+ anchorKey: string | undefined;
53
+ /** The turns' thinking clock, for `AIThinkingTurnContext`. */
54
+ clock: AIThinkingClock;
55
+ /** The rows to list: each message, then what ends the latest turn while there is any. */
56
+ rows: ConversationRow[];
57
+ /** Whether there are no messages to show yet, not even one on its way. */
58
+ isEmpty: boolean;
59
+ };
60
+ /**
61
+ * The conversation's data, as rows for a list: its messages grouped into turns, a message on its
62
+ * way until its copy arrives, and what ends the latest turn. Each unchanged row keeps its object,
63
+ * so the list renders only the rows that changed. Knows nothing about the list itself.
64
+ */
65
+ export declare const useConversationRows: ({ canShowUI, footer, isThinking, isThinkingKnown, messages, pendingMessage, }: UseConversationRowsOptions) => ConversationRows;
66
+ //# sourceMappingURL=useConversationRows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConversationRows.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/conversation/useConversationRows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA8C,MAAM,OAAO,CAAC;AAEnF,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EAKzB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAE7C,mEAAmE;AACnE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,WAAW,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,gGAAgG;IAChG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;AAqCjD,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,qFAAqF;IACrF,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+FAA+F;IAC/F,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gGAAgG;IAChG,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,8DAA8D;IAC9D,KAAK,EAAE,eAAe,CAAC;IACvB,yFAAyF;IACzF,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,0EAA0E;IAC1E,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,+EAOjC,0BAA0B,KAAG,gBA0G/B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The agent couldn't answer: it said so, with what it said as `agentMessage`, or it didn't start
3
+ * its reply in time.
4
+ */
5
+ export declare class AIAgentError extends Error {
6
+ /** What the agent said about it, if anything. */
7
+ readonly agentMessage?: string;
8
+ constructor(agentMessage?: string);
9
+ }
10
+ //# sourceMappingURL=AIAgentError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIAgentError.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation-state/controller/AIAgentError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,iDAAiD;IACjD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEnB,YAAY,CAAC,EAAE,MAAM;CAKlC"}
@@ -0,0 +1,173 @@
1
+ import { StateStore } from '@stream-io/state-store';
2
+ import { type AIAgentActivity, type AIConversationActions, type AIConversationStatus, type AIConversationTransport } from './types';
3
+ import type { AIMessageRating, AIReplyActionsProps } from '../../message/AIReplyActions';
4
+ import type { AIChatOption } from '../../message-composer/ChatOptions';
5
+ import type { MediaAsset } from '../../services/media-picker-service/AbstractMediaPickerService';
6
+ import { type ComposerState } from '../../store/composer/store';
7
+ import type { AIToolApprover } from '../../tool-calls/AIToolApprover';
8
+ import type { AIMessage, AIPendingMessage } from '../types';
9
+ export type AIConversationControllerState<Message extends AIMessage = AIMessage> = {
10
+ /** The conversation as it shows, oldest message first. */
11
+ messages: readonly Message[];
12
+ /**
13
+ * The message the person sent last that is not in the conversation yet. It stays until its
14
+ * reply starts, and after it was stopped or failed, while `retry()` can send it again.
15
+ */
16
+ pendingMessage: AIPendingMessage | undefined;
17
+ /** Where the latest exchange with the agent is. */
18
+ status: AIConversationStatus;
19
+ /**
20
+ * Why the latest request failed, or, as an `AIAgentError`, what the agent said when it couldn't
21
+ * answer or that it didn't answer in time. It stays until the next request, or until a reply
22
+ * starts after all.
23
+ */
24
+ error: Error | undefined;
25
+ /** What the agent says it is doing besides what its reply shows, such as checking sources. */
26
+ activity: AIAgentActivity | undefined;
27
+ /** Whether the conversation has messages before the first one, which `loadOlderMessages` loads. */
28
+ hasOlderMessages: boolean;
29
+ /**
30
+ * How the person rated replies, by the reply's id: the rating they gave on this device, or else
31
+ * the reply's own `rating`.
32
+ */
33
+ ratings: Readonly<Record<string, AIMessageRating>>;
34
+ };
35
+ export type AIConversationControllerOptions<Message extends AIMessage = AIMessage> = {
36
+ /** How the conversation reaches the agent and learns what it holds. Connected straight away. */
37
+ transport: AIConversationTransport<Message>;
38
+ /** What the conversation's views offer. All of them by default. */
39
+ actions?: AIConversationActions;
40
+ /** Who answers tool calls' questions and sign-ins on this device, which the conversation asks them. */
41
+ approver?: AIToolApprover;
42
+ /** What the person writes, such as a store the app fills itself. A new one by default. */
43
+ composer?: StateStore<ComposerState>;
44
+ /**
45
+ * How many milliseconds the controller waits, once the agent has the request, for the agent to
46
+ * start its reply or say what it is doing, before it shows an `AIAgentError`. While the agent
47
+ * says it is working, such as thinking, it waits as long as that takes. Five minutes by default;
48
+ * `null` or `Infinity` waits as long as it takes.
49
+ */
50
+ replyTimeout?: number | null;
51
+ };
52
+ /** What the person sends: what `ComposerView` hands on. */
53
+ export type AIConversationSendData = {
54
+ text: string;
55
+ /** The files the person picked, on this device. */
56
+ attachments?: MediaAsset[];
57
+ /** The option the person picked in the composer. */
58
+ chatOption?: AIChatOption;
59
+ custom?: Record<string, unknown>;
60
+ };
61
+ /**
62
+ * The state behind an AI conversation, and what the person does in it.
63
+ *
64
+ * It holds the conversation's messages, where the latest exchange with the agent is and why it
65
+ * failed, and it sends what the person asks through its `AIConversationTransport`. Give it to
66
+ * `AIConversation` and `ComposerView` as `conversation`, which show it and act on it: sending,
67
+ * stopping, regenerating and rating replies, and editing the person's latest message.
68
+ *
69
+ * ```tsx
70
+ * const [conversation] = useState(() => new AIConversationController({ transport }));
71
+ * useEffect(() => () => conversation.dispose(), [conversation]);
72
+ *
73
+ * <AIConversation conversation={conversation} />
74
+ * <ComposerView conversation={conversation} />
75
+ * ```
76
+ *
77
+ * What the person sends shows straight away, and the agent thinks until its reply starts. While
78
+ * a reply is written again, or a message the person edited is answered again, the messages it
79
+ * replaces are left out of `messages` until the new reply starts.
80
+ */
81
+ export declare class AIConversationController<Message extends AIMessage = AIMessage> {
82
+ /** The conversation's state, to follow with `useStateStore`. */
83
+ readonly state: StateStore<AIConversationControllerState<Message>>;
84
+ /** What the person is writing: `ComposerView` shows it, and editing a message fills it. */
85
+ readonly composer: StateStore<ComposerState>;
86
+ /** Who answers tool calls' questions and sign-ins on this device. */
87
+ readonly approver: AIToolApprover | undefined;
88
+ /** What the conversation's views offer the person to do with its messages. */
89
+ readonly actions: Required<AIConversationActions>;
90
+ private readonly transport;
91
+ private readonly replyTimeout;
92
+ private readonly disconnect;
93
+ private disposed;
94
+ private received;
95
+ private exchange;
96
+ private generation;
97
+ private stopped;
98
+ private activity;
99
+ private ignoresActivity;
100
+ private error;
101
+ private hasOlderMessages;
102
+ private stopping;
103
+ private replyTimer;
104
+ private edited;
105
+ private ratingChanges;
106
+ private ratingAttempts;
107
+ private isLoadingOlderMessages;
108
+ constructor({ actions, approver, composer, replyTimeout, transport, }: AIConversationControllerOptions<Message>);
109
+ /**
110
+ * The person's message they are editing in the composer, which the next message they send
111
+ * replaces. The composer shows that they are editing it, with a button that cancels it.
112
+ */
113
+ get editingMessage(): Message | undefined;
114
+ /** Stops following the transport and lets go of what is on its way. */
115
+ dispose(): void;
116
+ /** Sends a message, or the person's edit of the message they are editing. */
117
+ send({ attachments, chatOption, custom, text }: AIConversationSendData): void;
118
+ /**
119
+ * Stops the reply the agent is writing. What it wrote so far stays. When the reply hasn't
120
+ * started yet, the person's message stays, and a reply that still arrives is finished whatever
121
+ * it says.
122
+ */
123
+ stop(): void;
124
+ /** Asks the agent for a new reply in place of `reply`, and of those after it. */
125
+ regenerate(reply: Message): void;
126
+ /** Puts a message of the person's in the composer to edit. The next message they send replaces it. */
127
+ edit(message: Message): void;
128
+ /** Stops editing a message, and empties the composer. */
129
+ cancelEditing(): void;
130
+ /**
131
+ * Tries again after `error`: sends the request that failed again, with the same message id, or
132
+ * asks the agent again for the reply it couldn't write.
133
+ */
134
+ retry(): void;
135
+ /** Forgets `error`, and the request that failed. */
136
+ clearError(): void;
137
+ /**
138
+ * Rates a reply, or takes the rating back with `null`. Ratings reach the transport in the order
139
+ * the person gives them, and the reply's rating goes back to the one the transport has if it
140
+ * can't take the new one.
141
+ */
142
+ rate(reply: Message, rating: AIMessageRating | null): void;
143
+ /** Loads the messages before the first one, while there are any. */
144
+ loadOlderMessages: () => Promise<void>;
145
+ /**
146
+ * What the person can do with a finished reply: rate it, and write it again while it is the
147
+ * latest and the agent isn't answering.
148
+ */
149
+ replyActions(reply: Message, isLatestReply: boolean): Omit<AIReplyActionsProps, 'text'>;
150
+ /** Edits a message of the person's, when it is their latest and the agent isn't answering. */
151
+ editAction(message: Message): (() => void) | undefined;
152
+ private makeFeed;
153
+ private receiveMessages;
154
+ private receiveActivity;
155
+ private start;
156
+ private receiveReply;
157
+ private requestSent;
158
+ private requestFailed;
159
+ private stopFailed;
160
+ private agentCouldNotAnswer;
161
+ private waitForReply;
162
+ private clearReplyTimer;
163
+ private replyTimedOut;
164
+ private sendRating;
165
+ private regenerateRequest;
166
+ private get answerAgainRequest();
167
+ private get writingReply();
168
+ private indexOf;
169
+ private refresh;
170
+ private currentRatings;
171
+ private currentStatus;
172
+ }
173
+ //# sourceMappingURL=AIConversationController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIConversationController.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation-state/controller/AIConversationController.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,23 @@
1
+ import type { AIConversationRequest } from './types';
2
+ import type { AIMessageAttachmentData } from '../../message/AIMessageAttachment';
3
+ import type { MediaAsset } from '../../services/media-picker-service/AbstractMediaPickerService';
4
+ import type { AIMessage, AIPendingMessage } from '../types';
5
+ export type AIConversationExchangeState = 'waiting' | 'stopped' | 'failed' | 'unanswered';
6
+ export declare const hasEmptyContent: (message: AIMessage) => boolean;
7
+ export declare const attachmentOfAsset: (asset: MediaAsset) => AIMessageAttachmentData;
8
+ export declare class AIConversationExchange<Message extends AIMessage> {
9
+ readonly id: number;
10
+ readonly request: AIConversationRequest<Message>;
11
+ state: AIConversationExchangeState;
12
+ readonly known: Set<string>;
13
+ readonly replaced: Map<string, Message>;
14
+ readonly pending: AIPendingMessage | undefined;
15
+ constructor(id: number, request: AIConversationRequest<Message>, conversation: readonly Message[]);
16
+ get hasFailed(): boolean;
17
+ get shownPending(): AIPendingMessage | undefined;
18
+ reply(conversation: readonly Message[]): Message | undefined;
19
+ hasReplyStarted(conversation: readonly Message[]): boolean;
20
+ hasMessageArrived(conversation: readonly Message[]): boolean;
21
+ retryRequest(conversation: readonly Message[]): AIConversationRequest<Message>;
22
+ }
23
+ //# sourceMappingURL=AIConversationExchange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIConversationExchange.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation-state/controller/AIConversationExchange.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGrD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gEAAgE,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5D,MAAM,MAAM,2BAA2B,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAI1F,eAAO,MAAM,eAAe,GAAI,SAAS,SAAS,YAIpB,CAAC;AAW/B,eAAO,MAAM,iBAAiB,GAAI,OAAO,UAAU,KAAG,uBAMpD,CAAC;AAGH,qBAAa,sBAAsB,CAAC,OAAO,SAAS,SAAS;IAYzD,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC,OAAO,CAAC;IAZlD,KAAK,EAAE,2BAA2B,CAAa;IAE/C,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAG5B,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAAC;gBAIpC,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,qBAAqB,CAAC,OAAO,CAAC,EAChD,YAAY,EAAE,SAAS,OAAO,EAAE;IAuBlC,IAAI,SAAS,YAEZ;IAKD,IAAI,YAAY,iCAEf;IAID,KAAK,CAAC,YAAY,EAAE,SAAS,OAAO,EAAE;IAStC,eAAe,CAAC,YAAY,EAAE,SAAS,OAAO,EAAE;IAOhD,iBAAiB,CAAC,YAAY,EAAE,SAAS,OAAO,EAAE;IAWlD,YAAY,CAAC,YAAY,EAAE,SAAS,OAAO,EAAE,GAAG,qBAAqB,CAAC,OAAO,CAAC;CAe/E"}
@@ -0,0 +1,5 @@
1
+ export * from './AIAgentError';
2
+ export * from './AIConversationController';
3
+ export * from './types';
4
+ export * from './useAIConversationState';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation-state/controller/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type AIConversationStatus } from './types';
2
+ import type { AIMessageRating, AIReplyActionsProps } from '../../message/AIReplyActions';
3
+ import type { AIMessage } from '../types';
4
+ type Offerer<Message extends AIMessage> = {
5
+ actions: {
6
+ edit: boolean;
7
+ rate: boolean;
8
+ regenerate: boolean;
9
+ };
10
+ edit: (message: Message) => void;
11
+ rate: (reply: Message, rating: AIMessageRating | null) => void;
12
+ regenerate: (reply: Message) => void;
13
+ };
14
+ export declare const replyActionsOf: <Message extends AIMessage>(offerer: Offerer<Message>, { ratings, status, }: {
15
+ ratings: Readonly<Record<string, AIMessageRating>>;
16
+ status: AIConversationStatus;
17
+ }, reply: Message, isLatestReply: boolean) => Omit<AIReplyActionsProps, "text">;
18
+ /** The id of the person's latest message, the one they can edit. */
19
+ export declare const latestUserMessageIdOf: (messages: readonly AIMessage[]) => string | undefined;
20
+ export declare const editActionOf: <Message extends AIMessage>(offerer: Offerer<Message>, { latestUserMessageId, status, }: {
21
+ latestUserMessageId: string | undefined;
22
+ status: AIConversationStatus;
23
+ }, message: Message) => (() => void) | undefined;
24
+ export {};
25
+ //# sourceMappingURL=offers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offers.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation-state/controller/offers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAA6B,MAAM,SAAS,CAAC;AAE/E,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,KAAK,OAAO,CAAC,OAAO,SAAS,SAAS,IAAI;IACxC,OAAO,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/D,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC,CAAC;AAIF,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,SAAS,EACtD,SAAS,OAAO,CAAC,OAAO,CAAC,EACzB,sBAGG;IAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAA;CAAE,EACvF,OAAO,OAAO,EACd,eAAe,OAAO,KACrB,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAOjC,CAAC;AAEH,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,GAAI,UAAU,SAAS,SAAS,EAAE,uBAKnE,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,OAAO,SAAS,SAAS,EACpD,SAAS,OAAO,CAAC,OAAO,CAAC,EACzB,kCAGG;IAAE,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAA;CAAE,EAC5E,SAAS,OAAO,KACf,CAAC,MAAM,IAAI,CAAC,GAAG,SAKjB,CAAC"}