@inkeep/agents-ui 0.14.17 → 0.14.19
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.d.cts +7 -13
- package/dist/index.d.ts +7 -13
- package/dist/index.js +21 -21
- package/dist/primitives/atoms/markdown/components.cjs +1 -1
- package/dist/primitives/atoms/markdown/components.js +15 -12
- package/dist/primitives/atoms/markdown/index.cjs +1 -1
- package/dist/primitives/atoms/markdown/index.js +17 -16
- package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
- package/dist/primitives/components/embedded-chat/use-stream-processor.js +83 -68
- package/dist/primitives/components/embedded-chat.cjs +3 -3
- package/dist/primitives/components/embedded-chat.js +69 -64
- package/dist/primitives/hooks/index.cjs +1 -1
- package/dist/primitives/hooks/index.js +3 -3
- package/dist/primitives/hooks/use-simple-scroll.cjs +1 -0
- package/dist/primitives/hooks/use-simple-scroll.js +18 -0
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.js +21 -21
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/utils/component-ids.cjs +1 -1
- package/dist/primitives/utils/component-ids.js +2 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +21 -21
- package/dist/styled/components/data-summary-group.cjs +1 -1
- package/dist/styled/components/data-summary-group.js +10 -11
- package/dist/styled/components/ui/markdown-styles.cjs +1 -1
- package/dist/styled/components/ui/markdown-styles.js +1 -0
- package/dist/styled/index.cjs +1 -1
- package/dist/styled/index.js +2 -2
- package/dist/styled/inkeep.css.cjs +4 -0
- package/dist/styled/inkeep.css.js +4 -0
- package/package.json +1 -1
- package/dist/primitives/hooks/use-scroll-to-bottom.cjs +0 -1
- package/dist/primitives/hooks/use-scroll-to-bottom.js +0 -52
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as n, jsxs as
|
|
3
|
-
import
|
|
2
|
+
import { jsx as n, jsxs as W, Fragment as Z } from "react/jsx-runtime";
|
|
3
|
+
import J, { memo as E, forwardRef as Q, useRef as O, useState as V, useMemo as Ce, useEffect as $, useLayoutEffect as fe } from "react";
|
|
4
4
|
import * as Me from "react-dom/client";
|
|
5
5
|
import ee from "react-textarea-autosize";
|
|
6
6
|
import * as te from "@radix-ui/react-avatar";
|
|
7
|
-
import * as
|
|
7
|
+
import * as U from "@radix-ui/react-checkbox";
|
|
8
8
|
import * as T from "@radix-ui/react-popover";
|
|
9
9
|
import * as w from "@radix-ui/react-tooltip";
|
|
10
|
-
import * as
|
|
10
|
+
import * as R from "@radix-ui/react-scroll-area";
|
|
11
11
|
import { ItemText as Ie, Trigger as Ee, Icon as Se, Content as ke, Viewport as Be, Item as ye, ItemIndicator as Te, Root as we, Value as He } from "../atoms/select.js";
|
|
12
12
|
import { Overlay as ie, Content as ae, Close as ne, Title as re, Root as oe } from "../atoms/dialog.js";
|
|
13
13
|
import Le from "../atoms/avatars/ai.js";
|
|
@@ -15,13 +15,13 @@ import xe from "../atoms/avatars/user.js";
|
|
|
15
15
|
import { CustomIcon as I } from "../atoms/icons/custom-icon.js";
|
|
16
16
|
import { BuiltInIconRenderer as H } from "../atoms/icons/built-in-icon-renderer.js";
|
|
17
17
|
import { LinkWithQueryParams as De } from "../atoms/link.js";
|
|
18
|
-
import { Markdown as
|
|
19
|
-
import { AttachmentItemProvider as pe, useAttachmentItem as
|
|
18
|
+
import { Markdown as K } from "../atoms/markdown/index.js";
|
|
19
|
+
import { AttachmentItemProvider as pe, useAttachmentItem as q } from "../providers/attachment-item-provider.js";
|
|
20
20
|
import { useAttachmentsBar as k, AttachmentsBarProvider as Oe } from "../providers/attachments-bar-provider.js";
|
|
21
21
|
import { SourceItemProvider as We, 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 se } from "../providers/feedback-provider.js";
|
|
24
|
-
import { MessageAttachmentsProvider as Re, useMessageAttachments as
|
|
24
|
+
import { MessageAttachmentsProvider as Re, useMessageAttachments as j } from "../providers/message-attachments-provider.js";
|
|
25
25
|
import { useMessage as f, MessageProvider as Ne } 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";
|
|
@@ -43,7 +43,7 @@ import { useModal as Xe } from "./modal/modal-provider.js";
|
|
|
43
43
|
import { useColorModeValue as Ze } from "../../color-mode/index.js";
|
|
44
44
|
import { useComposedRefs as me } from "../utils/compose-refs.js";
|
|
45
45
|
import { composeEventHandlers as h } from "../utils/compose-event-handlers.js";
|
|
46
|
-
import {
|
|
46
|
+
import { useSimpleScroll as et } from "../hooks/use-simple-scroll.js";
|
|
47
47
|
import { useDebounce as tt } from "../hooks/use-debounce.js";
|
|
48
48
|
import { HoverPopoverProvider as it, useHoverPopover as be } from "../providers/hover-popover-provider.js";
|
|
49
49
|
import { useWidgetAutoFocus as at } from "./modal/widget-auto-focus.js";
|
|
@@ -53,7 +53,7 @@ import { getIcon as rt } from "../utils/get-source-icon.js";
|
|
|
53
53
|
import { CITATION_ARTIFACT_TYPE as _e } from "../../types/message.js";
|
|
54
54
|
const ot = "__intro__", st = a("div", {
|
|
55
55
|
_id: "aiChatWrapper"
|
|
56
|
-
}), nn =
|
|
56
|
+
}), nn = Q((t, e) => {
|
|
57
57
|
const { ...i } = t, { isHidden: r, isMobile: o } = b(), [s, c] = Ke(), d = me(e, s), m = c?.width ? c.width > 580 : !0, l = Xe();
|
|
58
58
|
return /* @__PURE__ */ n(
|
|
59
59
|
st,
|
|
@@ -86,34 +86,39 @@ const ot = "__intro__", st = a("div", {
|
|
|
86
86
|
}
|
|
87
87
|
), mn = a("div", {
|
|
88
88
|
_id: "aiChatContent"
|
|
89
|
-
}), ln = a(
|
|
89
|
+
}), ln = a(R.Root, {
|
|
90
90
|
_id: "aiChatContentScrollArea"
|
|
91
|
-
}), mt = a(
|
|
91
|
+
}), mt = a(R.Viewport, {
|
|
92
92
|
_id: "aiChatContentScrollArea__Viewport"
|
|
93
|
-
}), hn =
|
|
94
|
-
const { containerRef: r } = et(),
|
|
95
|
-
return
|
|
93
|
+
}), hn = Q(({ children: t, ...e }, i) => {
|
|
94
|
+
const { containerRef: r, scrollToBottom: o } = et(), s = me(i, r), { messages: c } = b();
|
|
95
|
+
return $(() => {
|
|
96
|
+
c.length > 0 && o();
|
|
97
|
+
}, [c.length, o]), /* @__PURE__ */ n(
|
|
96
98
|
mt,
|
|
97
99
|
{
|
|
98
|
-
ref:
|
|
100
|
+
ref: s,
|
|
99
101
|
children: (
|
|
100
102
|
/* added this to fix an overflow issue see https://github.com/radix-ui/primitives/issues/926 */
|
|
101
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ W("div", { "data-part": "grid", style: { display: "grid" }, children: [
|
|
104
|
+
t,
|
|
105
|
+
"="
|
|
106
|
+
] })
|
|
102
107
|
),
|
|
103
108
|
...e
|
|
104
109
|
}
|
|
105
110
|
);
|
|
106
111
|
}), un = a(
|
|
107
|
-
|
|
112
|
+
R.ScrollAreaScrollbar,
|
|
108
113
|
{
|
|
109
114
|
_id: "aiChatContentScrollArea__Scrollbar"
|
|
110
115
|
}
|
|
111
116
|
), Cn = a(
|
|
112
|
-
|
|
117
|
+
R.ScrollAreaThumb,
|
|
113
118
|
{
|
|
114
119
|
_id: "aiChatContentScrollArea__Thumb"
|
|
115
120
|
}
|
|
116
|
-
), pn = a(
|
|
121
|
+
), pn = a(R.Corner, {
|
|
117
122
|
_id: "aiChatContentScrollArea__Corner"
|
|
118
123
|
}), lt = a("div", {
|
|
119
124
|
_id: "aiChatMessages"
|
|
@@ -124,7 +129,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
124
129
|
_id: "aiChatDisclaimer"
|
|
125
130
|
}), gn = E(
|
|
126
131
|
(t) => {
|
|
127
|
-
const { aiChatSettings: e } = p(), [i, r] =
|
|
132
|
+
const { aiChatSettings: e } = p(), [i, r] = V(!1), o = tt(i, 100);
|
|
128
133
|
return e.disclaimerSettings?.isEnabled ? /* @__PURE__ */ n(it, { open: i, setOpen: r, children: /* @__PURE__ */ n(T.Root, { open: o, onOpenChange: r, children: /* @__PURE__ */ n(ht, { ...t }) }) }) : null;
|
|
129
134
|
}
|
|
130
135
|
), ut = a("span", {
|
|
@@ -165,7 +170,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
165
170
|
...t
|
|
166
171
|
}
|
|
167
172
|
);
|
|
168
|
-
}, vt = a(
|
|
173
|
+
}, vt = a(K, {
|
|
169
174
|
_id: "aiChatDisclaimerText"
|
|
170
175
|
}), Pn = E(
|
|
171
176
|
(t) => {
|
|
@@ -195,7 +200,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
195
200
|
}
|
|
196
201
|
), At = a("div", {
|
|
197
202
|
_id: "aiChatExampleQuestion"
|
|
198
|
-
}), En =
|
|
203
|
+
}), En = Q((t, e) => {
|
|
199
204
|
const { aiChatSettings: i } = p(), r = i.isFirstExampleQuestionHighlighted;
|
|
200
205
|
return /* @__PURE__ */ n(At, { ref: e, "data-highlight": g(r), ...t });
|
|
201
206
|
}), Pt = a("button", {
|
|
@@ -305,8 +310,8 @@ const ot = "__intro__", st = a("div", {
|
|
|
305
310
|
const { onLoadingStatusChange: e, ...i } = t, {
|
|
306
311
|
aiChatSettings: r,
|
|
307
312
|
baseSettings: { userProperties: o }
|
|
308
|
-
} = p(), { message: s } = f(), { aiAssistantAvatar: c } = r ?? {}, d = typeof c == "string" ? c : c?.light, m = (typeof c == "string" ? c : c?.dark) ?? d, l = Ze(d, m), [C, v] =
|
|
309
|
-
|
|
313
|
+
} = p(), { message: s } = f(), { aiAssistantAvatar: c } = r ?? {}, d = typeof c == "string" ? c : c?.light, m = (typeof c == "string" ? c : c?.dark) ?? d, l = Ze(d, m), [C, v] = V(l);
|
|
314
|
+
$(() => {
|
|
310
315
|
v(l);
|
|
311
316
|
}, [l]);
|
|
312
317
|
const u = (_) => {
|
|
@@ -392,7 +397,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
392
397
|
}, Wt = a("div", {
|
|
393
398
|
_id: "aiChatMessageAttachments__Item"
|
|
394
399
|
}), Un = (t) => {
|
|
395
|
-
const { attachment: e, onClick: i, ...r } = t, { selectItem: o, onOpen: s } =
|
|
400
|
+
const { attachment: e, onClick: i, ...r } = t, { selectItem: o, onOpen: s } = j();
|
|
396
401
|
return /* @__PURE__ */ n(pe, { attachment: e, children: /* @__PURE__ */ n(
|
|
397
402
|
Wt,
|
|
398
403
|
{
|
|
@@ -405,17 +410,17 @@ const ot = "__intro__", st = a("div", {
|
|
|
405
410
|
}, Rt = a(H, {
|
|
406
411
|
_id: "aiChatMessageAttachments__ItemIcon"
|
|
407
412
|
}), Kn = (t) => {
|
|
408
|
-
const { attachment: e } =
|
|
413
|
+
const { attachment: e } = q(), i = e.contentType?.attachmentIcon;
|
|
409
414
|
return i ? /* @__PURE__ */ n(Rt, { iconSettings: i, ...t }) : null;
|
|
410
415
|
}, Nt = a("span", {
|
|
411
416
|
_id: "aiChatMessageAttachments__ItemTitle"
|
|
412
417
|
}), qn = (t) => {
|
|
413
|
-
const { attachment: e } =
|
|
418
|
+
const { attachment: e } = q();
|
|
414
419
|
return /* @__PURE__ */ n(Nt, { children: e.title, ...t });
|
|
415
420
|
}, Vt = a(oe, {
|
|
416
421
|
_id: "aiChatMessageAttachmentsPreview"
|
|
417
422
|
}), jn = (t) => {
|
|
418
|
-
const { onOpenChange: e, ...i } = t, { selectItem: r, isOpen: o, onClose: s, selectedItem: c } =
|
|
423
|
+
const { onOpenChange: e, ...i } = t, { selectItem: r, isOpen: o, onClose: s, selectedItem: c } = j();
|
|
419
424
|
return /* @__PURE__ */ n(
|
|
420
425
|
Vt,
|
|
421
426
|
{
|
|
@@ -434,7 +439,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
434
439
|
}), $t = a(re, {
|
|
435
440
|
_id: "aiChatMessageAttachmentsPreview__Header"
|
|
436
441
|
}), Yn = (t) => {
|
|
437
|
-
const { selectedItem: e } =
|
|
442
|
+
const { selectedItem: e } = j();
|
|
438
443
|
return /* @__PURE__ */ n(
|
|
439
444
|
$t,
|
|
440
445
|
{
|
|
@@ -448,12 +453,12 @@ const ot = "__intro__", st = a("div", {
|
|
|
448
453
|
}), Qt = a("p", {
|
|
449
454
|
_id: "aiChatMessageAttachmentsPreview__Body"
|
|
450
455
|
}), Xn = (t) => {
|
|
451
|
-
const { selectedItem: e } =
|
|
456
|
+
const { selectedItem: e } = j();
|
|
452
457
|
return /* @__PURE__ */ n(Qt, { children: e?.content, ...t });
|
|
453
458
|
}, Zn = (t) => {
|
|
454
459
|
const { text: e, componentStyles: i, ...r } = t, { aiChatSettings: o } = p(), { shouldOpenLinksInNewTab: s } = o;
|
|
455
460
|
return /* @__PURE__ */ n(
|
|
456
|
-
|
|
461
|
+
K,
|
|
457
462
|
{
|
|
458
463
|
children: e,
|
|
459
464
|
componentStyles: i,
|
|
@@ -466,12 +471,12 @@ const ot = "__intro__", st = a("div", {
|
|
|
466
471
|
props: e,
|
|
467
472
|
componentDef: i
|
|
468
473
|
}) => {
|
|
469
|
-
const o = nt()?.shadowHost, s = O(void 0), c = O(null), d = O(null), m = O(!1), [l, C] =
|
|
474
|
+
const o = nt()?.shadowHost, s = O(void 0), c = O(null), d = O(null), m = O(!1), [l, C] = V(!1), [v, u] = V(!1), _ = O(i);
|
|
470
475
|
Ce(() => {
|
|
471
476
|
i !== _.current && (typeof i == "function" && typeof _.current == "function" ? i.toString() !== _.current.toString() && (_.current = i) : _.current = i);
|
|
472
477
|
}, [i]);
|
|
473
478
|
const B = _.current;
|
|
474
|
-
return
|
|
479
|
+
return $(() => {
|
|
475
480
|
s.current || (s.current = `dyn:${t}:${crypto.randomUUID()}`, C(!0));
|
|
476
481
|
}, [t]), fe(() => {
|
|
477
482
|
if (!B || !o || !l || !s.current)
|
|
@@ -487,7 +492,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
487
492
|
F.parentNode === o && F.remove(), c.current = null;
|
|
488
493
|
});
|
|
489
494
|
};
|
|
490
|
-
}, [B, o, l, t]),
|
|
495
|
+
}, [B, o, l, t]), $(() => {
|
|
491
496
|
const P = c.current;
|
|
492
497
|
if (!P || m.current) return;
|
|
493
498
|
const F = (S) => {
|
|
@@ -495,7 +500,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
495
500
|
try {
|
|
496
501
|
if (typeof S == "function" && S.constructor === Function) {
|
|
497
502
|
const D = S({});
|
|
498
|
-
return
|
|
503
|
+
return J.isValidElement(D);
|
|
499
504
|
}
|
|
500
505
|
return !1;
|
|
501
506
|
} catch {
|
|
@@ -506,7 +511,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
506
511
|
if (F(B))
|
|
507
512
|
try {
|
|
508
513
|
const S = B;
|
|
509
|
-
M =
|
|
514
|
+
M = J.createElement(S, e || {});
|
|
510
515
|
} catch (S) {
|
|
511
516
|
console.error("Error creating React element from component:", S);
|
|
512
517
|
return;
|
|
@@ -517,7 +522,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
517
522
|
console.error("Invalid component definition");
|
|
518
523
|
return;
|
|
519
524
|
}
|
|
520
|
-
if (
|
|
525
|
+
if (J.isValidElement(M) || typeof M == "string") {
|
|
521
526
|
if (m.current) return;
|
|
522
527
|
d.current || (d.current = Me.createRoot(P)), !m.current && d.current && d.current.render(M);
|
|
523
528
|
return;
|
|
@@ -549,7 +554,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
549
554
|
conversationId: c
|
|
550
555
|
}
|
|
551
556
|
});
|
|
552
|
-
}, m = i.label || "Contact Support", l = /* @__PURE__ */
|
|
557
|
+
}, m = i.label || "Contact Support", l = /* @__PURE__ */ W(Z, { children: [
|
|
553
558
|
i.icon && /* @__PURE__ */ n(H, { iconSettings: i.icon }),
|
|
554
559
|
m
|
|
555
560
|
] });
|
|
@@ -578,9 +583,9 @@ const ot = "__intro__", st = a("div", {
|
|
|
578
583
|
}), rr = (t) => {
|
|
579
584
|
const { action: e, onClick: i, className: r, ...o } = t, { conversationId: s } = b(), {
|
|
580
585
|
baseSettings: { onFeedback: c }
|
|
581
|
-
} = p(), { message: d } = f(), { isStreaming: m, messages: l } = b(), [C, v] = X(), { feedback: u, submitPositiveFeedback: _, setCurrentFeedback: B, currentFeedback: P } = se(), { logEvent: F } = le(), [M, S] = Ue(), D = l.at(-1)?.id === d?.id,
|
|
582
|
-
if (D && m || !
|
|
583
|
-
const
|
|
586
|
+
} = p(), { message: d } = f(), { isStreaming: m, messages: l } = b(), [C, v] = X(), { feedback: u, submitPositiveFeedback: _, setCurrentFeedback: B, currentFeedback: P } = se(), { logEvent: F } = le(), [M, S] = Ue(), D = l.at(-1)?.id === d?.id, z = d.role === "assistant";
|
|
587
|
+
if (D && m || !z) return null;
|
|
588
|
+
const N = {
|
|
584
589
|
copy() {
|
|
585
590
|
v(ge(d)), F({
|
|
586
591
|
eventName: "assistant_message_copied",
|
|
@@ -597,11 +602,11 @@ const ot = "__intro__", st = a("div", {
|
|
|
597
602
|
downvote() {
|
|
598
603
|
B(d.id);
|
|
599
604
|
}
|
|
600
|
-
},
|
|
605
|
+
}, G = {
|
|
601
606
|
copy: "Copy Message",
|
|
602
607
|
upvote: "Upvote Message",
|
|
603
608
|
downvote: "Downvote Message"
|
|
604
|
-
},
|
|
609
|
+
}, Y = {
|
|
605
610
|
copy: /* @__PURE__ */ n(I, { iconKey: C ? "messageCopied" : "messageCopy" }),
|
|
606
611
|
upvote: /* @__PURE__ */ n(I, { iconKey: M ? "messageCopied" : "thumbsUp" }),
|
|
607
612
|
downvote: /* @__PURE__ */ n(I, { iconKey: "thumbsDown" })
|
|
@@ -624,10 +629,10 @@ const ot = "__intro__", st = a("div", {
|
|
|
624
629
|
{
|
|
625
630
|
"data-action": e,
|
|
626
631
|
...Fe[e],
|
|
627
|
-
children:
|
|
628
|
-
"aria-label":
|
|
632
|
+
children: Y[e],
|
|
633
|
+
"aria-label": G[e],
|
|
629
634
|
className: `${r} ${e}`,
|
|
630
|
-
onClick: h(i,
|
|
635
|
+
onClick: h(i, N[e]),
|
|
631
636
|
...o
|
|
632
637
|
}
|
|
633
638
|
);
|
|
@@ -767,7 +772,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
767
772
|
_id: "aiChatInput__Group"
|
|
768
773
|
}), oi = a("textarea", {
|
|
769
774
|
_id: "aiChatInput"
|
|
770
|
-
}), Pr =
|
|
775
|
+
}), Pr = Q(({ onChange: t, onKeyDown: e, ...i }, r) => {
|
|
771
776
|
const { handleInputChange: o, handleInputKeyDown: s, input: c, error: d, shouldAutoFocusInput: m, inputRef: l } = b(), { aiChatSettings: C } = p(), v = me(
|
|
772
777
|
r,
|
|
773
778
|
l
|
|
@@ -821,12 +826,12 @@ const ot = "__intro__", st = a("div", {
|
|
|
821
826
|
}, li = a(H, {
|
|
822
827
|
_id: "aiChatAttachmentsBar__AttachmentIcon"
|
|
823
828
|
}), Sr = (t) => {
|
|
824
|
-
const { attachment: e } =
|
|
829
|
+
const { attachment: e } = q(), i = e.contentType?.attachmentIcon;
|
|
825
830
|
return i ? /* @__PURE__ */ n(li, { iconSettings: i, ...t }) : null;
|
|
826
831
|
}, hi = a("span", {
|
|
827
832
|
_id: "aiChatAttachmentsBar__AttachmentTitle"
|
|
828
833
|
}), kr = (t) => {
|
|
829
|
-
const { attachment: e } =
|
|
834
|
+
const { attachment: e } = q();
|
|
830
835
|
return /* @__PURE__ */ n(hi, { children: e.title, ...t });
|
|
831
836
|
}, ui = a("button", {
|
|
832
837
|
_id: "aiChatAttachmentsBar__AttachmentDelete"
|
|
@@ -857,7 +862,7 @@ const ot = "__intro__", st = a("div", {
|
|
|
857
862
|
side: "bottom",
|
|
858
863
|
sideOffset: 3,
|
|
859
864
|
align: "center",
|
|
860
|
-
children: /* @__PURE__ */
|
|
865
|
+
children: /* @__PURE__ */ W(Z, { children: [
|
|
861
866
|
/* @__PURE__ */ n(Ci, {}),
|
|
862
867
|
"Attachments will be kept in context for the entire conversation."
|
|
863
868
|
] })
|
|
@@ -1070,11 +1075,11 @@ const ot = "__intro__", st = a("div", {
|
|
|
1070
1075
|
help: () => {
|
|
1071
1076
|
},
|
|
1072
1077
|
copy: () => {
|
|
1073
|
-
const he = C.map((
|
|
1074
|
-
const
|
|
1075
|
-
return `${
|
|
1078
|
+
const he = C.map((N) => {
|
|
1079
|
+
const G = `**${N.role === "assistant" ? "AI Assistant" : "User"}**`, Y = ge(N);
|
|
1080
|
+
return `${G}
|
|
1076
1081
|
|
|
1077
|
-
${
|
|
1082
|
+
${Y}`;
|
|
1078
1083
|
}).join(`
|
|
1079
1084
|
|
|
1080
1085
|
---
|
|
@@ -1086,11 +1091,11 @@ ${G}`;
|
|
|
1086
1091
|
},
|
|
1087
1092
|
clear: c,
|
|
1088
1093
|
stop: d
|
|
1089
|
-
},
|
|
1094
|
+
}, z = {
|
|
1090
1095
|
copy: _,
|
|
1091
1096
|
share: P
|
|
1092
1097
|
};
|
|
1093
|
-
return /* @__PURE__ */ n(w.Tooltip, { delayDuration: 0, open:
|
|
1098
|
+
return /* @__PURE__ */ n(w.Tooltip, { delayDuration: 0, open: z[e], children: /* @__PURE__ */ n(
|
|
1094
1099
|
ki,
|
|
1095
1100
|
{
|
|
1096
1101
|
"data-type": e,
|
|
@@ -1119,7 +1124,7 @@ ${G}`;
|
|
|
1119
1124
|
copy: "Copied!",
|
|
1120
1125
|
share: "Link copied!"
|
|
1121
1126
|
};
|
|
1122
|
-
return /* @__PURE__ */
|
|
1127
|
+
return /* @__PURE__ */ W(Ti, { sideOffset: 5, ...r, children: [
|
|
1123
1128
|
/* @__PURE__ */ n(w.Arrow, {}),
|
|
1124
1129
|
i || o[e]
|
|
1125
1130
|
] });
|
|
@@ -1247,7 +1252,7 @@ ${G}`;
|
|
|
1247
1252
|
}), fo = (t) => {
|
|
1248
1253
|
const { name: e, ...i } = t;
|
|
1249
1254
|
return /* @__PURE__ */ n(Ve, { name: e, children: /* @__PURE__ */ n(Ni, { ...i }) });
|
|
1250
|
-
}, Vi = a(
|
|
1255
|
+
}, Vi = a(U.Root, {
|
|
1251
1256
|
_id: "aiChatFeedbackItem__Checkbox"
|
|
1252
1257
|
}), Mo = (t) => {
|
|
1253
1258
|
const { name: e, focusItem: i } = ce(), { onCheckedChange: r, ...o } = t, s = (c) => {
|
|
@@ -1262,7 +1267,7 @@ ${G}`;
|
|
|
1262
1267
|
...o
|
|
1263
1268
|
}
|
|
1264
1269
|
);
|
|
1265
|
-
}, Io = a(
|
|
1270
|
+
}, Io = a(U.Indicator, {
|
|
1266
1271
|
_id: "aiChatFeedbackItem__CheckboxIndicator",
|
|
1267
1272
|
children: /* @__PURE__ */ n(ve, {})
|
|
1268
1273
|
}), $i = a("label", {
|
|
@@ -1324,7 +1329,7 @@ ${G}`;
|
|
|
1324
1329
|
}), Ho = (t) => {
|
|
1325
1330
|
const { form: e } = A();
|
|
1326
1331
|
return e?.heading ? /* @__PURE__ */ n(ji, { children: e.heading, ...t }) : null;
|
|
1327
|
-
}, zi = a(
|
|
1332
|
+
}, zi = a(K, {
|
|
1328
1333
|
_id: "aiChatForm__Description"
|
|
1329
1334
|
}), Lo = (t) => {
|
|
1330
1335
|
const { form: e } = A();
|
|
@@ -1437,7 +1442,7 @@ ${G}`;
|
|
|
1437
1442
|
type: "textarea",
|
|
1438
1443
|
asChild: !0,
|
|
1439
1444
|
children: /* @__PURE__ */ n(ee, { maxRows: 8 })
|
|
1440
|
-
}), ea = a(
|
|
1445
|
+
}), ea = a(U.Root, {
|
|
1441
1446
|
_id: "aiChatForm__FieldCheckbox"
|
|
1442
1447
|
}), Vo = (t) => {
|
|
1443
1448
|
const { field: e, error: i, fieldProps: r, autoFocus: o } = x(), { onCheckedChange: s, ...c } = t;
|
|
@@ -1453,7 +1458,7 @@ ${G}`;
|
|
|
1453
1458
|
...c
|
|
1454
1459
|
}
|
|
1455
1460
|
);
|
|
1456
|
-
}, $o = a(
|
|
1461
|
+
}, $o = a(U.Indicator, {
|
|
1457
1462
|
_id: "aiChatForm__FieldCheckboxIndicator",
|
|
1458
1463
|
children: /* @__PURE__ */ n(ve, {})
|
|
1459
1464
|
}), ta = a(we, {
|
|
@@ -1539,7 +1544,7 @@ ${G}`;
|
|
|
1539
1544
|
}), ns = (t) => {
|
|
1540
1545
|
const { form: e } = A();
|
|
1541
1546
|
return /* @__PURE__ */ n(ca, { children: e?.successView?.heading, ...t });
|
|
1542
|
-
}, da = a(
|
|
1547
|
+
}, da = a(K, {
|
|
1543
1548
|
_id: "aiChatForm__SuccessMessage"
|
|
1544
1549
|
}), rs = (t) => {
|
|
1545
1550
|
const { form: e } = A();
|
|
@@ -1554,7 +1559,7 @@ ${G}`;
|
|
|
1554
1559
|
ma,
|
|
1555
1560
|
{
|
|
1556
1561
|
onClick: h(e, o),
|
|
1557
|
-
children: /* @__PURE__ */
|
|
1562
|
+
children: /* @__PURE__ */ W(Z, { children: [
|
|
1558
1563
|
c,
|
|
1559
1564
|
d
|
|
1560
1565
|
] }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./use-boolean.cjs"),s=require("./use-component-classnames.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./use-boolean.cjs"),s=require("./use-component-classnames.cjs"),u=require("./use-container-size.cjs"),o=require("./use-copy-to-clipboard.cjs"),r=require("./use-instant-update.cjs"),n=require("./use-is-mounted.cjs"),t=require("./use-media-query.cjs"),i=require("./use-resize-observer.cjs"),l=require("./use-scrolling-fades.cjs"),a=require("./use-settle-action.cjs"),c=require("./use-simple-scroll.cjs");exports.useBoolean=e.useBoolean;exports.useComponentClassNames=s.useComponentClassNames;exports.useContainerSize=u.useContainerSize;exports.useCopyToClipboard=o.useCopyToClipboard;exports.useInstantUpdate=r.useInstantUpdate;exports.useIsMounted=n.useIsMounted;exports.useMediaQuery=t.useMediaQuery;exports.useResizeObserver=i.useResizeObserver;exports.useScrollingFades=l.useScrollingFades;exports.useSettleAction=a.useSettleAction;exports.useSimpleScroll=c.useSimpleScroll;
|
|
@@ -8,7 +8,7 @@ import { useMediaQuery as d } from "./use-media-query.js";
|
|
|
8
8
|
import { useResizeObserver as S } from "./use-resize-observer.js";
|
|
9
9
|
import { useScrollingFades as b } from "./use-scrolling-fades.js";
|
|
10
10
|
import { useSettleAction as z } from "./use-settle-action.js";
|
|
11
|
-
import {
|
|
11
|
+
import { useSimpleScroll as M } from "./use-simple-scroll.js";
|
|
12
12
|
export {
|
|
13
13
|
r as useBoolean,
|
|
14
14
|
s as useComponentClassNames,
|
|
@@ -18,7 +18,7 @@ export {
|
|
|
18
18
|
l as useIsMounted,
|
|
19
19
|
d as useMediaQuery,
|
|
20
20
|
S as useResizeObserver,
|
|
21
|
-
I as useScrollToBottom,
|
|
22
21
|
b as useScrollingFades,
|
|
23
|
-
z as useSettleAction
|
|
22
|
+
z as useSettleAction,
|
|
23
|
+
M as useSimpleScroll
|
|
24
24
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react");function c(){const o=t.useRef(null),r=t.useCallback((l=!0)=>{const e=o.current;e&&e.scrollTo({top:e.scrollHeight,behavior:l?"smooth":"auto"})},[]);return{containerRef:o,scrollToBottom:r}}exports.useSimpleScroll=c;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef as l, useCallback as n } from "react";
|
|
3
|
+
function s() {
|
|
4
|
+
const t = l(null), e = n((r = !0) => {
|
|
5
|
+
const o = t.current;
|
|
6
|
+
o && o.scrollTo({
|
|
7
|
+
top: o.scrollHeight,
|
|
8
|
+
behavior: r ? "smooth" : "auto"
|
|
9
|
+
});
|
|
10
|
+
}, []);
|
|
11
|
+
return {
|
|
12
|
+
containerRef: t,
|
|
13
|
+
scrollToBottom: e
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
s as useSimpleScroll
|
|
18
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./providers/attachment-item-provider.cjs"),c=require("./providers/attachments-bar-provider.cjs"),C=require("./providers/base-events-provider.cjs"),a=require("./providers/chat-form-provider.cjs"),n=require("./providers/config-provider.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./providers/attachment-item-provider.cjs"),c=require("./providers/attachments-bar-provider.cjs"),C=require("./providers/base-events-provider.cjs"),a=require("./providers/chat-form-provider.cjs"),n=require("./providers/config-provider.cjs"),l=require("./providers/feedback-item-provider.cjs"),h=require("./providers/feedback-provider.cjs"),v=require("./providers/form-field-provider.cjs"),i=require("./providers/help-menu-provider.cjs"),p=require("./providers/markdown-provider.cjs"),P=require("./providers/message-attachments-provider.cjs"),d=require("./providers/message-provider.cjs"),F=require("./providers/root-provider.cjs"),I=require("./providers/source-item-provider.cjs"),k=require("./providers/theme-provider.cjs"),S=require("./providers/widget-provider.cjs"),t=require("./providers/sidebar-chat-provider.cjs"),q=require("./components/factory.cjs"),B=require("./components/embedded-chat.cjs"),y=require("./components/sidebar-chat/index.cjs"),g=require("./components/embedded-chat/chat-provider.cjs"),A=require("./components/embedded-search.cjs"),u=require("./components/embedded-search/search-provider.cjs"),f=require("./components/modal.cjs"),b=require("./components/modal/modal-provider.cjs"),R=require("./components/chat-button.cjs"),w=require("./components/searchbar.cjs"),E=require("./hooks/use-boolean.cjs"),T=require("./hooks/use-component-classnames.cjs"),W=require("./hooks/use-container-size.cjs"),O=require("./hooks/use-copy-to-clipboard.cjs"),x=require("./hooks/use-instant-update.cjs"),z=require("./hooks/use-is-mounted.cjs"),D=require("./hooks/use-media-query.cjs"),H=require("./hooks/use-resize-observer.cjs"),L=require("./hooks/use-scrolling-fades.cjs"),j=require("./hooks/use-settle-action.cjs"),Q=require("./hooks/use-simple-scroll.cjs"),o=require("./utils/misc.cjs"),r=require("./utils/component-ids.cjs"),M=require("./utils/compose-refs.cjs"),U=require("./utils/merge-props.cjs"),K=require("./atoms/portal.cjs"),N=require("./atoms/icons/custom-icon.cjs"),$=require("./atoms/icons/built-in-icon-renderer.cjs"),G=require("./atoms/portal-with-theme.cjs"),e=require("./atoms/cmdk/index.cjs"),J=require("./atoms/error-boundary.cjs"),s=require("./atoms/shadow/context.cjs");exports.AttachmentItemProvider=m.AttachmentItemProvider;exports.useAttachmentItem=m.useAttachmentItem;exports.AttachmentsBarProvider=c.AttachmentsBarProvider;exports.useAttachmentsBar=c.useAttachmentsBar;exports.BaseEventsProvider=C.BaseEventsProvider;exports.useBaseEvents=C.useBaseEvents;exports.ChatFormProvider=a.ChatFormProvider;exports.useChatForm=a.useChatForm;exports.useChatFormState=a.useChatFormState;exports.InkeepConfigProvider=n.InkeepConfigProvider;exports.WebWidgetInteractionType=n.WebWidgetInteractionType;exports.useInkeepConfig=n.useInkeepConfig;exports.FeedbackItemProvider=l.FeedbackItemProvider;exports.useFeedbackItem=l.useFeedbackItem;exports.FeedbackProvider=h.FeedbackProvider;exports.useMessageFeedback=h.useMessageFeedback;exports.FormFieldProvider=v.FormFieldProvider;exports.useFormField=v.useFormField;exports.HelpMenuProvider=i.HelpMenuProvider;exports.useHelpMenu=i.useHelpMenu;exports.useHelpMenuState=i.useHelpMenuState;exports.ChatMarkdownProvider=p.ChatMarkdownProvider;exports.useChatMarkdown=p.useChatMarkdown;exports.MessageAttachmentsProvider=P.MessageAttachmentsProvider;exports.useMessageAttachments=P.useMessageAttachments;exports.MessageProvider=d.MessageProvider;exports.useMessage=d.useMessage;exports.useOptionalMessage=d.useOptionalMessage;exports.RootProvider=F.RootProvider;exports.SourceItemProvider=I.SourceItemProvider;exports.useSourceItem=I.useSourceItem;exports.ThemeProvider=k.ThemeProvider;exports.WidgetProvider=S.WidgetProvider;exports.useWidget=S.useWidget;exports.SidebarChatProvider=t.SidebarChatProvider;exports.useInkeepSidebarChat=t.useInkeepSidebarChat;exports.useOptionalSidebarChat=t.useOptionalSidebarChat;exports.useSidebarChat=t.useSidebarChat;exports.ikp=q.ikp;exports.jsxFactory=q.jsxFactory;exports.EmbeddedChatPrimitive=B;exports.SidebarChatPrimitive=y;exports.ChatProvider=g.ChatProvider;exports.useChat=g.useChat;exports.EmbeddedSearchPrimitive=A;exports.SearchProvider=u.SearchProvider;exports.SearchProviderImpl=u.SearchProviderImpl;exports.useSearch=u.useSearch;exports.ModalPrimitive=f;exports.ModalProvider=b.ModalProvider;exports.useModal=b.useModal;exports.ChatButtonPrimitive=R;exports.SearchBarPrimitive=w;exports.useBoolean=E.useBoolean;exports.useComponentClassNames=T.useComponentClassNames;exports.useContainerSize=W.useContainerSize;exports.useCopyToClipboard=O.useCopyToClipboard;exports.useInstantUpdate=x.useInstantUpdate;exports.useIsMounted=z.useIsMounted;exports.useMediaQuery=D.useMediaQuery;exports.useResizeObserver=H.useResizeObserver;exports.useScrollingFades=L.useScrollingFades;exports.useSettleAction=j.useSettleAction;exports.useSimpleScroll=Q.useSimpleScroll;exports.callAll=o.callAll;exports.dataAttr=o.dataAttr;exports.getInitials=o.getInitials;exports.getMessageContent=o.getMessageContent;exports.isString=o.isString;exports.maybeRender=o.maybeRender;exports.toKebabCase=o.toKebabCase;exports.SearchBarComponentIds=r.SearchBarComponentIds;exports.SidebarChatComponentIds=r.SidebarChatComponentIds;exports.aiChatComponentIds=r.aiChatComponentIds;exports.aiSearchComponentIds=r.aiSearchComponentIds;exports.chatButtonComponentIds=r.chatButtonComponentIds;exports.componentIDs=r.componentIDs;exports.markDownComponentIds=r.markDownComponentIds;exports.miscellanousComponentIds=r.miscellanousComponentIds;exports.modalComponentIds=r.modalComponentIds;exports.composeRefs=M.composeRefs;exports.useComposedRefs=M.useComposedRefs;exports.mergeProps=U.mergeProps;exports.Portal=K.Portal;exports.CustomIcon=N.CustomIcon;exports.BuiltInIconRenderer=$.BuiltInIconRenderer;exports.PortalWithTheme=G.PortalWithTheme;exports.Command=e.Command;exports.CommandDialog=e.CommandDialog;exports.CommandEmpty=e.CommandEmpty;exports.CommandInput=e.CommandInput;exports.CommandItem=e.CommandItem;exports.CommandList=e.CommandList;exports.CommandLoading=e.CommandLoading;exports.CommandRoot=e.CommandRoot;exports.CommandSeparator=e.CommandSeparator;exports.defaultFilter=e.defaultFilter;exports.useCommandState=e.useCommandState;exports.useCommandStore=e.useCommandStore;exports.ErrorBoundary=J.ErrorBoundary;exports.InkeepShadow=s.InkeepShadow;exports.InkeepShadowProvider=s.InkeepShadowProvider;exports.ShadowContext=s.ShadowContext;exports.useShadow=s.useShadow;
|
package/dist/primitives/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AttachmentItemProvider as p, useAttachmentItem as i } from "./providers/attachment-item-provider.js";
|
|
2
2
|
import { AttachmentsBarProvider as f, useAttachmentsBar as u } from "./providers/attachments-bar-provider.js";
|
|
3
3
|
import { BaseEventsProvider as C, useBaseEvents as h } from "./providers/base-events-provider.js";
|
|
4
|
-
import { ChatFormProvider as
|
|
5
|
-
import { InkeepConfigProvider as
|
|
4
|
+
import { ChatFormProvider as c, useChatForm as v, useChatFormState as P } from "./providers/chat-form-provider.js";
|
|
5
|
+
import { InkeepConfigProvider as I, WebWidgetInteractionType as b, useInkeepConfig as g } from "./providers/config-provider.js";
|
|
6
6
|
import { FeedbackItemProvider as F, useFeedbackItem as k } from "./providers/feedback-item-provider.js";
|
|
7
7
|
import { FeedbackProvider as A, useMessageFeedback as w } from "./providers/feedback-provider.js";
|
|
8
8
|
import { FormFieldProvider as R, useFormField as E } from "./providers/form-field-provider.js";
|
|
9
|
-
import { HelpMenuProvider as
|
|
9
|
+
import { HelpMenuProvider as T, useHelpMenu as D, useHelpMenuState as H } from "./providers/help-menu-provider.js";
|
|
10
10
|
import { ChatMarkdownProvider as z, useChatMarkdown as L } from "./providers/markdown-provider.js";
|
|
11
11
|
import { MessageAttachmentsProvider as K, useMessageAttachments as N } from "./providers/message-attachments-provider.js";
|
|
12
12
|
import { MessageProvider as U, useMessage as q, useOptionalMessage as G } from "./providers/message-provider.js";
|
|
@@ -20,9 +20,9 @@ import * as e from "./components/embedded-chat.js";
|
|
|
20
20
|
import * as o from "./components/sidebar-chat/index.js";
|
|
21
21
|
import { ChatProvider as ue, useChat as xe } from "./components/embedded-chat/chat-provider.js";
|
|
22
22
|
import * as r from "./components/embedded-search.js";
|
|
23
|
-
import { SearchProvider as he, SearchProviderImpl as
|
|
23
|
+
import { SearchProvider as he, SearchProviderImpl as le, useSearch as ce } from "./components/embedded-search/search-provider.js";
|
|
24
24
|
import * as t from "./components/modal.js";
|
|
25
|
-
import { ModalProvider as Pe, useModal as
|
|
25
|
+
import { ModalProvider as Pe, useModal as Se } from "./components/modal/modal-provider.js";
|
|
26
26
|
import * as m from "./components/chat-button.js";
|
|
27
27
|
import * as a from "./components/searchbar.js";
|
|
28
28
|
import { useBoolean as be } from "./hooks/use-boolean.js";
|
|
@@ -31,20 +31,20 @@ import { useContainerSize as ke } from "./hooks/use-container-size.js";
|
|
|
31
31
|
import { useCopyToClipboard as Ae } from "./hooks/use-copy-to-clipboard.js";
|
|
32
32
|
import { useInstantUpdate as ye } from "./hooks/use-instant-update.js";
|
|
33
33
|
import { useIsMounted as Ee } from "./hooks/use-is-mounted.js";
|
|
34
|
-
import { useMediaQuery as
|
|
34
|
+
import { useMediaQuery as Te } from "./hooks/use-media-query.js";
|
|
35
35
|
import { useResizeObserver as He } from "./hooks/use-resize-observer.js";
|
|
36
36
|
import { useScrollingFades as ze } from "./hooks/use-scrolling-fades.js";
|
|
37
37
|
import { useSettleAction as je } from "./hooks/use-settle-action.js";
|
|
38
|
-
import {
|
|
38
|
+
import { useSimpleScroll as Ne } from "./hooks/use-simple-scroll.js";
|
|
39
39
|
import { callAll as Ue, dataAttr as qe, getInitials as Ge, getMessageContent as Je, isString as Ve, maybeRender as Xe, toKebabCase as Ye } from "./utils/misc.js";
|
|
40
40
|
import { SearchBarComponentIds as _e, SidebarChatComponentIds as $e, aiChatComponentIds as eo, aiSearchComponentIds as oo, chatButtonComponentIds as ro, componentIDs as to, markDownComponentIds as mo, miscellanousComponentIds as ao, modalComponentIds as so } from "./utils/component-ids.js";
|
|
41
41
|
import { composeRefs as io, useComposedRefs as no } from "./utils/compose-refs.js";
|
|
42
42
|
import { mergeProps as uo } from "./utils/merge-props.js";
|
|
43
43
|
import { Portal as Co } from "./atoms/portal.js";
|
|
44
|
-
import { CustomIcon as
|
|
44
|
+
import { CustomIcon as lo } from "./atoms/icons/custom-icon.js";
|
|
45
45
|
import { BuiltInIconRenderer as vo } from "./atoms/icons/built-in-icon-renderer.js";
|
|
46
|
-
import { PortalWithTheme as
|
|
47
|
-
import { Command as bo, CommandDialog as go, CommandEmpty as Mo, CommandInput as Fo, CommandItem as ko, CommandList as Bo, CommandLoading as Ao, CommandRoot as wo, CommandSeparator as yo, defaultFilter as Ro, useCommandState as Eo, useCommandStore as
|
|
46
|
+
import { PortalWithTheme as So } from "./atoms/portal-with-theme.js";
|
|
47
|
+
import { Command as bo, CommandDialog as go, CommandEmpty as Mo, CommandInput as Fo, CommandItem as ko, CommandList as Bo, CommandLoading as Ao, CommandRoot as wo, CommandSeparator as yo, defaultFilter as Ro, useCommandState as Eo, useCommandStore as Wo } from "./atoms/cmdk/index.js";
|
|
48
48
|
import { ErrorBoundary as Do } from "./atoms/error-boundary.js";
|
|
49
49
|
import { InkeepShadow as Oo, InkeepShadowProvider as zo, ShadowContext as Lo, useShadow as jo } from "./atoms/shadow/context.js";
|
|
50
50
|
export {
|
|
@@ -53,7 +53,7 @@ export {
|
|
|
53
53
|
C as BaseEventsProvider,
|
|
54
54
|
vo as BuiltInIconRenderer,
|
|
55
55
|
m as ChatButtonPrimitive,
|
|
56
|
-
|
|
56
|
+
c as ChatFormProvider,
|
|
57
57
|
z as ChatMarkdownProvider,
|
|
58
58
|
ue as ChatProvider,
|
|
59
59
|
bo as Command,
|
|
@@ -65,15 +65,15 @@ export {
|
|
|
65
65
|
Ao as CommandLoading,
|
|
66
66
|
wo as CommandRoot,
|
|
67
67
|
yo as CommandSeparator,
|
|
68
|
-
|
|
68
|
+
lo as CustomIcon,
|
|
69
69
|
e as EmbeddedChatPrimitive,
|
|
70
70
|
r as EmbeddedSearchPrimitive,
|
|
71
71
|
Do as ErrorBoundary,
|
|
72
72
|
F as FeedbackItemProvider,
|
|
73
73
|
A as FeedbackProvider,
|
|
74
74
|
R as FormFieldProvider,
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
T as HelpMenuProvider,
|
|
76
|
+
I as InkeepConfigProvider,
|
|
77
77
|
Oo as InkeepShadow,
|
|
78
78
|
zo as InkeepShadowProvider,
|
|
79
79
|
K as MessageAttachmentsProvider,
|
|
@@ -81,12 +81,12 @@ export {
|
|
|
81
81
|
t as ModalPrimitive,
|
|
82
82
|
Pe as ModalProvider,
|
|
83
83
|
Co as Portal,
|
|
84
|
-
|
|
84
|
+
So as PortalWithTheme,
|
|
85
85
|
V as RootProvider,
|
|
86
86
|
_e as SearchBarComponentIds,
|
|
87
87
|
a as SearchBarPrimitive,
|
|
88
88
|
he as SearchProvider,
|
|
89
|
-
|
|
89
|
+
le as SearchProviderImpl,
|
|
90
90
|
Lo as ShadowContext,
|
|
91
91
|
$e as SidebarChatComponentIds,
|
|
92
92
|
o as SidebarChatPrimitive,
|
|
@@ -123,7 +123,7 @@ export {
|
|
|
123
123
|
P as useChatFormState,
|
|
124
124
|
L as useChatMarkdown,
|
|
125
125
|
Eo as useCommandState,
|
|
126
|
-
|
|
126
|
+
Wo as useCommandStore,
|
|
127
127
|
Me as useComponentClassNames,
|
|
128
128
|
no as useComposedRefs,
|
|
129
129
|
ke as useContainerSize,
|
|
@@ -136,20 +136,20 @@ export {
|
|
|
136
136
|
ae as useInkeepSidebarChat,
|
|
137
137
|
ye as useInstantUpdate,
|
|
138
138
|
Ee as useIsMounted,
|
|
139
|
-
|
|
139
|
+
Te as useMediaQuery,
|
|
140
140
|
q as useMessage,
|
|
141
141
|
N as useMessageAttachments,
|
|
142
142
|
w as useMessageFeedback,
|
|
143
|
-
|
|
143
|
+
Se as useModal,
|
|
144
144
|
G as useOptionalMessage,
|
|
145
145
|
se as useOptionalSidebarChat,
|
|
146
146
|
He as useResizeObserver,
|
|
147
|
-
Ne as useScrollToBottom,
|
|
148
147
|
ze as useScrollingFades,
|
|
149
|
-
|
|
148
|
+
ce as useSearch,
|
|
150
149
|
je as useSettleAction,
|
|
151
150
|
jo as useShadow,
|
|
152
151
|
de as useSidebarChat,
|
|
152
|
+
Ne as useSimpleScroll,
|
|
153
153
|
Z as useSourceItem,
|
|
154
154
|
re as useWidget
|
|
155
155
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),t=require("react"),l=require("./config-provider.cjs"),a=t.createContext(void 0),p=({children:e})=>{const{baseSettings:s,componentType:n}=l.useInkeepConfig(),{tags:o,analyticsProperties:r}=s,i=t.useMemo(()=>({widgetLibraryVersion:"0.14.
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),t=require("react"),l=require("./config-provider.cjs"),a=t.createContext(void 0),p=({children:e})=>{const{baseSettings:s,componentType:n}=l.useInkeepConfig(),{tags:o,analyticsProperties:r}=s,i=t.useMemo(()=>({widgetLibraryVersion:"0.14.18",componentType:n,tags:o}),[n,o]),u={logEvent:t.useCallback(async c=>{const v={...i,...c.properties,...r},d={eventName:c.eventName,properties:v};return s.onEvent?.(d)},[s,i,r])};return E.jsx(a.Provider,{value:u,children:e})},g=()=>{const e=t.useContext(a);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=p;exports.useBaseEvents=g;
|