@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.
- package/dist/index.cjs +1 -1
- package/dist/index.js +157 -158
- package/dist/primitives/atoms/markdown/index.cjs +1 -1
- package/dist/primitives/atoms/markdown/index.js +41 -39
- package/dist/primitives/components/embedded-chat.cjs +4 -4
- package/dist/primitives/components/embedded-chat.d.ts +5 -14
- package/dist/primitives/components/embedded-chat.js +800 -849
- package/dist/primitives/hooks/use-feedback-api.cjs +1 -0
- package/dist/primitives/hooks/use-feedback-api.d.ts +19 -0
- package/dist/primitives/hooks/use-feedback-api.js +37 -0
- package/dist/primitives/hooks/use-simple-scroll.cjs +1 -1
- package/dist/primitives/hooks/use-simple-scroll.d.ts +7 -0
- package/dist/primitives/hooks/use-simple-scroll.js +33 -30
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.js +134 -136
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/providers/feedback-provider.cjs +1 -1
- package/dist/primitives/providers/feedback-provider.d.ts +1 -1
- package/dist/primitives/providers/feedback-provider.js +57 -64
- package/dist/primitives/providers/index.cjs +1 -1
- package/dist/primitives/providers/index.d.ts +0 -1
- package/dist/primitives/providers/index.js +42 -45
- package/dist/primitives/utils/component-ids.cjs +1 -1
- package/dist/primitives/utils/component-ids.d.ts +2 -6
- package/dist/primitives/utils/component-ids.js +1 -3
- package/dist/primitives/utils/default-settings.cjs +1 -1
- package/dist/primitives/utils/default-settings.d.ts +1 -0
- package/dist/primitives/utils/default-settings.js +6 -5
- package/dist/primitives/utils/misc.cjs +5 -1
- package/dist/primitives/utils/misc.d.ts +2 -1
- package/dist/primitives/utils/misc.js +45 -20
- package/dist/react/embedded-chat.cjs +1 -1
- package/dist/react/embedded-chat.js +249 -264
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +157 -158
- package/dist/styled/components/embedded-chat.cjs +1 -1
- package/dist/styled/components/embedded-chat.d.ts +2 -4
- package/dist/styled/components/embedded-chat.js +381 -411
- package/dist/styled/components/index.cjs +1 -1
- package/dist/styled/components/index.js +12 -11
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.d.ts +20 -0
- package/dist/styled/components/message.js +304 -230
- package/dist/styled/index.cjs +1 -1
- package/dist/styled/index.js +155 -156
- package/dist/styled/inkeep.css.cjs +79 -12
- package/dist/styled/inkeep.css.js +79 -12
- package/dist/types/config/ai.d.ts +7 -0
- package/dist/types/events.d.ts +3 -17
- package/package.json +1 -1
- package/dist/primitives/providers/feedback-item-provider.cjs +0 -1
- package/dist/primitives/providers/feedback-item-provider.d.ts +0 -10
- package/dist/primitives/providers/feedback-item-provider.js +0 -16
|
@@ -1,82 +1,75 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { useChat as
|
|
5
|
-
import { getMessageContent as
|
|
6
|
-
import { useInkeepConfig as
|
|
7
|
-
import { useBaseEvents as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
30
|
-
eventName:
|
|
31
|
-
properties:
|
|
32
|
-
}),
|
|
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:
|
|
39
|
+
conversationId: a
|
|
37
40
|
}
|
|
38
41
|
});
|
|
39
42
|
},
|
|
40
|
-
[c,
|
|
41
|
-
),
|
|
42
|
-
async (
|
|
43
|
-
|
|
43
|
+
[c, a]
|
|
44
|
+
), P = b(
|
|
45
|
+
async (e) => {
|
|
46
|
+
r(e, "positive");
|
|
44
47
|
},
|
|
45
|
-
[
|
|
46
|
-
),
|
|
47
|
-
async (
|
|
48
|
-
|
|
49
|
-
i(t, "negative", a);
|
|
48
|
+
[r]
|
|
49
|
+
), S = b(
|
|
50
|
+
async (e, s) => {
|
|
51
|
+
r(e, "negative", s);
|
|
50
52
|
},
|
|
51
|
-
[
|
|
53
|
+
[r]
|
|
52
54
|
);
|
|
53
55
|
return {
|
|
54
|
-
feedback:
|
|
55
|
-
currentFeedback:
|
|
56
|
-
setCurrentFeedback:
|
|
57
|
-
submitPositiveFeedback:
|
|
58
|
-
submitNegativeFeedback:
|
|
56
|
+
feedback: F,
|
|
57
|
+
currentFeedback: v,
|
|
58
|
+
setCurrentFeedback: f,
|
|
59
|
+
submitPositiveFeedback: P,
|
|
60
|
+
submitNegativeFeedback: S
|
|
59
61
|
};
|
|
60
62
|
}
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
},
|
|
65
|
-
const
|
|
66
|
-
if (!
|
|
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
|
|
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
|
-
|
|
81
|
-
|
|
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"),
|
|
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
|
|
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
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
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
|
-
|
|
18
|
+
V as ChatBubbleProvider,
|
|
20
19
|
s as ChatFormProvider,
|
|
21
20
|
p as ChatHistoryProvider,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
l as
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
z as
|
|
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
|
-
|
|
32
|
+
D as WidgetProvider,
|
|
35
33
|
t as useBaseEvents,
|
|
36
|
-
|
|
34
|
+
X as useChatBubble,
|
|
37
35
|
i as useChatForm,
|
|
38
|
-
|
|
36
|
+
u as useChatFormState,
|
|
39
37
|
m as useChatHistory,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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}},
|
|
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;
|
|
@@ -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
|
|
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
|
-
|
|
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
|
-
|
|
48
|
-
|
|
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
|
|
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
|
|
2
|
+
const c = (
|
|
3
3
|
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
4
4
|
(...t) => (...e) => {
|
|
5
|
-
for (const
|
|
6
|
-
|
|
5
|
+
for (const r of t)
|
|
6
|
+
r?.(...e);
|
|
7
7
|
}
|
|
8
|
-
),
|
|
9
|
-
function
|
|
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
|
|
13
|
-
function
|
|
14
|
-
const e = t.split(" "),
|
|
15
|
-
return
|
|
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
|
|
17
|
+
function y(t, e) {
|
|
18
18
|
return typeof t == "function" ? t(e) : t;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
s as
|
|
29
|
-
l as
|
|
30
|
-
|
|
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;
|