@inkeep/agents-ui 0.15.10 → 0.15.11
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/color-mode/index.d.ts +0 -1
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -2
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +1 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +132 -122
- package/dist/primitives/components/embedded-chat.cjs +3 -3
- package/dist/primitives/components/embedded-chat.js +145 -145
- package/dist/primitives/hooks/use-instant-update.d.ts +0 -1
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/utils/split-props.d.ts +0 -1
- package/dist/react/chat-button.d.ts +0 -2
- package/dist/types/config/ai.d.ts +13 -15
- package/dist/types/config/base.d.ts +0 -20
- package/dist/types/config/search.d.ts +0 -2
- package/dist/types/config/settings/actions.d.ts +68 -2
- package/dist/types/sources.d.ts +1 -9
- package/package.json +1 -1
|
@@ -17,25 +17,25 @@ import { BuiltInIconRenderer as H } from "../atoms/icons/built-in-icon-renderer.
|
|
|
17
17
|
import { LinkWithQueryParams as xe } from "../atoms/link.js";
|
|
18
18
|
import { Markdown as K } from "../atoms/markdown/index.js";
|
|
19
19
|
import { AttachmentItemProvider as pe, useAttachmentItem as q } from "../providers/attachment-item-provider.js";
|
|
20
|
-
import { useAttachmentsBar as
|
|
20
|
+
import { useAttachmentsBar as B, AttachmentsBarProvider as De } from "../providers/attachments-bar-provider.js";
|
|
21
21
|
import { SourceItemProvider as Oe, useSourceItem as L } from "../providers/source-item-provider.js";
|
|
22
22
|
import { useInkeepConfig as p } from "../providers/config-provider.js";
|
|
23
23
|
import { useMessageFeedback as oe } from "../providers/feedback-provider.js";
|
|
24
24
|
import { MessageAttachmentsProvider as We, useMessageAttachments as j } from "../providers/message-attachments-provider.js";
|
|
25
|
-
import { useMessage as
|
|
25
|
+
import { useMessage as P, MessageProvider as Re } from "../providers/message-provider.js";
|
|
26
26
|
import { CheckboxIcon as ve } from "../atoms/icons/checkbox-icon.js";
|
|
27
27
|
import { useCopyToClipboard as X } from "../hooks/use-copy-to-clipboard.js";
|
|
28
28
|
import { FeedbackItemProvider as Ne, useFeedbackItem as ce } from "../providers/feedback-item-provider.js";
|
|
29
|
-
import { maybeRender as y, dataAttr as
|
|
29
|
+
import { maybeRender as y, dataAttr as b, getInitials as Ve, getMessageContent as be } from "../utils/misc.js";
|
|
30
30
|
import { ikp as a } from "./factory.js";
|
|
31
|
-
import { useChat as
|
|
31
|
+
import { useChat as g } from "./embedded-chat/chat-provider.js";
|
|
32
32
|
import { ChatProvider as so } from "./embedded-chat/chat-provider.js";
|
|
33
33
|
import $e from "./tagline-logo-icon.js";
|
|
34
34
|
import { useSettleAction as Qe } from "../hooks/use-settle-action.js";
|
|
35
35
|
import { useContainerSize as Ue } from "../hooks/use-container-size.js";
|
|
36
36
|
import { useChatAction as de } from "./embedded-chat/use-chat-action.js";
|
|
37
37
|
import { useHelpMenuState as Ke, HelpMenuProvider as qe, useHelpMenu as je } from "../providers/help-menu-provider.js";
|
|
38
|
-
import { useChatForm as
|
|
38
|
+
import { useChatForm as F } from "../providers/chat-form-provider.js";
|
|
39
39
|
import { useFormField as x, FormFieldProvider as ze } from "../providers/form-field-provider.js";
|
|
40
40
|
import { Controller as Ge } from "react-hook-form";
|
|
41
41
|
import { highlightEmphasis as Ye } from "../utils/highlight-emphasis.js";
|
|
@@ -45,7 +45,7 @@ import { useComposedRefs as me } from "../utils/compose-refs.js";
|
|
|
45
45
|
import { composeEventHandlers as h } from "../utils/compose-event-handlers.js";
|
|
46
46
|
import { useSimpleScroll as Ze } from "../hooks/use-simple-scroll.js";
|
|
47
47
|
import { useDebounce as et } from "../hooks/use-debounce.js";
|
|
48
|
-
import { HoverPopoverProvider as tt, useHoverPopover as
|
|
48
|
+
import { HoverPopoverProvider as tt, useHoverPopover as ge } from "../providers/hover-popover-provider.js";
|
|
49
49
|
import { useWidgetAutoFocus as it } from "./modal/widget-auto-focus.js";
|
|
50
50
|
import { useBaseEvents as le } from "../providers/base-events-provider.js";
|
|
51
51
|
import { useShadow as at } from "../atoms/shadow/context.js";
|
|
@@ -53,23 +53,23 @@ import { getIcon as nt } from "../utils/get-source-icon.js";
|
|
|
53
53
|
const rt = "__intro__", st = a("div", {
|
|
54
54
|
_id: "aiChatWrapper"
|
|
55
55
|
}), tn = Q((t, e) => {
|
|
56
|
-
const { ...i } = t, { isHidden: r, isMobile: s } =
|
|
56
|
+
const { ...i } = t, { isHidden: r, isMobile: s } = g(), [o, c] = Ue(), d = me(e, o), m = c?.width ? c.width > 580 : !0, l = Je();
|
|
57
57
|
return /* @__PURE__ */ n(
|
|
58
58
|
st,
|
|
59
59
|
{
|
|
60
60
|
ref: d,
|
|
61
|
-
"data-widget-md":
|
|
62
|
-
"data-hidden":
|
|
63
|
-
"data-in-modal":
|
|
64
|
-
"data-mobile":
|
|
61
|
+
"data-widget-md": b(m),
|
|
62
|
+
"data-hidden": b(r),
|
|
63
|
+
"data-in-modal": b(!!l),
|
|
64
|
+
"data-mobile": b(s),
|
|
65
65
|
...i
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
}), ot = a("div", {
|
|
69
69
|
_id: "aiChatRoot"
|
|
70
70
|
}), an = (t) => {
|
|
71
|
-
const { isHidden: e } =
|
|
72
|
-
return i ? null : /* @__PURE__ */ n(ot, { "data-hidden":
|
|
71
|
+
const { isHidden: e } = g(), { form: i } = F();
|
|
72
|
+
return i ? null : /* @__PURE__ */ n(ot, { "data-hidden": b(e), ...t });
|
|
73
73
|
}, nn = a("div", {
|
|
74
74
|
_id: "aiChatHeader"
|
|
75
75
|
}), rn = a("div", {
|
|
@@ -90,7 +90,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
90
90
|
}), dt = a(W.Viewport, {
|
|
91
91
|
_id: "aiChatContentScrollArea__Viewport"
|
|
92
92
|
}), mn = Q(({ children: t, ...e }, i) => {
|
|
93
|
-
const { containerRef: r, scrollToBottom: s } = Ze(), o = me(i, r), { messages: c } =
|
|
93
|
+
const { containerRef: r, scrollToBottom: s } = Ze(), o = me(i, r), { messages: c } = g();
|
|
94
94
|
return V(() => {
|
|
95
95
|
c.length > 0 && s();
|
|
96
96
|
}, [c.length, s]), /* @__PURE__ */ n(
|
|
@@ -119,7 +119,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
119
119
|
}), mt = a("div", {
|
|
120
120
|
_id: "aiChatMessages"
|
|
121
121
|
}), Cn = (t) => {
|
|
122
|
-
const e =
|
|
122
|
+
const e = g(), { children: i, ...r } = t;
|
|
123
123
|
return /* @__PURE__ */ n(mt, { children: y(i, e), ...r });
|
|
124
124
|
}, lt = a("div", {
|
|
125
125
|
_id: "aiChatDisclaimer"
|
|
@@ -138,9 +138,9 @@ const rt = "__intro__", st = a("div", {
|
|
|
138
138
|
), ut = a(T.Trigger, {
|
|
139
139
|
_id: "aiChatDisclaimerTrigger",
|
|
140
140
|
children: /* @__PURE__ */ n(I, { iconKey: "info" })
|
|
141
|
-
}),
|
|
141
|
+
}), bn = E(
|
|
142
142
|
(t) => {
|
|
143
|
-
const { setOpen: e } =
|
|
143
|
+
const { setOpen: e } = ge();
|
|
144
144
|
return /* @__PURE__ */ n(
|
|
145
145
|
ut,
|
|
146
146
|
{
|
|
@@ -152,8 +152,8 @@ const rt = "__intro__", st = a("div", {
|
|
|
152
152
|
}
|
|
153
153
|
), Ct = a(T.Content, {
|
|
154
154
|
_id: "aiChatDisclaimerContent"
|
|
155
|
-
}),
|
|
156
|
-
const { setOpen: e } =
|
|
155
|
+
}), gn = (t) => {
|
|
156
|
+
const { setOpen: e } = ge();
|
|
157
157
|
return /* @__PURE__ */ n(
|
|
158
158
|
Ct,
|
|
159
159
|
{
|
|
@@ -178,31 +178,31 @@ const rt = "__intro__", st = a("div", {
|
|
|
178
178
|
}), vt = a("div", {
|
|
179
179
|
_id: "aiChatExampleQuestions"
|
|
180
180
|
}), Pn = (t) => {
|
|
181
|
-
const { aiChatSettings: e } = p(), { messages: i } =
|
|
181
|
+
const { aiChatSettings: e } = p(), { messages: i } = g();
|
|
182
182
|
return !e.exampleQuestions?.length || i.length ? null : /* @__PURE__ */ n(vt, { ...t });
|
|
183
|
-
},
|
|
183
|
+
}, bt = a("h3", {
|
|
184
184
|
_id: "aiChatExampleQuestionsLabel"
|
|
185
185
|
}), Fn = E(
|
|
186
186
|
(t) => {
|
|
187
187
|
const { aiChatSettings: e } = p();
|
|
188
|
-
return /* @__PURE__ */ n(
|
|
188
|
+
return /* @__PURE__ */ n(bt, { children: e.exampleQuestionsLabel, ...t });
|
|
189
189
|
}
|
|
190
|
-
),
|
|
190
|
+
), gt = a("div", {
|
|
191
191
|
_id: "aiChatExampleQuestionsList"
|
|
192
192
|
}), fn = E(
|
|
193
193
|
(t) => {
|
|
194
194
|
const { aiChatSettings: e } = p(), i = e.exampleQuestions, { children: r, ...s } = t;
|
|
195
|
-
return /* @__PURE__ */ n(
|
|
195
|
+
return /* @__PURE__ */ n(gt, { children: y(r, i), ...s });
|
|
196
196
|
}
|
|
197
197
|
), _t = a("div", {
|
|
198
198
|
_id: "aiChatExampleQuestion"
|
|
199
199
|
}), Mn = Q((t, e) => {
|
|
200
200
|
const { aiChatSettings: i } = p(), r = i.isFirstExampleQuestionHighlighted;
|
|
201
|
-
return /* @__PURE__ */ n(_t, { ref: e, "data-highlight":
|
|
201
|
+
return /* @__PURE__ */ n(_t, { ref: e, "data-highlight": b(r), ...t });
|
|
202
202
|
}), At = a("button", {
|
|
203
203
|
_id: "aiChatExampleQuestionButton"
|
|
204
204
|
}), In = (t) => {
|
|
205
|
-
const { question: e, onClick: i, ...r } = t, s = typeof e == "object" ? e.value : e, o = typeof e == "object" ? e.label : e, { handleSubmit: c } =
|
|
205
|
+
const { question: e, onClick: i, ...r } = t, s = typeof e == "object" ? e.value : e, o = typeof e == "object" ? e.label : e, { handleSubmit: c } = g();
|
|
206
206
|
return /* @__PURE__ */ n(
|
|
207
207
|
At,
|
|
208
208
|
{
|
|
@@ -214,7 +214,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
214
214
|
}, Pt = a("div", {
|
|
215
215
|
_id: "aiChatWorkflows"
|
|
216
216
|
}), En = (t) => {
|
|
217
|
-
const { aiChatSettings: e } = p(), { messages: i } =
|
|
217
|
+
const { aiChatSettings: e } = p(), { messages: i } = g();
|
|
218
218
|
return !e.workflows?.length || i.length ? null : /* @__PURE__ */ n(Pt, { ...t });
|
|
219
219
|
}, Ft = a("h3", {
|
|
220
220
|
_id: "aiChatWorkflowsLabel"
|
|
@@ -263,7 +263,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
263
263
|
), St = a("div", {
|
|
264
264
|
_id: "aiChatMessageHeader"
|
|
265
265
|
}), Tn = (t) => {
|
|
266
|
-
const { message: e } =
|
|
266
|
+
const { message: e } = P();
|
|
267
267
|
return /* @__PURE__ */ n(St, { "data-role": e.role, ...t });
|
|
268
268
|
}, kt = a("div", {
|
|
269
269
|
_id: "aiChatMessageLoading",
|
|
@@ -271,16 +271,16 @@ const rt = "__intro__", st = a("div", {
|
|
|
271
271
|
}), wn = (t) => /* @__PURE__ */ n(kt, { ...t }), Bt = a("div", {
|
|
272
272
|
_id: "aiChatMessageAvatar"
|
|
273
273
|
}), Hn = (t) => {
|
|
274
|
-
const { message: e } =
|
|
274
|
+
const { message: e } = P();
|
|
275
275
|
return /* @__PURE__ */ n(Bt, { "data-role": e.role, ...t });
|
|
276
276
|
}, yt = a(te.Root, {
|
|
277
277
|
_id: "aiChatMessageAvatarContent"
|
|
278
278
|
}), Ln = (t) => {
|
|
279
|
-
const { message: e } =
|
|
279
|
+
const { message: e } = P(), { baseSettings: i } = p();
|
|
280
280
|
return /* @__PURE__ */ n(
|
|
281
281
|
yt,
|
|
282
282
|
{
|
|
283
|
-
"data-username":
|
|
283
|
+
"data-username": b(e.role === "user" && !!i.userProperties.name),
|
|
284
284
|
"data-role": e.role,
|
|
285
285
|
...t
|
|
286
286
|
}
|
|
@@ -289,7 +289,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
289
289
|
_id: "aiChatMessageAvatarFallback"
|
|
290
290
|
}), xn = E(
|
|
291
291
|
(t) => {
|
|
292
|
-
const { baseSettings: e } = p(), { message: i } =
|
|
292
|
+
const { baseSettings: e } = p(), { message: i } = P();
|
|
293
293
|
return e.userProperties.name ? /* @__PURE__ */ n(
|
|
294
294
|
Tt,
|
|
295
295
|
{
|
|
@@ -306,7 +306,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
306
306
|
const { onLoadingStatusChange: e, ...i } = t, {
|
|
307
307
|
aiChatSettings: r,
|
|
308
308
|
baseSettings: { userProperties: s }
|
|
309
|
-
} = p(), { message: o } =
|
|
309
|
+
} = p(), { message: o } = P(), { aiAssistantAvatar: c } = r ?? {}, d = typeof c == "string" ? c : c?.light, m = (typeof c == "string" ? c : c?.dark) ?? d, l = Xe(d, m), [u, v] = N(l);
|
|
310
310
|
V(() => {
|
|
311
311
|
v(l);
|
|
312
312
|
}, [l]);
|
|
@@ -354,7 +354,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
354
354
|
), wt = a("span", {
|
|
355
355
|
_id: "aiChatMessageName"
|
|
356
356
|
}), On = (t) => {
|
|
357
|
-
const { message: e } =
|
|
357
|
+
const { message: e } = P(), { aiChatSettings: i } = p(), { aiAssistantName: r } = i;
|
|
358
358
|
return /* @__PURE__ */ n(
|
|
359
359
|
wt,
|
|
360
360
|
{
|
|
@@ -366,17 +366,17 @@ const rt = "__intro__", st = a("div", {
|
|
|
366
366
|
}, Ht = a("div", {
|
|
367
367
|
_id: "aiChatMessageContentWrapper"
|
|
368
368
|
}), Wn = (t) => {
|
|
369
|
-
const { message: e } =
|
|
369
|
+
const { message: e } = P();
|
|
370
370
|
return /* @__PURE__ */ n(Ht, { "data-role": e.role, ...t });
|
|
371
371
|
}, Lt = a("div", {
|
|
372
372
|
_id: "aiChatMessageContent"
|
|
373
373
|
}), Rn = (t) => {
|
|
374
|
-
const { message: e } =
|
|
374
|
+
const { message: e } = P();
|
|
375
375
|
return /* @__PURE__ */ n(Lt, { "data-role": e.role, ...t });
|
|
376
376
|
}, xt = a("div", {
|
|
377
377
|
_id: "aiChatMessageAttachments"
|
|
378
378
|
}), Nn = (t) => {
|
|
379
|
-
const { message: e } =
|
|
379
|
+
const { message: e } = P(), i = [];
|
|
380
380
|
return e.role !== "user" || !i?.length ? null : /* @__PURE__ */ n(We, { children: /* @__PURE__ */ n(xt, { ...t }) });
|
|
381
381
|
}, Dt = a("div", {
|
|
382
382
|
_id: "aiChatMessageAttachments__List"
|
|
@@ -464,14 +464,14 @@ const rt = "__intro__", st = a("div", {
|
|
|
464
464
|
Ce(() => {
|
|
465
465
|
i !== _.current && (typeof i == "function" && typeof _.current == "function" ? i.toString() !== _.current.toString() && (_.current = i) : _.current = i);
|
|
466
466
|
}, [i]);
|
|
467
|
-
const
|
|
467
|
+
const S = _.current;
|
|
468
468
|
return V(() => {
|
|
469
469
|
o.current || (o.current = `dyn:${t}:${crypto.randomUUID()}`, u(!0));
|
|
470
470
|
}, [t]), Fe(() => {
|
|
471
|
-
if (!
|
|
471
|
+
if (!S || !s || !l || !o.current)
|
|
472
472
|
return;
|
|
473
|
-
const
|
|
474
|
-
return f.setAttribute("data-ikp-component", ""), f.setAttribute("data-component", t), f.setAttribute("slot",
|
|
473
|
+
const A = o.current, f = document.createElement("div");
|
|
474
|
+
return f.setAttribute("data-ikp-component", ""), f.setAttribute("data-component", t), f.setAttribute("slot", A), c.current = f, m.current = !1, s.appendChild(f), C(!0), () => {
|
|
475
475
|
m.current = !0, C(!1), queueMicrotask(() => {
|
|
476
476
|
try {
|
|
477
477
|
d.current && (d.current.unmount(), d.current = null);
|
|
@@ -481,14 +481,14 @@ const rt = "__intro__", st = a("div", {
|
|
|
481
481
|
f.parentNode === s && f.remove(), c.current = null;
|
|
482
482
|
});
|
|
483
483
|
};
|
|
484
|
-
}, [
|
|
485
|
-
const
|
|
486
|
-
if (!
|
|
487
|
-
const f = (
|
|
488
|
-
if (typeof
|
|
484
|
+
}, [S, s, l, t]), V(() => {
|
|
485
|
+
const A = c.current;
|
|
486
|
+
if (!A || m.current) return;
|
|
487
|
+
const f = (k) => {
|
|
488
|
+
if (typeof k != "function" || k.length > 1) return !1;
|
|
489
489
|
try {
|
|
490
|
-
if (typeof
|
|
491
|
-
const D =
|
|
490
|
+
if (typeof k == "function" && k.constructor === Function) {
|
|
491
|
+
const D = k({});
|
|
492
492
|
return J.isValidElement(D);
|
|
493
493
|
}
|
|
494
494
|
return !1;
|
|
@@ -497,23 +497,23 @@ const rt = "__intro__", st = a("div", {
|
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
let M;
|
|
500
|
-
if (f(
|
|
500
|
+
if (f(S))
|
|
501
501
|
try {
|
|
502
|
-
const
|
|
503
|
-
M = J.createElement(
|
|
504
|
-
} catch (
|
|
505
|
-
console.error("Error creating React element from component:",
|
|
502
|
+
const k = S;
|
|
503
|
+
M = J.createElement(k, e || {});
|
|
504
|
+
} catch (k) {
|
|
505
|
+
console.error("Error creating React element from component:", k);
|
|
506
506
|
return;
|
|
507
507
|
}
|
|
508
|
-
else if (typeof
|
|
509
|
-
M =
|
|
508
|
+
else if (typeof S == "function")
|
|
509
|
+
M = S(e || {}, A, null);
|
|
510
510
|
else {
|
|
511
511
|
console.error("Invalid component definition");
|
|
512
512
|
return;
|
|
513
513
|
}
|
|
514
514
|
if (J.isValidElement(M) || typeof M == "string") {
|
|
515
515
|
if (m.current) return;
|
|
516
|
-
d.current || (d.current = fe.createRoot(
|
|
516
|
+
d.current || (d.current = fe.createRoot(A)), !m.current && d.current && d.current.render(M);
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
519
|
d.current && !m.current && d.current.render(null);
|
|
@@ -523,19 +523,19 @@ const rt = "__intro__", st = a("div", {
|
|
|
523
523
|
}), Qt = a("div", {
|
|
524
524
|
_id: "aiChatMessageToolbar"
|
|
525
525
|
}), er = (t) => {
|
|
526
|
-
const { isLoading: e, messages: i } =
|
|
526
|
+
const { isLoading: e, messages: i } = g(), { message: r } = P();
|
|
527
527
|
return i.at(-1)?.id === r?.id && e || r.role === "user" ? null : /* @__PURE__ */ n(Qt, { ...t });
|
|
528
528
|
}, Ut = a("div", {
|
|
529
529
|
_id: "aiChatMessageCustomActions"
|
|
530
530
|
}), tr = (t) => {
|
|
531
|
-
const { children: e, ...i } = t, { aiChatSettings: r } = p(), { message: s } =
|
|
531
|
+
const { children: e, ...i } = t, { aiChatSettings: r } = p(), { message: s } = P(), { isStreaming: o, messages: c } = g(), d = c.at(-1)?.id === s?.id, m = s.role === "assistant", l = r.messageActions || [];
|
|
532
532
|
return d && o || !m ? null : /* @__PURE__ */ n(Ut, { children: y(e, l), ...i });
|
|
533
533
|
}, Kt = a("a", {
|
|
534
534
|
_id: "aiChatMessageCustomAction"
|
|
535
535
|
}), qt = a("button", {
|
|
536
536
|
_id: "aiChatMessageCustomAction"
|
|
537
537
|
}), ir = (t) => {
|
|
538
|
-
const { onClick: e, action: i, ...r } = t, { message: s } =
|
|
538
|
+
const { onClick: e, action: i, ...r } = t, { message: s } = P(), { handleAction: o } = de(i, s.id), { logEvent: c } = le(), { conversationId: d } = g(), m = () => {
|
|
539
539
|
o(), c({
|
|
540
540
|
eventName: "user_escalation_indicated",
|
|
541
541
|
properties: {
|
|
@@ -570,13 +570,13 @@ const rt = "__intro__", st = a("div", {
|
|
|
570
570
|
}, jt = a("button", {
|
|
571
571
|
_id: "aiChatMessageAction"
|
|
572
572
|
}), ar = (t) => {
|
|
573
|
-
const { action: e, onClick: i, className: r, ...s } = t, { conversationId: o } =
|
|
573
|
+
const { action: e, onClick: i, className: r, ...s } = t, { conversationId: o } = g(), {
|
|
574
574
|
baseSettings: { onFeedback: c }
|
|
575
|
-
} = p(), { message: d } =
|
|
575
|
+
} = p(), { message: d } = P(), { isStreaming: m, messages: l } = g(), [u, v] = X(), { feedback: C, submitPositiveFeedback: _, setCurrentFeedback: S, currentFeedback: A } = oe(), { logEvent: f } = le(), [M, k] = Qe(), D = l.at(-1)?.id === d?.id, z = d.role === "assistant";
|
|
576
576
|
if (D && m || !z) return null;
|
|
577
577
|
const R = {
|
|
578
578
|
copy() {
|
|
579
|
-
v(
|
|
579
|
+
v(be(d)), f({
|
|
580
580
|
eventName: "assistant_message_copied",
|
|
581
581
|
properties: {
|
|
582
582
|
conversationId: o
|
|
@@ -585,11 +585,11 @@ const rt = "__intro__", st = a("div", {
|
|
|
585
585
|
},
|
|
586
586
|
upvote() {
|
|
587
587
|
_(d.id).then(() => {
|
|
588
|
-
|
|
588
|
+
k();
|
|
589
589
|
});
|
|
590
590
|
},
|
|
591
591
|
downvote() {
|
|
592
|
-
|
|
592
|
+
S(d.id);
|
|
593
593
|
}
|
|
594
594
|
}, G = {
|
|
595
595
|
copy: "Copy Message",
|
|
@@ -600,13 +600,13 @@ const rt = "__intro__", st = a("div", {
|
|
|
600
600
|
upvote: /* @__PURE__ */ n(I, { iconKey: M ? "messageCopied" : "thumbsUp" }),
|
|
601
601
|
downvote: /* @__PURE__ */ n(I, { iconKey: "thumbsDown" })
|
|
602
602
|
}, Pe = {
|
|
603
|
-
copy: { "data-copied":
|
|
603
|
+
copy: { "data-copied": b(u) },
|
|
604
604
|
upvote: {
|
|
605
|
-
"data-upvoted":
|
|
605
|
+
"data-upvoted": b(C[d.id]?.type === "positive")
|
|
606
606
|
},
|
|
607
607
|
downvote: {
|
|
608
|
-
"data-downvoted":
|
|
609
|
-
"data-state":
|
|
608
|
+
"data-downvoted": b(C[d.id]?.type === "negative"),
|
|
609
|
+
"data-state": A === null ? "closed" : "open"
|
|
610
610
|
}
|
|
611
611
|
};
|
|
612
612
|
return {
|
|
@@ -628,7 +628,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
628
628
|
}, zt = a("div", {
|
|
629
629
|
_id: "aiChatMessageSources"
|
|
630
630
|
}), nr = (t) => {
|
|
631
|
-
const { message: e } =
|
|
631
|
+
const { message: e } = P();
|
|
632
632
|
return e.role !== "assistant" || !e.parts.filter(
|
|
633
633
|
(r) => r.type === "data-artifact" && r.data?.type?.toLowerCase() === "citation"
|
|
634
634
|
)?.length ? null : /* @__PURE__ */ n(zt, { ...t });
|
|
@@ -637,7 +637,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
637
637
|
}), rr = (t) => /* @__PURE__ */ n(Gt, { children: "Sources", ...t }), Yt = a("div", {
|
|
638
638
|
_id: "aiChatMessageSources__List"
|
|
639
639
|
}), sr = (t) => {
|
|
640
|
-
const { message: e } =
|
|
640
|
+
const { message: e } = P(), { children: i, ...r } = t, {
|
|
641
641
|
baseSettings: { transformSource: s, organizationDisplayName: o },
|
|
642
642
|
aiChatSettings: { shouldOpenLinksInNewTab: c },
|
|
643
643
|
searchSettings: { tabs: d }
|
|
@@ -660,21 +660,21 @@ const rt = "__intro__", st = a("div", {
|
|
|
660
660
|
type: C?.artifactSummary?.record_type,
|
|
661
661
|
contentType: C?.artifactType,
|
|
662
662
|
tag: C?.artifactType
|
|
663
|
-
},
|
|
663
|
+
}, A = (s ?? ((M) => ({
|
|
664
664
|
...M,
|
|
665
665
|
shouldOpenInNewTab: c,
|
|
666
666
|
icon: nt(M)
|
|
667
667
|
})))(_, "chatSourceItem", {
|
|
668
668
|
organizationDisplayName: o,
|
|
669
669
|
tabs: d
|
|
670
|
-
}), f =
|
|
671
|
-
return { ...
|
|
670
|
+
}), f = A.shouldOpenInNewTab !== void 0 ? A.shouldOpenInNewTab : c;
|
|
671
|
+
return { ...A, isExternal: f };
|
|
672
672
|
});
|
|
673
673
|
return /* @__PURE__ */ n(Yt, { children: y(i, u), ...r });
|
|
674
674
|
}, Jt = a(xe, {
|
|
675
675
|
_id: "aiChatMessageSourceItem"
|
|
676
676
|
}), or = (t) => {
|
|
677
|
-
const { source: e, onClick: i, ...r } = t, { logEvent: s } = le(), { conversationId: o } =
|
|
677
|
+
const { source: e, onClick: i, ...r } = t, { logEvent: s } = le(), { conversationId: o } = g(), c = () => {
|
|
678
678
|
s({
|
|
679
679
|
eventName: "assistant_source_item_clicked",
|
|
680
680
|
properties: {
|
|
@@ -738,7 +738,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
738
738
|
{
|
|
739
739
|
"data-type": r.type,
|
|
740
740
|
children: e.content,
|
|
741
|
-
"data-highlighted":
|
|
741
|
+
"data-highlighted": b(e.highlighted),
|
|
742
742
|
...i
|
|
743
743
|
}
|
|
744
744
|
);
|
|
@@ -755,14 +755,14 @@ const rt = "__intro__", st = a("div", {
|
|
|
755
755
|
);
|
|
756
756
|
}, vr = a("div", {
|
|
757
757
|
_id: "aiChatFooter"
|
|
758
|
-
}), gr = a("div", {
|
|
759
|
-
_id: "aiChatInput__Fieldset"
|
|
760
758
|
}), br = a("div", {
|
|
759
|
+
_id: "aiChatInput__Fieldset"
|
|
760
|
+
}), gr = a("div", {
|
|
761
761
|
_id: "aiChatInput__Group"
|
|
762
762
|
}), ri = a("textarea", {
|
|
763
763
|
_id: "aiChatInput"
|
|
764
764
|
}), _r = Q(({ onChange: t, onKeyDown: e, ...i }, r) => {
|
|
765
|
-
const { handleInputChange: s, handleInputKeyDown: o, input: c, error: d, shouldAutoFocusInput: m, inputRef: l } =
|
|
765
|
+
const { handleInputChange: s, handleInputKeyDown: o, input: c, error: d, shouldAutoFocusInput: m, inputRef: l } = g(), { aiChatSettings: u } = p(), v = me(
|
|
766
766
|
r,
|
|
767
767
|
l
|
|
768
768
|
);
|
|
@@ -784,7 +784,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
784
784
|
}), si = a("button", {
|
|
785
785
|
_id: "aiChatInput__SendButton"
|
|
786
786
|
}), Ar = (t) => {
|
|
787
|
-
const { handleSubmit: e, isSubmitDisabled: i, error: r } =
|
|
787
|
+
const { handleSubmit: e, isSubmitDisabled: i, error: r } = g(), { aiChatSettings: s } = p(), { onClick: o, ...c } = t;
|
|
788
788
|
return /* @__PURE__ */ n(
|
|
789
789
|
si,
|
|
790
790
|
{
|
|
@@ -870,7 +870,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
870
870
|
_id: "aiChatAttachmentsBar__Input"
|
|
871
871
|
}), Hr = (t) => {
|
|
872
872
|
const { input: e, onClick: i, ...r } = t, s = { supportedInputs: [] }, o = [], c = () => {
|
|
873
|
-
}, { selectInput: d, onOpen: m } =
|
|
873
|
+
}, { selectInput: d, onOpen: m } = B(), l = () => {
|
|
874
874
|
if (e.type === "FUNCTIONAL_MULTI_ATTACHMENT")
|
|
875
875
|
return s ? e.onInvoke(s, e, c, [...o]) : void 0;
|
|
876
876
|
d(e), m();
|
|
@@ -886,7 +886,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
886
886
|
}, vi = a(se, {
|
|
887
887
|
_id: "aiChatAttachmentsBar__Modal"
|
|
888
888
|
}), Lr = (t) => {
|
|
889
|
-
const { onOpenChange: e, ...i } = t, { selectInput: r, isOpen: s, onClose: o, selectedInput: c } =
|
|
889
|
+
const { onOpenChange: e, ...i } = t, { selectInput: r, isOpen: s, onClose: o, selectedInput: c } = B();
|
|
890
890
|
return /* @__PURE__ */ n(
|
|
891
891
|
vi,
|
|
892
892
|
{
|
|
@@ -904,20 +904,20 @@ const rt = "__intro__", st = a("div", {
|
|
|
904
904
|
"aria-describedby": void 0
|
|
905
905
|
}), Or = a("div", {
|
|
906
906
|
_id: "aiChatAttachmentsBar__ModalHeader"
|
|
907
|
-
}),
|
|
907
|
+
}), bi = a(re, {
|
|
908
908
|
_id: "aiChatAttachmentsBar__ModalHeading"
|
|
909
909
|
}), Wr = (t) => {
|
|
910
|
-
const { selectedInput: e } =
|
|
911
|
-
return /* @__PURE__ */ n(
|
|
912
|
-
},
|
|
910
|
+
const { selectedInput: e } = B(), i = `Add ${e?.displayName}`;
|
|
911
|
+
return /* @__PURE__ */ n(bi, { children: i, ...t });
|
|
912
|
+
}, gi = a("span", {
|
|
913
913
|
_id: "aiChatAttachmentsBar__ModalDescription"
|
|
914
914
|
}), Rr = (t) => {
|
|
915
|
-
const { selectedInput: e } =
|
|
916
|
-
return i ? /* @__PURE__ */ n(
|
|
915
|
+
const { selectedInput: e } = B(), i = e?.workflowModalProps?.modalHelpText;
|
|
916
|
+
return i ? /* @__PURE__ */ n(gi, { children: i, ...t }) : null;
|
|
917
917
|
}, _i = a("div", {
|
|
918
918
|
_id: "aiChatAttachmentsBar__ModalHelp"
|
|
919
919
|
}), Nr = (t) => {
|
|
920
|
-
const { children: e, ...i } = t, { selectedInput: r } =
|
|
920
|
+
const { children: e, ...i } = t, { selectedInput: r } = B(), s = r?.workflowModalProps?.modalHelpElement;
|
|
921
921
|
return s ? /* @__PURE__ */ n(_i, { asChild: !e, children: e || s, ...i }) : null;
|
|
922
922
|
}, Vr = a(ne, {
|
|
923
923
|
_id: "aiChatAttachmentsBar__ModalClose",
|
|
@@ -927,7 +927,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
927
927
|
}), Ai = a("form", {
|
|
928
928
|
_id: "aiChatAttachmentsBar__Form"
|
|
929
929
|
}), Qr = (t) => {
|
|
930
|
-
const { onSubmit: e, ...i } = t, { form: r } =
|
|
930
|
+
const { onSubmit: e, ...i } = t, { form: r } = B();
|
|
931
931
|
return /* @__PURE__ */ n(
|
|
932
932
|
Ai,
|
|
933
933
|
{
|
|
@@ -941,7 +941,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
941
941
|
}), Pi = a("label", {
|
|
942
942
|
_id: "aiChatAttachmentsBar__FormTitleLabel"
|
|
943
943
|
}), Kr = (t) => {
|
|
944
|
-
const { form: e, selectedInput: i } =
|
|
944
|
+
const { form: e, selectedInput: i } = B();
|
|
945
945
|
return /* @__PURE__ */ n(
|
|
946
946
|
Pi,
|
|
947
947
|
{
|
|
@@ -953,14 +953,14 @@ const rt = "__intro__", st = a("div", {
|
|
|
953
953
|
}, Fi = a("input", {
|
|
954
954
|
_id: "aiChatAttachmentsBar__FormTitleInput"
|
|
955
955
|
}), qr = (t) => {
|
|
956
|
-
const { onChange: e, ...i } = t, { form: r, selectedInput: s } =
|
|
956
|
+
const { onChange: e, ...i } = t, { form: r, selectedInput: s } = B();
|
|
957
957
|
return /* @__PURE__ */ n(
|
|
958
958
|
Fi,
|
|
959
959
|
{
|
|
960
960
|
name: "title",
|
|
961
961
|
value: r.data.title,
|
|
962
962
|
id: `${s?.id}-title`,
|
|
963
|
-
"data-invalid":
|
|
963
|
+
"data-invalid": b(!!r.errors.title),
|
|
964
964
|
"aria-invalid": !!r.errors.title,
|
|
965
965
|
onChange: h(e, r.onChange),
|
|
966
966
|
...i
|
|
@@ -969,7 +969,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
969
969
|
}, fi = a("span", {
|
|
970
970
|
_id: "aiChatAttachmentsBar__FormTitleError"
|
|
971
971
|
}), jr = (t) => {
|
|
972
|
-
const { form: e } =
|
|
972
|
+
const { form: e } = B();
|
|
973
973
|
return e.errors.title ? /* @__PURE__ */ n(
|
|
974
974
|
fi,
|
|
975
975
|
{
|
|
@@ -984,7 +984,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
984
984
|
}), Mi = a("label", {
|
|
985
985
|
_id: "aiChatAttachmentsBar__FormContentLabel"
|
|
986
986
|
}), Gr = (t) => {
|
|
987
|
-
const { form: e, selectedInput: i } =
|
|
987
|
+
const { form: e, selectedInput: i } = B();
|
|
988
988
|
return /* @__PURE__ */ n(
|
|
989
989
|
Mi,
|
|
990
990
|
{
|
|
@@ -996,7 +996,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
996
996
|
}, Ii = a("textarea", {
|
|
997
997
|
_id: "aiChatAttachmentsBar__FormTitleInput"
|
|
998
998
|
}), Yr = (t) => {
|
|
999
|
-
const { onChange: e, ...i } = t, { form: r, selectedInput: s } =
|
|
999
|
+
const { onChange: e, ...i } = t, { form: r, selectedInput: s } = B();
|
|
1000
1000
|
return /* @__PURE__ */ n(
|
|
1001
1001
|
Ii,
|
|
1002
1002
|
{
|
|
@@ -1005,7 +1005,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
1005
1005
|
name: "content",
|
|
1006
1006
|
value: r.data.content,
|
|
1007
1007
|
id: `${s?.id}-content`,
|
|
1008
|
-
"data-invalid":
|
|
1008
|
+
"data-invalid": b(!!r.errors.content),
|
|
1009
1009
|
"aria-invalid": !!r.errors.content,
|
|
1010
1010
|
onChange: h(e, r.onChange),
|
|
1011
1011
|
...i,
|
|
@@ -1015,7 +1015,7 @@ const rt = "__intro__", st = a("div", {
|
|
|
1015
1015
|
}, Ei = a("span", {
|
|
1016
1016
|
_id: "aiChatAttachmentsBar__FormContentError"
|
|
1017
1017
|
}), Jr = (t) => {
|
|
1018
|
-
const { form: e } =
|
|
1018
|
+
const { form: e } = B();
|
|
1019
1019
|
return e.errors.content ? /* @__PURE__ */ n(
|
|
1020
1020
|
Ei,
|
|
1021
1021
|
{
|
|
@@ -1048,24 +1048,24 @@ const rt = "__intro__", st = a("div", {
|
|
|
1048
1048
|
}), Si = a(w.Trigger, {
|
|
1049
1049
|
_id: "aiChat__ChatAction"
|
|
1050
1050
|
}), _e = (t) => {
|
|
1051
|
-
const { action: e, onClick: i, className: r, ...s } = t, o = {}, { clear: c, stop: d,
|
|
1052
|
-
|
|
1051
|
+
const { action: e, onClick: i, className: r, ...s } = t, o = {}, { clear: c, stop: d, isBusy: m, messages: l } = g(), { conversationId: u } = g(), { aiChatSettings: v } = p(), [C, _] = X(), [
|
|
1052
|
+
S
|
|
1053
1053
|
/* copyShareUri */
|
|
1054
|
-
] = X();
|
|
1054
|
+
] = X(), A = l.length > 0;
|
|
1055
1055
|
if ({
|
|
1056
1056
|
help: !1,
|
|
1057
|
-
copy:
|
|
1058
|
-
share:
|
|
1059
|
-
clear:
|
|
1060
|
-
stop: !m
|
|
1057
|
+
copy: !A || !v.isCopyChatButtonVisible || m,
|
|
1058
|
+
share: !A || !v.isShareButtonVisible || !u || !!o || m,
|
|
1059
|
+
clear: !A || v.isViewOnly || m,
|
|
1060
|
+
stop: !m
|
|
1061
1061
|
}[e]) return null;
|
|
1062
1062
|
const D = {
|
|
1063
1063
|
// Help actions are handled by HelpAction component
|
|
1064
1064
|
help: () => {
|
|
1065
1065
|
},
|
|
1066
1066
|
copy: () => {
|
|
1067
|
-
const he =
|
|
1068
|
-
const G = `**${R.role === "assistant" ? "AI Assistant" : "User"}**`, Y =
|
|
1067
|
+
const he = l.map((R) => {
|
|
1068
|
+
const G = `**${R.role === "assistant" ? "AI Assistant" : "User"}**`, Y = be(R);
|
|
1069
1069
|
return `${G}
|
|
1070
1070
|
|
|
1071
1071
|
${Y}`;
|
|
@@ -1074,21 +1074,21 @@ ${Y}`;
|
|
|
1074
1074
|
---
|
|
1075
1075
|
|
|
1076
1076
|
`);
|
|
1077
|
-
|
|
1077
|
+
_(he);
|
|
1078
1078
|
},
|
|
1079
1079
|
share: async () => {
|
|
1080
1080
|
},
|
|
1081
1081
|
clear: c,
|
|
1082
1082
|
stop: d
|
|
1083
1083
|
}, z = {
|
|
1084
|
-
copy:
|
|
1085
|
-
share:
|
|
1084
|
+
copy: C,
|
|
1085
|
+
share: S
|
|
1086
1086
|
};
|
|
1087
1087
|
return /* @__PURE__ */ n(w.Tooltip, { delayDuration: 0, open: z[e], children: /* @__PURE__ */ n(
|
|
1088
1088
|
Si,
|
|
1089
1089
|
{
|
|
1090
1090
|
"data-type": e,
|
|
1091
|
-
"data-copied":
|
|
1091
|
+
"data-copied": b(C || S),
|
|
1092
1092
|
className: `${r} ${e}`,
|
|
1093
1093
|
children: /* @__PURE__ */ n(Bi, { action: e }),
|
|
1094
1094
|
onClick: h(i, D[e]),
|
|
@@ -1222,10 +1222,10 @@ ${Y}`;
|
|
|
1222
1222
|
}), vs = a(re, {
|
|
1223
1223
|
_id: "aiChatFeedbackModal__Header",
|
|
1224
1224
|
children: "Help improve my answers!"
|
|
1225
|
-
}),
|
|
1225
|
+
}), bs = a(ne, {
|
|
1226
1226
|
_id: "aiChatFeedbackModal__Close",
|
|
1227
1227
|
children: /* @__PURE__ */ n(I, { iconKey: "close" })
|
|
1228
|
-
}),
|
|
1228
|
+
}), gs = a("div", {
|
|
1229
1229
|
_id: "aiChatFeedbackModal__Body"
|
|
1230
1230
|
}), Wi = a("form", {
|
|
1231
1231
|
_id: "aiChatFeedbackForm"
|
|
@@ -1289,12 +1289,12 @@ ${Y}`;
|
|
|
1289
1289
|
}), Qi = a("div", {
|
|
1290
1290
|
_id: "aiChatForm__Wrapper"
|
|
1291
1291
|
}), Es = (t) => {
|
|
1292
|
-
const { form: e } =
|
|
1292
|
+
const { form: e } = F();
|
|
1293
1293
|
return e ? /* @__PURE__ */ n(Qi, { ...t }) : null;
|
|
1294
1294
|
}, Ui = a("form", {
|
|
1295
1295
|
_id: "aiChatForm"
|
|
1296
1296
|
}), Ss = (t) => {
|
|
1297
|
-
const { onSubmit: e, ...i } = t, { conversationId: r, messages: s } =
|
|
1297
|
+
const { onSubmit: e, ...i } = t, { conversationId: r, messages: s } = g(), { handleSubmit: o, isSuccess: c } = F();
|
|
1298
1298
|
return c ? null : /* @__PURE__ */ n(
|
|
1299
1299
|
Ui,
|
|
1300
1300
|
{
|
|
@@ -1309,29 +1309,29 @@ ${Y}`;
|
|
|
1309
1309
|
_id: "aiChatForm__Close",
|
|
1310
1310
|
children: /* @__PURE__ */ n(I, { iconKey: "close" })
|
|
1311
1311
|
}), ks = (t) => {
|
|
1312
|
-
const { onClick: e, ...i } = t, { closeForm: r } =
|
|
1312
|
+
const { onClick: e, ...i } = t, { closeForm: r } = F();
|
|
1313
1313
|
return /* @__PURE__ */ n(Ki, { onClick: h(e, r), ...i });
|
|
1314
1314
|
}, Bs = a("div", {
|
|
1315
1315
|
_id: "aiChatForm__Header"
|
|
1316
1316
|
}), qi = a("h2", {
|
|
1317
1317
|
_id: "aiChatForm__Heading"
|
|
1318
1318
|
}), ys = (t) => {
|
|
1319
|
-
const { form: e } =
|
|
1319
|
+
const { form: e } = F();
|
|
1320
1320
|
return e?.heading ? /* @__PURE__ */ n(qi, { children: e.heading, ...t }) : null;
|
|
1321
1321
|
}, ji = a(K, {
|
|
1322
1322
|
_id: "aiChatForm__Description"
|
|
1323
1323
|
}), Ts = (t) => {
|
|
1324
|
-
const { form: e } =
|
|
1324
|
+
const { form: e } = F();
|
|
1325
1325
|
return e?.description ? /* @__PURE__ */ n(ji, { children: e.description, ...t }) : null;
|
|
1326
1326
|
}, zi = a("div", {
|
|
1327
1327
|
_id: "aiChatForm__Content"
|
|
1328
1328
|
}), ws = (t) => {
|
|
1329
|
-
const { children: e, ...i } = t, { getFields: r } =
|
|
1329
|
+
const { children: e, ...i } = t, { getFields: r } = F(), { conversationId: s } = g(), o = r(s) || [];
|
|
1330
1330
|
return /* @__PURE__ */ n(zi, { children: y(e, o), ...i });
|
|
1331
1331
|
}, Gi = a("div", {
|
|
1332
1332
|
_id: "aiChatForm__Field"
|
|
1333
1333
|
}), Hs = (t) => {
|
|
1334
|
-
const { field: e, autoFocus: i, ...r } = t, { control: s, errors: o } =
|
|
1334
|
+
const { field: e, autoFocus: i, ...r } = t, { control: s, errors: o } = F();
|
|
1335
1335
|
return /* @__PURE__ */ n(
|
|
1336
1336
|
Ge,
|
|
1337
1337
|
{
|
|
@@ -1343,7 +1343,7 @@ ${Y}`;
|
|
|
1343
1343
|
return /* @__PURE__ */ n(
|
|
1344
1344
|
ze,
|
|
1345
1345
|
{
|
|
1346
|
-
"data-invalid":
|
|
1346
|
+
"data-invalid": b(!!o[e.name]),
|
|
1347
1347
|
field: e,
|
|
1348
1348
|
fieldProps: c,
|
|
1349
1349
|
autoFocus: i,
|
|
@@ -1351,7 +1351,7 @@ ${Y}`;
|
|
|
1351
1351
|
Gi,
|
|
1352
1352
|
{
|
|
1353
1353
|
"data-input-type": e.inputType,
|
|
1354
|
-
"data-hidden":
|
|
1354
|
+
"data-hidden": b(e.isHidden),
|
|
1355
1355
|
...r
|
|
1356
1356
|
}
|
|
1357
1357
|
)
|
|
@@ -1367,7 +1367,7 @@ ${Y}`;
|
|
|
1367
1367
|
return /* @__PURE__ */ n(
|
|
1368
1368
|
Yi,
|
|
1369
1369
|
{
|
|
1370
|
-
"data-required":
|
|
1370
|
+
"data-required": b(e.isRequired),
|
|
1371
1371
|
htmlFor: e.name,
|
|
1372
1372
|
children: e.label,
|
|
1373
1373
|
...t
|
|
@@ -1389,7 +1389,7 @@ ${Y}`;
|
|
|
1389
1389
|
id: e.name,
|
|
1390
1390
|
autoFocus: c,
|
|
1391
1391
|
placeholder: "placeholder" in e ? e.placeholder : void 0,
|
|
1392
|
-
"data-invalid":
|
|
1392
|
+
"data-invalid": b(!!i),
|
|
1393
1393
|
onChange: h(d, r),
|
|
1394
1394
|
onBlur: h(m, s),
|
|
1395
1395
|
...o,
|
|
@@ -1419,7 +1419,7 @@ ${Y}`;
|
|
|
1419
1419
|
id: e.name,
|
|
1420
1420
|
autoFocus: d,
|
|
1421
1421
|
"data-value": r,
|
|
1422
|
-
"data-invalid":
|
|
1422
|
+
"data-invalid": b(!!i),
|
|
1423
1423
|
...u,
|
|
1424
1424
|
...c,
|
|
1425
1425
|
onChange: h(m, v),
|
|
@@ -1441,7 +1441,7 @@ ${Y}`;
|
|
|
1441
1441
|
id: e.name,
|
|
1442
1442
|
name: e.name,
|
|
1443
1443
|
autoFocus: s,
|
|
1444
|
-
"data-invalid":
|
|
1444
|
+
"data-invalid": b(!!i),
|
|
1445
1445
|
checked: r.value,
|
|
1446
1446
|
onCheckedChange: h(o, r.onChange),
|
|
1447
1447
|
...c
|
|
@@ -1458,7 +1458,7 @@ ${Y}`;
|
|
|
1458
1458
|
ea,
|
|
1459
1459
|
{
|
|
1460
1460
|
name: e.name,
|
|
1461
|
-
"data-invalid":
|
|
1461
|
+
"data-invalid": b(!!i),
|
|
1462
1462
|
value: r.value,
|
|
1463
1463
|
onValueChange: h(s, r.onChange),
|
|
1464
1464
|
...o
|
|
@@ -1505,7 +1505,7 @@ ${Y}`;
|
|
|
1505
1505
|
}, aa = a("span", {
|
|
1506
1506
|
_id: "aiChatForm__Error"
|
|
1507
1507
|
}), Ys = (t) => {
|
|
1508
|
-
const { formError: e } =
|
|
1508
|
+
const { formError: e } = F();
|
|
1509
1509
|
return e ? /* @__PURE__ */ n(aa, { children: e.message, ...t }) : null;
|
|
1510
1510
|
}, Js = a("div", {
|
|
1511
1511
|
_id: "aiChatForm__Footer"
|
|
@@ -1514,34 +1514,34 @@ ${Y}`;
|
|
|
1514
1514
|
children: "Cancel",
|
|
1515
1515
|
type: "button"
|
|
1516
1516
|
}), Xs = (t) => {
|
|
1517
|
-
const { onClick: e, ...i } = t, { closeForm: r } =
|
|
1517
|
+
const { onClick: e, ...i } = t, { closeForm: r } = F();
|
|
1518
1518
|
return /* @__PURE__ */ n(na, { onClick: h(e, r), ...i });
|
|
1519
1519
|
}, ra = a("button", {
|
|
1520
1520
|
_id: "aiChatForm__Submit",
|
|
1521
1521
|
children: "Submit",
|
|
1522
1522
|
type: "submit"
|
|
1523
1523
|
}), Zs = (t) => {
|
|
1524
|
-
const { onClick: e, ...i } = t, { isSubmitting: r, form: s } =
|
|
1524
|
+
const { onClick: e, ...i } = t, { isSubmitting: r, form: s } = F(), o = s?.buttons.submit.label || "Submit";
|
|
1525
1525
|
return /* @__PURE__ */ n(ra, { disabled: r, ...i, children: o });
|
|
1526
1526
|
}, sa = a("div", {
|
|
1527
1527
|
_id: "aiChatForm__Success"
|
|
1528
1528
|
}), eo = (t) => {
|
|
1529
|
-
const { isSuccess: e } =
|
|
1529
|
+
const { isSuccess: e } = F();
|
|
1530
1530
|
return e ? /* @__PURE__ */ n(sa, { ...t }) : null;
|
|
1531
1531
|
}, oa = a("h2", {
|
|
1532
1532
|
_id: "aiChatForm__SuccessHeading"
|
|
1533
1533
|
}), to = (t) => {
|
|
1534
|
-
const { form: e } =
|
|
1534
|
+
const { form: e } = F();
|
|
1535
1535
|
return /* @__PURE__ */ n(oa, { children: e?.successView?.heading, ...t });
|
|
1536
1536
|
}, ca = a(K, {
|
|
1537
1537
|
_id: "aiChatForm__SuccessMessage"
|
|
1538
1538
|
}), io = (t) => {
|
|
1539
|
-
const { form: e } =
|
|
1539
|
+
const { form: e } = F();
|
|
1540
1540
|
return /* @__PURE__ */ n(ca, { children: e?.successView?.message, ...t });
|
|
1541
1541
|
}, da = a("button", {
|
|
1542
1542
|
_id: "aiChatForm__SuccessButton"
|
|
1543
1543
|
}), ao = (t) => {
|
|
1544
|
-
const { onClick: e, ...i } = t, { form: r, closeForm: s } =
|
|
1544
|
+
const { onClick: e, ...i } = t, { form: r, closeForm: s } = F(), o = r?.successView?.doneButton;
|
|
1545
1545
|
if (!o) return null;
|
|
1546
1546
|
const c = o.icon && /* @__PURE__ */ n(H, { iconSettings: o.icon }), d = o.label;
|
|
1547
1547
|
return /* @__PURE__ */ n(
|
|
@@ -1603,10 +1603,10 @@ export {
|
|
|
1603
1603
|
mn as ContentScrollAreaViewport,
|
|
1604
1604
|
pn as Disclaimer,
|
|
1605
1605
|
An as DisclaimerArrow,
|
|
1606
|
-
|
|
1606
|
+
gn as DisclaimerContent,
|
|
1607
1607
|
vn as DisclaimerLabel,
|
|
1608
1608
|
_n as DisclaimerText,
|
|
1609
|
-
|
|
1609
|
+
bn as DisclaimerTrigger,
|
|
1610
1610
|
Xn as DynamicComponent,
|
|
1611
1611
|
Zr as EmbeddedChatPrimitiveActionBar,
|
|
1612
1612
|
es as EmbeddedChatPrimitiveActions,
|
|
@@ -1654,10 +1654,10 @@ export {
|
|
|
1654
1654
|
mn as EmbeddedChatPrimitiveContentScrollAreaViewport,
|
|
1655
1655
|
pn as EmbeddedChatPrimitiveDisclaimer,
|
|
1656
1656
|
An as EmbeddedChatPrimitiveDisclaimerArrow,
|
|
1657
|
-
|
|
1657
|
+
gn as EmbeddedChatPrimitiveDisclaimerContent,
|
|
1658
1658
|
vn as EmbeddedChatPrimitiveDisclaimerLabel,
|
|
1659
1659
|
_n as EmbeddedChatPrimitiveDisclaimerText,
|
|
1660
|
-
|
|
1660
|
+
bn as EmbeddedChatPrimitiveDisclaimerTrigger,
|
|
1661
1661
|
Xn as EmbeddedChatPrimitiveDynamicComponent,
|
|
1662
1662
|
Mn as EmbeddedChatPrimitiveExampleQuestion,
|
|
1663
1663
|
In as EmbeddedChatPrimitiveExampleQuestionButton,
|
|
@@ -1671,8 +1671,8 @@ export {
|
|
|
1671
1671
|
Ms as EmbeddedChatPrimitiveFeedbackItemDescription,
|
|
1672
1672
|
fs as EmbeddedChatPrimitiveFeedbackItemLabel,
|
|
1673
1673
|
us as EmbeddedChatPrimitiveFeedbackModal,
|
|
1674
|
-
|
|
1675
|
-
|
|
1674
|
+
gs as EmbeddedChatPrimitiveFeedbackModalBody,
|
|
1675
|
+
bs as EmbeddedChatPrimitiveFeedbackModalClose,
|
|
1676
1676
|
ps as EmbeddedChatPrimitiveFeedbackModalContent,
|
|
1677
1677
|
vs as EmbeddedChatPrimitiveFeedbackModalHeader,
|
|
1678
1678
|
Cs as EmbeddedChatPrimitiveFeedbackModalOverlay,
|
|
@@ -1719,8 +1719,8 @@ export {
|
|
|
1719
1719
|
hs as EmbeddedChatPrimitiveHelpActionsMenuItemIcon,
|
|
1720
1720
|
cs as EmbeddedChatPrimitiveHelpActionsTrigger,
|
|
1721
1721
|
_r as EmbeddedChatPrimitiveInput,
|
|
1722
|
-
|
|
1723
|
-
|
|
1722
|
+
br as EmbeddedChatPrimitiveInputFieldset,
|
|
1723
|
+
gr as EmbeddedChatPrimitiveInputGroup,
|
|
1724
1724
|
yn as EmbeddedChatPrimitiveIntroMessageWrapper,
|
|
1725
1725
|
Jn as EmbeddedChatPrimitiveMarkdown,
|
|
1726
1726
|
ar as EmbeddedChatPrimitiveMessageAction,
|
|
@@ -1786,8 +1786,8 @@ export {
|
|
|
1786
1786
|
Ms as FeedbackItemDescription,
|
|
1787
1787
|
fs as FeedbackItemLabel,
|
|
1788
1788
|
us as FeedbackModal,
|
|
1789
|
-
|
|
1790
|
-
|
|
1789
|
+
gs as FeedbackModalBody,
|
|
1790
|
+
bs as FeedbackModalClose,
|
|
1791
1791
|
ps as FeedbackModalContent,
|
|
1792
1792
|
vs as FeedbackModalHeader,
|
|
1793
1793
|
Cs as FeedbackModalOverlay,
|
|
@@ -1836,8 +1836,8 @@ export {
|
|
|
1836
1836
|
hs as HelpActionsMenuItemIcon,
|
|
1837
1837
|
cs as HelpActionsTrigger,
|
|
1838
1838
|
_r as Input,
|
|
1839
|
-
|
|
1840
|
-
|
|
1839
|
+
br as InputFieldset,
|
|
1840
|
+
gr as InputGroup,
|
|
1841
1841
|
yn as IntroMessageWrapper,
|
|
1842
1842
|
Jn as Markdown,
|
|
1843
1843
|
ar as MessageAction,
|