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.
- package/a2ui/package.json +6 -0
- package/ai-components/conversation/package.json +6 -0
- package/lib/commonjs/a11y/a11yUtils.js.map +1 -1
- package/lib/commonjs/a11y/hooks/useResolvedModalAccessibilityProps.js.map +1 -1
- package/lib/commonjs/a2ui/A2UIContexts.js +8 -0
- package/lib/commonjs/a2ui/A2UIContexts.js.map +1 -0
- package/lib/commonjs/a2ui/A2UIInstructions.js +49 -0
- package/lib/commonjs/a2ui/A2UIInstructions.js.map +1 -0
- package/lib/commonjs/a2ui/A2UIPlaceholder.js +37 -0
- package/lib/commonjs/a2ui/A2UIPlaceholder.js.map +1 -0
- package/lib/commonjs/a2ui/A2UIRenderer.js +363 -0
- package/lib/commonjs/a2ui/A2UIRenderer.js.map +1 -0
- package/lib/commonjs/a2ui/A2UIStream.js +91 -0
- package/lib/commonjs/a2ui/A2UIStream.js.map +1 -0
- package/lib/commonjs/a2ui/A2UISurface.js +237 -0
- package/lib/commonjs/a2ui/A2UISurface.js.map +1 -0
- package/lib/commonjs/a2ui/basicCatalog.json +1206 -0
- package/lib/commonjs/a2ui/basicFunctions.js +398 -0
- package/lib/commonjs/a2ui/basicFunctions.js.map +1 -0
- package/lib/commonjs/a2ui/catalogDocument.js +80 -0
- package/lib/commonjs/a2ui/catalogDocument.js.map +1 -0
- package/lib/commonjs/a2ui/catalogs.js +105 -0
- package/lib/commonjs/a2ui/catalogs.js.map +1 -0
- package/lib/commonjs/a2ui/components/DateTimeInput.js +445 -0
- package/lib/commonjs/a2ui/components/DateTimeInput.js.map +1 -0
- package/lib/commonjs/a2ui/components/Media.js +316 -0
- package/lib/commonjs/a2ui/components/Media.js.map +1 -0
- package/lib/commonjs/a2ui/components/basicComponents.js +975 -0
- package/lib/commonjs/a2ui/components/basicComponents.js.map +1 -0
- package/lib/commonjs/a2ui/components/iconPaths.js +66 -0
- package/lib/commonjs/a2ui/components/iconPaths.js.map +1 -0
- package/lib/commonjs/a2ui/components/types.js +4 -0
- package/lib/commonjs/a2ui/components/types.js.map +1 -0
- package/lib/commonjs/a2ui/index.js +70 -0
- package/lib/commonjs/a2ui/index.js.map +1 -0
- package/lib/commonjs/a2ui/instructions.js +268 -0
- package/lib/commonjs/a2ui/instructions.js.map +1 -0
- package/lib/commonjs/a2ui/secrets.js +169 -0
- package/lib/commonjs/a2ui/secrets.js.map +1 -0
- package/lib/commonjs/a2ui/useReplyState.js +35 -0
- package/lib/commonjs/a2ui/useReplyState.js.map +1 -0
- package/lib/commonjs/ai-components/AITypingIndicatorView.js +8 -18
- package/lib/commonjs/ai-components/AITypingIndicatorView.js.map +1 -1
- package/lib/commonjs/ai-components/README.md +64 -3
- package/lib/commonjs/ai-components/StreamingMessageView.js +26 -0
- package/lib/commonjs/ai-components/StreamingMessageView.js.map +1 -1
- package/lib/commonjs/ai-components/charts/components/PieLegend.js +2 -1
- package/lib/commonjs/ai-components/charts/components/PieLegend.js.map +1 -1
- package/lib/commonjs/ai-components/charts/components/VictoryChart.js +7 -2
- package/lib/commonjs/ai-components/charts/components/VictoryChart.js.map +1 -1
- package/lib/commonjs/ai-components/charts/utils/format-time-label.js +15 -0
- package/lib/commonjs/ai-components/charts/utils/format-time-label.js.map +1 -0
- package/lib/commonjs/ai-components/charts/vega-lite/schema.js +17 -2
- package/lib/commonjs/ai-components/charts/vega-lite/schema.js.map +1 -1
- package/lib/commonjs/ai-components/contexts/composer-context.js +13 -6
- package/lib/commonjs/ai-components/contexts/composer-context.js.map +1 -1
- package/lib/commonjs/ai-components/contexts/index.js +11 -0
- package/lib/commonjs/ai-components/contexts/index.js.map +1 -1
- package/lib/commonjs/ai-components/contexts/theme-context.js +33 -2
- package/lib/commonjs/ai-components/contexts/theme-context.js.map +1 -1
- package/lib/commonjs/ai-components/contexts/translation-context.js +29 -0
- package/lib/commonjs/ai-components/contexts/translation-context.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/AIConversation.js +374 -0
- package/lib/commonjs/ai-components/conversation/AIConversation.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/entries.js +98 -0
- package/lib/commonjs/ai-components/conversation/entries.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/index.js +15 -0
- package/lib/commonjs/ai-components/conversation/index.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/AIChatList.js +224 -0
- package/lib/commonjs/ai-components/conversation/list/AIChatList.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/useChatListController.js +78 -0
- package/lib/commonjs/ai-components/conversation/list/useChatListController.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/useEndInView.js +51 -0
- package/lib/commonjs/ai-components/conversation/list/useEndInView.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/useKeyboardOverlap.js +53 -0
- package/lib/commonjs/ai-components/conversation/list/useKeyboardOverlap.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/useLoadOlder.js +73 -0
- package/lib/commonjs/ai-components/conversation/list/useLoadOlder.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/usePinnedAnchor.js +84 -0
- package/lib/commonjs/ai-components/conversation/list/usePinnedAnchor.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/useConversationRows.js +117 -0
- package/lib/commonjs/ai-components/conversation/useConversationRows.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIAgentError.js +13 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIAgentError.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIConversationController.js +431 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIConversationController.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIConversationExchange.js +89 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIConversationExchange.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/index.js +48 -0
- package/lib/commonjs/ai-components/conversation-state/controller/index.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/offers.js +35 -0
- package/lib/commonjs/ai-components/conversation-state/controller/offers.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/types.js +13 -0
- package/lib/commonjs/ai-components/conversation-state/controller/types.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/useAIConversationState.js +8 -0
- package/lib/commonjs/ai-components/conversation-state/controller/useAIConversationState.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/fromStreamMessage.js +67 -0
- package/lib/commonjs/ai-components/conversation-state/fromStreamMessage.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/index.js +37 -0
- package/lib/commonjs/ai-components/conversation-state/index.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/types.js +4 -0
- package/lib/commonjs/ai-components/conversation-state/types.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIAction.js +30 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIAction.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIArguments.js +128 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIArguments.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIComponent.js +50 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIComponent.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIComponentDefinition.js +134 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIComponentDefinition.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIDocument.js +32 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIDocument.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIEntrance.js +197 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIEntrance.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIErrorBoundary.js +30 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIErrorBoundary.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIHelpers.js +54 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIHelpers.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIHost.js +259 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIHost.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIMedia.js +24 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIMedia.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIRenderer.js +10 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIRenderer.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIView.js +57 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIView.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/index.js +181 -0
- package/lib/commonjs/ai-components/generative-ui/index.js.map +1 -0
- package/lib/commonjs/ai-components/icons.js +44 -0
- package/lib/commonjs/ai-components/icons.js.map +1 -0
- package/lib/commonjs/ai-components/index.js +96 -0
- package/lib/commonjs/ai-components/index.js.map +1 -1
- package/lib/commonjs/ai-components/internal/Shimmer.js +36 -0
- package/lib/commonjs/ai-components/internal/Shimmer.js.map +1 -0
- package/lib/commonjs/ai-components/internal/format.js +66 -0
- package/lib/commonjs/ai-components/internal/format.js.map +1 -0
- package/lib/commonjs/ai-components/internal/hooks/useBottomSafeArea.js +12 -0
- package/lib/commonjs/ai-components/internal/hooks/useBottomSafeArea.js.map +1 -0
- package/lib/commonjs/ai-components/internal/icons/AgentIcons.js +74 -0
- package/lib/commonjs/ai-components/internal/icons/AgentIcons.js.map +1 -0
- package/lib/commonjs/ai-components/internal/keyboard.js +40 -0
- package/lib/commonjs/ai-components/internal/keyboard.js.map +1 -0
- package/lib/commonjs/ai-components/internal/tokens.js +11 -0
- package/lib/commonjs/ai-components/internal/tokens.js.map +1 -0
- package/lib/commonjs/ai-components/internal/uuid.js +21 -0
- package/lib/commonjs/ai-components/internal/uuid.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/CodeBlock.js +4 -2
- package/lib/commonjs/ai-components/markdown/components/CodeBlock.js.map +1 -1
- package/lib/commonjs/ai-components/markdown/components/InlineCode.js +1 -0
- package/lib/commonjs/ai-components/markdown/components/InlineCode.js.map +1 -1
- package/lib/commonjs/ai-components/markdown/components/Text.js +11 -2
- package/lib/commonjs/ai-components/markdown/components/Text.js.map +1 -1
- package/lib/commonjs/ai-components/markdown/styles.js +27 -29
- package/lib/commonjs/ai-components/markdown/styles.js.map +1 -1
- package/lib/commonjs/ai-components/message/AIAssistantMessage.js +64 -0
- package/lib/commonjs/ai-components/message/AIAssistantMessage.js.map +1 -0
- package/lib/commonjs/ai-components/message/AIMessageAttachment.js +189 -0
- package/lib/commonjs/ai-components/message/AIMessageAttachment.js.map +1 -0
- package/lib/commonjs/ai-components/message/AIReplyActions.js +132 -0
- package/lib/commonjs/ai-components/message/AIReplyActions.js.map +1 -0
- package/lib/commonjs/ai-components/message/AIUserMessage.js +104 -0
- package/lib/commonjs/ai-components/message/AIUserMessage.js.map +1 -0
- package/lib/commonjs/ai-components/message/UserMessageMenu.js +150 -0
- package/lib/commonjs/ai-components/message/UserMessageMenu.js.map +1 -0
- package/lib/commonjs/ai-components/message/index.js +48 -0
- package/lib/commonjs/ai-components/message/index.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/ActionButton.js +4 -2
- package/lib/commonjs/ai-components/message-composer/ActionButton.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/ActionSheet.js +22 -6
- package/lib/commonjs/ai-components/message-composer/ActionSheet.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/AttachmentButton.js +5 -1
- package/lib/commonjs/ai-components/message-composer/AttachmentButton.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/ChatOptions.js +147 -0
- package/lib/commonjs/ai-components/message-composer/ChatOptions.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/ComposerView.js +146 -20
- package/lib/commonjs/ai-components/message-composer/ComposerView.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/EditingMessageChip.js +81 -0
- package/lib/commonjs/ai-components/message-composer/EditingMessageChip.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/MediaPreviewList.js +26 -1
- package/lib/commonjs/ai-components/message-composer/MediaPreviewList.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/index.js +11 -0
- package/lib/commonjs/ai-components/message-composer/index.js.map +1 -1
- package/lib/commonjs/ai-components/message-parts/AIMessageParts.js +133 -0
- package/lib/commonjs/ai-components/message-parts/AIMessageParts.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/AIToolApproval.js +197 -0
- package/lib/commonjs/ai-components/message-parts/AIToolApproval.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/AIToolAuthorization.js +250 -0
- package/lib/commonjs/ai-components/message-parts/AIToolAuthorization.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/AIToolCall.js +159 -0
- package/lib/commonjs/ai-components/message-parts/AIToolCall.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/callStates.js +54 -0
- package/lib/commonjs/ai-components/message-parts/callStates.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/index.js +70 -0
- package/lib/commonjs/ai-components/message-parts/index.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/parseMessageParts.js +126 -0
- package/lib/commonjs/ai-components/message-parts/parseMessageParts.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/types.js +2 -0
- package/lib/commonjs/ai-components/message-parts/types.js.map +1 -0
- package/lib/commonjs/ai-components/native-specs/NativeAIAgent.js +7 -0
- package/lib/commonjs/ai-components/native-specs/NativeAIAgent.js.map +1 -0
- package/lib/commonjs/ai-components/reasoning/AIReasoning.js +401 -0
- package/lib/commonjs/ai-components/reasoning/AIReasoning.js.map +1 -0
- package/lib/commonjs/ai-components/reasoning/index.js +26 -0
- package/lib/commonjs/ai-components/reasoning/index.js.map +1 -0
- package/lib/commonjs/ai-components/reasoning/thinkingClock.js +63 -0
- package/lib/commonjs/ai-components/reasoning/thinkingClock.js.map +1 -0
- package/lib/commonjs/ai-components/services/clipboard-service/expo.js +7 -2
- package/lib/commonjs/ai-components/services/clipboard-service/expo.js.map +1 -1
- package/lib/commonjs/ai-components/store/composer/store.js.map +1 -1
- package/lib/commonjs/ai-components/store/composer/useComposerChatOption.js +18 -0
- package/lib/commonjs/ai-components/store/composer/useComposerChatOption.js.map +1 -0
- package/lib/commonjs/ai-components/store/composer/useComposerIsEditing.js +18 -0
- package/lib/commonjs/ai-components/store/composer/useComposerIsEditing.js.map +1 -0
- package/lib/commonjs/ai-components/store/index.js +22 -0
- package/lib/commonjs/ai-components/store/index.js.map +1 -1
- package/lib/commonjs/ai-components/suggestions/AISuggestions.js +66 -0
- package/lib/commonjs/ai-components/suggestions/AISuggestions.js.map +1 -0
- package/lib/commonjs/ai-components/suggestions/index.js +15 -0
- package/lib/commonjs/ai-components/suggestions/index.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/utils/flatten-nodes.js +2 -1
- package/lib/commonjs/ai-components/syntax-highlighting/utils/flatten-nodes.js.map +1 -1
- package/lib/commonjs/ai-components/syntax-highlighting/utils/renderer.js +3 -2
- package/lib/commonjs/ai-components/syntax-highlighting/utils/renderer.js.map +1 -1
- package/lib/commonjs/ai-components/theme.js +137 -1
- package/lib/commonjs/ai-components/theme.js.map +1 -1
- package/lib/commonjs/ai-components/tool-calls/AIClientIdentity.js +22 -0
- package/lib/commonjs/ai-components/tool-calls/AIClientIdentity.js.map +1 -0
- package/lib/commonjs/ai-components/tool-calls/AIClientToolRunner.js +109 -0
- package/lib/commonjs/ai-components/tool-calls/AIClientToolRunner.js.map +1 -0
- package/lib/commonjs/ai-components/tool-calls/AIToolApprover.js +23 -0
- package/lib/commonjs/ai-components/tool-calls/AIToolApprover.js.map +1 -0
- package/lib/commonjs/ai-components/tool-calls/authSessionAuthorizer.js +88 -0
- package/lib/commonjs/ai-components/tool-calls/authSessionAuthorizer.js.map +1 -0
- package/lib/commonjs/ai-components/tool-calls/index.js +48 -0
- package/lib/commonjs/ai-components/tool-calls/index.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/glowShader.js.map +1 -1
- package/lib/commonjs/components/Accessibility/useAccessibilityAnnouncer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/utils/renderText.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/i18n/ar.json +40 -1
- package/lib/commonjs/i18n/en.json +40 -1
- package/lib/commonjs/i18n/es.json +40 -1
- package/lib/commonjs/i18n/fr.json +40 -1
- package/lib/commonjs/i18n/he.json +40 -1
- package/lib/commonjs/i18n/hi.json +40 -1
- package/lib/commonjs/i18n/it.json +40 -1
- package/lib/commonjs/i18n/ja.json +40 -1
- package/lib/commonjs/i18n/ko.json +40 -1
- package/lib/commonjs/i18n/nl.json +40 -1
- package/lib/commonjs/i18n/pt-br.json +40 -1
- package/lib/commonjs/i18n/ru.json +40 -1
- package/lib/commonjs/i18n/tr.json +40 -1
- package/lib/commonjs/mock-builders/a2ui/ohrid.js +84 -0
- package/lib/commonjs/mock-builders/a2ui/ohrid.js.map +1 -0
- package/lib/commonjs/utils/i18n/Streami18n.js +9 -4
- package/lib/commonjs/utils/i18n/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/i18n/utils.js +7 -0
- package/lib/commonjs/utils/i18n/utils.js.map +1 -0
- package/lib/commonjs/version.json +1 -1
- package/lib/module/a11y/a11yUtils.js.map +1 -1
- package/lib/module/a11y/hooks/useResolvedModalAccessibilityProps.js.map +1 -1
- package/lib/module/a2ui/A2UIContexts.js +8 -0
- package/lib/module/a2ui/A2UIContexts.js.map +1 -0
- package/lib/module/a2ui/A2UIInstructions.js +49 -0
- package/lib/module/a2ui/A2UIInstructions.js.map +1 -0
- package/lib/module/a2ui/A2UIPlaceholder.js +37 -0
- package/lib/module/a2ui/A2UIPlaceholder.js.map +1 -0
- package/lib/module/a2ui/A2UIRenderer.js +363 -0
- package/lib/module/a2ui/A2UIRenderer.js.map +1 -0
- package/lib/module/a2ui/A2UIStream.js +91 -0
- package/lib/module/a2ui/A2UIStream.js.map +1 -0
- package/lib/module/a2ui/A2UISurface.js +237 -0
- package/lib/module/a2ui/A2UISurface.js.map +1 -0
- package/lib/module/a2ui/basicCatalog.json +1206 -0
- package/lib/module/a2ui/basicFunctions.js +398 -0
- package/lib/module/a2ui/basicFunctions.js.map +1 -0
- package/lib/module/a2ui/catalogDocument.js +80 -0
- package/lib/module/a2ui/catalogDocument.js.map +1 -0
- package/lib/module/a2ui/catalogs.js +105 -0
- package/lib/module/a2ui/catalogs.js.map +1 -0
- package/lib/module/a2ui/components/DateTimeInput.js +445 -0
- package/lib/module/a2ui/components/DateTimeInput.js.map +1 -0
- package/lib/module/a2ui/components/Media.js +316 -0
- package/lib/module/a2ui/components/Media.js.map +1 -0
- package/lib/module/a2ui/components/basicComponents.js +975 -0
- package/lib/module/a2ui/components/basicComponents.js.map +1 -0
- package/lib/module/a2ui/components/iconPaths.js +66 -0
- package/lib/module/a2ui/components/iconPaths.js.map +1 -0
- package/lib/module/a2ui/components/types.js +4 -0
- package/lib/module/a2ui/components/types.js.map +1 -0
- package/lib/module/a2ui/index.js +70 -0
- package/lib/module/a2ui/index.js.map +1 -0
- package/lib/module/a2ui/instructions.js +268 -0
- package/lib/module/a2ui/instructions.js.map +1 -0
- package/lib/module/a2ui/secrets.js +169 -0
- package/lib/module/a2ui/secrets.js.map +1 -0
- package/lib/module/a2ui/useReplyState.js +35 -0
- package/lib/module/a2ui/useReplyState.js.map +1 -0
- package/lib/module/ai-components/AITypingIndicatorView.js +8 -18
- package/lib/module/ai-components/AITypingIndicatorView.js.map +1 -1
- package/lib/module/ai-components/README.md +64 -3
- package/lib/module/ai-components/StreamingMessageView.js +26 -0
- package/lib/module/ai-components/StreamingMessageView.js.map +1 -1
- package/lib/module/ai-components/charts/components/PieLegend.js +2 -1
- package/lib/module/ai-components/charts/components/PieLegend.js.map +1 -1
- package/lib/module/ai-components/charts/components/VictoryChart.js +7 -2
- package/lib/module/ai-components/charts/components/VictoryChart.js.map +1 -1
- package/lib/module/ai-components/charts/utils/format-time-label.js +15 -0
- package/lib/module/ai-components/charts/utils/format-time-label.js.map +1 -0
- package/lib/module/ai-components/charts/vega-lite/schema.js +17 -2
- package/lib/module/ai-components/charts/vega-lite/schema.js.map +1 -1
- package/lib/module/ai-components/contexts/composer-context.js +13 -6
- package/lib/module/ai-components/contexts/composer-context.js.map +1 -1
- package/lib/module/ai-components/contexts/index.js +11 -0
- package/lib/module/ai-components/contexts/index.js.map +1 -1
- package/lib/module/ai-components/contexts/theme-context.js +33 -2
- package/lib/module/ai-components/contexts/theme-context.js.map +1 -1
- package/lib/module/ai-components/contexts/translation-context.js +29 -0
- package/lib/module/ai-components/contexts/translation-context.js.map +1 -0
- package/lib/module/ai-components/conversation/AIConversation.js +374 -0
- package/lib/module/ai-components/conversation/AIConversation.js.map +1 -0
- package/lib/module/ai-components/conversation/entries.js +98 -0
- package/lib/module/ai-components/conversation/entries.js.map +1 -0
- package/lib/module/ai-components/conversation/index.js +15 -0
- package/lib/module/ai-components/conversation/index.js.map +1 -0
- package/lib/module/ai-components/conversation/list/AIChatList.js +224 -0
- package/lib/module/ai-components/conversation/list/AIChatList.js.map +1 -0
- package/lib/module/ai-components/conversation/list/useChatListController.js +78 -0
- package/lib/module/ai-components/conversation/list/useChatListController.js.map +1 -0
- package/lib/module/ai-components/conversation/list/useEndInView.js +51 -0
- package/lib/module/ai-components/conversation/list/useEndInView.js.map +1 -0
- package/lib/module/ai-components/conversation/list/useKeyboardOverlap.js +53 -0
- package/lib/module/ai-components/conversation/list/useKeyboardOverlap.js.map +1 -0
- package/lib/module/ai-components/conversation/list/useLoadOlder.js +73 -0
- package/lib/module/ai-components/conversation/list/useLoadOlder.js.map +1 -0
- package/lib/module/ai-components/conversation/list/usePinnedAnchor.js +84 -0
- package/lib/module/ai-components/conversation/list/usePinnedAnchor.js.map +1 -0
- package/lib/module/ai-components/conversation/useConversationRows.js +117 -0
- package/lib/module/ai-components/conversation/useConversationRows.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/AIAgentError.js +13 -0
- package/lib/module/ai-components/conversation-state/controller/AIAgentError.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/AIConversationController.js +431 -0
- package/lib/module/ai-components/conversation-state/controller/AIConversationController.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/AIConversationExchange.js +89 -0
- package/lib/module/ai-components/conversation-state/controller/AIConversationExchange.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/index.js +48 -0
- package/lib/module/ai-components/conversation-state/controller/index.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/offers.js +35 -0
- package/lib/module/ai-components/conversation-state/controller/offers.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/types.js +13 -0
- package/lib/module/ai-components/conversation-state/controller/types.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/useAIConversationState.js +8 -0
- package/lib/module/ai-components/conversation-state/controller/useAIConversationState.js.map +1 -0
- package/lib/module/ai-components/conversation-state/fromStreamMessage.js +67 -0
- package/lib/module/ai-components/conversation-state/fromStreamMessage.js.map +1 -0
- package/lib/module/ai-components/conversation-state/index.js +37 -0
- package/lib/module/ai-components/conversation-state/index.js.map +1 -0
- package/lib/module/ai-components/conversation-state/types.js +4 -0
- package/lib/module/ai-components/conversation-state/types.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIAction.js +30 -0
- package/lib/module/ai-components/generative-ui/AIUIAction.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIArguments.js +128 -0
- package/lib/module/ai-components/generative-ui/AIUIArguments.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIComponent.js +50 -0
- package/lib/module/ai-components/generative-ui/AIUIComponent.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIComponentDefinition.js +134 -0
- package/lib/module/ai-components/generative-ui/AIUIComponentDefinition.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIDocument.js +32 -0
- package/lib/module/ai-components/generative-ui/AIUIDocument.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIEntrance.js +197 -0
- package/lib/module/ai-components/generative-ui/AIUIEntrance.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIErrorBoundary.js +30 -0
- package/lib/module/ai-components/generative-ui/AIUIErrorBoundary.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIHelpers.js +54 -0
- package/lib/module/ai-components/generative-ui/AIUIHelpers.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIHost.js +259 -0
- package/lib/module/ai-components/generative-ui/AIUIHost.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIMedia.js +24 -0
- package/lib/module/ai-components/generative-ui/AIUIMedia.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIRenderer.js +10 -0
- package/lib/module/ai-components/generative-ui/AIUIRenderer.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIView.js +57 -0
- package/lib/module/ai-components/generative-ui/AIUIView.js.map +1 -0
- package/lib/module/ai-components/generative-ui/index.js +181 -0
- package/lib/module/ai-components/generative-ui/index.js.map +1 -0
- package/lib/module/ai-components/icons.js +44 -0
- package/lib/module/ai-components/icons.js.map +1 -0
- package/lib/module/ai-components/index.js +96 -0
- package/lib/module/ai-components/index.js.map +1 -1
- package/lib/module/ai-components/internal/Shimmer.js +36 -0
- package/lib/module/ai-components/internal/Shimmer.js.map +1 -0
- package/lib/module/ai-components/internal/format.js +66 -0
- package/lib/module/ai-components/internal/format.js.map +1 -0
- package/lib/module/ai-components/internal/hooks/useBottomSafeArea.js +12 -0
- package/lib/module/ai-components/internal/hooks/useBottomSafeArea.js.map +1 -0
- package/lib/module/ai-components/internal/icons/AgentIcons.js +74 -0
- package/lib/module/ai-components/internal/icons/AgentIcons.js.map +1 -0
- package/lib/module/ai-components/internal/keyboard.js +40 -0
- package/lib/module/ai-components/internal/keyboard.js.map +1 -0
- package/lib/module/ai-components/internal/tokens.js +11 -0
- package/lib/module/ai-components/internal/tokens.js.map +1 -0
- package/lib/module/ai-components/internal/uuid.js +21 -0
- package/lib/module/ai-components/internal/uuid.js.map +1 -0
- package/lib/module/ai-components/markdown/components/CodeBlock.js +4 -2
- package/lib/module/ai-components/markdown/components/CodeBlock.js.map +1 -1
- package/lib/module/ai-components/markdown/components/InlineCode.js +1 -0
- package/lib/module/ai-components/markdown/components/InlineCode.js.map +1 -1
- package/lib/module/ai-components/markdown/components/Text.js +11 -2
- package/lib/module/ai-components/markdown/components/Text.js.map +1 -1
- package/lib/module/ai-components/markdown/styles.js +27 -29
- package/lib/module/ai-components/markdown/styles.js.map +1 -1
- package/lib/module/ai-components/message/AIAssistantMessage.js +64 -0
- package/lib/module/ai-components/message/AIAssistantMessage.js.map +1 -0
- package/lib/module/ai-components/message/AIMessageAttachment.js +189 -0
- package/lib/module/ai-components/message/AIMessageAttachment.js.map +1 -0
- package/lib/module/ai-components/message/AIReplyActions.js +132 -0
- package/lib/module/ai-components/message/AIReplyActions.js.map +1 -0
- package/lib/module/ai-components/message/AIUserMessage.js +104 -0
- package/lib/module/ai-components/message/AIUserMessage.js.map +1 -0
- package/lib/module/ai-components/message/UserMessageMenu.js +150 -0
- package/lib/module/ai-components/message/UserMessageMenu.js.map +1 -0
- package/lib/module/ai-components/message/index.js +48 -0
- package/lib/module/ai-components/message/index.js.map +1 -0
- package/lib/module/ai-components/message-composer/ActionButton.js +4 -2
- package/lib/module/ai-components/message-composer/ActionButton.js.map +1 -1
- package/lib/module/ai-components/message-composer/ActionSheet.js +22 -6
- package/lib/module/ai-components/message-composer/ActionSheet.js.map +1 -1
- package/lib/module/ai-components/message-composer/AttachmentButton.js +5 -1
- package/lib/module/ai-components/message-composer/AttachmentButton.js.map +1 -1
- package/lib/module/ai-components/message-composer/ChatOptions.js +147 -0
- package/lib/module/ai-components/message-composer/ChatOptions.js.map +1 -0
- package/lib/module/ai-components/message-composer/ComposerView.js +146 -20
- package/lib/module/ai-components/message-composer/ComposerView.js.map +1 -1
- package/lib/module/ai-components/message-composer/EditingMessageChip.js +81 -0
- package/lib/module/ai-components/message-composer/EditingMessageChip.js.map +1 -0
- package/lib/module/ai-components/message-composer/MediaPreviewList.js +26 -1
- package/lib/module/ai-components/message-composer/MediaPreviewList.js.map +1 -1
- package/lib/module/ai-components/message-composer/index.js +11 -0
- package/lib/module/ai-components/message-composer/index.js.map +1 -1
- package/lib/module/ai-components/message-parts/AIMessageParts.js +133 -0
- package/lib/module/ai-components/message-parts/AIMessageParts.js.map +1 -0
- package/lib/module/ai-components/message-parts/AIToolApproval.js +197 -0
- package/lib/module/ai-components/message-parts/AIToolApproval.js.map +1 -0
- package/lib/module/ai-components/message-parts/AIToolAuthorization.js +250 -0
- package/lib/module/ai-components/message-parts/AIToolAuthorization.js.map +1 -0
- package/lib/module/ai-components/message-parts/AIToolCall.js +159 -0
- package/lib/module/ai-components/message-parts/AIToolCall.js.map +1 -0
- package/lib/module/ai-components/message-parts/callStates.js +54 -0
- package/lib/module/ai-components/message-parts/callStates.js.map +1 -0
- package/lib/module/ai-components/message-parts/index.js +70 -0
- package/lib/module/ai-components/message-parts/index.js.map +1 -0
- package/lib/module/ai-components/message-parts/parseMessageParts.js +126 -0
- package/lib/module/ai-components/message-parts/parseMessageParts.js.map +1 -0
- package/lib/module/ai-components/message-parts/types.js +2 -0
- package/lib/module/ai-components/message-parts/types.js.map +1 -0
- package/lib/module/ai-components/native-specs/NativeAIAgent.js +7 -0
- package/lib/module/ai-components/native-specs/NativeAIAgent.js.map +1 -0
- package/lib/module/ai-components/reasoning/AIReasoning.js +401 -0
- package/lib/module/ai-components/reasoning/AIReasoning.js.map +1 -0
- package/lib/module/ai-components/reasoning/index.js +26 -0
- package/lib/module/ai-components/reasoning/index.js.map +1 -0
- package/lib/module/ai-components/reasoning/thinkingClock.js +63 -0
- package/lib/module/ai-components/reasoning/thinkingClock.js.map +1 -0
- package/lib/module/ai-components/services/clipboard-service/expo.js +7 -2
- package/lib/module/ai-components/services/clipboard-service/expo.js.map +1 -1
- package/lib/module/ai-components/store/composer/store.js.map +1 -1
- package/lib/module/ai-components/store/composer/useComposerChatOption.js +18 -0
- package/lib/module/ai-components/store/composer/useComposerChatOption.js.map +1 -0
- package/lib/module/ai-components/store/composer/useComposerIsEditing.js +18 -0
- package/lib/module/ai-components/store/composer/useComposerIsEditing.js.map +1 -0
- package/lib/module/ai-components/store/index.js +22 -0
- package/lib/module/ai-components/store/index.js.map +1 -1
- package/lib/module/ai-components/suggestions/AISuggestions.js +66 -0
- package/lib/module/ai-components/suggestions/AISuggestions.js.map +1 -0
- package/lib/module/ai-components/suggestions/index.js +15 -0
- package/lib/module/ai-components/suggestions/index.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/utils/flatten-nodes.js +2 -1
- package/lib/module/ai-components/syntax-highlighting/utils/flatten-nodes.js.map +1 -1
- package/lib/module/ai-components/syntax-highlighting/utils/renderer.js +3 -2
- package/lib/module/ai-components/syntax-highlighting/utils/renderer.js.map +1 -1
- package/lib/module/ai-components/theme.js +137 -1
- package/lib/module/ai-components/theme.js.map +1 -1
- package/lib/module/ai-components/tool-calls/AIClientIdentity.js +22 -0
- package/lib/module/ai-components/tool-calls/AIClientIdentity.js.map +1 -0
- package/lib/module/ai-components/tool-calls/AIClientToolRunner.js +109 -0
- package/lib/module/ai-components/tool-calls/AIClientToolRunner.js.map +1 -0
- package/lib/module/ai-components/tool-calls/AIToolApprover.js +23 -0
- package/lib/module/ai-components/tool-calls/AIToolApprover.js.map +1 -0
- package/lib/module/ai-components/tool-calls/authSessionAuthorizer.js +88 -0
- package/lib/module/ai-components/tool-calls/authSessionAuthorizer.js.map +1 -0
- package/lib/module/ai-components/tool-calls/index.js +48 -0
- package/lib/module/ai-components/tool-calls/index.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/glowShader.js.map +1 -1
- package/lib/module/components/Accessibility/useAccessibilityAnnouncer.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/utils/renderText.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/i18n/ar.json +40 -1
- package/lib/module/i18n/en.json +40 -1
- package/lib/module/i18n/es.json +40 -1
- package/lib/module/i18n/fr.json +40 -1
- package/lib/module/i18n/he.json +40 -1
- package/lib/module/i18n/hi.json +40 -1
- package/lib/module/i18n/it.json +40 -1
- package/lib/module/i18n/ja.json +40 -1
- package/lib/module/i18n/ko.json +40 -1
- package/lib/module/i18n/nl.json +40 -1
- package/lib/module/i18n/pt-br.json +40 -1
- package/lib/module/i18n/ru.json +40 -1
- package/lib/module/i18n/tr.json +40 -1
- package/lib/module/mock-builders/a2ui/ohrid.js +84 -0
- package/lib/module/mock-builders/a2ui/ohrid.js.map +1 -0
- package/lib/module/utils/i18n/Streami18n.js +9 -4
- package/lib/module/utils/i18n/Streami18n.js.map +1 -1
- package/lib/module/utils/i18n/utils.js +7 -0
- package/lib/module/utils/i18n/utils.js.map +1 -0
- package/lib/module/version.json +1 -1
- package/lib/typescript/a11y/a11yUtils.d.ts +0 -1
- package/lib/typescript/a11y/a11yUtils.d.ts.map +1 -1
- package/lib/typescript/a11y/hooks/useResolvedModalAccessibilityProps.d.ts +2 -3
- package/lib/typescript/a11y/hooks/useResolvedModalAccessibilityProps.d.ts.map +1 -1
- package/lib/typescript/a2ui/A2UIContexts.d.ts +9 -0
- package/lib/typescript/a2ui/A2UIContexts.d.ts.map +1 -0
- package/lib/typescript/a2ui/A2UIInstructions.d.ts +47 -0
- package/lib/typescript/a2ui/A2UIInstructions.d.ts.map +1 -0
- package/lib/typescript/a2ui/A2UIPlaceholder.d.ts +4 -0
- package/lib/typescript/a2ui/A2UIPlaceholder.d.ts.map +1 -0
- package/lib/typescript/a2ui/A2UIRenderer.d.ts +130 -0
- package/lib/typescript/a2ui/A2UIRenderer.d.ts.map +1 -0
- package/lib/typescript/a2ui/A2UIStream.d.ts +23 -0
- package/lib/typescript/a2ui/A2UIStream.d.ts.map +1 -0
- package/lib/typescript/a2ui/A2UISurface.d.ts +19 -0
- package/lib/typescript/a2ui/A2UISurface.d.ts.map +1 -0
- package/lib/typescript/a2ui/basicFunctions.d.ts +10 -0
- package/lib/typescript/a2ui/basicFunctions.d.ts.map +1 -0
- package/lib/typescript/a2ui/catalogDocument.d.ts +56 -0
- package/lib/typescript/a2ui/catalogDocument.d.ts.map +1 -0
- package/lib/typescript/a2ui/catalogs.d.ts +42 -0
- package/lib/typescript/a2ui/catalogs.d.ts.map +1 -0
- package/lib/typescript/a2ui/components/DateTimeInput.d.ts +44 -0
- package/lib/typescript/a2ui/components/DateTimeInput.d.ts.map +1 -0
- package/lib/typescript/a2ui/components/Media.d.ts +27 -0
- package/lib/typescript/a2ui/components/Media.d.ts.map +1 -0
- package/lib/typescript/a2ui/components/basicComponents.d.ts +4 -0
- package/lib/typescript/a2ui/components/basicComponents.d.ts.map +1 -0
- package/lib/typescript/a2ui/components/iconPaths.d.ts +2 -0
- package/lib/typescript/a2ui/components/iconPaths.d.ts.map +1 -0
- package/lib/typescript/a2ui/components/types.d.ts +23 -0
- package/lib/typescript/a2ui/components/types.d.ts.map +1 -0
- package/lib/typescript/a2ui/index.d.ts +8 -0
- package/lib/typescript/a2ui/index.d.ts.map +1 -0
- package/lib/typescript/a2ui/instructions.d.ts +39 -0
- package/lib/typescript/a2ui/instructions.d.ts.map +1 -0
- package/lib/typescript/a2ui/secrets.d.ts +20 -0
- package/lib/typescript/a2ui/secrets.d.ts.map +1 -0
- package/lib/typescript/a2ui/useReplyState.d.ts +4 -0
- package/lib/typescript/a2ui/useReplyState.d.ts.map +1 -0
- package/lib/typescript/ai-components/AITypingIndicatorView.d.ts.map +1 -1
- package/lib/typescript/ai-components/StreamingMessageView.d.ts +4 -1
- package/lib/typescript/ai-components/StreamingMessageView.d.ts.map +1 -1
- package/lib/typescript/ai-components/charts/components/PieLegend.d.ts.map +1 -1
- package/lib/typescript/ai-components/charts/components/VictoryChart.d.ts.map +1 -1
- package/lib/typescript/ai-components/charts/utils/format-time-label.d.ts +7 -0
- package/lib/typescript/ai-components/charts/utils/format-time-label.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/vega-lite/schema.d.ts +8 -8
- package/lib/typescript/ai-components/charts/vega-lite/schema.d.ts.map +1 -1
- package/lib/typescript/ai-components/contexts/composer-context.d.ts +3 -0
- package/lib/typescript/ai-components/contexts/composer-context.d.ts.map +1 -1
- package/lib/typescript/ai-components/contexts/index.d.ts +1 -0
- package/lib/typescript/ai-components/contexts/index.d.ts.map +1 -1
- package/lib/typescript/ai-components/contexts/theme-context.d.ts.map +1 -1
- package/lib/typescript/ai-components/contexts/translation-context.d.ts +19 -0
- package/lib/typescript/ai-components/contexts/translation-context.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/AIConversation.d.ts +133 -0
- package/lib/typescript/ai-components/conversation/AIConversation.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/entries.d.ts +47 -0
- package/lib/typescript/ai-components/conversation/entries.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/index.d.ts +3 -0
- package/lib/typescript/ai-components/conversation/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/AIChatList.d.ts +30 -0
- package/lib/typescript/ai-components/conversation/list/AIChatList.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/useChatListController.d.ts +45 -0
- package/lib/typescript/ai-components/conversation/list/useChatListController.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/useEndInView.d.ts +26 -0
- package/lib/typescript/ai-components/conversation/list/useEndInView.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/useKeyboardOverlap.d.ts +17 -0
- package/lib/typescript/ai-components/conversation/list/useKeyboardOverlap.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/useLoadOlder.d.ts +24 -0
- package/lib/typescript/ai-components/conversation/list/useLoadOlder.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/usePinnedAnchor.d.ts +26 -0
- package/lib/typescript/ai-components/conversation/list/usePinnedAnchor.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/useConversationRows.d.ts +66 -0
- package/lib/typescript/ai-components/conversation/useConversationRows.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIAgentError.d.ts +10 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIAgentError.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIConversationController.d.ts +173 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIConversationController.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIConversationExchange.d.ts +23 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIConversationExchange.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/index.d.ts +5 -0
- package/lib/typescript/ai-components/conversation-state/controller/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/offers.d.ts +25 -0
- package/lib/typescript/ai-components/conversation-state/controller/offers.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/types.d.ts +142 -0
- package/lib/typescript/ai-components/conversation-state/controller/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/useAIConversationState.d.ts +9 -0
- package/lib/typescript/ai-components/conversation-state/controller/useAIConversationState.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/fromStreamMessage.d.ts +25 -0
- package/lib/typescript/ai-components/conversation-state/fromStreamMessage.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/index.d.ts +4 -0
- package/lib/typescript/ai-components/conversation-state/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/types.d.ts +55 -0
- package/lib/typescript/ai-components/conversation-state/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIAction.d.ts +48 -0
- package/lib/typescript/ai-components/generative-ui/AIUIAction.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIArguments.d.ts +15 -0
- package/lib/typescript/ai-components/generative-ui/AIUIArguments.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIComponent.d.ts +51 -0
- package/lib/typescript/ai-components/generative-ui/AIUIComponent.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIComponentDefinition.d.ts +84 -0
- package/lib/typescript/ai-components/generative-ui/AIUIComponentDefinition.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIDocument.d.ts +50 -0
- package/lib/typescript/ai-components/generative-ui/AIUIDocument.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIEntrance.d.ts +76 -0
- package/lib/typescript/ai-components/generative-ui/AIUIEntrance.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIErrorBoundary.d.ts +26 -0
- package/lib/typescript/ai-components/generative-ui/AIUIErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIHelpers.d.ts +23 -0
- package/lib/typescript/ai-components/generative-ui/AIUIHelpers.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIHost.d.ts +160 -0
- package/lib/typescript/ai-components/generative-ui/AIUIHost.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIMedia.d.ts +22 -0
- package/lib/typescript/ai-components/generative-ui/AIUIMedia.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIRenderer.d.ts +53 -0
- package/lib/typescript/ai-components/generative-ui/AIUIRenderer.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIView.d.ts +35 -0
- package/lib/typescript/ai-components/generative-ui/AIUIView.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/index.d.ts +11 -0
- package/lib/typescript/ai-components/generative-ui/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/icons.d.ts +66 -0
- package/lib/typescript/ai-components/icons.d.ts.map +1 -0
- package/lib/typescript/ai-components/index.d.ts +8 -0
- package/lib/typescript/ai-components/index.d.ts.map +1 -1
- package/lib/typescript/ai-components/internal/Shimmer.d.ts +14 -0
- package/lib/typescript/ai-components/internal/Shimmer.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/format.d.ts +7 -0
- package/lib/typescript/ai-components/internal/format.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/hooks/useBottomSafeArea.d.ts +3 -0
- package/lib/typescript/ai-components/internal/hooks/useBottomSafeArea.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/icons/AgentIcons.d.ts +31 -0
- package/lib/typescript/ai-components/internal/icons/AgentIcons.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/keyboard.d.ts +9 -0
- package/lib/typescript/ai-components/internal/keyboard.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/tokens.d.ts +2 -0
- package/lib/typescript/ai-components/internal/tokens.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/uuid.d.ts +2 -0
- package/lib/typescript/ai-components/internal/uuid.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/CodeBlock.d.ts.map +1 -1
- package/lib/typescript/ai-components/markdown/components/InlineCode.d.ts.map +1 -1
- package/lib/typescript/ai-components/markdown/components/Text.d.ts.map +1 -1
- package/lib/typescript/ai-components/markdown/styles.d.ts +23 -4
- package/lib/typescript/ai-components/markdown/styles.d.ts.map +1 -1
- package/lib/typescript/ai-components/markdown/types.d.ts +1 -0
- package/lib/typescript/ai-components/markdown/types.d.ts.map +1 -1
- package/lib/typescript/ai-components/message/AIAssistantMessage.d.ts +40 -0
- package/lib/typescript/ai-components/message/AIAssistantMessage.d.ts.map +1 -0
- package/lib/typescript/ai-components/message/AIMessageAttachment.d.ts +33 -0
- package/lib/typescript/ai-components/message/AIMessageAttachment.d.ts.map +1 -0
- package/lib/typescript/ai-components/message/AIReplyActions.d.ts +19 -0
- package/lib/typescript/ai-components/message/AIReplyActions.d.ts.map +1 -0
- package/lib/typescript/ai-components/message/AIUserMessage.d.ts +17 -0
- package/lib/typescript/ai-components/message/AIUserMessage.d.ts.map +1 -0
- package/lib/typescript/ai-components/message/UserMessageMenu.d.ts +31 -0
- package/lib/typescript/ai-components/message/UserMessageMenu.d.ts.map +1 -0
- package/lib/typescript/ai-components/message/index.d.ts +5 -0
- package/lib/typescript/ai-components/message/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/ActionButton.d.ts +1 -1
- package/lib/typescript/ai-components/message-composer/ActionButton.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/ActionSheet.d.ts +2 -2
- package/lib/typescript/ai-components/message-composer/ActionSheet.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/AttachmentButton.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/ChatOptions.d.ts +35 -0
- package/lib/typescript/ai-components/message-composer/ChatOptions.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/ComposerView.d.ts +39 -3
- package/lib/typescript/ai-components/message-composer/ComposerView.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/EditingMessageChip.d.ts +7 -0
- package/lib/typescript/ai-components/message-composer/EditingMessageChip.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/MediaPreviewList.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/index.d.ts +1 -0
- package/lib/typescript/ai-components/message-composer/index.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-parts/AIMessageParts.d.ts +40 -0
- package/lib/typescript/ai-components/message-parts/AIMessageParts.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/AIToolApproval.d.ts +38 -0
- package/lib/typescript/ai-components/message-parts/AIToolApproval.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/AIToolAuthorization.d.ts +48 -0
- package/lib/typescript/ai-components/message-parts/AIToolAuthorization.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/AIToolCall.d.ts +11 -0
- package/lib/typescript/ai-components/message-parts/AIToolCall.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/callStates.d.ts +9 -0
- package/lib/typescript/ai-components/message-parts/callStates.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/index.d.ts +7 -0
- package/lib/typescript/ai-components/message-parts/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/parseMessageParts.d.ts +47 -0
- package/lib/typescript/ai-components/message-parts/parseMessageParts.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/types.d.ts +137 -0
- package/lib/typescript/ai-components/message-parts/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/native-specs/NativeAIAgent.d.ts +22 -0
- package/lib/typescript/ai-components/native-specs/NativeAIAgent.d.ts.map +1 -0
- package/lib/typescript/ai-components/reasoning/AIReasoning.d.ts +63 -0
- package/lib/typescript/ai-components/reasoning/AIReasoning.d.ts.map +1 -0
- package/lib/typescript/ai-components/reasoning/index.d.ts +3 -0
- package/lib/typescript/ai-components/reasoning/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/reasoning/thinkingClock.d.ts +29 -0
- package/lib/typescript/ai-components/reasoning/thinkingClock.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/clipboard-service/expo.d.ts.map +1 -1
- package/lib/typescript/ai-components/store/composer/store.d.ts +8 -0
- package/lib/typescript/ai-components/store/composer/store.d.ts.map +1 -1
- package/lib/typescript/ai-components/store/composer/useComposerChatOption.d.ts +5 -0
- package/lib/typescript/ai-components/store/composer/useComposerChatOption.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/composer/useComposerIsEditing.d.ts +5 -0
- package/lib/typescript/ai-components/store/composer/useComposerIsEditing.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/index.d.ts +2 -0
- package/lib/typescript/ai-components/store/index.d.ts.map +1 -1
- package/lib/typescript/ai-components/suggestions/AISuggestions.d.ts +13 -0
- package/lib/typescript/ai-components/suggestions/AISuggestions.d.ts.map +1 -0
- package/lib/typescript/ai-components/suggestions/index.d.ts +2 -0
- package/lib/typescript/ai-components/suggestions/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/utils/flatten-nodes.d.ts.map +1 -1
- package/lib/typescript/ai-components/syntax-highlighting/utils/renderer.d.ts +1 -1
- package/lib/typescript/ai-components/syntax-highlighting/utils/renderer.d.ts.map +1 -1
- package/lib/typescript/ai-components/theme.d.ts +200 -0
- package/lib/typescript/ai-components/theme.d.ts.map +1 -1
- package/lib/typescript/ai-components/tool-calls/AIClientIdentity.d.ts +14 -0
- package/lib/typescript/ai-components/tool-calls/AIClientIdentity.d.ts.map +1 -0
- package/lib/typescript/ai-components/tool-calls/AIClientToolRunner.d.ts +109 -0
- package/lib/typescript/ai-components/tool-calls/AIClientToolRunner.d.ts.map +1 -0
- package/lib/typescript/ai-components/tool-calls/AIToolApprover.d.ts +48 -0
- package/lib/typescript/ai-components/tool-calls/AIToolApprover.d.ts.map +1 -0
- package/lib/typescript/ai-components/tool-calls/authSessionAuthorizer.d.ts +57 -0
- package/lib/typescript/ai-components/tool-calls/authSessionAuthorizer.d.ts.map +1 -0
- package/lib/typescript/ai-components/tool-calls/index.d.ts +5 -0
- package/lib/typescript/ai-components/tool-calls/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/glowShader.d.ts.map +1 -1
- package/lib/typescript/ai-components/voice-visualization/simplex.d.ts +1 -1
- package/lib/typescript/components/Accessibility/NotificationAnnouncer.d.ts +5 -5
- package/lib/typescript/components/Accessibility/hooks/useIncomingMessageAnnouncements.d.ts +1 -1
- package/lib/typescript/components/Accessibility/useAccessibilityAnnouncer.d.ts +0 -2
- package/lib/typescript/components/Accessibility/useAccessibilityAnnouncer.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/utils/renderText.d.ts.map +1 -1
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +1 -1
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts.map +1 -1
- package/lib/typescript/i18n/ar.json +40 -1
- package/lib/typescript/i18n/en.json +40 -1
- package/lib/typescript/i18n/es.json +40 -1
- package/lib/typescript/i18n/fr.json +40 -1
- package/lib/typescript/i18n/he.json +40 -1
- package/lib/typescript/i18n/hi.json +40 -1
- package/lib/typescript/i18n/it.json +40 -1
- package/lib/typescript/i18n/ja.json +40 -1
- package/lib/typescript/i18n/ko.json +40 -1
- package/lib/typescript/i18n/nl.json +40 -1
- package/lib/typescript/i18n/pt-br.json +40 -1
- package/lib/typescript/i18n/ru.json +40 -1
- package/lib/typescript/i18n/tr.json +40 -1
- package/lib/typescript/utils/i18n/Streami18n.d.ts +41 -2
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
- package/lib/typescript/utils/i18n/utils.d.ts +3 -0
- package/lib/typescript/utils/i18n/utils.d.ts.map +1 -0
- package/package.json +10 -2
- package/src/a11y/a11yUtils.ts +0 -1
- package/src/a11y/hooks/useResolvedModalAccessibilityProps.ts +2 -3
- package/src/a2ui/A2UIContexts.ts +15 -0
- package/src/a2ui/A2UIInstructions.ts +102 -0
- package/src/a2ui/A2UIPlaceholder.tsx +24 -0
- package/src/a2ui/A2UIRenderer.tsx +504 -0
- package/src/a2ui/A2UIStream.ts +105 -0
- package/src/a2ui/A2UISurface.tsx +270 -0
- package/src/a2ui/__tests__/A2UIInstructions.test.ts +233 -0
- package/src/a2ui/__tests__/A2UIRenderer.test.tsx +1559 -0
- package/src/a2ui/__tests__/conformance.test.ts +579 -0
- package/src/a2ui/basicCatalog.json +1206 -0
- package/src/a2ui/basicFunctions.ts +429 -0
- package/src/a2ui/catalogDocument.ts +119 -0
- package/src/a2ui/catalogs.ts +185 -0
- package/src/a2ui/components/DateTimeInput.tsx +381 -0
- package/src/a2ui/components/Media.tsx +278 -0
- package/src/a2ui/components/basicComponents.tsx +832 -0
- package/src/a2ui/components/iconPaths.ts +116 -0
- package/src/a2ui/components/types.ts +24 -0
- package/src/a2ui/index.ts +18 -0
- package/src/a2ui/instructions.ts +341 -0
- package/src/a2ui/secrets.ts +154 -0
- package/src/a2ui/useReplyState.ts +26 -0
- package/src/ai-components/AITypingIndicatorView.tsx +6 -22
- package/src/ai-components/README.md +64 -3
- package/src/ai-components/StreamingMessageView.tsx +27 -3
- package/src/ai-components/__tests__/ComposerView.test.tsx +247 -2
- package/src/ai-components/__tests__/Markdown.test.tsx +13 -0
- package/src/ai-components/__tests__/StreamingMessageView.test.tsx +69 -0
- package/src/ai-components/__tests__/charts.test.ts +75 -0
- package/src/ai-components/__tests__/clientToolRunner.test.ts +239 -0
- package/src/ai-components/__tests__/conversation.test.tsx +787 -0
- package/src/ai-components/__tests__/conversationController.test.ts +1561 -0
- package/src/ai-components/__tests__/conversationExchange.test.ts +187 -0
- package/src/ai-components/__tests__/conversationRows.test.ts +207 -0
- package/src/ai-components/__tests__/conversationUI.test.tsx +606 -0
- package/src/ai-components/__tests__/format.test.ts +32 -0
- package/src/ai-components/__tests__/generativeUI.test.ts +634 -0
- package/src/ai-components/__tests__/keyboard.test.ts +14 -0
- package/src/ai-components/__tests__/messagePartViews.test.tsx +385 -0
- package/src/ai-components/__tests__/messageParts.test.ts +336 -0
- package/src/ai-components/__tests__/messageViews.test.tsx +321 -0
- package/src/ai-components/__tests__/signIn.test.tsx +324 -0
- package/src/ai-components/__tests__/theme.test.tsx +18 -0
- package/src/ai-components/__tests__/translation.test.tsx +85 -0
- package/src/ai-components/__tests__/voiceDriver.test.ts +0 -3
- package/src/ai-components/__tests__/voicePalette.test.ts +1 -1
- package/src/ai-components/__tests__/withoutKeyboardController.test.tsx +60 -0
- package/src/ai-components/charts/components/PieLegend.tsx +2 -1
- package/src/ai-components/charts/components/VictoryChart.tsx +10 -2
- package/src/ai-components/charts/utils/format-time-label.ts +18 -0
- package/src/ai-components/charts/vega-lite/schema.ts +19 -2
- package/src/ai-components/contexts/composer-context.tsx +13 -5
- package/src/ai-components/contexts/index.ts +1 -0
- package/src/ai-components/contexts/theme-context.tsx +19 -4
- package/src/ai-components/contexts/translation-context.tsx +44 -0
- package/src/ai-components/conversation/AIConversation.tsx +612 -0
- package/src/ai-components/conversation/entries.ts +177 -0
- package/src/ai-components/conversation/index.ts +2 -0
- package/src/ai-components/conversation/list/AIChatList.tsx +227 -0
- package/src/ai-components/conversation/list/useChatListController.ts +91 -0
- package/src/ai-components/conversation/list/useEndInView.ts +61 -0
- package/src/ai-components/conversation/list/useKeyboardOverlap.ts +52 -0
- package/src/ai-components/conversation/list/useLoadOlder.ts +97 -0
- package/src/ai-components/conversation/list/usePinnedAnchor.ts +113 -0
- package/src/ai-components/conversation/useConversationRows.ts +231 -0
- package/src/ai-components/conversation-state/controller/AIAgentError.ts +14 -0
- package/src/ai-components/conversation-state/controller/AIConversationController.ts +628 -0
- package/src/ai-components/conversation-state/controller/AIConversationExchange.ts +132 -0
- package/src/ai-components/conversation-state/controller/index.ts +4 -0
- package/src/ai-components/conversation-state/controller/offers.ts +53 -0
- package/src/ai-components/conversation-state/controller/types.ts +154 -0
- package/src/ai-components/conversation-state/controller/useAIConversationState.ts +21 -0
- package/src/ai-components/conversation-state/fromStreamMessage.ts +89 -0
- package/src/ai-components/conversation-state/index.ts +3 -0
- package/src/ai-components/conversation-state/types.ts +57 -0
- package/src/ai-components/generative-ui/AIUIAction.ts +73 -0
- package/src/ai-components/generative-ui/AIUIArguments.ts +117 -0
- package/src/ai-components/generative-ui/AIUIComponent.tsx +106 -0
- package/src/ai-components/generative-ui/AIUIComponentDefinition.ts +163 -0
- package/src/ai-components/generative-ui/AIUIDocument.ts +77 -0
- package/src/ai-components/generative-ui/AIUIEntrance.tsx +229 -0
- package/src/ai-components/generative-ui/AIUIErrorBoundary.tsx +39 -0
- package/src/ai-components/generative-ui/AIUIHelpers.ts +86 -0
- package/src/ai-components/generative-ui/AIUIHost.ts +358 -0
- package/src/ai-components/generative-ui/AIUIMedia.ts +45 -0
- package/src/ai-components/generative-ui/AIUIRenderer.ts +60 -0
- package/src/ai-components/generative-ui/AIUIView.tsx +87 -0
- package/src/ai-components/generative-ui/index.ts +48 -0
- package/src/ai-components/icons.ts +101 -0
- package/src/ai-components/index.ts +10 -0
- package/src/ai-components/internal/Shimmer.tsx +40 -0
- package/src/ai-components/internal/format.ts +69 -0
- package/src/ai-components/internal/hooks/useBottomSafeArea.ts +6 -0
- package/src/ai-components/internal/icons/AgentIcons.tsx +138 -0
- package/src/ai-components/internal/keyboard.tsx +34 -0
- package/src/ai-components/internal/tokens.ts +4 -0
- package/src/ai-components/internal/uuid.ts +17 -0
- package/src/ai-components/markdown/components/CodeBlock.tsx +13 -2
- package/src/ai-components/markdown/components/InlineCode.tsx +1 -0
- package/src/ai-components/markdown/components/Text.tsx +7 -2
- package/src/ai-components/markdown/styles.ts +29 -27
- package/src/ai-components/markdown/types.ts +1 -0
- package/src/ai-components/message/AIAssistantMessage.tsx +100 -0
- package/src/ai-components/message/AIMessageAttachment.tsx +245 -0
- package/src/ai-components/message/AIReplyActions.tsx +139 -0
- package/src/ai-components/message/AIUserMessage.tsx +121 -0
- package/src/ai-components/message/UserMessageMenu.tsx +149 -0
- package/src/ai-components/message/index.ts +4 -0
- package/src/ai-components/message-composer/ActionButton.tsx +10 -5
- package/src/ai-components/message-composer/ActionSheet.tsx +28 -6
- package/src/ai-components/message-composer/AttachmentButton.tsx +9 -1
- package/src/ai-components/message-composer/ChatOptions.tsx +144 -0
- package/src/ai-components/message-composer/ComposerView.tsx +194 -30
- package/src/ai-components/message-composer/EditingMessageChip.tsx +62 -0
- package/src/ai-components/message-composer/MediaPreviewList.tsx +34 -8
- package/src/ai-components/message-composer/index.ts +1 -0
- package/src/ai-components/message-parts/AIMessageParts.tsx +145 -0
- package/src/ai-components/message-parts/AIToolApproval.tsx +196 -0
- package/src/ai-components/message-parts/AIToolAuthorization.tsx +279 -0
- package/src/ai-components/message-parts/AIToolCall.tsx +117 -0
- package/src/ai-components/message-parts/callStates.ts +44 -0
- package/src/ai-components/message-parts/index.ts +6 -0
- package/src/ai-components/message-parts/parseMessageParts.ts +195 -0
- package/src/ai-components/message-parts/types.ts +157 -0
- package/src/ai-components/native-specs/NativeAIAgent.ts +25 -0
- package/src/ai-components/reasoning/AIReasoning.tsx +509 -0
- package/src/ai-components/reasoning/index.ts +2 -0
- package/src/ai-components/reasoning/thinkingClock.ts +109 -0
- package/src/ai-components/services/clipboard-service/expo.ts +18 -4
- package/src/ai-components/store/composer/store.ts +9 -0
- package/src/ai-components/store/composer/useComposerChatOption.ts +15 -0
- package/src/ai-components/store/composer/useComposerIsEditing.ts +15 -0
- package/src/ai-components/store/index.ts +2 -0
- package/src/ai-components/suggestions/AISuggestions.tsx +73 -0
- package/src/ai-components/suggestions/index.ts +1 -0
- package/src/ai-components/syntax-highlighting/utils/flatten-nodes.ts +2 -1
- package/src/ai-components/syntax-highlighting/utils/renderer.tsx +4 -2
- package/src/ai-components/theme.ts +334 -0
- package/src/ai-components/tool-calls/AIClientIdentity.ts +33 -0
- package/src/ai-components/tool-calls/AIClientToolRunner.ts +200 -0
- package/src/ai-components/tool-calls/AIToolApprover.tsx +60 -0
- package/src/ai-components/tool-calls/authSessionAuthorizer.ts +137 -0
- package/src/ai-components/tool-calls/index.ts +4 -0
- package/src/ai-components/voice-visualization/glowShader.ts +1 -3
- package/src/ai-components/voice-visualization/simplex.ts +1 -1
- package/src/components/Accessibility/NotificationAnnouncer.tsx +5 -5
- package/src/components/Accessibility/hooks/useIncomingMessageAnnouncements.ts +1 -1
- package/src/components/Accessibility/useAccessibilityAnnouncer.ts +0 -2
- package/src/components/Message/MessageItemView/utils/renderText.tsx +1 -2
- package/src/contexts/translationContext/TranslationContext.tsx +2 -2
- package/src/i18n/ar.json +40 -1
- package/src/i18n/en.json +40 -1
- package/src/i18n/es.json +40 -1
- package/src/i18n/fr.json +40 -1
- package/src/i18n/he.json +40 -1
- package/src/i18n/hi.json +40 -1
- package/src/i18n/it.json +40 -1
- package/src/i18n/ja.json +40 -1
- package/src/i18n/ko.json +40 -1
- package/src/i18n/nl.json +40 -1
- package/src/i18n/pt-br.json +40 -1
- package/src/i18n/ru.json +40 -1
- package/src/i18n/tr.json +40 -1
- package/src/mock-builders/a2ui/ohrid.ts +106 -0
- package/src/utils/i18n/Streami18n.ts +4 -1
- package/src/utils/i18n/utils.ts +3 -0
- package/src/version.json +1 -1
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { AIMessageRating } from '../../message/AIReplyActions';
|
|
2
|
+
import type { AIChatOption } from '../../message-composer/ChatOptions';
|
|
3
|
+
import type { MediaAsset } from '../../services/media-picker-service/AbstractMediaPickerService';
|
|
4
|
+
import type { AIMessage } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Where the latest exchange with the agent is:
|
|
7
|
+
* - `ready`: nothing is on its way: the agent answered, or the person stopped it.
|
|
8
|
+
* - `submitted`: the person's request is on its way, or the agent is working on it and its reply
|
|
9
|
+
* shows nothing yet.
|
|
10
|
+
* - `streaming`: the agent is writing its reply.
|
|
11
|
+
* - `error`: the latest request failed, or the agent couldn't answer it. `retry()` tries again.
|
|
12
|
+
*/
|
|
13
|
+
export type AIConversationStatus = 'ready' | 'submitted' | 'streaming' | 'error';
|
|
14
|
+
/** Whether the agent is answering: the request is submitted, or its reply streaming. */
|
|
15
|
+
export declare const isAIConversationAnswering: (status: AIConversationStatus) => status is "streaming" | "submitted";
|
|
16
|
+
/**
|
|
17
|
+
* What the person asks for:
|
|
18
|
+
* - `message`: a new message from the person.
|
|
19
|
+
* - `regenerate`: a new reply in place of the request's `message`, which is a reply, and of those
|
|
20
|
+
* after it. Without `message`, a reply to the latest message, which has none, such as after the
|
|
21
|
+
* agent couldn't answer it.
|
|
22
|
+
* - `edit`: the person changed the request's `message`, one of theirs, to say its `text`: it is
|
|
23
|
+
* answered again, in place of the replies after it.
|
|
24
|
+
*
|
|
25
|
+
* An open set: a kind of your own is on its way like a message.
|
|
26
|
+
*/
|
|
27
|
+
export type AIConversationRequestKind = 'message' | 'regenerate' | 'edit' | (string & {});
|
|
28
|
+
/** What the person asks the agent, as an `AIConversationTransport` sends it. */
|
|
29
|
+
export type AIConversationRequest<Message extends AIMessage = AIMessage> = {
|
|
30
|
+
/** What the person asks for. */
|
|
31
|
+
kind: AIConversationRequestKind;
|
|
32
|
+
/**
|
|
33
|
+
* An id for the person's message. A transport that creates the message with it lets the
|
|
34
|
+
* conversation find its copy by it. A retry of the request keeps it.
|
|
35
|
+
*/
|
|
36
|
+
messageId: string;
|
|
37
|
+
/** What the person wrote. When a reply is written again, the message it answers says it. */
|
|
38
|
+
text: string;
|
|
39
|
+
/** The files the person picked, on this device, to upload with their message. */
|
|
40
|
+
attachments: MediaAsset[];
|
|
41
|
+
/** The option the person picked in the composer, such as thinking harder. */
|
|
42
|
+
chatOption?: AIChatOption;
|
|
43
|
+
/** What the composer held besides, as `ComposerState.custom`. */
|
|
44
|
+
custom?: Record<string, unknown>;
|
|
45
|
+
/** The message it is about: the reply to write again, or the person's message they edited. */
|
|
46
|
+
message?: Message;
|
|
47
|
+
};
|
|
48
|
+
/** The ids of the states Stream Chat's AI indicator reports. */
|
|
49
|
+
export declare const AIAgentActivityStates: {
|
|
50
|
+
readonly checkingExternalSources: "AI_STATE_EXTERNAL_SOURCES";
|
|
51
|
+
readonly error: "AI_STATE_ERROR";
|
|
52
|
+
readonly generating: "AI_STATE_GENERATING";
|
|
53
|
+
readonly thinking: "AI_STATE_THINKING";
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* What the agent is doing. An open set: compare against the states you know. Those of
|
|
57
|
+
* `AIAgentActivityStates` are Stream Chat's AI indicator's.
|
|
58
|
+
*/
|
|
59
|
+
export type AIAgentActivityState = (typeof AIAgentActivityStates)[keyof typeof AIAgentActivityStates] | (string & {});
|
|
60
|
+
/** What the agent says it is doing besides what its reply shows, such as checking sources. */
|
|
61
|
+
export type AIAgentActivity = {
|
|
62
|
+
state: AIAgentActivityState;
|
|
63
|
+
/** What it says about it, such as "Searching the web", or why it couldn't answer. */
|
|
64
|
+
text?: string;
|
|
65
|
+
};
|
|
66
|
+
/** What the conversation's views offer the person to do with its messages. All by default. */
|
|
67
|
+
export type AIConversationActions = {
|
|
68
|
+
/** Editing the person's latest message, which is then answered again. */
|
|
69
|
+
edit?: boolean;
|
|
70
|
+
/** Rating replies. */
|
|
71
|
+
rate?: boolean;
|
|
72
|
+
/** Asking for a new reply in place of the latest. */
|
|
73
|
+
regenerate?: boolean;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Where an `AIConversationTransport` tells its `AIConversationController` what the conversation
|
|
77
|
+
* holds. Once the controller is disposed, its updates go nowhere.
|
|
78
|
+
*/
|
|
79
|
+
export type AIConversationFeed<Message extends AIMessage = AIMessage> = {
|
|
80
|
+
/** Whether the controller it updates is still there. Stop following what it holds once it isn't. */
|
|
81
|
+
readonly isConnected: boolean;
|
|
82
|
+
/** The conversation's messages, oldest first, each time they change. */
|
|
83
|
+
updateMessages: (messages: readonly Message[]) => void;
|
|
84
|
+
/** Whether there are messages before the first one, which `loadOlderMessages` loads. */
|
|
85
|
+
updateHasOlderMessages: (hasOlderMessages: boolean) => void;
|
|
86
|
+
/** What the agent says it is doing, or `undefined` once it stops saying. */
|
|
87
|
+
updateActivity: (activity: AIAgentActivity | undefined) => void;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* How an `AIConversationController` reaches the agent and learns what it holds: it sends what the
|
|
91
|
+
* person asks, stops the agent, and tells the controller its messages as they change.
|
|
92
|
+
*
|
|
93
|
+
* With Stream Chat, the conversation is a channel: the transport follows its messages and AI
|
|
94
|
+
* indicator events, and sends each request through the channel or your agent's own API.
|
|
95
|
+
*
|
|
96
|
+
* ```ts
|
|
97
|
+
* const transport: AIConversationTransport = {
|
|
98
|
+
* connect: (feed) => {
|
|
99
|
+
* const update = () => feed.updateMessages(channel.state.messages.map(fromStreamMessage));
|
|
100
|
+
* update();
|
|
101
|
+
* return channel.on(update).unsubscribe;
|
|
102
|
+
* },
|
|
103
|
+
* send: (request) => agent.respond(request.text, request.attachments),
|
|
104
|
+
* stop: () => agent.interrupt(),
|
|
105
|
+
* };
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export type AIConversationTransport<Message extends AIMessage = AIMessage> = {
|
|
109
|
+
/**
|
|
110
|
+
* Starts telling `feed` what the conversation holds: its messages each time they change,
|
|
111
|
+
* whether there are older ones to load, and what the agent says it is doing. The controller
|
|
112
|
+
* calls it once, as it is made, and calls what it returns once it is disposed.
|
|
113
|
+
*/
|
|
114
|
+
connect: (feed: AIConversationFeed<Message>) => void | (() => void);
|
|
115
|
+
/**
|
|
116
|
+
* Sends what the person asks. Resolve once the agent has the request: its reply arrives
|
|
117
|
+
* through the feed. A rejection shows as the conversation's error, and the person can retry,
|
|
118
|
+
* which sends the same request again with the same `messageId`: if the first attempt reached
|
|
119
|
+
* your backend, or you keep a copy of the failed message, use the id so the message isn't added
|
|
120
|
+
* twice. A rejection with an `AbortError` ends the request without an error.
|
|
121
|
+
*
|
|
122
|
+
* The controller leaves out the messages a `regenerate` or an `edit` replaces only until the
|
|
123
|
+
* new reply starts. From then on it shows the messages as the feed has them, so update the
|
|
124
|
+
* conversation before the new reply arrives:
|
|
125
|
+
* - For a regenerate, remove the request's `message` and the messages after it, or write the
|
|
126
|
+
* new reply in place of `message`, under its id.
|
|
127
|
+
* - For an edit, change the person's `message` to say the request's `text`, under its id, and
|
|
128
|
+
* remove the messages after it.
|
|
129
|
+
*/
|
|
130
|
+
send: (request: AIConversationRequest<Message>) => Promise<void>;
|
|
131
|
+
/** Stops the reply the agent is writing. What it wrote so far stays. */
|
|
132
|
+
stop: () => Promise<void>;
|
|
133
|
+
/** Loads the messages before the first one, which arrive through the feed. */
|
|
134
|
+
loadOlderMessages?: () => Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Tells your backend how the person rated a reply, or that they took their rating back with
|
|
137
|
+
* `null`. Without it, the controller keeps the ratings on this device. Ratings your backend has
|
|
138
|
+
* show through each message's `rating`.
|
|
139
|
+
*/
|
|
140
|
+
rate?: (reply: Message, rating: AIMessageRating | null) => Promise<void>;
|
|
141
|
+
};
|
|
142
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation-state/controller/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gEAAgE,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAEjF,wFAAwF;AACxF,eAAO,MAAM,yBAAyB,GAAI,QAAQ,oBAAoB,wCACpB,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE1F,gFAAgF;AAChF,MAAM,MAAM,qBAAqB,CAAC,OAAO,SAAS,SAAS,GAAG,SAAS,IAAI;IACzE,gCAAgC;IAChC,IAAI,EAAE,yBAAyB,CAAC;IAChC;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,4FAA4F;IAC5F,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAC5B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,GAClE,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,8FAA8F;AAC9F,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,oBAAoB,CAAC;IAC5B,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,8FAA8F;AAC9F,MAAM,MAAM,qBAAqB,GAAG;IAClC,yEAAyE;IACzE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sBAAsB;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,CAAC,OAAO,SAAS,SAAS,GAAG,SAAS,IAAI;IACtE,oGAAoG;IACpG,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,wEAAwE;IACxE,cAAc,EAAE,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,KAAK,IAAI,CAAC;IACvD,wFAAwF;IACxF,sBAAsB,EAAE,CAAC,gBAAgB,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,4EAA4E;IAC5E,cAAc,EAAE,CAAC,QAAQ,EAAE,eAAe,GAAG,SAAS,KAAK,IAAI,CAAC;CACjE,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,uBAAuB,CAAC,OAAO,SAAS,SAAS,GAAG,SAAS,IAAI;IAC3E;;;;OAIG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,kBAAkB,CAAC,OAAO,CAAC,KAAK,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IACpE;;;;;;;;;;;;;;OAcG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,wEAAwE;IACxE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC;;;;OAIG;IACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E,CAAC"}
|
package/lib/typescript/ai-components/conversation-state/controller/useAIConversationState.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AIConversationController, AIConversationControllerState } from './AIConversationController';
|
|
2
|
+
import type { AIMessage } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Follows what `selector` picks of a conversation's state, such as its `status` or `error`: the
|
|
5
|
+
* component renders again when it changes. Keep `selector` outside the component, so it stays the
|
|
6
|
+
* same between renders.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useAIConversationState: <Message extends AIMessage, Selected extends Readonly<Record<string, unknown>>>(conversation: AIConversationController<Message>, selector: (state: AIConversationControllerState<Message>) => Selected) => Selected;
|
|
9
|
+
//# sourceMappingURL=useAIConversationState.d.ts.map
|
package/lib/typescript/ai-components/conversation-state/controller/useAIConversationState.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAIConversationState.d.ts","sourceRoot":"","sources":["../../../../../src/ai-components/conversation-state/controller/useAIConversationState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAElD,cAAc,wBAAwB,CAAC,OAAO,CAAC,EAC/C,UAAU,CAAC,KAAK,EAAE,6BAA6B,CAAC,OAAO,CAAC,KAAK,QAAQ,aACvB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { LocalMessage, MessageResponse } from 'stream-chat';
|
|
2
|
+
import type { AIMessage } from './types';
|
|
3
|
+
/** A Stream message, as the channel's state or an event has it. */
|
|
4
|
+
export type AIStreamMessage = Pick<LocalMessage | MessageResponse, 'attachments' | 'id' | 'text'> & Record<string, unknown>;
|
|
5
|
+
export type FromStreamMessageOptions = {
|
|
6
|
+
/** Whether the agent wrote it. Defaults to the message's `ai_generated` field. */
|
|
7
|
+
isAssistant?: (message: AIStreamMessage) => boolean;
|
|
8
|
+
/** The whole of a reasoning step's thinking, when the app has it, such as from live updates. */
|
|
9
|
+
reasoningText?: (messageId: string, stepId: string) => string | undefined;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Adapts a Stream message for `AIConversation`: a reply is one with `ai_generated: true`, it is
|
|
13
|
+
* being written while `generating: true`, its steps are its `ai_reasoning` and `ai_tool_call`
|
|
14
|
+
* attachments, its images and files are its other attachments, and the UI the agent wrote for
|
|
15
|
+
* it is its `ai_ui` field. A person's message has no UI, whatever its fields say.
|
|
16
|
+
*/
|
|
17
|
+
export declare const fromStreamMessage: (message: AIStreamMessage, { isAssistant, reasoningText }?: FromStreamMessageOptions) => AIMessage;
|
|
18
|
+
/**
|
|
19
|
+
* A `fromStreamMessage` that gives back the same `AIMessage` for the same Stream message object.
|
|
20
|
+
* The channel's state replaces only the messages that change, so mapping its messages through it
|
|
21
|
+
* on every update leaves the others as they were, and `AIConversation` renders only the changed
|
|
22
|
+
* ones again. Make one per conversation, such as with `useState(() => createFromStreamMessage())`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const createFromStreamMessage: (options?: FromStreamMessageOptions) => (message: AIStreamMessage) => AIMessage;
|
|
25
|
+
//# sourceMappingURL=fromStreamMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromStreamMessage.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/conversation-state/fromStreamMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAMzC,mEAAmE;AACnE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,GAAG,eAAe,EAAE,aAAa,GAAG,IAAI,GAAG,MAAM,CAAC,GAC/F,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1B,MAAM,MAAM,wBAAwB,GAAG;IACrC,kFAAkF;IAClF,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC;IACpD,gGAAgG;IAChG,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAC3E,CAAC;AA0BF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,eAAe,EACxB,iCAAgC,wBAA6B,KAC5D,SAkBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAAI,UAAU,wBAAwB,MAEhE,SAAS,eAAe,cAQjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/conversation-state/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { AIUIDocument } from '../generative-ui/AIUIDocument';
|
|
2
|
+
import type { AIMessageAttachmentData } from '../message/AIMessageAttachment';
|
|
3
|
+
import type { AIMessageRating } from '../message/AIReplyActions';
|
|
4
|
+
import type { AIMessagePartData } from '../message-parts/types';
|
|
5
|
+
/** Who wrote a message: the person using the app (`user`) or the agent (`assistant`). */
|
|
6
|
+
export type AIMessageRole = 'user' | 'assistant' | (string & {});
|
|
7
|
+
/**
|
|
8
|
+
* A message of the conversation as the AI components show it. `fromStreamMessage` makes one
|
|
9
|
+
* from a Stream message.
|
|
10
|
+
*/
|
|
11
|
+
export type AIMessage = {
|
|
12
|
+
id: string;
|
|
13
|
+
/** Who wrote it. Each of the person's messages starts a turn. */
|
|
14
|
+
role: AIMessageRole;
|
|
15
|
+
/** What it says. A reply's text is Markdown. */
|
|
16
|
+
text: string;
|
|
17
|
+
/** What it carries besides its text, such as images and files. */
|
|
18
|
+
attachments?: AIMessageAttachmentData[];
|
|
19
|
+
/** Whether the agent is still writing it. */
|
|
20
|
+
isGenerating?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* How the person rated a reply, as your backend has it. An `AIConversationController` shows it
|
|
23
|
+
* until the person rates the reply on this device.
|
|
24
|
+
*/
|
|
25
|
+
rating?: AIMessageRating | null;
|
|
26
|
+
/** The steps the agent took for it, in order: reasoning, tool calls and kinds of its own. */
|
|
27
|
+
parts?: AIMessagePartData[];
|
|
28
|
+
/**
|
|
29
|
+
* The whole of a reasoning step's thinking when the app has it, such as from live updates.
|
|
30
|
+
* Without it, the step shows its own excerpt. It is read on every render, so look it up
|
|
31
|
+
* rather than work it out.
|
|
32
|
+
*/
|
|
33
|
+
reasoningText?: (stepId: string) => string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The UI the agent wrote for a reply, which shows in place of its text when the
|
|
36
|
+
* conversation's `ui` host has a renderer for it. A person's message has none.
|
|
37
|
+
*/
|
|
38
|
+
uiDocument?: AIUIDocument;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A message the person sent that is not in the conversation's messages yet. The conversation
|
|
42
|
+
* shows it until its copy arrives, and shows the agent thinking meanwhile.
|
|
43
|
+
*/
|
|
44
|
+
export type AIPendingMessage = {
|
|
45
|
+
/**
|
|
46
|
+
* The message's id once it arrives, when you know it (such as the id you send it with). Its
|
|
47
|
+
* copy is then found by it rather than by where it lands. Keep it the same while it waits.
|
|
48
|
+
*/
|
|
49
|
+
id: string;
|
|
50
|
+
/** What the person wrote. */
|
|
51
|
+
text: string;
|
|
52
|
+
/** What they sent with it, such as the photos and files they picked. Its copy shows these too. */
|
|
53
|
+
attachments?: AIMessageAttachmentData[];
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/conversation-state/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,yFAAyF;AACzF,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,aAAa,CAAC;IACpB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,WAAW,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACxC,6CAA6C;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,6FAA6F;IAC7F,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACvD;;;OAGG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,kGAAkG;IAClG,WAAW,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACzC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AIUIFormat } from './AIUIDocument';
|
|
2
|
+
/**
|
|
3
|
+
* What the person did in a reply's UI, such as tapping a place or submitting a form. It goes to
|
|
4
|
+
* the agent as their next message: `label` is its text and `aiUIActionJSON(action)` what it
|
|
5
|
+
* carries.
|
|
6
|
+
*/
|
|
7
|
+
export type AIUIAction = {
|
|
8
|
+
/** The format of the UI it came from. */
|
|
9
|
+
format: AIUIFormat;
|
|
10
|
+
/** What the person did, in their words, such as "Tell me more about St. Naum". */
|
|
11
|
+
label: string;
|
|
12
|
+
/** The reply whose UI it came from. */
|
|
13
|
+
messageId: string;
|
|
14
|
+
/**
|
|
15
|
+
* What happened, such as an event of an app's component (`ask_about`) or OpenUI's
|
|
16
|
+
* `continue_conversation`.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/** The details in the format's own shape, such as what was chosen and a form's values. */
|
|
20
|
+
payload: Record<string, unknown>;
|
|
21
|
+
};
|
|
22
|
+
/** The action as the JSON object an agent's backend reads. */
|
|
23
|
+
export type AIUIActionJSON = {
|
|
24
|
+
format: AIUIFormat;
|
|
25
|
+
message_id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
payload: Record<string, unknown>;
|
|
28
|
+
v: 1;
|
|
29
|
+
};
|
|
30
|
+
/** The custom field of the person's message that holds the action. */
|
|
31
|
+
export declare const AI_UI_ACTION_CUSTOM_DATA_KEY = "ai_ui_action";
|
|
32
|
+
/**
|
|
33
|
+
* The most an action may take as JSON. The agents router refuses a larger one, and its
|
|
34
|
+
* refusal would lose the person's message with it.
|
|
35
|
+
*/
|
|
36
|
+
export declare const AI_UI_ACTION_MAX_BYTES: number;
|
|
37
|
+
/**
|
|
38
|
+
* The action as the JSON object an agent's backend reads, such as the `uiAction` of
|
|
39
|
+
* `session.responses.create(action.label, { uiAction })`. The label is not in it: it is the
|
|
40
|
+
* text of the person's message.
|
|
41
|
+
*/
|
|
42
|
+
export declare const aiUIActionJSON: (action: AIUIAction) => AIUIActionJSON;
|
|
43
|
+
/**
|
|
44
|
+
* Why the agent's backend would refuse the action, or `undefined` when it would take it: it
|
|
45
|
+
* names its reply, its format and what happened, in at most `AI_UI_ACTION_MAX_BYTES` of JSON.
|
|
46
|
+
*/
|
|
47
|
+
export declare const aiUIActionProblem: (action: AIUIAction) => string | undefined;
|
|
48
|
+
//# sourceMappingURL=AIUIAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIUIAction.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/generative-ui/AIUIAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,yCAAyC;IACzC,MAAM,EAAE,UAAU,CAAC;IACnB,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,0FAA0F;IAC1F,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,CAAC;CACN,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAC3D;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAW,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,UAAU,KAAG,cAMlD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,QAAQ,UAAU,KAAG,MAAM,GAAG,SAc/D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AIUIParameter } from './AIUIComponentDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* A date the agent wrote: an RFC 3339 moment, or a whole day as `yyyy-MM-dd` that the calendar
|
|
4
|
+
* has, which is that day's start where the person is. Anything else is not a date.
|
|
5
|
+
*/
|
|
6
|
+
export declare const aiUIDate: (text: string) => Date | undefined;
|
|
7
|
+
/** `place_name` as `placeName`, the way the agent's snake_case reads in JavaScript. */
|
|
8
|
+
export declare const aiUICamelCase: (key: string) => string;
|
|
9
|
+
/**
|
|
10
|
+
* The arguments the agent wrote for a component, as its view reads them: keys in camelCase,
|
|
11
|
+
* dates as `Date`s. `undefined` while they do not fit its parameters, such as while they are
|
|
12
|
+
* still streaming in: a required one is missing, or one is of the wrong type.
|
|
13
|
+
*/
|
|
14
|
+
export declare const decodeAIUIArguments: <Arguments = Record<string, unknown>>(args: Record<string, unknown>, parameters: AIUIParameter[]) => Arguments | undefined;
|
|
15
|
+
//# sourceMappingURL=AIUIArguments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIUIArguments.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/generative-ui/AIUIArguments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAU/E;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,KAAG,IAAI,GAAG,SAa9C,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,WAUxC,CAAC;AA6DF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,YAAY,aAAa,EAAE,KAC1B,SAAS,GAAG,SAOd,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { type ComponentType } from 'react';
|
|
2
|
+
import type { AIUIComponentDefinition } from './AIUIComponentDefinition';
|
|
3
|
+
import type { AIUIHost } from './AIUIHost';
|
|
4
|
+
/** Where an app's component is shown, and how it tells the agent what the person did. */
|
|
5
|
+
export type AIUIComponentContext = {
|
|
6
|
+
/**
|
|
7
|
+
* Tells the agent about one of the component's events, as the person's next message.
|
|
8
|
+
* `label` is what the person did, in their words, such as "Tell me more about St. Naum".
|
|
9
|
+
*/
|
|
10
|
+
emit: (event: string, label: string, payload?: Record<string, unknown>) => void;
|
|
11
|
+
/** The conversation's host, for running the app's tools and opening links. */
|
|
12
|
+
host: AIUIHost;
|
|
13
|
+
/** Whether the agent is still writing the reply's UI, so the arguments may still change. */
|
|
14
|
+
isStreaming: boolean;
|
|
15
|
+
/** The reply the component is in. */
|
|
16
|
+
messageId: string;
|
|
17
|
+
};
|
|
18
|
+
export type AIUIComponentProps<Arguments> = {
|
|
19
|
+
/** What the agent filled in: keys in camelCase, dates as `Date`s. */
|
|
20
|
+
args: Arguments;
|
|
21
|
+
context: AIUIComponentContext;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* One of the app's views that the agent can place in a reply's UI, in whichever format it
|
|
25
|
+
* writes, such as a map or a card over the app's own data.
|
|
26
|
+
*/
|
|
27
|
+
export type AIUIComponent = {
|
|
28
|
+
Component: ComponentType<AIUIComponentProps<never>>;
|
|
29
|
+
/** Its description, the same on every platform and for the agent. */
|
|
30
|
+
definition: AIUIComponentDefinition;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* One of the app's components, with what its view reads from the agent's arguments. The view
|
|
34
|
+
* gets them only once they fit the definition's parameters, so it can rely on their types.
|
|
35
|
+
*
|
|
36
|
+
* A conversation reuses its views: one scrolled out of sight shows another reply's UI next, so
|
|
37
|
+
* state the view keeps of its own has to start afresh for a new `context.messageId`.
|
|
38
|
+
*/
|
|
39
|
+
export declare const defineAIUIComponent: <Arguments>(definition: AIUIComponentDefinition, Component: ComponentType<AIUIComponentProps<Arguments>>) => AIUIComponent;
|
|
40
|
+
/**
|
|
41
|
+
* An app's component for the arguments the agent wrote, coming in as it shows, or nothing
|
|
42
|
+
* while they don't fit its parameters, such as while they are still streaming in. Renderers
|
|
43
|
+
* place the app's components with it. One that throws leaves only itself out of the reply's
|
|
44
|
+
* UI, is tried again when its arguments change, and is reported once the reply is written.
|
|
45
|
+
*/
|
|
46
|
+
export declare const AIUIComponentView: ({ args, component, context, }: {
|
|
47
|
+
args: Record<string, unknown>;
|
|
48
|
+
component: AIUIComponent;
|
|
49
|
+
context: AIUIComponentContext;
|
|
50
|
+
}) => React.JSX.Element | null;
|
|
51
|
+
//# sourceMappingURL=AIUIComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIUIComponent.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/generative-ui/AIUIComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAAW,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,yFAAyF;AACzF,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAChF,8EAA8E;IAC9E,IAAI,EAAE,QAAQ,CAAC;IACf,4FAA4F;IAC5F,WAAW,EAAE,OAAO,CAAC;IACrB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,SAAS,IAAI;IAC1C,qEAAqE;IACrE,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,oBAAoB,CAAC;CAC/B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,aAAa,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;IACpD,qEAAqE;IACrE,UAAU,EAAE,uBAAuB,CAAC;CACrC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,EAC3C,YAAY,uBAAuB,EACnC,WAAW,aAAa,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,KACtD,aAID,CAAC;AAWH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,+BAI/B;IACD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,SAAS,EAAE,aAAa,CAAC;IACzB,OAAO,EAAE,oBAAoB,CAAC;CAC/B,6BA2BA,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/** A JSON Schema, as a component's parameters are described to the agent. */
|
|
2
|
+
export type AIUIJSONSchema = Record<string, unknown>;
|
|
3
|
+
/** Something the agent fills in for a component. */
|
|
4
|
+
export type AIUIParameter = {
|
|
5
|
+
/** Whether the agent must fill it in. */
|
|
6
|
+
isRequired: boolean;
|
|
7
|
+
/** The name the agent fills it in by, such as `title`. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** What it holds, as a JSON Schema, such as `AIUIParameterType.string`. */
|
|
10
|
+
type: AIUIJSONSchema;
|
|
11
|
+
/** What it is, for the agent. */
|
|
12
|
+
description?: string;
|
|
13
|
+
};
|
|
14
|
+
/** Something a component reports when the person uses it, such as tapping a place. */
|
|
15
|
+
export type AIUIComponentEvent = {
|
|
16
|
+
/** When it happens, for the agent. */
|
|
17
|
+
description: string;
|
|
18
|
+
/** The name it is reported by, such as `ask_about`. */
|
|
19
|
+
name: string;
|
|
20
|
+
/** What it carries, in order. */
|
|
21
|
+
parameters: AIUIParameter[];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* An app's component as the agent knows it: its name, what it shows, what the agent fills in
|
|
25
|
+
* and what it reports. It is portable JSON, the same on every platform, so one description
|
|
26
|
+
* (such as a `UIComponents.json` shared with the iOS and Android apps) serves them all.
|
|
27
|
+
*/
|
|
28
|
+
export type AIUIComponentDefinition = {
|
|
29
|
+
/** What it shows and when to use it, for the agent. */
|
|
30
|
+
description: string;
|
|
31
|
+
/** What it reports when the person uses it. */
|
|
32
|
+
events: AIUIComponentEvent[];
|
|
33
|
+
/** The name the agent places it by, such as `place_card`. */
|
|
34
|
+
name: string;
|
|
35
|
+
/**
|
|
36
|
+
* What the agent fills in, in order: a format such as OpenUI Lang passes arguments by
|
|
37
|
+
* position.
|
|
38
|
+
*/
|
|
39
|
+
parameters: AIUIParameter[];
|
|
40
|
+
};
|
|
41
|
+
/** The types a parameter commonly has, as JSON Schemas. */
|
|
42
|
+
export declare const AIUIParameterType: {
|
|
43
|
+
/** A list of values of one type. */
|
|
44
|
+
array: (items: AIUIJSONSchema) => AIUIJSONSchema;
|
|
45
|
+
boolean: AIUIJSONSchema;
|
|
46
|
+
/** A day, such as `2026-11-14`. */
|
|
47
|
+
date: AIUIJSONSchema;
|
|
48
|
+
/** A moment, such as `2026-11-14T09:30:00Z`. */
|
|
49
|
+
dateTime: AIUIJSONSchema;
|
|
50
|
+
/** One of a fixed set of strings. */
|
|
51
|
+
enumeration: (values: string[]) => AIUIJSONSchema;
|
|
52
|
+
integer: AIUIJSONSchema;
|
|
53
|
+
number: AIUIJSONSchema;
|
|
54
|
+
/** An object with named fields, in order. */
|
|
55
|
+
object: (fields: AIUIParameter[]) => AIUIJSONSchema;
|
|
56
|
+
string: AIUIJSONSchema;
|
|
57
|
+
/** A link, such as an image's. */
|
|
58
|
+
url: AIUIJSONSchema;
|
|
59
|
+
};
|
|
60
|
+
/** A parameter the agent must fill in. */
|
|
61
|
+
export declare const requiredAIUIParameter: (name: string, type: AIUIJSONSchema, description?: string) => AIUIParameter;
|
|
62
|
+
/** A parameter the agent may leave out. */
|
|
63
|
+
export declare const optionalAIUIParameter: (name: string, type: AIUIJSONSchema, description?: string) => AIUIParameter;
|
|
64
|
+
/** Parameters as a JSON Schema object, the way a tool's are described, keeping their order. */
|
|
65
|
+
export declare const aiUIObjectSchema: (parameters: AIUIParameter[]) => AIUIJSONSchema;
|
|
66
|
+
/** The fields of a JSON Schema object, in the order it keeps, then by name. */
|
|
67
|
+
export declare const aiUIParametersOf: (schema: unknown) => AIUIParameter[];
|
|
68
|
+
/**
|
|
69
|
+
* Reads a component's portable JSON, such as one entry of a `UIComponents.json`, or returns
|
|
70
|
+
* `undefined` for one without a name.
|
|
71
|
+
*/
|
|
72
|
+
export declare const parseAIUIComponentDefinition: (json: unknown) => AIUIComponentDefinition | undefined;
|
|
73
|
+
/** A component's portable JSON, as `parseAIUIComponentDefinition` reads it back. */
|
|
74
|
+
export declare const aiUIComponentDefinitionJSON: (definition: AIUIComponentDefinition) => {
|
|
75
|
+
description: string;
|
|
76
|
+
events: {
|
|
77
|
+
parameters?: AIUIJSONSchema | undefined;
|
|
78
|
+
description: string;
|
|
79
|
+
name: string;
|
|
80
|
+
}[];
|
|
81
|
+
name: string;
|
|
82
|
+
parameters: AIUIJSONSchema;
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=AIUIComponentDefinition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIUIComponentDefinition.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/generative-ui/AIUIComponentDefinition.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAErD,oDAAoD;AACpD,MAAM,MAAM,aAAa,GAAG;IAC1B,yCAAyC;IACzC,UAAU,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,IAAI,EAAE,cAAc,CAAC;IACrB,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,sFAAsF;AACtF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,UAAU,EAAE,aAAa,EAAE,CAAC;CAC7B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,UAAU,EAAE,aAAa,EAAE,CAAC;CAC7B,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB;IAC5B,oCAAoC;mBACrB,cAAc,KAAG,cAAc;aACd,cAAc;IAC9C,mCAAmC;UACS,cAAc;IAC1D,gDAAgD;cACK,cAAc;IACnE,qCAAqC;0BACf,MAAM,EAAE,KAAG,cAAc;aACf,cAAc;YAChB,cAAc;IAC5C,6CAA6C;qBAC5B,aAAa,EAAE,KAAG,cAAc;YACnB,cAAc;IAC5C,kCAAkC;SACQ,cAAc;CACzD,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,qBAAqB,GAChC,MAAM,MAAM,EACZ,MAAM,cAAc,EACpB,cAAc,MAAM,KACnB,aAAgE,CAAC;AAEpE,2CAA2C;AAC3C,eAAO,MAAM,qBAAqB,GAChC,MAAM,MAAM,EACZ,MAAM,cAAc,EACpB,cAAc,MAAM,KACnB,aAAiE,CAAC;AAQrE,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB,GAAI,YAAY,aAAa,EAAE,KAAG,cAU7D,CAAC;AAEH,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,KAAG,aAAa,EAqB/D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACvC,MAAM,OAAO,KACZ,uBAAuB,GAAG,SAqB5B,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,2BAA2B,GAAI,YAAY,uBAAuB;;;;;;;;;CAS7E,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The format a reply's UI is written in, such as `a2ui` or `openui`. Formats are an open set:
|
|
3
|
+
* a renderer says which one it reads.
|
|
4
|
+
*/
|
|
5
|
+
export type AIUIFormat = 'a2ui' | 'openui' | (string & {});
|
|
6
|
+
/**
|
|
7
|
+
* The UI an agent wrote for a reply, which shows in place of the reply's text.
|
|
8
|
+
*/
|
|
9
|
+
export type AIUIDocument = {
|
|
10
|
+
/** The document in its format's own shape: a program's text, or JSON. */
|
|
11
|
+
content: unknown;
|
|
12
|
+
/** The format it is written in. */
|
|
13
|
+
format: AIUIFormat;
|
|
14
|
+
/** Whether the agent is still writing it. */
|
|
15
|
+
isStreaming: boolean;
|
|
16
|
+
/** The format's version, when the agent names one. */
|
|
17
|
+
version?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* A reply's `ai_ui` field as the agents router writes it. An app that reads it from its Stream
|
|
21
|
+
* messages types it there with `ai_ui?: AIUIDocumentJSON` in its `CustomMessageData`.
|
|
22
|
+
*/
|
|
23
|
+
export type AIUIDocumentJSON = {
|
|
24
|
+
/** The document in its format's own shape: usually text, such as A2UI's JSON lines. */
|
|
25
|
+
content: unknown;
|
|
26
|
+
format: AIUIFormat;
|
|
27
|
+
/** `streaming` while the agent writes it, then `complete`. */
|
|
28
|
+
status?: 'streaming' | 'complete' | (string & {});
|
|
29
|
+
/** The version of the field's own layout; a newer one than this SDK reads shows the text. */
|
|
30
|
+
v?: number;
|
|
31
|
+
version?: string;
|
|
32
|
+
};
|
|
33
|
+
/** The custom field of a message that holds its document. */
|
|
34
|
+
export declare const AI_UI_CUSTOM_DATA_KEY = "ai_ui";
|
|
35
|
+
/** The newest version of the `ai_ui` field this SDK reads. */
|
|
36
|
+
export declare const AI_UI_SUPPORTED_VERSION = 1;
|
|
37
|
+
/**
|
|
38
|
+
* Reads the document of a message's `ai_ui` field, or returns `undefined` when it carries none
|
|
39
|
+
* this SDK can read: no format, no content, or a field newer than this SDK, which can lay its
|
|
40
|
+
* documents out differently. The reply then shows its text.
|
|
41
|
+
*/
|
|
42
|
+
export declare const parseAIUIDocument: (field: unknown) => AIUIDocument | undefined;
|
|
43
|
+
/** The content of a document when it is text, such as an OpenUI program or A2UI's JSON lines. */
|
|
44
|
+
export declare const aiUIDocumentText: (document: AIUIDocument) => string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Whether two documents are the same, content included. A message is a new object on every
|
|
47
|
+
* update while a reply streams, so a document is compared by what it holds.
|
|
48
|
+
*/
|
|
49
|
+
export declare const isSameAIUIDocument: (a: AIUIDocument | undefined, b: AIUIDocument | undefined) => boolean;
|
|
50
|
+
//# sourceMappingURL=AIUIDocument.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIUIDocument.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/generative-ui/AIUIDocument.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,yEAAyE;IACzE,OAAO,EAAE,OAAO,CAAC;IACjB,mCAAmC;IACnC,MAAM,EAAE,UAAU,CAAC;IACnB,6CAA6C;IAC7C,WAAW,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,uFAAuF;IACvF,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAClD,6FAA6F;IAC7F,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAC7C,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,KAAG,YAAY,GAAG,SAYjE,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,gBAAgB,GAAI,UAAU,YAAY,uBACc,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,GAAG,YAAY,GAAG,SAAS,EAAE,GAAG,YAAY,GAAG,SAAS,YAOtD,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Spaces out the parts of a reply's UI that come in together, so they come in one after another
|
|
5
|
+
* rather than at once.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AIUICascade {
|
|
8
|
+
/** How long after the part before it a part comes in, in seconds. */
|
|
9
|
+
static readonly step = 0.1;
|
|
10
|
+
/** The longest a part waits for the parts before it, in seconds. */
|
|
11
|
+
static readonly longestWait = 0.4;
|
|
12
|
+
private next;
|
|
13
|
+
/** How long a part that comes in at `now`, in seconds, waits for the parts before it. */
|
|
14
|
+
delay(now?: number): number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A reply's generated UI as a whole: it comes in when it first shows while the agent writes it,
|
|
18
|
+
* and shows at once when it was written before, such as a reply from history.
|
|
19
|
+
*/
|
|
20
|
+
export declare const AIUIEntranceStage: ({ children, isStreaming, resetKey, style, }: {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
/** Whether the agent is writing the UI as it first shows. */
|
|
23
|
+
isStreaming: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Which reply's UI it shows: when it changes, it shows the UI as one mounted for it would, as
|
|
26
|
+
* when a list reuses it for another reply.
|
|
27
|
+
*/
|
|
28
|
+
resetKey?: unknown;
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
}) => React.JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* Whether a part of a reply's generated UI comes in, as it was when the part first showed: a
|
|
33
|
+
* part that shows at once, such as one of a reply from history, can show in a plain view. A part
|
|
34
|
+
* mounted before it has anything to show passes `shows` as false until it does.
|
|
35
|
+
*/
|
|
36
|
+
export declare const useAIUIComesIn: (shows?: boolean) => boolean;
|
|
37
|
+
/**
|
|
38
|
+
* What a part of a reply's generated UI needs to come in when it shows, for a renderer that
|
|
39
|
+
* animates a view of its own rather than wrap the part in `AIUIEntrance`: the animated `style`
|
|
40
|
+
* for that view, and `scope`, to wrap what the part shows in, so what shows with it comes in
|
|
41
|
+
* with it. The same entrance as `AIUIEntrance`'s.
|
|
42
|
+
*/
|
|
43
|
+
export declare const useAIUIEntrance: () => {
|
|
44
|
+
scope: (children: ReactNode) => React.JSX.Element;
|
|
45
|
+
style: ({
|
|
46
|
+
transformOrigin: string;
|
|
47
|
+
} | import("react-native-reanimated/lib/typescript/hook/commonTypes").AnimatedStyleHandle<{
|
|
48
|
+
opacity: number;
|
|
49
|
+
} | {
|
|
50
|
+
filter?: {
|
|
51
|
+
blur: number;
|
|
52
|
+
}[] | undefined;
|
|
53
|
+
opacity: number;
|
|
54
|
+
transform: ({
|
|
55
|
+
translateY: number;
|
|
56
|
+
scale?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
scale: number;
|
|
59
|
+
translateY?: undefined;
|
|
60
|
+
})[];
|
|
61
|
+
}>)[];
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Brings a part of a reply's generated UI in when it shows, such as when the agent writes it:
|
|
65
|
+
* the part fades in, rising into place and, on Android 12 and later, coming into focus, after the
|
|
66
|
+
* parts that came in just before it. What shows together with the reply's UI, or with a part
|
|
67
|
+
* around it, comes in with that, so a reply written before it showed shows at once. With reduced
|
|
68
|
+
* motion it only fades.
|
|
69
|
+
*
|
|
70
|
+
* Renderers give it to each part they place. Every app component has it.
|
|
71
|
+
*/
|
|
72
|
+
export declare const AIUIEntrance: ({ children, style, }: {
|
|
73
|
+
children: ReactNode;
|
|
74
|
+
style?: StyleProp<ViewStyle>;
|
|
75
|
+
}) => React.JSX.Element;
|
|
76
|
+
//# sourceMappingURL=AIUIEntrance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIUIEntrance.d.ts","sourceRoot":"","sources":["../../../../src/ai-components/generative-ui/AIUIEntrance.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEZ,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AACf,OAAO,EAAY,KAAK,SAAS,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAa1F;;;GAGG;AACH,qBAAa,WAAW;IACtB,qEAAqE;IACrE,MAAM,CAAC,QAAQ,CAAC,IAAI,OAAO;IAC3B,oEAAoE;IACpE,MAAM,CAAC,QAAQ,CAAC,WAAW,OAAO;IAElC,OAAO,CAAC,IAAI,CAAK;IAEjB,yFAAyF;IACzF,KAAK,CAAC,GAAG,SAA+E;CAKzF;AAqED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,6CAK/B;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,6DAA6D;IAC7D,WAAW,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,sBAsBA,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,eAAY,YAS1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe;sBAQP,SAAS;;;;;;;;;;;;;;;;;;CAM7B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,sBAG1B;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,sBAOA,CAAC"}
|