@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
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
WindChatHeader: ()=>WindChatHeader
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const react_namespaceObject = require("@lingui/react");
|
|
31
|
+
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
32
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
33
|
+
const autopilot_logo_cjs_namespaceObject = require("../../assets/autopilot-logo.cjs");
|
|
34
|
+
const use_chat_header_actions_cjs_namespaceObject = require("../../headless/hooks/use-chat-header-actions.cjs");
|
|
35
|
+
const use_chat_labels_cjs_namespaceObject = require("../../headless/hooks/use-chat-labels.cjs");
|
|
36
|
+
const chat_state_provider_cjs_namespaceObject = require("../../headless/providers/chat-state-provider.cjs");
|
|
37
|
+
const index_cjs_namespaceObject = require("../../service/index.cjs");
|
|
38
|
+
const external_custom_actions_menu_cjs_namespaceObject = require("./custom-actions-menu.cjs");
|
|
39
|
+
const external_header_action_button_cjs_namespaceObject = require("./header-action-button.cjs");
|
|
40
|
+
function WindChatHeader({ className, layout }) {
|
|
41
|
+
const { _ } = (0, react_namespaceObject.useLingui)();
|
|
42
|
+
const { disabledFeatures, spacing, historyOpen, settingsOpen, setHistoryAnchorElement, setSettingsAnchorElement } = (0, chat_state_provider_cjs_namespaceObject.useChatState)();
|
|
43
|
+
const { title } = (0, use_chat_labels_cjs_namespaceObject.useChatLabels)();
|
|
44
|
+
const { visibility, customHeaderActions, newChat, toggleSettings, toggleHistory, close, runCustomAction } = (0, use_chat_header_actions_cjs_namespaceObject.useChatHeaderActions)({
|
|
45
|
+
mode: layout.mode
|
|
46
|
+
});
|
|
47
|
+
const compact = spacing.compactMode;
|
|
48
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("header", {
|
|
49
|
+
"data-slot": "wind-chat-header",
|
|
50
|
+
"data-separator": layout.showHeaderSeparator ? '' : void 0,
|
|
51
|
+
className: (0, apollo_wind_namespaceObject.cn)('flex shrink-0 items-center justify-between gap-2 data-separator:border-b data-separator:border-border-de-emp', layout.showHeaderSeparator ? 'min-h-11 pt-2 pb-1' : compact ? 'min-h-12 py-2' : 'min-h-16 py-4', className),
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
54
|
+
className: "flex min-w-0 items-center gap-2",
|
|
55
|
+
children: [
|
|
56
|
+
layout.mode === index_cjs_namespaceObject.AutopilotChatMode.FullScreen && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(autopilot_logo_cjs_namespaceObject.AutopilotLogo, {
|
|
57
|
+
className: "shrink-0",
|
|
58
|
+
"data-slot": "autopilot-logo"
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h1", {
|
|
61
|
+
className: compact ? 'truncate text-sm font-semibold text-foreground' : 'truncate text-base font-semibold text-foreground',
|
|
62
|
+
children: title
|
|
63
|
+
}),
|
|
64
|
+
!disabledFeatures.preview && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Badge, {
|
|
65
|
+
variant: "info",
|
|
66
|
+
className: "shrink-0 px-1.5 py-0 text-[10px] leading-4",
|
|
67
|
+
children: _({
|
|
68
|
+
id: 'autopilot-chat.header.preview'
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
}),
|
|
73
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
74
|
+
className: "flex shrink-0 items-center gap-0.5",
|
|
75
|
+
children: [
|
|
76
|
+
visibility.newChat && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_header_action_button_cjs_namespaceObject.HeaderActionButton, {
|
|
77
|
+
label: _({
|
|
78
|
+
id: 'autopilot-chat.header.actions.new-chat'
|
|
79
|
+
}),
|
|
80
|
+
onClick: newChat,
|
|
81
|
+
"data-testid": "autopilot-chat-new-chat",
|
|
82
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.MessageCirclePlus, {})
|
|
83
|
+
}),
|
|
84
|
+
visibility.settings && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_header_action_button_cjs_namespaceObject.HeaderActionButton, {
|
|
85
|
+
label: _({
|
|
86
|
+
id: 'autopilot-chat.header.actions.settings'
|
|
87
|
+
}),
|
|
88
|
+
ref: setSettingsAnchorElement,
|
|
89
|
+
onClick: toggleSettings,
|
|
90
|
+
"aria-expanded": settingsOpen,
|
|
91
|
+
"data-testid": "autopilot-chat-settings",
|
|
92
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Settings, {})
|
|
93
|
+
}),
|
|
94
|
+
visibility.history && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_header_action_button_cjs_namespaceObject.HeaderActionButton, {
|
|
95
|
+
label: _({
|
|
96
|
+
id: 'autopilot-chat.header.actions.history'
|
|
97
|
+
}),
|
|
98
|
+
ref: setHistoryAnchorElement,
|
|
99
|
+
onClick: toggleHistory,
|
|
100
|
+
"aria-expanded": historyOpen,
|
|
101
|
+
"aria-haspopup": "dialog",
|
|
102
|
+
"data-testid": "autopilot-chat-history",
|
|
103
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.History, {})
|
|
104
|
+
}),
|
|
105
|
+
visibility.customActions && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_custom_actions_menu_cjs_namespaceObject.CustomActionsMenu, {
|
|
106
|
+
actions: customHeaderActions,
|
|
107
|
+
onAction: runCustomAction
|
|
108
|
+
}),
|
|
109
|
+
visibility.close && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_header_action_button_cjs_namespaceObject.HeaderActionButton, {
|
|
110
|
+
label: _({
|
|
111
|
+
id: 'autopilot-chat.header.actions.close'
|
|
112
|
+
}),
|
|
113
|
+
onClick: close,
|
|
114
|
+
"data-testid": "autopilot-chat-close",
|
|
115
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Minus, {})
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
exports.WindChatHeader = __webpack_exports__.WindChatHeader;
|
|
123
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
124
|
+
"WindChatHeader"
|
|
125
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
126
|
+
Object.defineProperty(exports, '__esModule', {
|
|
127
|
+
value: true
|
|
128
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-header.d.ts","sourceRoot":"","sources":["../../../../src/chat/wind/header/chat-header.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAapE,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,2CA4G/F"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useLingui } from "@lingui/react";
|
|
3
|
+
import { Badge, cn } from "@uipath/apollo-wind";
|
|
4
|
+
import { History, MessageCirclePlus, Minus, Settings } from "lucide-react";
|
|
5
|
+
import { AutopilotLogo } from "../../assets/autopilot-logo.js";
|
|
6
|
+
import { useChatHeaderActions } from "../../headless/hooks/use-chat-header-actions.js";
|
|
7
|
+
import { useChatLabels } from "../../headless/hooks/use-chat-labels.js";
|
|
8
|
+
import { useChatState } from "../../headless/providers/chat-state-provider.js";
|
|
9
|
+
import { AutopilotChatMode } from "../../service/index.js";
|
|
10
|
+
import { CustomActionsMenu } from "./custom-actions-menu.js";
|
|
11
|
+
import { HeaderActionButton } from "./header-action-button.js";
|
|
12
|
+
function WindChatHeader({ className, layout }) {
|
|
13
|
+
const { _ } = useLingui();
|
|
14
|
+
const { disabledFeatures, spacing, historyOpen, settingsOpen, setHistoryAnchorElement, setSettingsAnchorElement } = useChatState();
|
|
15
|
+
const { title } = useChatLabels();
|
|
16
|
+
const { visibility, customHeaderActions, newChat, toggleSettings, toggleHistory, close, runCustomAction } = useChatHeaderActions({
|
|
17
|
+
mode: layout.mode
|
|
18
|
+
});
|
|
19
|
+
const compact = spacing.compactMode;
|
|
20
|
+
return /*#__PURE__*/ jsxs("header", {
|
|
21
|
+
"data-slot": "wind-chat-header",
|
|
22
|
+
"data-separator": layout.showHeaderSeparator ? '' : void 0,
|
|
23
|
+
className: cn('flex shrink-0 items-center justify-between gap-2 data-separator:border-b data-separator:border-border-de-emp', layout.showHeaderSeparator ? 'min-h-11 pt-2 pb-1' : compact ? 'min-h-12 py-2' : 'min-h-16 py-4', className),
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ jsxs("div", {
|
|
26
|
+
className: "flex min-w-0 items-center gap-2",
|
|
27
|
+
children: [
|
|
28
|
+
layout.mode === AutopilotChatMode.FullScreen && /*#__PURE__*/ jsx(AutopilotLogo, {
|
|
29
|
+
className: "shrink-0",
|
|
30
|
+
"data-slot": "autopilot-logo"
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ jsx("h1", {
|
|
33
|
+
className: compact ? 'truncate text-sm font-semibold text-foreground' : 'truncate text-base font-semibold text-foreground',
|
|
34
|
+
children: title
|
|
35
|
+
}),
|
|
36
|
+
!disabledFeatures.preview && /*#__PURE__*/ jsx(Badge, {
|
|
37
|
+
variant: "info",
|
|
38
|
+
className: "shrink-0 px-1.5 py-0 text-[10px] leading-4",
|
|
39
|
+
children: _({
|
|
40
|
+
id: 'autopilot-chat.header.preview'
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
}),
|
|
45
|
+
/*#__PURE__*/ jsxs("div", {
|
|
46
|
+
className: "flex shrink-0 items-center gap-0.5",
|
|
47
|
+
children: [
|
|
48
|
+
visibility.newChat && /*#__PURE__*/ jsx(HeaderActionButton, {
|
|
49
|
+
label: _({
|
|
50
|
+
id: 'autopilot-chat.header.actions.new-chat'
|
|
51
|
+
}),
|
|
52
|
+
onClick: newChat,
|
|
53
|
+
"data-testid": "autopilot-chat-new-chat",
|
|
54
|
+
children: /*#__PURE__*/ jsx(MessageCirclePlus, {})
|
|
55
|
+
}),
|
|
56
|
+
visibility.settings && /*#__PURE__*/ jsx(HeaderActionButton, {
|
|
57
|
+
label: _({
|
|
58
|
+
id: 'autopilot-chat.header.actions.settings'
|
|
59
|
+
}),
|
|
60
|
+
ref: setSettingsAnchorElement,
|
|
61
|
+
onClick: toggleSettings,
|
|
62
|
+
"aria-expanded": settingsOpen,
|
|
63
|
+
"data-testid": "autopilot-chat-settings",
|
|
64
|
+
children: /*#__PURE__*/ jsx(Settings, {})
|
|
65
|
+
}),
|
|
66
|
+
visibility.history && /*#__PURE__*/ jsx(HeaderActionButton, {
|
|
67
|
+
label: _({
|
|
68
|
+
id: 'autopilot-chat.header.actions.history'
|
|
69
|
+
}),
|
|
70
|
+
ref: setHistoryAnchorElement,
|
|
71
|
+
onClick: toggleHistory,
|
|
72
|
+
"aria-expanded": historyOpen,
|
|
73
|
+
"aria-haspopup": "dialog",
|
|
74
|
+
"data-testid": "autopilot-chat-history",
|
|
75
|
+
children: /*#__PURE__*/ jsx(History, {})
|
|
76
|
+
}),
|
|
77
|
+
visibility.customActions && /*#__PURE__*/ jsx(CustomActionsMenu, {
|
|
78
|
+
actions: customHeaderActions,
|
|
79
|
+
onAction: runCustomAction
|
|
80
|
+
}),
|
|
81
|
+
visibility.close && /*#__PURE__*/ jsx(HeaderActionButton, {
|
|
82
|
+
label: _({
|
|
83
|
+
id: 'autopilot-chat.header.actions.close'
|
|
84
|
+
}),
|
|
85
|
+
onClick: close,
|
|
86
|
+
"data-testid": "autopilot-chat-close",
|
|
87
|
+
children: /*#__PURE__*/ jsx(Minus, {})
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
export { WindChatHeader };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
CustomActionsMenu: ()=>CustomActionsMenu
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const react_namespaceObject = require("@lingui/react");
|
|
31
|
+
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
32
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
33
|
+
const service_icon_cjs_namespaceObject = require("../common/service-icon.cjs");
|
|
34
|
+
const external_header_action_button_cjs_namespaceObject = require("./header-action-button.cjs");
|
|
35
|
+
function WithDescription({ description, children }) {
|
|
36
|
+
if (!description) return children;
|
|
37
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.Tooltip, {
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.TooltipTrigger, {
|
|
40
|
+
asChild: true,
|
|
41
|
+
children: children
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.TooltipPortal, {
|
|
44
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.TooltipContent, {
|
|
45
|
+
side: "left",
|
|
46
|
+
children: description
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function ActionItem({ action, onSelect }) {
|
|
53
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(WithDescription, {
|
|
54
|
+
description: action.description,
|
|
55
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.DropdownMenuItem, {
|
|
56
|
+
disabled: action.disabled,
|
|
57
|
+
onSelect: ()=>onSelect?.(action),
|
|
58
|
+
"data-action-id": action.id,
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(service_icon_cjs_namespaceObject.ServiceIcon, {
|
|
61
|
+
icon: action.icon
|
|
62
|
+
}),
|
|
63
|
+
action.name
|
|
64
|
+
]
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function CustomActionsMenu({ actions, onAction }) {
|
|
69
|
+
const { _ } = (0, react_namespaceObject.useLingui)();
|
|
70
|
+
const label = _({
|
|
71
|
+
id: 'autopilot-chat.header.actions.custom-actions'
|
|
72
|
+
});
|
|
73
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.DropdownMenu, {
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.DropdownMenuTrigger, {
|
|
76
|
+
asChild: true,
|
|
77
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_header_action_button_cjs_namespaceObject.HeaderActionButton, {
|
|
78
|
+
label: label,
|
|
79
|
+
"data-testid": "autopilot-chat-action-menu",
|
|
80
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EllipsisVertical, {})
|
|
81
|
+
})
|
|
82
|
+
}),
|
|
83
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.DropdownMenuContent, {
|
|
84
|
+
align: "end",
|
|
85
|
+
className: "min-w-48",
|
|
86
|
+
children: actions.map((action)=>action.children && action.children.length > 0 ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.DropdownMenuSub, {
|
|
87
|
+
children: [
|
|
88
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(WithDescription, {
|
|
89
|
+
description: action.description,
|
|
90
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.DropdownMenuSubTrigger, {
|
|
91
|
+
disabled: action.disabled,
|
|
92
|
+
"data-action-id": action.id,
|
|
93
|
+
children: [
|
|
94
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(service_icon_cjs_namespaceObject.ServiceIcon, {
|
|
95
|
+
icon: action.icon
|
|
96
|
+
}),
|
|
97
|
+
action.name
|
|
98
|
+
]
|
|
99
|
+
})
|
|
100
|
+
}),
|
|
101
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.DropdownMenuSubContent, {
|
|
102
|
+
className: "min-w-44",
|
|
103
|
+
children: action.children.map((child)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ActionItem, {
|
|
104
|
+
action: child,
|
|
105
|
+
onSelect: onAction
|
|
106
|
+
}, child.id))
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
}, action.id) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ActionItem, {
|
|
110
|
+
action: action,
|
|
111
|
+
onSelect: action.children ? void 0 : onAction
|
|
112
|
+
}, action.id))
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
exports.CustomActionsMenu = __webpack_exports__.CustomActionsMenu;
|
|
118
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
119
|
+
"CustomActionsMenu"
|
|
120
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
121
|
+
Object.defineProperty(exports, '__esModule', {
|
|
122
|
+
value: true
|
|
123
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AutopilotChatCustomHeaderAction } from '../../service';
|
|
2
|
+
export declare function CustomActionsMenu({ actions, onAction, }: {
|
|
3
|
+
actions: AutopilotChatCustomHeaderAction[];
|
|
4
|
+
onAction: (action: AutopilotChatCustomHeaderAction) => void;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=custom-actions-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-actions-menu.d.ts","sourceRoot":"","sources":["../../../../src/chat/wind/header/custom-actions-menu.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAoDrE,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,+BAA+B,EAAE,CAAC;IAC3C,QAAQ,EAAE,CAAC,MAAM,EAAE,+BAA+B,KAAK,IAAI,CAAC;CAC7D,2CAyCA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useLingui } from "@lingui/react";
|
|
3
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Tooltip, TooltipContent, TooltipPortal, TooltipTrigger } from "@uipath/apollo-wind";
|
|
4
|
+
import { EllipsisVertical } from "lucide-react";
|
|
5
|
+
import { ServiceIcon } from "../common/service-icon.js";
|
|
6
|
+
import { HeaderActionButton } from "./header-action-button.js";
|
|
7
|
+
function WithDescription({ description, children }) {
|
|
8
|
+
if (!description) return children;
|
|
9
|
+
return /*#__PURE__*/ jsxs(Tooltip, {
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
12
|
+
asChild: true,
|
|
13
|
+
children: children
|
|
14
|
+
}),
|
|
15
|
+
/*#__PURE__*/ jsx(TooltipPortal, {
|
|
16
|
+
children: /*#__PURE__*/ jsx(TooltipContent, {
|
|
17
|
+
side: "left",
|
|
18
|
+
children: description
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function ActionItem({ action, onSelect }) {
|
|
25
|
+
return /*#__PURE__*/ jsx(WithDescription, {
|
|
26
|
+
description: action.description,
|
|
27
|
+
children: /*#__PURE__*/ jsxs(DropdownMenuItem, {
|
|
28
|
+
disabled: action.disabled,
|
|
29
|
+
onSelect: ()=>onSelect?.(action),
|
|
30
|
+
"data-action-id": action.id,
|
|
31
|
+
children: [
|
|
32
|
+
/*#__PURE__*/ jsx(ServiceIcon, {
|
|
33
|
+
icon: action.icon
|
|
34
|
+
}),
|
|
35
|
+
action.name
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function CustomActionsMenu({ actions, onAction }) {
|
|
41
|
+
const { _ } = useLingui();
|
|
42
|
+
const label = _({
|
|
43
|
+
id: 'autopilot-chat.header.actions.custom-actions'
|
|
44
|
+
});
|
|
45
|
+
return /*#__PURE__*/ jsxs(DropdownMenu, {
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ jsx(DropdownMenuTrigger, {
|
|
48
|
+
asChild: true,
|
|
49
|
+
children: /*#__PURE__*/ jsx(HeaderActionButton, {
|
|
50
|
+
label: label,
|
|
51
|
+
"data-testid": "autopilot-chat-action-menu",
|
|
52
|
+
children: /*#__PURE__*/ jsx(EllipsisVertical, {})
|
|
53
|
+
})
|
|
54
|
+
}),
|
|
55
|
+
/*#__PURE__*/ jsx(DropdownMenuContent, {
|
|
56
|
+
align: "end",
|
|
57
|
+
className: "min-w-48",
|
|
58
|
+
children: actions.map((action)=>action.children && action.children.length > 0 ? /*#__PURE__*/ jsxs(DropdownMenuSub, {
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ jsx(WithDescription, {
|
|
61
|
+
description: action.description,
|
|
62
|
+
children: /*#__PURE__*/ jsxs(DropdownMenuSubTrigger, {
|
|
63
|
+
disabled: action.disabled,
|
|
64
|
+
"data-action-id": action.id,
|
|
65
|
+
children: [
|
|
66
|
+
/*#__PURE__*/ jsx(ServiceIcon, {
|
|
67
|
+
icon: action.icon
|
|
68
|
+
}),
|
|
69
|
+
action.name
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
}),
|
|
73
|
+
/*#__PURE__*/ jsx(DropdownMenuSubContent, {
|
|
74
|
+
className: "min-w-44",
|
|
75
|
+
children: action.children.map((child)=>/*#__PURE__*/ jsx(ActionItem, {
|
|
76
|
+
action: child,
|
|
77
|
+
onSelect: onAction
|
|
78
|
+
}, child.id))
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
}, action.id) : /*#__PURE__*/ jsx(ActionItem, {
|
|
82
|
+
action: action,
|
|
83
|
+
onSelect: action.children ? void 0 : onAction
|
|
84
|
+
}, action.id))
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
export { CustomActionsMenu };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
HeaderActionButton: ()=>HeaderActionButton
|
|
37
|
+
});
|
|
38
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
+
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
40
|
+
const external_react_namespaceObject = require("react");
|
|
41
|
+
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
42
|
+
const chat_state_provider_cjs_namespaceObject = require("../../headless/providers/chat-state-provider.cjs");
|
|
43
|
+
const HeaderActionButton = /*#__PURE__*/ external_react_default().forwardRef(({ label, children, ...props }, ref)=>{
|
|
44
|
+
const { spacing } = (0, chat_state_provider_cjs_namespaceObject.useChatState)();
|
|
45
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.Tooltip, {
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.TooltipTrigger, {
|
|
48
|
+
asChild: true,
|
|
49
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
|
|
50
|
+
ref: ref,
|
|
51
|
+
variant: "ghost",
|
|
52
|
+
icon: true,
|
|
53
|
+
size: spacing.compactMode ? '3xs' : '2xs',
|
|
54
|
+
"aria-label": label,
|
|
55
|
+
...props,
|
|
56
|
+
children: children
|
|
57
|
+
})
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.TooltipPortal, {
|
|
60
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.TooltipContent, {
|
|
61
|
+
children: label
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
HeaderActionButton.displayName = 'HeaderActionButton';
|
|
68
|
+
exports.HeaderActionButton = __webpack_exports__.HeaderActionButton;
|
|
69
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
70
|
+
"HeaderActionButton"
|
|
71
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
72
|
+
Object.defineProperty(exports, '__esModule', {
|
|
73
|
+
value: true
|
|
74
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ButtonProps } from '@uipath/apollo-wind';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface HeaderActionButtonProps extends Omit<ButtonProps, 'size' | 'icon' | 'variant'> {
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const HeaderActionButton: React.ForwardRefExoticComponent<HeaderActionButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
//# sourceMappingURL=header-action-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header-action-button.d.ts","sourceRoot":"","sources":["../../../../src/chat/wind/header/header-action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAKjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC7F,KAAK,EAAE,MAAM,CAAC;CACf;AAKD,eAAO,MAAM,kBAAkB,mGAwB9B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Tooltip, TooltipContent, TooltipPortal, TooltipTrigger } from "@uipath/apollo-wind";
|
|
3
|
+
import react from "react";
|
|
4
|
+
import { useChatState } from "../../headless/providers/chat-state-provider.js";
|
|
5
|
+
const HeaderActionButton = /*#__PURE__*/ react.forwardRef(({ label, children, ...props }, ref)=>{
|
|
6
|
+
const { spacing } = useChatState();
|
|
7
|
+
return /*#__PURE__*/ jsxs(Tooltip, {
|
|
8
|
+
children: [
|
|
9
|
+
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
10
|
+
asChild: true,
|
|
11
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
12
|
+
ref: ref,
|
|
13
|
+
variant: "ghost",
|
|
14
|
+
icon: true,
|
|
15
|
+
size: spacing.compactMode ? '3xs' : '2xs',
|
|
16
|
+
"aria-label": label,
|
|
17
|
+
...props,
|
|
18
|
+
children: children
|
|
19
|
+
})
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ jsx(TooltipPortal, {
|
|
22
|
+
children: /*#__PURE__*/ jsx(TooltipContent, {
|
|
23
|
+
children: label
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
HeaderActionButton.displayName = 'HeaderActionButton';
|
|
30
|
+
export { HeaderActionButton };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
ChatHistory: ()=>ChatHistory
|
|
37
|
+
});
|
|
38
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
+
const react_namespaceObject = require("@lingui/react");
|
|
40
|
+
const external_react_namespaceObject = require("react");
|
|
41
|
+
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
42
|
+
const use_chat_history_cjs_namespaceObject = require("../../headless/hooks/use-chat-history.cjs");
|
|
43
|
+
const chat_service_provider_cjs_namespaceObject = require("../../headless/providers/chat-service.provider.cjs");
|
|
44
|
+
const chat_state_provider_cjs_namespaceObject = require("../../headless/providers/chat-state-provider.cjs");
|
|
45
|
+
const panel_popover_cjs_namespaceObject = require("../common/panel-popover.cjs");
|
|
46
|
+
const external_history_panel_cjs_namespaceObject = require("./history-panel.cjs");
|
|
47
|
+
function ChatHistory({ boundary, mode }) {
|
|
48
|
+
const { _ } = (0, react_namespaceObject.useLingui)();
|
|
49
|
+
const chatService = (0, chat_service_provider_cjs_namespaceObject.useChatService)();
|
|
50
|
+
const { historyOpen, historyAnchorElement } = (0, chat_state_provider_cjs_namespaceObject.useChatState)();
|
|
51
|
+
const [scrollContainer, setScrollContainer] = external_react_default().useState(null);
|
|
52
|
+
const history = (0, use_chat_history_cjs_namespaceObject.useChatHistory)({
|
|
53
|
+
open: historyOpen,
|
|
54
|
+
scrollContainer
|
|
55
|
+
});
|
|
56
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(panel_popover_cjs_namespaceObject.PanelPopover, {
|
|
57
|
+
open: historyOpen,
|
|
58
|
+
anchor: historyAnchorElement,
|
|
59
|
+
boundary: boundary,
|
|
60
|
+
mode: mode,
|
|
61
|
+
label: _({
|
|
62
|
+
id: 'autopilot-chat.header.actions.history'
|
|
63
|
+
}),
|
|
64
|
+
onClose: ()=>chatService.toggleHistory(false),
|
|
65
|
+
onEscapeKeyDown: (event)=>{
|
|
66
|
+
if (event.target instanceof Element && event.target.closest('[data-renaming]')) event.preventDefault();
|
|
67
|
+
},
|
|
68
|
+
className: "py-2",
|
|
69
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_history_panel_cjs_namespaceObject.HistoryPanel, {
|
|
70
|
+
className: "flex-1",
|
|
71
|
+
history: history,
|
|
72
|
+
scrollContainerRef: setScrollContainer
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
exports.ChatHistory = __webpack_exports__.ChatHistory;
|
|
77
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
78
|
+
"ChatHistory"
|
|
79
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
80
|
+
Object.defineProperty(exports, '__esModule', {
|
|
81
|
+
value: true
|
|
82
|
+
});
|