@uipath/apollo-react 7.3.1 → 7.4.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/README.md +1 -1
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/chat/assets/autopilot-logo.cjs +61 -0
- package/dist/chat/assets/autopilot-logo.d.ts +3 -0
- package/dist/chat/assets/autopilot-logo.d.ts.map +1 -0
- package/dist/chat/assets/autopilot-logo.js +27 -0
- package/dist/chat/headless/history/history-groups.cjs +87 -0
- package/dist/chat/headless/history/history-groups.d.ts +22 -0
- package/dist/chat/headless/history/history-groups.d.ts.map +1 -0
- package/dist/chat/headless/history/history-groups.js +47 -0
- package/dist/chat/headless/hooks/use-attachment-intake.cjs +163 -0
- package/dist/chat/headless/hooks/use-attachment-intake.d.ts +13 -0
- package/dist/chat/headless/hooks/use-attachment-intake.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-attachment-intake.js +113 -0
- package/dist/chat/headless/hooks/use-attachment-limits.cjs +77 -0
- package/dist/chat/headless/hooks/use-attachment-limits.d.ts +3 -0
- package/dist/chat/headless/hooks/use-attachment-limits.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-attachment-limits.js +33 -0
- package/dist/chat/headless/hooks/use-chat-header-actions.cjs +146 -0
- package/dist/chat/headless/hooks/use-chat-header-actions.d.ts +32 -0
- package/dist/chat/headless/hooks/use-chat-header-actions.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-chat-header-actions.js +99 -0
- package/dist/chat/headless/hooks/use-chat-history.cjs +280 -0
- package/dist/chat/headless/hooks/use-chat-history.d.ts +24 -0
- package/dist/chat/headless/hooks/use-chat-history.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-chat-history.js +226 -0
- package/dist/chat/headless/hooks/use-chat-labels.cjs +52 -0
- package/dist/chat/headless/hooks/use-chat-labels.d.ts +7 -0
- package/dist/chat/headless/hooks/use-chat-labels.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-chat-labels.js +18 -0
- package/dist/chat/headless/hooks/use-chat-messages.cjs +110 -0
- package/dist/chat/headless/hooks/use-chat-messages.d.ts +6 -0
- package/dist/chat/headless/hooks/use-chat-messages.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-chat-messages.js +66 -0
- package/dist/chat/headless/hooks/use-chat-scroll-adapter.cjs +112 -0
- package/dist/chat/headless/hooks/use-chat-scroll-adapter.d.ts +13 -0
- package/dist/chat/headless/hooks/use-chat-scroll-adapter.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-chat-scroll-adapter.js +68 -0
- package/dist/chat/headless/hooks/use-citations.cjs +99 -0
- package/dist/chat/headless/hooks/use-citations.d.ts +7 -0
- package/dist/chat/headless/hooks/use-citations.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-citations.js +52 -0
- package/dist/chat/headless/hooks/use-composer-send.cjs +79 -0
- package/dist/chat/headless/hooks/use-composer-send.d.ts +8 -0
- package/dist/chat/headless/hooks/use-composer-send.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-composer-send.js +35 -0
- package/dist/chat/headless/hooks/use-history-item.cjs +152 -0
- package/dist/chat/headless/hooks/use-history-item.d.ts +14 -0
- package/dist/chat/headless/hooks/use-history-item.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-history-item.js +108 -0
- package/dist/chat/headless/hooks/use-injected-message-renderer.cjs +61 -0
- package/dist/chat/headless/hooks/use-injected-message-renderer.d.ts +4 -0
- package/dist/chat/headless/hooks/use-injected-message-renderer.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-injected-message-renderer.js +17 -0
- package/dist/chat/headless/hooks/use-loading-messages.cjs +68 -0
- package/dist/chat/headless/hooks/use-loading-messages.d.ts +7 -0
- package/dist/chat/headless/hooks/use-loading-messages.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-loading-messages.js +18 -0
- package/dist/chat/headless/hooks/use-message-actions.cjs +175 -0
- package/dist/chat/headless/hooks/use-message-actions.d.ts +11 -0
- package/dist/chat/headless/hooks/use-message-actions.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-message-actions.js +116 -0
- package/dist/chat/headless/hooks/use-message-inset.cjs +67 -0
- package/dist/chat/headless/hooks/use-message-inset.d.ts +2 -0
- package/dist/chat/headless/hooks/use-message-inset.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-message-inset.js +23 -0
- package/dist/chat/headless/hooks/use-settings-renderer.cjs +65 -0
- package/dist/chat/headless/hooks/use-settings-renderer.d.ts +2 -0
- package/dist/chat/headless/hooks/use-settings-renderer.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-settings-renderer.js +21 -0
- package/dist/chat/headless/hooks/use-settled-replies.cjs +88 -0
- package/dist/chat/headless/hooks/use-settled-replies.d.ts +3 -0
- package/dist/chat/headless/hooks/use-settled-replies.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-settled-replies.js +44 -0
- package/dist/chat/headless/hooks/use-streamed-message-content.cjs +158 -0
- package/dist/chat/headless/hooks/use-streamed-message-content.d.ts +6 -0
- package/dist/chat/headless/hooks/use-streamed-message-content.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-streamed-message-content.js +114 -0
- package/dist/chat/headless/hooks/use-suggestions.cjs +72 -0
- package/dist/chat/headless/hooks/use-suggestions.d.ts +8 -0
- package/dist/chat/headless/hooks/use-suggestions.d.ts.map +1 -0
- package/dist/chat/headless/hooks/use-suggestions.js +25 -0
- package/dist/chat/headless/layout/chat-layout.cjs +48 -0
- package/dist/chat/headless/layout/chat-layout.d.ts +18 -0
- package/dist/chat/headless/layout/chat-layout.d.ts.map +1 -0
- package/dist/chat/headless/layout/chat-layout.js +14 -0
- package/dist/chat/headless/markdown/citation-highlight.cjs +85 -0
- package/dist/chat/headless/markdown/citation-highlight.d.ts +2 -0
- package/dist/chat/headless/markdown/citation-highlight.d.ts.map +1 -0
- package/dist/chat/headless/markdown/citation-highlight.js +51 -0
- package/dist/chat/headless/markdown/citations.cjs +69 -0
- package/dist/chat/headless/markdown/citations.d.ts +13 -0
- package/dist/chat/headless/markdown/citations.d.ts.map +1 -0
- package/dist/chat/headless/markdown/citations.js +29 -0
- package/dist/chat/headless/markdown/html-preview.cjs +41 -0
- package/dist/chat/headless/markdown/html-preview.d.ts +4 -0
- package/dist/chat/headless/markdown/html-preview.d.ts.map +1 -0
- package/dist/chat/headless/markdown/html-preview.js +7 -0
- package/dist/chat/headless/markdown/incomplete-tokens.cjs +58 -0
- package/dist/chat/headless/markdown/incomplete-tokens.d.ts +6 -0
- package/dist/chat/headless/markdown/incomplete-tokens.d.ts.map +1 -0
- package/dist/chat/headless/markdown/incomplete-tokens.js +21 -0
- package/dist/chat/headless/messages/message-groups.cjs +59 -0
- package/dist/chat/headless/messages/message-groups.d.ts +25 -0
- package/dist/chat/headless/messages/message-groups.d.ts.map +1 -0
- package/dist/chat/headless/messages/message-groups.js +19 -0
- package/dist/chat/headless/providers/attachments-provider.cjs +4 -4
- package/dist/chat/headless/providers/attachments-provider.d.ts.map +1 -1
- package/dist/chat/headless/providers/attachments-provider.js +4 -4
- package/dist/chat/headless/providers/chat-scroll-provider.cjs +37 -29
- package/dist/chat/headless/providers/chat-scroll-provider.d.ts.map +1 -1
- package/dist/chat/headless/providers/chat-scroll-provider.js +37 -29
- package/dist/chat/headless/providers/chat-state-provider.cjs +41 -4
- package/dist/chat/headless/providers/chat-state-provider.d.ts +11 -1
- package/dist/chat/headless/providers/chat-state-provider.d.ts.map +1 -1
- package/dist/chat/headless/providers/chat-state-provider.js +39 -5
- package/dist/chat/headless/providers/loading-provider.cjs +41 -3
- package/dist/chat/headless/providers/loading-provider.d.ts +5 -0
- package/dist/chat/headless/providers/loading-provider.d.ts.map +1 -1
- package/dist/chat/headless/providers/loading-provider.js +35 -3
- package/dist/chat/headless/providers/picker-provider.cjs +2 -1
- package/dist/chat/headless/providers/picker-provider.d.ts.map +1 -1
- package/dist/chat/headless/providers/picker-provider.js +2 -1
- package/dist/chat/headless/providers/theme-provider.cjs +1 -1
- package/dist/chat/headless/providers/theme-provider.js +1 -1
- package/dist/chat/headless/renderer-registry.cjs +10 -2
- package/dist/chat/headless/renderer-registry.d.ts +5 -0
- package/dist/chat/headless/renderer-registry.d.ts.map +1 -1
- package/dist/chat/headless/renderer-registry.js +6 -1
- package/dist/{material/components/ap-tool-call/utils/traceIconUtils.cjs → chat/headless/tool-call/span-icon.cjs} +5 -13
- package/dist/chat/headless/tool-call/span-icon.d.ts +3 -0
- package/dist/chat/headless/tool-call/span-icon.d.ts.map +1 -0
- package/dist/{material/components/ap-tool-call/utils/traceIconUtils.js → chat/headless/tool-call/span-icon.js} +4 -12
- package/dist/{material/components/ap-tool-call/assets/spanIcons.d.ts → chat/headless/tool-call/span-icons.d.ts} +1 -1
- package/dist/chat/headless/tool-call/span-icons.d.ts.map +1 -0
- package/dist/chat/headless/tool-call/tool-call-model.cjs +133 -0
- package/dist/chat/headless/tool-call/tool-call-model.d.ts +44 -0
- package/dist/chat/headless/tool-call/tool-call-model.d.ts.map +1 -0
- package/dist/chat/headless/tool-call/tool-call-model.js +78 -0
- package/dist/chat/headless/tree/chat-tree.cjs +64 -0
- package/dist/chat/headless/tree/chat-tree.d.ts +26 -0
- package/dist/chat/headless/tree/chat-tree.d.ts.map +1 -0
- package/dist/chat/headless/tree/chat-tree.js +27 -0
- package/dist/chat/headless/utils/file-type.cjs +48 -0
- package/dist/chat/headless/utils/file-type.d.ts +3 -0
- package/dist/chat/headless/utils/file-type.d.ts.map +1 -0
- package/dist/chat/headless/utils/file-type.js +14 -0
- package/dist/chat/headless/utils/openable-url.cjs +46 -0
- package/dist/chat/headless/utils/openable-url.d.ts +2 -0
- package/dist/chat/headless/utils/openable-url.d.ts.map +1 -0
- package/dist/chat/headless/utils/openable-url.js +12 -0
- package/dist/chat/headless/utils/publish-chat-event.cjs +38 -0
- package/dist/chat/headless/utils/publish-chat-event.d.ts +3 -0
- package/dist/chat/headless/utils/publish-chat-event.d.ts.map +1 -0
- package/dist/chat/headless/utils/publish-chat-event.js +4 -0
- package/dist/chat/index.cjs +13 -19
- package/dist/chat/index.d.ts.map +1 -1
- package/dist/chat/index.js +1 -4
- package/dist/chat/locales/en.cjs +1 -1
- package/dist/chat/locales/en.d.ts.map +1 -1
- package/dist/chat/locales/en.js +1 -1
- package/dist/chat/root/ApChat.cjs +8 -0
- package/dist/chat/root/ApChat.d.ts.map +1 -1
- package/dist/chat/root/ApChat.js +8 -0
- package/dist/chat/root/ChatRoot.cjs +14 -2
- package/dist/chat/root/ChatRoot.d.ts +2 -1
- package/dist/chat/root/ChatRoot.d.ts.map +1 -1
- package/dist/chat/root/ChatRoot.js +14 -2
- package/dist/chat/service/ChatModel.d.ts +1 -1
- package/dist/chat/service/ChatModel.d.ts.map +1 -1
- package/dist/chat/service/ChatService.cjs +14 -3
- package/dist/chat/service/ChatService.d.ts +2 -0
- package/dist/chat/service/ChatService.d.ts.map +1 -1
- package/dist/chat/service/ChatService.js +14 -3
- package/dist/chat/stories/chat-playground.d.ts +39 -0
- package/dist/chat/stories/chat-playground.d.ts.map +1 -0
- package/dist/chat/stories/chat-story-confirm.d.ts +2 -0
- package/dist/chat/stories/chat-story-confirm.d.ts.map +1 -0
- package/dist/chat/stories/chat-story-fixtures.d.ts +334 -0
- package/dist/chat/stories/chat-story-fixtures.d.ts.map +1 -0
- package/dist/chat/stories/chat-story-frame.d.ts +11 -0
- package/dist/chat/stories/chat-story-frame.d.ts.map +1 -0
- package/dist/chat/stories/chat-story-scenarios.d.ts +133 -0
- package/dist/chat/stories/chat-story-scenarios.d.ts.map +1 -0
- package/dist/chat/stories/chat-story-settings.d.ts +2 -0
- package/dist/chat/stories/chat-story-settings.d.ts.map +1 -0
- package/dist/chat/styles/tailwind.chat.css +1 -1
- package/dist/chat/wind/WindChatRenderer.cjs +145 -0
- package/dist/chat/wind/WindChatRenderer.d.ts +3 -0
- package/dist/chat/wind/WindChatRenderer.d.ts.map +1 -0
- package/dist/chat/wind/WindChatRenderer.js +98 -0
- package/dist/chat/wind/common/dialog-container.cjs +51 -0
- package/dist/chat/wind/common/dialog-container.d.ts +4 -0
- package/dist/chat/wind/common/dialog-container.d.ts.map +1 -0
- package/dist/chat/wind/common/dialog-container.js +4 -0
- package/dist/chat/wind/common/lucide-icon.cjs +64 -0
- package/dist/chat/wind/common/lucide-icon.d.ts +5 -0
- package/dist/chat/wind/common/lucide-icon.d.ts.map +1 -0
- package/dist/chat/wind/common/lucide-icon.js +27 -0
- package/dist/chat/wind/common/panel-popover.cjs +138 -0
- package/dist/chat/wind/common/panel-popover.d.ts +16 -0
- package/dist/chat/wind/common/panel-popover.d.ts.map +1 -0
- package/dist/chat/wind/common/panel-popover.js +94 -0
- package/dist/chat/wind/common/service-icon-fallback.cjs +54 -0
- package/dist/chat/wind/common/service-icon-fallback.d.ts +5 -0
- package/dist/chat/wind/common/service-icon-fallback.d.ts.map +1 -0
- package/dist/chat/wind/common/service-icon-fallback.js +17 -0
- package/dist/chat/wind/common/service-icon.cjs +58 -0
- package/dist/chat/wind/common/service-icon.d.ts +4 -0
- package/dist/chat/wind/common/service-icon.d.ts.map +1 -0
- package/dist/chat/wind/common/service-icon.js +14 -0
- package/dist/chat/wind/composer/chat-composer.cjs +215 -0
- package/dist/chat/wind/composer/chat-composer.d.ts +2 -0
- package/dist/chat/wind/composer/chat-composer.d.ts.map +1 -0
- package/dist/chat/wind/composer/chat-composer.js +171 -0
- package/dist/chat/wind/composer/chat-dropzone.cjs +92 -0
- package/dist/chat/wind/composer/chat-dropzone.d.ts +6 -0
- package/dist/chat/wind/composer/chat-dropzone.d.ts.map +1 -0
- package/dist/chat/wind/composer/chat-dropzone.js +58 -0
- package/dist/chat/wind/composer/composer-strings.cjs +77 -0
- package/dist/chat/wind/composer/composer-strings.d.ts +3 -0
- package/dist/chat/wind/composer/composer-strings.d.ts.map +1 -0
- package/dist/chat/wind/composer/composer-strings.js +33 -0
- package/dist/chat/wind/first-run/first-run.cjs +94 -0
- package/dist/chat/wind/first-run/first-run.d.ts +10 -0
- package/dist/chat/wind/first-run/first-run.d.ts.map +1 -0
- package/dist/chat/wind/first-run/first-run.js +57 -0
- package/dist/chat/wind/first-run/suggestion-list.cjs +60 -0
- package/dist/chat/wind/first-run/suggestion-list.d.ts +7 -0
- package/dist/chat/wind/first-run/suggestion-list.d.ts.map +1 -0
- package/dist/chat/wind/first-run/suggestion-list.js +26 -0
- package/dist/chat/wind/header/chat-header.cjs +128 -0
- package/dist/chat/wind/header/chat-header.d.ts +6 -0
- package/dist/chat/wind/header/chat-header.d.ts.map +1 -0
- package/dist/chat/wind/header/chat-header.js +94 -0
- package/dist/chat/wind/header/custom-actions-menu.cjs +123 -0
- package/dist/chat/wind/header/custom-actions-menu.d.ts +6 -0
- package/dist/chat/wind/header/custom-actions-menu.d.ts.map +1 -0
- package/dist/chat/wind/header/custom-actions-menu.js +89 -0
- package/dist/chat/wind/header/header-action-button.cjs +74 -0
- package/dist/chat/wind/header/header-action-button.d.ts +7 -0
- package/dist/chat/wind/header/header-action-button.d.ts.map +1 -0
- package/dist/chat/wind/header/header-action-button.js +30 -0
- package/dist/chat/wind/history/chat-history.cjs +82 -0
- package/dist/chat/wind/history/chat-history.d.ts +6 -0
- package/dist/chat/wind/history/chat-history.d.ts.map +1 -0
- package/dist/chat/wind/history/chat-history.js +38 -0
- package/dist/chat/wind/history/history-item.cjs +147 -0
- package/dist/chat/wind/history/history-item.d.ts +5 -0
- package/dist/chat/wind/history/history-item.d.ts.map +1 -0
- package/dist/chat/wind/history/history-item.js +103 -0
- package/dist/chat/wind/history/history-panel.cjs +138 -0
- package/dist/chat/wind/history/history-panel.d.ts +7 -0
- package/dist/chat/wind/history/history-panel.d.ts.map +1 -0
- package/dist/chat/wind/history/history-panel.js +94 -0
- package/dist/chat/wind/hooks/use-open-transition.cjs +72 -0
- package/dist/chat/wind/hooks/use-open-transition.d.ts +6 -0
- package/dist/chat/wind/hooks/use-open-transition.d.ts.map +1 -0
- package/dist/chat/wind/hooks/use-open-transition.js +28 -0
- package/dist/chat/wind/hooks/use-prefers-reduced-motion.cjs +59 -0
- package/dist/chat/wind/hooks/use-prefers-reduced-motion.d.ts +2 -0
- package/dist/chat/wind/hooks/use-prefers-reduced-motion.d.ts.map +1 -0
- package/dist/chat/wind/hooks/use-prefers-reduced-motion.js +15 -0
- package/dist/chat/wind/layout/embedded-layout.cjs +109 -0
- package/dist/chat/wind/layout/embedded-layout.d.ts +5 -0
- package/dist/chat/wind/layout/embedded-layout.d.ts.map +1 -0
- package/dist/chat/wind/layout/embedded-layout.js +65 -0
- package/dist/chat/wind/layout/full-screen-layout.cjs +112 -0
- package/dist/chat/wind/layout/full-screen-layout.d.ts +5 -0
- package/dist/chat/wind/layout/full-screen-layout.d.ts.map +1 -0
- package/dist/chat/wind/layout/full-screen-layout.js +68 -0
- package/dist/chat/wind/layout/placeholder-region.cjs +46 -0
- package/dist/chat/wind/layout/placeholder-region.d.ts +8 -0
- package/dist/chat/wind/layout/placeholder-region.d.ts.map +1 -0
- package/dist/chat/wind/layout/placeholder-region.js +12 -0
- package/dist/chat/wind/{WindChatPlaceholder.cjs → layout/regions.cjs} +8 -6
- package/dist/chat/wind/layout/regions.d.ts +2 -0
- package/dist/chat/wind/layout/regions.d.ts.map +1 -0
- package/dist/chat/wind/layout/regions.js +10 -0
- package/dist/chat/wind/layout/side-by-side-placeholder.cjs +48 -0
- package/dist/chat/wind/layout/side-by-side-placeholder.d.ts +2 -0
- package/dist/chat/wind/layout/side-by-side-placeholder.d.ts.map +1 -0
- package/dist/chat/wind/layout/side-by-side-placeholder.js +14 -0
- package/dist/chat/wind/messages/chat-message.cjs +111 -0
- package/dist/chat/wind/messages/chat-message.d.ts +13 -0
- package/dist/chat/wind/messages/chat-message.d.ts.map +1 -0
- package/dist/chat/wind/messages/chat-message.js +67 -0
- package/dist/chat/wind/messages/injected-message.cjs +57 -0
- package/dist/chat/wind/messages/injected-message.d.ts +5 -0
- package/dist/chat/wind/messages/injected-message.d.ts.map +1 -0
- package/dist/chat/wind/messages/injected-message.js +13 -0
- package/dist/chat/wind/messages/message-action-bar.cjs +110 -0
- package/dist/chat/wind/messages/message-action-bar.d.ts +7 -0
- package/dist/chat/wind/messages/message-action-bar.d.ts.map +1 -0
- package/dist/chat/wind/messages/message-action-bar.js +76 -0
- package/dist/chat/wind/messages/message-attachments.cjs +94 -0
- package/dist/chat/wind/messages/message-attachments.d.ts +13 -0
- package/dist/chat/wind/messages/message-attachments.d.ts.map +1 -0
- package/dist/chat/wind/messages/message-attachments.js +48 -0
- package/dist/chat/wind/messages/message-list.cjs +246 -0
- package/dist/chat/wind/messages/message-list.d.ts +5 -0
- package/dist/chat/wind/messages/message-list.d.ts.map +1 -0
- package/dist/chat/wind/messages/message-list.js +202 -0
- package/dist/chat/wind/messages/message-sources.cjs +77 -0
- package/dist/chat/wind/messages/message-sources.d.ts +5 -0
- package/dist/chat/wind/messages/message-sources.d.ts.map +1 -0
- package/dist/chat/wind/messages/message-sources.js +43 -0
- package/dist/chat/wind/messages/thinking-row.cjs +48 -0
- package/dist/chat/wind/messages/thinking-row.d.ts +2 -0
- package/dist/chat/wind/messages/thinking-row.d.ts.map +1 -0
- package/dist/chat/wind/messages/thinking-row.js +14 -0
- package/dist/chat/wind/renderers/citation-highlights.cjs +77 -0
- package/dist/chat/wind/renderers/citation-highlights.d.ts +8 -0
- package/dist/chat/wind/renderers/citation-highlights.d.ts.map +1 -0
- package/dist/chat/wind/renderers/citation-highlights.js +30 -0
- package/dist/chat/wind/renderers/code-block-actions.cjs +176 -0
- package/dist/chat/wind/renderers/code-block-actions.d.ts +9 -0
- package/dist/chat/wind/renderers/code-block-actions.d.ts.map +1 -0
- package/dist/chat/wind/renderers/code-block-actions.js +132 -0
- package/dist/chat/wind/renderers/disclosure-tree.cjs +136 -0
- package/dist/chat/wind/renderers/disclosure-tree.d.ts +22 -0
- package/dist/chat/wind/renderers/disclosure-tree.d.ts.map +1 -0
- package/dist/chat/wind/renderers/disclosure-tree.js +92 -0
- package/dist/chat/wind/renderers/index.cjs +53 -0
- package/dist/chat/wind/renderers/index.d.ts +3 -0
- package/dist/chat/wind/renderers/index.d.ts.map +1 -0
- package/dist/chat/wind/renderers/index.js +19 -0
- package/dist/chat/wind/renderers/markdown-citation.cjs +102 -0
- package/dist/chat/wind/renderers/markdown-citation.d.ts +3 -0
- package/dist/chat/wind/renderers/markdown-citation.d.ts.map +1 -0
- package/dist/chat/wind/renderers/markdown-citation.js +58 -0
- package/dist/chat/wind/renderers/markdown-renderer.cjs +127 -0
- package/dist/chat/wind/renderers/markdown-renderer.d.ts +10 -0
- package/dist/chat/wind/renderers/markdown-renderer.d.ts.map +1 -0
- package/dist/chat/wind/renderers/markdown-renderer.js +80 -0
- package/dist/chat/wind/renderers/markdown-resource-chip.cjs +53 -0
- package/dist/chat/wind/renderers/markdown-resource-chip.d.ts +3 -0
- package/dist/chat/wind/renderers/markdown-resource-chip.d.ts.map +1 -0
- package/dist/chat/wind/renderers/markdown-resource-chip.js +19 -0
- package/dist/chat/wind/renderers/tool-call-renderer.cjs +232 -0
- package/dist/chat/wind/renderers/tool-call-renderer.d.ts +8 -0
- package/dist/chat/wind/renderers/tool-call-renderer.d.ts.map +1 -0
- package/dist/chat/wind/renderers/tool-call-renderer.js +188 -0
- package/dist/chat/wind/renderers/tool-call-strings.cjs +161 -0
- package/dist/chat/wind/renderers/tool-call-strings.d.ts +12 -0
- package/dist/chat/wind/renderers/tool-call-strings.d.ts.map +1 -0
- package/dist/chat/wind/renderers/tool-call-strings.js +117 -0
- package/dist/chat/wind/renderers/tree-renderer.cjs +103 -0
- package/dist/chat/wind/renderers/tree-renderer.d.ts +8 -0
- package/dist/chat/wind/renderers/tree-renderer.d.ts.map +1 -0
- package/dist/chat/wind/renderers/tree-renderer.js +59 -0
- package/dist/chat/wind/settings/chat-settings.cjs +155 -0
- package/dist/chat/wind/settings/chat-settings.d.ts +11 -0
- package/dist/chat/wind/settings/chat-settings.d.ts.map +1 -0
- package/dist/chat/wind/settings/chat-settings.js +108 -0
- package/dist/core/tokens/css/theme-variables.css +1 -1
- package/dist/core/tokens/css/variables.css +1 -1
- package/dist/core/tokens/less/_variables.less +1 -1
- package/dist/core/tokens/scss/_css-variables.scss +1 -1
- package/dist/core/tokens/scss/_variables.scss +1 -1
- package/dist/material/components/ap-chat/MaterialChatRenderer.cjs +22 -11
- package/dist/material/components/ap-chat/MaterialChatRenderer.d.ts +8 -0
- package/dist/material/components/ap-chat/MaterialChatRenderer.d.ts.map +1 -1
- package/dist/material/components/ap-chat/MaterialChatRenderer.js +21 -13
- package/dist/material/components/ap-chat/ap-chat-material.cjs +70 -0
- package/dist/material/components/ap-chat/ap-chat-material.d.ts +13 -0
- package/dist/material/components/ap-chat/ap-chat-material.d.ts.map +1 -0
- package/dist/material/components/ap-chat/ap-chat-material.js +26 -0
- package/dist/material/components/ap-chat/ap-chat.cjs +5 -32
- package/dist/material/components/ap-chat/ap-chat.d.ts +1 -11
- package/dist/material/components/ap-chat/ap-chat.d.ts.map +1 -1
- package/dist/material/components/ap-chat/ap-chat.js +5 -22
- package/dist/material/components/ap-chat/components/dropzone/dropzone.cjs +23 -82
- package/dist/material/components/ap-chat/components/dropzone/dropzone.d.ts +2 -0
- package/dist/material/components/ap-chat/components/dropzone/dropzone.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/dropzone/dropzone.js +20 -82
- package/dist/material/components/ap-chat/components/header/header-actions.cjs +23 -91
- package/dist/material/components/ap-chat/components/header/header-actions.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/header/header-actions.js +23 -91
- package/dist/material/components/ap-chat/components/header/header.cjs +6 -7
- package/dist/material/components/ap-chat/components/header/header.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/header/header.js +6 -6
- package/dist/material/components/ap-chat/components/history/chat-history-group.d.ts +2 -2
- package/dist/material/components/ap-chat/components/history/chat-history-group.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/history/chat-history-item.cjs +15 -104
- package/dist/material/components/ap-chat/components/history/chat-history-item.d.ts +1 -1
- package/dist/material/components/ap-chat/components/history/chat-history-item.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/history/chat-history-item.js +13 -102
- package/dist/material/components/ap-chat/components/history/chat-history.cjs +5 -170
- package/dist/material/components/ap-chat/components/history/chat-history.d.ts +0 -5
- package/dist/material/components/ap-chat/components/history/chat-history.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/history/chat-history.js +7 -171
- package/dist/material/components/ap-chat/components/input/chat-input-actions.cjs +15 -98
- package/dist/material/components/ap-chat/components/input/chat-input-actions.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/chat-input-actions.js +15 -98
- package/dist/material/components/ap-chat/components/input/chat-input-footer.cjs +3 -7
- package/dist/material/components/ap-chat/components/input/chat-input-footer.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/chat-input-footer.js +3 -7
- package/dist/material/components/ap-chat/components/input/chat-input.cjs +11 -23
- package/dist/material/components/ap-chat/components/input/chat-input.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/chat-input.js +11 -23
- package/dist/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.cjs +6 -3
- package/dist/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.js +6 -3
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.cjs +1 -1
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.js +1 -1
- package/dist/material/components/ap-chat/components/message/actions/chat-actions-list.cjs +2 -23
- package/dist/material/components/ap-chat/components/message/actions/chat-actions-list.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/actions/chat-actions-list.js +2 -23
- package/dist/material/components/ap-chat/components/message/actions/chat-actions.cjs +3 -84
- package/dist/material/components/ap-chat/components/message/actions/chat-actions.d.ts +1 -1
- package/dist/material/components/ap-chat/components/message/actions/chat-actions.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/actions/chat-actions.js +4 -85
- package/dist/material/components/ap-chat/components/message/chat-message-content.cjs +4 -39
- package/dist/material/components/ap-chat/components/message/chat-message-content.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/chat-message-content.js +5 -40
- package/dist/material/components/ap-chat/components/message/chat-message.cjs +7 -90
- package/dist/material/components/ap-chat/components/message/chat-message.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/chat-message.js +9 -92
- package/dist/material/components/ap-chat/components/message/chat-scroll-container.cjs +4 -2
- package/dist/material/components/ap-chat/components/message/chat-scroll-container.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/chat-scroll-container.js +4 -2
- package/dist/material/components/ap-chat/components/message/first-run-experience/chat-fre.cjs +2 -2
- package/dist/material/components/ap-chat/components/message/first-run-experience/chat-fre.js +2 -2
- package/dist/material/components/ap-chat/components/message/loader/chat-loading-text.cjs +25 -46
- package/dist/material/components/ap-chat/components/message/loader/chat-loading-text.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/loader/chat-loading-text.js +24 -45
- package/dist/material/components/ap-chat/components/message/markdown/citation.cjs +26 -84
- package/dist/material/components/ap-chat/components/message/markdown/citation.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/markdown/citation.js +24 -82
- package/dist/material/components/ap-chat/components/message/markdown/code.cjs +2 -1
- package/dist/material/components/ap-chat/components/message/markdown/code.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/markdown/code.js +2 -1
- package/dist/material/components/ap-chat/components/message/markdown/markdown.cjs +2 -117
- package/dist/material/components/ap-chat/components/message/markdown/markdown.d.ts +1 -1
- package/dist/material/components/ap-chat/components/message/markdown/markdown.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/markdown/markdown.js +3 -118
- package/dist/material/components/ap-chat/components/message/sources/chat-sources.cjs +8 -55
- package/dist/material/components/ap-chat/components/message/sources/chat-sources.d.ts +2 -3
- package/dist/material/components/ap-chat/components/message/sources/chat-sources.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/sources/chat-sources.js +5 -52
- package/dist/material/components/ap-chat/components/message/suggestions/chat-suggestions.cjs +7 -14
- package/dist/material/components/ap-chat/components/message/suggestions/chat-suggestions.d.ts +1 -1
- package/dist/material/components/ap-chat/components/message/suggestions/chat-suggestions.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/suggestions/chat-suggestions.js +4 -11
- package/dist/material/components/ap-chat/components/message/tree/tree-renderer.cjs +6 -34
- package/dist/material/components/ap-chat/components/message/tree/tree-renderer.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/tree/tree-renderer.js +6 -34
- package/dist/material/components/ap-chat/components/settings/chat-settings-header.cjs +1 -1
- package/dist/material/components/ap-chat/components/settings/chat-settings-header.js +1 -1
- package/dist/material/components/ap-chat/components/settings/chat-settings.cjs +6 -20
- package/dist/material/components/ap-chat/components/settings/chat-settings.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/settings/chat-settings.js +7 -21
- package/dist/material/components/ap-chat/utils/file-to-icon.cjs +11 -28
- package/dist/material/components/ap-chat/utils/file-to-icon.d.ts.map +1 -1
- package/dist/material/components/ap-chat/utils/file-to-icon.js +11 -28
- package/dist/material/components/ap-tool-call/ApToolCall.cjs +40 -96
- package/dist/material/components/ap-tool-call/ApToolCall.d.ts.map +1 -1
- package/dist/material/components/ap-tool-call/ApToolCall.js +39 -95
- package/dist/material/components/ap-tool-call/components/ToolCallSection.cjs +3 -2
- package/dist/material/components/ap-tool-call/components/ToolCallSection.d.ts.map +1 -1
- package/dist/material/components/ap-tool-call/components/ToolCallSection.js +3 -2
- package/dist/material/stories/chat-story-support.d.ts +1 -2
- package/dist/material/stories/chat-story-support.d.ts.map +1 -1
- package/package.json +8 -4
- package/dist/chat/wind/WindChatPlaceholder.d.ts +0 -2
- package/dist/chat/wind/WindChatPlaceholder.d.ts.map +0 -1
- package/dist/chat/wind/WindChatPlaceholder.js +0 -8
- package/dist/material/components/ap-chat/assets/autopilot-logo.cjs +0 -61
- package/dist/material/components/ap-chat/assets/autopilot-logo.js +0 -27
- package/dist/material/components/ap-tool-call/assets/spanIcons.d.ts.map +0 -1
- package/dist/material/components/ap-tool-call/utils/traceIconUtils.d.ts +0 -3
- package/dist/material/components/ap-tool-call/utils/traceIconUtils.d.ts.map +0 -1
- package/dist/material/stories/chat-story-support.cjs +0 -2563
- package/dist/material/stories/chat-story-support.js +0 -2507
- package/dist/material/stories/storybook-helpers.cjs +0 -166
- package/dist/material/stories/storybook-helpers.js +0 -109
- /package/dist/{material/components/ap-tool-call/assets/spanIcons.cjs → chat/headless/tool-call/span-icons.cjs} +0 -0
- /package/dist/{material/components/ap-tool-call/assets/spanIcons.js → chat/headless/tool-call/span-icons.js} +0 -0
|
@@ -3,17 +3,16 @@ import { useLingui } from "@lingui/react";
|
|
|
3
3
|
import Search from "@mui/icons-material/Search";
|
|
4
4
|
import { CircularProgress, Popover, styled } from "@mui/material";
|
|
5
5
|
import apollo_core from "@uipath/apollo-core";
|
|
6
|
+
import { useChatHistory } from "../../../../../chat/headless/hooks/use-chat-history.js";
|
|
6
7
|
import { useScheduledCallback } from "../../../../../chat/headless/hooks/use-scheduled-callback.js";
|
|
7
8
|
import { useChatService } from "../../../../../chat/headless/providers/chat-service.provider.js";
|
|
8
9
|
import { useChatState } from "../../../../../chat/headless/providers/chat-state-provider.js";
|
|
9
10
|
import { useChatWidth } from "../../../../../chat/headless/providers/chat-width-provider.js";
|
|
10
|
-
import {
|
|
11
|
+
import { CHAT_HISTORY_FULL_SCREEN_WIDTH, CHAT_HISTORY_SIDE_BY_SIDE_MAX_HEIGHT, CHAT_HISTORY_SIDE_BY_SIDE_MAX_WIDTH } from "../../../../../chat/service/index.js";
|
|
11
12
|
import { ApSkeleton } from "../../../ap-skeleton/index.js";
|
|
12
13
|
import { ApTextField } from "../../../ap-text-field/index.js";
|
|
13
14
|
import { ApTypography } from "../../../ap-typography/index.js";
|
|
14
|
-
import {
|
|
15
|
-
import debounce from "debounce";
|
|
16
|
-
import react, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
15
|
+
import react, { useCallback, useRef, useState } from "react";
|
|
17
16
|
import react_focus_lock from "react-focus-lock";
|
|
18
17
|
import { AutopilotChatHistoryGroup } from "./chat-history-group.js";
|
|
19
18
|
const ChatHistoryContainer = styled('div')(({ isFullScreen, width, fullScreenContainer })=>({
|
|
@@ -65,23 +64,11 @@ const HistorySkeletonLoader = ()=>/*#__PURE__*/ jsx(HistorySkeletonContainer, {
|
|
|
65
64
|
})
|
|
66
65
|
}, index))
|
|
67
66
|
});
|
|
68
|
-
const DEBOUNCE_DELAY_IN_MS = 400;
|
|
69
|
-
const LOAD_MORE_THRESHOLD_IN_PX = 50;
|
|
70
67
|
const AutopilotChatHistoryComponent = ({ open, isFullScreen })=>{
|
|
71
68
|
const { _ } = useLingui();
|
|
72
69
|
const chatService = useChatService();
|
|
73
|
-
const internalService = chatService?.__internalService__;
|
|
74
|
-
const [history, setHistory] = useState(chatService?.getHistory() ?? []);
|
|
75
|
-
const [searchQuery, setSearchQuery] = useState('');
|
|
76
|
-
const [isLoadingMore, setIsLoadingMore] = useState(false);
|
|
77
|
-
const [isSearching, setIsSearching] = useState(false);
|
|
78
70
|
const [scrollContainer, setScrollContainer] = useState(null);
|
|
79
71
|
const popperContainerRef = useRef(null);
|
|
80
|
-
const isLoadingMoreRef = useRef(false);
|
|
81
|
-
const shouldShowLoadingMoreRef = useRef(true);
|
|
82
|
-
const appendingRef = useRef(false);
|
|
83
|
-
const scrollTopBeforeAppendRef = useRef(0);
|
|
84
|
-
const searchQueryRef = useRef('');
|
|
85
72
|
const { historyOpen, historyAnchorElement, fullScreenContainer, spacing, portalContainer } = useChatState();
|
|
86
73
|
const popoverActionRef = useRef(null);
|
|
87
74
|
const updatePosition = useCallback(()=>{
|
|
@@ -99,161 +86,10 @@ const AutopilotChatHistoryComponent = ({ open, isFullScreen })=>{
|
|
|
99
86
|
schedulePositionUpdate
|
|
100
87
|
]);
|
|
101
88
|
const { width } = useChatWidth();
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
const { scrollTop, scrollHeight, clientHeight } = scrollContainer;
|
|
105
|
-
const scrollBottom = scrollHeight - scrollTop - clientHeight;
|
|
106
|
-
if (scrollBottom < LOAD_MORE_THRESHOLD_IN_PX && !isLoadingMoreRef.current && shouldShowLoadingMoreRef.current && chatService.getConfig()?.paginatedHistory) {
|
|
107
|
-
chatService._eventBus.publish(AutopilotChatEvent.HistoryLoadMore, {
|
|
108
|
-
searchText: searchQueryRef.current
|
|
109
|
-
});
|
|
110
|
-
internalService.publish(AutopilotChatInternalEvent.SetIsLoadingMoreHistory, true);
|
|
111
|
-
}
|
|
112
|
-
}, [
|
|
113
|
-
scrollContainer,
|
|
114
|
-
chatService,
|
|
115
|
-
internalService
|
|
116
|
-
]);
|
|
117
|
-
const debouncedSearch = useMemo(()=>debounce((newSearchQuery)=>{
|
|
118
|
-
if (chatService?.getConfig()?.paginatedHistory) {
|
|
119
|
-
chatService._eventBus.publish(AutopilotChatEvent.HistorySearch, {
|
|
120
|
-
searchText: newSearchQuery
|
|
121
|
-
});
|
|
122
|
-
internalService.publish(AutopilotChatInternalEvent.SetIsLoadingMoreHistory, false);
|
|
123
|
-
}
|
|
124
|
-
}, DEBOUNCE_DELAY_IN_MS), [
|
|
125
|
-
chatService,
|
|
126
|
-
internalService
|
|
127
|
-
]);
|
|
128
|
-
useEffect(()=>{
|
|
129
|
-
if (!chatService || !internalService) return;
|
|
130
|
-
const unsubscribeSetHistory = chatService.on(AutopilotChatEvent.SetHistory, (newHistory)=>{
|
|
131
|
-
setHistory(newHistory);
|
|
132
|
-
setIsSearching(false);
|
|
133
|
-
});
|
|
134
|
-
const unsubscribeSetIsLoadingMore = internalService.on(AutopilotChatInternalEvent.SetIsLoadingMoreHistory, (value)=>{
|
|
135
|
-
isLoadingMoreRef.current = value;
|
|
136
|
-
setIsLoadingMore(value);
|
|
137
|
-
});
|
|
138
|
-
const unsubscribeShouldShowLoading = internalService.on(AutopilotChatInternalEvent.ShouldShowLoadingMoreHistory, (value)=>{
|
|
139
|
-
shouldShowLoadingMoreRef.current = value;
|
|
140
|
-
});
|
|
141
|
-
const unsubscribeAppendOlderHistory = internalService.on(AutopilotChatInternalEvent.AppendOlderHistory, ()=>{
|
|
142
|
-
if (scrollContainer) {
|
|
143
|
-
appendingRef.current = true;
|
|
144
|
-
scrollTopBeforeAppendRef.current = scrollContainer.scrollTop;
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
return ()=>{
|
|
148
|
-
unsubscribeSetHistory();
|
|
149
|
-
unsubscribeSetIsLoadingMore();
|
|
150
|
-
unsubscribeShouldShowLoading();
|
|
151
|
-
unsubscribeAppendOlderHistory();
|
|
152
|
-
};
|
|
153
|
-
}, [
|
|
154
|
-
chatService,
|
|
155
|
-
internalService,
|
|
89
|
+
const { groups: groupedHistory, searchQuery, setSearchQuery: handleSearchTextChange, hasHistoryData, noSearchResults: hasNoSearchResults, showSearchSkeleton: showSkeletonLoader, showLoadingMore: showLoadMoreSpinner } = useChatHistory({
|
|
90
|
+
open: historyOpen,
|
|
156
91
|
scrollContainer
|
|
157
|
-
|
|
158
|
-
useEffect(()=>{
|
|
159
|
-
if (!scrollContainer || !historyOpen || !chatService) return;
|
|
160
|
-
scrollContainer.addEventListener('scroll', handleScroll, {
|
|
161
|
-
passive: true
|
|
162
|
-
});
|
|
163
|
-
return ()=>{
|
|
164
|
-
scrollContainer.removeEventListener('scroll', handleScroll);
|
|
165
|
-
};
|
|
166
|
-
}, [
|
|
167
|
-
scrollContainer,
|
|
168
|
-
handleScroll,
|
|
169
|
-
historyOpen,
|
|
170
|
-
chatService
|
|
171
|
-
]);
|
|
172
|
-
useEffect(()=>{
|
|
173
|
-
if (appendingRef.current && scrollContainer) {
|
|
174
|
-
scrollContainer.scrollTop = scrollTopBeforeAppendRef.current;
|
|
175
|
-
appendingRef.current = false;
|
|
176
|
-
}
|
|
177
|
-
}, [
|
|
178
|
-
history,
|
|
179
|
-
scrollContainer
|
|
180
|
-
]);
|
|
181
|
-
useEffect(()=>{
|
|
182
|
-
searchQueryRef.current = searchQuery;
|
|
183
|
-
}, [
|
|
184
|
-
searchQuery
|
|
185
|
-
]);
|
|
186
|
-
const groupedHistory = useMemo(()=>{
|
|
187
|
-
const filteredHistory = chatService?.getConfig()?.paginatedHistory ? history : history.filter((item)=>item.name.toLowerCase().includes(searchQuery.toLowerCase()));
|
|
188
|
-
const grouped = filteredHistory.reduce((acc, item)=>{
|
|
189
|
-
const date = new Date(item.timestamp);
|
|
190
|
-
const currentDate = new Date();
|
|
191
|
-
const daysAgo = differenceInDays(currentDate, date);
|
|
192
|
-
let groupTitle = '';
|
|
193
|
-
if (isToday(date)) groupTitle = _({
|
|
194
|
-
id: 'autopilot-chat.history.group.today'
|
|
195
|
-
});
|
|
196
|
-
else if (isYesterday(date)) groupTitle = _({
|
|
197
|
-
id: 'autopilot-chat.history.group.yesterday'
|
|
198
|
-
});
|
|
199
|
-
else if (daysAgo <= 7) groupTitle = _({
|
|
200
|
-
id: 'autopilot-chat.history.group.last-week'
|
|
201
|
-
});
|
|
202
|
-
else if (daysAgo <= 30) groupTitle = _({
|
|
203
|
-
id: 'autopilot-chat.history.group.last-30-days'
|
|
204
|
-
});
|
|
205
|
-
else {
|
|
206
|
-
const monthsAgo = differenceInMonths(currentDate, date);
|
|
207
|
-
const count = monthsAgo;
|
|
208
|
-
groupTitle = _({
|
|
209
|
-
id: 'autopilot-chat.history.group.months-ago',
|
|
210
|
-
values: {
|
|
211
|
-
count: count
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
const existingGroup = acc.find((group)=>group.title === groupTitle);
|
|
216
|
-
if (existingGroup) existingGroup.items.push(item);
|
|
217
|
-
else acc.push({
|
|
218
|
-
title: groupTitle,
|
|
219
|
-
items: [
|
|
220
|
-
item
|
|
221
|
-
]
|
|
222
|
-
});
|
|
223
|
-
return acc;
|
|
224
|
-
}, []);
|
|
225
|
-
grouped.sort((a, b)=>{
|
|
226
|
-
const getDate = (group)=>{
|
|
227
|
-
if (0 === group.items.length) return new Date();
|
|
228
|
-
return new Date(group.items[0].timestamp);
|
|
229
|
-
};
|
|
230
|
-
return getDate(b).getTime() - getDate(a).getTime();
|
|
231
|
-
});
|
|
232
|
-
grouped.forEach((group)=>{
|
|
233
|
-
group.items.sort((a, b)=>new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime());
|
|
234
|
-
});
|
|
235
|
-
return grouped;
|
|
236
|
-
}, [
|
|
237
|
-
history,
|
|
238
|
-
searchQuery,
|
|
239
|
-
chatService,
|
|
240
|
-
_
|
|
241
|
-
]);
|
|
242
|
-
const handleSearchTextChange = useCallback((searchText)=>{
|
|
243
|
-
const newSearchText = searchText || '';
|
|
244
|
-
setSearchQuery(newSearchText);
|
|
245
|
-
if (chatService?.getConfig()?.paginatedHistory) {
|
|
246
|
-
setIsSearching(true);
|
|
247
|
-
debouncedSearch(newSearchText);
|
|
248
|
-
}
|
|
249
|
-
}, [
|
|
250
|
-
chatService,
|
|
251
|
-
debouncedSearch
|
|
252
|
-
]);
|
|
253
|
-
const hasHistoryData = history.length > 0 || searchQuery || isSearching;
|
|
254
|
-
const hasNoSearchResults = 0 === groupedHistory.length && searchQuery;
|
|
255
|
-
const showSkeletonLoader = isSearching && chatService?.getConfig()?.paginatedHistory;
|
|
256
|
-
const showLoadMoreSpinner = isLoadingMore && chatService?.getConfig()?.paginatedHistory;
|
|
92
|
+
});
|
|
257
93
|
const renderEmptyState = (message)=>/*#__PURE__*/ jsx(EmptyStateContainer, {
|
|
258
94
|
children: /*#__PURE__*/ jsx(ApTypography, {
|
|
259
95
|
color: 'var(--color-foreground)',
|
|
@@ -266,7 +102,7 @@ const AutopilotChatHistoryComponent = ({ open, isFullScreen })=>{
|
|
|
266
102
|
groupedHistory.map((group)=>/*#__PURE__*/ jsx(AutopilotChatHistoryGroup, {
|
|
267
103
|
group: group,
|
|
268
104
|
isHistoryOpen: historyOpen
|
|
269
|
-
}, group.
|
|
105
|
+
}, group.key)),
|
|
270
106
|
showLoadMoreSpinner && /*#__PURE__*/ jsx("div", {
|
|
271
107
|
style: {
|
|
272
108
|
display: 'flex',
|
|
@@ -40,12 +40,12 @@ const react_namespaceObject = require("@lingui/react");
|
|
|
40
40
|
const material_namespaceObject = require("@mui/material");
|
|
41
41
|
const apollo_core_namespaceObject = require("@uipath/apollo-core");
|
|
42
42
|
var apollo_core_default = /*#__PURE__*/ __webpack_require__.n(apollo_core_namespaceObject);
|
|
43
|
+
const use_attachment_intake_cjs_namespaceObject = require("../../../../../chat/headless/hooks/use-attachment-intake.cjs");
|
|
44
|
+
const use_attachment_limits_cjs_namespaceObject = require("../../../../../chat/headless/hooks/use-attachment-limits.cjs");
|
|
43
45
|
const attachments_provider_cjs_namespaceObject = require("../../../../../chat/headless/providers/attachments-provider.cjs");
|
|
44
46
|
const chat_service_provider_cjs_namespaceObject = require("../../../../../chat/headless/providers/chat-service.provider.cjs");
|
|
45
47
|
const chat_state_provider_cjs_namespaceObject = require("../../../../../chat/headless/providers/chat-state-provider.cjs");
|
|
46
|
-
const error_provider_cjs_namespaceObject = require("../../../../../chat/headless/providers/error-provider.cjs");
|
|
47
48
|
const picker_provider_cjs_namespaceObject = require("../../../../../chat/headless/providers/picker-provider.cjs");
|
|
48
|
-
const file_reader_cjs_namespaceObject = require("../../../../../chat/headless/utils/file-reader.cjs");
|
|
49
49
|
const index_cjs_namespaceObject = require("../../../../../chat/service/index.cjs");
|
|
50
50
|
const external_ap_typography_index_cjs_namespaceObject = require("../../../ap-typography/index.cjs");
|
|
51
51
|
const external_react_namespaceObject = require("react");
|
|
@@ -80,8 +80,8 @@ const SubmitButtonContainer = (0, material_namespaceObject.styled)('div')(()=>({
|
|
|
80
80
|
function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, isInputEmpty, waitingResponse, canStopResponse = waitingResponse, onResourceTriggerClick, onVoiceInteractionChange, isVoiceInteractionActive }) {
|
|
81
81
|
const { _ } = (0, react_namespaceObject.useLingui)();
|
|
82
82
|
const chatService = (0, chat_service_provider_cjs_namespaceObject.useChatService)();
|
|
83
|
-
const {
|
|
84
|
-
const
|
|
83
|
+
const { attachments } = (0, attachments_provider_cjs_namespaceObject.useAttachments)();
|
|
84
|
+
const takeFiles = (0, use_attachment_intake_cjs_namespaceObject.useAttachmentIntake)();
|
|
85
85
|
const { disabledFeatures, allowedAttachments } = (0, chat_state_provider_cjs_namespaceObject.useChatState)();
|
|
86
86
|
const { models, agentModes } = (0, picker_provider_cjs_namespaceObject.usePicker)();
|
|
87
87
|
const [isSpeechToTextActive, setIsSpeechToTextActive] = external_react_default().useState(()=>chatService?.isSpeechToTextActive ?? false);
|
|
@@ -106,68 +106,19 @@ function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, isInp
|
|
|
106
106
|
fileInputRef.current.click();
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
|
-
const handleAttachment = external_react_default().useCallback(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const oversizedFiles = parsedFiles.filter((file)=>file.size > allowedAttachments.maxSize);
|
|
113
|
-
if (oversizedFiles.length > 0) {
|
|
114
|
-
const errorMessages = oversizedFiles.map((file)=>{
|
|
115
|
-
const fileSizeMB = Math.round(file.size / 1024 / 1024);
|
|
116
|
-
const fileName = file.name;
|
|
117
|
-
const fileSize = fileSizeMB;
|
|
118
|
-
const maxSize = allowedAttachments.maxSize / 1024 / 1024;
|
|
119
|
-
return _({
|
|
120
|
-
id: 'autopilot-chat.input.actions.error.file-too-large',
|
|
121
|
-
values: {
|
|
122
|
-
fileName: fileName,
|
|
123
|
-
fileSize: fileSize,
|
|
124
|
-
maxSize: maxSize
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
setError(errorMessages.join('\n'));
|
|
129
|
-
} else setError(void 0);
|
|
130
|
-
addAttachments(parsedFiles.filter((file)=>file.size <= allowedAttachments.maxSize));
|
|
131
|
-
} catch (err) {
|
|
132
|
-
setError(err);
|
|
133
|
-
}
|
|
109
|
+
const handleAttachment = external_react_default().useCallback((event)=>{
|
|
110
|
+
const { accepted, rejected } = (0, use_attachment_intake_cjs_namespaceObject.checkAttachmentFiles)(Array.from(event.target.files ?? []), allowedAttachments, attachments.length);
|
|
111
|
+
takeFiles(accepted, rejected);
|
|
134
112
|
}, [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
_
|
|
113
|
+
takeFiles,
|
|
114
|
+
allowedAttachments,
|
|
115
|
+
attachments.length
|
|
139
116
|
]);
|
|
140
117
|
const acceptedExtensions = external_react_default().useMemo(()=>Object.values(allowedAttachments.types).flat().join(','), [
|
|
141
118
|
allowedAttachments
|
|
142
119
|
]);
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
const maxCount = allowedAttachments.maxCount;
|
|
146
|
-
const maxSize = allowedAttachments.maxSize / 1024 / 1024;
|
|
147
|
-
const fileTypes = acceptedExtensions.split(',').join(', ');
|
|
148
|
-
if (allowedAttachments.maxCount && allowedAttachments.maxCount > 1 && allowedAttachments.multiple) parts.push(_({
|
|
149
|
-
id: 'autopilot-chat.input.actions.attachments.max-count',
|
|
150
|
-
values: {
|
|
151
|
-
maxCount: maxCount
|
|
152
|
-
}
|
|
153
|
-
}));
|
|
154
|
-
parts.push(_({
|
|
155
|
-
id: 'autopilot-chat.input.actions.attachments.max-size',
|
|
156
|
-
values: {
|
|
157
|
-
maxSize: maxSize
|
|
158
|
-
}
|
|
159
|
-
}), _({
|
|
160
|
-
id: 'autopilot-chat.input.actions.attachments.allowed-types',
|
|
161
|
-
values: {
|
|
162
|
-
fileTypes: fileTypes
|
|
163
|
-
}
|
|
164
|
-
}));
|
|
165
|
-
return parts.join('. ');
|
|
166
|
-
}, [
|
|
167
|
-
allowedAttachments,
|
|
168
|
-
acceptedExtensions,
|
|
169
|
-
_
|
|
170
|
-
]);
|
|
120
|
+
const attachmentLimits = (0, use_attachment_limits_cjs_namespaceObject.useAttachmentLimits)(allowedAttachments);
|
|
121
|
+
const attachmentDescription = attachmentLimits.join('. ');
|
|
171
122
|
const showVoice = false === disabledFeatures.audioStreaming && (isVoiceInteractionActive || !!isInputEmpty && !waitingResponse);
|
|
172
123
|
const hasMultipleFeatures = [
|
|
173
124
|
!disabledFeatures.attachments,
|
|
@@ -215,45 +166,11 @@ function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, isInp
|
|
|
215
166
|
id: 'autopilot-chat.input.actions.attach-file'
|
|
216
167
|
})
|
|
217
168
|
}),
|
|
218
|
-
|
|
219
|
-
const maxCount = allowedAttachments.maxCount;
|
|
220
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ap_typography_index_cjs_namespaceObject.ApTypography, {
|
|
221
|
-
color: 'var(--color-foreground-inverse)',
|
|
222
|
-
variant: apollo_core_namespaceObject.FontVariantToken.fontSizeXs,
|
|
223
|
-
children: _({
|
|
224
|
-
id: 'autopilot-chat.input.actions.attachments.max-count',
|
|
225
|
-
values: {
|
|
226
|
-
maxCount: maxCount
|
|
227
|
-
}
|
|
228
|
-
})
|
|
229
|
-
});
|
|
230
|
-
})(),
|
|
231
|
-
(()=>{
|
|
232
|
-
const maxSize = allowedAttachments.maxSize / 1024 / 1024;
|
|
233
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ap_typography_index_cjs_namespaceObject.ApTypography, {
|
|
234
|
-
color: 'var(--color-foreground-inverse)',
|
|
235
|
-
variant: apollo_core_namespaceObject.FontVariantToken.fontSizeXs,
|
|
236
|
-
children: _({
|
|
237
|
-
id: 'autopilot-chat.input.actions.attachments.max-size',
|
|
238
|
-
values: {
|
|
239
|
-
maxSize: maxSize
|
|
240
|
-
}
|
|
241
|
-
})
|
|
242
|
-
});
|
|
243
|
-
})(),
|
|
244
|
-
(()=>{
|
|
245
|
-
const fileTypes = acceptedExtensions.split(',').join(', ');
|
|
246
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ap_typography_index_cjs_namespaceObject.ApTypography, {
|
|
169
|
+
attachmentLimits.map((line)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ap_typography_index_cjs_namespaceObject.ApTypography, {
|
|
247
170
|
color: 'var(--color-foreground-inverse)',
|
|
248
171
|
variant: apollo_core_namespaceObject.FontVariantToken.fontSizeXs,
|
|
249
|
-
children:
|
|
250
|
-
|
|
251
|
-
values: {
|
|
252
|
-
fileTypes: fileTypes
|
|
253
|
-
}
|
|
254
|
-
})
|
|
255
|
-
});
|
|
256
|
-
})()
|
|
172
|
+
children: line
|
|
173
|
+
}, line))
|
|
257
174
|
]
|
|
258
175
|
})
|
|
259
176
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-input-actions.d.ts","sourceRoot":"","sources":["../../../../../../src/material/components/ap-chat/components/input/chat-input-actions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat-input-actions.d.ts","sourceRoot":"","sources":["../../../../../../src/material/components/ap-chat/components/input/chat-input-actions.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,MAAM,OAAO,CAAC;AAkC1B,UAAU,8BAA8B;IACtC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAChD,aAAa,EAAE,OAAO,CAAC;IAMvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IAMzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9E,wBAAwB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,iBAAS,kCAAkC,CAAC,EAC1C,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,eAAe,EACf,eAAiC,EACjC,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,GACzB,EAAE,8BAA8B,2CAwLhC;AAED,eAAO,MAAM,yBAAyB,sEAAiD,CAAC"}
|
|
@@ -2,12 +2,12 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useLingui } from "@lingui/react";
|
|
3
3
|
import { styled } from "@mui/material";
|
|
4
4
|
import apollo_core, { FontVariantToken } from "@uipath/apollo-core";
|
|
5
|
+
import { checkAttachmentFiles, useAttachmentIntake } from "../../../../../chat/headless/hooks/use-attachment-intake.js";
|
|
6
|
+
import { useAttachmentLimits } from "../../../../../chat/headless/hooks/use-attachment-limits.js";
|
|
5
7
|
import { useAttachments } from "../../../../../chat/headless/providers/attachments-provider.js";
|
|
6
8
|
import { useChatService } from "../../../../../chat/headless/providers/chat-service.provider.js";
|
|
7
9
|
import { useChatState } from "../../../../../chat/headless/providers/chat-state-provider.js";
|
|
8
|
-
import { useError } from "../../../../../chat/headless/providers/error-provider.js";
|
|
9
10
|
import { usePicker } from "../../../../../chat/headless/providers/picker-provider.js";
|
|
10
|
-
import { parseFiles } from "../../../../../chat/headless/utils/file-reader.js";
|
|
11
11
|
import { AutopilotChatEvent } from "../../../../../chat/service/index.js";
|
|
12
12
|
import { ApTypography } from "../../../ap-typography/index.js";
|
|
13
13
|
import react from "react";
|
|
@@ -41,8 +41,8 @@ const SubmitButtonContainer = styled('div')(()=>({
|
|
|
41
41
|
function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, isInputEmpty, waitingResponse, canStopResponse = waitingResponse, onResourceTriggerClick, onVoiceInteractionChange, isVoiceInteractionActive }) {
|
|
42
42
|
const { _ } = useLingui();
|
|
43
43
|
const chatService = useChatService();
|
|
44
|
-
const {
|
|
45
|
-
const
|
|
44
|
+
const { attachments } = useAttachments();
|
|
45
|
+
const takeFiles = useAttachmentIntake();
|
|
46
46
|
const { disabledFeatures, allowedAttachments } = useChatState();
|
|
47
47
|
const { models, agentModes } = usePicker();
|
|
48
48
|
const [isSpeechToTextActive, setIsSpeechToTextActive] = react.useState(()=>chatService?.isSpeechToTextActive ?? false);
|
|
@@ -67,68 +67,19 @@ function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, isInp
|
|
|
67
67
|
fileInputRef.current.click();
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
-
const handleAttachment = react.useCallback(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const oversizedFiles = parsedFiles.filter((file)=>file.size > allowedAttachments.maxSize);
|
|
74
|
-
if (oversizedFiles.length > 0) {
|
|
75
|
-
const errorMessages = oversizedFiles.map((file)=>{
|
|
76
|
-
const fileSizeMB = Math.round(file.size / 1024 / 1024);
|
|
77
|
-
const fileName = file.name;
|
|
78
|
-
const fileSize = fileSizeMB;
|
|
79
|
-
const maxSize = allowedAttachments.maxSize / 1024 / 1024;
|
|
80
|
-
return _({
|
|
81
|
-
id: 'autopilot-chat.input.actions.error.file-too-large',
|
|
82
|
-
values: {
|
|
83
|
-
fileName: fileName,
|
|
84
|
-
fileSize: fileSize,
|
|
85
|
-
maxSize: maxSize
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
setError(errorMessages.join('\n'));
|
|
90
|
-
} else setError(void 0);
|
|
91
|
-
addAttachments(parsedFiles.filter((file)=>file.size <= allowedAttachments.maxSize));
|
|
92
|
-
} catch (err) {
|
|
93
|
-
setError(err);
|
|
94
|
-
}
|
|
70
|
+
const handleAttachment = react.useCallback((event)=>{
|
|
71
|
+
const { accepted, rejected } = checkAttachmentFiles(Array.from(event.target.files ?? []), allowedAttachments, attachments.length);
|
|
72
|
+
takeFiles(accepted, rejected);
|
|
95
73
|
}, [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
_
|
|
74
|
+
takeFiles,
|
|
75
|
+
allowedAttachments,
|
|
76
|
+
attachments.length
|
|
100
77
|
]);
|
|
101
78
|
const acceptedExtensions = react.useMemo(()=>Object.values(allowedAttachments.types).flat().join(','), [
|
|
102
79
|
allowedAttachments
|
|
103
80
|
]);
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
const maxCount = allowedAttachments.maxCount;
|
|
107
|
-
const maxSize = allowedAttachments.maxSize / 1024 / 1024;
|
|
108
|
-
const fileTypes = acceptedExtensions.split(',').join(', ');
|
|
109
|
-
if (allowedAttachments.maxCount && allowedAttachments.maxCount > 1 && allowedAttachments.multiple) parts.push(_({
|
|
110
|
-
id: 'autopilot-chat.input.actions.attachments.max-count',
|
|
111
|
-
values: {
|
|
112
|
-
maxCount: maxCount
|
|
113
|
-
}
|
|
114
|
-
}));
|
|
115
|
-
parts.push(_({
|
|
116
|
-
id: 'autopilot-chat.input.actions.attachments.max-size',
|
|
117
|
-
values: {
|
|
118
|
-
maxSize: maxSize
|
|
119
|
-
}
|
|
120
|
-
}), _({
|
|
121
|
-
id: 'autopilot-chat.input.actions.attachments.allowed-types',
|
|
122
|
-
values: {
|
|
123
|
-
fileTypes: fileTypes
|
|
124
|
-
}
|
|
125
|
-
}));
|
|
126
|
-
return parts.join('. ');
|
|
127
|
-
}, [
|
|
128
|
-
allowedAttachments,
|
|
129
|
-
acceptedExtensions,
|
|
130
|
-
_
|
|
131
|
-
]);
|
|
81
|
+
const attachmentLimits = useAttachmentLimits(allowedAttachments);
|
|
82
|
+
const attachmentDescription = attachmentLimits.join('. ');
|
|
132
83
|
const showVoice = false === disabledFeatures.audioStreaming && (isVoiceInteractionActive || !!isInputEmpty && !waitingResponse);
|
|
133
84
|
const hasMultipleFeatures = [
|
|
134
85
|
!disabledFeatures.attachments,
|
|
@@ -176,45 +127,11 @@ function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, isInp
|
|
|
176
127
|
id: 'autopilot-chat.input.actions.attach-file'
|
|
177
128
|
})
|
|
178
129
|
}),
|
|
179
|
-
|
|
180
|
-
const maxCount = allowedAttachments.maxCount;
|
|
181
|
-
return /*#__PURE__*/ jsx(ApTypography, {
|
|
182
|
-
color: 'var(--color-foreground-inverse)',
|
|
183
|
-
variant: FontVariantToken.fontSizeXs,
|
|
184
|
-
children: _({
|
|
185
|
-
id: 'autopilot-chat.input.actions.attachments.max-count',
|
|
186
|
-
values: {
|
|
187
|
-
maxCount: maxCount
|
|
188
|
-
}
|
|
189
|
-
})
|
|
190
|
-
});
|
|
191
|
-
})(),
|
|
192
|
-
(()=>{
|
|
193
|
-
const maxSize = allowedAttachments.maxSize / 1024 / 1024;
|
|
194
|
-
return /*#__PURE__*/ jsx(ApTypography, {
|
|
195
|
-
color: 'var(--color-foreground-inverse)',
|
|
196
|
-
variant: FontVariantToken.fontSizeXs,
|
|
197
|
-
children: _({
|
|
198
|
-
id: 'autopilot-chat.input.actions.attachments.max-size',
|
|
199
|
-
values: {
|
|
200
|
-
maxSize: maxSize
|
|
201
|
-
}
|
|
202
|
-
})
|
|
203
|
-
});
|
|
204
|
-
})(),
|
|
205
|
-
(()=>{
|
|
206
|
-
const fileTypes = acceptedExtensions.split(',').join(', ');
|
|
207
|
-
return /*#__PURE__*/ jsx(ApTypography, {
|
|
130
|
+
attachmentLimits.map((line)=>/*#__PURE__*/ jsx(ApTypography, {
|
|
208
131
|
color: 'var(--color-foreground-inverse)',
|
|
209
132
|
variant: FontVariantToken.fontSizeXs,
|
|
210
|
-
children:
|
|
211
|
-
|
|
212
|
-
values: {
|
|
213
|
-
fileTypes: fileTypes
|
|
214
|
-
}
|
|
215
|
-
})
|
|
216
|
-
});
|
|
217
|
-
})()
|
|
133
|
+
children: line
|
|
134
|
+
}, line))
|
|
218
135
|
]
|
|
219
136
|
})
|
|
220
137
|
})
|
|
@@ -36,16 +36,14 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
36
36
|
AutopilotChatInputFooter: ()=>AutopilotChatInputFooter
|
|
37
37
|
});
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
-
const react_namespaceObject = require("@lingui/react");
|
|
40
39
|
const material_namespaceObject = require("@mui/material");
|
|
41
40
|
const apollo_core_namespaceObject = require("@uipath/apollo-core");
|
|
42
|
-
const
|
|
41
|
+
const use_chat_labels_cjs_namespaceObject = require("../../../../../chat/headless/hooks/use-chat-labels.cjs");
|
|
43
42
|
const index_cjs_namespaceObject = require("../../../ap-typography/index.cjs");
|
|
44
43
|
const external_react_namespaceObject = require("react");
|
|
45
44
|
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
46
45
|
function AutopilotChatInputFooterComponent() {
|
|
47
|
-
const {
|
|
48
|
-
const { overrideLabels } = (0, chat_state_provider_cjs_namespaceObject.useChatState)();
|
|
46
|
+
const { footerDisclaimer } = (0, use_chat_labels_cjs_namespaceObject.useChatLabels)();
|
|
49
47
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(material_namespaceObject.Box, {
|
|
50
48
|
sx: {
|
|
51
49
|
textAlign: 'center'
|
|
@@ -53,9 +51,7 @@ function AutopilotChatInputFooterComponent() {
|
|
|
53
51
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApTypography, {
|
|
54
52
|
color: 'var(--color-foreground-de-emp)',
|
|
55
53
|
variant: apollo_core_namespaceObject.FontVariantToken.fontSizeXs,
|
|
56
|
-
children:
|
|
57
|
-
id: 'autopilot-chat.input.footer'
|
|
58
|
-
})
|
|
54
|
+
children: footerDisclaimer
|
|
59
55
|
})
|
|
60
56
|
});
|
|
61
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-input-footer.d.ts","sourceRoot":"","sources":["../../../../../../src/material/components/ap-chat/components/input/chat-input-footer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat-input-footer.d.ts","sourceRoot":"","sources":["../../../../../../src/material/components/ap-chat/components/input/chat-input-footer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,iBAAS,iCAAiC,4CAUzC;AAED,eAAO,MAAM,wBAAwB,qEAAgD,CAAC"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useLingui } from "@lingui/react";
|
|
3
2
|
import { Box } from "@mui/material";
|
|
4
3
|
import { FontVariantToken } from "@uipath/apollo-core";
|
|
5
|
-
import {
|
|
4
|
+
import { useChatLabels } from "../../../../../chat/headless/hooks/use-chat-labels.js";
|
|
6
5
|
import { ApTypography } from "../../../ap-typography/index.js";
|
|
7
6
|
import react from "react";
|
|
8
7
|
function AutopilotChatInputFooterComponent() {
|
|
9
|
-
const {
|
|
10
|
-
const { overrideLabels } = useChatState();
|
|
8
|
+
const { footerDisclaimer } = useChatLabels();
|
|
11
9
|
return /*#__PURE__*/ jsx(Box, {
|
|
12
10
|
sx: {
|
|
13
11
|
textAlign: 'center'
|
|
@@ -15,9 +13,7 @@ function AutopilotChatInputFooterComponent() {
|
|
|
15
13
|
children: /*#__PURE__*/ jsx(ApTypography, {
|
|
16
14
|
color: 'var(--color-foreground-de-emp)',
|
|
17
15
|
variant: FontVariantToken.fontSizeXs,
|
|
18
|
-
children:
|
|
19
|
-
id: 'autopilot-chat.input.footer'
|
|
20
|
-
})
|
|
16
|
+
children: footerDisclaimer
|
|
21
17
|
})
|
|
22
18
|
});
|
|
23
19
|
}
|