@epam/ai-dial-conversation-messages 1.1.0-dev.78 → 1.1.0-dev.87
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/components/MessageActions/MessageActions.d.ts.map +1 -1
- package/index.js +278 -341
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageActions.d.ts","sourceRoot":"","sources":["../../../src/components/MessageActions/MessageActions.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,EAAE,EAAyB,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAIxE,kIAAkI;AAClI,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"MessageActions.d.ts","sourceRoot":"","sources":["../../../src/components/MessageActions/MessageActions.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,EAAE,EAAyB,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAIxE,kIAAkI;AAClI,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA4JlD,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,85 +1,83 @@
|
|
|
1
1
|
import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, MDMessageViewer as r, MIME_TYPE_EXT_MAP as i, MessageRating as a, MessageRole as o, RequestStatus as s, ResponseFormat as c, buildCssVars as l, mergeClasses as u, useCollapsedText as d } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import { DIAL_ICON_SIZE as f,
|
|
3
|
-
import { IconCheck as
|
|
2
|
+
import { DIAL_ICON_SIZE as f, DialInput as p, DialPopup as m, DialRadioGroup as h, DialSkeleton as g, DialSkeletonVariant as _, DialSlider as v, DialSpinner as y, DialTag as b, DialTooltip as x, ElementSize as S, GhostIconButton as C, Highlight as w, InfoMessageNotification as T, LinkButton as E, NeutralButton as D, PopupSize as O, PrimaryButton as k, RadioGroupOrientation as A } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { IconCheck as j, IconChevronDown as M, IconChevronUp as N, IconClipboard as P, IconCopy as F, IconDownload as I, IconExternalLink as L, IconFile as R, IconFileTypeBmp as z, IconFileTypeCss as B, IconFileTypeCsv as V, IconFileTypeDoc as ee, IconFileTypeDocx as H, IconFileTypeHtml as U, IconFileTypeJpg as te, IconFileTypeJs as ne, IconFileTypeJsx as re, IconFileTypePdf as ie, IconFileTypePhp as ae, IconFileTypePng as oe, IconFileTypePpt as se, IconFileTypeRs as ce, IconFileTypeSql as le, IconFileTypeSvg as ue, IconFileTypeTs as de, IconFileTypeTsx as fe, IconFileTypeTxt as pe, IconFileTypeVue as me, IconFileTypeXls as he, IconFileTypeXml as ge, IconFileTypeZip as _e, IconMarkdown as ve, IconMusic as ye, IconPaperclip as be, IconPencilMinus as xe, IconPhoto as W, IconRefresh as Se, IconReload as Ce, IconTerminal2 as we, IconThumbDown as Te, IconThumbUp as Ee, IconTrashX as De, IconVideo as Oe, IconX as ke } from "@tabler/icons-react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
import { memo as
|
|
6
|
-
import { Fragment as
|
|
5
|
+
import { memo as Ae, useCallback as G, useEffect as je, useId as Me, useMemo as Ne, useRef as Pe, useState as K } from "react";
|
|
6
|
+
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
7
7
|
//#region ../attachment-input/dist/index.js
|
|
8
|
-
var Fe =
|
|
9
|
-
return e.None = "none", e.AllVisible = "all-visible", e.Collapsed = "collapsed", e;
|
|
10
|
-
}({}), Ie = (e) => {
|
|
8
|
+
var Fe = (e) => {
|
|
11
9
|
if (e == null) return "";
|
|
12
10
|
let t = e.lastIndexOf(".");
|
|
13
11
|
return t > 0 ? e.slice(0, t) : e;
|
|
14
|
-
},
|
|
15
|
-
if (!e) return
|
|
12
|
+
}, Ie = (e) => {
|
|
13
|
+
if (!e) return R;
|
|
16
14
|
if (e.startsWith("image/")) switch (e) {
|
|
17
15
|
case "image/jpeg":
|
|
18
|
-
case "image/jpg": return
|
|
19
|
-
case "image/png": return
|
|
20
|
-
case "image/svg+xml": return
|
|
21
|
-
case "image/bmp": return
|
|
16
|
+
case "image/jpg": return te;
|
|
17
|
+
case "image/png": return oe;
|
|
18
|
+
case "image/svg+xml": return ue;
|
|
19
|
+
case "image/bmp": return z;
|
|
22
20
|
default: return W;
|
|
23
21
|
}
|
|
24
|
-
if (e.startsWith("video/")) return
|
|
25
|
-
if (e.startsWith("audio/")) return
|
|
22
|
+
if (e.startsWith("video/")) return Oe;
|
|
23
|
+
if (e.startsWith("audio/")) return ye;
|
|
26
24
|
switch (e) {
|
|
27
|
-
case "application/pdf": return
|
|
25
|
+
case "application/pdf": return ie;
|
|
28
26
|
case "application/msword":
|
|
29
|
-
case "application/vnd.ms-word": return
|
|
30
|
-
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return
|
|
31
|
-
case "application/vnd.ms-powerpoint": return
|
|
32
|
-
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return
|
|
33
|
-
case "application/vnd.ms-excel": return
|
|
34
|
-
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return
|
|
27
|
+
case "application/vnd.ms-word": return ee;
|
|
28
|
+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return H;
|
|
29
|
+
case "application/vnd.ms-powerpoint": return se;
|
|
30
|
+
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return se;
|
|
31
|
+
case "application/vnd.ms-excel": return he;
|
|
32
|
+
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return he;
|
|
35
33
|
case "application/zip":
|
|
36
34
|
case "application/x-zip-compressed":
|
|
37
35
|
case "application/x-rar-compressed":
|
|
38
36
|
case "application/x-7z-compressed":
|
|
39
37
|
case "application/gzip":
|
|
40
|
-
case "application/x-tar": return
|
|
41
|
-
case "text/csv": return
|
|
42
|
-
case "text/plain": return
|
|
38
|
+
case "application/x-tar": return _e;
|
|
39
|
+
case "text/csv": return V;
|
|
40
|
+
case "text/plain": return pe;
|
|
43
41
|
case "text/html":
|
|
44
|
-
case "application/xhtml+xml": return
|
|
42
|
+
case "application/xhtml+xml": return U;
|
|
45
43
|
case "text/xml":
|
|
46
|
-
case "application/xml": return
|
|
44
|
+
case "application/xml": return ge;
|
|
47
45
|
case "application/sql":
|
|
48
|
-
case "text/x-sql": return
|
|
46
|
+
case "text/x-sql": return le;
|
|
49
47
|
case "text/javascript":
|
|
50
|
-
case "application/javascript": return
|
|
51
|
-
case "text/jsx": return
|
|
48
|
+
case "application/javascript": return ne;
|
|
49
|
+
case "text/jsx": return re;
|
|
52
50
|
case "application/typescript":
|
|
53
|
-
case "text/typescript": return
|
|
54
|
-
case "text/tsx": return
|
|
55
|
-
case "text/css": return
|
|
51
|
+
case "text/typescript": return de;
|
|
52
|
+
case "text/tsx": return fe;
|
|
53
|
+
case "text/css": return B;
|
|
56
54
|
case "text/x-php":
|
|
57
|
-
case "application/x-php": return
|
|
55
|
+
case "application/x-php": return ae;
|
|
58
56
|
case "text/x-rustsrc":
|
|
59
|
-
case "application/x-rust": return
|
|
60
|
-
case "text/x-vue": return
|
|
61
|
-
default: return
|
|
57
|
+
case "application/x-rust": return ce;
|
|
58
|
+
case "text/x-vue": return me;
|
|
59
|
+
default: return R;
|
|
62
60
|
}
|
|
63
|
-
},
|
|
61
|
+
}, Le = (e) => {
|
|
64
62
|
let { type: n, contentType: r } = e;
|
|
65
|
-
return n === t.Prompt ?
|
|
66
|
-
},
|
|
63
|
+
return n === t.Prompt ? we : n === t.Pasted ? P : n === t.Image ? W : Ie(r ?? "");
|
|
64
|
+
}, Re = (e) => {
|
|
67
65
|
let t = e.toLowerCase().split(";")[0].trim(), n = i[t];
|
|
68
66
|
if (n) return n;
|
|
69
67
|
let r = t.split("/")[1];
|
|
70
68
|
if (r && !r.startsWith("vnd.") && !r.includes("+")) return r;
|
|
71
|
-
},
|
|
69
|
+
}, ze = (e, n) => {
|
|
72
70
|
let { type: r, name: i, contentType: a } = e;
|
|
73
71
|
if (r === t.Prompt) return n.promptLabel ?? "Prompt";
|
|
74
72
|
if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
|
|
75
73
|
if (r === t.Image) return n.imageLabel ?? "Image";
|
|
76
74
|
if (a) {
|
|
77
|
-
let e =
|
|
75
|
+
let e = Re(a);
|
|
78
76
|
if (e) return `.${e}`;
|
|
79
77
|
}
|
|
80
78
|
let o = i.lastIndexOf(".");
|
|
81
79
|
return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
|
|
82
|
-
},
|
|
80
|
+
}, Be = (e, n = {}) => {
|
|
83
81
|
let { type: r, status: i, previewUrl: a, url: o } = e, c = i === s.Loading, l = i === s.Error, u = r === t.Image && !!(a ?? o) && !l, d = r === t.Audio && !l, f = r === t.Link && !l;
|
|
84
82
|
return {
|
|
85
83
|
isLoading: c,
|
|
@@ -87,22 +85,10 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
87
85
|
isImage: u,
|
|
88
86
|
isAudio: d,
|
|
89
87
|
isLink: f,
|
|
90
|
-
BottomIcon: f ? null :
|
|
91
|
-
typeLabel: f ? null :
|
|
88
|
+
BottomIcon: f ? null : Le(e),
|
|
89
|
+
typeLabel: f ? null : ze(e, n)
|
|
92
90
|
};
|
|
93
|
-
},
|
|
94
|
-
layout: Z.None,
|
|
95
|
-
visibleCount: 0,
|
|
96
|
-
hiddenCount: 0
|
|
97
|
-
} : e < 5 || t ? {
|
|
98
|
-
layout: Z.AllVisible,
|
|
99
|
-
visibleCount: e,
|
|
100
|
-
hiddenCount: 0
|
|
101
|
-
} : {
|
|
102
|
-
layout: Z.Collapsed,
|
|
103
|
-
visibleCount: 4,
|
|
104
|
-
hiddenCount: e - 4
|
|
105
|
-
}, Q = {
|
|
91
|
+
}, X = {
|
|
106
92
|
tile: "_tile_yap03_1",
|
|
107
93
|
hovered: "_hovered_yap03_5",
|
|
108
94
|
selected: "_selected_yap03_12",
|
|
@@ -112,46 +98,46 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
112
98
|
retryIcon: "_retryIcon_yap03_30",
|
|
113
99
|
track: "_track_yap03_34",
|
|
114
100
|
imageActionButton: "_imageActionButton_yap03_38"
|
|
115
|
-
},
|
|
101
|
+
}, Z = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o }) => /* @__PURE__ */ J(C, {
|
|
116
102
|
icon: a,
|
|
117
|
-
size:
|
|
103
|
+
size: S.Small,
|
|
118
104
|
className: u("absolute end-1 top-1 opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", o),
|
|
119
105
|
"aria-label": e,
|
|
120
106
|
"aria-describedby": t ? n : void 0,
|
|
121
107
|
onClick: (e) => {
|
|
122
108
|
e.stopPropagation(), r(i);
|
|
123
109
|
}
|
|
124
|
-
}),
|
|
125
|
-
icon: /* @__PURE__ */
|
|
110
|
+
}), Ve = ({ ...e }) => /* @__PURE__ */ J(Z, {
|
|
111
|
+
icon: /* @__PURE__ */ J(Ce, {
|
|
126
112
|
size: f.SM,
|
|
127
113
|
"aria-hidden": !0
|
|
128
114
|
}),
|
|
129
|
-
className:
|
|
115
|
+
className: X.retryIcon,
|
|
130
116
|
...e
|
|
131
|
-
}),
|
|
132
|
-
icon: /* @__PURE__ */
|
|
117
|
+
}), He = ({ ...e }) => /* @__PURE__ */ J(Z, {
|
|
118
|
+
icon: /* @__PURE__ */ J(I, {
|
|
133
119
|
size: f.SM,
|
|
134
120
|
"aria-hidden": !0
|
|
135
121
|
}),
|
|
136
122
|
...e
|
|
137
|
-
}),
|
|
138
|
-
icon: /* @__PURE__ */
|
|
123
|
+
}), Ue = ({ ...e }) => /* @__PURE__ */ J(Z, {
|
|
124
|
+
icon: /* @__PURE__ */ J(L, {
|
|
139
125
|
size: f.SM,
|
|
140
126
|
"aria-hidden": !0
|
|
141
127
|
}),
|
|
142
128
|
...e
|
|
143
|
-
}),
|
|
144
|
-
icon: /* @__PURE__ */
|
|
129
|
+
}), We = ({ ...e }) => /* @__PURE__ */ J(Z, {
|
|
130
|
+
icon: /* @__PURE__ */ J(ke, {
|
|
145
131
|
size: f.SM,
|
|
146
132
|
"aria-hidden": !0
|
|
147
133
|
}),
|
|
148
|
-
className:
|
|
134
|
+
className: X.hoverIcon,
|
|
149
135
|
...e
|
|
150
|
-
}),
|
|
136
|
+
}), Ge = ({ attachment: e, searchQuery: t = "", onClick: n, onDownload: r, onRemove: i, labels: a, styles: o, cssVars: s, isSelected: c }) => {
|
|
151
137
|
let { clickLabel: l = "Open attachment", downloadLabel: d = "Download attachment", removeLabel: f = "Remove attachment" } = a ?? {}, { typography: p, className: m } = o ?? {}, h = () => {
|
|
152
138
|
n?.(e.id);
|
|
153
139
|
};
|
|
154
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ Y("div", {
|
|
155
141
|
style: s,
|
|
156
142
|
...n == null ? {} : {
|
|
157
143
|
role: "button",
|
|
@@ -162,18 +148,18 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
162
148
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), h());
|
|
163
149
|
}
|
|
164
150
|
},
|
|
165
|
-
className: u("group/attachment-tile relative flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 rounded-xl border p-3", n && "cursor-pointer", (r || i) && "pe-8", c &&
|
|
151
|
+
className: u("group/attachment-tile relative flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 rounded-xl border p-3", n && "cursor-pointer", (r || i) && "pe-8", c && X.selected, m),
|
|
166
152
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ J("span", {
|
|
168
154
|
title: e.name,
|
|
169
|
-
className: u(p?.fontClassName ?? "dial-tiny-text", "min-w-0 truncate",
|
|
170
|
-
children: t ? /* @__PURE__ */
|
|
155
|
+
className: u(p?.fontClassName ?? "dial-tiny-text", "min-w-0 truncate", X.nameText),
|
|
156
|
+
children: t ? /* @__PURE__ */ J(w, {
|
|
171
157
|
text: e.name,
|
|
172
158
|
query: t,
|
|
173
159
|
maxLines: 1
|
|
174
160
|
}) : e.name
|
|
175
161
|
}),
|
|
176
|
-
e.playUrl && /* @__PURE__ */
|
|
162
|
+
e.playUrl && /* @__PURE__ */ J("audio", {
|
|
177
163
|
controls: !0,
|
|
178
164
|
src: e.playUrl,
|
|
179
165
|
"aria-label": e.name,
|
|
@@ -181,78 +167,78 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
181
167
|
preload: "metadata",
|
|
182
168
|
onClick: (e) => e.stopPropagation()
|
|
183
169
|
}),
|
|
184
|
-
r && /* @__PURE__ */
|
|
170
|
+
r && /* @__PURE__ */ J(He, {
|
|
185
171
|
ariaLabel: d,
|
|
186
172
|
onClick: r,
|
|
187
173
|
id: e.id
|
|
188
174
|
}),
|
|
189
|
-
i && /* @__PURE__ */
|
|
175
|
+
i && /* @__PURE__ */ J(We, {
|
|
190
176
|
ariaLabel: f,
|
|
191
177
|
onClick: i,
|
|
192
178
|
id: e.id
|
|
193
179
|
})
|
|
194
180
|
]
|
|
195
181
|
});
|
|
196
|
-
},
|
|
182
|
+
}, Ke = "flex size-[84px] items-center justify-center rounded-xl border", qe = {
|
|
197
183
|
[e.Network]: "Upload failed · network error",
|
|
198
184
|
[e.UnsupportedType]: "Upload failed · unsupported file type"
|
|
199
|
-
},
|
|
200
|
-
let { clickLabel: _ = "Download attachment", retryLabel: v = "Retry upload", sizeLabel:
|
|
185
|
+
}, Je = ({ attachment: n, onClick: r, onRetry: i, labels: a, styles: o, onDownload: c, isPasted: l, isLink: d, cssVars: f, onExpand: p, isExpandable: m, onRemove: h, isSelected: g }) => {
|
|
186
|
+
let { clickLabel: _ = "Download attachment", retryLabel: v = "Retry upload", sizeLabel: b, uploadingLabel: x = "Uploading", errorReasonLabels: S, genericErrorLabel: C = "Upload failed" } = a ?? {}, { typography: w, className: T } = o ?? {}, { id: E, name: D, status: O, errorReason: k } = n, A = O === s.Loading, j = O === s.Error, M = Me(), N = j ? k && (S?.[k] ?? qe[k]) || C : "", { BottomIcon: P, typeLabel: F } = Be(n), I = !j && !A && c && !d, L = j && !!i && k !== e.UnsupportedType, R = I || L ? "pe-5" : void 0, z = (e) => {
|
|
201
187
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), r?.(n.id));
|
|
202
|
-
}, B =
|
|
188
|
+
}, B = Ne(() => l ? D : Fe(D), [l, D]), V = G(() => {
|
|
203
189
|
window.open(n.referenceUrl, "_blank", "noopener,noreferrer");
|
|
204
|
-
}, [n]), ee = u(
|
|
190
|
+
}, [n]), ee = u(Ke, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", X.tile, (n.type === t.Prompt || n.type === t.Pasted) && "hovered", g && X.selected, j && X.tileError), H = /* @__PURE__ */ J("div", {
|
|
205
191
|
title: B,
|
|
206
|
-
className: u(w?.nameClassName ?? "dial-caption-text", "line-clamp-2 min-w-0 break-all",
|
|
192
|
+
className: u(w?.nameClassName ?? "dial-caption-text", "line-clamp-2 min-w-0 break-all", X.nameText, !j && R),
|
|
207
193
|
children: B
|
|
208
|
-
}), U = P && /* @__PURE__ */
|
|
194
|
+
}), U = P && /* @__PURE__ */ Y("div", {
|
|
209
195
|
className: u("flex w-full items-center gap-1", j && R),
|
|
210
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ J(P, {
|
|
211
197
|
size: 16,
|
|
212
|
-
className:
|
|
198
|
+
className: X.typeText,
|
|
213
199
|
"aria-hidden": !0
|
|
214
|
-
}), /* @__PURE__ */
|
|
215
|
-
className: u(w?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate",
|
|
216
|
-
children:
|
|
200
|
+
}), /* @__PURE__ */ J("span", {
|
|
201
|
+
className: u(w?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", X.typeText),
|
|
202
|
+
children: b ? `${F} · ${b}` : F
|
|
217
203
|
})]
|
|
218
204
|
}), te = () => {
|
|
219
205
|
m && p ? p(E) : r && r(E);
|
|
220
|
-
}, ne = /* @__PURE__ */
|
|
221
|
-
j ? /* @__PURE__ */
|
|
222
|
-
A && /* @__PURE__ */
|
|
206
|
+
}, ne = /* @__PURE__ */ Y(q, { children: [
|
|
207
|
+
j ? /* @__PURE__ */ Y(q, { children: [U, H] }) : /* @__PURE__ */ Y(q, { children: [H, U] }),
|
|
208
|
+
A && /* @__PURE__ */ J("div", {
|
|
223
209
|
role: "progressbar",
|
|
224
210
|
"aria-label": x,
|
|
225
|
-
className: u("absolute inset-x-2 bottom-2 h-[3px] overflow-hidden rounded-full",
|
|
226
|
-
children: /* @__PURE__ */
|
|
211
|
+
className: u("absolute inset-x-2 bottom-2 h-[3px] overflow-hidden rounded-full", X.track),
|
|
212
|
+
children: /* @__PURE__ */ J(y, { size: 32 })
|
|
227
213
|
}),
|
|
228
|
-
I && /* @__PURE__ */
|
|
214
|
+
I && /* @__PURE__ */ J(He, {
|
|
229
215
|
ariaLabel: _,
|
|
230
216
|
errorTitle: N,
|
|
231
217
|
errorDescId: M,
|
|
232
218
|
onClick: c,
|
|
233
219
|
id: E
|
|
234
220
|
}),
|
|
235
|
-
L && /* @__PURE__ */
|
|
221
|
+
L && /* @__PURE__ */ J(Ve, {
|
|
236
222
|
ariaLabel: v,
|
|
237
223
|
errorTitle: N,
|
|
238
224
|
errorDescId: M,
|
|
239
225
|
onClick: i,
|
|
240
226
|
id: E
|
|
241
227
|
}),
|
|
242
|
-
d && /* @__PURE__ */
|
|
228
|
+
d && /* @__PURE__ */ J(Ue, {
|
|
243
229
|
ariaLabel: v,
|
|
244
230
|
errorTitle: N,
|
|
245
231
|
errorDescId: M,
|
|
246
232
|
onClick: V
|
|
247
233
|
}),
|
|
248
|
-
h && /* @__PURE__ */
|
|
234
|
+
h && /* @__PURE__ */ J(We, {
|
|
249
235
|
ariaLabel: v,
|
|
250
236
|
errorTitle: N,
|
|
251
237
|
errorDescId: M,
|
|
252
238
|
onClick: h,
|
|
253
239
|
id: E
|
|
254
240
|
}),
|
|
255
|
-
j && /* @__PURE__ */
|
|
241
|
+
j && /* @__PURE__ */ J("span", {
|
|
256
242
|
id: M,
|
|
257
243
|
role: "status",
|
|
258
244
|
"aria-live": "polite",
|
|
@@ -260,10 +246,10 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
260
246
|
children: N
|
|
261
247
|
})
|
|
262
248
|
] });
|
|
263
|
-
return /* @__PURE__ */
|
|
249
|
+
return /* @__PURE__ */ J("div", {
|
|
264
250
|
style: f,
|
|
265
251
|
className: u("inline-flex", T),
|
|
266
|
-
children: /* @__PURE__ */
|
|
252
|
+
children: /* @__PURE__ */ J("div", {
|
|
267
253
|
role: "button",
|
|
268
254
|
tabIndex: 0,
|
|
269
255
|
"aria-label": _,
|
|
@@ -274,13 +260,13 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
274
260
|
children: ne
|
|
275
261
|
})
|
|
276
262
|
});
|
|
277
|
-
},
|
|
263
|
+
}, Ye = /* @__PURE__ */ function(e) {
|
|
278
264
|
return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
|
|
279
|
-
}({}),
|
|
280
|
-
let n = Pe(null), [r, i] =
|
|
281
|
-
return
|
|
265
|
+
}({}), Xe = ({ enabled: e, src: t }) => {
|
|
266
|
+
let n = Pe(null), [r, i] = K("idle");
|
|
267
|
+
return je(() => {
|
|
282
268
|
i(e && t ? "loading" : "idle");
|
|
283
|
-
}, [e, t]),
|
|
269
|
+
}, [e, t]), je(() => {
|
|
284
270
|
let r = n.current;
|
|
285
271
|
if (!r || !e || !t) return;
|
|
286
272
|
let a = () => i("loaded"), o = () => i("error");
|
|
@@ -291,15 +277,15 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
291
277
|
imageRef: n,
|
|
292
278
|
imageLoadStatus: r
|
|
293
279
|
};
|
|
294
|
-
},
|
|
295
|
-
let { clickLabel: d = "Open attachment", expandLabel: p = "Expand pasted text" } = i ?? {}, { className: m } = c ?? {}, { id: h, name:
|
|
280
|
+
}, Ze = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: c, isSelected: l }) => {
|
|
281
|
+
let { clickLabel: d = "Open attachment", expandLabel: p = "Expand pasted text" } = i ?? {}, { className: m } = c ?? {}, { id: h, name: v } = e, y = e.previewUrl ?? e.url, b = e.type === t.Pasted && n !== void 0, { isLoading: x, isError: S, isImage: C } = Ne(() => Be(e), [e]), w = r !== void 0 && !b && !x && !S, { imageRef: T, imageLoadStatus: E } = Xe({
|
|
296
282
|
enabled: C,
|
|
297
283
|
src: y
|
|
298
284
|
}), D = () => {
|
|
299
285
|
b && n ? n(h) : w && r && r(h);
|
|
300
286
|
};
|
|
301
|
-
return /* @__PURE__ */
|
|
302
|
-
className: u(
|
|
287
|
+
return /* @__PURE__ */ J("div", {
|
|
288
|
+
className: u(Ke, "group/attachment-tile", w && "cursor-pointer", X.tile, l && X.selected, m),
|
|
303
289
|
onClick: D,
|
|
304
290
|
onKeyDown: (e) => {
|
|
305
291
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), D());
|
|
@@ -308,43 +294,43 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
308
294
|
role: "button",
|
|
309
295
|
style: o,
|
|
310
296
|
"aria-label": w ? d : b ? p : void 0,
|
|
311
|
-
children: /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ Y("div", {
|
|
312
298
|
className: "relative h-full w-full overflow-hidden",
|
|
313
299
|
children: [
|
|
314
|
-
a && /* @__PURE__ */
|
|
300
|
+
a && /* @__PURE__ */ J(We, {
|
|
315
301
|
onClick: a,
|
|
316
302
|
id: h,
|
|
317
|
-
className:
|
|
303
|
+
className: X.imageActionButton
|
|
318
304
|
}),
|
|
319
|
-
s && /* @__PURE__ */
|
|
305
|
+
s && /* @__PURE__ */ J(He, {
|
|
320
306
|
onClick: s,
|
|
321
307
|
id: h,
|
|
322
|
-
className:
|
|
308
|
+
className: X.imageActionButton
|
|
323
309
|
}),
|
|
324
|
-
E !==
|
|
325
|
-
variant:
|
|
310
|
+
E !== Ye.Loaded && /* @__PURE__ */ J(g, {
|
|
311
|
+
variant: _.Rectangular,
|
|
326
312
|
width: "100%",
|
|
327
313
|
height: "100%",
|
|
328
|
-
active: E ===
|
|
329
|
-
overlay: /* @__PURE__ */
|
|
314
|
+
active: E === Ye.Loading,
|
|
315
|
+
overlay: /* @__PURE__ */ J(W, {
|
|
330
316
|
size: f.LG,
|
|
331
|
-
className:
|
|
317
|
+
className: X.typeText,
|
|
332
318
|
"aria-hidden": !0
|
|
333
319
|
}),
|
|
334
320
|
className: "absolute inset-0 rounded-xl"
|
|
335
321
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ J("img", {
|
|
337
323
|
ref: T,
|
|
338
324
|
src: y,
|
|
339
|
-
alt:
|
|
325
|
+
alt: v,
|
|
340
326
|
loading: "lazy",
|
|
341
327
|
decoding: "async",
|
|
342
|
-
className: u("h-full w-full rounded-xl object-cover transition-opacity duration-200", E ===
|
|
328
|
+
className: u("h-full w-full rounded-xl object-cover transition-opacity duration-200", E === Ye.Loaded ? "opacity-100" : "opacity-0")
|
|
343
329
|
})
|
|
344
330
|
]
|
|
345
331
|
})
|
|
346
332
|
});
|
|
347
|
-
},
|
|
333
|
+
}, Qe = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: s, labels: c, styles: u, isSelected: d }) => {
|
|
348
334
|
let { colors: f } = u ?? {}, p = e.type === t.Pasted, m = p && a !== void 0, h = l({
|
|
349
335
|
"--ai-tile-bg": f?.background,
|
|
350
336
|
"--ai-tile-border": f?.border,
|
|
@@ -362,8 +348,8 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
362
348
|
"--ai-tile-hover-icon-color": f?.hoverIconColor,
|
|
363
349
|
"--ai-tile-progress-track": f?.trackBackground,
|
|
364
350
|
"--ai-tile-fill-bg": f?.fillBackground
|
|
365
|
-
}), { isImage: g, isAudio: _, isLink: v } =
|
|
366
|
-
return _ ? /* @__PURE__ */
|
|
351
|
+
}), { isImage: g, isAudio: _, isLink: v } = Ne(() => Be(e), [e]);
|
|
352
|
+
return _ ? /* @__PURE__ */ J(Ge, {
|
|
367
353
|
attachment: e,
|
|
368
354
|
labels: c,
|
|
369
355
|
onClick: o,
|
|
@@ -373,7 +359,7 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
373
359
|
styles: u,
|
|
374
360
|
cssVars: h,
|
|
375
361
|
isSelected: d
|
|
376
|
-
}) : g ? /* @__PURE__ */
|
|
362
|
+
}) : g ? /* @__PURE__ */ J(Ze, {
|
|
377
363
|
attachment: e,
|
|
378
364
|
labels: c,
|
|
379
365
|
onClick: o,
|
|
@@ -383,7 +369,7 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
383
369
|
cssVars: h,
|
|
384
370
|
onDownload: s,
|
|
385
371
|
isSelected: d
|
|
386
|
-
}) : /* @__PURE__ */
|
|
372
|
+
}) : /* @__PURE__ */ J(Je, {
|
|
387
373
|
attachment: e,
|
|
388
374
|
onClick: o,
|
|
389
375
|
onRetry: i,
|
|
@@ -398,121 +384,72 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
398
384
|
isExpandable: m,
|
|
399
385
|
isSelected: d
|
|
400
386
|
});
|
|
401
|
-
},
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
"--ai-more-tile-bg-hover": c?.backgroundHover,
|
|
407
|
-
"--ai-more-tile-color-hover": c?.colorHover,
|
|
408
|
-
"--ai-more-tile-border-hover": c?.borderHover,
|
|
409
|
-
"--ai-more-tile-focus-outline": c?.focusOutline
|
|
410
|
-
});
|
|
411
|
-
return /* @__PURE__ */ Y("button", {
|
|
412
|
-
type: "button",
|
|
413
|
-
onClick: t,
|
|
414
|
-
"aria-label": a ?? `Show ${e} more attachments`,
|
|
415
|
-
style: d,
|
|
416
|
-
className: u(Fe, o, tt.tile, s),
|
|
417
|
-
children: r ?? /* @__PURE__ */ Y("bdi", {
|
|
418
|
-
dir: "ltr",
|
|
419
|
-
children: `+${e}`
|
|
420
|
-
})
|
|
421
|
-
});
|
|
422
|
-
}, rt = {
|
|
423
|
-
container: "_container_jvs4c_1",
|
|
424
|
-
headerIcon: "_headerIcon_jvs4c_6",
|
|
425
|
-
headerLabel: "_headerLabel_jvs4c_7",
|
|
426
|
-
downloadAllButton: "_downloadAllButton_jvs4c_8"
|
|
427
|
-
}, it = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, at = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, labels: a, styles: o, selectedAttachmentId: c }) => {
|
|
428
|
-
let { ariaLabel: d = "Attachments", clickLabel: m = "Download attachment", retryLabel: h = "Retry upload", showLessLabel: g = "Show less", downloadAllLabel: _ = "Download all", openInNewTabLabel: v, getHeaderLabel: y = (e) => it(e, "attachment"), promptLabel: b, pastedLabel: x, imageLabel: S } = a ?? {}, { typography: { headerLabelClassName: C = "dial-tiny-semi-text" } = {}, colors: w, className: T } = o ?? {}, E = l({
|
|
429
|
-
"--ai-group-bg": w?.background,
|
|
430
|
-
"--ai-group-border": w?.border,
|
|
431
|
-
"--ai-group-text": w?.text
|
|
432
|
-
}), [D, O] = q(!1), k = K(() => He(e.length, D), [e.length, D]);
|
|
387
|
+
}, Q = {
|
|
388
|
+
headerIcon: "_headerIcon_1sgtq_1",
|
|
389
|
+
headerLabel: "_headerLabel_1sgtq_2"
|
|
390
|
+
}, $e = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, et = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, labels: a, styles: o, selectedAttachmentId: c }) => {
|
|
391
|
+
let { ariaLabel: d = "Attachments", clickLabel: p = "Download attachment", retryLabel: m = "Retry upload", downloadAllLabel: h = "Download all", openInNewTabLabel: g, getHeaderLabel: _ = (e) => $e(e, "attachment"), promptLabel: v, pastedLabel: y, imageLabel: b } = a ?? {}, { typography: x, colors: w, className: T } = o ?? {}, E = l({ "--ai-group-text": w?.text });
|
|
433
392
|
if (e.length === 0) return null;
|
|
434
|
-
let
|
|
393
|
+
let D = e.some((e) => e.type === t.Image), O = e.some((e) => e.type !== t.Image), k = D && O, A = e.length >= 5, j = k ? be : D ? W : R, M = _(e.length), N = () => {
|
|
435
394
|
let t = e.filter((e) => e.status === s.Idle);
|
|
436
395
|
r ? r(t) : t.forEach((e) => n?.(e.id));
|
|
437
|
-
},
|
|
396
|
+
}, P = (t) => {
|
|
438
397
|
let n = e.find((e) => e.id === t);
|
|
439
398
|
n && r?.([n]);
|
|
440
399
|
};
|
|
441
|
-
return /* @__PURE__ */
|
|
400
|
+
return /* @__PURE__ */ Y("div", {
|
|
442
401
|
role: "group",
|
|
443
402
|
"aria-label": d,
|
|
444
403
|
style: E,
|
|
445
|
-
className: u("
|
|
446
|
-
children: [/* @__PURE__ */
|
|
447
|
-
className: "
|
|
448
|
-
children: [
|
|
449
|
-
|
|
404
|
+
className: u("flex flex-col gap-1", A ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Q.container, T),
|
|
405
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
406
|
+
className: "flex items-center justify-between",
|
|
407
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
408
|
+
className: "flex items-center gap-1",
|
|
409
|
+
children: [/* @__PURE__ */ J(j, {
|
|
410
|
+
size: f.SM,
|
|
411
|
+
className: u("shrink-0", Q.headerIcon),
|
|
412
|
+
"aria-hidden": !0
|
|
413
|
+
}), /* @__PURE__ */ J("span", {
|
|
414
|
+
className: u(x?.headerLabelClassName ?? "dial-tiny-semi-text", Q.headerLabel),
|
|
415
|
+
children: M
|
|
416
|
+
})]
|
|
417
|
+
}), e.length >= 2 && (r || n) && /* @__PURE__ */ J(C, {
|
|
418
|
+
icon: /* @__PURE__ */ J(I, {
|
|
450
419
|
size: f.SM,
|
|
451
|
-
className: u("shrink-0", rt.headerIcon),
|
|
452
420
|
"aria-hidden": !0
|
|
453
421
|
}),
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
icon: /* @__PURE__ */ Y(L, {
|
|
460
|
-
size: f.SM,
|
|
461
|
-
"aria-hidden": !0
|
|
462
|
-
}),
|
|
463
|
-
className: u("ms-auto h-6 w-6 rounded-lg", rt.downloadAllButton),
|
|
464
|
-
"aria-label": _,
|
|
465
|
-
onClick: B
|
|
466
|
-
})
|
|
467
|
-
]
|
|
468
|
-
}), /* @__PURE__ */ X("div", {
|
|
422
|
+
size: S.Small,
|
|
423
|
+
"aria-label": h,
|
|
424
|
+
onClick: N
|
|
425
|
+
})]
|
|
426
|
+
}), /* @__PURE__ */ J("div", {
|
|
469
427
|
role: "list",
|
|
470
|
-
"aria-label":
|
|
471
|
-
className: u("gap-3",
|
|
472
|
-
children:
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
isSelected: e.id === c
|
|
489
|
-
})
|
|
490
|
-
}, `${e.id}-${t}`)),
|
|
491
|
-
k.layout === Z.Collapsed && /* @__PURE__ */ Y("div", {
|
|
492
|
-
role: "listitem",
|
|
493
|
-
children: /* @__PURE__ */ Y(nt, {
|
|
494
|
-
count: k.hiddenCount,
|
|
495
|
-
onClick: () => O(!0)
|
|
496
|
-
})
|
|
497
|
-
}),
|
|
498
|
-
N && D && /* @__PURE__ */ Y("div", {
|
|
499
|
-
role: "listitem",
|
|
500
|
-
children: /* @__PURE__ */ Y(nt, {
|
|
501
|
-
count: 0,
|
|
502
|
-
onClick: () => O(!1),
|
|
503
|
-
labels: { ariaLabel: g },
|
|
504
|
-
children: /* @__PURE__ */ Y(P, {
|
|
505
|
-
size: f.MD,
|
|
506
|
-
"aria-hidden": !0
|
|
507
|
-
})
|
|
508
|
-
})
|
|
428
|
+
"aria-label": M,
|
|
429
|
+
className: u("gap-3", A ? "grid grid-cols-[repeat(5,83px)]" : "flex flex-wrap"),
|
|
430
|
+
children: e.map((e, t) => /* @__PURE__ */ J("div", {
|
|
431
|
+
role: "listitem",
|
|
432
|
+
children: /* @__PURE__ */ J(Qe, {
|
|
433
|
+
attachment: e,
|
|
434
|
+
onClick: n,
|
|
435
|
+
onDownload: P,
|
|
436
|
+
onRetry: i,
|
|
437
|
+
labels: {
|
|
438
|
+
clickLabel: p,
|
|
439
|
+
retryLabel: m,
|
|
440
|
+
promptLabel: v,
|
|
441
|
+
pastedLabel: y,
|
|
442
|
+
imageLabel: b,
|
|
443
|
+
openInNewTabLabel: g
|
|
444
|
+
},
|
|
445
|
+
isSelected: e.id === c
|
|
509
446
|
})
|
|
510
|
-
|
|
447
|
+
}, `${e.id}-${t}`))
|
|
511
448
|
})]
|
|
512
449
|
});
|
|
513
|
-
},
|
|
514
|
-
let [s, c] =
|
|
515
|
-
|
|
450
|
+
}, tt = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
|
|
451
|
+
let [s, c] = K(t), [l, u] = K(n), [d, f] = K(r), p = Pe(o);
|
|
452
|
+
je(() => {
|
|
516
453
|
o && !p.current && (c(t), u(n), f(r)), p.current = o;
|
|
517
454
|
}, [
|
|
518
455
|
o,
|
|
@@ -543,16 +480,16 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
543
480
|
a
|
|
544
481
|
])
|
|
545
482
|
};
|
|
546
|
-
},
|
|
483
|
+
}, nt = "!dial-small-semi-text !text-primary gap-1", rt = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: i, onSystemPromptChange: a, onTemperatureChange: o, responseFormatLabel: s = "Response format", responseFormatHint: l = "Applies to new and existing messages", responseFormatMarkdownLabel: u = "Markdown", responseFormatPlainTextLabel: d = "Plain text", systemPromptLabel: f = "System prompt", systemPromptTooltip: m = "Enter a prompt", temperatureLabel: g = "Temperature", temperatureLabels: _ = [
|
|
547
484
|
"Precise",
|
|
548
485
|
"Neutral",
|
|
549
486
|
"Creative"
|
|
550
|
-
], temperatureHint:
|
|
487
|
+
], temperatureHint: y }) => /* @__PURE__ */ Y("div", {
|
|
551
488
|
className: "flex flex-col gap-4 px-6 py-3",
|
|
552
489
|
children: [
|
|
553
|
-
e.responseFormat && /* @__PURE__ */
|
|
490
|
+
e.responseFormat && /* @__PURE__ */ J(h, {
|
|
554
491
|
fieldTitle: s,
|
|
555
|
-
labelClassName:
|
|
492
|
+
labelClassName: nt,
|
|
556
493
|
elementId: "response-format",
|
|
557
494
|
orientation: A.Column,
|
|
558
495
|
activeRadioButton: t ?? c.Markdown,
|
|
@@ -566,20 +503,20 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
566
503
|
}],
|
|
567
504
|
onChange: (e) => i(e)
|
|
568
505
|
}),
|
|
569
|
-
e.systemPrompt && /* @__PURE__ */
|
|
506
|
+
e.systemPrompt && /* @__PURE__ */ J(p, {
|
|
570
507
|
value: n,
|
|
571
|
-
placeholder:
|
|
508
|
+
placeholder: m,
|
|
572
509
|
labelProps: {
|
|
573
|
-
className:
|
|
510
|
+
className: nt,
|
|
574
511
|
label: f
|
|
575
512
|
},
|
|
576
513
|
onChange: (e) => a(e ?? "")
|
|
577
514
|
}),
|
|
578
|
-
e.temperature && /* @__PURE__ */
|
|
515
|
+
e.temperature && /* @__PURE__ */ J(v, {
|
|
579
516
|
labelProps: {
|
|
580
|
-
label:
|
|
581
|
-
className:
|
|
582
|
-
caption:
|
|
517
|
+
label: g,
|
|
518
|
+
className: nt,
|
|
519
|
+
caption: y
|
|
583
520
|
},
|
|
584
521
|
value: r,
|
|
585
522
|
min: 0,
|
|
@@ -590,8 +527,8 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Z = /
|
|
|
590
527
|
})
|
|
591
528
|
]
|
|
592
529
|
});
|
|
593
|
-
|
|
594
|
-
let { responseFormat: y, systemPrompt: b, temperature:
|
|
530
|
+
Ae(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", responseFormatLabel: s, responseFormatHint: c, responseFormatMarkdownLabel: l, responseFormatPlainTextLabel: u, systemPromptLabel: d, systemPromptTooltip: f, temperatureLabel: p, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v }) => {
|
|
531
|
+
let { responseFormat: y, systemPrompt: b, temperature: S, canSubmit: C, setResponseFormat: w, setSystemPrompt: T, setTemperature: E, handleSubmit: D } = tt({
|
|
595
532
|
features: e,
|
|
596
533
|
initialResponseFormat: t,
|
|
597
534
|
initialSystemPrompt: n,
|
|
@@ -599,29 +536,29 @@ je(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
|
|
|
599
536
|
onSave: i,
|
|
600
537
|
onClose: a
|
|
601
538
|
});
|
|
602
|
-
return /* @__PURE__ */
|
|
539
|
+
return /* @__PURE__ */ J(m, {
|
|
603
540
|
open: !0,
|
|
604
541
|
header: o,
|
|
605
542
|
size: O.Sm,
|
|
606
543
|
onClose: a,
|
|
607
544
|
className: "!bg-layer-2",
|
|
608
|
-
footer: /* @__PURE__ */
|
|
545
|
+
footer: /* @__PURE__ */ J("div", {
|
|
609
546
|
className: "flex justify-end px-6 py-4",
|
|
610
|
-
children: /* @__PURE__ */
|
|
547
|
+
children: /* @__PURE__ */ J(x, {
|
|
611
548
|
tooltip: v,
|
|
612
549
|
hideTooltip: C || !v,
|
|
613
|
-
children: /* @__PURE__ */
|
|
550
|
+
children: /* @__PURE__ */ J(k, {
|
|
614
551
|
label: _,
|
|
615
552
|
onClick: D,
|
|
616
553
|
disabled: !C
|
|
617
554
|
})
|
|
618
555
|
})
|
|
619
556
|
}),
|
|
620
|
-
children: /* @__PURE__ */
|
|
557
|
+
children: /* @__PURE__ */ J(rt, {
|
|
621
558
|
features: e,
|
|
622
559
|
responseFormat: y,
|
|
623
560
|
systemPrompt: b,
|
|
624
|
-
temperature:
|
|
561
|
+
temperature: S,
|
|
625
562
|
onResponseFormatChange: w,
|
|
626
563
|
onSystemPromptChange: T,
|
|
627
564
|
onTemperatureChange: E,
|
|
@@ -632,31 +569,31 @@ je(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
|
|
|
632
569
|
systemPromptLabel: d,
|
|
633
570
|
systemPromptTooltip: f,
|
|
634
571
|
temperatureLabel: p,
|
|
635
|
-
temperatureLabels:
|
|
572
|
+
temperatureLabels: h,
|
|
636
573
|
temperatureHint: g
|
|
637
574
|
})
|
|
638
575
|
});
|
|
639
576
|
});
|
|
640
|
-
var
|
|
577
|
+
var it = {
|
|
641
578
|
tabContainer: "_tabContainer_153ct_1",
|
|
642
579
|
tabActive: "_tabActive_153ct_13"
|
|
643
580
|
};
|
|
644
|
-
|
|
581
|
+
Ae(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
|
|
645
582
|
let { tabClassName: i = "dial-tiny-semi-text" } = r?.typography ?? {};
|
|
646
|
-
return /* @__PURE__ */
|
|
583
|
+
return /* @__PURE__ */ J("div", {
|
|
647
584
|
className: "flex flex-nowrap gap-1",
|
|
648
585
|
role: "tablist",
|
|
649
586
|
children: e.map((e) => {
|
|
650
587
|
let r = t === e.id;
|
|
651
|
-
return /* @__PURE__ */
|
|
588
|
+
return /* @__PURE__ */ J("div", {
|
|
652
589
|
role: "tab",
|
|
653
590
|
"aria-selected": r,
|
|
654
591
|
className: "contents",
|
|
655
|
-
children: /* @__PURE__ */
|
|
592
|
+
children: /* @__PURE__ */ J(b, {
|
|
656
593
|
label: e.label,
|
|
657
594
|
selected: r,
|
|
658
595
|
onClick: () => n(e.id),
|
|
659
|
-
className: u("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i,
|
|
596
|
+
className: u("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i, it.tabContainer, r && it.tabActive)
|
|
660
597
|
})
|
|
661
598
|
}, e.id);
|
|
662
599
|
})
|
|
@@ -664,94 +601,94 @@ je(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
|
|
|
664
601
|
});
|
|
665
602
|
//#endregion
|
|
666
603
|
//#region src/components/MessageActions/MessageActions.tsx
|
|
667
|
-
var
|
|
668
|
-
let { tooltips:
|
|
669
|
-
s?.(),
|
|
670
|
-
}, [s,
|
|
671
|
-
c?.(),
|
|
672
|
-
}, [c,
|
|
673
|
-
return /* @__PURE__ */
|
|
604
|
+
var at = 2e3, ot = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r, onRegenerate: i, onCopy: s, onCopyMarkdown: c, onLike: l, onDislike: d, activeRating: p, isAlwaysVisible: m, className: h, labels: g }) => {
|
|
605
|
+
let { tooltips: _, ariaLabels: v } = g ?? {}, [y, b] = K(null), [x, w] = K(""), T = G(() => {
|
|
606
|
+
s?.(), b("copy"), w(v?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => b(null), at);
|
|
607
|
+
}, [s, v?.copiedStatus]), E = G(() => {
|
|
608
|
+
c?.(), b("markdown"), w(v?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => b(null), at);
|
|
609
|
+
}, [c, v?.copiedMarkdownStatus]);
|
|
610
|
+
return /* @__PURE__ */ Y("div", {
|
|
674
611
|
role: "toolbar",
|
|
675
|
-
"aria-label":
|
|
676
|
-
className: u("flex gap-1", !
|
|
677
|
-
children: [/* @__PURE__ */
|
|
612
|
+
"aria-label": v?.actionsGroup ?? "Message actions",
|
|
613
|
+
className: u("flex gap-1", !m && "opacity-0 group-hover:opacity-100", h),
|
|
614
|
+
children: [/* @__PURE__ */ J("span", {
|
|
678
615
|
role: "status",
|
|
679
616
|
"aria-live": "polite",
|
|
680
617
|
className: "sr-only",
|
|
681
|
-
children:
|
|
682
|
-
}), e === o.User ? /* @__PURE__ */
|
|
683
|
-
icon: /* @__PURE__ */
|
|
618
|
+
children: x
|
|
619
|
+
}), e === o.User ? /* @__PURE__ */ Y(q, { children: [t && /* @__PURE__ */ J(C, {
|
|
620
|
+
icon: /* @__PURE__ */ J(xe, {
|
|
684
621
|
size: f.SM,
|
|
685
622
|
"aria-hidden": !0
|
|
686
623
|
}),
|
|
687
|
-
size:
|
|
688
|
-
"aria-label":
|
|
689
|
-
tooltipProps: { tooltip:
|
|
624
|
+
size: S.Small,
|
|
625
|
+
"aria-label": v?.editMessage ?? "Edit message",
|
|
626
|
+
tooltipProps: { tooltip: _?.edit ?? "Edit" },
|
|
690
627
|
onClick: t,
|
|
691
628
|
onMouseEnter: n,
|
|
692
629
|
onFocus: n
|
|
693
|
-
}), r && /* @__PURE__ */
|
|
694
|
-
icon: /* @__PURE__ */
|
|
630
|
+
}), r && /* @__PURE__ */ J(C, {
|
|
631
|
+
icon: /* @__PURE__ */ J(De, {
|
|
695
632
|
size: f.SM,
|
|
696
633
|
"aria-hidden": !0
|
|
697
634
|
}),
|
|
698
|
-
size:
|
|
699
|
-
"aria-label":
|
|
700
|
-
tooltipProps: { tooltip:
|
|
635
|
+
size: S.Small,
|
|
636
|
+
"aria-label": v?.deleteMessage ?? "Delete message",
|
|
637
|
+
tooltipProps: { tooltip: _?.delete ?? "Delete" },
|
|
701
638
|
onClick: r
|
|
702
|
-
})] }) : /* @__PURE__ */
|
|
703
|
-
i && /* @__PURE__ */
|
|
704
|
-
icon: /* @__PURE__ */
|
|
639
|
+
})] }) : /* @__PURE__ */ Y(q, { children: [
|
|
640
|
+
i && /* @__PURE__ */ J(C, {
|
|
641
|
+
icon: /* @__PURE__ */ J(Se, {
|
|
705
642
|
size: f.SM,
|
|
706
643
|
"aria-hidden": !0
|
|
707
644
|
}),
|
|
708
|
-
size:
|
|
709
|
-
"aria-label":
|
|
710
|
-
tooltipProps: { tooltip:
|
|
645
|
+
size: S.Small,
|
|
646
|
+
"aria-label": v?.regenerateResponse ?? "Regenerate response",
|
|
647
|
+
tooltipProps: { tooltip: _?.regenerate ?? "Regenerate" },
|
|
711
648
|
onClick: i
|
|
712
649
|
}),
|
|
713
|
-
s && /* @__PURE__ */
|
|
714
|
-
icon:
|
|
650
|
+
s && /* @__PURE__ */ J(C, {
|
|
651
|
+
icon: J(y === "copy" ? j : F, {
|
|
715
652
|
size: f.SM,
|
|
716
653
|
"aria-hidden": !0
|
|
717
654
|
}),
|
|
718
|
-
size:
|
|
719
|
-
"aria-label":
|
|
720
|
-
tooltipProps: { tooltip:
|
|
655
|
+
size: S.Small,
|
|
656
|
+
"aria-label": v?.copyResponse ?? "Copy response",
|
|
657
|
+
tooltipProps: { tooltip: y === "copy" ? _?.copied ?? "Copied!" : _?.copy ?? "Copy" },
|
|
721
658
|
onClick: T
|
|
722
659
|
}),
|
|
723
|
-
c && /* @__PURE__ */
|
|
724
|
-
icon:
|
|
660
|
+
c && /* @__PURE__ */ J(C, {
|
|
661
|
+
icon: J(y === "markdown" ? j : ve, {
|
|
725
662
|
size: f.SM,
|
|
726
663
|
"aria-hidden": !0
|
|
727
664
|
}),
|
|
728
|
-
size:
|
|
729
|
-
"aria-label":
|
|
730
|
-
tooltipProps: { tooltip:
|
|
665
|
+
size: S.Small,
|
|
666
|
+
"aria-label": v?.copyAsMarkdown ?? "Copy as markdown",
|
|
667
|
+
tooltipProps: { tooltip: y === "markdown" ? _?.copiedMarkdown ?? "Copied!" : _?.copyMarkdown ?? "Copy as Markdown" },
|
|
731
668
|
onClick: E
|
|
732
669
|
}),
|
|
733
|
-
l && /* @__PURE__ */
|
|
734
|
-
icon: /* @__PURE__ */
|
|
670
|
+
l && /* @__PURE__ */ J(C, {
|
|
671
|
+
icon: /* @__PURE__ */ J(Ee, {
|
|
735
672
|
size: f.SM,
|
|
736
673
|
"aria-hidden": !0
|
|
737
674
|
}),
|
|
738
|
-
size:
|
|
739
|
-
"aria-label":
|
|
740
|
-
"aria-pressed":
|
|
741
|
-
className:
|
|
742
|
-
tooltipProps: { tooltip:
|
|
675
|
+
size: S.Small,
|
|
676
|
+
"aria-label": v?.likeResponse ?? "Like response",
|
|
677
|
+
"aria-pressed": p === a.Like,
|
|
678
|
+
className: p === a.Like ? "!text-accent" : void 0,
|
|
679
|
+
tooltipProps: { tooltip: _?.like ?? "Like" },
|
|
743
680
|
onClick: l
|
|
744
681
|
}),
|
|
745
|
-
d && /* @__PURE__ */
|
|
746
|
-
icon: /* @__PURE__ */
|
|
682
|
+
d && /* @__PURE__ */ J(C, {
|
|
683
|
+
icon: /* @__PURE__ */ J(Te, {
|
|
747
684
|
size: f.SM,
|
|
748
685
|
"aria-hidden": !0
|
|
749
686
|
}),
|
|
750
|
-
size:
|
|
751
|
-
"aria-label":
|
|
752
|
-
"aria-pressed":
|
|
753
|
-
className:
|
|
754
|
-
tooltipProps: { tooltip:
|
|
687
|
+
size: S.Small,
|
|
688
|
+
"aria-label": v?.dislikeResponse ?? "Dislike response",
|
|
689
|
+
"aria-pressed": p === a.Dislike,
|
|
690
|
+
className: p === a.Dislike ? "!text-accent" : void 0,
|
|
691
|
+
tooltipProps: { tooltip: _?.dislike ?? "Dislike" },
|
|
755
692
|
onClick: d
|
|
756
693
|
})
|
|
757
694
|
] })]
|
|
@@ -763,31 +700,31 @@ var ut = 2e3, dt = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
763
700
|
collapsedText: "_collapsedText_1tjh8_15",
|
|
764
701
|
startersDivider: "_startersDivider_1tjh8_26",
|
|
765
702
|
text: "_text_1tjh8_30"
|
|
766
|
-
},
|
|
703
|
+
}, st = ({ text: e, styles: i, actions: a, hasAlwaysVisibleActions: s, isStreaming: c, attachments: d, afterContent: f, starters: p, onSelectStarter: m, deploymentIconUrl: h, deploymentDisplayName: g, markdownComponents: _, onAttachmentClick: v, onDownloadAll: y, onAttachmentRetry: b, codeBlockTheme: x, labels: S, selectedAttachmentId: C }) => {
|
|
767
704
|
let { colors: w, typography: T, className: E, bubbleClassName: O } = i ?? {}, { attachmentClickLabel: k, attachmentRetryLabel: A, attachmentOpenInNewTabLabel: j, startersAriaLabel: M = "Quick reply buttons", thinkingLabel: N, codeBlockCopyLabel: P, codeBlockCopiedLabel: F, assistantMessageAriaLabel: I = "Assistant message", deploymentIconFallbackLabel: L = "AI" } = S ?? {}, R = c ? (d ?? []).filter((e) => e.type !== t.Audio) : d ?? [], z = l({
|
|
768
705
|
"--cm-bubble-text": w?.text,
|
|
769
706
|
"--cm-starters-divider": w?.startersDivider
|
|
770
707
|
}), B = u($.text, T?.fontClassName), V = !!(h || g);
|
|
771
|
-
return /* @__PURE__ */
|
|
708
|
+
return /* @__PURE__ */ Y("div", {
|
|
772
709
|
role: "group",
|
|
773
710
|
"aria-label": I,
|
|
774
711
|
style: z,
|
|
775
712
|
className: u("flex w-full items-start gap-3", E),
|
|
776
|
-
children: [V && /* @__PURE__ */
|
|
713
|
+
children: [V && /* @__PURE__ */ J(n, {
|
|
777
714
|
src: h,
|
|
778
715
|
size: 28,
|
|
779
716
|
initialsName: g || L,
|
|
780
717
|
labels: { tooltip: g ?? L }
|
|
781
|
-
}), /* @__PURE__ */
|
|
718
|
+
}), /* @__PURE__ */ Y("div", {
|
|
782
719
|
className: "flex w-full min-w-0 max-w-full flex-col items-start gap-5",
|
|
783
|
-
children: [/* @__PURE__ */
|
|
720
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
784
721
|
className: u("flex w-full min-w-0 max-w-full flex-col items-start gap-4", O),
|
|
785
722
|
children: [
|
|
786
|
-
(e || c) && /* @__PURE__ */
|
|
723
|
+
(e || c) && /* @__PURE__ */ J("div", {
|
|
787
724
|
"aria-live": "polite",
|
|
788
725
|
"aria-atomic": "false",
|
|
789
726
|
className: u(B, "min-w-0 max-w-full text-start"),
|
|
790
|
-
children: /* @__PURE__ */
|
|
727
|
+
children: /* @__PURE__ */ J(r, {
|
|
791
728
|
content: e,
|
|
792
729
|
isStreaming: c,
|
|
793
730
|
thinkingLabel: N,
|
|
@@ -797,7 +734,7 @@ var ut = 2e3, dt = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
797
734
|
codeBlockTheme: x
|
|
798
735
|
})
|
|
799
736
|
}),
|
|
800
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ J(et, {
|
|
801
738
|
attachments: R,
|
|
802
739
|
onAttachmentClick: (e) => v?.(d?.find((t) => t.id === e)),
|
|
803
740
|
onDownloadAll: y,
|
|
@@ -810,20 +747,20 @@ var ut = 2e3, dt = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
810
747
|
selectedAttachmentId: C
|
|
811
748
|
}),
|
|
812
749
|
f,
|
|
813
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ J(ot, {
|
|
814
751
|
...a,
|
|
815
752
|
isAlwaysVisible: s,
|
|
816
753
|
role: o.Assistant
|
|
817
754
|
})
|
|
818
755
|
]
|
|
819
|
-
}), p && p.length > 0 && m && /* @__PURE__ */
|
|
756
|
+
}), p && p.length > 0 && m && /* @__PURE__ */ J("div", {
|
|
820
757
|
role: "list",
|
|
821
758
|
"aria-label": M,
|
|
822
759
|
className: u("flex w-full flex-wrap gap-2 border-t pt-5", $.startersDivider),
|
|
823
|
-
children: p.map((e, t) => /* @__PURE__ */
|
|
760
|
+
children: p.map((e, t) => /* @__PURE__ */ J("div", {
|
|
824
761
|
role: "listitem",
|
|
825
762
|
className: "min-w-[40px]",
|
|
826
|
-
children: /* @__PURE__ */
|
|
763
|
+
children: /* @__PURE__ */ J(D, {
|
|
827
764
|
label: e.title,
|
|
828
765
|
className: "min-w-[40px]",
|
|
829
766
|
onClick: () => m(e)
|
|
@@ -832,18 +769,18 @@ var ut = 2e3, dt = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
832
769
|
})]
|
|
833
770
|
})]
|
|
834
771
|
});
|
|
835
|
-
},
|
|
772
|
+
}, ct = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ J("div", {
|
|
836
773
|
role: "status",
|
|
837
774
|
"aria-live": "polite",
|
|
838
|
-
children: /* @__PURE__ */
|
|
775
|
+
children: /* @__PURE__ */ J(T, {
|
|
839
776
|
title: e,
|
|
840
777
|
message: t,
|
|
841
778
|
textClassName: "flex-row flex-wrap gap-1"
|
|
842
779
|
})
|
|
843
|
-
}),
|
|
780
|
+
}), lt = /* @__PURE__ */ function(e) {
|
|
844
781
|
return e.Bottom = "Bottom", e.Top = "Top", e;
|
|
845
|
-
}({}),
|
|
846
|
-
let { colors: _, typography: v, className: y, bubbleClassName: b } = n ?? {}, { showMoreLabel: x = "Show more", showLessLabel:
|
|
782
|
+
}({}), ut = 10, dt = ({ text: e, position: t = lt.Bottom, styles: n, actions: r, hasAlwaysVisibleActions: i, attachments: a, collapsedLineCount: s = ut, labels: c, onAttachmentClick: p, onDownloadAll: m, onAttachmentRetry: h, selectedAttachmentId: g }) => {
|
|
783
|
+
let { colors: _, typography: v, className: y, bubbleClassName: b } = n ?? {}, { showMoreLabel: x = "Show more", showLessLabel: C = "Show less", showMoreAriaLabel: w, showLessAriaLabel: T, attachmentClickLabel: D, attachmentRetryLabel: O, attachmentOpenInNewTabLabel: k, userMessageAriaLabel: A = "User message" } = c ?? {}, { textRef: j, isTextCollapsed: P, isOverflowing: F, collapsedMaxHeight: I, expandedMaxHeight: L, isCollapsed: R, toggleCollapsed: z } = d({
|
|
847
784
|
text: e,
|
|
848
785
|
collapsedLineCount: s
|
|
849
786
|
}), B = l({
|
|
@@ -853,16 +790,16 @@ var ut = 2e3, dt = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
853
790
|
"--cm-bubble-text": _?.text,
|
|
854
791
|
"--cm-bubble-collapsed-height": F ? `${I}px` : void 0,
|
|
855
792
|
"--cm-bubble-expanded-height": F ? `${L}px` : void 0
|
|
856
|
-
}), V = t ===
|
|
857
|
-
return /* @__PURE__ */
|
|
793
|
+
}), V = t === lt.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", ee = u($.text, v?.fontClassName), H = w ?? x, U = T ?? C, te = R ? x : C, ne = R ? H : U, re = R ? M : N, ie = Me();
|
|
794
|
+
return /* @__PURE__ */ J("div", {
|
|
858
795
|
role: "group",
|
|
859
796
|
"aria-label": A,
|
|
860
797
|
style: B,
|
|
861
798
|
className: u("flex w-full", y),
|
|
862
|
-
children: /* @__PURE__ */
|
|
799
|
+
children: /* @__PURE__ */ Y("div", {
|
|
863
800
|
className: "ms-auto flex w-fit min-w-0 max-w-full flex-col items-end gap-4",
|
|
864
801
|
children: [
|
|
865
|
-
/* @__PURE__ */
|
|
802
|
+
/* @__PURE__ */ J(et, {
|
|
866
803
|
attachments: a ?? [],
|
|
867
804
|
onAttachmentClick: (e) => p?.(a?.find((t) => t.id === e)),
|
|
868
805
|
onDownloadAll: m,
|
|
@@ -875,21 +812,21 @@ var ut = 2e3, dt = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
875
812
|
styles: { className: "max-w-[640px]" },
|
|
876
813
|
selectedAttachmentId: g
|
|
877
814
|
}),
|
|
878
|
-
e && /* @__PURE__ */
|
|
815
|
+
e && /* @__PURE__ */ J("div", {
|
|
879
816
|
className: u($.userBubble, "flex w-fit items-center justify-end rounded-es-2xl rounded-ss-2xl border px-6 py-4", V, b),
|
|
880
|
-
children: /* @__PURE__ */
|
|
817
|
+
children: /* @__PURE__ */ Y("div", {
|
|
881
818
|
className: "flex min-w-0 flex-col items-start",
|
|
882
|
-
children: [/* @__PURE__ */
|
|
819
|
+
children: [/* @__PURE__ */ J("div", {
|
|
883
820
|
id: ie,
|
|
884
|
-
className: u("relative overflow-hidden", F && $.collapsibleText, F && !R && $.expandedText,
|
|
885
|
-
children: /* @__PURE__ */
|
|
821
|
+
className: u("relative overflow-hidden", F && $.collapsibleText, F && !R && $.expandedText, P && $.collapsedText),
|
|
822
|
+
children: /* @__PURE__ */ J("p", {
|
|
886
823
|
ref: j,
|
|
887
824
|
className: u(ee, "whitespace-pre-wrap text-start [overflow-wrap:anywhere]"),
|
|
888
825
|
children: e
|
|
889
826
|
})
|
|
890
|
-
}), F && /* @__PURE__ */
|
|
891
|
-
label: /* @__PURE__ */
|
|
892
|
-
iconBefore: /* @__PURE__ */
|
|
827
|
+
}), F && /* @__PURE__ */ J(E, {
|
|
828
|
+
label: /* @__PURE__ */ J(q, { children: te }),
|
|
829
|
+
iconBefore: /* @__PURE__ */ J(re, {
|
|
893
830
|
size: f.SM,
|
|
894
831
|
"aria-hidden": "true"
|
|
895
832
|
}),
|
|
@@ -898,11 +835,11 @@ var ut = 2e3, dt = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
898
835
|
"aria-controls": ie,
|
|
899
836
|
className: "mt-3",
|
|
900
837
|
onClick: z,
|
|
901
|
-
size:
|
|
838
|
+
size: S.Small
|
|
902
839
|
})]
|
|
903
840
|
})
|
|
904
841
|
}),
|
|
905
|
-
/* @__PURE__ */
|
|
842
|
+
/* @__PURE__ */ J(ot, {
|
|
906
843
|
...r,
|
|
907
844
|
isAlwaysVisible: i,
|
|
908
845
|
role: o.User
|
|
@@ -910,16 +847,16 @@ var ut = 2e3, dt = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
910
847
|
]
|
|
911
848
|
})
|
|
912
849
|
});
|
|
913
|
-
},
|
|
850
|
+
}, ft = ({ role: e, onAttachmentClick: t, markdownComponents: n, ...r }) => e === o.Status ? /* @__PURE__ */ J(ct, { labels: {
|
|
914
851
|
titleText: r.labels?.statusTitleText,
|
|
915
852
|
bodyText: r.labels?.statusBodyText ?? ""
|
|
916
|
-
} }) : e === o.User ? /* @__PURE__ */
|
|
853
|
+
} }) : e === o.User ? /* @__PURE__ */ J(dt, {
|
|
917
854
|
...r,
|
|
918
855
|
onAttachmentClick: t
|
|
919
|
-
}) : /* @__PURE__ */
|
|
856
|
+
}) : /* @__PURE__ */ J(st, {
|
|
920
857
|
...r,
|
|
921
858
|
markdownComponents: n,
|
|
922
859
|
onAttachmentClick: t
|
|
923
860
|
});
|
|
924
861
|
//#endregion
|
|
925
|
-
export {
|
|
862
|
+
export { st as AssistantMessageBubble, lt as BubblePosition, ot as MessageActions, ft as MessageBubble, ct as StatusMessageBubble, dt as UserMessageBubble };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-conversation-messages",
|
|
3
3
|
"description": "Message bubble components for rendering conversation history with actions and source citations",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.87",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"react": "^19.0.0",
|
|
21
21
|
"@tabler/icons-react": "^3.0.0",
|
|
22
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
23
|
-
"@epam/ai-dial-conversation-input": "1.1.0-dev.
|
|
22
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.87",
|
|
23
|
+
"@epam/ai-dial-conversation-input": "1.1.0-dev.87",
|
|
24
24
|
"react-markdown": "^10.1.0",
|
|
25
|
-
"@epam/ai-dial-ui-kit": "^0.13.0-dev.
|
|
25
|
+
"@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|