@inkeep/agents-ui 0.15.13 → 0.15.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +230 -222
  3. package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -1
  4. package/dist/primitives/atoms/icons/built-in-icons.d.ts +2 -0
  5. package/dist/primitives/atoms/icons/built-in-icons.js +33 -31
  6. package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -1
  7. package/dist/primitives/atoms/icons/inkeep-default-icons.js +4 -1
  8. package/dist/primitives/components/chat-history/index.cjs +1 -0
  9. package/dist/primitives/components/chat-history/index.d.ts +27 -0
  10. package/dist/primitives/components/chat-history/index.js +105 -0
  11. package/dist/primitives/components/embedded-chat/use-captcha.cjs +1 -0
  12. package/dist/primitives/components/embedded-chat/use-captcha.d.ts +23 -6
  13. package/dist/primitives/components/embedded-chat/use-captcha.js +67 -0
  14. package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -2
  15. package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +12 -3
  16. package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +252 -144
  17. package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
  18. package/dist/primitives/components/embedded-chat/use-stream-processor.d.ts +2 -0
  19. package/dist/primitives/components/embedded-chat/use-stream-processor.js +120 -70
  20. package/dist/primitives/components/embedded-chat.cjs +3 -3
  21. package/dist/primitives/components/embedded-chat.d.ts +5 -2
  22. package/dist/primitives/components/embedded-chat.js +1010 -967
  23. package/dist/primitives/components/index.cjs +1 -1
  24. package/dist/primitives/components/index.d.ts +1 -0
  25. package/dist/primitives/components/index.js +20 -18
  26. package/dist/primitives/hooks/use-anonymous-session.cjs +1 -0
  27. package/dist/primitives/hooks/use-anonymous-session.d.ts +12 -0
  28. package/dist/primitives/hooks/use-anonymous-session.js +57 -0
  29. package/dist/primitives/hooks/use-conversation-loader.cjs +1 -0
  30. package/dist/primitives/hooks/use-conversation-loader.d.ts +13 -0
  31. package/dist/primitives/hooks/use-conversation-loader.js +36 -0
  32. package/dist/primitives/hooks/use-inkeep-api-client.cjs +1 -0
  33. package/dist/primitives/hooks/use-inkeep-api-client.d.ts +33 -0
  34. package/dist/primitives/hooks/use-inkeep-api-client.js +87 -0
  35. package/dist/primitives/hooks/use-local-storage.cjs +1 -0
  36. package/dist/primitives/hooks/use-local-storage.d.ts +8 -0
  37. package/dist/primitives/hooks/use-local-storage.js +26 -0
  38. package/dist/primitives/index.cjs +1 -1
  39. package/dist/primitives/index.js +157 -151
  40. package/dist/primitives/providers/base-events-provider.cjs +1 -1
  41. package/dist/primitives/providers/base-events-provider.js +1 -1
  42. package/dist/primitives/providers/chat-history-provider.cjs +1 -0
  43. package/dist/primitives/providers/chat-history-provider.d.ts +32 -0
  44. package/dist/primitives/providers/chat-history-provider.js +105 -0
  45. package/dist/primitives/providers/index.cjs +1 -1
  46. package/dist/primitives/providers/index.d.ts +1 -0
  47. package/dist/primitives/providers/index.js +55 -52
  48. package/dist/primitives/utils/component-ids.cjs +1 -1
  49. package/dist/primitives/utils/component-ids.d.ts +32 -0
  50. package/dist/primitives/utils/component-ids.js +19 -1
  51. package/dist/primitives/utils/default-settings.cjs +1 -1
  52. package/dist/primitives/utils/default-settings.d.ts +2 -0
  53. package/dist/primitives/utils/default-settings.js +6 -4
  54. package/dist/react/chat-button.cjs +1 -1
  55. package/dist/react/chat-button.js +42 -38
  56. package/dist/react/embedded-chat.cjs +1 -1
  57. package/dist/react/embedded-chat.js +256 -230
  58. package/dist/react/index.cjs +1 -1
  59. package/dist/react/index.js +230 -222
  60. package/dist/react/sidebar-chat.cjs +1 -1
  61. package/dist/react/sidebar-chat.js +26 -22
  62. package/dist/styled/components/chat-bubble.cjs +1 -1
  63. package/dist/styled/components/chat-bubble.js +1 -1
  64. package/dist/styled/components/chat-history.cjs +1 -0
  65. package/dist/styled/components/chat-history.d.ts +15 -0
  66. package/dist/styled/components/chat-history.js +197 -0
  67. package/dist/styled/components/data-summary-group.cjs +1 -1
  68. package/dist/styled/components/data-summary-group.js +24 -24
  69. package/dist/styled/components/embedded-chat/session-loading.cjs +1 -0
  70. package/dist/styled/components/embedded-chat/session-loading.d.ts +1 -0
  71. package/dist/styled/components/embedded-chat/session-loading.js +26 -0
  72. package/dist/styled/components/embedded-chat.cjs +1 -1
  73. package/dist/styled/components/embedded-chat.d.ts +7 -1
  74. package/dist/styled/components/embedded-chat.js +615 -563
  75. package/dist/styled/components/embedded-search.cjs +1 -1
  76. package/dist/styled/components/embedded-search.js +1 -1
  77. package/dist/styled/components/index.cjs +1 -1
  78. package/dist/styled/components/index.d.ts +1 -0
  79. package/dist/styled/components/index.js +22 -20
  80. package/dist/styled/components/sidebar-chat.cjs +1 -1
  81. package/dist/styled/components/sidebar-chat.js +1 -1
  82. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.cjs +1 -1
  83. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.js +3 -2
  84. package/dist/styled/index.cjs +1 -1
  85. package/dist/styled/index.js +193 -185
  86. package/dist/styled/inkeep.css.cjs +146 -4
  87. package/dist/styled/inkeep.css.js +146 -4
  88. package/dist/types/config/ai.d.ts +17 -1
  89. package/dist/types/config/base.d.ts +21 -0
  90. package/dist/types/icons/built-in.d.ts +1 -1
  91. package/dist/types/icons/custom.d.ts +3 -0
  92. package/package.json +1 -1
@@ -1,62 +1,65 @@
1
1
  import { AttachmentItemProvider as o, useAttachmentItem as t } from "./attachment-item-provider.js";
2
2
  import { AttachmentsBarProvider as s, useAttachmentsBar as m } from "./attachments-bar-provider.js";
