@inkeep/agents-ui 0.15.29 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +157 -158
  3. package/dist/primitives/atoms/markdown/index.cjs +1 -1
  4. package/dist/primitives/atoms/markdown/index.js +41 -39
  5. package/dist/primitives/components/embedded-chat.cjs +4 -4
  6. package/dist/primitives/components/embedded-chat.d.ts +5 -14
  7. package/dist/primitives/components/embedded-chat.js +800 -849
  8. package/dist/primitives/hooks/use-feedback-api.cjs +1 -0
  9. package/dist/primitives/hooks/use-feedback-api.d.ts +19 -0
  10. package/dist/primitives/hooks/use-feedback-api.js +37 -0
  11. package/dist/primitives/hooks/use-simple-scroll.cjs +1 -1
  12. package/dist/primitives/hooks/use-simple-scroll.d.ts +7 -0
  13. package/dist/primitives/hooks/use-simple-scroll.js +33 -30
  14. package/dist/primitives/index.cjs +1 -1
  15. package/dist/primitives/index.js +134 -136
  16. package/dist/primitives/providers/base-events-provider.cjs +1 -1
  17. package/dist/primitives/providers/base-events-provider.js +1 -1
  18. package/dist/primitives/providers/feedback-provider.cjs +1 -1
  19. package/dist/primitives/providers/feedback-provider.d.ts +1 -1
  20. package/dist/primitives/providers/feedback-provider.js +57 -64
  21. package/dist/primitives/providers/index.cjs +1 -1
  22. package/dist/primitives/providers/index.d.ts +0 -1
  23. package/dist/primitives/providers/index.js +42 -45
  24. package/dist/primitives/utils/component-ids.cjs +1 -1
  25. package/dist/primitives/utils/component-ids.d.ts +2 -6
  26. package/dist/primitives/utils/component-ids.js +1 -3
  27. package/dist/primitives/utils/default-settings.cjs +1 -1
  28. package/dist/primitives/utils/default-settings.d.ts +1 -0
  29. package/dist/primitives/utils/default-settings.js +6 -5
  30. package/dist/primitives/utils/misc.cjs +5 -1
  31. package/dist/primitives/utils/misc.d.ts +2 -1
  32. package/dist/primitives/utils/misc.js +45 -20
  33. package/dist/react/embedded-chat.cjs +1 -1
  34. package/dist/react/embedded-chat.js +249 -264
  35. package/dist/react/index.cjs +1 -1
  36. package/dist/react/index.js +157 -158
  37. package/dist/styled/components/embedded-chat.cjs +1 -1
  38. package/dist/styled/components/embedded-chat.d.ts +2 -4
  39. package/dist/styled/components/embedded-chat.js +381 -411
  40. package/dist/styled/components/index.cjs +1 -1
  41. package/dist/styled/components/index.js +12 -11
  42. package/dist/styled/components/message.cjs +1 -1
  43. package/dist/styled/components/message.d.ts +20 -0
  44. package/dist/styled/components/message.js +304 -230
  45. package/dist/styled/index.cjs +1 -1
  46. package/dist/styled/index.js +155 -156
  47. package/dist/styled/inkeep.css.cjs +79 -12
  48. package/dist/styled/inkeep.css.js +79 -12
  49. package/dist/types/config/ai.d.ts +7 -0
  50. package/dist/types/events.d.ts +3 -17
  51. package/package.json +1 -1
  52. package/dist/primitives/providers/feedback-item-provider.cjs +0 -1
  53. package/dist/primitives/providers/feedback-item-provider.d.ts +0 -10
  54. package/dist/primitives/providers/feedback-item-provider.js +0 -16
@@ -1,82 +1,75 @@
1
1
  "use client";
