@inkeep/agents-ui 0.17.3 → 0.17.5
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/primitives/components/embedded-chat/file-upload-input.cjs +1 -1
- package/dist/primitives/components/embedded-chat/file-upload-input.js +179 -160
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/providers/chat-base-events-provider.cjs +1 -1
- package/dist/primitives/providers/chat-base-events-provider.js +1 -1
- package/dist/react/embedded-chat.cjs +1 -1
- package/dist/react/embedded-chat.js +249 -245
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.js +27 -13
- package/dist/styled/inkeep.css.cjs +3 -0
- package/dist/styled/inkeep.css.js +3 -0
- package/dist/types/config/ai.d.ts +22 -0
- package/dist/types/config/components.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,85 +1,85 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as d, Fragment as b } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import { Wrapper as
|
|
5
|
-
import { EmbeddedChatHistoryRoot as
|
|
3
|
+
import M, { Fragment as x } from "react";
|
|
4
|
+
import { Wrapper as Q, Root as $, Provider as _, Header as R, HeaderToolbar as O, HeaderToolbarWrapper as j, ChatHistoryTrigger as G, Content as U, ContentScrollArea as K, ContentScrollAreaViewport as Z, MessagesSessionLoading as z, ContentScrollAreaScrollbar as J, ContentScrollAreaThumb as X, ContentScrollAreaCorner as Y, Footer as q, FeedbackModal as ee, FeedbackModalOverlay as de, FeedbackModalContent as te, FeedbackModalHeader as ae, FeedbackModalClose as oe, FeedbackModalBody as re, FeedbackForm as ne, FeedbackField as ie, FeedbackItemLabel as me, FeedbackItemDescription as se, FeedbackSubmitButton as le, FormWrapper as ce, FormClose as he, Form as be, FormHeader as Ce, FormHeading as Fe, FormDescription as Ee, FormContent as pe, FormField as ue, FormFieldLabel as ge, FormFieldText as Ie, FormFieldEmail as Me, FormFieldFile as Se, FormFieldTextArea as Te, FormFieldCheckbox as xe, FormFieldCheckboxIndicator as Ae, FormFieldSelect as He, FormFieldSelectTrigger as fe, FormFieldSelectValue as ye, FormFieldSelectIcon as ke, FormFieldSelectContent as ve, FormFieldSelectViewport as we, FormFieldSelectItem as Le, FormFieldSelectItemText as Be, FormFieldSelectItemIndicator as De, FormFieldCombobox as Pe, FormFieldComboboxControl as We, FormFieldComboboxSelectedTags as Ve, FormFieldComboboxInput as Ne, FormFieldComboboxTrigger as Qe, FormFieldComboboxPositioner as $e, FormFieldComboboxContent as _e, FormFieldComboboxList as Re, FormFieldComboboxListItems as Oe, FormFieldComboboxListEmpty as je, FormFieldComboboxItem as Ge, FormFieldComboboxItemText as Ue, FormFieldComboboxItemIndicator as Ke, FormFieldDescription as Ze, FormFieldError as ze, FormError as Je, FormFooter as Xe, FormCancel as Ye, FormSubmit as qe, FormSuccess as ed, FormSuccessHeading as dd, FormSuccessMessage as td, FormSuccessButton as ad, Messages as od, MessageWrapper as S, MessageContentWrapper as A, MessageContent as H, DynamicComponent as rd, MessageLoading as nd, InputFieldset as id, InputGroup as md, Input as sd, SendButton as ld, SendButtonIcon as cd, ActionBar as hd, TaglineContainer as bd, TaglineText as Cd, TaglineLogo as Fd, Actions as Ed, HelpActions as pd, HelpAction as ud, HelpActionsTrigger as gd, HelpActionsMenu as Id, HelpActionsMenuArrow as Md, HelpActionsMenuItem as Sd, HelpActionsMenuItemIcon as Td, ChatAction as E, ChatActionLabel as xd, ChatActionFeedback as Ad, IntroMessageWrapper as Hd, MessageHeader as f, MessageAvatar as y, MessageAvatarContent as k, MessageAvatarImage as v, MessageName as w, Disclaimer as fd, DisclaimerLabel as yd, DisclaimerTrigger as kd, DisclaimerContent as vd, DisclaimerText as wd, DisclaimerArrow as Ld, ExampleQuestions as Bd, ExampleQuestionsLabel as Dd, ExampleQuestionsList as Pd, ExampleQuestion as Wd, ExampleQuestionButton as Vd, Markdown as Nd, MessageSources as Qd, MessageSourcesHeader as $d, MessageSourcesList as _d, MessageSourceItem as Rd, MessageSourceItemBreadcrumbs as Od, MessageSourceItemBreadcrumbIcon as jd, MessageSourceItemIcon as Gd, MessageSourceItemTitle as Ud, MessageSourceItemTag as Kd, MessageSourceItemDescription as Zd, MessageSourceItemDescriptionPart as zd, MessageSourceItemIndicator as Jd, MessageToolbar as Xd, MessageCustomActions as Yd, MessageCustomAction as qd, MessageAction as p } from "../styled/components/embedded-chat.js";
|
|
5
|
+
import { EmbeddedChatHistoryRoot as et, EmbeddedChatHistoryHeader as dt, EmbeddedChatHistoryBackButton as tt, EmbeddedChatHistoryBackButtonIcon as at, EmbeddedChatHistoryTitle as ot, EmbeddedChatHistoryList as rt, EmbeddedChatHistoryItem as nt, EmbeddedChatHistoryItemTitle as it, EmbeddedChatHistoryItemDate as mt, formatSessionDate as st, EmbeddedChatHistoryEmptyState as lt, EmbeddedChatHistoryLoadingState as ct, EmbeddedChatHistoryFooter as ht, EmbeddedChatHistoryNewConversationButton as bt } from "../styled/components/chat-history.js";
|
|
6
6
|
import { Close as u } from "../styled/components/modal.js";
|
|
7
|
-
import { Shadow as
|
|
8
|
-
import { EmbeddedChatMessagePart as
|
|
9
|
-
import { ChatAuthProvider as
|
|
10
|
-
import { ChatBaseEventsProvider as
|
|
11
|
-
import { useChatHistory as
|
|
12
|
-
import { WebWidgetInteractionType as
|
|
13
|
-
import { RootProvider as
|
|
14
|
-
import { useWidget as
|
|
15
|
-
import { useChat as
|
|
16
|
-
import { useModal as
|
|
7
|
+
import { Shadow as Ct } from "../styled/components/shadow.js";
|
|
8
|
+
import { EmbeddedChatMessagePart as L } from "../styled/components/message.js";
|
|
9
|
+
import { ChatAuthProvider as Ft } from "../primitives/providers/chat-auth-provider.js";
|
|
10
|
+
import { ChatBaseEventsProvider as Et } from "../primitives/providers/chat-base-events-provider.js";
|
|
11
|
+
import { useChatHistory as pt } from "../primitives/providers/chat-history-provider.js";
|
|
12
|
+
import { WebWidgetInteractionType as ut, useInkeepConfig as B } from "../primitives/providers/config-provider.js";
|
|
13
|
+
import { RootProvider as gt } from "../primitives/providers/root-provider.js";
|
|
14
|
+
import { useWidget as It } from "../primitives/providers/widget-provider.js";
|
|
15
|
+
import { useChat as D } from "../primitives/components/embedded-chat/chat-provider.js";
|
|
16
|
+
import { useModal as Mt } from "../primitives/components/modal/modal-provider.js";
|
|
17
17
|
import { dataAttr as C } from "../primitives/utils/misc.js";
|
|
18
|
-
import { PortalWithTheme as
|
|
19
|
-
import { ErrorBoundary as
|
|
20
|
-
import { ModalContent as
|
|
21
|
-
import { ImagePreviewProvider as
|
|
22
|
-
import { WidgetToggle as
|
|
23
|
-
import { isImageMimeType as
|
|
24
|
-
import { EmbeddedChatInputNotification as
|
|
25
|
-
import { EmbeddedChatImagePreviewModal as
|
|
26
|
-
function
|
|
18
|
+
import { PortalWithTheme as P } from "../primitives/atoms/portal-with-theme.js";
|
|
19
|
+
import { ErrorBoundary as St } from "../primitives/atoms/error-boundary.js";
|
|
20
|
+
import { ModalContent as Tt } from "./modal.js";
|
|
21
|
+
import { ImagePreviewProvider as xt } from "../primitives/providers/image-preview-provider.js";
|
|
22
|
+
import { WidgetToggle as At } from "./widget-toggle.js";
|
|
23
|
+
import { isImageMimeType as W } from "../primitives/components/embedded-chat/file-upload-input.js";
|
|
24
|
+
import { EmbeddedChatInputNotification as Ht, EmbeddedChatInputNotificationContent as ft, EmbeddedChatInputNotificationHeader as yt, EmbeddedChatInputNotificationTitle as kt, EmbeddedChatInputNotificationClose as vt, EmbeddedChatInputNotificationMessage as wt, EmbeddedChatFileInput as Lt, EmbeddedChatDropZone as Bt, EmbeddedChatFileList as Dt, EmbeddedChatFileItem as Pt, EmbeddedChatFilePreviewTrigger as Wt, EmbeddedChatFileThumbnail as V, EmbeddedChatFileName as g, EmbeddedChatFileContent as Vt, EmbeddedChatFileTypeIcon as N, EmbeddedChatFileRemove as Nt, EmbeddedChatFileUploadButton as Qt, EmbeddedChatMessageFiles as $t, EmbeddedChatMessageFile as _t } from "../styled/components/embedded-chat/file-upload-input.js";
|
|
25
|
+
import { EmbeddedChatImagePreviewModal as Rt, EmbeddedChatImagePreviewModalOverlay as Ot, EmbeddedChatImagePreviewModalContent as jt, EmbeddedChatImagePreviewModalClose as Gt, EmbeddedChatImagePreviewModalImage as Ut, EmbeddedChatImagePreviewModalFooter as Kt, EmbeddedChatImagePreviewModalFileName as Zt } from "../styled/components/embedded-chat/image-preview-modal.js";
|
|
26
|
+
function Wa(a) {
|
|
27
27
|
const { baseSettings: t, aiChatSettings: o } = a;
|
|
28
|
-
return /* @__PURE__ */ e(
|
|
29
|
-
|
|
28
|
+
return /* @__PURE__ */ e(St, { children: /* @__PURE__ */ e(
|
|
29
|
+
Ct,
|
|
30
30
|
{
|
|
31
31
|
wrapperStyles: {
|
|
32
32
|
height: "inherit",
|
|
33
33
|
width: "inherit"
|
|
34
34
|
},
|
|
35
35
|
children: /* @__PURE__ */ e(
|
|
36
|
-
|
|
36
|
+
gt,
|
|
37
37
|
{
|
|
38
38
|
config: {
|
|
39
39
|
baseSettings: t,
|
|
40
40
|
aiChatSettings: o
|
|
41
41
|
},
|
|
42
|
-
componentType:
|
|
43
|
-
children: /* @__PURE__ */ e(
|
|
42
|
+
componentType: ut.EmbeddedChat,
|
|
43
|
+
children: /* @__PURE__ */ e(Jt, { ...a })
|
|
44
44
|
}
|
|
45
45
|
)
|
|
46
46
|
}
|
|
47
47
|
) });
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function zt(a) {
|
|
50
50
|
const { children: t, onToggleView: o, isHidden: r, shouldAutoFocusInput: n = !o } = a;
|
|
51
|
-
return /* @__PURE__ */ e(
|
|
51
|
+
return /* @__PURE__ */ e(Ft, { children: /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ e(_, { isHidden: r, shouldAutoFocusInput: n, children: t }) }) });
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
return /* @__PURE__ */ e(
|
|
53
|
+
function Jt(a) {
|
|
54
|
+
return /* @__PURE__ */ e(zt, { ...a, children: /* @__PURE__ */ e(Xt, { ...a }) });
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
const { onToggleView: t, variant: o, header: r =
|
|
58
|
-
return /* @__PURE__ */ e(
|
|
59
|
-
|
|
56
|
+
function Xt(a) {
|
|
57
|
+
const { onToggleView: t, variant: o, header: r = Yt } = a, n = Mt(), i = It();
|
|
58
|
+
return /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ e(n && !i ? Tt : x, { children: /* @__PURE__ */ d(
|
|
59
|
+
Q,
|
|
60
60
|
{
|
|
61
61
|
variant: o ?? (t ? "no-shadow" : "container-with-shadow"),
|
|
62
62
|
"data-composite": C(!!a.onToggleView || n?.isOpen),
|
|
63
63
|
children: [
|
|
64
|
-
/* @__PURE__ */ e(
|
|
65
|
-
/* @__PURE__ */ d(
|
|
64
|
+
/* @__PURE__ */ e(sa, {}),
|
|
65
|
+
/* @__PURE__ */ d($, { children: [
|
|
66
66
|
r && /* @__PURE__ */ e(r, { ...a }),
|
|
67
|
-
/* @__PURE__ */ e(
|
|
68
|
-
/* @__PURE__ */ e(
|
|
67
|
+
/* @__PURE__ */ e(qt, {}),
|
|
68
|
+
/* @__PURE__ */ e(na, {})
|
|
69
69
|
] }),
|
|
70
|
-
/* @__PURE__ */ e(
|
|
71
|
-
/* @__PURE__ */ e(
|
|
72
|
-
/* @__PURE__ */ e(
|
|
70
|
+
/* @__PURE__ */ e(la, {}),
|
|
71
|
+
/* @__PURE__ */ e(ta, {}),
|
|
72
|
+
/* @__PURE__ */ e(ca, {})
|
|
73
73
|
]
|
|
74
74
|
}
|
|
75
75
|
) }) });
|
|
76
76
|
}
|
|
77
|
-
const
|
|
78
|
-
const { onToggleView: t, askAILabel: o, searchLabel: r } = a, { aiChatSettings: n } =
|
|
79
|
-
return /* @__PURE__ */ e(
|
|
80
|
-
/* @__PURE__ */ e(
|
|
77
|
+
const Yt = (a) => {
|
|
78
|
+
const { onToggleView: t, askAILabel: o, searchLabel: r } = a, { aiChatSettings: n } = B(), i = n.isChatHistoryButtonVisible, s = !!t || i;
|
|
79
|
+
return /* @__PURE__ */ e(R, { "data-show-toolbar": C(s), children: s ? /* @__PURE__ */ d(O, { "data-show-widget-toggle": C(!!t), children: [
|
|
80
|
+
/* @__PURE__ */ e(j, { children: i && /* @__PURE__ */ e(G, {}) }),
|
|
81
81
|
t && /* @__PURE__ */ e(
|
|
82
|
-
|
|
82
|
+
At,
|
|
83
83
|
{
|
|
84
84
|
onToggleView: t,
|
|
85
85
|
askAILabel: o,
|
|
@@ -90,57 +90,61 @@ const Jt = (a) => {
|
|
|
90
90
|
/* @__PURE__ */ e(u, {})
|
|
91
91
|
] }) : /* @__PURE__ */ e(u, {}) });
|
|
92
92
|
};
|
|
93
|
-
function
|
|
94
|
-
const { isSessionLoading: a } =
|
|
95
|
-
return /* @__PURE__ */ e(
|
|
96
|
-
/* @__PURE__ */ e(
|
|
97
|
-
/* @__PURE__ */ e(
|
|
98
|
-
/* @__PURE__ */ e(
|
|
93
|
+
function qt() {
|
|
94
|
+
const { isSessionLoading: a } = D();
|
|
95
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ d(K, { children: [
|
|
96
|
+
/* @__PURE__ */ e(Z, { children: a ? /* @__PURE__ */ e(z, {}) : /* @__PURE__ */ e(ea, {}) }),
|
|
97
|
+
/* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(X, {}) }),
|
|
98
|
+
/* @__PURE__ */ e(Y, {})
|
|
99
99
|
] }) });
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function ea() {
|
|
102
102
|
const {
|
|
103
103
|
aiChatSettings: { components: a }
|
|
104
|
-
} =
|
|
105
|
-
return /* @__PURE__ */ e(
|
|
106
|
-
const n = t.at(-1),
|
|
107
|
-
const c = a?.[
|
|
104
|
+
} = B();
|
|
105
|
+
return /* @__PURE__ */ e(od, { children: ({ messages: t, isLoading: o, isStreaming: r }) => {
|
|
106
|
+
const n = t.at(-1), i = (m) => (l, F) => {
|
|
107
|
+
const c = a?.[l];
|
|
108
108
|
if (!c)
|
|
109
|
-
return console.warn(`Component "${
|
|
109
|
+
return console.warn(`Component "${l}" not found in components config`), null;
|
|
110
|
+
const I = { ...F, messageId: m.id };
|
|
110
111
|
try {
|
|
111
112
|
if (typeof c == "function" && c.length <= 1)
|
|
112
|
-
return
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
return M.createElement(
|
|
114
|
+
c,
|
|
115
|
+
I
|
|
116
|
+
);
|
|
117
|
+
const h = c(I, document.createElement("div"), null);
|
|
118
|
+
return M.isValidElement(h) || typeof h == "string" ? h : null;
|
|
115
119
|
} catch (h) {
|
|
116
|
-
return console.error(`🔍 [renderComponent] Error rendering component "${
|
|
120
|
+
return console.error(`🔍 [renderComponent] Error rendering component "${l}":`, h), null;
|
|
117
121
|
}
|
|
118
|
-
}, s = (
|
|
122
|
+
}, s = (m) => /* @__PURE__ */ e(Nd, { text: m });
|
|
119
123
|
return /* @__PURE__ */ d(b, { children: [
|
|
120
|
-
/* @__PURE__ */ e(
|
|
121
|
-
t.map((
|
|
122
|
-
const l = n?.id ===
|
|
123
|
-
return /* @__PURE__ */ d(
|
|
124
|
-
/* @__PURE__ */ e(
|
|
125
|
-
/* @__PURE__ */ d(
|
|
126
|
-
/* @__PURE__ */ e(
|
|
127
|
-
|
|
124
|
+
/* @__PURE__ */ e(da, {}),
|
|
125
|
+
t.map((m) => {
|
|
126
|
+
const l = n?.id === m.id, F = i(m);
|
|
127
|
+
return /* @__PURE__ */ d(S, { message: m, children: [
|
|
128
|
+
/* @__PURE__ */ e(T, {}),
|
|
129
|
+
/* @__PURE__ */ d(A, { children: [
|
|
130
|
+
/* @__PURE__ */ e(H, { children: a?.IkpMessage ? /* @__PURE__ */ e(
|
|
131
|
+
rd,
|
|
128
132
|
{
|
|
129
133
|
name: "IkpMessage",
|
|
130
|
-
props: { message:
|
|
134
|
+
props: { message: m, renderComponent: F, renderMarkdown: s },
|
|
131
135
|
componentDef: a.IkpMessage
|
|
132
136
|
}
|
|
133
137
|
) : /* @__PURE__ */ d(b, { children: [
|
|
134
|
-
/* @__PURE__ */ e(
|
|
135
|
-
(!r || !l) && /* @__PURE__ */ e(
|
|
138
|
+
/* @__PURE__ */ e(L, { isLast: l }),
|
|
139
|
+
(!r || !l) && /* @__PURE__ */ e(ra, {})
|
|
136
140
|
] }) }),
|
|
137
|
-
/* @__PURE__ */ e(
|
|
138
|
-
/* @__PURE__ */ e(
|
|
141
|
+
/* @__PURE__ */ e(aa, {}),
|
|
142
|
+
/* @__PURE__ */ e(oa, {})
|
|
139
143
|
] })
|
|
140
|
-
] },
|
|
144
|
+
] }, m.id);
|
|
141
145
|
}),
|
|
142
146
|
o && n?.role === "user" && n?.parts.length && /* @__PURE__ */ d(
|
|
143
|
-
|
|
147
|
+
S,
|
|
144
148
|
{
|
|
145
149
|
message: {
|
|
146
150
|
id: "___loader___",
|
|
@@ -148,36 +152,36 @@ function Yt() {
|
|
|
148
152
|
parts: [{ type: "text", text: "Thinking..." }]
|
|
149
153
|
},
|
|
150
154
|
children: [
|
|
151
|
-
/* @__PURE__ */ e(
|
|
152
|
-
/* @__PURE__ */ e(
|
|
155
|
+
/* @__PURE__ */ e(T, {}),
|
|
156
|
+
/* @__PURE__ */ e(nd, {})
|
|
153
157
|
]
|
|
154
158
|
}
|
|
155
159
|
)
|
|
156
160
|
] });
|
|
157
161
|
} });
|
|
158
162
|
}
|
|
159
|
-
function
|
|
160
|
-
return /* @__PURE__ */ d(
|
|
161
|
-
/* @__PURE__ */ d(
|
|
162
|
-
/* @__PURE__ */ e(
|
|
163
|
-
/* @__PURE__ */ e(
|
|
163
|
+
function da() {
|
|
164
|
+
return /* @__PURE__ */ d(Hd, { children: [
|
|
165
|
+
/* @__PURE__ */ d(f, { children: [
|
|
166
|
+
/* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(v, {}) }) }),
|
|
167
|
+
/* @__PURE__ */ e(w, {})
|
|
164
168
|
] }),
|
|
165
|
-
/* @__PURE__ */ d(
|
|
166
|
-
/* @__PURE__ */ e(
|
|
167
|
-
/* @__PURE__ */ d(
|
|
168
|
-
/* @__PURE__ */ e(
|
|
169
|
-
/* @__PURE__ */ e(
|
|
170
|
-
/* @__PURE__ */ d(
|
|
171
|
-
/* @__PURE__ */ e(
|
|
172
|
-
/* @__PURE__ */ e(
|
|
169
|
+
/* @__PURE__ */ d(A, { children: [
|
|
170
|
+
/* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(L, { isLast: !1 }) }),
|
|
171
|
+
/* @__PURE__ */ d(fd, { children: [
|
|
172
|
+
/* @__PURE__ */ e(yd, {}),
|
|
173
|
+
/* @__PURE__ */ e(kd, {}),
|
|
174
|
+
/* @__PURE__ */ d(vd, { children: [
|
|
175
|
+
/* @__PURE__ */ e(wd, {}),
|
|
176
|
+
/* @__PURE__ */ e(Ld, {})
|
|
173
177
|
] })
|
|
174
178
|
] }),
|
|
175
|
-
/* @__PURE__ */ d(
|
|
176
|
-
/* @__PURE__ */ e(
|
|
177
|
-
/* @__PURE__ */ e(
|
|
178
|
-
|
|
179
|
+
/* @__PURE__ */ d(Bd, { children: [
|
|
180
|
+
/* @__PURE__ */ e(Dd, {}),
|
|
181
|
+
/* @__PURE__ */ e(Pd, { children: (a) => a.map((t) => /* @__PURE__ */ e(
|
|
182
|
+
Wd,
|
|
179
183
|
{
|
|
180
|
-
children: /* @__PURE__ */ e(
|
|
184
|
+
children: /* @__PURE__ */ e(Vd, { question: t })
|
|
181
185
|
},
|
|
182
186
|
typeof t == "object" ? t.label : t
|
|
183
187
|
)) })
|
|
@@ -185,229 +189,229 @@ function qt() {
|
|
|
185
189
|
] })
|
|
186
190
|
] });
|
|
187
191
|
}
|
|
188
|
-
function
|
|
189
|
-
return /* @__PURE__ */ d(
|
|
190
|
-
/* @__PURE__ */ e(
|
|
191
|
-
/* @__PURE__ */ e(
|
|
192
|
+
function T() {
|
|
193
|
+
return /* @__PURE__ */ d(f, { children: [
|
|
194
|
+
/* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(v, {}) }) }),
|
|
195
|
+
/* @__PURE__ */ e(w, {})
|
|
192
196
|
] });
|
|
193
197
|
}
|
|
194
|
-
function
|
|
195
|
-
return /* @__PURE__ */ e(
|
|
196
|
-
/* @__PURE__ */ e(
|
|
197
|
-
/* @__PURE__ */ e(
|
|
198
|
-
/* @__PURE__ */ e(
|
|
198
|
+
function ta() {
|
|
199
|
+
return /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(Ot, { children: /* @__PURE__ */ d(jt, { children: [
|
|
200
|
+
/* @__PURE__ */ e(Gt, {}),
|
|
201
|
+
/* @__PURE__ */ e(Ut, {}),
|
|
202
|
+
/* @__PURE__ */ e(Kt, { children: /* @__PURE__ */ e(Zt, {}) })
|
|
199
203
|
] }) }) }) });
|
|
200
204
|
}
|
|
201
|
-
function
|
|
202
|
-
return /* @__PURE__ */ e(
|
|
203
|
-
const r = t.url, n = t.mediaType ?? "",
|
|
204
|
-
return /* @__PURE__ */ d(
|
|
205
|
-
|
|
206
|
-
/* @__PURE__ */ e(
|
|
205
|
+
function aa() {
|
|
206
|
+
return /* @__PURE__ */ e($t, { children: (a) => a.map((t, o) => {
|
|
207
|
+
const r = t.url, n = t.mediaType ?? "", i = n.split("/").pop(), s = t.filename ?? (i ? `untitled.${i}` : "untitled"), m = W(n);
|
|
208
|
+
return /* @__PURE__ */ d(_t, { url: r, name: s, mediaType: n, children: [
|
|
209
|
+
m ? /* @__PURE__ */ e(V, {}) : /* @__PURE__ */ e(N, {}),
|
|
210
|
+
/* @__PURE__ */ e(g, {})
|
|
207
211
|
] }, r || o);
|
|
208
212
|
}) });
|
|
209
213
|
}
|
|
210
|
-
function
|
|
211
|
-
return /* @__PURE__ */ d(
|
|
212
|
-
/* @__PURE__ */ e(
|
|
213
|
-
/* @__PURE__ */ e(
|
|
214
|
-
/* @__PURE__ */ e(
|
|
215
|
-
/* @__PURE__ */ e(
|
|
214
|
+
function oa() {
|
|
215
|
+
return /* @__PURE__ */ d(Xd, { children: [
|
|
216
|
+
/* @__PURE__ */ e(Yd, { children: (a) => a.map((t, o) => /* @__PURE__ */ e(qd, { action: t }, `action-${o}`)) }),
|
|
217
|
+
/* @__PURE__ */ e(p, { action: "copy" }),
|
|
218
|
+
/* @__PURE__ */ e(p, { action: "upvote" }),
|
|
219
|
+
/* @__PURE__ */ e(p, { action: "downvote" })
|
|
216
220
|
] });
|
|
217
221
|
}
|
|
218
|
-
function
|
|
219
|
-
return /* @__PURE__ */ d(
|
|
220
|
-
/* @__PURE__ */ e(
|
|
221
|
-
/* @__PURE__ */ e(
|
|
222
|
-
/* @__PURE__ */ e(
|
|
222
|
+
function ra() {
|
|
223
|
+
return /* @__PURE__ */ d(Qd, { children: [
|
|
224
|
+
/* @__PURE__ */ e($d, {}),
|
|
225
|
+
/* @__PURE__ */ e(_d, { children: (a) => a.map((t, o) => /* @__PURE__ */ d(Rd, { href: t.url, source: t, children: [
|
|
226
|
+
/* @__PURE__ */ e(Od, { children: t.breadcrumbs?.map((r) => /* @__PURE__ */ d(x, { children: [
|
|
223
227
|
r,
|
|
224
|
-
/* @__PURE__ */ e(
|
|
228
|
+
/* @__PURE__ */ e(jd, {})
|
|
225
229
|
] }, r)) }),
|
|
226
|
-
/* @__PURE__ */ e(Od, {}),
|
|
227
|
-
/* @__PURE__ */ e(jd, {}),
|
|
228
230
|
/* @__PURE__ */ e(Gd, {}),
|
|
229
|
-
/* @__PURE__ */ e(Ud, {
|
|
230
|
-
|
|
231
|
+
/* @__PURE__ */ e(Ud, {}),
|
|
232
|
+
/* @__PURE__ */ e(Kd, {}),
|
|
233
|
+
/* @__PURE__ */ e(Zd, { children: (r) => r.map((n, i) => /* @__PURE__ */ e(
|
|
234
|
+
zd,
|
|
231
235
|
{
|
|
232
236
|
descriptionPart: n
|
|
233
237
|
},
|
|
234
|
-
`part-${
|
|
238
|
+
`part-${i}`
|
|
235
239
|
)) }),
|
|
236
|
-
/* @__PURE__ */ e(
|
|
240
|
+
/* @__PURE__ */ e(Jd, {})
|
|
237
241
|
] }, o)) })
|
|
238
242
|
] });
|
|
239
243
|
}
|
|
240
|
-
function
|
|
241
|
-
return /* @__PURE__ */ d(
|
|
242
|
-
/* @__PURE__ */ e(
|
|
243
|
-
/* @__PURE__ */ d(
|
|
244
|
-
/* @__PURE__ */ e(
|
|
245
|
-
/* @__PURE__ */ e(
|
|
244
|
+
function na() {
|
|
245
|
+
return /* @__PURE__ */ d(q, { children: [
|
|
246
|
+
/* @__PURE__ */ e(Ht, { children: /* @__PURE__ */ d(ft, { children: [
|
|
247
|
+
/* @__PURE__ */ d(yt, { children: [
|
|
248
|
+
/* @__PURE__ */ e(kt, {}),
|
|
249
|
+
/* @__PURE__ */ e(vt, {})
|
|
246
250
|
] }),
|
|
247
|
-
/* @__PURE__ */ e(
|
|
251
|
+
/* @__PURE__ */ e(wt, {})
|
|
248
252
|
] }) }),
|
|
249
|
-
/* @__PURE__ */ e(
|
|
250
|
-
/* @__PURE__ */ e(
|
|
253
|
+
/* @__PURE__ */ e(ia, {}),
|
|
254
|
+
/* @__PURE__ */ e(ma, {})
|
|
251
255
|
] });
|
|
252
256
|
}
|
|
253
|
-
function
|
|
254
|
-
return /* @__PURE__ */ d(
|
|
255
|
-
/* @__PURE__ */ e(
|
|
256
|
-
/* @__PURE__ */ e(
|
|
257
|
-
/* @__PURE__ */ e(
|
|
258
|
-
const r =
|
|
259
|
-
return /* @__PURE__ */ d(
|
|
260
|
-
r ? /* @__PURE__ */ d(
|
|
261
|
-
/* @__PURE__ */ e(
|
|
262
|
-
/* @__PURE__ */ e(
|
|
263
|
-
] }) : /* @__PURE__ */ d(
|
|
264
|
-
/* @__PURE__ */ e(
|
|
265
|
-
/* @__PURE__ */ e(
|
|
257
|
+
function ia() {
|
|
258
|
+
return /* @__PURE__ */ d(id, { children: [
|
|
259
|
+
/* @__PURE__ */ e(Lt, {}),
|
|
260
|
+
/* @__PURE__ */ e(Bt, { children: "Drop files here to add to chat" }),
|
|
261
|
+
/* @__PURE__ */ e(Dt, { children: (a) => a.map((t, o) => {
|
|
262
|
+
const r = W(t.type);
|
|
263
|
+
return /* @__PURE__ */ d(Pt, { file: t, children: [
|
|
264
|
+
r ? /* @__PURE__ */ d(Wt, { children: [
|
|
265
|
+
/* @__PURE__ */ e(V, {}),
|
|
266
|
+
/* @__PURE__ */ e(g, {})
|
|
267
|
+
] }) : /* @__PURE__ */ d(Vt, { children: [
|
|
268
|
+
/* @__PURE__ */ e(N, {}),
|
|
269
|
+
/* @__PURE__ */ e(g, {})
|
|
266
270
|
] }),
|
|
267
|
-
/* @__PURE__ */ e(
|
|
271
|
+
/* @__PURE__ */ e(Nt, {})
|
|
268
272
|
] }, `${t.name}-${t.lastModified}-${o}`);
|
|
269
273
|
}) }),
|
|
270
|
-
/* @__PURE__ */ d(
|
|
271
|
-
/* @__PURE__ */ e(
|
|
272
|
-
/* @__PURE__ */ e(
|
|
273
|
-
/* @__PURE__ */ e(
|
|
274
|
+
/* @__PURE__ */ d(md, { children: [
|
|
275
|
+
/* @__PURE__ */ e(Qt, {}),
|
|
276
|
+
/* @__PURE__ */ e(sd, {}),
|
|
277
|
+
/* @__PURE__ */ e(ld, { children: /* @__PURE__ */ e(cd, {}) })
|
|
274
278
|
] })
|
|
275
279
|
] });
|
|
276
280
|
}
|
|
277
|
-
function
|
|
278
|
-
return /* @__PURE__ */ d(
|
|
279
|
-
/* @__PURE__ */ d(
|
|
280
|
-
/* @__PURE__ */ e(
|
|
281
|
-
/* @__PURE__ */ e(
|
|
281
|
+
function ma() {
|
|
282
|
+
return /* @__PURE__ */ d(hd, { children: [
|
|
283
|
+
/* @__PURE__ */ d(bd, { children: [
|
|
284
|
+
/* @__PURE__ */ e(Cd, {}),
|
|
285
|
+
/* @__PURE__ */ e(Fd, {})
|
|
282
286
|
] }),
|
|
283
|
-
/* @__PURE__ */ d(
|
|
284
|
-
/* @__PURE__ */ e(
|
|
285
|
-
a.map((o) => /* @__PURE__ */ e(
|
|
286
|
-
t.length > 0 && /* @__PURE__ */ e(
|
|
287
|
-
/* @__PURE__ */ d(
|
|
288
|
-
/* @__PURE__ */ e(
|
|
289
|
-
t.map((o) => /* @__PURE__ */ d(
|
|
290
|
-
/* @__PURE__ */ e(
|
|
287
|
+
/* @__PURE__ */ d(Ed, { children: [
|
|
288
|
+
/* @__PURE__ */ e(pd, { children: ({ pinned: a, unpinned: t }) => /* @__PURE__ */ d(b, { children: [
|
|
289
|
+
a.map((o) => /* @__PURE__ */ e(ud, { action: o }, o.name)),
|
|
290
|
+
t.length > 0 && /* @__PURE__ */ e(gd, {}),
|
|
291
|
+
/* @__PURE__ */ d(Id, { children: [
|
|
292
|
+
/* @__PURE__ */ e(Md, {}),
|
|
293
|
+
t.map((o) => /* @__PURE__ */ d(Sd, { action: o, children: [
|
|
294
|
+
/* @__PURE__ */ e(Td, { action: o }),
|
|
291
295
|
o.name
|
|
292
296
|
] }, o.name))
|
|
293
297
|
] })
|
|
294
298
|
] }) }),
|
|
295
|
-
/* @__PURE__ */ d(
|
|
296
|
-
/* @__PURE__ */ e(
|
|
297
|
-
/* @__PURE__ */ e(
|
|
299
|
+
/* @__PURE__ */ d(E, { action: "copy", children: [
|
|
300
|
+
/* @__PURE__ */ e(xd, { action: "copy" }),
|
|
301
|
+
/* @__PURE__ */ e(Ad, { action: "copy" })
|
|
298
302
|
] }),
|
|
299
|
-
/* @__PURE__ */ e(
|
|
300
|
-
/* @__PURE__ */ e(
|
|
303
|
+
/* @__PURE__ */ e(E, { action: "clear" }),
|
|
304
|
+
/* @__PURE__ */ e(E, { action: "stop" })
|
|
301
305
|
] })
|
|
302
306
|
] });
|
|
303
307
|
}
|
|
304
|
-
function
|
|
305
|
-
const { sessions: a } =
|
|
306
|
-
return /* @__PURE__ */ d(
|
|
307
|
-
/* @__PURE__ */ d(
|
|
308
|
-
/* @__PURE__ */ d(
|
|
309
|
-
/* @__PURE__ */ e(
|
|
308
|
+
function sa() {
|
|
309
|
+
const { sessions: a } = pt(), { conversationId: t } = D();
|
|
310
|
+
return /* @__PURE__ */ d(et, { children: [
|
|
311
|
+
/* @__PURE__ */ d(dt, { children: [
|
|
312
|
+
/* @__PURE__ */ d(tt, { children: [
|
|
313
|
+
/* @__PURE__ */ e(at, { iconKey: "backToChat" }),
|
|
310
314
|
"Back to chat"
|
|
311
315
|
] }),
|
|
312
|
-
/* @__PURE__ */ e(
|
|
316
|
+
/* @__PURE__ */ e(ot, {}),
|
|
313
317
|
/* @__PURE__ */ e(u, {})
|
|
314
318
|
] }),
|
|
315
|
-
/* @__PURE__ */ d(
|
|
319
|
+
/* @__PURE__ */ d(rt, { children: [
|
|
316
320
|
a.map((o) => /* @__PURE__ */ d(
|
|
317
|
-
|
|
321
|
+
nt,
|
|
318
322
|
{
|
|
319
323
|
sessionId: o.id,
|
|
320
324
|
"data-active": C(o.id === t),
|
|
321
325
|
children: [
|
|
322
|
-
/* @__PURE__ */ e(
|
|
323
|
-
/* @__PURE__ */ e(
|
|
326
|
+
/* @__PURE__ */ e(it, { children: o.title }),
|
|
327
|
+
/* @__PURE__ */ e(mt, { children: st(o.updatedAt) })
|
|
324
328
|
]
|
|
325
329
|
},
|
|
326
330
|
o.id
|
|
327
331
|
)),
|
|
328
|
-
/* @__PURE__ */ e(
|
|
329
|
-
/* @__PURE__ */ e(
|
|
332
|
+
/* @__PURE__ */ e(lt, {}),
|
|
333
|
+
/* @__PURE__ */ e(ct, {})
|
|
330
334
|
] }),
|
|
331
|
-
/* @__PURE__ */ e(
|
|
335
|
+
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(bt, {}) })
|
|
332
336
|
] });
|
|
333
337
|
}
|
|
334
|
-
function
|
|
335
|
-
return /* @__PURE__ */ e(
|
|
336
|
-
/* @__PURE__ */ e(
|
|
337
|
-
/* @__PURE__ */ e(
|
|
338
|
-
/* @__PURE__ */ e(
|
|
339
|
-
/* @__PURE__ */ d(
|
|
340
|
-
/* @__PURE__ */ e(
|
|
341
|
-
/* @__PURE__ */ e(
|
|
338
|
+
function la() {
|
|
339
|
+
return /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(de, { children: /* @__PURE__ */ d(te, { children: [
|
|
340
|
+
/* @__PURE__ */ e(ae, {}),
|
|
341
|
+
/* @__PURE__ */ e(oe, {}),
|
|
342
|
+
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ d(ne, { children: [
|
|
343
|
+
/* @__PURE__ */ d(ie, { children: [
|
|
344
|
+
/* @__PURE__ */ e(me, {}),
|
|
345
|
+
/* @__PURE__ */ e(se, {})
|
|
342
346
|
] }),
|
|
343
|
-
/* @__PURE__ */ e(
|
|
347
|
+
/* @__PURE__ */ e(le, {})
|
|
344
348
|
] }) })
|
|
345
349
|
] }) }) }) });
|
|
346
350
|
}
|
|
347
|
-
function
|
|
348
|
-
return /* @__PURE__ */ d(
|
|
349
|
-
/* @__PURE__ */ e(
|
|
350
|
-
/* @__PURE__ */ d(
|
|
351
|
-
/* @__PURE__ */ d(
|
|
352
|
-
/* @__PURE__ */ e(
|
|
353
|
-
/* @__PURE__ */ e(
|
|
351
|
+
function ca() {
|
|
352
|
+
return /* @__PURE__ */ d(ce, { children: [
|
|
353
|
+
/* @__PURE__ */ e(he, {}),
|
|
354
|
+
/* @__PURE__ */ d(be, { children: [
|
|
355
|
+
/* @__PURE__ */ d(Ce, { children: [
|
|
356
|
+
/* @__PURE__ */ e(Fe, {}),
|
|
357
|
+
/* @__PURE__ */ e(Ee, {})
|
|
354
358
|
] }),
|
|
355
|
-
/* @__PURE__ */ e(
|
|
356
|
-
a.map((t, o) => /* @__PURE__ */ d(
|
|
357
|
-
/* @__PURE__ */ e(
|
|
358
|
-
t.inputType === "text" && /* @__PURE__ */ e(
|
|
359
|
-
t.inputType === "email" && /* @__PURE__ */ e(
|
|
360
|
-
t.inputType === "file" && /* @__PURE__ */ e(
|
|
361
|
-
t.inputType === "textarea" && /* @__PURE__ */ e(
|
|
362
|
-
t.inputType === "checkbox" && /* @__PURE__ */ e(
|
|
363
|
-
t.inputType === "select" && /* @__PURE__ */ d(
|
|
364
|
-
/* @__PURE__ */ d(
|
|
365
|
-
/* @__PURE__ */ e(
|
|
366
|
-
/* @__PURE__ */ e(
|
|
359
|
+
/* @__PURE__ */ e(pe, { children: (a) => /* @__PURE__ */ d(b, { children: [
|
|
360
|
+
a.map((t, o) => /* @__PURE__ */ d(ue, { field: t, autoFocus: o === 0, children: [
|
|
361
|
+
/* @__PURE__ */ e(ge, {}),
|
|
362
|
+
t.inputType === "text" && /* @__PURE__ */ e(Ie, {}),
|
|
363
|
+
t.inputType === "email" && /* @__PURE__ */ e(Me, {}),
|
|
364
|
+
t.inputType === "file" && /* @__PURE__ */ e(Se, {}),
|
|
365
|
+
t.inputType === "textarea" && /* @__PURE__ */ e(Te, {}),
|
|
366
|
+
t.inputType === "checkbox" && /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e(Ae, {}) }),
|
|
367
|
+
t.inputType === "select" && /* @__PURE__ */ d(He, { children: [
|
|
368
|
+
/* @__PURE__ */ d(fe, { children: [
|
|
369
|
+
/* @__PURE__ */ e(ye, {}),
|
|
370
|
+
/* @__PURE__ */ e(ke, {})
|
|
367
371
|
] }),
|
|
368
|
-
/* @__PURE__ */ e(
|
|
369
|
-
/* @__PURE__ */ e(
|
|
370
|
-
/* @__PURE__ */ e(
|
|
372
|
+
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(we, { children: t.items.map((r) => /* @__PURE__ */ d(Le, { value: r.value, children: [
|
|
373
|
+
/* @__PURE__ */ e(Be, { children: r.label }),
|
|
374
|
+
/* @__PURE__ */ e(De, {})
|
|
371
375
|
] }, r.value)) }) })
|
|
372
376
|
] }),
|
|
373
|
-
t.inputType === "combobox" && /* @__PURE__ */ d(
|
|
374
|
-
/* @__PURE__ */ d(
|
|
375
|
-
"multiple" in t && t.multiple && /* @__PURE__ */ e(
|
|
376
|
-
/* @__PURE__ */ e(
|
|
377
|
-
/* @__PURE__ */ e(
|
|
377
|
+
t.inputType === "combobox" && /* @__PURE__ */ d(Pe, { children: [
|
|
378
|
+
/* @__PURE__ */ d(We, { children: [
|
|
379
|
+
"multiple" in t && t.multiple && /* @__PURE__ */ e(Ve, {}),
|
|
380
|
+
/* @__PURE__ */ e(Ne, {}),
|
|
381
|
+
/* @__PURE__ */ e(Qe, {})
|
|
378
382
|
] }),
|
|
379
|
-
/* @__PURE__ */ e(
|
|
380
|
-
|
|
383
|
+
/* @__PURE__ */ e($e, { children: /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ e(Oe, { children: (r) => r.length === 0 ? /* @__PURE__ */ e(je, {}) : r.map((n) => /* @__PURE__ */ d(
|
|
384
|
+
Ge,
|
|
381
385
|
{
|
|
382
386
|
item: n,
|
|
383
387
|
children: [
|
|
384
|
-
/* @__PURE__ */ e(
|
|
385
|
-
/* @__PURE__ */ e(
|
|
388
|
+
/* @__PURE__ */ e(Ue, { children: n.label }),
|
|
389
|
+
/* @__PURE__ */ e(Ke, {})
|
|
386
390
|
]
|
|
387
391
|
},
|
|
388
392
|
n.value
|
|
389
393
|
)) }) }) }) })
|
|
390
394
|
] }),
|
|
391
|
-
/* @__PURE__ */ e(
|
|
392
|
-
/* @__PURE__ */ e(
|
|
395
|
+
/* @__PURE__ */ e(Ze, {}),
|
|
396
|
+
/* @__PURE__ */ e(ze, {})
|
|
393
397
|
] }, t.name)),
|
|
394
|
-
/* @__PURE__ */ e(
|
|
398
|
+
/* @__PURE__ */ e(Je, {})
|
|
395
399
|
] }) }),
|
|
396
|
-
/* @__PURE__ */ d(
|
|
397
|
-
/* @__PURE__ */ e(
|
|
398
|
-
/* @__PURE__ */ e(
|
|
400
|
+
/* @__PURE__ */ d(Xe, { children: [
|
|
401
|
+
/* @__PURE__ */ e(Ye, {}),
|
|
402
|
+
/* @__PURE__ */ e(qe, {})
|
|
399
403
|
] })
|
|
400
404
|
] }),
|
|
401
|
-
/* @__PURE__ */ d(
|
|
402
|
-
/* @__PURE__ */ e(
|
|
403
|
-
/* @__PURE__ */ e(
|
|
404
|
-
/* @__PURE__ */ e(
|
|
405
|
+
/* @__PURE__ */ d(ed, { children: [
|
|
406
|
+
/* @__PURE__ */ e(dd, {}),
|
|
407
|
+
/* @__PURE__ */ e(td, {}),
|
|
408
|
+
/* @__PURE__ */ e(ad, {})
|
|
405
409
|
] })
|
|
406
410
|
] });
|
|
407
411
|
}
|
|
408
412
|
export {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
+
Wa as InkeepEmbeddedChat,
|
|
414
|
+
Jt as InkeepEmbeddedChatImpl,
|
|
415
|
+
Xt as InkeepEmbeddedChatImplContent,
|
|
416
|
+
zt as InkeepEmbeddedChatProvider
|
|
413
417
|
};
|