3
- import { BaseEventsProvider as i, useBaseEvents as u } from "./base-events-provider.js";
4
- import { ChatFormProvider as n, useChatForm as f, useChatFormState as h } from "./chat-form-provider.js";
5
- import { InkeepConfigProvider as x, WebWidgetInteractionType as P, useInkeepConfig as b } from "./config-provider.js";
6
- import { FeedbackItemProvider as c, useFeedbackItem as l } from "./feedback-item-provider.js";
7
- import { FeedbackProvider as F, useMessageFeedback as I } from "./feedback-provider.js";
8
- import { FormFieldProvider as k, useFormField as B } from "./form-field-provider.js";
9
- import { HelpMenuProvider as A, useHelpMenu as W, useHelpMenuState as H } from "./help-menu-provider.js";
10
- import { ChatMarkdownProvider as w, useChatMarkdown as E } from "./markdown-provider.js";
11
- import { MessageAttachmentsProvider as y, useMessageAttachments as R } from "./message-attachments-provider.js";
12
- import { MessageProvider as q, useMessage as z, useOptionalMessage as D } from "./message-provider.js";
13
- import { RootProvider as J } from "./root-provider.js";
14
- import { SourceItemProvider as L, useSourceItem as N } from "./source-item-provider.js";
15
- import { ThemeProvider as U } from "./theme-provider.js";
16
- import { WidgetProvider as X, useWidget as Y } from "./widget-provider.js";
17
- import { SidebarChatProvider as _, useInkeepSidebarChat as $, useOptionalSidebarChat as ee, useSidebarChat as re } from "./sidebar-chat-provider.js";
18
- import { ChatBubbleProvider as te, useChatBubble as ae, useInkeepChatBubble as se, useOptionalChatBubble as me } from "./chat-bubble-provider.js";
3
+ import { BaseEventsProvider as d, useBaseEvents as u } from "./base-events-provider.js";
4
+ import { ChatFormProvider as n, useChatForm as h, useChatFormState as f } from "./chat-form-provider.js";
5
+ import { ChatHistoryProvider as x, useChatHistory as P } from "./chat-history-provider.js";
6
+ import { InkeepConfigProvider as C, WebWidgetInteractionType as c, useInkeepConfig as l } from "./config-provider.js";
7
+ import { FeedbackItemProvider as F, useFeedbackItem as I } from "./feedback-item-provider.js";
8
+ import { FeedbackProvider as k, useMessageFeedback as B } from "./feedback-provider.js";
9
+ import { FormFieldProvider as A, useFormField as H } from "./form-field-provider.js";
10
+ import { HelpMenuProvider as y, useHelpMenu as O, useHelpMenuState as w } from "./help-menu-provider.js";
11
+ import { ChatMarkdownProvider as T, useChatMarkdown as R } from "./markdown-provider.js";
12
+ import { MessageAttachmentsProvider as q, useMessageAttachments as z } from "./message-attachments-provider.js";
13
+ import { MessageProvider as G, useMessage as J, useOptionalMessage as K } from "./message-provider.js";
14
+ import { RootProvider as N } from "./root-provider.js";
15
+ import { SourceItemProvider as U, useSourceItem as V } from "./source-item-provider.js";
16
+ import { ThemeProvider as Y } from "./theme-provider.js";
17
+ import { WidgetProvider as _, useWidget as $ } from "./widget-provider.js";
18
+ import { SidebarChatProvider as re, useInkeepSidebarChat as oe, useOptionalSidebarChat as te, useSidebarChat as ae } from "./sidebar-chat-provider.js";
19
+ import { ChatBubbleProvider as me, useChatBubble as ie, useInkeepChatBubble as de, useOptionalChatBubble as ue } from "./chat-bubble-provider.js";
19
20
  export {
20
21
  o as AttachmentItemProvider,
21
22
  s as AttachmentsBarProvider,
22
- i as BaseEventsProvider,
23
- te as ChatBubbleProvider,
23
+ d as BaseEventsProvider,
24
+ me as ChatBubbleProvider,
24
25
  n as ChatFormProvider,
25
- w as ChatMarkdownProvider,
26
- c as FeedbackItemProvider,
27
- F as FeedbackProvider,
28
- k as FormFieldProvider,
29
- A as HelpMenuProvider,
30
- x as InkeepConfigProvider,
31
- y as MessageAttachmentsProvider,
32
- q as MessageProvider,
33
- J as RootProvider,
34
- _ as SidebarChatProvider,
35
- L as SourceItemProvider,
36
- U as ThemeProvider,
37
- P as WebWidgetInteractionType,
38
- X as WidgetProvider,
26
+ x as ChatHistoryProvider,
27
+ T as ChatMarkdownProvider,
28
+ F as FeedbackItemProvider,
29
+ k as FeedbackProvider,
30
+ A as FormFieldProvider,
31
+ y as HelpMenuProvider,
32
+ C as InkeepConfigProvider,
33
+ q as MessageAttachmentsProvider,
34
+ G as MessageProvider,
35
+ N as RootProvider,
36
+ re as SidebarChatProvider,
37
+ U as SourceItemProvider,
38
+ Y as ThemeProvider,
39
+ c as WebWidgetInteractionType,
40
+ _ as WidgetProvider,
39
41
  t as useAttachmentItem,
40
42
  m as useAttachmentsBar,
41
43
  u as useBaseEvents,
42
- ae as useChatBubble,
43
- f as useChatForm,
44
- h as useChatFormState,
45
- E as useChatMarkdown,
46
- l as useFeedbackItem,
47
- B as useFormField,
48
- W as useHelpMenu,
49
- H as useHelpMenuState,
50
- se as useInkeepChatBubble,
51
- b as useInkeepConfig,
52
- $ as useInkeepSidebarChat,
53
- z as useMessage,
54
- R as useMessageAttachments,
55
- I as useMessageFeedback,
56
- me as useOptionalChatBubble,
57
- D as useOptionalMessage,
58
- ee as useOptionalSidebarChat,
59
- re as useSidebarChat,
60
- N as useSourceItem,
61
- Y as useWidget
44
+ ie as useChatBubble,
45
+ h as useChatForm,
46
+ f as useChatFormState,
47
+ P as useChatHistory,
48
+ R as useChatMarkdown,
49
+ I as useFeedbackItem,
50
+ H as useFormField,
51
+ O as useHelpMenu,
52
+ w as useHelpMenuState,
53
+ de as useInkeepChatBubble,
54
+ l as useInkeepConfig,
55
+ oe as useInkeepSidebarChat,
56
+ J as useMessage,
57
+ z as useMessageAttachments,
58
+ B as useMessageFeedback,
59
+ ue as useOptionalChatBubble,
60
+ K as useOptionalMessage,
61
+ te as useOptionalSidebarChat,
62
+ ae as useSidebarChat,
63
+ V as useSourceItem,
64
+ $ as useWidget
62
65
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={icon:"icon",loadingIndicator__Text:"loadingIndicator__Text",loadingIndicator__Dots:"loadingIndicator__Dots",loadingIndicator__Dot:"loadingIndicator__Dot",view_toggle:"view_toggle",view_toggle_button:"view_toggle_button",view_toggle_icon:"view_toggle_icon"},t={codeblockContainer:"codeblockContainer",codeblockHeader:"codeblockHeader",codeblockHeaderLanguage:"codeblockHeaderLanguage",codeblockCopyButton:"codeblockCopyButton",codeblockHighlighterWrapper:"codeblockHighlighterWrapper",codeblockHighlighter:"codeblockHighlighter",codeblockCode:"codeblockCode",markdownH1:"markdownH1",markdownH2:"markdownH2",markdownP:"markdownP",markdownLi:"markdownLi",markdownUl:"markdownUl",markdownOl:"markdownOl",markdownLink:"markdownLink",markdownSourceLink:"markdownSourceLink",markdownTable:"markdownTable",markdownTh:"markdownTh",markdownTd:"markdownTd",markdownCode:"markdownCode",markdownInput:"markdownInput",markdownSup:"markdownSup",markdownImg:"markdownImg",markdownHr:"markdownHr"},e={aiChatWrapper:"aiChatWrapper",aiChatRoot:"aiChatRoot",aiChatHeader:"aiChatHeader",aiChatHeader__Toolbar:"aiChatHeader__Toolbar",aiChatHeader__ToolbarHeader:"aiChatHeader__ToolbarHeader",aiChatHeader__ToolbarHeaderWrapper:"aiChatHeader__ToolbarHeaderWrapper",aiChatContent:"aiChatContent",aiChatContentScrollArea:"aiChatContentScrollArea",aiChatContentScrollArea__Viewport:"aiChatContentScrollArea__Viewport",aiChatContentScrollArea__Scrollbar:"aiChatContentScrollArea__Scrollbar",aiChatContentScrollArea__Thumb:"aiChatContentScrollArea__Thumb",aiChatContentScrollArea__Corner:"aiChatContentScrollArea__Corner",aiChatDisclaimer:"aiChatDisclaimer",aiChatDisclaimerLabel:"aiChatDisclaimerLabel",aiChatDisclaimerTrigger:"aiChatDisclaimerTrigger",aiChatDisclaimerContent:"aiChatDisclaimerContent",aiChatDisclaimerText:"aiChatDisclaimerText",aiChatDisclaimerArrow:"aiChatDisclaimerArrow",aiChatExampleQuestions:"aiChatExampleQuestions",aiChatExampleQuestionsLabel:"aiChatExampleQuestionsLabel",aiChatExampleQuestionsList:"aiChatExampleQuestionsList",aiChatExampleQuestion:"aiChatExampleQuestion",aiChatExampleQuestionButton:"aiChatExampleQuestionButton",aiChatWorkflows:"aiChatWorkflows",aiChatWorkflowsLabel:"aiChatWorkflowsLabel",aiChatWorkflowsList:"aiChatWorkflowsList",aiChatWorkflow:"aiChatWorkflow",aiChatWorkflow__Icon:"aiChatWorkflow__Icon",aiChatMessages:"aiChatMessages",aiChatMessageWrapper:"aiChatMessageWrapper",aiChatMessageHeader:"aiChatMessageHeader",aiChatMessageLoading:"aiChatMessageLoading",aiChatMessageAvatar:"aiChatMessageAvatar",aiChatMessageAvatarFallback:"aiChatMessageAvatarFallback",aiChatMessageAvatarImage:"aiChatMessageAvatarImage",aiChatMessageAvatarContent:"aiChatMessageAvatarContent",aiChatMessageName:"aiChatMessageName",aiChatMessageContentWrapper:"aiChatMessageContentWrapper",aiChatMessageContent:"aiChatMessageContent",aiChatMessageAttachments:"aiChatMessageAttachments",aiChatMessageAttachments__List:"aiChatMessageAttachments__List",aiChatMessageAttachments__Item:"aiChatMessageAttachments__Item",aiChatMessageAttachments__ItemIcon:"aiChatMessageAttachments__ItemIcon",aiChatMessageAttachments__ItemTitle:"aiChatMessageAttachments__ItemTitle",aiChatMessageAttachmentsPreview:"aiChatMessageAttachmentsPreview",aiChatMessageAttachmentsPreview__Overlay:"aiChatMessageAttachmentsPreview__Overlay",aiChatMessageAttachmentsPreview__Content:"aiChatMessageAttachmentsPreview__Content",aiChatMessageAttachmentsPreview__Header:"aiChatMessageAttachmentsPreview__Header",aiChatMessageAttachmentsPreview__Close:"aiChatMessageAttachmentsPreview__Close",aiChatMessageAttachmentsPreview__Body:"aiChatMessageAttachmentsPreview__Body",aiChatMessagePart:"aiChatMessagePart",aiChatMessageToolbar:"aiChatMessageToolbar",aiChatMessageCustomActions:"aiChatMessageCustomActions",aiChatMessageCustomAction:"aiChatMessageCustomAction",aiChatMessageAction:"aiChatMessageAction",aiChatMessageSources:"aiChatMessageSources",aiChatMessageSources__Header:"aiChatMessageSources__Header",aiChatMessageSources__List:"aiChatMessageSources__List",aiChatMessageSourceItem:"aiChatMessageSourceItem",aiChatMessageSourceItem__Icon:"aiChatMessageSourceItem__Icon",aiChatMessageSourceItem__Breadcrumbs:"aiChatMessageSourceItem__Breadcrumbs",aiChatMessageSourceItem__Breadcrumb:"aiChatMessageSourceItem__Breadcrumb",aiChatMessageSourceItem__BreadcrumbIcon:"aiChatMessageSourceItem__BreadcrumbIcon",aiChatMessageSourceItem__Title:"aiChatMessageSourceItem__Title",aiChatMessageSourceItem__Tag:"aiChatMessageSourceItem__Tag",aiChatMessageSourceItem__Description:"aiChatMessageSourceItem__Description",aiChatMessageSourceItem__DescriptionPart:"aiChatMessageSourceItem__DescriptionPart",aiChatMessageSourceItem__Indicator:"aiChatMessageSourceItem__Indicator",aiChatFooter:"aiChatFooter",aiChatInput__Fieldset:"aiChatInput__Fieldset",aiChatInput__Group:"aiChatInput__Group",aiChatInput:"aiChatInput",aiChatInput__SendButton:"aiChatInput__SendButton",aiChatInput__SendButtonIcon:"aiChatInput__SendButtonIcon",aiChatAttachmentsBar:"aiChatAttachmentsBar",aiChatAttachmentsBar__List:"aiChatAttachmentsBar__List",aiChatAttachmentsBar__Attachment:"aiChatAttachmentsBar__Attachment",aiChatAttachmentsBar__AttachmentIcon:"aiChatAttachmentsBar__AttachmentIcon",aiChatAttachmentsBar__AttachmentTitle:"aiChatAttachmentsBar__AttachmentTitle",aiChatAttachmentsBar__AttachmentDelete:"aiChatAttachmentsBar__AttachmentDelete",aiChatAttachmentsBar__Actions:"aiChatAttachmentsBar__Actions",aiChatAttachmentsBar__InfoTip:"aiChatAttachmentsBar__InfoTip",aiChatAttachmentsBar__InfoTipIcon:"aiChatAttachmentsBar__InfoTipIcon",aiChatAttachmentsBar__InfoTipArrow:"aiChatAttachmentsBar__InfoTipArrow",aiChatAttachmentsBar__InfoTipText:"aiChatAttachmentsBar__InfoTipText",aiChatAttachmentsBar__Inputs:"aiChatAttachmentsBar__Inputs",aiChatAttachmentsBar__Input:"aiChatAttachmentsBar__Input",aiChatAttachmentsBar__InputIcon:"aiChatAttachmentsBar__InputIcon",aiChatAttachmentsBar__Modal:"aiChatAttachmentsBar__Modal",aiChatAttachmentsBar__ModalOverlay:"aiChatAttachmentsBar__ModalOverlay",aiChatAttachmentsBar__ModalContent:"aiChatAttachmentsBar__ModalContent",aiChatAttachmentsBar__ModalHeader:"aiChatAttachmentsBar__ModalHeader",aiChatAttachmentsBar__ModalClose:"aiChatAttachmentsBar__ModalClose",aiChatAttachmentsBar__ModalBody:"aiChatAttachmentsBar__ModalBody",aiChatAttachmentsBar__ModalHeading:"aiChatAttachmentsBar__ModalHeading",aiChatAttachmentsBar__ModalDescription:"aiChatAttachmentsBar__ModalDescription",aiChatAttachmentsBar__ModalHelp:"aiChatAttachmentsBar__ModalHelp",aiChatAttachmentsBar__Form:"aiChatAttachmentsBar__Form",aiChatAttachmentsBar__FormTitle:"aiChatAttachmentsBar__FormTitle",aiChatAttachmentsBar__FormTitleLabel:"aiChatAttachmentsBar__FormTitleLabel",aiChatAttachmentsBar__FormTitleInput:"aiChatAttachmentsBar__FormTitleInput",aiChatAttachmentsBar__FormTitleError:"aiChatAttachmentsBar__FormTitleError",aiChatAttachmentsBar__FormContent:"aiChatAttachmentsBar__FormContent",aiChatAttachmentsBar__FormContentLabel:"aiChatAttachmentsBar__FormContentLabel",aiChatAttachmentsBar__FormContentInput:"aiChatAttachmentsBar__FormContentInput",aiChatAttachmentsBar__FormContentError:"aiChatAttachmentsBar__FormContentError",aiChatAttachmentsBar__FormSubmitButton:"aiChatAttachmentsBar__FormSubmitButton",aiChatActionBar:"aiChatActionBar",aiChat__ChatActions:"aiChat__ChatActions",aiChat__ChatAction:"aiChat__ChatAction",aiChat__ChatActionLabel:"aiChat__ChatActionLabel",aiChat__ChatActionFeeback:"aiChat__ChatActionFeeback",aiChatHelpActions:"aiChatHelpActions",aiChatHelpAction:"aiChatHelpAction",aiChatHelpActions__Trigger:"aiChatHelpActions__Trigger",aiChatHelpActions__Menu:"aiChatHelpActions__Menu",aiChatHelpActions__MenuArrow:"aiChatHelpActions__MenuArrow",aiChatHelpActions__MenuItem:"aiChatHelpActions__MenuItem",aiChatHelpActions_MenuItemIcon:"aiChatHelpActions_MenuItemIcon",aiChatTagline__Container:"aiChatTagline__Container",aiChatTagline__Text:"aiChatTagline__Text",aiChatTagline__Logo:"aiChatTagline__Logo",aiChatTagline__BrandName:"aiChatTagline__BrandName",aiChatFeedbackModal:"aiChatFeedbackModal",aiChatFeedbackModal__Overlay:"aiChatFeedbackModal__Overlay",aiChatFeedbackModal__Content:"aiChatFeedbackModal__Content",aiChatFeedbackModal__Header:"aiChatFeedbackModal__Header",aiChatFeedbackModal__Close:"aiChatFeedbackModal__Close",aiChatFeedbackModal__Body:"aiChatFeedbackModal__Body",aiChatFeedbackForm:"aiChatFeedbackForm",aiChatFeedbackItem:"aiChatFeedbackItem",aiChatFeedbackItem__Checkbox:"aiChatFeedbackItem__Checkbox",aiChatFeedbackItem__CheckboxIndicator:"aiChatFeedbackItem__CheckboxIndicator",aiChatFeedbackItem__Label:"aiChatFeedbackItem__Label",aiChatFeedbackItem__Description:"aiChatFeedbackItem__Description",aiChatFeedbackForm__SubmitButton:"aiChatFeedbackForm__SubmitButton",aiChatForm__Wrapper:"aiChatForm__Wrapper",aiChatForm:"aiChatForm",aiChatForm__Close:"aiChatForm__Close",aiChatForm__Header:"aiChatForm__Header",aiChatForm__Heading:"aiChatForm__Heading",aiChatForm__Description:"aiChatForm__Description",aiChatForm__Content:"aiChatForm__Content",aiChatForm__Field:"aiChatForm__Field",aiChatForm__FieldLabel:"aiChatForm__FieldLabel",aiChatForm__FieldText:"aiChatForm__FieldText",aiChatForm__FieldEmail:"aiChatForm__FieldEmail",aiChatForm__FieldFile:"aiChatForm__FieldFile",aiChatForm__FieldTextArea:"aiChatForm__FieldTextArea",aiChatForm__FieldCheckbox:"aiChatForm__FieldCheckbox",aiChatForm__FieldCheckboxIndicator:"aiChatForm__FieldCheckboxIndicator",aiChatForm__FieldSelect:"aiChatForm__FieldSelect",aiChatForm__FieldSelect__Trigger:"aiChatForm__FieldSelect__Trigger",aiChatForm__FieldSelect__Value:"aiChatForm__FieldSelect__Value",aiChatForm__FieldSelect__Icon:"aiChatForm__FieldSelect__Icon",aiChatForm__FieldSelect__Content:"aiChatForm__FieldSelect__Content",aiChatForm__FieldSelect__Viewport:"aiChatForm__FieldSelect__Viewport",aiChatForm__FieldSelect__Item:"aiChatForm__FieldSelect__Item",aiChatForm__FieldSelect__ItemIndicator:"aiChatForm__FieldSelect__ItemIndicator",aiChatForm__FieldSelect__ItemText:"aiChatForm__FieldSelect__ItemText",aiChatForm__FieldCombobox__Control:"aiChatForm__FieldCombobox__Control",aiChatForm__FieldCombobox__Positioner:"aiChatForm__FieldCombobox__Positioner",aiChatForm__FieldCombobox__Input:"aiChatForm__FieldCombobox__Input",aiChatForm__FieldCombobox__Trigger:"aiChatForm__FieldCombobox__Trigger",aiChatForm__FieldCombobox__SelectedTags:"aiChatForm__FieldCombobox__SelectedTags",aiChatForm__FieldCombobox__Content:"aiChatForm__FieldCombobox__Content",aiChatForm__FieldCombobox__List:"aiChatForm__FieldCombobox__List",aiChatForm__FieldCombobox__ListEmpty:"aiChatForm__FieldCombobox__ListEmpty",aiChatForm__FieldCombobox__Item:"aiChatForm__FieldCombobox__Item",aiChatForm__FieldCombobox__ItemText:"aiChatForm__FieldCombobox__ItemText",aiChatForm__FieldCombobox__ItemIndicator:"aiChatForm__FieldCombobox__ItemIndicator",aiChatForm__FieldDescription:"aiChatForm__FieldDescription",aiChatForm__FieldError:"aiChatForm__FieldError",aiChatForm__Error:"aiChatForm__Error",aiChatForm__Footer:"aiChatForm__Footer",aiChatForm__Cancel:"aiChatForm__Cancel",aiChatForm__Submit:"aiChatForm__Submit",aiChatForm__Success:"aiChatForm__Success",aiChatForm__SuccessHeading:"aiChatForm__SuccessHeading",aiChatForm__SuccessMessage:"aiChatForm__SuccessMessage",aiChatForm__SuccessButton:"aiChatForm__SuccessButton",aiChatLink:"aiChatLink"},_={aiSearchWrapper:"aiSearchWrapper",aiSearchRoot:"aiSearchRoot",aiSearchContent:"aiSearchContent",aiSearchInputGroup:"aiSearchInputGroup",aiSearchInputIcon:"aiSearchInputIcon",aiSearchInput:"aiSearchInput",aiSearchLoading:"aiSearchLoading",aiAskAITrigger:"aiAskAITrigger",aiAskAITrigger__Icon:"aiAskAITrigger__Icon",aiAskAITrigger__Label:"aiAskAITrigger__Label",aiAskAITrigger__Query:"aiAskAITrigger__Query",aiAskAITrigger__Indicator:"aiAskAITrigger__Indicator",aiAskAITrigger__IndicatorText:"aiAskAITrigger__IndicatorText",aiSearchResults:"aiSearchResults",aiSearchResults__Loading:"aiSearchResults__Loading",aiSearchResults__Empty:"aiSearchResults__Empty",aiSearchResults__TabList:"aiSearchResults__TabList",aiSearchResults__Tab:"aiSearchResults__Tab",aiSearchResults__Content:"aiSearchResults__Content",aiSearchResults__ScrollArea:"aiSearchResults__ScrollArea",aiSearchResults__ScrollAreaViewport:"aiSearchResults__ScrollAreaViewport",aiSearchResults__List:"aiSearchResults__List",aiSearchResults__Item:"aiSearchResults__Item",aiSearchResults__ItemIcon:"aiSearchResults__ItemIcon",aiSearchResults__ItemBreadcrumbs:"aiSearchResults__ItemBreadcrumbs",aiSearchResults__ItemBreadcrumbIcon:"aiSearchResults__ItemBreadcrumbIcon",aiSearchResults__ItemTitle:"aiSearchResults__ItemTitle",aiSearchResults__ItemTag:"aiSearchResults__ItemTag",aiSearchResults__ItemDescription:"aiSearchResults__ItemDescription",aiSearchResults__ItemDescriptionPart:"aiSearchResults__ItemDescriptionPart",aiSearchResults__ItemIndicator:"aiSearchResults__ItemIndicator",aiSearchResults__ItemPreview:"aiSearchResults__ItemPreview",aiSearchResults__ItemPreview__Header:"aiSearchResults__ItemPreview__Header",aiSearchResults__ItemPreview__Heading:"aiSearchResults__ItemPreview__Heading",aiSearchResults__ItemPreview__Title:"aiSearchResults__ItemPreview__Title",aiSearchResults__ItemPreview__Title__LinkIcon:"aiSearchResults__ItemPreview__Title__LinkIcon",aiSearchResults__ItemPreview__Breadcrumbs:"aiSearchResults__ItemPreview__Breadcrumbs",aiSearchResults__ItemPreview__BreadcrumbIcon:"aiSearchResults__ItemPreview__BreadcrumbIcon",aiSearchResults__ItemPreview__Body:"aiSearchResults__ItemPreview__Body",aiSearchResults__ItemPreview__Outline:"aiSearchResults__ItemPreview__Outline",aiSearchResults__ItemPreview__Outline__Title:"aiSearchResults__ItemPreview__Outline__Title",aiSearchResults__ItemPreview__Outline__List:"aiSearchResults__ItemPreview__Outline__List",aiSearchResults__ItemPreview__Outline__Item:"aiSearchResults__ItemPreview__Outline__Item",aiSearchResults__ItemPreview__Outline__ItemIcon:"aiSearchResults__ItemPreview__Outline__ItemIcon",aiSearchResults__ItemPreview__Outline__ItemText:"aiSearchResults__ItemPreview__Outline__ItemText",aiSearchResults__ItemPreview__Outline__ItemLinkIcon:"aiSearchResults__ItemPreview__Outline__ItemLinkIcon",aiSearchResults__ScrollAreaScrollbar:"aiSearchResults__ScrollAreaScrollbar",aiSearchResults__ScrollAreaThumb:"aiSearchResults__ScrollAreaThumb",aiSearchResults__ScrollAreaCorner:"aiSearchResults__ScrollAreaCorner",aiSearchFooter:"aiSearchFooter",aiSearchTagline__Container:"aiSearchTagline__Container",aiSearchTagline__Text:"aiSearchTagline__Text",aiSearchTagline__Logo:"aiSearchTagline__Logo",aiSearchTagline__BrandName:"aiSearchTagline__BrandName"},i={modal:"modal",modal__Overlay:"modal__Overlay",modal__Content:"modal__Content",modal__Close:"modal__Close"},r={chatButton__Text:"chatButton__Text",chatButton__Button:"chatButton__Button",chatButton__Container:"chatButton__Container",chatButton__AvatarImage:"chatButton__AvatarImage",chatButton__AvatarContent:"chatButton__AvatarContent",chatButton__CloseIcon:"chatButton__CloseIcon"},o={searchBar__Container:"searchBar__Container",searchBar__Button:"searchBar__Button",searchBar__ContentWrapper:"searchBar__ContentWrapper",searchBar__Text:"searchBar__Text",searchBar__Icon:"searchBar__Icon",searchBar__KbdWrapper:"searchBar__KbdWrapper",searchBar__CmdIcon:"searchBar__CmdIcon",searchBar__Ctrl:"searchBar__Ctrl",searchBar__KbdShortcutKey:"searchBar__KbdShortcutKey"},h={sidebarChat__Root:"sidebarChat__Root",sidebarChat__Resizer:"sidebarChat__Resizer",sidebarChat__CloseButton:"sidebarChat__CloseButton",sidebarChat__Header:"sidebarChat__Header"},s={chatBubble__Root:"chatBubble__Root",chatBubble__CloseButton:"chatBubble__CloseButton",chatBubble__Header:"chatBubble__Header"},n={dataSummary__Group:"dataSummary__Group",dataSummary__Toggle:"dataSummary__Toggle",dataSummary__ToggleText:"dataSummary__ToggleText",dataSummary__Collapsible:"dataSummary__Collapsible",dataSummary__List:"dataSummary__List",dataSummary__Item:"dataSummary__Item",dataSummary__Connector:"dataSummary__Connector",dataSummary__IconContainer:"dataSummary__IconContainer",dataSummary__Content:"dataSummary__Content",dataSummary__Details:"dataSummary__Details",dataSummary__Label:"dataSummary__Label"},c={...t,...e,..._,...i,...r,...o,...a,...h,...s,...n};exports.ChatBubbleComponentIds=s;exports.DataSummaryComponentIds=n;exports.SearchBarComponentIds=o;exports.SidebarChatComponentIds=h;exports.aiChatComponentIds=e;exports.aiSearchComponentIds=_;exports.chatButtonComponentIds=r;exports.componentIDs=c;exports.markDownComponentIds=t;exports.miscellanousComponentIds=a;exports.modalComponentIds=i;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={icon:"icon",loadingIndicator__Text:"loadingIndicator__Text",loadingIndicator__Dots:"loadingIndicator__Dots",loadingIndicator__Dot:"loadingIndicator__Dot",view_toggle:"view_toggle",view_toggle_button:"view_toggle_button",view_toggle_icon:"view_toggle_icon"},t={codeblockContainer:"codeblockContainer",codeblockHeader:"codeblockHeader",codeblockHeaderLanguage:"codeblockHeaderLanguage",codeblockCopyButton:"codeblockCopyButton",codeblockHighlighterWrapper:"codeblockHighlighterWrapper",codeblockHighlighter:"codeblockHighlighter",codeblockCode:"codeblockCode",markdownH1:"markdownH1",markdownH2:"markdownH2",markdownP:"markdownP",markdownLi:"markdownLi",markdownUl:"markdownUl",markdownOl:"markdownOl",markdownLink:"markdownLink",markdownSourceLink:"markdownSourceLink",markdownTable:"markdownTable",markdownTh:"markdownTh",markdownTd:"markdownTd",markdownCode:"markdownCode",markdownInput:"markdownInput",markdownSup:"markdownSup",markdownImg:"markdownImg",markdownHr:"markdownHr"},e={aiChatWrapper:"aiChatWrapper",aiChatRoot:"aiChatRoot",aiChatHeader:"aiChatHeader",aiChatHeader__Toolbar:"aiChatHeader__Toolbar",aiChatHeader__ToolbarHeader:"aiChatHeader__ToolbarHeader",aiChatHeader__ToolbarHeaderWrapper:"aiChatHeader__ToolbarHeaderWrapper",aiChatHeader__ChatHistoryButtonIcon:"aiChatHeader__ChatHistoryButtonIcon",aiChatHeader__ChatHistoryButton:"aiChatHeader__ChatHistoryButton",aiChatContent:"aiChatContent",aiChatContentScrollArea:"aiChatContentScrollArea",aiChatContentScrollArea__Viewport:"aiChatContentScrollArea__Viewport",aiChatContentScrollArea__Scrollbar:"aiChatContentScrollArea__Scrollbar",aiChatContentScrollArea__Thumb:"aiChatContentScrollArea__Thumb",aiChatContentScrollArea__Corner:"aiChatContentScrollArea__Corner",aiChatDisclaimer:"aiChatDisclaimer",aiChatDisclaimerLabel:"aiChatDisclaimerLabel",aiChatDisclaimerTrigger:"aiChatDisclaimerTrigger",aiChatDisclaimerContent:"aiChatDisclaimerContent",aiChatDisclaimerText:"aiChatDisclaimerText",aiChatDisclaimerArrow:"aiChatDisclaimerArrow",aiChatExampleQuestions:"aiChatExampleQuestions",aiChatExampleQuestionsLabel:"aiChatExampleQuestionsLabel",aiChatExampleQuestionsList:"aiChatExampleQuestionsList",aiChatExampleQuestion:"aiChatExampleQuestion",aiChatExampleQuestionButton:"aiChatExampleQuestionButton",aiChatWorkflows:"aiChatWorkflows",aiChatWorkflowsLabel:"aiChatWorkflowsLabel",aiChatWorkflowsList:"aiChatWorkflowsList",aiChatWorkflow:"aiChatWorkflow",aiChatWorkflow__Icon:"aiChatWorkflow__Icon",aiChatMessages:"aiChatMessages",aiChatMessageWrapper:"aiChatMessageWrapper",aiChatMessageHeader:"aiChatMessageHeader",aiChatMessageLoading:"aiChatMessageLoading",aiChatMessageAvatar:"aiChatMessageAvatar",aiChatMessageAvatarFallback:"aiChatMessageAvatarFallback",aiChatMessageAvatarImage:"aiChatMessageAvatarImage",aiChatMessageAvatarContent:"aiChatMessageAvatarContent",aiChatMessageName:"aiChatMessageName",aiChatMessageContentWrapper:"aiChatMessageContentWrapper",aiChatMessageContent:"aiChatMessageContent",aiChatMessageAttachments:"aiChatMessageAttachments",aiChatMessageAttachments__List:"aiChatMessageAttachments__List",aiChatMessageAttachments__Item:"aiChatMessageAttachments__Item",aiChatMessageAttachments__ItemIcon:"aiChatMessageAttachments__ItemIcon",aiChatMessageAttachments__ItemTitle:"aiChatMessageAttachments__ItemTitle",aiChatMessageAttachmentsPreview:"aiChatMessageAttachmentsPreview",aiChatMessageAttachmentsPreview__Overlay:"aiChatMessageAttachmentsPreview__Overlay",aiChatMessageAttachmentsPreview__Content:"aiChatMessageAttachmentsPreview__Content",aiChatMessageAttachmentsPreview__Header:"aiChatMessageAttachmentsPreview__Header",aiChatMessageAttachmentsPreview__Close:"aiChatMessageAttachmentsPreview__Close",aiChatMessageAttachmentsPreview__Body:"aiChatMessageAttachmentsPreview__Body",aiChatMessagePart:"aiChatMessagePart",aiChatMessageToolbar:"aiChatMessageToolbar",aiChatMessageCustomActions:"aiChatMessageCustomActions",aiChatMessageCustomAction:"aiChatMessageCustomAction",aiChatMessageAction:"aiChatMessageAction",aiChatMessageSources:"aiChatMessageSources",aiChatMessageSources__Header:"aiChatMessageSources__Header",aiChatMessageSources__List:"aiChatMessageSources__List",aiChatMessageSourceItem:"aiChatMessageSourceItem",aiChatMessageSourceItem__Icon:"aiChatMessageSourceItem__Icon",aiChatMessageSourceItem__Breadcrumbs:"aiChatMessageSourceItem__Breadcrumbs",aiChatMessageSourceItem__Breadcrumb:"aiChatMessageSourceItem__Breadcrumb",aiChatMessageSourceItem__BreadcrumbIcon:"aiChatMessageSourceItem__BreadcrumbIcon",aiChatMessageSourceItem__Title:"aiChatMessageSourceItem__Title",aiChatMessageSourceItem__Tag:"aiChatMessageSourceItem__Tag",aiChatMessageSourceItem__Description:"aiChatMessageSourceItem__Description",aiChatMessageSourceItem__DescriptionPart:"aiChatMessageSourceItem__DescriptionPart",aiChatMessageSourceItem__Indicator:"aiChatMessageSourceItem__Indicator",aiChatFooter:"aiChatFooter",aiChatInput__Fieldset:"aiChatInput__Fieldset",aiChatInput__Group:"aiChatInput__Group",aiChatInput:"aiChatInput",aiChatInput__SendButton:"aiChatInput__SendButton",aiChatInput__SendButtonIcon:"aiChatInput__SendButtonIcon",aiChatAttachmentsBar:"aiChatAttachmentsBar",aiChatAttachmentsBar__List:"aiChatAttachmentsBar__List",aiChatAttachmentsBar__Attachment:"aiChatAttachmentsBar__Attachment",aiChatAttachmentsBar__AttachmentIcon:"aiChatAttachmentsBar__AttachmentIcon",aiChatAttachmentsBar__AttachmentTitle:"aiChatAttachmentsBar__AttachmentTitle",aiChatAttachmentsBar__AttachmentDelete:"aiChatAttachmentsBar__AttachmentDelete",aiChatAttachmentsBar__Actions:"aiChatAttachmentsBar__Actions",aiChatAttachmentsBar__InfoTip:"aiChatAttachmentsBar__InfoTip",aiChatAttachmentsBar__InfoTipIcon:"aiChatAttachmentsBar__InfoTipIcon",aiChatAttachmentsBar__InfoTipArrow:"aiChatAttachmentsBar__InfoTipArrow",aiChatAttachmentsBar__InfoTipText:"aiChatAttachmentsBar__InfoTipText",aiChatAttachmentsBar__Inputs:"aiChatAttachmentsBar__Inputs",aiChatAttachmentsBar__Input:"aiChatAttachmentsBar__Input",aiChatAttachmentsBar__InputIcon:"aiChatAttachmentsBar__InputIcon",aiChatAttachmentsBar__Modal:"aiChatAttachmentsBar__Modal",aiChatAttachmentsBar__ModalOverlay:"aiChatAttachmentsBar__ModalOverlay",aiChatAttachmentsBar__ModalContent:"aiChatAttachmentsBar__ModalContent",aiChatAttachmentsBar__ModalHeader:"aiChatAttachmentsBar__ModalHeader",aiChatAttachmentsBar__ModalClose:"aiChatAttachmentsBar__ModalClose",aiChatAttachmentsBar__ModalBody:"aiChatAttachmentsBar__ModalBody",aiChatAttachmentsBar__ModalHeading:"aiChatAttachmentsBar__ModalHeading",aiChatAttachmentsBar__ModalDescription:"aiChatAttachmentsBar__ModalDescription",aiChatAttachmentsBar__ModalHelp:"aiChatAttachmentsBar__ModalHelp",aiChatAttachmentsBar__Form:"aiChatAttachmentsBar__Form",aiChatAttachmentsBar__FormTitle:"aiChatAttachmentsBar__FormTitle",aiChatAttachmentsBar__FormTitleLabel:"aiChatAttachmentsBar__FormTitleLabel",aiChatAttachmentsBar__FormTitleInput:"aiChatAttachmentsBar__FormTitleInput",aiChatAttachmentsBar__FormTitleError:"aiChatAttachmentsBar__FormTitleError",aiChatAttachmentsBar__FormContent:"aiChatAttachmentsBar__FormContent",aiChatAttachmentsBar__FormContentLabel:"aiChatAttachmentsBar__FormContentLabel",aiChatAttachmentsBar__FormContentInput:"aiChatAttachmentsBar__FormContentInput",aiChatAttachmentsBar__FormContentError:"aiChatAttachmentsBar__FormContentError",aiChatAttachmentsBar__FormSubmitButton:"aiChatAttachmentsBar__FormSubmitButton",aiChatActionBar:"aiChatActionBar",aiChat__ChatActions:"aiChat__ChatActions",aiChat__ChatAction:"aiChat__ChatAction",aiChat__ChatActionLabel:"aiChat__ChatActionLabel",aiChat__ChatActionFeeback:"aiChat__ChatActionFeeback",aiChatHelpActions:"aiChatHelpActions",aiChatHelpAction:"aiChatHelpAction",aiChatHelpActions__Trigger:"aiChatHelpActions__Trigger",aiChatHelpActions__Menu:"aiChatHelpActions__Menu",aiChatHelpActions__MenuArrow:"aiChatHelpActions__MenuArrow",aiChatHelpActions__MenuItem:"aiChatHelpActions__MenuItem",aiChatHelpActions_MenuItemIcon:"aiChatHelpActions_MenuItemIcon",aiChatTagline__Container:"aiChatTagline__Container",aiChatTagline__Text:"aiChatTagline__Text",aiChatTagline__Logo:"aiChatTagline__Logo",aiChatTagline__BrandName:"aiChatTagline__BrandName",aiChatFeedbackModal:"aiChatFeedbackModal",aiChatFeedbackModal__Overlay:"aiChatFeedbackModal__Overlay",aiChatFeedbackModal__Content:"aiChatFeedbackModal__Content",aiChatFeedbackModal__Header:"aiChatFeedbackModal__Header",aiChatFeedbackModal__Close:"aiChatFeedbackModal__Close",aiChatFeedbackModal__Body:"aiChatFeedbackModal__Body",aiChatFeedbackForm:"aiChatFeedbackForm",aiChatFeedbackItem:"aiChatFeedbackItem",aiChatFeedbackItem__Checkbox:"aiChatFeedbackItem__Checkbox",aiChatFeedbackItem__CheckboxIndicator:"aiChatFeedbackItem__CheckboxIndicator",aiChatFeedbackItem__Label:"aiChatFeedbackItem__Label",aiChatFeedbackItem__Description:"aiChatFeedbackItem__Description",aiChatFeedbackForm__SubmitButton:"aiChatFeedbackForm__SubmitButton",aiChatForm__Wrapper:"aiChatForm__Wrapper",aiChatForm:"aiChatForm",aiChatForm__Close:"aiChatForm__Close",aiChatForm__Header:"aiChatForm__Header",aiChatForm__Heading:"aiChatForm__Heading",aiChatForm__Description:"aiChatForm__Description",aiChatForm__Content:"aiChatForm__Content",aiChatForm__Field:"aiChatForm__Field",aiChatForm__FieldLabel:"aiChatForm__FieldLabel",aiChatForm__FieldText:"aiChatForm__FieldText",aiChatForm__FieldEmail:"aiChatForm__FieldEmail",aiChatForm__FieldFile:"aiChatForm__FieldFile",aiChatForm__FieldTextArea:"aiChatForm__FieldTextArea",aiChatForm__FieldCheckbox:"aiChatForm__FieldCheckbox",aiChatForm__FieldCheckboxIndicator:"aiChatForm__FieldCheckboxIndicator",aiChatForm__FieldSelect:"aiChatForm__FieldSelect",aiChatForm__FieldSelect__Trigger:"aiChatForm__FieldSelect__Trigger",aiChatForm__FieldSelect__Value:"aiChatForm__FieldSelect__Value",aiChatForm__FieldSelect__Icon:"aiChatForm__FieldSelect__Icon",aiChatForm__FieldSelect__Content:"aiChatForm__FieldSelect__Content",aiChatForm__FieldSelect__Viewport:"aiChatForm__FieldSelect__Viewport",aiChatForm__FieldSelect__Item:"aiChatForm__FieldSelect__Item",aiChatForm__FieldSelect__ItemIndicator:"aiChatForm__FieldSelect__ItemIndicator",aiChatForm__FieldSelect__ItemText:"aiChatForm__FieldSelect__ItemText",aiChatForm__FieldCombobox__Control:"aiChatForm__FieldCombobox__Control",aiChatForm__FieldCombobox__Positioner:"aiChatForm__FieldCombobox__Positioner",aiChatForm__FieldCombobox__Input:"aiChatForm__FieldCombobox__Input",aiChatForm__FieldCombobox__Trigger:"aiChatForm__FieldCombobox__Trigger",aiChatForm__FieldCombobox__SelectedTags:"aiChatForm__FieldCombobox__SelectedTags",aiChatForm__FieldCombobox__Content:"aiChatForm__FieldCombobox__Content",aiChatForm__FieldCombobox__List:"aiChatForm__FieldCombobox__List",aiChatForm__FieldCombobox__ListEmpty:"aiChatForm__FieldCombobox__ListEmpty",aiChatForm__FieldCombobox__Item:"aiChatForm__FieldCombobox__Item",aiChatForm__FieldCombobox__ItemText:"aiChatForm__FieldCombobox__ItemText",aiChatForm__FieldCombobox__ItemIndicator:"aiChatForm__FieldCombobox__ItemIndicator",aiChatForm__FieldDescription:"aiChatForm__FieldDescription",aiChatForm__FieldError:"aiChatForm__FieldError",aiChatForm__Error:"aiChatForm__Error",aiChatForm__Footer:"aiChatForm__Footer",aiChatForm__Cancel:"aiChatForm__Cancel",aiChatForm__Submit:"aiChatForm__Submit",aiChatForm__Success:"aiChatForm__Success",aiChatForm__SuccessHeading:"aiChatForm__SuccessHeading",aiChatForm__SuccessMessage:"aiChatForm__SuccessMessage",aiChatForm__SuccessButton:"aiChatForm__SuccessButton",aiChatLink:"aiChatLink"},_={aiSearchWrapper:"aiSearchWrapper",aiSearchRoot:"aiSearchRoot",aiSearchContent:"aiSearchContent",aiSearchInputGroup:"aiSearchInputGroup",aiSearchInputIcon:"aiSearchInputIcon",aiSearchInput:"aiSearchInput",aiSearchLoading:"aiSearchLoading",aiAskAITrigger:"aiAskAITrigger",aiAskAITrigger__Icon:"aiAskAITrigger__Icon",aiAskAITrigger__Label:"aiAskAITrigger__Label",aiAskAITrigger__Query:"aiAskAITrigger__Query",aiAskAITrigger__Indicator:"aiAskAITrigger__Indicator",aiAskAITrigger__IndicatorText:"aiAskAITrigger__IndicatorText",aiSearchResults:"aiSearchResults",aiSearchResults__Loading:"aiSearchResults__Loading",aiSearchResults__Empty:"aiSearchResults__Empty",aiSearchResults__TabList:"aiSearchResults__TabList",aiSearchResults__Tab:"aiSearchResults__Tab",aiSearchResults__Content:"aiSearchResults__Content",aiSearchResults__ScrollArea:"aiSearchResults__ScrollArea",aiSearchResults__ScrollAreaViewport:"aiSearchResults__ScrollAreaViewport",aiSearchResults__List:"aiSearchResults__List",aiSearchResults__Item:"aiSearchResults__Item",aiSearchResults__ItemIcon:"aiSearchResults__ItemIcon",aiSearchResults__ItemBreadcrumbs:"aiSearchResults__ItemBreadcrumbs",aiSearchResults__ItemBreadcrumbIcon:"aiSearchResults__ItemBreadcrumbIcon",aiSearchResults__ItemTitle:"aiSearchResults__ItemTitle",aiSearchResults__ItemTag:"aiSearchResults__ItemTag",aiSearchResults__ItemDescription:"aiSearchResults__ItemDescription",aiSearchResults__ItemDescriptionPart:"aiSearchResults__ItemDescriptionPart",aiSearchResults__ItemIndicator:"aiSearchResults__ItemIndicator",aiSearchResults__ItemPreview:"aiSearchResults__ItemPreview",aiSearchResults__ItemPreview__Header:"aiSearchResults__ItemPreview__Header",aiSearchResults__ItemPreview__Heading:"aiSearchResults__ItemPreview__Heading",aiSearchResults__ItemPreview__Title:"aiSearchResults__ItemPreview__Title",aiSearchResults__ItemPreview__Title__LinkIcon:"aiSearchResults__ItemPreview__Title__LinkIcon",aiSearchResults__ItemPreview__Breadcrumbs:"aiSearchResults__ItemPreview__Breadcrumbs",aiSearchResults__ItemPreview__BreadcrumbIcon:"aiSearchResults__ItemPreview__BreadcrumbIcon",aiSearchResults__ItemPreview__Body:"aiSearchResults__ItemPreview__Body",aiSearchResults__ItemPreview__Outline:"aiSearchResults__ItemPreview__Outline",aiSearchResults__ItemPreview__Outline__Title:"aiSearchResults__ItemPreview__Outline__Title",aiSearchResults__ItemPreview__Outline__List:"aiSearchResults__ItemPreview__Outline__List",aiSearchResults__ItemPreview__Outline__Item:"aiSearchResults__ItemPreview__Outline__Item",aiSearchResults__ItemPreview__Outline__ItemIcon:"aiSearchResults__ItemPreview__Outline__ItemIcon",aiSearchResults__ItemPreview__Outline__ItemText:"aiSearchResults__ItemPreview__Outline__ItemText",aiSearchResults__ItemPreview__Outline__ItemLinkIcon:"aiSearchResults__ItemPreview__Outline__ItemLinkIcon",aiSearchResults__ScrollAreaScrollbar:"aiSearchResults__ScrollAreaScrollbar",aiSearchResults__ScrollAreaThumb:"aiSearchResults__ScrollAreaThumb",aiSearchResults__ScrollAreaCorner:"aiSearchResults__ScrollAreaCorner",aiSearchFooter:"aiSearchFooter",aiSearchTagline__Container:"aiSearchTagline__Container",aiSearchTagline__Text:"aiSearchTagline__Text",aiSearchTagline__Logo:"aiSearchTagline__Logo",aiSearchTagline__BrandName:"aiSearchTagline__BrandName"},i={modal:"modal",modal__Overlay:"modal__Overlay",modal__Content:"modal__Content",modal__Close:"modal__Close"},r={chatButton__Text:"chatButton__Text",chatButton__Button:"chatButton__Button",chatButton__Container:"chatButton__Container",chatButton__AvatarImage:"chatButton__AvatarImage",chatButton__AvatarContent:"chatButton__AvatarContent",chatButton__CloseIcon:"chatButton__CloseIcon"},o={searchBar__Container:"searchBar__Container",searchBar__Button:"searchBar__Button",searchBar__ContentWrapper:"searchBar__ContentWrapper",searchBar__Text:"searchBar__Text",searchBar__Icon:"searchBar__Icon",searchBar__KbdWrapper:"searchBar__KbdWrapper",searchBar__CmdIcon:"searchBar__CmdIcon",searchBar__Ctrl:"searchBar__Ctrl",searchBar__KbdShortcutKey:"searchBar__KbdShortcutKey"},h={sidebarChat__Root:"sidebarChat__Root",sidebarChat__Resizer:"sidebarChat__Resizer",sidebarChat__CloseButton:"sidebarChat__CloseButton",sidebarChat__Header:"sidebarChat__Header"},s={chatBubble__Root:"chatBubble__Root",chatBubble__CloseButton:"chatBubble__CloseButton",chatBubble__Header:"chatBubble__Header"},n={dataSummary__Group:"dataSummary__Group",dataSummary__Toggle:"dataSummary__Toggle",dataSummary__ToggleText:"dataSummary__ToggleText",dataSummary__Collapsible:"dataSummary__Collapsible",dataSummary__List:"dataSummary__List",dataSummary__Item:"dataSummary__Item",dataSummary__Connector:"dataSummary__Connector",dataSummary__IconContainer:"dataSummary__IconContainer",dataSummary__Content:"dataSummary__Content",dataSummary__Details:"dataSummary__Details",dataSummary__Label:"dataSummary__Label"},C={aiChatHistory:"aiChatHistory",aiChatHistory__Header:"aiChatHistory__Header",aiChatHistory__BackButton:"aiChatHistory__BackButton",aiChatHistory__BackButtonIcon:"aiChatHistory__BackButtonIcon",aiChatHistory__Title:"aiChatHistory__Title",aiChatHistory__List:"aiChatHistory__List",aiChatHistory__Item:"aiChatHistory__Item",aiChatHistory__ItemTitle:"aiChatHistory__ItemTitle",aiChatHistory__ItemDate:"aiChatHistory__ItemDate",aiChatHistory__EmptyState:"aiChatHistory__EmptyState",aiChatHistory__LoadingState:"aiChatHistory__LoadingState",aiChatHistory__Footer:"aiChatHistory__Footer",aiChatHistory__NewConversationButton:"aiChatHistory__NewConversationButton"},c={...t,...e,..._,...i,...r,...o,...a,...h,...s,...n,...C};exports.ChatBubbleComponentIds=s;exports.DataSummaryComponentIds=n;exports.SearchBarComponentIds=o;exports.SidebarChatComponentIds=h;exports.aiChatComponentIds=e;exports.aiChatHistoryComponentIds=C;exports.aiSearchComponentIds=_;exports.chatButtonComponentIds=r;exports.componentIDs=c;exports.markDownComponentIds=t;exports.miscellanousComponentIds=a;exports.modalComponentIds=i;
@@ -39,6 +39,8 @@ export declare const aiChatComponentIds: {
39
39
  aiChatHeader__Toolbar: "aiChatHeader__Toolbar";
40
40
  aiChatHeader__ToolbarHeader: "aiChatHeader__ToolbarHeader";
41
41
  aiChatHeader__ToolbarHeaderWrapper: "aiChatHeader__ToolbarHeaderWrapper";
42
+ aiChatHeader__ChatHistoryButtonIcon: "aiChatHeader__ChatHistoryButtonIcon";
43
+ aiChatHeader__ChatHistoryButton: "aiChatHeader__ChatHistoryButton";
42
44
  aiChatContent: "aiChatContent";
43
45
  aiChatContentScrollArea: "aiChatContentScrollArea";
44
46
  aiChatContentScrollArea__Viewport: "aiChatContentScrollArea__Viewport";
@@ -321,7 +323,35 @@ export declare const DataSummaryComponentIds: {
321
323
  dataSummary__Details: "dataSummary__Details";
322
324
  dataSummary__Label: "dataSummary__Label";
323
325
  };
326
+ export declare const aiChatHistoryComponentIds: {
327
+ aiChatHistory: "aiChatHistory";
328
+ aiChatHistory__Header: "aiChatHistory__Header";
329
+ aiChatHistory__BackButton: "aiChatHistory__BackButton";
330
+ aiChatHistory__BackButtonIcon: "aiChatHistory__BackButtonIcon";
331
+ aiChatHistory__Title: "aiChatHistory__Title";
332
+ aiChatHistory__List: "aiChatHistory__List";
333
+ aiChatHistory__Item: "aiChatHistory__Item";
334
+ aiChatHistory__ItemTitle: "aiChatHistory__ItemTitle";
335
+ aiChatHistory__ItemDate: "aiChatHistory__ItemDate";
336
+ aiChatHistory__EmptyState: "aiChatHistory__EmptyState";
337
+ aiChatHistory__LoadingState: "aiChatHistory__LoadingState";
338
+ aiChatHistory__Footer: "aiChatHistory__Footer";
339
+ aiChatHistory__NewConversationButton: "aiChatHistory__NewConversationButton";
340
+ };
324
341
  export declare const componentIDs: {
342
+ aiChatHistory: "aiChatHistory";
343
+ aiChatHistory__Header: "aiChatHistory__Header";
344
+ aiChatHistory__BackButton: "aiChatHistory__BackButton";
345
+ aiChatHistory__BackButtonIcon: "aiChatHistory__BackButtonIcon";
346
+ aiChatHistory__Title: "aiChatHistory__Title";
347
+ aiChatHistory__List: "aiChatHistory__List";
348
+ aiChatHistory__Item: "aiChatHistory__Item";
349
+ aiChatHistory__ItemTitle: "aiChatHistory__ItemTitle";
350
+ aiChatHistory__ItemDate: "aiChatHistory__ItemDate";
351
+ aiChatHistory__EmptyState: "aiChatHistory__EmptyState";
352
+ aiChatHistory__LoadingState: "aiChatHistory__LoadingState";
353
+ aiChatHistory__Footer: "aiChatHistory__Footer";
354
+ aiChatHistory__NewConversationButton: "aiChatHistory__NewConversationButton";
325
355
  dataSummary__Group: "dataSummary__Group";
326
356
  dataSummary__Toggle: "dataSummary__Toggle";
327
357
  dataSummary__ToggleText: "dataSummary__ToggleText";
@@ -426,6 +456,8 @@ export declare const componentIDs: {
426
456
  aiChatHeader__Toolbar: "aiChatHeader__Toolbar";
427
457
  aiChatHeader__ToolbarHeader: "aiChatHeader__ToolbarHeader";
428
458
  aiChatHeader__ToolbarHeaderWrapper: "aiChatHeader__ToolbarHeaderWrapper";
459
+ aiChatHeader__ChatHistoryButtonIcon: "aiChatHeader__ChatHistoryButtonIcon";
460
+ aiChatHeader__ChatHistoryButton: "aiChatHeader__ChatHistoryButton";
429
461
  aiChatContent: "aiChatContent";
430
462
  aiChatContentScrollArea: "aiChatContentScrollArea";
431
463
  aiChatContentScrollArea__Viewport: "aiChatContentScrollArea__Viewport";
@@ -39,6 +39,8 @@ const a = {
39
39
  aiChatHeader__Toolbar: "aiChatHeader__Toolbar",
40
40
  aiChatHeader__ToolbarHeader: "aiChatHeader__ToolbarHeader",
41
41
  aiChatHeader__ToolbarHeaderWrapper: "aiChatHeader__ToolbarHeaderWrapper",
42
+ aiChatHeader__ChatHistoryButtonIcon: "aiChatHeader__ChatHistoryButtonIcon",
43
+ aiChatHeader__ChatHistoryButton: "aiChatHeader__ChatHistoryButton",
42
44
  aiChatContent: "aiChatContent",
43
45
  aiChatContentScrollArea: "aiChatContentScrollArea",
44
46
  aiChatContentScrollArea__Viewport: "aiChatContentScrollArea__Viewport",
@@ -314,6 +316,20 @@ const a = {
314
316
  dataSummary__Content: "dataSummary__Content",
315
317
  dataSummary__Details: "dataSummary__Details",
316
318
  dataSummary__Label: "dataSummary__Label"
319
+ }, C = {
320
+ aiChatHistory: "aiChatHistory",
321
+ aiChatHistory__Header: "aiChatHistory__Header",
322
+ aiChatHistory__BackButton: "aiChatHistory__BackButton",
323
+ aiChatHistory__BackButtonIcon: "aiChatHistory__BackButtonIcon",
324
+ aiChatHistory__Title: "aiChatHistory__Title",
325
+ aiChatHistory__List: "aiChatHistory__List",
326
+ aiChatHistory__Item: "aiChatHistory__Item",
327
+ aiChatHistory__ItemTitle: "aiChatHistory__ItemTitle",
328
+ aiChatHistory__ItemDate: "aiChatHistory__ItemDate",
329
+ aiChatHistory__EmptyState: "aiChatHistory__EmptyState",
330
+ aiChatHistory__LoadingState: "aiChatHistory__LoadingState",
331
+ aiChatHistory__Footer: "aiChatHistory__Footer",
332
+ aiChatHistory__NewConversationButton: "aiChatHistory__NewConversationButton"
317
333
  }, c = {
318
334
  //
319
335
  //
@@ -326,7 +342,8 @@ const a = {
326
342
  ...a,
327
343
  ...h,
328
344
  ...s,
329
- ...n
345
+ ...n,
346
+ ...C
330
347
  };
331
348
  export {
332
349
  s as ChatBubbleComponentIds,
@@ -334,6 +351,7 @@ export {
334
351
  o as SearchBarComponentIds,
335
352
  h as SidebarChatComponentIds,
336
353
  e as aiChatComponentIds,
354
+ C as aiChatHistoryComponentIds,
337
355
  _ as aiSearchComponentIds,
338
356
  r as chatButtonComponentIds,
339
357
  c as componentIDs,
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../theme/index.cjs"),t=require("../../theme/colors.cjs"),s={placeholder:"How do I get started?",aiAssistantName:void 0,shouldOpenLinksInNewTab:!0,disclaimerSettings:{isEnabled:!1,label:"Usage policy"},isShareButtonVisible:!1,isViewOnly:!1,exampleQuestionsLabel:"Example questions",exampleQuestions:[],isFirstExampleQuestionHighlighted:!0,isCopyChatButtonVisible:!1,getHelpOptions:[],workflowsHeader:"Workflows",workflows:[],toolbarButtonLabels:{clear:"Clear",share:"Share",getHelp:"Get help",stop:"Stop",copyChat:"Copy"},context:{}},a={shouldBypassCaptcha:!1,tags:[],userProperties:{},primaryBrandColor:t.DEFAULT_PRIMARY_BRAND_COLOR,theme:{varsClassName:"inkeep-widget-vars",...e.theme}},l={shouldOpenLinksInNewTab:!1,defaultQuery:"",debounceTimeMs:0,tabs:["All","Publications","PDFs","GitHub","Forums","Discord","Slack","StackOverflow"],placeholder:"Search for anything...",view:"single-pane"};exports.defaultInkeepAIChatSettings=s;exports.defaultInkeepBaseSettings=a;exports.defaultInkeepSearchSettings=l;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../theme/index.cjs"),t=require("../../theme/colors.cjs"),s={baseUrl:"https://api.agents.inkeep.com",placeholder:"How do I get started?",aiAssistantName:void 0,shouldOpenLinksInNewTab:!0,disclaimerSettings:{isEnabled:!1,label:"Usage policy"},isShareButtonVisible:!1,isViewOnly:!1,isChatHistoryButtonVisible:!0,exampleQuestionsLabel:"Example questions",exampleQuestions:[],isFirstExampleQuestionHighlighted:!0,isCopyChatButtonVisible:!1,getHelpOptions:[],workflowsHeader:"Workflows",workflows:[],toolbarButtonLabels:{clear:"Clear",share:"Share",getHelp:"Get help",stop:"Stop",copyChat:"Copy"},context:{}},a={shouldBypassCaptcha:!1,tags:[],userProperties:{},primaryBrandColor:t.DEFAULT_PRIMARY_BRAND_COLOR,theme:{varsClassName:"inkeep-widget-vars",...e.theme}},l={shouldOpenLinksInNewTab:!1,defaultQuery:"",debounceTimeMs:0,tabs:["All","Publications","PDFs","GitHub","Forums","Discord","Slack","StackOverflow"],placeholder:"Search for anything...",view:"single-pane"};exports.defaultInkeepAIChatSettings=s;exports.defaultInkeepBaseSettings=a;exports.defaultInkeepSearchSettings=l;
@@ -1,5 +1,6 @@
1
1
  import { InkeepSearchSettings } from '../../types/index.ts';
2
2
  export declare const defaultInkeepAIChatSettings: {
3
+ baseUrl: string;
3
4
  placeholder: string;
4
5
  aiAssistantName: undefined;
5
6
  shouldOpenLinksInNewTab: true;
@@ -9,6 +10,7 @@ export declare const defaultInkeepAIChatSettings: {
9
10
  };
10
11
  isShareButtonVisible: false;
11
12
  isViewOnly: false;
13
+ isChatHistoryButtonVisible: true;
12
14
  exampleQuestionsLabel: string;
13
15
  exampleQuestions: never[];
14
16
  isFirstExampleQuestionHighlighted: true;
@@ -2,6 +2,7 @@
2
2
  import { theme as e } from "../../theme/index.js";
3
3
  import { DEFAULT_PRIMARY_BRAND_COLOR as s } from "../../theme/colors.js";
4
4
  const l = {
5
+ baseUrl: "https://api.agents.inkeep.com",
5
6
  placeholder: "How do I get started?",
6
7
  aiAssistantName: void 0,
7
8
  shouldOpenLinksInNewTab: !0,
@@ -11,6 +12,7 @@ const l = {
11
12
  },
12
13
  isShareButtonVisible: !1,
13
14
  isViewOnly: !1,
15
+ isChatHistoryButtonVisible: !0,
14
16
  exampleQuestionsLabel: "Example questions",
15
17
  exampleQuestions: [],
16
18
  isFirstExampleQuestionHighlighted: !0,
@@ -26,7 +28,7 @@ const l = {
26
28
  copyChat: "Copy"
27
29
  },
28
30
  context: {}
29
- }, o = {
31
+ }, i = {
30
32
  shouldBypassCaptcha: !1,
31
33
  tags: [],
32
34
  userProperties: {},
@@ -35,7 +37,7 @@ const l = {
35
37
  varsClassName: "inkeep-widget-vars",
36
38
  ...e
37
39
  }
38
- }, i = {
40
+ }, o = {
39
41
  shouldOpenLinksInNewTab: !1,
40
42
  defaultQuery: "",
41
43
  debounceTimeMs: 0,
@@ -45,6 +47,6 @@ const l = {
45
47
  };
46
48
  export {
47
49
  l as defaultInkeepAIChatSettings,
48
- o as defaultInkeepBaseSettings,
49
- i as defaultInkeepSearchSettings
50
+ i as defaultInkeepBaseSettings,
51
+ o as defaultInkeepSearchSettings
50
52
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../styled/components/chat-bubble.cjs"),n=require("../styled/components/chat-button.cjs"),p=require("../styled/components/shadow.cjs"),C=require("../primitives/providers/config-provider.cjs"),j=require("../primitives/providers/root-provider.cjs"),f=require("../primitives/utils/misc.cjs"),x=require("../primitives/atoms/error-boundary.cjs"),y=require("./embedded-search-and-chat.impl.cjs"),I=require("./embedded-chat.cjs"),q=require("./utils.cjs"),S=require("@radix-ui/react-use-controllable-state");function v(){return e.jsx(l.Header,{children:e.jsx(l.CloseButton,{})})}function O(s){const{label:a,avatar:i,shouldAutoFocusInput:c,openSettings:t,...o}=s,d={...o},{config:r}=y.useWidgetImpl({...d}),g=b=>{t?.isOpen===void 0&&u(!!b)},[m=t?.defaultOpen??!1,u]=S.useControllableState({prop:t?.isOpen,defaultProp:t?.defaultOpen??!1,onChange:q.composeEventHandlers(t?.onOpenChange,g)}),h={...t,isOpen:m,onOpenChange:u};return e.jsxs(e.Fragment,{children:[e.jsx(x.ErrorBoundary,{children:e.jsx(p.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(j.RootProvider,{config:r,componentType:C.WebWidgetInteractionType.ChatButton,children:e.jsx(B,{label:a,avatar:i,onOpenChange:u,openSettings:h})})})}),e.jsx(x.ErrorBoundary,{children:e.jsx(p.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(j.RootProvider,{config:r,componentType:C.WebWidgetInteractionType.ChatButton,children:e.jsx(l.Root,{openSettings:h,children:e.jsx(I.InkeepEmbeddedChatImpl,{variant:"no-shadow",shouldAutoFocusInput:c,header:v,...o})})})})})]})}function B({label:s="Ask AI",avatar:a,openSettings:i,onOpenChange:c}){const t=i?.isOpen??!1,o=d=>{d.button!==2&&c?.(r=>!r)};return e.jsx(n.Container,{children:e.jsx(n.ChatButton,{"data-open":f.dataAttr(t),onClick:o,children:t?e.jsx(n.ChatButtonCloseIcon,{}):e.jsxs(e.Fragment,{children:[e.jsx(n.ChatButtonText,{children:s}),e.jsx(n.ChatButtonAvatarContent,{children:e.jsx(n.ChatButtonAvatarImage,{avatar:a})})]})})})}exports.ChatButtonImpl=B;exports.InkeepChatButton=O;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("../styled/components/embedded-chat.cjs"),l=require("../styled/components/chat-bubble.cjs"),n=require("../styled/components/chat-button.cjs"),p=require("../styled/components/shadow.cjs"),C=require("../primitives/providers/config-provider.cjs"),j=require("../primitives/providers/root-provider.cjs"),y=require("../primitives/utils/misc.cjs"),x=require("../primitives/atoms/error-boundary.cjs"),q=require("./embedded-search-and-chat.impl.cjs"),I=require("./embedded-chat.cjs"),S=require("./utils.cjs"),v=require("@radix-ui/react-use-controllable-state");function O(){return e.jsxs(l.Header,{children:[e.jsx(f.ChatHistoryTrigger,{}),e.jsx(l.CloseButton,{})]})}function A(s){const{label:a,avatar:i,shouldAutoFocusInput:c,openSettings:t,...o}=s,d={...o},{config:r}=q.useWidgetImpl({...d}),m=b=>{t?.isOpen===void 0&&u(!!b)},[B=t?.defaultOpen??!1,u]=v.useControllableState({prop:t?.isOpen,defaultProp:t?.defaultOpen??!1,onChange:S.composeEventHandlers(t?.onOpenChange,m)}),h={...t,isOpen:B,onOpenChange:u};return e.jsxs(e.Fragment,{children:[e.jsx(x.ErrorBoundary,{children:e.jsx(p.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(j.RootProvider,{config:r,componentType:C.WebWidgetInteractionType.ChatButton,children:e.jsx(g,{label:a,avatar:i,onOpenChange:u,openSettings:h})})})}),e.jsx(x.ErrorBoundary,{children:e.jsx(p.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(j.RootProvider,{config:r,componentType:C.WebWidgetInteractionType.ChatButton,children:e.jsx(l.Root,{openSettings:h,children:e.jsx(I.InkeepEmbeddedChatImpl,{variant:"no-shadow",shouldAutoFocusInput:c,header:O,...o})})})})})]})}function g({label:s="Ask AI",avatar:a,openSettings:i,onOpenChange:c}){const t=i?.isOpen??!1,o=d=>{d.button!==2&&c?.(r=>!r)};return e.jsx(n.Container,{children:e.jsx(n.ChatButton,{"data-open":y.dataAttr(t),onClick:o,children:t?e.jsx(n.ChatButtonCloseIcon,{}):e.jsxs(e.Fragment,{children:[e.jsx(n.ChatButtonText,{children:s}),e.jsx(n.ChatButtonAvatarContent,{children:e.jsx(n.ChatButtonAvatarImage,{avatar:a})})]})})})}exports.ChatButtonImpl=g;exports.InkeepChatButton=A;
@@ -1,69 +1,73 @@
1
1
  "use client";
2
- import { jsxs as C, Fragment as f, jsx as t } from "react/jsx-runtime";
3
- import { Root as I, Header as O, CloseButton as y } from "../styled/components/chat-bubble.js";
4
- import { Container as v, ChatButton as S, ChatButtonText as A, ChatButtonAvatarContent as k, ChatButtonAvatarImage as w, ChatButtonCloseIcon as x } from "../styled/components/chat-button.js";
5
- import { Shadow as h } from "../styled/components/shadow.js";
6
- import { WebWidgetInteractionType as c } from "../primitives/providers/config-provider.js";
2
+ import { jsxs as d, Fragment as f, jsx as t } from "react/jsx-runtime";
3
+ import { ChatHistoryTrigger as y } from "../styled/components/embedded-chat.js";
4
+ import { Root as I, Header as O, CloseButton as v } from "../styled/components/chat-bubble.js";
5
+ import { Container as S, ChatButton as A, ChatButtonText as H, ChatButtonAvatarContent as T, ChatButtonAvatarImage as k, ChatButtonCloseIcon as w } from "../styled/components/chat-button.js";
6
+ import { Shadow as c } from "../styled/components/shadow.js";
7
+ import { WebWidgetInteractionType as m } from "../primitives/providers/config-provider.js";
7
8
  import { RootProvider as u } from "../primitives/providers/root-provider.js";
8
- import { dataAttr as H } from "../primitives/utils/misc.js";
9
- import { ErrorBoundary as m } from "../primitives/atoms/error-boundary.js";
10
- import { useWidgetImpl as T } from "./embedded-search-and-chat.impl.js";
11
- import { InkeepEmbeddedChatImpl as E } from "./embedded-chat.js";
12
- import { composeEventHandlers as P } from "./utils.js";
13
- import { useControllableState as R } from "@radix-ui/react-use-controllable-state";
14
- function W() {
15
- return /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(y, {}) });
9
+ import { dataAttr as x } from "../primitives/utils/misc.js";
10
+ import { ErrorBoundary as C } from "../primitives/atoms/error-boundary.js";
11
+ import { useWidgetImpl as E } from "./embedded-search-and-chat.impl.js";
12
+ import { InkeepEmbeddedChatImpl as P } from "./embedded-chat.js";
13
+ import { composeEventHandlers as R } from "./utils.js";
14
+ import { useControllableState as W } from "@radix-ui/react-use-controllable-state";
15
+ function j() {
16
+ return /* @__PURE__ */ d(O, { children: [
17
+ /* @__PURE__ */ t(y, {}),
18
+ /* @__PURE__ */ t(v, {})
19
+ ] });
16
20
  }
17
- function Q(r) {
18
- const { label: a, avatar: i, shouldAutoFocusInput: p, openSettings: e, ...n } = r, s = {
21
+ function V(r) {
22
+ const { label: a, avatar: i, shouldAutoFocusInput: s, openSettings: e, ...n } = r, p = {
19
23
  ...n
20
- }, { config: o } = T({ ...s }), B = (g) => {
21
- e?.isOpen === void 0 && l(!!g);
22
- }, [b = e?.defaultOpen ?? !1, l] = R({
24
+ }, { config: o } = E({ ...p }), B = (b) => {
25
+ e?.isOpen === void 0 && l(!!b);
26
+ }, [g = e?.defaultOpen ?? !1, l] = W({
23
27
  prop: e?.isOpen,
24
28
  defaultProp: e?.defaultOpen ?? !1,
25
- onChange: P(e?.onOpenChange, B)
26
- }), d = {
29
+ onChange: R(e?.onOpenChange, B)
30
+ }), h = {
27
31
  ...e,
28
- isOpen: b,
32
+ isOpen: g,
29
33
  onOpenChange: l
30
34
  };
31
- return /* @__PURE__ */ C(f, { children: [
32
- /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(h, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ t(u, { config: o, componentType: c.ChatButton, children: /* @__PURE__ */ t(
33
- j,
35
+ return /* @__PURE__ */ d(f, { children: [
36
+ /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(c, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ t(u, { config: o, componentType: m.ChatButton, children: /* @__PURE__ */ t(
37
+ F,
34
38
  {
35
39
  label: a,
36
40
  avatar: i,
37
41
  onOpenChange: l,
38
- openSettings: d
42
+ openSettings: h
39
43
  }
40
44
  ) }) }) }),
41
- /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(h, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ t(u, { config: o, componentType: c.ChatButton, children: /* @__PURE__ */ t(I, { openSettings: d, children: /* @__PURE__ */ t(
42
- E,
45
+ /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(c, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ t(u, { config: o, componentType: m.ChatButton, children: /* @__PURE__ */ t(I, { openSettings: h, children: /* @__PURE__ */ t(
46
+ P,
43
47
  {
44
48
  variant: "no-shadow",
45
- shouldAutoFocusInput: p,
46
- header: W,
49
+ shouldAutoFocusInput: s,
50
+ header: j,
47
51
  ...n
48
52
  }
49
53
  ) }) }) }) })
50
54
  ] });
51
55
  }
52
- function j({
56
+ function F({
53
57
  label: r = "Ask AI",
54
58
  avatar: a,
55
59
  openSettings: i,
56
- onOpenChange: p
60
+ onOpenChange: s
57
61
  }) {
58
- const e = i?.isOpen ?? !1, n = (s) => {
59
- s.button !== 2 && p?.((o) => !o);
62
+ const e = i?.isOpen ?? !1, n = (p) => {
63
+ p.button !== 2 && s?.((o) => !o);
60
64
  };
61
- return /* @__PURE__ */ t(v, { children: /* @__PURE__ */ t(S, { "data-open": H(e), onClick: n, children: e ? /* @__PURE__ */ t(x, {}) : /* @__PURE__ */ C(f, { children: [
62
- /* @__PURE__ */ t(A, { children: r }),
63
- /* @__PURE__ */ t(k, { children: /* @__PURE__ */ t(w, { avatar: a }) })
65
+ return /* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(A, { "data-open": x(e), onClick: n, children: e ? /* @__PURE__ */ t(w, {}) : /* @__PURE__ */ d(f, { children: [
66
+ /* @__PURE__ */ t(H, { children: r }),
67
+ /* @__PURE__ */ t(T, { children: /* @__PURE__ */ t(k, { avatar: a }) })
64
68
  ] }) }) });
65
69
  }
66
70
  export {
67
- j as ChatButtonImpl,
68
- Q as InkeepChatButton
71
+ F as ChatButtonImpl,
72
+ V as InkeepChatButton
69
73
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("react"),s=require("../styled/components/embedded-chat.cjs"),h=require("../styled/components/modal.cjs"),A=require("../styled/components/shadow.cjs"),F=require("../styled/components/message.cjs"),p=require("../primitives/providers/config-provider.cjs"),M=require("../primitives/providers/root-provider.cjs"),k=require("../primitives/providers/widget-provider.cjs"),T=require("../primitives/components/modal/modal-provider.cjs"),g=require("../primitives/utils/misc.cjs"),m=require("../primitives/atoms/portal-with-theme.cjs"),B=require("../primitives/atoms/error-boundary.cjs"),S=require("./modal.cjs"),v=require("./widget-toggle.cjs");function w(r){const{baseSettings:t,aiChatSettings:n}=r;return e.jsx(B.ErrorBoundary,{children:e.jsx(A.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(M.RootProvider,{config:{baseSettings:t,aiChatSettings:n},componentType:p.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(I,{...r})})})})}function b(r){const{children:t,onToggleView:n,isHidden:o,shouldAutoFocusInput:a=!n}=r;return e.jsx(s.Provider,{isHidden:o,shouldAutoFocusInput:a,children:t})}function I(r){return e.jsx(b,{...r,children:e.jsx(C,{...r})})}function C(r){const{onToggleView:t,variant:n,header:o=y}=r,a=T.useModal(),i=k.useWidget(),c=a&&!i?S.ModalContent:x.Fragment;return e.jsx(c,{children:e.jsxs(s.Wrapper,{variant:n??(t?"no-shadow":"container-with-shadow"),"data-composite":g.dataAttr(!!r.onToggleView||a?.isOpen),children:[e.jsxs(s.Root,{children:[o&&e.jsx(o,{...r}),e.jsx(E,{}),e.jsx(W,{})]}),e.jsx(V,{}),e.jsx(O,{})]})})}const y=r=>{const{onToggleView:t,askAILabel:n,searchLabel:o}=r,a=!!t;return e.jsx(s.Header,{"data-show-toolbar":g.dataAttr(a),children:a?e.jsxs(s.HeaderToolbar,{children:[e.jsxs(s.HeaderToolbarWrapper,{children:[e.jsx(s.ToolbarHeader,{}),e.jsxs(s.Disclaimer,{children:[e.jsx(s.DisclaimerTrigger,{}),e.jsxs(s.DisclaimerContent,{side:"bottom",align:"start",children:[e.jsx(s.DisclaimerText,{}),e.jsx(s.DisclaimerArrow,{})]})]})]}),e.jsx(v.WidgetToggle,{onToggleView:t,askAILabel:n,searchLabel:o,view:"chat"}),e.jsx(h.Close,{})]}):e.jsx(h.Close,{})})};function E(){return e.jsx(s.Content,{children:e.jsxs(s.ContentScrollArea,{children:[e.jsx(s.ContentScrollAreaViewport,{children:e.jsx(f,{})}),e.jsx(s.ContentScrollAreaScrollbar,{children:e.jsx(s.ContentScrollAreaThumb,{})}),e.jsx(s.ContentScrollAreaCorner,{})]})})}function f(){const{aiChatSettings:{components:r}}=p.useInkeepConfig();return e.jsx(s.Messages,{children:({messages:t,isLoading:n})=>{const o=t.at(-1),a=(c,j)=>{const l=r?.[c];if(!l)return console.warn(`Component "${c}" not found in components config`),null;try{if(typeof l=="function"&&l.length<=1)return x.createElement(l,j);const d=l(j,document.createElement("div"),null);return x.isValidElement(d)||typeof d=="string"?d:null}catch(d){return console.error(`🔍 [renderComponent] Error rendering component "${c}":`,d),null}},i=c=>e.jsx(s.Markdown,{text:c});return e.jsxs(e.Fragment,{children:[e.jsx(H,{}),t.map(c=>e.jsxs(s.MessageWrapper,{message:c,children:[e.jsx(u,{}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:r?.IkpMessage?e.jsx(s.DynamicComponent,{name:"IkpMessage",props:{message:c,renderComponent:a,renderMarkdown:i},componentDef:r.IkpMessage}):e.jsxs(e.Fragment,{children:[e.jsx(F.EmbeddedChatMessagePart,{isLast:o?.id===c.id}),e.jsx(P,{})]})}),e.jsx(D,{}),e.jsx(L,{})]})]},c.id)),n&&o?.parts.length&&e.jsxs(s.MessageWrapper,{message:{id:"___loader___",role:"assistant",parts:[{type:"text",text:"Thinking..."}]},children:[e.jsx(u,{}),e.jsx(s.MessageLoading,{})]})]})}})}function H(){return e.jsxs(s.IntroMessageWrapper,{children:[e.jsxs(s.MessageHeader,{children:[e.jsx(s.MessageAvatar,{children:e.jsx(s.MessageAvatarContent,{children:e.jsx(s.MessageAvatarImage,{})})}),e.jsx(s.MessageName,{})]}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:e.jsx(F.EmbeddedChatMessagePart,{isLast:!1})}),e.jsxs(s.Disclaimer,{children:[e.jsx(s.DisclaimerLabel,{}),e.jsx(s.DisclaimerTrigger,{}),e.jsxs(s.DisclaimerContent,{children:[e.jsx(s.DisclaimerText,{}),e.jsx(s.DisclaimerArrow,{})]})]}),e.jsxs(s.ExampleQuestions,{children:[e.jsx(s.ExampleQuestionsLabel,{}),e.jsx(s.ExampleQuestionsList,{children:r=>r.map(t=>e.jsx(s.ExampleQuestion,{children:e.jsx(s.ExampleQuestionButton,{question:t})},typeof t=="object"?t.label:t))})]})]})]})}function u(){return e.jsxs(s.MessageHeader,{children:[e.jsx(s.MessageAvatar,{children:e.jsx(s.MessageAvatarContent,{children:e.jsx(s.MessageAvatarImage,{})})}),e.jsx(s.MessageName,{})]})}function D(){return e.jsxs(s.MessageAttachments,{children:[e.jsx(s.MessageAttachmentsList,{children:r=>r.map(t=>e.jsxs(s.MessageAttachmentsItem,{attachment:t,children:[e.jsx(s.MessageAttachmentsItemIcon,{}),e.jsx(s.MessageAttachmentsItemTitle,{})]},t.id))}),e.jsx(s.MessageAttachmentsPreview,{children:e.jsx(m.PortalWithTheme,{children:e.jsx(s.MessageAttachmentsPreviewOverlay,{children:e.jsxs(s.MessageAttachmentsPreviewContent,{children:[e.jsx(s.MessageAttachmentsPreviewHeader,{}),e.jsx(s.MessageAttachmentsPreviewClose,{}),e.jsx(s.MessageAttachmentsPreviewBody,{})]})})})})]})}function L(){return e.jsxs(s.MessageToolbar,{children:[e.jsx(s.MessageCustomActions,{children:r=>r.map((t,n)=>e.jsx(s.MessageCustomAction,{action:t},`action-${n}`))}),e.jsx(s.MessageAction,{action:"copy"}),e.jsx(s.MessageAction,{action:"upvote"}),e.jsx(s.MessageAction,{action:"downvote"})]})}function P(){return e.jsxs(s.MessageSources,{children:[e.jsx(s.MessageSourcesHeader,{}),e.jsx(s.MessageSourcesList,{children:r=>r.map((t,n)=>e.jsxs(s.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(s.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(o=>e.jsxs(x.Fragment,{children:[o,e.jsx(s.MessageSourceItemBreadcrumbIcon,{})]},o))}),e.jsx(s.MessageSourceItemIcon,{}),e.jsx(s.MessageSourceItemTitle,{}),e.jsx(s.MessageSourceItemTag,{}),e.jsx(s.MessageSourceItemDescription,{children:o=>o.map((a,i)=>e.jsx(s.MessageSourceItemDescriptionPart,{part:a},`part-${i}`))}),e.jsx(s.MessageSourceItemIndicator,{})]},n))})]})}function W(){return e.jsxs(s.Footer,{children:[e.jsx(q,{}),e.jsx(_,{})]})}function q(){return e.jsxs(s.InputFieldset,{children:[e.jsxs(s.InputGroup,{children:[e.jsx(s.Input,{}),e.jsx(s.SendButton,{children:e.jsx(s.SendButtonIcon,{})})]}),e.jsxs(s.AttachmentsBar,{children:[e.jsx(s.AttachmentsBarList,{children:r=>r.map(t=>e.jsxs(s.AttachmentsBarAttachment,{attachment:t,children:[e.jsx(s.AttachmentsBarAttachmentIcon,{}),e.jsx(s.AttachmentsBarAttachmentTitle,{}),e.jsx(s.AttachmentsBarAttachmentDelete,{})]},t.id))}),e.jsxs(s.AttachmentsBarActions,{children:[e.jsxs(s.AttachmentsBarInfoTip,{children:[e.jsx(s.AttachmentsBarInfoTipIcon,{}),e.jsx(s.AttachmentsBarInfoTipText,{})]}),e.jsx(s.AttachmentsBarInputs,{children:r=>r.map(t=>e.jsx(s.AttachmentsBarInput,{input:t,children:t.displayName},t.id))})]}),e.jsx(m.PortalWithTheme,{children:e.jsx(s.AttachmentsBarModal,{children:e.jsx(s.AttachmentsBarModalOverlay,{children:e.jsxs(s.AttachmentsBarModalContent,{children:[e.jsxs(s.AttachmentsBarModalHeader,{children:[e.jsx(s.AttachmentsBarModalHeading,{}),e.jsx(s.AttachmentsBarModalDescription,{}),e.jsx(s.AttachmentsBarModalHelp,{})]}),e.jsx(s.AttachmentsBarModalClose,{}),e.jsx(s.AttachmentsBarModalBody,{children:e.jsxs(s.AttachmentsBarForm,{children:[e.jsxs(s.AttachmentsBarFormTitle,{children:[e.jsx(s.AttachmentsBarFormTitleLabel,{}),e.jsx(s.AttachmentsBarFormTitleInput,{}),e.jsx(s.AttachmentsBarFormTitleError,{})]}),e.jsxs(s.AttachmentsBarFormContent,{children:[e.jsx(s.AttachmentsBarFormContentLabel,{}),e.jsx(s.AttachmentsBarFormContentInput,{}),e.jsx(s.AttachmentsBarFormContentError,{})]}),e.jsx(s.AttachmentsBarFormSubmitButton,{})]})})]})})})})]})]})}function _(){return e.jsxs(s.ActionBar,{children:[e.jsxs(s.TaglineContainer,{children:[e.jsx(s.TaglineText,{}),e.jsx(s.TaglineLogo,{}),e.jsx(s.TaglineBrandName,{})]}),e.jsxs(s.Actions,{children:[e.jsx(s.HelpActions,{children:({pinned:r,unpinned:t})=>e.jsxs(e.Fragment,{children:[r.map(n=>e.jsx(s.HelpAction,{action:n},n.name)),t.length>0&&e.jsx(s.HelpActionsTrigger,{}),e.jsxs(s.HelpActionsMenu,{children:[e.jsx(s.HelpActionsMenuArrow,{}),t.map(n=>e.jsxs(s.HelpActionsMenuItem,{action:n,children:[e.jsx(s.HelpActionsMenuItemIcon,{action:n}),n.name]},n.name))]})]})}),e.jsxs(s.ChatAction,{action:"copy",children:[e.jsx(s.ChatActionLabel,{action:"copy"}),e.jsx(s.ChatActionFeedback,{action:"copy"})]}),e.jsx(s.ChatAction,{action:"clear"}),e.jsx(s.ChatAction,{action:"stop"})]})]})}function V(){return e.jsx(m.PortalWithTheme,{children:e.jsx(s.FeedbackModal,{children:e.jsx(s.FeedbackModalOverlay,{children:e.jsxs(s.FeedbackModalContent,{children:[e.jsx(s.FeedbackModalHeader,{}),e.jsx(s.FeedbackModalClose,{}),e.jsx(s.FeedbackModalBody,{children:e.jsxs(s.FeedbackForm,{children:[e.jsxs(s.FeedbackItem,{name:"unrelated_response",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{})]}),e.jsx(s.FeedbackSubmitButton,{})]})})]})})})})}function O(){return e.jsxs(s.FormWrapper,{children:[e.jsx(s.FormClose,{}),e.jsxs(s.Form,{children:[e.jsxs(s.FormHeader,{children:[e.jsx(s.FormHeading,{}),e.jsx(s.FormDescription,{})]}),e.jsx(s.FormContent,{children:r=>e.jsxs(e.Fragment,{children:[r.map((t,n)=>e.jsxs(s.FormField,{field:t,autoFocus:n===0,children:[e.jsx(s.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(s.FormFieldText,{}),t.inputType==="email"&&e.jsx(s.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(s.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(s.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(s.FormFieldCheckbox,{children:e.jsx(s.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(s.FormFieldSelect,{children:[e.jsxs(s.FormFieldSelectTrigger,{children:[e.jsx(s.FormFieldSelectValue,{}),e.jsx(s.FormFieldSelectIcon,{})]}),e.jsx(s.FormFieldSelectContent,{children:e.jsx(s.FormFieldSelectViewport,{children:t.items.map(o=>e.jsxs(s.FormFieldSelectItem,{value:o.value,children:[e.jsx(s.FormFieldSelectItemText,{children:o.label}),e.jsx(s.FormFieldSelectItemIndicator,{})]},o.value))})})]}),t.inputType==="combobox"&&e.jsxs(s.FormFieldCombobox,{children:[e.jsxs(s.FormFieldComboboxControl,{children:["multiple"in t&&t.multiple&&e.jsx(s.FormFieldComboboxSelectedTags,{}),e.jsx(s.FormFieldComboboxInput,{}),e.jsx(s.FormFieldComboboxTrigger,{})]}),e.jsx(s.FormFieldComboboxPositioner,{children:e.jsx(s.FormFieldComboboxContent,{children:e.jsx(s.FormFieldComboboxList,{children:e.jsx(s.FormFieldComboboxListItems,{children:o=>o.length===0?e.jsx(s.FormFieldComboboxListEmpty,{}):o.map(a=>e.jsxs(s.FormFieldComboboxItem,{item:a,children:[e.jsx(s.FormFieldComboboxItemText,{children:a.label}),e.jsx(s.FormFieldComboboxItemIndicator,{})]},a.value))})})})})]}),e.jsx(s.FormFieldDescription,{}),e.jsx(s.FormFieldError,{})]},t.name)),e.jsx(s.FormError,{})]})}),e.jsxs(s.FormFooter,{children:[e.jsx(s.FormCancel,{}),e.jsx(s.FormSubmit,{})]})]}),e.jsxs(s.FormSuccess,{children:[e.jsx(s.FormSuccessHeading,{}),e.jsx(s.FormSuccessMessage,{}),e.jsx(s.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=w;exports.InkeepEmbeddedChatImpl=I;exports.InkeepEmbeddedChatImplContent=C;exports.InkeepEmbeddedChatProvider=b;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),t=require("../styled/components/embedded-chat.cjs"),c=require("../styled/components/chat-history.cjs"),j=require("../styled/components/modal.cjs"),k=require("../styled/components/shadow.cjs"),b=require("../styled/components/message.cjs"),T=require("../primitives/providers/chat-history-provider.cjs"),u=require("../primitives/providers/config-provider.cjs"),B=require("../primitives/providers/root-provider.cjs"),y=require("../primitives/providers/widget-provider.cjs"),C=require("../primitives/components/embedded-chat/chat-provider.cjs"),S=require("../primitives/components/modal/modal-provider.cjs"),h=require("../primitives/utils/misc.cjs"),F=require("../primitives/atoms/portal-with-theme.cjs"),H=require("../primitives/atoms/error-boundary.cjs"),E=require("./modal.cjs"),v=require("./widget-toggle.cjs");function w(r){const{baseSettings:s,aiChatSettings:n}=r;return e.jsx(H.ErrorBoundary,{children:e.jsx(k.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(B.RootProvider,{config:{baseSettings:s,aiChatSettings:n},componentType:u.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(A,{...r})})})})}function I(r){const{children:s,onToggleView:n,isHidden:o,shouldAutoFocusInput:i=!n}=r;return e.jsx(t.Provider,{isHidden:o,shouldAutoFocusInput:i,children:s})}function A(r){return e.jsx(I,{...r,children:e.jsx(M,{...r})})}function M(r){const{onToggleView:s,variant:n,header:o=f}=r,i=S.useModal(),d=y.useWidget(),a=i&&!d?E.ModalContent:m.Fragment;return e.jsx(a,{children:e.jsxs(t.Wrapper,{variant:n??(s?"no-shadow":"container-with-shadow"),"data-composite":h.dataAttr(!!r.onToggleView||i?.isOpen),children:[e.jsx(Q,{}),e.jsxs(t.Root,{children:[o&&e.jsx(o,{...r}),e.jsx(L,{}),e.jsx(V,{})]}),e.jsx(R,{}),e.jsx($,{})]})})}const f=r=>{const{onToggleView:s,askAILabel:n,searchLabel:o}=r,{aiChatSettings:i}=u.useInkeepConfig(),d=i.isChatHistoryButtonVisible,a=!!s||d;return e.jsx(t.Header,{"data-show-toolbar":h.dataAttr(a),children:a?e.jsxs(t.HeaderToolbar,{"data-show-widget-toggle":h.dataAttr(!!s),children:[e.jsx(t.HeaderToolbarWrapper,{children:d&&e.jsx(t.ChatHistoryTrigger,{})}),s&&e.jsx(v.WidgetToggle,{onToggleView:s,askAILabel:n,searchLabel:o,view:"chat"}),e.jsx(j.Close,{})]}):e.jsx(j.Close,{})})};function L(){const{isSessionLoading:r}=C.useChat();return e.jsx(t.Content,{children:e.jsxs(t.ContentScrollArea,{children:[e.jsx(t.ContentScrollAreaViewport,{children:r?e.jsx(t.MessagesSessionLoading,{}):e.jsx(P,{})}),e.jsx(t.ContentScrollAreaScrollbar,{children:e.jsx(t.ContentScrollAreaThumb,{})}),e.jsx(t.ContentScrollAreaCorner,{})]})})}function P(){const{aiChatSettings:{components:r}}=u.useInkeepConfig();return e.jsx(t.Messages,{children:({messages:s,isLoading:n})=>{const o=s.at(-1),i=(a,g)=>{const l=r?.[a];if(!l)return console.warn(`Component "${a}" not found in components config`),null;try{if(typeof l=="function"&&l.length<=1)return m.createElement(l,g);const x=l(g,document.createElement("div"),null);return m.isValidElement(x)||typeof x=="string"?x:null}catch(x){return console.error(`🔍 [renderComponent] Error rendering component "${a}":`,x),null}},d=a=>e.jsx(t.Markdown,{text:a});return e.jsxs(e.Fragment,{children:[e.jsx(D,{}),s.map(a=>e.jsxs(t.MessageWrapper,{message:a,children:[e.jsx(p,{}),e.jsxs(t.MessageContentWrapper,{children:[e.jsx(t.MessageContent,{children:r?.IkpMessage?e.jsx(t.DynamicComponent,{name:"IkpMessage",props:{message:a,renderComponent:i,renderMarkdown:d},componentDef:r.IkpMessage}):e.jsxs(e.Fragment,{children:[e.jsx(b.EmbeddedChatMessagePart,{isLast:o?.id===a.id}),e.jsx(_,{})]})}),e.jsx(W,{}),e.jsx(q,{})]})]},a.id)),n&&o?.parts.length&&e.jsxs(t.MessageWrapper,{message:{id:"___loader___",role:"assistant",parts:[{type:"text",text:"Thinking..."}]},children:[e.jsx(p,{}),e.jsx(t.MessageLoading,{})]})]})}})}function D(){return e.jsxs(t.IntroMessageWrapper,{children:[e.jsxs(t.MessageHeader,{children:[e.jsx(t.MessageAvatar,{children:e.jsx(t.MessageAvatarContent,{children:e.jsx(t.MessageAvatarImage,{})})}),e.jsx(t.MessageName,{})]}),e.jsxs(t.MessageContentWrapper,{children:[e.jsx(t.MessageContent,{children:e.jsx(b.EmbeddedChatMessagePart,{isLast:!1})}),e.jsxs(t.Disclaimer,{children:[e.jsx(t.DisclaimerLabel,{}),e.jsx(t.DisclaimerTrigger,{}),e.jsxs(t.DisclaimerContent,{children:[e.jsx(t.DisclaimerText,{}),e.jsx(t.DisclaimerArrow,{})]})]}),e.jsxs(t.ExampleQuestions,{children:[e.jsx(t.ExampleQuestionsLabel,{}),e.jsx(t.ExampleQuestionsList,{children:r=>r.map(s=>e.jsx(t.ExampleQuestion,{children:e.jsx(t.ExampleQuestionButton,{question:s})},typeof s=="object"?s.label:s))})]})]})]})}function p(){return e.jsxs(t.MessageHeader,{children:[e.jsx(t.MessageAvatar,{children:e.jsx(t.MessageAvatarContent,{children:e.jsx(t.MessageAvatarImage,{})})}),e.jsx(t.MessageName,{})]})}function W(){return e.jsxs(t.MessageAttachments,{children:[e.jsx(t.MessageAttachmentsList,{children:r=>r.map(s=>e.jsxs(t.MessageAttachmentsItem,{attachment:s,children:[e.jsx(t.MessageAttachmentsItemIcon,{}),e.jsx(t.MessageAttachmentsItemTitle,{})]},s.id))}),e.jsx(t.MessageAttachmentsPreview,{children:e.jsx(F.PortalWithTheme,{children:e.jsx(t.MessageAttachmentsPreviewOverlay,{children:e.jsxs(t.MessageAttachmentsPreviewContent,{children:[e.jsx(t.MessageAttachmentsPreviewHeader,{}),e.jsx(t.MessageAttachmentsPreviewClose,{}),e.jsx(t.MessageAttachmentsPreviewBody,{})]})})})})]})}function q(){return e.jsxs(t.MessageToolbar,{children:[e.jsx(t.MessageCustomActions,{children:r=>r.map((s,n)=>e.jsx(t.MessageCustomAction,{action:s},`action-${n}`))}),e.jsx(t.MessageAction,{action:"copy"}),e.jsx(t.MessageAction,{action:"upvote"}),e.jsx(t.MessageAction,{action:"downvote"})]})}function _(){return e.jsxs(t.MessageSources,{children:[e.jsx(t.MessageSourcesHeader,{}),e.jsx(t.MessageSourcesList,{children:r=>r.map((s,n)=>e.jsxs(t.MessageSourceItem,{href:s.url,source:s,children:[e.jsx(t.MessageSourceItemBreadcrumbs,{children:s.breadcrumbs?.map(o=>e.jsxs(m.Fragment,{children:[o,e.jsx(t.MessageSourceItemBreadcrumbIcon,{})]},o))}),e.jsx(t.MessageSourceItemIcon,{}),e.jsx(t.MessageSourceItemTitle,{}),e.jsx(t.MessageSourceItemTag,{}),e.jsx(t.MessageSourceItemDescription,{children:o=>o.map((i,d)=>e.jsx(t.MessageSourceItemDescriptionPart,{part:i},`part-${d}`))}),e.jsx(t.MessageSourceItemIndicator,{})]},n))})]})}function V(){return e.jsxs(t.Footer,{children:[e.jsx(N,{}),e.jsx(O,{})]})}function N(){return e.jsxs(t.InputFieldset,{children:[e.jsxs(t.InputGroup,{children:[e.jsx(t.Input,{}),e.jsx(t.SendButton,{children:e.jsx(t.SendButtonIcon,{})})]}),e.jsxs(t.AttachmentsBar,{children:[e.jsx(t.AttachmentsBarList,{children:r=>r.map(s=>e.jsxs(t.AttachmentsBarAttachment,{attachment:s,children:[e.jsx(t.AttachmentsBarAttachmentIcon,{}),e.jsx(t.AttachmentsBarAttachmentTitle,{}),e.jsx(t.AttachmentsBarAttachmentDelete,{})]},s.id))}),e.jsxs(t.AttachmentsBarActions,{children:[e.jsxs(t.AttachmentsBarInfoTip,{children:[e.jsx(t.AttachmentsBarInfoTipIcon,{}),e.jsx(t.AttachmentsBarInfoTipText,{})]}),e.jsx(t.AttachmentsBarInputs,{children:r=>r.map(s=>e.jsx(t.AttachmentsBarInput,{input:s,children:s.displayName},s.id))})]}),e.jsx(F.PortalWithTheme,{children:e.jsx(t.AttachmentsBarModal,{children:e.jsx(t.AttachmentsBarModalOverlay,{children:e.jsxs(t.AttachmentsBarModalContent,{children:[e.jsxs(t.AttachmentsBarModalHeader,{children:[e.jsx(t.AttachmentsBarModalHeading,{}),e.jsx(t.AttachmentsBarModalDescription,{}),e.jsx(t.AttachmentsBarModalHelp,{})]}),e.jsx(t.AttachmentsBarModalClose,{}),e.jsx(t.AttachmentsBarModalBody,{children:e.jsxs(t.AttachmentsBarForm,{children:[e.jsxs(t.AttachmentsBarFormTitle,{children:[e.jsx(t.AttachmentsBarFormTitleLabel,{}),e.jsx(t.AttachmentsBarFormTitleInput,{}),e.jsx(t.AttachmentsBarFormTitleError,{})]}),e.jsxs(t.AttachmentsBarFormContent,{children:[e.jsx(t.AttachmentsBarFormContentLabel,{}),e.jsx(t.AttachmentsBarFormContentInput,{}),e.jsx(t.AttachmentsBarFormContentError,{})]}),e.jsx(t.AttachmentsBarFormSubmitButton,{})]})})]})})})})]})]})}function O(){return e.jsxs(t.ActionBar,{children:[e.jsxs(t.TaglineContainer,{children:[e.jsx(t.TaglineText,{}),e.jsx(t.TaglineLogo,{}),e.jsx(t.TaglineBrandName,{})]}),e.jsxs(t.Actions,{children:[e.jsx(t.HelpActions,{children:({pinned:r,unpinned:s})=>e.jsxs(e.Fragment,{children:[r.map(n=>e.jsx(t.HelpAction,{action:n},n.name)),s.length>0&&e.jsx(t.HelpActionsTrigger,{}),e.jsxs(t.HelpActionsMenu,{children:[e.jsx(t.HelpActionsMenuArrow,{}),s.map(n=>e.jsxs(t.HelpActionsMenuItem,{action:n,children:[e.jsx(t.HelpActionsMenuItemIcon,{action:n}),n.name]},n.name))]})]})}),e.jsxs(t.ChatAction,{action:"copy",children:[e.jsx(t.ChatActionLabel,{action:"copy"}),e.jsx(t.ChatActionFeedback,{action:"copy"})]}),e.jsx(t.ChatAction,{action:"clear"}),e.jsx(t.ChatAction,{action:"stop"})]})]})}function Q(){const{sessions:r}=T.useChatHistory(),{conversationId:s}=C.useChat();return e.jsxs(c.EmbeddedChatHistoryRoot,{children:[e.jsxs(c.EmbeddedChatHistoryHeader,{children:[e.jsxs(c.EmbeddedChatHistoryBackButton,{children:[e.jsx(c.EmbeddedChatHistoryBackButtonIcon,{iconKey:"backToChat"}),"Back to chat"]}),e.jsx(c.EmbeddedChatHistoryTitle,{}),e.jsx(j.Close,{})]}),e.jsxs(c.EmbeddedChatHistoryList,{children:[r.map(n=>e.jsxs(c.EmbeddedChatHistoryItem,{sessionId:n.id,"data-active":h.dataAttr(n.id===s),children:[e.jsx(c.EmbeddedChatHistoryItemTitle,{children:n.title}),e.jsx(c.EmbeddedChatHistoryItemDate,{children:c.formatSessionDate(n.updatedAt)})]},n.id)),e.jsx(c.EmbeddedChatHistoryEmptyState,{}),e.jsx(c.EmbeddedChatHistoryLoadingState,{})]}),e.jsx(c.EmbeddedChatHistoryFooter,{children:e.jsx(c.EmbeddedChatHistoryNewConversationButton,{})})]})}function R(){return e.jsx(F.PortalWithTheme,{children:e.jsx(t.FeedbackModal,{children:e.jsx(t.FeedbackModalOverlay,{children:e.jsxs(t.FeedbackModalContent,{children:[e.jsx(t.FeedbackModalHeader,{}),e.jsx(t.FeedbackModalClose,{}),e.jsx(t.FeedbackModalBody,{children:e.jsxs(t.FeedbackForm,{children:[e.jsxs(t.FeedbackItem,{name:"unrelated_response",children:[e.jsx(t.FeedbackItemCheckbox,{children:e.jsx(t.FeedbackItemCheckboxIndicator,{})}),e.jsx(t.FeedbackItemLabel,{}),e.jsx(t.FeedbackItemDescription,{})]}),e.jsxs(t.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(t.FeedbackItemCheckbox,{children:e.jsx(t.FeedbackItemCheckboxIndicator,{})}),e.jsx(t.FeedbackItemLabel,{}),e.jsx(t.FeedbackItemDescription,{})]}),e.jsxs(t.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(t.FeedbackItemCheckbox,{children:e.jsx(t.FeedbackItemCheckboxIndicator,{})}),e.jsx(t.FeedbackItemLabel,{}),e.jsx(t.FeedbackItemDescription,{})]}),e.jsxs(t.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(t.FeedbackItemCheckbox,{children:e.jsx(t.FeedbackItemCheckboxIndicator,{})}),e.jsx(t.FeedbackItemLabel,{})]}),e.jsx(t.FeedbackSubmitButton,{})]})})]})})})})}function $(){return e.jsxs(t.FormWrapper,{children:[e.jsx(t.FormClose,{}),e.jsxs(t.Form,{children:[e.jsxs(t.FormHeader,{children:[e.jsx(t.FormHeading,{}),e.jsx(t.FormDescription,{})]}),e.jsx(t.FormContent,{children:r=>e.jsxs(e.Fragment,{children:[r.map((s,n)=>e.jsxs(t.FormField,{field:s,autoFocus:n===0,children:[e.jsx(t.FormFieldLabel,{}),s.inputType==="text"&&e.jsx(t.FormFieldText,{}),s.inputType==="email"&&e.jsx(t.FormFieldEmail,{}),s.inputType==="file"&&e.jsx(t.FormFieldFile,{}),s.inputType==="textarea"&&e.jsx(t.FormFieldTextArea,{}),s.inputType==="checkbox"&&e.jsx(t.FormFieldCheckbox,{children:e.jsx(t.FormFieldCheckboxIndicator,{})}),s.inputType==="select"&&e.jsxs(t.FormFieldSelect,{children:[e.jsxs(t.FormFieldSelectTrigger,{children:[e.jsx(t.FormFieldSelectValue,{}),e.jsx(t.FormFieldSelectIcon,{})]}),e.jsx(t.FormFieldSelectContent,{children:e.jsx(t.FormFieldSelectViewport,{children:s.items.map(o=>e.jsxs(t.FormFieldSelectItem,{value:o.value,children:[e.jsx(t.FormFieldSelectItemText,{children:o.label}),e.jsx(t.FormFieldSelectItemIndicator,{})]},o.value))})})]}),s.inputType==="combobox"&&e.jsxs(t.FormFieldCombobox,{children:[e.jsxs(t.FormFieldComboboxControl,{children:["multiple"in s&&s.multiple&&e.jsx(t.FormFieldComboboxSelectedTags,{}),e.jsx(t.FormFieldComboboxInput,{}),e.jsx(t.FormFieldComboboxTrigger,{})]}),e.jsx(t.FormFieldComboboxPositioner,{children:e.jsx(t.FormFieldComboboxContent,{children:e.jsx(t.FormFieldComboboxList,{children:e.jsx(t.FormFieldComboboxListItems,{children:o=>o.length===0?e.jsx(t.FormFieldComboboxListEmpty,{}):o.map(i=>e.jsxs(t.FormFieldComboboxItem,{item:i,children:[e.jsx(t.FormFieldComboboxItemText,{children:i.label}),e.jsx(t.FormFieldComboboxItemIndicator,{})]},i.value))})})})})]}),e.jsx(t.FormFieldDescription,{}),e.jsx(t.FormFieldError,{})]},s.name)),e.jsx(t.FormError,{})]})}),e.jsxs(t.FormFooter,{children:[e.jsx(t.FormCancel,{}),e.jsx(t.FormSubmit,{})]})]}),e.jsxs(t.FormSuccess,{children:[e.jsx(t.FormSuccessHeading,{}),e.jsx(t.FormSuccessMessage,{}),e.jsx(t.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=w;exports.InkeepEmbeddedChatImpl=A;exports.InkeepEmbeddedChatImplContent=M;exports.InkeepEmbeddedChatProvider=I;