2
- import { jsx as y } from "react/jsx-runtime";
3
- import { createContext as P, useContext as E, useState as m, useCallback as b } from "react";
4
- import { useChat as f } from "../components/embedded-chat/chat-provider.js";
5
- import { getMessageContent as l } from "../utils/misc.js";
6
- import { useInkeepConfig as N } from "./config-provider.js";
7
- import { useBaseEvents as M } from "./base-events-provider.js";
8
- const F = P(void 0);
9
- function S() {
10
- const { baseSettings: e } = N(), [s, n] = m(null), [k, g] = m({}), { conversationId: r } = f(), { messages: c } = f(), { analyticsProperties: C } = e, { logEvent: p } = M(), i = b(
11
- async (t, o, a = []) => {
12
- const d = await e.onFeedback?.({
13
- type: o,
14
- messageId: t,
15
- reasons: a,
16
- properties: C
17
- });
18
- d && g((u) => ({
19
- ...u,
20
- [t]: { type: d.type, messageId: t, reasons: d.reasons }
21
- }));
22
- const v = c.findIndex((u) => u.id === t), x = c[v], w = {
23
- conversationId: r,
24
- question: l(c[v - 1]),
25
- answer: l(x),
26
- messageId: t,
27
- reasons: a
2
+ import { jsx as E } from "react/jsx-runtime";
3
+ import { createContext as N, useContext as M, useState as k, useCallback as b } from "react";
4
+ import { useChat as U } from "../components/embedded-chat/chat-provider.js";
5
+ import { getMessageContent as p } from "../utils/misc.js";
6
+ import { useInkeepConfig as j } from "./config-provider.js";
7
+ import { useBaseEvents as q } from "./base-events-provider.js";
8
+ import { useFeedbackApi as y } from "../hooks/use-feedback-api.js";
9
+ const m = N(void 0);
10
+ function B() {
11
+ const { baseSettings: t, aiChatSettings: n } = j(), [v, f] = k(null), [F, l] = k({}), { conversationId: a, messages: c, authToken: C, getCaptchaHeader: g, invalidateCaptcha: h, refreshSession: _ } = U(), { analyticsProperties: w } = t, { logEvent: d } = q(), { submitFeedback: x } = y({
12
+ baseUrl: n.baseUrl,
13
+ appId: n.appId,
14
+ authToken: C,
15
+ getCaptchaHeader: g,
16
+ invalidateCaptcha: h,
17
+ refreshSession: _
18
+ }), r = b(
19
+ async (e, s, i) => {
20
+ l((o) => ({ ...o, [e]: { type: s, messageId: e, details: i } })), t.onFeedback ? t.onFeedback({ type: s, messageId: e, details: i, properties: w }).catch(
21
+ (o) => console.warn("[feedback] onFeedback error:", o)
22
+ ) : x({ conversationId: a, messageId: e, type: s, details: i }).catch(
23
+ (o) => console.warn("[feedback] submitFeedbackToApi error:", o)
24
+ );
25
+ const u = c.findIndex((o) => o.id === e), T = c[u], A = {
26
+ conversationId: a,
27
+ question: p(c[u - 1]),
28
+ answer: p(T),
29
+ messageId: e,
30
+ details: i
28
31
  };
29
- p({
30
- eventName: o === "positive" ? "assistant_positive_feedback_submitted" : "assistant_negative_feedback_submitted",
31
- properties: w
32
- }), o === "negative" && p({
32
+ d({
33
+ eventName: s === "positive" ? "assistant_positive_feedback_submitted" : "assistant_negative_feedback_submitted",
34
+ properties: A
35
+ }), s === "negative" && d({
33
36
  eventName: "user_escalation_indicated",
34
37
  properties: {
35
38
  escalationType: "downvote",
36
- conversationId: r
39
+ conversationId: a
37
40
  }
38
41
  });
39
42
  },
40
- [c, r]
41
- ), _ = b(
42
- async (t) => {
43
- i(t, "positive");
43
+ [c, a]
44
+ ), P = b(
45
+ async (e) => {
46
+ r(e, "positive");
44
47
  },
45
- [i]
46
- ), h = b(
47
- async (t, o) => {
48
- const a = j(o);
49
- i(t, "negative", a);
48
+ [r]
49
+ ), S = b(
50
+ async (e, s) => {
51
+ r(e, "negative", s);
50
52
  },
51
- [i]
53
+ [r]
52
54
  );
53
55
  return {
54
- feedback: k,
55
- currentFeedback: s,
56
- setCurrentFeedback: n,
57
- submitPositiveFeedback: _,
58
- submitNegativeFeedback: h
56
+ feedback: F,
57
+ currentFeedback: v,
58
+ setCurrentFeedback: f,
59
+ submitPositiveFeedback: P,
60
+ submitNegativeFeedback: S
59
61
  };
60
62
  }
61
- const A = ({ children: e }) => {
62
- const s = S();
63
- return /* @__PURE__ */ y(F.Provider, { value: s, children: e });
64
- }, D = () => {
65
- const e = E(F);
66
- if (!e)
63
+ const L = ({ children: t }) => {
64
+ const n = B();
65
+ return /* @__PURE__ */ E(m.Provider, { value: n, children: t });
66
+ }, O = () => {
67
+ const t = M(m);
68
+ if (!t)
67
69
  throw new Error("useFeedback must be used within a FeedbackProvider");
68
- return e;
70
+ return t;
69
71
  };
70
- function j(e) {
71
- const s = [];
72
- for (const n in e)
73
- e[n] === "on" && s.push({
74
- label: n,
75
- details: e[`${n}:description`] || ""
76
- });
77
- return s.length > 0 ? s : [];
78
- }
79
72
  export {
80
- A as FeedbackProvider,
81
- D as useMessageFeedback
73
+ L as FeedbackProvider,
74
+ O as useMessageFeedback
82
75
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./base-events-provider.cjs"),o=require("./chat-form-provider.cjs"),d=require("./chat-history-provider.cjs"),i=require("./config-provider.cjs"),u=require("./feedback-item-provider.cjs"),n=require("./feedback-provider.cjs"),v=require("./form-field-provider.cjs"),t=require("./help-menu-provider.cjs"),P=require("./markdown-provider.cjs"),s=require("./message-provider.cjs"),h=require("./root-provider.cjs"),b=require("./source-item-provider.cjs"),C=require("./theme-provider.cjs"),c=require("./widget-provider.cjs"),e=require("./sidebar-chat-provider.cjs"),r=require("./chat-bubble-provider.cjs");exports.BaseEventsProvider=a.BaseEventsProvider;exports.useBaseEvents=a.useBaseEvents;exports.ChatFormProvider=o.ChatFormProvider;exports.useChatForm=o.useChatForm;exports.useChatFormState=o.useChatFormState;exports.ChatHistoryProvider=d.ChatHistoryProvider;exports.useChatHistory=d.useChatHistory;exports.InkeepConfigProvider=i.InkeepConfigProvider;exports.WebWidgetInteractionType=i.WebWidgetInteractionType;exports.useInkeepConfig=i.useInkeepConfig;exports.FeedbackItemProvider=u.FeedbackItemProvider;exports.useFeedbackItem=u.useFeedbackItem;exports.FeedbackProvider=n.FeedbackProvider;exports.useMessageFeedback=n.useMessageFeedback;exports.FormFieldProvider=v.FormFieldProvider;exports.useFormField=v.useFormField;exports.HelpMenuProvider=t.HelpMenuProvider;exports.useHelpMenu=t.useHelpMenu;exports.useHelpMenuState=t.useHelpMenuState;exports.ChatMarkdownProvider=P.ChatMarkdownProvider;exports.useChatMarkdown=P.useChatMarkdown;exports.MessageProvider=s.MessageProvider;exports.useMessage=s.useMessage;exports.useOptionalMessage=s.useOptionalMessage;exports.RootProvider=h.RootProvider;exports.SourceItemProvider=b.SourceItemProvider;exports.useSourceItem=b.useSourceItem;exports.ThemeProvider=C.ThemeProvider;exports.WidgetProvider=c.WidgetProvider;exports.useWidget=c.useWidget;exports.SidebarChatProvider=e.SidebarChatProvider;exports.useInkeepSidebarChat=e.useInkeepSidebarChat;exports.useOptionalSidebarChat=e.useOptionalSidebarChat;exports.useSidebarChat=e.useSidebarChat;exports.ChatBubbleProvider=r.ChatBubbleProvider;exports.useChatBubble=r.useChatBubble;exports.useInkeepChatBubble=r.useInkeepChatBubble;exports.useOptionalChatBubble=r.useOptionalChatBubble;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./base-events-provider.cjs"),o=require("./chat-form-provider.cjs"),u=require("./chat-history-provider.cjs"),i=require("./config-provider.cjs"),d=require("./feedback-provider.cjs"),n=require("./form-field-provider.cjs"),t=require("./help-menu-provider.cjs"),v=require("./markdown-provider.cjs"),s=require("./message-provider.cjs"),b=require("./root-provider.cjs"),P=require("./source-item-provider.cjs"),C=require("./theme-provider.cjs"),h=require("./widget-provider.cjs"),e=require("./sidebar-chat-provider.cjs"),r=require("./chat-bubble-provider.cjs");exports.BaseEventsProvider=a.BaseEventsProvider;exports.useBaseEvents=a.useBaseEvents;exports.ChatFormProvider=o.ChatFormProvider;exports.useChatForm=o.useChatForm;exports.useChatFormState=o.useChatFormState;exports.ChatHistoryProvider=u.ChatHistoryProvider;exports.useChatHistory=u.useChatHistory;exports.InkeepConfigProvider=i.InkeepConfigProvider;exports.WebWidgetInteractionType=i.WebWidgetInteractionType;exports.useInkeepConfig=i.useInkeepConfig;exports.FeedbackProvider=d.FeedbackProvider;exports.useMessageFeedback=d.useMessageFeedback;exports.FormFieldProvider=n.FormFieldProvider;exports.useFormField=n.useFormField;exports.HelpMenuProvider=t.HelpMenuProvider;exports.useHelpMenu=t.useHelpMenu;exports.useHelpMenuState=t.useHelpMenuState;exports.ChatMarkdownProvider=v.ChatMarkdownProvider;exports.useChatMarkdown=v.useChatMarkdown;exports.MessageProvider=s.MessageProvider;exports.useMessage=s.useMessage;exports.useOptionalMessage=s.useOptionalMessage;exports.RootProvider=b.RootProvider;exports.SourceItemProvider=P.SourceItemProvider;exports.useSourceItem=P.useSourceItem;exports.ThemeProvider=C.ThemeProvider;exports.WidgetProvider=h.WidgetProvider;exports.useWidget=h.useWidget;exports.SidebarChatProvider=e.SidebarChatProvider;exports.useInkeepSidebarChat=e.useInkeepSidebarChat;exports.useOptionalSidebarChat=e.useOptionalSidebarChat;exports.useSidebarChat=e.useSidebarChat;exports.ChatBubbleProvider=r.ChatBubbleProvider;exports.useChatBubble=r.useChatBubble;exports.useInkeepChatBubble=r.useInkeepChatBubble;exports.useOptionalChatBubble=r.useOptionalChatBubble;
@@ -2,7 +2,6 @@ export * from './base-events-provider';
2
2
  export * from './chat-form-provider';
3
3
  export * from './chat-history-provider';
4
4
  export * from './config-provider';
5
- export * from './feedback-item-provider';
6
5
  export * from './feedback-provider';
7
6
  export * from './form-field-provider';
8
7
  export * from './help-menu-provider';
@@ -1,56 +1,53 @@
1
1
  import { BaseEventsProvider as o, useBaseEvents as t } from "./base-events-provider.js";
2
- import { ChatFormProvider as s, useChatForm as i, useChatFormState as d } from "./chat-form-provider.js";
2
+ import { ChatFormProvider as s, useChatForm as i, useChatFormState as u } from "./chat-form-provider.js";
3
3
  import { ChatHistoryProvider as p, useChatHistory as m } from "./chat-history-provider.js";
4
- import { InkeepConfigProvider as n, WebWidgetInteractionType as v, useInkeepConfig as b } from "./config-provider.js";
5
- import { FeedbackItemProvider as h, useFeedbackItem as x } from "./feedback-item-provider.js";
6
- import { FeedbackProvider as l, useMessageFeedback as F } from "./feedback-provider.js";
7
- import { FormFieldProvider as g, useFormField as I } from "./form-field-provider.js";
8
- import { HelpMenuProvider as S, useHelpMenu as c, useHelpMenuState as B } from "./help-menu-provider.js";
9
- import { ChatMarkdownProvider as W, useChatMarkdown as y } from "./markdown-provider.js";
10
- import { MessageProvider as w, useMessage as E, useOptionalMessage as T } from "./message-provider.js";
11
- import { RootProvider as j } from "./root-provider.js";
12
- import { SourceItemProvider as z, useSourceItem as A } from "./source-item-provider.js";
13
- import { ThemeProvider as G } from "./theme-provider.js";
14
- import { WidgetProvider as K, useWidget as L } from "./widget-provider.js";
15
- import { SidebarChatProvider as Q, useInkeepSidebarChat as U, useOptionalSidebarChat as V, useSidebarChat as X } from "./sidebar-chat-provider.js";
16
- import { ChatBubbleProvider as Z, useChatBubble as _, useInkeepChatBubble as $, useOptionalChatBubble as ee } from "./chat-bubble-provider.js";
4
+ import { InkeepConfigProvider as f, WebWidgetInteractionType as v, useInkeepConfig as C } from "./config-provider.js";
5
+ import { FeedbackProvider as b, useMessageFeedback as x } from "./feedback-provider.js";
6
+ import { FormFieldProvider as l, useFormField as g } from "./form-field-provider.js";
7
+ import { HelpMenuProvider as M, useHelpMenu as k, useHelpMenuState as S } from "./help-menu-provider.js";
8
+ import { ChatMarkdownProvider as B, useChatMarkdown as c } from "./markdown-provider.js";
9
+ import { MessageProvider as W, useMessage as y, useOptionalMessage as O } from "./message-provider.js";
10
+ import { RootProvider as E } from "./root-provider.js";
11
+ import { SourceItemProvider as R, useSourceItem as j } from "./source-item-provider.js";
12
+ import { ThemeProvider as z } from "./theme-provider.js";
13
+ import { WidgetProvider as D, useWidget as G } from "./widget-provider.js";
14
+ import { SidebarChatProvider as K, useInkeepSidebarChat as L, useOptionalSidebarChat as N, useSidebarChat as Q } from "./sidebar-chat-provider.js";
15
+ import { ChatBubbleProvider as V, useChatBubble as X, useInkeepChatBubble as Y, useOptionalChatBubble as Z } from "./chat-bubble-provider.js";
17
16
  export {
18
17
  o as BaseEventsProvider,
19
- Z as ChatBubbleProvider,
18
+ V as ChatBubbleProvider,
20
19
  s as ChatFormProvider,
21
20
  p as ChatHistoryProvider,
22
- W as ChatMarkdownProvider,
23
- h as FeedbackItemProvider,
24
- l as FeedbackProvider,
25
- g as FormFieldProvider,
26
- S as HelpMenuProvider,
27
- n as InkeepConfigProvider,
28
- w as MessageProvider,
29
- j as RootProvider,
30
- Q as SidebarChatProvider,
31
- z as SourceItemProvider,
32
- G as ThemeProvider,
21
+ B as ChatMarkdownProvider,
22
+ b as FeedbackProvider,
23
+ l as FormFieldProvider,
24
+ M as HelpMenuProvider,
25
+ f as InkeepConfigProvider,
26
+ W as MessageProvider,
27
+ E as RootProvider,
28
+ K as SidebarChatProvider,
29
+ R as SourceItemProvider,
30
+ z as ThemeProvider,
33
31
  v as WebWidgetInteractionType,
34
- K as WidgetProvider,
32
+ D as WidgetProvider,
35
33
  t as useBaseEvents,
36
- _ as useChatBubble,
34
+ X as useChatBubble,
37
35
  i as useChatForm,
38
- d as useChatFormState,
36
+ u as useChatFormState,
39
37
  m as useChatHistory,
40
- y as useChatMarkdown,
41
- x as useFeedbackItem,
42
- I as useFormField,
43
- c as useHelpMenu,
44
- B as useHelpMenuState,
45
- $ as useInkeepChatBubble,
46
- b as useInkeepConfig,
47
- U as useInkeepSidebarChat,
48
- E as useMessage,
49
- F as useMessageFeedback,
50
- ee as useOptionalChatBubble,
51
- T as useOptionalMessage,
52
- V as useOptionalSidebarChat,
53
- X as useSidebarChat,
54
- A as useSourceItem,
55
- L as useWidget
38
+ c as useChatMarkdown,
39
+ g as useFormField,
40
+ k as useHelpMenu,
41
+ S as useHelpMenuState,
42
+ Y as useInkeepChatBubble,
43
+ C as useInkeepConfig,
44
+ L as useInkeepSidebarChat,
45
+ y as useMessage,
46
+ x as useMessageFeedback,
47
+ Z as useOptionalChatBubble,
48
+ O as useOptionalMessage,
49
+ N as useOptionalSidebarChat,
50
+ Q as useSidebarChat,
51
+ j as useSourceItem,
52
+ G as useWidget
56
53
  };
@@ -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"},e={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"},t={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",aiChatMessages:"aiChatMessages",aiChatMessageWrapper:"aiChatMessageWrapper",aiChatMessageHeader:"aiChatMessageHeader",aiChatMessageLoading:"aiChatMessageLoading",aiChatMessageAvatar:"aiChatMessageAvatar",aiChatMessageAvatarFallback:"aiChatMessageAvatarFallback",aiChatMessageAvatarImage:"aiChatMessageAvatarImage",aiChatMessageAvatarContent:"aiChatMessageAvatarContent",aiChatMessageName:"aiChatMessageName",aiChatMessageContentWrapper:"aiChatMessageContentWrapper",aiChatMessageContent:"aiChatMessageContent",aiChatMessage__Files:"aiChatMessage__Files",aiChatMessage__File:"aiChatMessage__File",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",aiChatInput__FileUploadButton:"aiChatInput__FileUploadButton",aiChatInput__FileUploadButtonIcon:"aiChatInput__FileUploadButtonIcon",aiChatInput__FileInput:"aiChatInput__FileInput",aiChatInput__FileList:"aiChatInput__FileList",aiChatInput__FileItem:"aiChatInput__FileItem",aiChatInput__FilePreviewTrigger:"aiChatInput__FilePreviewTrigger",aiChatInput__FileContent:"aiChatInput__FileContent",aiChatInput__FileThumbnail:"aiChatInput__FileThumbnail",aiChatInput__FileName:"aiChatInput__FileName",aiChatInput__FileRemove:"aiChatInput__FileRemove",aiChatInput__FileRemoveIcon:"aiChatInput__FileRemoveIcon",aiChatInput__DropZone:"aiChatInput__DropZone",aiChatInput__Notification:"aiChatInput__Notification",aiChatInput__NotificationContent:"aiChatInput__NotificationContent",aiChatInput__NotificationHeader:"aiChatInput__NotificationHeader",aiChatInput__NotificationTitle:"aiChatInput__NotificationTitle",aiChatInput__NotificationMessage:"aiChatInput__NotificationMessage",aiChatInput__NotificationClose:"aiChatInput__NotificationClose",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",aiChatFeedbackModal:"aiChatFeedbackModal",aiChatFeedbackModal__Overlay:"aiChatFeedbackModal__Overlay",aiChatFeedbackModal__Content:"aiChatFeedbackModal__Content",aiChatFeedbackModal__Header:"aiChatFeedbackModal__Header",aiChatFeedbackModal__Close:"aiChatFeedbackModal__Close",aiChatFeedbackModal__Body:"aiChatFeedbackModal__Body",aiChatImagePreviewModal:"aiChatImagePreviewModal",aiChatImagePreviewModal__Overlay:"aiChatImagePreviewModal__Overlay",aiChatImagePreviewModal__Content:"aiChatImagePreviewModal__Content",aiChatImagePreviewModal__Image:"aiChatImagePreviewModal__Image",aiChatImagePreviewModal__Footer:"aiChatImagePreviewModal__Footer",aiChatImagePreviewModal__FileName:"aiChatImagePreviewModal__FileName",aiChatImagePreviewModal__Close:"aiChatImagePreviewModal__Close",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"},i={modal:"modal",modal__Overlay:"modal__Overlay",modal__Content:"modal__Content",modal__Close:"modal__Close"},o={chatButton__Text:"chatButton__Text",chatButton__Button:"chatButton__Button",chatButton__Container:"chatButton__Container",chatButton__AvatarImage:"chatButton__AvatarImage",chatButton__AvatarContent:"chatButton__AvatarContent",chatButton__CloseIcon:"chatButton__CloseIcon"},r={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"},n={sidebarChat__Root:"sidebarChat__Root",sidebarChat__Resizer:"sidebarChat__Resizer",sidebarChat__CloseButton:"sidebarChat__CloseButton",sidebarChat__Header:"sidebarChat__Header"},h={chatBubble__Root:"chatBubble__Root",chatBubble__CloseButton:"chatBubble__CloseButton",chatBubble__Header:"chatBubble__Header"},s={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"},l={...e,...t,..._,...i,...o,...r,...a,...n,...h,...s,...C};exports.ChatBubbleComponentIds=h;exports.DataSummaryComponentIds=s;exports.SearchBarComponentIds=r;exports.SidebarChatComponentIds=n;exports.aiChatComponentIds=t;exports.aiChatHistoryComponentIds=C;exports.aiSearchComponentIds=_;exports.chatButtonComponentIds=o;exports.componentIDs=l;exports.markDownComponentIds=e;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"},e={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"},t={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",aiChatMessages:"aiChatMessages",aiChatMessageWrapper:"aiChatMessageWrapper",aiChatMessageHeader:"aiChatMessageHeader",aiChatMessageLoading:"aiChatMessageLoading",aiChatMessageAvatar:"aiChatMessageAvatar",aiChatMessageAvatarFallback:"aiChatMessageAvatarFallback",aiChatMessageAvatarImage:"aiChatMessageAvatarImage",aiChatMessageAvatarContent:"aiChatMessageAvatarContent",aiChatMessageName:"aiChatMessageName",aiChatMessageContentWrapper:"aiChatMessageContentWrapper",aiChatMessageContent:"aiChatMessageContent",aiChatMessage__Files:"aiChatMessage__Files",aiChatMessage__File:"aiChatMessage__File",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",aiChatInput__FileUploadButton:"aiChatInput__FileUploadButton",aiChatInput__FileUploadButtonIcon:"aiChatInput__FileUploadButtonIcon",aiChatInput__FileInput:"aiChatInput__FileInput",aiChatInput__FileList:"aiChatInput__FileList",aiChatInput__FileItem:"aiChatInput__FileItem",aiChatInput__FilePreviewTrigger:"aiChatInput__FilePreviewTrigger",aiChatInput__FileContent:"aiChatInput__FileContent",aiChatInput__FileThumbnail:"aiChatInput__FileThumbnail",aiChatInput__FileName:"aiChatInput__FileName",aiChatInput__FileRemove:"aiChatInput__FileRemove",aiChatInput__FileRemoveIcon:"aiChatInput__FileRemoveIcon",aiChatInput__DropZone:"aiChatInput__DropZone",aiChatInput__Notification:"aiChatInput__Notification",aiChatInput__NotificationContent:"aiChatInput__NotificationContent",aiChatInput__NotificationHeader:"aiChatInput__NotificationHeader",aiChatInput__NotificationTitle:"aiChatInput__NotificationTitle",aiChatInput__NotificationMessage:"aiChatInput__NotificationMessage",aiChatInput__NotificationClose:"aiChatInput__NotificationClose",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",aiChatFeedbackModal:"aiChatFeedbackModal",aiChatFeedbackModal__Overlay:"aiChatFeedbackModal__Overlay",aiChatFeedbackModal__Content:"aiChatFeedbackModal__Content",aiChatFeedbackModal__Header:"aiChatFeedbackModal__Header",aiChatFeedbackModal__Close:"aiChatFeedbackModal__Close",aiChatFeedbackModal__Body:"aiChatFeedbackModal__Body",aiChatImagePreviewModal:"aiChatImagePreviewModal",aiChatImagePreviewModal__Overlay:"aiChatImagePreviewModal__Overlay",aiChatImagePreviewModal__Content:"aiChatImagePreviewModal__Content",aiChatImagePreviewModal__Image:"aiChatImagePreviewModal__Image",aiChatImagePreviewModal__Footer:"aiChatImagePreviewModal__Footer",aiChatImagePreviewModal__FileName:"aiChatImagePreviewModal__FileName",aiChatImagePreviewModal__Close:"aiChatImagePreviewModal__Close",aiChatFeedbackForm:"aiChatFeedbackForm",aiChatFeedbackForm__Field:"aiChatFeedbackForm__Field",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"},i={modal:"modal",modal__Overlay:"modal__Overlay",modal__Content:"modal__Content",modal__Close:"modal__Close"},o={chatButton__Text:"chatButton__Text",chatButton__Button:"chatButton__Button",chatButton__Container:"chatButton__Container",chatButton__AvatarImage:"chatButton__AvatarImage",chatButton__AvatarContent:"chatButton__AvatarContent",chatButton__CloseIcon:"chatButton__CloseIcon"},r={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"},n={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"},h={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"},l={...e,...t,..._,...i,...o,...r,...a,...n,...s,...h,...C};exports.ChatBubbleComponentIds=s;exports.DataSummaryComponentIds=h;exports.SearchBarComponentIds=r;exports.SidebarChatComponentIds=n;exports.aiChatComponentIds=t;exports.aiChatHistoryComponentIds=C;exports.aiSearchComponentIds=_;exports.chatButtonComponentIds=o;exports.componentIDs=l;exports.markDownComponentIds=e;exports.miscellanousComponentIds=a;exports.modalComponentIds=i;
@@ -142,9 +142,7 @@ export declare const aiChatComponentIds: {
142
142
  aiChatImagePreviewModal__FileName: "aiChatImagePreviewModal__FileName";
143
143
  aiChatImagePreviewModal__Close: "aiChatImagePreviewModal__Close";
144
144
  aiChatFeedbackForm: "aiChatFeedbackForm";
145
- aiChatFeedbackItem: "aiChatFeedbackItem";
146
- aiChatFeedbackItem__Checkbox: "aiChatFeedbackItem__Checkbox";
147
- aiChatFeedbackItem__CheckboxIndicator: "aiChatFeedbackItem__CheckboxIndicator";
145
+ aiChatFeedbackForm__Field: "aiChatFeedbackForm__Field";
148
146
  aiChatFeedbackItem__Label: "aiChatFeedbackItem__Label";
149
147
  aiChatFeedbackItem__Description: "aiChatFeedbackItem__Description";
150
148
  aiChatFeedbackForm__SubmitButton: "aiChatFeedbackForm__SubmitButton";
@@ -534,9 +532,7 @@ export declare const componentIDs: {
534
532
  aiChatImagePreviewModal__FileName: "aiChatImagePreviewModal__FileName";
535
533
  aiChatImagePreviewModal__Close: "aiChatImagePreviewModal__Close";
536
534
  aiChatFeedbackForm: "aiChatFeedbackForm";
537
- aiChatFeedbackItem: "aiChatFeedbackItem";
538
- aiChatFeedbackItem__Checkbox: "aiChatFeedbackItem__Checkbox";
539
- aiChatFeedbackItem__CheckboxIndicator: "aiChatFeedbackItem__CheckboxIndicator";
535
+ aiChatFeedbackForm__Field: "aiChatFeedbackForm__Field";
540
536
  aiChatFeedbackItem__Label: "aiChatFeedbackItem__Label";
541
537
  aiChatFeedbackItem__Description: "aiChatFeedbackItem__Description";
542
538
  aiChatFeedbackForm__SubmitButton: "aiChatFeedbackForm__SubmitButton";
@@ -142,9 +142,7 @@ const a = {
142
142
  aiChatImagePreviewModal__FileName: "aiChatImagePreviewModal__FileName",
143
143
  aiChatImagePreviewModal__Close: "aiChatImagePreviewModal__Close",
144
144
  aiChatFeedbackForm: "aiChatFeedbackForm",
145
- aiChatFeedbackItem: "aiChatFeedbackItem",
146
- aiChatFeedbackItem__Checkbox: "aiChatFeedbackItem__Checkbox",
147
- aiChatFeedbackItem__CheckboxIndicator: "aiChatFeedbackItem__CheckboxIndicator",
145
+ aiChatFeedbackForm__Field: "aiChatFeedbackForm__Field",
148
146
  aiChatFeedbackItem__Label: "aiChatFeedbackItem__Label",
149
147
  aiChatFeedbackItem__Description: "aiChatFeedbackItem__Description",
150
148
  aiChatFeedbackForm__SubmitButton: "aiChatFeedbackForm__SubmitButton",
@@ -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={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:[],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}},i={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=i;
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:[],toolbarButtonLabels:{clear:"Clear",share:"Share",getHelp:"Get help",stop:"Stop",copyChat:"Copy"},context:{},shouldAutoScroll:!0},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;
@@ -24,6 +24,7 @@ export declare const defaultInkeepAIChatSettings: {
24
24
  copyChat: string;
25
25
  };
26
26
  context: {};
27
+ shouldAutoScroll: true;
27
28
  };
28
29
  export declare const defaultInkeepBaseSettings: {
29
30
  shouldBypassCaptcha: false;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { theme as e } from "../../theme/index.js";
3
3
  import { DEFAULT_PRIMARY_BRAND_COLOR as t } from "../../theme/colors.js";
4
- const i = {
4
+ const l = {
5
5
  baseUrl: "https://api.agents.inkeep.com",
6
6
  placeholder: "How do I get started?",
7
7
  aiAssistantName: void 0,
@@ -25,8 +25,9 @@ const i = {
25
25
  stop: "Stop",
26
26
  copyChat: "Copy"
27
27
  },
28
- context: {}
29
- }, l = {
28
+ context: {},
29
+ shouldAutoScroll: !0
30
+ }, i = {
30
31
  shouldBypassCaptcha: !1,
31
32
  tags: [],
32
33
  userProperties: {},
@@ -44,7 +45,7 @@ const i = {
44
45
  view: "single-pane"
45
46
  };
46
47
  export {
47
- i as defaultInkeepAIChatSettings,
48
- l as defaultInkeepBaseSettings,
48
+ l as defaultInkeepAIChatSettings,
49
+ i as defaultInkeepBaseSettings,
49
50
  o as defaultInkeepSearchSettings
50
51
  };
@@ -1 +1,5 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=(...t)=>(...e)=>{for(const n of t)n?.(...e)},s=t=>typeof t=="string";function r(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/__/g,"__").toLowerCase()}const c=t=>t?"":void 0;function i(t){const e=t.split(" "),n=e[0]??"",a=e.length>1?e[e.length-1]:"";return n&&a?`${n.charAt(0)}${a.charAt(0)}`:n.charAt(0)}function l(t,e){return typeof t=="function"?t(e):t}const g=t=>t.parts?.map(e=>e.type==="text"?e.text:e.type==="data-component"?JSON.stringify(e.data):null).join("")??"";exports.callAll=o;exports.dataAttr=c;exports.getInitials=i;exports.getMessageContent=g;exports.isString=s;exports.maybeRender=l;exports.toKebabCase=r;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=(...t)=>(...n)=>{for(const a of t)a?.(...n)},l=t=>typeof t=="string";function f(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/__/g,"__").toLowerCase()}const g=t=>t?"":void 0;function d(t){const n=t.split(" "),a=n[0]??"",o=n.length>1?n[n.length-1]:"";return a&&o?`${a.charAt(0)}${o.charAt(0)}`:a.charAt(0)}function m(t,n){return typeof t=="function"?t(n):t}function i(t){return t.type==="data-artifact"&&t.data?.type?.toLowerCase()==="citation"}const y=t=>{const n=e=>e.data?.artifactSummary?.title||e.data?.name||"Source",a=t.parts?.map(e=>{if(e.type==="text")return e.text;if(e.type==="data-component")return JSON.stringify(e.data);if(i(e)){const r=e.data?.artifactSummary?.url;return r?`[${n(e)}](${r})`:null}return null}).join("")??"",o=new Set,s=t.parts?.filter(i).filter(e=>{const r=e.data?.artifactSummary?.url;return!r||o.has(r)?!1:(o.add(r),!0)})??[];if(!s.length)return a;const c=`
2
+
3
+ **Sources:**
4
+ `+s.map(e=>{const r=e.data?.artifactSummary?.url;return`- [${n(e)}](${r})`}).join(`
5
+ `);return a+c};exports.callAll=u;exports.dataAttr=g;exports.getInitials=d;exports.getMessageContent=y;exports.isCitationArtifact=i;exports.isString=l;exports.maybeRender=m;exports.toKebabCase=f;
@@ -1,4 +1,4 @@
1
- import { Message } from '../../types/index.ts';
1
+ import { ArtifactPart, Message } from '../../types/index.ts';
2
2
  export declare const callAll: <T extends (...a: any[]) => void>(...fns: (T | undefined)[]) => (...a: Parameters<T>) => void;
3
3
  export declare const isString: (v: any) => v is string;
4
4
  /**
@@ -9,4 +9,5 @@ export type Booleanish = boolean | 'true' | 'false';
9
9
  export declare const dataAttr: (guard: boolean | undefined) => Booleanish;
10
10
  export declare function getInitials(name: string): string;
11
11
  export declare function maybeRender<T>(children: ((param: T) => React.ReactNode) | React.ReactNode, param: T): React.ReactNode;
12
+ export declare function isCitationArtifact(part: Message['parts'][number]): part is ArtifactPart;
12
13
  export declare const getMessageContent: (message: Message) => string;
@@ -1,31 +1,56 @@
1
1
  "use client";
2
- const a = (
2
+ const c = (
3
3
  // biome-ignore lint/suspicious/noExplicitAny: <explanation>
4
4
  (...t) => (...e) => {
5
- for (const n of t)
6
- n?.(...e);
5
+ for (const r of t)
6
+ r?.(...e);
7
7
  }
8
- ), s = (t) => typeof t == "string";
9
- function c(t) {
8
+ ), l = (t) => typeof t == "string";
9
+ function f(t) {
10
10
  return t.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/__/g, "__").toLowerCase();
11
11
  }
12
- const r = (t) => t ? "" : void 0;
13
- function i(t) {
14
- const e = t.split(" "), n = e[0] ?? "", o = e.length > 1 ? e[e.length - 1] : "";
15
- return n && o ? `${n.charAt(0)}${o.charAt(0)}` : n.charAt(0);
12
+ const m = (t) => t ? "" : void 0;
13
+ function d(t) {
14
+ const e = t.split(" "), r = e[0] ?? "", o = e.length > 1 ? e[e.length - 1] : "";
15
+ return r && o ? `${r.charAt(0)}${o.charAt(0)}` : r.charAt(0);
16
16
  }
17
- function l(t, e) {
17
+ function y(t, e) {
18
18
  return typeof t == "function" ? t(e) : t;
19
19
  }
20
- const f = (t) => t.parts?.map(
21
- (e) => e.type === "text" ? e.text : e.type === "data-component" ? JSON.stringify(e.data) : null
22
- ).join("") ?? "";
20
+ function s(t) {
21
+ return t.type === "data-artifact" && t.data?.type?.toLowerCase() === "citation";
22
+ }
23
+ const g = (t) => {
24
+ const e = (n) => n.data?.artifactSummary?.title || n.data?.name || "Source", r = t.parts?.map((n) => {
25
+ if (n.type === "text") return n.text;
26
+ if (n.type === "data-component") return JSON.stringify(n.data);
27
+ if (s(n)) {
28
+ const a = n.data?.artifactSummary?.url;
29
+ return a ? `[${e(n)}](${a})` : null;
30
+ }
31
+ return null;
32
+ }).join("") ?? "", o = /* @__PURE__ */ new Set(), i = t.parts?.filter(s).filter((n) => {
33
+ const a = n.data?.artifactSummary?.url;
34
+ return !a || o.has(a) ? !1 : (o.add(a), !0);
35
+ }) ?? [];
36
+ if (!i.length) return r;
37
+ const u = `
38
+
39
+ **Sources:**
40
+ ` + i.map((n) => {
41
+ const a = n.data?.artifactSummary?.url;
42
+ return `- [${e(n)}](${a})`;
43
+ }).join(`
44
+ `);
45
+ return r + u;
46
+ };
23
47
  export {
24
- a as callAll,
25
- r as dataAttr,
26
- i as getInitials,
27
- f as getMessageContent,
28
- s as isString,
29
- l as maybeRender,
30
- c as toKebabCase
48
+ c as callAll,
49
+ m as dataAttr,
50
+ d as getInitials,
51
+ g as getMessageContent,
52
+ s as isCitationArtifact,
53
+ l as isString,
54
+ y as maybeRender,
55
+ f as toKebabCase
31
56
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),s=require("../styled/components/embedded-chat.cjs"),a=require("../styled/components/chat-history.cjs"),p=require("../styled/components/modal.cjs"),v=require("../styled/components/shadow.cjs"),I=require("../styled/components/message.cjs"),H=require("../primitives/providers/chat-history-provider.cjs"),g=require("../primitives/providers/config-provider.cjs"),A=require("../primitives/providers/root-provider.cjs"),w=require("../primitives/providers/widget-provider.cjs"),M=require("../primitives/components/embedded-chat/chat-provider.cjs"),f=require("../primitives/components/modal/modal-provider.cjs"),F=require("../primitives/utils/misc.cjs"),E=require("../primitives/atoms/portal-with-theme.cjs"),P=require("../primitives/atoms/error-boundary.cjs"),L=require("./modal.cjs"),B=require("../primitives/providers/image-preview-provider.cjs"),D=require("./widget-toggle.cjs"),k=require("../primitives/components/embedded-chat/file-upload-input.cjs"),i=require("../styled/components/embedded-chat/file-upload-input.cjs"),m=require("../styled/components/embedded-chat/image-preview-modal.cjs");function q(r){const{baseSettings:t,aiChatSettings:n}=r;return e.jsx(P.ErrorBoundary,{children:e.jsx(v.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(A.RootProvider,{config:{baseSettings:t,aiChatSettings:n},componentType:g.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(T,{...r})})})})}function y(r){const{children:t,onToggleView:n,isHidden:o,shouldAutoFocusInput:d=!n}=r;return e.jsx(s.Provider,{isHidden:o,shouldAutoFocusInput:d,children:t})}function T(r){return e.jsx(y,{...r,children:e.jsx(S,{...r})})}function S(r){const{onToggleView:t,variant:n,header:o=W}=r,d=f.useModal(),l=w.useWidget(),x=d&&!l?L.ModalContent:b.Fragment;return e.jsx(B.ImagePreviewProvider,{children:e.jsx(x,{children:e.jsxs(s.Wrapper,{variant:n??(t?"no-shadow":"container-with-shadow"),"data-composite":F.dataAttr(!!r.onToggleView||d?.isOpen),children:[e.jsx(Z,{}),e.jsxs(s.Root,{children:[o&&e.jsx(o,{...r}),e.jsx(N,{}),e.jsx(U,{})]}),e.jsx(z,{}),e.jsx($,{}),e.jsx(J,{})]})})})}const W=r=>{const{onToggleView:t,askAILabel:n,searchLabel:o}=r,{aiChatSettings:d}=g.useInkeepConfig(),l=d.isChatHistoryButtonVisible,x=!!t||l;return e.jsx(s.Header,{"data-show-toolbar":F.dataAttr(x),children:x?e.jsxs(s.HeaderToolbar,{"data-show-widget-toggle":F.dataAttr(!!t),children:[e.jsx(s.HeaderToolbarWrapper,{children:l&&e.jsx(s.ChatHistoryTrigger,{})}),t&&e.jsx(D.WidgetToggle,{onToggleView:t,askAILabel:n,searchLabel:o,view:"chat"}),e.jsx(p.Close,{})]}):e.jsx(p.Close,{})})};function N(){const{isSessionLoading:r}=M.useChat();return e.jsx(s.Content,{children:e.jsxs(s.ContentScrollArea,{children:[e.jsx(s.ContentScrollAreaViewport,{children:r?e.jsx(s.MessagesSessionLoading,{}):e.jsx(_,{})}),e.jsx(s.ContentScrollAreaScrollbar,{children:e.jsx(s.ContentScrollAreaThumb,{})}),e.jsx(s.ContentScrollAreaCorner,{})]})})}function _(){const{aiChatSettings:{components:r}}=g.useInkeepConfig();return e.jsx(s.Messages,{children:({messages:t,isLoading:n,isStreaming:o})=>{const d=t.at(-1),l=(c,j)=>{const h=r?.[c];if(!h)return console.warn(`Component "${c}" not found in components config`),null;try{if(typeof h=="function"&&h.length<=1)return b.createElement(h,j);const u=h(j,document.createElement("div"),null);return b.isValidElement(u)||typeof u=="string"?u:null}catch(u){return console.error(`🔍 [renderComponent] Error rendering component "${c}":`,u),null}},x=c=>e.jsx(s.Markdown,{text:c});return e.jsxs(e.Fragment,{children:[e.jsx(V,{}),t.map(c=>{const j=d?.id===c.id;return e.jsxs(s.MessageWrapper,{message:c,children:[e.jsx(C,{}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:r?.IkpMessage?e.jsx(s.DynamicComponent,{name:"IkpMessage",props:{message:c,renderComponent:l,renderMarkdown:x},componentDef:r.IkpMessage}):e.jsxs(e.Fragment,{children:[e.jsx(I.EmbeddedChatMessagePart,{isLast:j}),(!o||!j)&&e.jsx(O,{})]})}),e.jsx(R,{}),e.jsx(Q,{})]})]},c.id)}),n&&d?.parts.length&&e.jsxs(s.MessageWrapper,{message:{id:"___loader___",role:"assistant",parts:[{type:"text",text:"Thinking..."}]},children:[e.jsx(C,{}),e.jsx(s.MessageLoading,{})]})]})}})}function V(){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(I.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 C(){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 $(){return e.jsx(E.PortalWithTheme,{children:e.jsx(m.EmbeddedChatImagePreviewModal,{children:e.jsx(m.EmbeddedChatImagePreviewModalOverlay,{children:e.jsxs(m.EmbeddedChatImagePreviewModalContent,{children:[e.jsx(m.EmbeddedChatImagePreviewModalClose,{}),e.jsx(m.EmbeddedChatImagePreviewModalImage,{}),e.jsx(m.EmbeddedChatImagePreviewModalFooter,{children:e.jsx(m.EmbeddedChatImagePreviewModalFileName,{})})]})})})})}function R(){return e.jsx(i.EmbeddedChatMessageFiles,{children:r=>r.map((t,n)=>{const o=t.url,d=t.mediaType??"",l=d.split("/").pop(),x=t.filename??(l?`untitled.${l}`:"untitled"),c=k.isImageMimeType(d);return e.jsxs(i.EmbeddedChatMessageFile,{url:o,name:x,mediaType:d,children:[c?e.jsx(i.EmbeddedChatFileThumbnail,{}):e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]},o||n)})})}function Q(){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 O(){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(b.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((d,l)=>e.jsx(s.MessageSourceItemDescriptionPart,{part:d},`part-${l}`))}),e.jsx(s.MessageSourceItemIndicator,{})]},n))})]})}function U(){return e.jsxs(s.Footer,{children:[e.jsx(i.EmbeddedChatInputNotification,{children:e.jsxs(i.EmbeddedChatInputNotificationContent,{children:[e.jsxs(i.EmbeddedChatInputNotificationHeader,{children:[e.jsx(i.EmbeddedChatInputNotificationTitle,{}),e.jsx(i.EmbeddedChatInputNotificationClose,{})]}),e.jsx(i.EmbeddedChatInputNotificationMessage,{})]})}),e.jsx(G,{}),e.jsx(K,{})]})}function G(){return e.jsxs(s.InputFieldset,{children:[e.jsx(i.EmbeddedChatFileInput,{}),e.jsx(i.EmbeddedChatDropZone,{children:"Drop files here to add to chat"}),e.jsx(i.EmbeddedChatFileList,{children:r=>r.map((t,n)=>{const o=k.isImageMimeType(t.type);return e.jsxs(i.EmbeddedChatFileItem,{file:t,children:[o?e.jsxs(i.EmbeddedChatFilePreviewTrigger,{children:[e.jsx(i.EmbeddedChatFileThumbnail,{}),e.jsx(i.EmbeddedChatFileName,{})]}):e.jsxs(i.EmbeddedChatFileContent,{children:[e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]}),e.jsx(i.EmbeddedChatFileRemove,{})]},`${t.name}-${t.lastModified}-${n}`)})}),e.jsxs(s.InputGroup,{children:[e.jsx(i.EmbeddedChatFileUploadButton,{}),e.jsx(s.Input,{}),e.jsx(s.SendButton,{children:e.jsx(s.SendButtonIcon,{})})]})]})}function K(){return e.jsxs(s.ActionBar,{children:[e.jsxs(s.TaglineContainer,{children:[e.jsx(s.TaglineText,{}),e.jsx(s.TaglineLogo,{})]}),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 Z(){const{sessions:r}=H.useChatHistory(),{conversationId:t}=M.useChat();return e.jsxs(a.EmbeddedChatHistoryRoot,{children:[e.jsxs(a.EmbeddedChatHistoryHeader,{children:[e.jsxs(a.EmbeddedChatHistoryBackButton,{children:[e.jsx(a.EmbeddedChatHistoryBackButtonIcon,{iconKey:"backToChat"}),"Back to chat"]}),e.jsx(a.EmbeddedChatHistoryTitle,{}),e.jsx(p.Close,{})]}),e.jsxs(a.EmbeddedChatHistoryList,{children:[r.map(n=>e.jsxs(a.EmbeddedChatHistoryItem,{sessionId:n.id,"data-active":F.dataAttr(n.id===t),children:[e.jsx(a.EmbeddedChatHistoryItemTitle,{children:n.title}),e.jsx(a.EmbeddedChatHistoryItemDate,{children:a.formatSessionDate(n.updatedAt)})]},n.id)),e.jsx(a.EmbeddedChatHistoryEmptyState,{}),e.jsx(a.EmbeddedChatHistoryLoadingState,{})]}),e.jsx(a.EmbeddedChatHistoryFooter,{children:e.jsx(a.EmbeddedChatHistoryNewConversationButton,{})})]})}function z(){return e.jsx(E.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 J(){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(d=>e.jsxs(s.FormFieldComboboxItem,{item:d,children:[e.jsx(s.FormFieldComboboxItemText,{children:d.label}),e.jsx(s.FormFieldComboboxItemIndicator,{})]},d.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=q;exports.InkeepEmbeddedChatImpl=T;exports.InkeepEmbeddedChatImplContent=S;exports.InkeepEmbeddedChatProvider=y;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),s=require("../styled/components/embedded-chat.cjs"),a=require("../styled/components/chat-history.cjs"),C=require("../styled/components/modal.cjs"),H=require("../styled/components/shadow.cjs"),I=require("../styled/components/message.cjs"),A=require("../primitives/providers/chat-history-provider.cjs"),b=require("../primitives/providers/config-provider.cjs"),w=require("../primitives/providers/root-provider.cjs"),k=require("../primitives/providers/widget-provider.cjs"),M=require("../primitives/components/embedded-chat/chat-provider.cjs"),f=require("../primitives/components/modal/modal-provider.cjs"),p=require("../primitives/utils/misc.cjs"),E=require("../primitives/atoms/portal-with-theme.cjs"),P=require("../primitives/atoms/error-boundary.cjs"),B=require("./modal.cjs"),L=require("../primitives/providers/image-preview-provider.cjs"),q=require("./widget-toggle.cjs"),y=require("../primitives/components/embedded-chat/file-upload-input.cjs"),i=require("../styled/components/embedded-chat/file-upload-input.cjs"),m=require("../styled/components/embedded-chat/image-preview-modal.cjs");function D(r){const{baseSettings:t,aiChatSettings:n}=r;return e.jsx(P.ErrorBoundary,{children:e.jsx(H.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(w.RootProvider,{config:{baseSettings:t,aiChatSettings:n},componentType:b.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(S,{...r})})})})}function T(r){const{children:t,onToggleView:n,isHidden:o,shouldAutoFocusInput:d=!n}=r;return e.jsx(s.Provider,{isHidden:o,shouldAutoFocusInput:d,children:t})}function S(r){return e.jsx(T,{...r,children:e.jsx(v,{...r})})}function v(r){const{onToggleView:t,variant:n,header:o=W}=r,d=f.useModal(),l=k.useWidget(),x=d&&!l?B.ModalContent:g.Fragment;return e.jsx(L.ImagePreviewProvider,{children:e.jsx(x,{children:e.jsxs(s.Wrapper,{variant:n??(t?"no-shadow":"container-with-shadow"),"data-composite":p.dataAttr(!!r.onToggleView||d?.isOpen),children:[e.jsx(Z,{}),e.jsxs(s.Root,{children:[o&&e.jsx(o,{...r}),e.jsx(N,{}),e.jsx(U,{})]}),e.jsx(z,{}),e.jsx(R,{}),e.jsx(J,{})]})})})}const W=r=>{const{onToggleView:t,askAILabel:n,searchLabel:o}=r,{aiChatSettings:d}=b.useInkeepConfig(),l=d.isChatHistoryButtonVisible,x=!!t||l;return e.jsx(s.Header,{"data-show-toolbar":p.dataAttr(x),children:x?e.jsxs(s.HeaderToolbar,{"data-show-widget-toggle":p.dataAttr(!!t),children:[e.jsx(s.HeaderToolbarWrapper,{children:l&&e.jsx(s.ChatHistoryTrigger,{})}),t&&e.jsx(q.WidgetToggle,{onToggleView:t,askAILabel:n,searchLabel:o,view:"chat"}),e.jsx(C.Close,{})]}):e.jsx(C.Close,{})})};function N(){const{isSessionLoading:r}=M.useChat();return e.jsx(s.Content,{children:e.jsxs(s.ContentScrollArea,{children:[e.jsx(s.ContentScrollAreaViewport,{children:r?e.jsx(s.MessagesSessionLoading,{}):e.jsx(V,{})}),e.jsx(s.ContentScrollAreaScrollbar,{children:e.jsx(s.ContentScrollAreaThumb,{})}),e.jsx(s.ContentScrollAreaCorner,{})]})})}function V(){const{aiChatSettings:{components:r}}=b.useInkeepConfig();return e.jsx(s.Messages,{children:({messages:t,isLoading:n,isStreaming:o})=>{const d=t.at(-1),l=(c,j)=>{const h=r?.[c];if(!h)return console.warn(`Component "${c}" not found in components config`),null;try{if(typeof h=="function"&&h.length<=1)return g.createElement(h,j);const u=h(j,document.createElement("div"),null);return g.isValidElement(u)||typeof u=="string"?u:null}catch(u){return console.error(`🔍 [renderComponent] Error rendering component "${c}":`,u),null}},x=c=>e.jsx(s.Markdown,{text:c});return e.jsxs(e.Fragment,{children:[e.jsx($,{}),t.map(c=>{const j=d?.id===c.id;return e.jsxs(s.MessageWrapper,{message:c,children:[e.jsx(F,{}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:r?.IkpMessage?e.jsx(s.DynamicComponent,{name:"IkpMessage",props:{message:c,renderComponent:l,renderMarkdown:x},componentDef:r.IkpMessage}):e.jsxs(e.Fragment,{children:[e.jsx(I.EmbeddedChatMessagePart,{isLast:j}),(!o||!j)&&e.jsx(O,{})]})}),e.jsx(_,{}),e.jsx(Q,{})]})]},c.id)}),n&&d?.role==="user"&&d?.parts.length&&e.jsxs(s.MessageWrapper,{message:{id:"___loader___",role:"assistant",parts:[{type:"text",text:"Thinking..."}]},children:[e.jsx(F,{}),e.jsx(s.MessageLoading,{})]})]})}})}function $(){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(I.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 F(){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 R(){return e.jsx(E.PortalWithTheme,{children:e.jsx(m.EmbeddedChatImagePreviewModal,{children:e.jsx(m.EmbeddedChatImagePreviewModalOverlay,{children:e.jsxs(m.EmbeddedChatImagePreviewModalContent,{children:[e.jsx(m.EmbeddedChatImagePreviewModalClose,{}),e.jsx(m.EmbeddedChatImagePreviewModalImage,{}),e.jsx(m.EmbeddedChatImagePreviewModalFooter,{children:e.jsx(m.EmbeddedChatImagePreviewModalFileName,{})})]})})})})}function _(){return e.jsx(i.EmbeddedChatMessageFiles,{children:r=>r.map((t,n)=>{const o=t.url,d=t.mediaType??"",l=d.split("/").pop(),x=t.filename??(l?`untitled.${l}`:"untitled"),c=y.isImageMimeType(d);return e.jsxs(i.EmbeddedChatMessageFile,{url:o,name:x,mediaType:d,children:[c?e.jsx(i.EmbeddedChatFileThumbnail,{}):e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]},o||n)})})}function Q(){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 O(){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(g.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((d,l)=>e.jsx(s.MessageSourceItemDescriptionPart,{part:d},`part-${l}`))}),e.jsx(s.MessageSourceItemIndicator,{})]},n))})]})}function U(){return e.jsxs(s.Footer,{children:[e.jsx(i.EmbeddedChatInputNotification,{children:e.jsxs(i.EmbeddedChatInputNotificationContent,{children:[e.jsxs(i.EmbeddedChatInputNotificationHeader,{children:[e.jsx(i.EmbeddedChatInputNotificationTitle,{}),e.jsx(i.EmbeddedChatInputNotificationClose,{})]}),e.jsx(i.EmbeddedChatInputNotificationMessage,{})]})}),e.jsx(G,{}),e.jsx(K,{})]})}function G(){return e.jsxs(s.InputFieldset,{children:[e.jsx(i.EmbeddedChatFileInput,{}),e.jsx(i.EmbeddedChatDropZone,{children:"Drop files here to add to chat"}),e.jsx(i.EmbeddedChatFileList,{children:r=>r.map((t,n)=>{const o=y.isImageMimeType(t.type);return e.jsxs(i.EmbeddedChatFileItem,{file:t,children:[o?e.jsxs(i.EmbeddedChatFilePreviewTrigger,{children:[e.jsx(i.EmbeddedChatFileThumbnail,{}),e.jsx(i.EmbeddedChatFileName,{})]}):e.jsxs(i.EmbeddedChatFileContent,{children:[e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]}),e.jsx(i.EmbeddedChatFileRemove,{})]},`${t.name}-${t.lastModified}-${n}`)})}),e.jsxs(s.InputGroup,{children:[e.jsx(i.EmbeddedChatFileUploadButton,{}),e.jsx(s.Input,{}),e.jsx(s.SendButton,{children:e.jsx(s.SendButtonIcon,{})})]})]})}function K(){return e.jsxs(s.ActionBar,{children:[e.jsxs(s.TaglineContainer,{children:[e.jsx(s.TaglineText,{}),e.jsx(s.TaglineLogo,{})]}),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 Z(){const{sessions:r}=A.useChatHistory(),{conversationId:t}=M.useChat();return e.jsxs(a.EmbeddedChatHistoryRoot,{children:[e.jsxs(a.EmbeddedChatHistoryHeader,{children:[e.jsxs(a.EmbeddedChatHistoryBackButton,{children:[e.jsx(a.EmbeddedChatHistoryBackButtonIcon,{iconKey:"backToChat"}),"Back to chat"]}),e.jsx(a.EmbeddedChatHistoryTitle,{}),e.jsx(C.Close,{})]}),e.jsxs(a.EmbeddedChatHistoryList,{children:[r.map(n=>e.jsxs(a.EmbeddedChatHistoryItem,{sessionId:n.id,"data-active":p.dataAttr(n.id===t),children:[e.jsx(a.EmbeddedChatHistoryItemTitle,{children:n.title}),e.jsx(a.EmbeddedChatHistoryItemDate,{children:a.formatSessionDate(n.updatedAt)})]},n.id)),e.jsx(a.EmbeddedChatHistoryEmptyState,{}),e.jsx(a.EmbeddedChatHistoryLoadingState,{})]}),e.jsx(a.EmbeddedChatHistoryFooter,{children:e.jsx(a.EmbeddedChatHistoryNewConversationButton,{})})]})}function z(){return e.jsx(E.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.FeedbackField,{children:[e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsx(s.FeedbackSubmitButton,{})]})})]})})})})}function J(){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(d=>e.jsxs(s.FormFieldComboboxItem,{item:d,children:[e.jsx(s.FormFieldComboboxItemText,{children:d.label}),e.jsx(s.FormFieldComboboxItemIndicator,{})]},d.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=D;exports.InkeepEmbeddedChatImpl=S;exports.InkeepEmbeddedChatImplContent=v;exports.InkeepEmbeddedChatProvider=T;