@epam/ai-dial-conversation-messages 1.0.0-dev.484 → 1.0.0-dev.489
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/MessageBubble/AssistantMessageBubble.d.ts.map +1 -1
- package/components/MessageBubble/StatusMessageBubble.d.ts +1 -4
- package/components/MessageBubble/StatusMessageBubble.d.ts.map +1 -1
- package/components/MessageBubble/UserMessageBubble.d.ts.map +1 -1
- package/index.js +261 -227
- package/models/message-bubble.d.ts +2 -2
- package/models/message-bubble.d.ts.map +1 -1
- package/package.json +3 -3
- package/types/bubble-position.d.ts +2 -2
- package/types/bubble-position.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/AssistantMessageBubble.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAI/E,gHAAgH;AAChH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,
|
|
1
|
+
{"version":3,"file":"AssistantMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/AssistantMessageBubble.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAI/E,gHAAgH;AAChH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAgIlE,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
/** Props for the model-change status message banner. */
|
|
3
3
|
export interface StatusMessageBubbleProps {
|
|
4
|
-
/**
|
|
5
|
-
* Bold prefix text displayed before the description.
|
|
6
|
-
* @default "Model switched."
|
|
7
|
-
*/
|
|
4
|
+
/** Bold prefix text displayed before the description. Defaults to `'Model switched.'`. */
|
|
8
5
|
titleText?: string;
|
|
9
6
|
/** Full description text, e.g. "The model has been switched from GPT to Imagen." */
|
|
10
7
|
bodyText: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/StatusMessageBubble.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,wDAAwD;AACxD,MAAM,WAAW,wBAAwB;IACvC
|
|
1
|
+
{"version":3,"file":"StatusMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/StatusMessageBubble.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,wDAAwD;AACxD,MAAM,WAAW,wBAAwB;IACvC,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAa5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/UserMessageBubble.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,EAAE,EAAS,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAO1E,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"UserMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/UserMessageBubble.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,EAAE,EAAS,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAO1E,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAwIxD,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AttachmentErrorReason as e, AttachmentType as t, CodeBlockTheme as n, DeploymentIcon as r, Highlight as i, MDMessageViewer as a, MIME_TYPE_EXT_MAP as o, MessageRating as s, MessageRole as c, RequestStatus as l, ResponseFormat as u, buildCssVars as d, mergeClasses as f, useCollapsedText as p } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { DIAL_ICON_SIZE as m, DialGhostIconButton as h, DialInput as g, DialLinkButton as _, DialNotification as v, DialPopup as y, DialPrimaryButton as b, DialRadioGroup as x, DialRoundedButton as S, DialSkeleton as C, DialSkeletonVariant as w, DialSlider as T, DialSpinner as E, DialTag as D, DialTooltip as O, ElementSize as k, PopupSize as A, RadioGroupOrientation as j } from "@epam/ai-dial-ui-kit";
|
|
3
|
-
import { IconCheck as M, IconChevronDown as N, IconChevronUp as P, IconClipboard as F, IconCopy as I, IconDownload as L, IconFile as R, IconFileTypeBmp as z, IconFileTypeCss as B, IconFileTypeCsv as V, IconFileTypeDoc as
|
|
3
|
+
import { IconCheck as M, IconChevronDown as N, IconChevronUp as P, IconClipboard as F, IconCopy as I, IconDownload as L, IconFile as R, IconFileTypeBmp as z, IconFileTypeCss as B, IconFileTypeCsv as V, IconFileTypeDoc as H, IconFileTypeDocx as U, IconFileTypeHtml as ee, IconFileTypeJpg as te, IconFileTypeJs as ne, IconFileTypeJsx as W, IconFileTypePdf as G, IconFileTypePhp as re, IconFileTypePng as ie, IconFileTypePpt as ae, IconFileTypeRs as oe, IconFileTypeSql as se, IconFileTypeSvg as ce, IconFileTypeTs as le, IconFileTypeTsx as ue, IconFileTypeTxt as de, IconFileTypeVue as fe, IconFileTypeXls as pe, IconFileTypeXml as me, IconFileTypeZip as he, IconMarkdown as ge, IconMusic as _e, IconPaperclip as ve, IconPencilMinus as ye, IconPhoto as be, IconRefresh as xe, IconReload as Se, IconTerminal2 as Ce, IconThumbDown as we, IconThumbUp as Te, IconTrashX as Ee, IconVideo as De, IconX as Oe } from "@tabler/icons-react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
import { memo as ke, useCallback as Ae, useEffect as je, useId as Me, useMemo as Ne, useRef as Pe, useState as K } from "react";
|
|
6
6
|
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
@@ -23,18 +23,23 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
23
23
|
imageLoadStatus: r
|
|
24
24
|
};
|
|
25
25
|
}, X = {
|
|
26
|
-
card: "
|
|
27
|
-
cardError: "
|
|
28
|
-
cardSelected: "
|
|
29
|
-
cardPrompt: "
|
|
30
|
-
cardPasted: "
|
|
31
|
-
name: "
|
|
32
|
-
meta: "
|
|
33
|
-
loadingOverlay: "
|
|
34
|
-
actionBtn: "
|
|
35
|
-
removeBtnImage: "
|
|
36
|
-
hoverDownloadIcon: "
|
|
37
|
-
}, Le = (e)
|
|
26
|
+
card: "_card_ywrb5_1",
|
|
27
|
+
cardError: "_cardError_ywrb5_6",
|
|
28
|
+
cardSelected: "_cardSelected_ywrb5_10",
|
|
29
|
+
cardPrompt: "_cardPrompt_ywrb5_15",
|
|
30
|
+
cardPasted: "_cardPasted_ywrb5_16",
|
|
31
|
+
name: "_name_ywrb5_20",
|
|
32
|
+
meta: "_meta_ywrb5_24",
|
|
33
|
+
loadingOverlay: "_loadingOverlay_ywrb5_28",
|
|
34
|
+
actionBtn: "_actionBtn_ywrb5_32",
|
|
35
|
+
removeBtnImage: "_removeBtnImage_ywrb5_43",
|
|
36
|
+
hoverDownloadIcon: "_hoverDownloadIcon_ywrb5_51"
|
|
37
|
+
}, Le = /* @__PURE__ */ function(e) {
|
|
38
|
+
return e.None = "none", e.AllVisible = "all-visible", e.Collapsed = "collapsed", e;
|
|
39
|
+
}({}), Re = (e) => {
|
|
40
|
+
let t = e.lastIndexOf(".");
|
|
41
|
+
return t > 0 ? e.slice(0, t) : e;
|
|
42
|
+
}, ze = (e) => {
|
|
38
43
|
if (!e) return R;
|
|
39
44
|
if (e.startsWith("image/")) switch (e) {
|
|
40
45
|
case "image/jpeg":
|
|
@@ -49,8 +54,8 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
49
54
|
switch (e) {
|
|
50
55
|
case "application/pdf": return G;
|
|
51
56
|
case "application/msword":
|
|
52
|
-
case "application/vnd.ms-word": return
|
|
53
|
-
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return
|
|
57
|
+
case "application/vnd.ms-word": return H;
|
|
58
|
+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return U;
|
|
54
59
|
case "application/vnd.ms-powerpoint": return ae;
|
|
55
60
|
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return ae;
|
|
56
61
|
case "application/vnd.ms-excel": return pe;
|
|
@@ -64,7 +69,7 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
64
69
|
case "text/csv": return V;
|
|
65
70
|
case "text/plain": return de;
|
|
66
71
|
case "text/html":
|
|
67
|
-
case "application/xhtml+xml": return
|
|
72
|
+
case "application/xhtml+xml": return ee;
|
|
68
73
|
case "text/xml":
|
|
69
74
|
case "application/xml": return me;
|
|
70
75
|
case "application/sql":
|
|
@@ -83,67 +88,77 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
83
88
|
case "text/x-vue": return fe;
|
|
84
89
|
default: return R;
|
|
85
90
|
}
|
|
86
|
-
},
|
|
91
|
+
}, Be = (e) => {
|
|
87
92
|
let { type: n, contentType: r } = e;
|
|
88
|
-
return n === t.Prompt ? Ce : n === t.Pasted ? F : n === t.Image ? be :
|
|
89
|
-
},
|
|
93
|
+
return n === t.Prompt ? Ce : n === t.Pasted ? F : n === t.Image ? be : ze(r ?? "");
|
|
94
|
+
}, Ve = (e) => {
|
|
90
95
|
let t = e.toLowerCase().split(";")[0].trim(), n = o[t];
|
|
91
96
|
if (n) return n;
|
|
92
97
|
let r = t.split("/")[1];
|
|
93
98
|
if (r && !r.startsWith("vnd.") && !r.includes("+")) return r;
|
|
94
|
-
},
|
|
95
|
-
let { type:
|
|
96
|
-
if (
|
|
97
|
-
if (
|
|
98
|
-
if (
|
|
99
|
-
if (
|
|
100
|
-
let e =
|
|
99
|
+
}, He = (e, n) => {
|
|
100
|
+
let { type: r, name: i, contentType: a } = e;
|
|
101
|
+
if (r === t.Prompt) return n.promptLabel ?? "Prompt";
|
|
102
|
+
if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
|
|
103
|
+
if (r === t.Image) return n.imageLabel ?? "Image";
|
|
104
|
+
if (a) {
|
|
105
|
+
let e = Ve(a);
|
|
101
106
|
if (e) return `.${e}`;
|
|
102
107
|
}
|
|
103
|
-
let
|
|
104
|
-
return
|
|
105
|
-
},
|
|
106
|
-
let { type:
|
|
108
|
+
let o = i.lastIndexOf(".");
|
|
109
|
+
return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
|
|
110
|
+
}, Ue = (e, n, r, i = {}) => {
|
|
111
|
+
let { type: a, status: o, previewUrl: s, url: c } = e, u = o === l.Loading, d = o === l.Error, p = a === t.Image && !!(s ?? c) && !d, m = a === t.Audio && !d, h = f(X.card, d && X.cardError, n && X.cardSelected, !d && !n && a === t.Prompt && X.cardPrompt, !d && !n && a === t.Pasted && X.cardPasted);
|
|
107
112
|
return {
|
|
108
|
-
isLoading:
|
|
109
|
-
isError:
|
|
110
|
-
isImage:
|
|
111
|
-
isAudio:
|
|
112
|
-
areActionsVisible:
|
|
113
|
-
BottomIcon:
|
|
114
|
-
typeLabel:
|
|
115
|
-
cardColorClass:
|
|
116
|
-
removeBtnClass:
|
|
113
|
+
isLoading: u,
|
|
114
|
+
isError: d,
|
|
115
|
+
isImage: p,
|
|
116
|
+
isAudio: m,
|
|
117
|
+
areActionsVisible: d || r,
|
|
118
|
+
BottomIcon: Be(e),
|
|
119
|
+
typeLabel: He(e, i),
|
|
120
|
+
cardColorClass: h,
|
|
121
|
+
removeBtnClass: p ? X.removeBtnImage : X.actionBtn
|
|
117
122
|
};
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
}, We = (e, t) => e <= 0 ? {
|
|
124
|
+
layout: Le.None,
|
|
125
|
+
visibleCount: 0,
|
|
126
|
+
hiddenCount: 0
|
|
127
|
+
} : e < 5 || t ? {
|
|
128
|
+
layout: Le.AllVisible,
|
|
129
|
+
visibleCount: e,
|
|
130
|
+
hiddenCount: 0
|
|
131
|
+
} : {
|
|
132
|
+
layout: Le.Collapsed,
|
|
133
|
+
visibleCount: 4,
|
|
134
|
+
hiddenCount: e - 4
|
|
135
|
+
}, Ge = ({ attachment: n, searchQuery: r = "", onRemove: a, onRetry: o, onExpand: s, onClick: c, isSelected: l, shouldAlwaysShowActions: u, labels: p, typeLabels: g, styles: _, showHoverDownloadIcon: v = !1, className: y }) => {
|
|
136
|
+
let { removeLabel: b = "Remove attachment", retryLabel: x = "Retry upload", clickLabel: S = "Open attachment", expandLabel: T = "Expand pasted text", loadingLabel: D = "Loading attachment", uploadFailedStatusLabel: O = "Upload failed" } = p ?? {}, { colors: A, typography: j, roundedClassName: M = "rounded-xl" } = _ ?? {}, { id: N, name: P } = n, F = n.previewUrl ?? n.url, I = n.type === t.Pasted, R = I && s !== void 0, z = Ne(() => I ? P : Re(P), [I, P]), B = d({
|
|
137
|
+
"--ci-card-border": A?.border,
|
|
138
|
+
"--ci-card-bg": A?.background,
|
|
139
|
+
"--ci-card-name": A?.nameText,
|
|
140
|
+
"--ci-card-meta": A?.metaText
|
|
141
|
+
}), { isLoading: V, isError: H, isImage: U, isAudio: ee, areActionsVisible: te, BottomIcon: ne, typeLabel: W, cardColorClass: G, removeBtnClass: re } = Ne(() => Ue(n, l ?? !1, u ?? !1, g), [
|
|
128
142
|
n,
|
|
129
143
|
l,
|
|
130
|
-
u
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
144
|
+
u,
|
|
145
|
+
g
|
|
146
|
+
]), ie = c !== void 0 && !R && !V && !H, ae = R || ie, { imageRef: oe, imageLoadStatus: se } = Ie({
|
|
147
|
+
enabled: U,
|
|
148
|
+
src: F
|
|
149
|
+
}), ce = () => {
|
|
150
|
+
R && s ? s(N) : ie && c && c(N);
|
|
151
|
+
}, le = (e) => {
|
|
152
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), ce());
|
|
138
153
|
};
|
|
139
|
-
if (
|
|
140
|
-
style:
|
|
141
|
-
className: f("group flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 border p-3",
|
|
154
|
+
if (ee) return /* @__PURE__ */ Y("div", {
|
|
155
|
+
style: B,
|
|
156
|
+
className: f("group flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 border p-3", M, G, y),
|
|
142
157
|
children: [/* @__PURE__ */ Y("div", {
|
|
143
158
|
className: "flex items-center justify-between gap-2",
|
|
144
159
|
children: [/* @__PURE__ */ J("span", {
|
|
145
160
|
title: n.name,
|
|
146
|
-
className: f(
|
|
161
|
+
className: f(j?.fontClassName ?? "dial-tiny-text", "min-w-0 truncate", X.name),
|
|
147
162
|
children: r ? /* @__PURE__ */ J(i, {
|
|
148
163
|
text: n.name,
|
|
149
164
|
query: r,
|
|
@@ -155,107 +170,114 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
155
170
|
"aria-hidden": !0
|
|
156
171
|
}),
|
|
157
172
|
size: k.Small,
|
|
158
|
-
className: f("h-6 w-6 shrink-0 rounded",
|
|
159
|
-
"aria-label":
|
|
173
|
+
className: f("h-6 w-6 shrink-0 rounded", re),
|
|
174
|
+
"aria-label": S,
|
|
160
175
|
onClick: (e) => {
|
|
161
|
-
e.stopPropagation(), c(
|
|
176
|
+
e.stopPropagation(), c(N);
|
|
162
177
|
}
|
|
163
178
|
})]
|
|
164
179
|
}), n.playUrl && /* @__PURE__ */ J("audio", {
|
|
165
180
|
controls: !0,
|
|
166
181
|
src: n.playUrl,
|
|
182
|
+
"aria-label": n.name,
|
|
167
183
|
className: "w-full",
|
|
168
184
|
preload: "metadata"
|
|
169
185
|
})]
|
|
170
186
|
});
|
|
171
|
-
let
|
|
172
|
-
|
|
187
|
+
let ue = f("group relative flex h-[100px] w-[100px] flex-shrink-0 border focus-within:outline focus-within:outline-1 focus-within:outline-offset-1", M, G, !U && "flex-col gap-3 p-3", ae && "cursor-pointer", y), de = /* @__PURE__ */ Y(q, { children: [
|
|
188
|
+
U ? /* @__PURE__ */ Y("div", {
|
|
173
189
|
className: "relative h-full w-full overflow-hidden",
|
|
174
|
-
children: [
|
|
190
|
+
children: [se !== Fe.Loaded && /* @__PURE__ */ J(C, {
|
|
175
191
|
variant: w.Rectangular,
|
|
176
192
|
width: "100%",
|
|
177
193
|
height: "100%",
|
|
178
|
-
active:
|
|
194
|
+
active: se === Fe.Loading,
|
|
179
195
|
overlay: /* @__PURE__ */ J(be, {
|
|
180
196
|
size: m.LG,
|
|
181
|
-
className:
|
|
197
|
+
className: j?.placeholderIconClassName ?? "text-secondary",
|
|
182
198
|
"aria-hidden": !0
|
|
183
199
|
}),
|
|
184
|
-
className: f("absolute inset-0",
|
|
200
|
+
className: f("absolute inset-0", M)
|
|
185
201
|
}), /* @__PURE__ */ J("img", {
|
|
186
|
-
ref:
|
|
187
|
-
src:
|
|
188
|
-
alt:
|
|
202
|
+
ref: oe,
|
|
203
|
+
src: F,
|
|
204
|
+
alt: P,
|
|
189
205
|
loading: "lazy",
|
|
190
206
|
decoding: "async",
|
|
191
|
-
className: f("h-full w-full object-cover transition-opacity duration-200",
|
|
207
|
+
className: f("h-full w-full object-cover transition-opacity duration-200", se === Fe.Loaded ? "opacity-100" : "opacity-0", M)
|
|
192
208
|
})]
|
|
193
|
-
}) :
|
|
209
|
+
}) : H ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y("div", {
|
|
194
210
|
className: "flex flex-row items-center gap-1 overflow-hidden",
|
|
195
|
-
children: [/* @__PURE__ */ J(
|
|
211
|
+
children: [/* @__PURE__ */ J(ne, {
|
|
196
212
|
size: m.SM,
|
|
197
213
|
className: f("shrink-0", X.meta),
|
|
198
214
|
"aria-hidden": !0
|
|
199
215
|
}), /* @__PURE__ */ J("span", {
|
|
200
|
-
title:
|
|
201
|
-
className: f(
|
|
202
|
-
children:
|
|
216
|
+
title: W,
|
|
217
|
+
className: f(j?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", X.meta),
|
|
218
|
+
children: W
|
|
203
219
|
})]
|
|
204
220
|
}), /* @__PURE__ */ J("div", {
|
|
205
221
|
className: "min-w-0 flex-1",
|
|
206
222
|
children: /* @__PURE__ */ J("div", {
|
|
207
|
-
title:
|
|
208
|
-
className: f(
|
|
223
|
+
title: z,
|
|
224
|
+
className: f(j?.fontClassName ?? "dial-tiny-text", "line-clamp-3 break-words", X.name),
|
|
209
225
|
children: r ? /* @__PURE__ */ J(i, {
|
|
210
|
-
text:
|
|
226
|
+
text: z,
|
|
211
227
|
query: r,
|
|
212
228
|
maxLines: 3
|
|
213
|
-
}) :
|
|
229
|
+
}) : z
|
|
214
230
|
})
|
|
215
231
|
})] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("div", {
|
|
216
232
|
className: "min-w-0 flex-1",
|
|
217
233
|
children: /* @__PURE__ */ J("div", {
|
|
218
|
-
title:
|
|
219
|
-
className: f(
|
|
234
|
+
title: z,
|
|
235
|
+
className: f(j?.fontClassName ?? "dial-tiny-text", "line-clamp-3 break-words", X.name),
|
|
220
236
|
children: r ? /* @__PURE__ */ J(i, {
|
|
221
|
-
text:
|
|
237
|
+
text: z,
|
|
222
238
|
query: r,
|
|
223
239
|
maxLines: 3
|
|
224
|
-
}) :
|
|
240
|
+
}) : z
|
|
225
241
|
})
|
|
226
242
|
}), /* @__PURE__ */ Y("div", {
|
|
227
243
|
className: "flex flex-row items-center gap-1 overflow-hidden",
|
|
228
|
-
children: [/* @__PURE__ */ J(
|
|
244
|
+
children: [/* @__PURE__ */ J(ne, {
|
|
229
245
|
size: m.SM,
|
|
230
246
|
className: f("shrink-0", X.meta),
|
|
231
247
|
"aria-hidden": !0
|
|
232
248
|
}), /* @__PURE__ */ J("span", {
|
|
233
|
-
title:
|
|
234
|
-
className: f(
|
|
235
|
-
children:
|
|
249
|
+
title: W,
|
|
250
|
+
className: f(j?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", X.meta),
|
|
251
|
+
children: W
|
|
236
252
|
})]
|
|
237
253
|
})] }),
|
|
238
|
-
|
|
239
|
-
className: f("absolute inset-0 flex items-center justify-center",
|
|
254
|
+
V && /* @__PURE__ */ J("span", {
|
|
255
|
+
className: f("absolute inset-0 flex items-center justify-center", M, X.loadingOverlay),
|
|
240
256
|
children: /* @__PURE__ */ J(E, {
|
|
241
257
|
size: 40,
|
|
242
|
-
ariaLabel:
|
|
258
|
+
ariaLabel: D,
|
|
243
259
|
className: "z-50"
|
|
244
260
|
})
|
|
245
261
|
}),
|
|
246
|
-
|
|
247
|
-
|
|
262
|
+
/* @__PURE__ */ J("span", {
|
|
263
|
+
role: "status",
|
|
264
|
+
"aria-live": "polite",
|
|
265
|
+
className: "sr-only",
|
|
266
|
+
children: H ? O : ""
|
|
267
|
+
}),
|
|
268
|
+
!V && /* @__PURE__ */ Y("div", {
|
|
269
|
+
className: f("absolute end-1 top-1 flex gap-1 transition-opacity", te ? "opacity-100" : "opacity-0 group-focus-within:opacity-100 group-hover:opacity-100 mobile:opacity-100"),
|
|
248
270
|
children: [
|
|
249
|
-
|
|
271
|
+
H && o && n.errorReason !== e.UnsupportedType && /* @__PURE__ */ J(h, {
|
|
250
272
|
icon: /* @__PURE__ */ J(Se, {
|
|
251
273
|
size: m.SM,
|
|
252
274
|
"aria-hidden": !0
|
|
253
275
|
}),
|
|
254
276
|
size: k.Small,
|
|
255
|
-
className: f("h-6 w-6 rounded",
|
|
256
|
-
"aria-label":
|
|
277
|
+
className: f("h-6 w-6 rounded", re),
|
|
278
|
+
"aria-label": x,
|
|
257
279
|
onClick: (e) => {
|
|
258
|
-
e.stopPropagation(), o(
|
|
280
|
+
e.stopPropagation(), o(N);
|
|
259
281
|
}
|
|
260
282
|
}),
|
|
261
283
|
a && /* @__PURE__ */ J(h, {
|
|
@@ -264,13 +286,13 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
264
286
|
"aria-hidden": !0
|
|
265
287
|
}),
|
|
266
288
|
size: k.Small,
|
|
267
|
-
className: f("h-6 w-6 rounded",
|
|
268
|
-
"aria-label":
|
|
289
|
+
className: f("h-6 w-6 rounded", re),
|
|
290
|
+
"aria-label": b,
|
|
269
291
|
onClick: (e) => {
|
|
270
|
-
e.stopPropagation(), a?.(
|
|
292
|
+
e.stopPropagation(), a?.(N);
|
|
271
293
|
}
|
|
272
294
|
}),
|
|
273
|
-
|
|
295
|
+
v && !a && !H && /* @__PURE__ */ J(L, {
|
|
274
296
|
size: m.SM,
|
|
275
297
|
"aria-hidden": !0,
|
|
276
298
|
className: f("h-6 w-6 rounded-lg p-1", X.hoverDownloadIcon)
|
|
@@ -278,143 +300,140 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
278
300
|
]
|
|
279
301
|
})
|
|
280
302
|
] });
|
|
281
|
-
return
|
|
282
|
-
style:
|
|
283
|
-
className:
|
|
284
|
-
onClick:
|
|
285
|
-
onKeyDown:
|
|
303
|
+
return ae ? /* @__PURE__ */ J("div", {
|
|
304
|
+
style: B,
|
|
305
|
+
className: ue,
|
|
306
|
+
onClick: ce,
|
|
307
|
+
onKeyDown: le,
|
|
286
308
|
tabIndex: 0,
|
|
287
309
|
role: "button",
|
|
288
|
-
"aria-label":
|
|
289
|
-
children:
|
|
310
|
+
"aria-label": ie ? S : R ? T : void 0,
|
|
311
|
+
children: de
|
|
290
312
|
}) : /* @__PURE__ */ J("div", {
|
|
291
|
-
style:
|
|
292
|
-
className:
|
|
293
|
-
children:
|
|
313
|
+
style: B,
|
|
314
|
+
className: ue,
|
|
315
|
+
children: de
|
|
294
316
|
});
|
|
295
|
-
}, We = /* @__PURE__ */ function(e) {
|
|
296
|
-
return e.None = "none", e.AllVisible = "all-visible", e.Collapsed = "collapsed", e;
|
|
297
|
-
}({}), Ge = (e, t) => e <= 0 ? {
|
|
298
|
-
layout: "none",
|
|
299
|
-
visibleCount: 0,
|
|
300
|
-
hiddenCount: 0
|
|
301
|
-
} : e < 5 || t ? {
|
|
302
|
-
layout: "all-visible",
|
|
303
|
-
visibleCount: e,
|
|
304
|
-
hiddenCount: 0
|
|
305
|
-
} : {
|
|
306
|
-
layout: "collapsed",
|
|
307
|
-
visibleCount: 4,
|
|
308
|
-
hiddenCount: e - 4
|
|
309
317
|
}, Z = {
|
|
310
|
-
tile: "
|
|
311
|
-
tileLight: "
|
|
312
|
-
tileError: "
|
|
313
|
-
nameText: "
|
|
314
|
-
typeText: "
|
|
315
|
-
retryIcon: "
|
|
316
|
-
hoverIcon: "
|
|
317
|
-
track: "
|
|
318
|
-
indeterminateFill: "
|
|
319
|
-
"attachment-tile-indeterminate": "_attachment-tile-
|
|
318
|
+
tile: "_tile_488nu_1",
|
|
319
|
+
tileLight: "_tileLight_488nu_12",
|
|
320
|
+
tileError: "_tileError_488nu_16",
|
|
321
|
+
nameText: "_nameText_488nu_23",
|
|
322
|
+
typeText: "_typeText_488nu_24",
|
|
323
|
+
retryIcon: "_retryIcon_488nu_36",
|
|
324
|
+
hoverIcon: "_hoverIcon_488nu_40",
|
|
325
|
+
track: "_track_488nu_45",
|
|
326
|
+
indeterminateFill: "_indeterminateFill_488nu_49",
|
|
327
|
+
"attachment-tile-indeterminate": "_attachment-tile-indeterminate_488nu_1"
|
|
320
328
|
}, Ke = {
|
|
321
329
|
[e.Network]: "Upload failed · network error",
|
|
322
330
|
[e.UnsupportedType]: "Upload failed · unsupported file type"
|
|
323
|
-
}, qe = ({ attachment: t, onClick: r, onRetry: i,
|
|
324
|
-
let { id:
|
|
325
|
-
|
|
326
|
-
},
|
|
327
|
-
(e.key === "Enter" || e.key === " ") &&
|
|
328
|
-
},
|
|
329
|
-
title:
|
|
330
|
-
className: f("
|
|
331
|
-
children:
|
|
332
|
-
}),
|
|
333
|
-
className: f("flex items-center gap-1 overflow-hidden",
|
|
334
|
-
children: [/* @__PURE__ */ J(
|
|
331
|
+
}, qe = ({ attachment: t, onClick: r, onRetry: i, labels: a, typeLabels: o, styles: s, theme: c = n.Dark, className: u }) => {
|
|
332
|
+
let { clickLabel: d = "Download attachment", retryLabel: p = "Retry upload", sizeLabel: g, uploadingLabel: _ = "Uploading", errorReasonLabels: v, genericErrorLabel: y = "Upload failed" } = a ?? {}, { nameClassName: b = "dial-caption-text", metaClassName: x = "dial-caption-text" } = s ?? {}, { id: S, name: C, status: w, errorReason: T } = t, E = w === l.Loading, D = w === l.Error, O = Me(), A = D && (T && (v?.[T] ?? Ke[T]) || y), { BottomIcon: j, typeLabel: M } = Ue(t, !1, !1, o), N = !D && !E && r !== void 0, P = D && !!i && T !== e.UnsupportedType, F = N || P ? "pe-5" : void 0, I = () => {
|
|
333
|
+
N && r?.(t);
|
|
334
|
+
}, R = (e) => {
|
|
335
|
+
(e.key === "Enter" || e.key === " ") && N && (e.preventDefault(), I());
|
|
336
|
+
}, z = f("group relative flex size-[84px] flex-col justify-between gap-1 overflow-hidden rounded-xl border p-1.5", Z.tile, !D && c === n.Light && Z.tileLight, D && Z.tileError), B = /* @__PURE__ */ J("div", {
|
|
337
|
+
title: C,
|
|
338
|
+
className: f(b, "line-clamp-2 min-w-0 break-words", Z.nameText, !D && F),
|
|
339
|
+
children: C
|
|
340
|
+
}), V = /* @__PURE__ */ Y("div", {
|
|
341
|
+
className: f("flex items-center gap-1 overflow-hidden", D && F),
|
|
342
|
+
children: [/* @__PURE__ */ J(j, {
|
|
335
343
|
size: 16,
|
|
336
344
|
className: Z.typeText,
|
|
337
345
|
"aria-hidden": !0
|
|
338
346
|
}), /* @__PURE__ */ J("span", {
|
|
339
|
-
className: f("
|
|
340
|
-
children:
|
|
347
|
+
className: f(x, "truncate", Z.typeText),
|
|
348
|
+
children: g ? `${M} · ${g}` : M
|
|
341
349
|
})]
|
|
342
|
-
}),
|
|
343
|
-
|
|
344
|
-
|
|
350
|
+
}), H = /* @__PURE__ */ Y(q, { children: [
|
|
351
|
+
D ? /* @__PURE__ */ Y(q, { children: [V, B] }) : /* @__PURE__ */ Y(q, { children: [B, V] }),
|
|
352
|
+
E && /* @__PURE__ */ J("div", {
|
|
345
353
|
role: "progressbar",
|
|
346
|
-
"aria-label":
|
|
354
|
+
"aria-label": _,
|
|
347
355
|
className: f("absolute inset-x-2 bottom-2 h-[3px] overflow-hidden rounded-full", Z.track),
|
|
348
356
|
children: /* @__PURE__ */ J("div", { className: f("h-full w-1/3 rounded-full", Z.indeterminateFill) })
|
|
349
357
|
}),
|
|
350
|
-
|
|
358
|
+
N && /* @__PURE__ */ J(L, {
|
|
351
359
|
size: m.SM,
|
|
352
360
|
"aria-hidden": !0,
|
|
353
361
|
className: f("absolute end-1 top-1 h-6 w-6 rounded-lg p-1 opacity-0 transition-opacity group-hover:opacity-100 mobile:opacity-100", Z.hoverIcon)
|
|
354
362
|
}),
|
|
355
|
-
|
|
363
|
+
P && /* @__PURE__ */ J(h, {
|
|
356
364
|
icon: /* @__PURE__ */ J(Se, {
|
|
357
365
|
size: m.SM,
|
|
358
366
|
"aria-hidden": !0
|
|
359
367
|
}),
|
|
360
368
|
size: k.Small,
|
|
361
369
|
className: f("absolute end-1 top-1 h-6 w-6 rounded-lg", Z.retryIcon),
|
|
362
|
-
"aria-label":
|
|
370
|
+
"aria-label": p,
|
|
371
|
+
"aria-describedby": A ? O : void 0,
|
|
363
372
|
onClick: (e) => {
|
|
364
|
-
e.stopPropagation(), i(
|
|
373
|
+
e.stopPropagation(), i(S);
|
|
365
374
|
}
|
|
375
|
+
}),
|
|
376
|
+
D && /* @__PURE__ */ J("span", {
|
|
377
|
+
id: O,
|
|
378
|
+
role: "status",
|
|
379
|
+
"aria-live": "polite",
|
|
380
|
+
className: "sr-only",
|
|
381
|
+
children: A
|
|
366
382
|
})
|
|
367
383
|
] });
|
|
368
384
|
return /* @__PURE__ */ J("div", {
|
|
369
|
-
className: f("inline-flex",
|
|
370
|
-
children:
|
|
385
|
+
className: f("inline-flex", u),
|
|
386
|
+
children: N ? /* @__PURE__ */ J("div", {
|
|
371
387
|
role: "button",
|
|
372
388
|
tabIndex: 0,
|
|
373
|
-
"aria-label":
|
|
374
|
-
onClick:
|
|
375
|
-
onKeyDown:
|
|
376
|
-
className: f(
|
|
377
|
-
children:
|
|
389
|
+
"aria-label": d,
|
|
390
|
+
onClick: I,
|
|
391
|
+
onKeyDown: R,
|
|
392
|
+
className: f(z, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
|
|
393
|
+
children: H
|
|
378
394
|
}) : /* @__PURE__ */ J("div", {
|
|
379
|
-
className:
|
|
380
|
-
title:
|
|
381
|
-
|
|
395
|
+
className: z,
|
|
396
|
+
title: A || void 0,
|
|
397
|
+
role: D ? "group" : void 0,
|
|
398
|
+
"aria-describedby": D ? O : void 0,
|
|
399
|
+
tabIndex: D ? 0 : void 0,
|
|
400
|
+
children: H
|
|
382
401
|
})
|
|
383
402
|
});
|
|
384
|
-
}, Je = { tile: "
|
|
403
|
+
}, Je = { tile: "_tile_1s4d7_1" }, Ye = ({ count: e, onClick: t, ariaLabel: n, children: r, fontClassName: i = "dial-small-semi-text", className: a }) => /* @__PURE__ */ J("button", {
|
|
385
404
|
type: "button",
|
|
386
405
|
onClick: t,
|
|
387
406
|
"aria-label": n ?? `Show ${e} more attachments`,
|
|
388
|
-
className: f("
|
|
407
|
+
className: f("flex size-[84px] items-center justify-center rounded-xl border", i, Je.tile, a),
|
|
389
408
|
children: r ?? /* @__PURE__ */ J("bdi", {
|
|
390
409
|
dir: "ltr",
|
|
391
410
|
children: `+${e}`
|
|
392
411
|
})
|
|
393
412
|
}), Q = {
|
|
394
|
-
container: "
|
|
395
|
-
headerIcon: "
|
|
396
|
-
headerLabel: "
|
|
397
|
-
downloadAllButton: "
|
|
398
|
-
imageTile: "
|
|
399
|
-
}, Xe = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Ze = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, getSizeLabel: a,
|
|
400
|
-
let
|
|
413
|
+
container: "_container_7fktb_1",
|
|
414
|
+
headerIcon: "_headerIcon_7fktb_6",
|
|
415
|
+
headerLabel: "_headerLabel_7fktb_7",
|
|
416
|
+
downloadAllButton: "_downloadAllButton_7fktb_8",
|
|
417
|
+
imageTile: "_imageTile_7fktb_12"
|
|
418
|
+
}, Xe = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Ze = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, getSizeLabel: a, labels: o, typeLabels: s, styles: c, theme: u, className: d }) => {
|
|
419
|
+
let { ariaLabel: p = "Attachments", clickLabel: g = "Download attachment", retryLabel: _ = "Retry upload", showLessLabel: v = "Show less", downloadAllLabel: y = "Download all", getHeaderLabel: b = (e) => Xe(e, "attachment") } = o ?? {}, { headerLabelClassName: x = "dial-tiny-semi-text" } = c ?? {}, [S, C] = K(!1), w = Ne(() => We(e.length, S), [e.length, S]);
|
|
401
420
|
if (e.length === 0) return null;
|
|
402
|
-
let
|
|
421
|
+
let T = e.some((e) => e.type === t.Image), E = e.some((e) => e.type !== t.Image), D = T && E, O = e.length >= 5, k = D ? ve : T ? be : R, A = b(e.length), j = e.slice(0, w.visibleCount);
|
|
403
422
|
return /* @__PURE__ */ Y("div", {
|
|
404
423
|
role: "group",
|
|
405
|
-
"aria-label":
|
|
406
|
-
className: f("rounded-2xl border p-3",
|
|
424
|
+
"aria-label": p,
|
|
425
|
+
className: f("rounded-2xl border p-3", O ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Q.container, d),
|
|
407
426
|
children: [/* @__PURE__ */ Y("div", {
|
|
408
427
|
className: "mb-3 flex min-h-6 items-center gap-2",
|
|
409
428
|
children: [
|
|
410
|
-
/* @__PURE__ */ J(
|
|
429
|
+
/* @__PURE__ */ J(k, {
|
|
411
430
|
size: m.SM,
|
|
412
431
|
className: f("shrink-0", Q.headerIcon),
|
|
413
432
|
"aria-hidden": !0
|
|
414
433
|
}),
|
|
415
434
|
/* @__PURE__ */ J("span", {
|
|
416
|
-
className: f(
|
|
417
|
-
children:
|
|
435
|
+
className: f(x, Q.headerLabel),
|
|
436
|
+
children: A
|
|
418
437
|
}),
|
|
419
438
|
e.length >= 2 && (r || n) && /* @__PURE__ */ J(h, {
|
|
420
439
|
icon: /* @__PURE__ */ J(L, {
|
|
@@ -422,7 +441,7 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
422
441
|
"aria-hidden": !0
|
|
423
442
|
}),
|
|
424
443
|
className: f("ms-auto h-6 w-6 rounded-lg", Q.downloadAllButton),
|
|
425
|
-
"aria-label":
|
|
444
|
+
"aria-label": y,
|
|
426
445
|
onClick: () => {
|
|
427
446
|
let t = e.filter((e) => e.status === l.Idle);
|
|
428
447
|
r ? r(t) : t.forEach((e) => n?.(e));
|
|
@@ -431,43 +450,49 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
431
450
|
]
|
|
432
451
|
}), /* @__PURE__ */ Y("div", {
|
|
433
452
|
role: "list",
|
|
434
|
-
"aria-label":
|
|
435
|
-
className: f("gap-3",
|
|
453
|
+
"aria-label": A,
|
|
454
|
+
className: f("gap-3", O ? "grid grid-cols-[repeat(5,84px)] overflow-x-auto" : "flex flex-wrap"),
|
|
436
455
|
children: [
|
|
437
|
-
|
|
456
|
+
j.map((e) => /* @__PURE__ */ J("div", {
|
|
438
457
|
role: "listitem",
|
|
439
|
-
children: e.type === t.Image ? /* @__PURE__ */ J(
|
|
458
|
+
children: e.type === t.Image ? /* @__PURE__ */ J(Ge, {
|
|
440
459
|
attachment: e,
|
|
441
460
|
onClick: n ? () => n(e) : void 0,
|
|
442
461
|
onRetry: i,
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
462
|
+
labels: {
|
|
463
|
+
clickLabel: g,
|
|
464
|
+
retryLabel: _
|
|
465
|
+
},
|
|
466
|
+
typeLabels: s,
|
|
467
|
+
styles: { roundedClassName: "rounded-xl" },
|
|
446
468
|
showHoverDownloadIcon: !0,
|
|
447
469
|
className: f("size-[84px]", Q.imageTile)
|
|
448
470
|
}) : /* @__PURE__ */ J(qe, {
|
|
449
471
|
attachment: e,
|
|
450
|
-
sizeLabel: a?.(e),
|
|
451
472
|
onClick: n,
|
|
452
473
|
onRetry: i,
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
474
|
+
labels: {
|
|
475
|
+
clickLabel: g,
|
|
476
|
+
retryLabel: _,
|
|
477
|
+
sizeLabel: a?.(e)
|
|
478
|
+
},
|
|
479
|
+
typeLabels: s,
|
|
480
|
+
theme: u
|
|
456
481
|
})
|
|
457
482
|
}, e.id)),
|
|
458
|
-
|
|
483
|
+
w.layout === Le.Collapsed && /* @__PURE__ */ J("div", {
|
|
459
484
|
role: "listitem",
|
|
460
485
|
children: /* @__PURE__ */ J(Ye, {
|
|
461
|
-
count:
|
|
462
|
-
onClick: () =>
|
|
486
|
+
count: w.hiddenCount,
|
|
487
|
+
onClick: () => C(!0)
|
|
463
488
|
})
|
|
464
489
|
}),
|
|
465
|
-
|
|
490
|
+
O && S && /* @__PURE__ */ J("div", {
|
|
466
491
|
role: "listitem",
|
|
467
492
|
children: /* @__PURE__ */ J(Ye, {
|
|
468
493
|
count: 0,
|
|
469
|
-
onClick: () =>
|
|
470
|
-
ariaLabel:
|
|
494
|
+
onClick: () => C(!1),
|
|
495
|
+
ariaLabel: v,
|
|
471
496
|
children: /* @__PURE__ */ J(P, {
|
|
472
497
|
size: m.MD,
|
|
473
498
|
"aria-hidden": !0
|
|
@@ -526,7 +551,7 @@ var $e = (e) => /* @__PURE__ */ J(b, { ...e }), et = ({ features: e, initialResp
|
|
|
526
551
|
a
|
|
527
552
|
])
|
|
528
553
|
};
|
|
529
|
-
}, tt = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: i, onSystemPromptChange: a, onTemperatureChange: o, responseFormatLabel: s = "Response format", responseFormatHint: c = "Applies to new and existing messages", responseFormatMarkdownLabel: l = "Markdown", responseFormatPlainTextLabel: d = "Plain text", systemPromptLabel: f = "System prompt", systemPromptTooltip: p = "Enter a prompt", temperatureLabel: m = "Temperature", temperatureLabels: h = [
|
|
554
|
+
}, tt = "!text-[14px] !leading-[20px] font-semibold !text-primary gap-1", nt = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: i, onSystemPromptChange: a, onTemperatureChange: o, responseFormatLabel: s = "Response format", responseFormatHint: c = "Applies to new and existing messages", responseFormatMarkdownLabel: l = "Markdown", responseFormatPlainTextLabel: d = "Plain text", systemPromptLabel: f = "System prompt", systemPromptTooltip: p = "Enter a prompt", temperatureLabel: m = "Temperature", temperatureLabels: h = [
|
|
530
555
|
"Precise",
|
|
531
556
|
"Neutral",
|
|
532
557
|
"Creative"
|
|
@@ -535,6 +560,7 @@ var $e = (e) => /* @__PURE__ */ J(b, { ...e }), et = ({ features: e, initialResp
|
|
|
535
560
|
children: [
|
|
536
561
|
e.responseFormat && /* @__PURE__ */ J(x, {
|
|
537
562
|
fieldTitle: s,
|
|
563
|
+
labelClassName: tt,
|
|
538
564
|
elementId: "response-format",
|
|
539
565
|
orientation: j.Column,
|
|
540
566
|
activeRadioButton: t ?? u.Markdown,
|
|
@@ -551,12 +577,16 @@ var $e = (e) => /* @__PURE__ */ J(b, { ...e }), et = ({ features: e, initialResp
|
|
|
551
577
|
e.systemPrompt && /* @__PURE__ */ J(g, {
|
|
552
578
|
value: n,
|
|
553
579
|
placeholder: p,
|
|
554
|
-
labelProps: {
|
|
580
|
+
labelProps: {
|
|
581
|
+
className: tt,
|
|
582
|
+
label: f
|
|
583
|
+
},
|
|
555
584
|
onChange: (e) => a(e ?? "")
|
|
556
585
|
}),
|
|
557
586
|
e.temperature && /* @__PURE__ */ J(T, {
|
|
558
587
|
labelProps: {
|
|
559
588
|
label: m,
|
|
589
|
+
className: tt,
|
|
560
590
|
caption: _
|
|
561
591
|
},
|
|
562
592
|
value: r,
|
|
@@ -595,7 +625,7 @@ ke(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
|
|
|
595
625
|
})
|
|
596
626
|
})
|
|
597
627
|
}),
|
|
598
|
-
children: /* @__PURE__ */ J(
|
|
628
|
+
children: /* @__PURE__ */ J(nt, {
|
|
599
629
|
features: e,
|
|
600
630
|
responseFormat: v,
|
|
601
631
|
systemPrompt: b,
|
|
@@ -617,11 +647,11 @@ ke(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
|
|
|
617
647
|
});
|
|
618
648
|
//#endregion
|
|
619
649
|
//#region src/components/MessageActions/MessageActions.tsx
|
|
620
|
-
var
|
|
650
|
+
var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r, onRegenerate: i, onCopy: a, onCopyMarkdown: o, onLike: l, onDislike: u, activeRating: d, isAlwaysVisible: p, className: g, labels: _ }) => {
|
|
621
651
|
let { tooltips: v, ariaLabels: y } = _ ?? {}, [b, x] = K(null), [S, C] = K(""), w = Ae(() => {
|
|
622
|
-
a?.(), x("copy"), C(y?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => x(null),
|
|
652
|
+
a?.(), x("copy"), C(y?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => x(null), rt);
|
|
623
653
|
}, [a, y?.copiedStatus]), T = Ae(() => {
|
|
624
|
-
o?.(), x("markdown"), C(y?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => x(null),
|
|
654
|
+
o?.(), x("markdown"), C(y?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => x(null), rt);
|
|
625
655
|
}, [o, y?.copiedMarkdownStatus]);
|
|
626
656
|
return /* @__PURE__ */ Y("div", {
|
|
627
657
|
role: "toolbar",
|
|
@@ -716,7 +746,7 @@ var nt = 2e3, rt = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
716
746
|
collapsedText: "_collapsedText_1exhl_15",
|
|
717
747
|
startersDivider: "_startersDivider_1exhl_26",
|
|
718
748
|
text: "_text_1exhl_30"
|
|
719
|
-
},
|
|
749
|
+
}, at = ({ text: e, styles: n, actions: i, hasAlwaysVisibleActions: o, isStreaming: s, attachments: l, afterContent: u, starters: p, onSelectStarter: m, deploymentIconUrl: h, deploymentDisplayName: g, markdownComponents: _, onAttachmentClick: v, onDownloadAll: y, onAttachmentRetry: b, getAttachmentSizeLabel: x, attachmentTheme: C, codeBlockTheme: w, labels: T }) => {
|
|
720
750
|
let { colors: E, typography: D, className: O, bubbleClassName: k } = n ?? {}, { attachmentClickLabel: A, attachmentRetryLabel: j, startersAriaLabel: M = "Quick reply buttons", thinkingLabel: N, codeBlockCopyLabel: P, codeBlockCopiedLabel: F, assistantMessageAriaLabel: I = "Assistant message", deploymentIconFallbackLabel: L = "AI" } = T ?? {}, R = s ? (l ?? []).filter((e) => e.type !== t.Audio) : l ?? [], z = d({
|
|
721
751
|
"--cm-bubble-text": E?.text,
|
|
722
752
|
"--cm-starters-divider": E?.startersDivider
|
|
@@ -755,13 +785,15 @@ var nt = 2e3, rt = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
755
785
|
onAttachmentClick: v,
|
|
756
786
|
onDownloadAll: y,
|
|
757
787
|
onRetry: b,
|
|
758
|
-
|
|
759
|
-
|
|
788
|
+
labels: {
|
|
789
|
+
clickLabel: A,
|
|
790
|
+
retryLabel: j
|
|
791
|
+
},
|
|
760
792
|
getSizeLabel: x,
|
|
761
793
|
theme: C
|
|
762
794
|
}),
|
|
763
795
|
u,
|
|
764
|
-
/* @__PURE__ */ J(
|
|
796
|
+
/* @__PURE__ */ J(it, {
|
|
765
797
|
...i,
|
|
766
798
|
isAlwaysVisible: o,
|
|
767
799
|
role: c.Assistant
|
|
@@ -783,7 +815,7 @@ var nt = 2e3, rt = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
783
815
|
})]
|
|
784
816
|
})]
|
|
785
817
|
});
|
|
786
|
-
},
|
|
818
|
+
}, ot = ({ titleText: e = "Model switched.", bodyText: t }) => /* @__PURE__ */ J("div", {
|
|
787
819
|
role: "status",
|
|
788
820
|
"aria-live": "polite",
|
|
789
821
|
children: /* @__PURE__ */ J(v, {
|
|
@@ -791,9 +823,9 @@ var nt = 2e3, rt = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
791
823
|
message: t,
|
|
792
824
|
textClassName: "flex-row flex-wrap gap-1"
|
|
793
825
|
})
|
|
794
|
-
}),
|
|
826
|
+
}), st = /* @__PURE__ */ function(e) {
|
|
795
827
|
return e.Bottom = "Bottom", e.Top = "Top", e;
|
|
796
|
-
}({}),
|
|
828
|
+
}({}), ct = 10, lt = ({ text: e, position: t = st.Bottom, styles: n, actions: r, hasAlwaysVisibleActions: i, attachments: a, collapsedLineCount: o = ct, labels: s, onAttachmentClick: l, onDownloadAll: u, onAttachmentRetry: h, getAttachmentSizeLabel: g, attachmentTheme: v }) => {
|
|
797
829
|
let { colors: y, typography: b, className: x, bubbleClassName: S } = n ?? {}, { showMoreLabel: C = "Show more", showLessLabel: w = "Show less", showMoreAriaLabel: T, showLessAriaLabel: E, attachmentClickLabel: D, attachmentRetryLabel: O, userMessageAriaLabel: A = "User message" } = s ?? {}, { textRef: j, isTextCollapsed: M, isOverflowing: F, collapsedMaxHeight: I, expandedMaxHeight: L, isCollapsed: R, toggleCollapsed: z } = p({
|
|
798
830
|
text: e,
|
|
799
831
|
collapsedLineCount: o
|
|
@@ -804,7 +836,7 @@ var nt = 2e3, rt = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
804
836
|
"--cm-bubble-text": y?.text,
|
|
805
837
|
"--cm-bubble-collapsed-height": F ? `${I}px` : void 0,
|
|
806
838
|
"--cm-bubble-expanded-height": F ? `${L}px` : void 0
|
|
807
|
-
}), V = t ===
|
|
839
|
+
}), V = t === st.Top ? "rounded-ee-[6px] rounded-se-[16px]" : "rounded-se-[6px] rounded-ee-[16px]", H = f($.text, b?.fontClassName), U = T ?? C, ee = E ?? w, te = R ? C : w, ne = R ? U : ee, W = R ? N : P, G = Me();
|
|
808
840
|
return /* @__PURE__ */ J("div", {
|
|
809
841
|
role: "group",
|
|
810
842
|
"aria-label": A,
|
|
@@ -818,8 +850,10 @@ var nt = 2e3, rt = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
818
850
|
onAttachmentClick: l,
|
|
819
851
|
onDownloadAll: u,
|
|
820
852
|
onRetry: h,
|
|
821
|
-
|
|
822
|
-
|
|
853
|
+
labels: {
|
|
854
|
+
clickLabel: D,
|
|
855
|
+
retryLabel: O
|
|
856
|
+
},
|
|
823
857
|
getSizeLabel: g,
|
|
824
858
|
theme: v,
|
|
825
859
|
className: "max-w-[640px]"
|
|
@@ -833,7 +867,7 @@ var nt = 2e3, rt = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
833
867
|
className: f("relative overflow-hidden", F && $.collapsibleText, F && !R && $.expandedText, M && $.collapsedText),
|
|
834
868
|
children: /* @__PURE__ */ J("p", {
|
|
835
869
|
ref: j,
|
|
836
|
-
className: f(
|
|
870
|
+
className: f(H, "whitespace-pre-wrap text-start [overflow-wrap:anywhere]"),
|
|
837
871
|
children: e
|
|
838
872
|
})
|
|
839
873
|
}), F && /* @__PURE__ */ J(_, {
|
|
@@ -851,7 +885,7 @@ var nt = 2e3, rt = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
851
885
|
})]
|
|
852
886
|
})
|
|
853
887
|
}),
|
|
854
|
-
/* @__PURE__ */ J(
|
|
888
|
+
/* @__PURE__ */ J(it, {
|
|
855
889
|
...r,
|
|
856
890
|
isAlwaysVisible: i,
|
|
857
891
|
role: c.User
|
|
@@ -859,17 +893,17 @@ var nt = 2e3, rt = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
859
893
|
]
|
|
860
894
|
})
|
|
861
895
|
});
|
|
862
|
-
},
|
|
896
|
+
}, ut = ({ role: e, onAttachmentClick: t, markdownComponents: n, ...r }) => e === c.Status ? /* @__PURE__ */ J(ot, {
|
|
863
897
|
titleText: r.labels?.statusTitleText,
|
|
864
898
|
bodyText: r.labels?.statusBodyText ?? ""
|
|
865
|
-
}) : e === c.User ? /* @__PURE__ */ J(
|
|
899
|
+
}) : e === c.User ? /* @__PURE__ */ J(lt, {
|
|
866
900
|
...r,
|
|
867
901
|
onAttachmentClick: t
|
|
868
|
-
}) : /* @__PURE__ */ J(
|
|
902
|
+
}) : /* @__PURE__ */ J(at, {
|
|
869
903
|
...r,
|
|
870
904
|
markdownComponents: n,
|
|
871
905
|
onAttachmentClick: t
|
|
872
|
-
}),
|
|
906
|
+
}), dt = { button: "_button_15boc_1" }, ft = ({ label: e, onClick: t, styles: n }) => {
|
|
873
907
|
let { colors: r, typography: i, className: a } = n ?? {};
|
|
874
908
|
return /* @__PURE__ */ J("button", {
|
|
875
909
|
type: "button",
|
|
@@ -881,9 +915,9 @@ var nt = 2e3, rt = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
881
915
|
"--cm-source-bg-hover": r?.backgroundHover,
|
|
882
916
|
"--cm-source-border-hover": r?.borderHover
|
|
883
917
|
}),
|
|
884
|
-
className: f(
|
|
918
|
+
className: f(dt.button, "relative flex h-6 items-center justify-center px-2", "border border-solid", "outline-none focus-visible:outline focus-visible:outline-1", "focus-visible:outline-offset-[3px]", "cursor-pointer whitespace-nowrap", i?.fontClassName, a),
|
|
885
919
|
children: e
|
|
886
920
|
});
|
|
887
921
|
};
|
|
888
922
|
//#endregion
|
|
889
|
-
export {
|
|
923
|
+
export { at as AssistantMessageBubble, st as BubblePosition, it as MessageActions, ut as MessageBubble, ft as MessageSource, ot as StatusMessageBubble, lt as UserMessageBubble };
|
|
@@ -111,7 +111,7 @@ interface BaseMessageBubbleProps {
|
|
|
111
111
|
/**
|
|
112
112
|
* Surface color theme for non-previewable attachment tiles, matching the
|
|
113
113
|
* markdown code block's own light/dark surface (never plain white).
|
|
114
|
-
* Forwarded to `AttachmentGroup
|
|
114
|
+
* Forwarded to `AttachmentGroup`, which defaults to `'dark'` when omitted.
|
|
115
115
|
*/
|
|
116
116
|
attachmentTheme?: CodeBlockTheme;
|
|
117
117
|
}
|
|
@@ -146,7 +146,7 @@ export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
|
|
|
146
146
|
deploymentIconUrl?: string;
|
|
147
147
|
/** Human-readable deployment name shown as the icon's accessible label. */
|
|
148
148
|
deploymentDisplayName?: string;
|
|
149
|
-
/** Syntax highlight color theme for code blocks. Forwarded to `MDMessageViewer
|
|
149
|
+
/** Syntax highlight color theme for code blocks. Forwarded to `MDMessageViewer`, which defaults to `'dark'` when omitted. */
|
|
150
150
|
codeBlockTheme?: CodeBlockTheme;
|
|
151
151
|
/** Localised labels for quick replies, the thinking indicator, and code block copy actions. */
|
|
152
152
|
labels?: AssistantMessageBubbleLabels;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-bubble.d.ts","sourceRoot":"","sources":["../../src/models/message-bubble.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,M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EAAE,CAAC;IAC3B,qFAAqF;IACrF,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IACnD,2FAA2F;IAC3F,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2EAA2E;IAC3E,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6HAA6H;IAC7H,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,+FAA+F;IAC/F,MAAM,CAAC,EAAE,4BAA4B,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,GAC1D,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,oBAAoB,CAAC,GAAG;IAChE,0FAA0F;IAC1F,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC"}
|
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.0.0-dev.
|
|
4
|
+
"version": "1.0.0-dev.489",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"react": "^19.0.0",
|
|
21
21
|
"@tabler/icons-react": "^3.0.0",
|
|
22
22
|
"@epam/ai-dial-ui-kit": "0.12.0-dev.28",
|
|
23
|
-
"@epam/ai-dial-chat-shared": "1.0.0-dev.
|
|
24
|
-
"@epam/ai-dial-conversation-input": "1.0.0-dev.
|
|
23
|
+
"@epam/ai-dial-chat-shared": "1.0.0-dev.489",
|
|
24
|
+
"@epam/ai-dial-conversation-input": "1.0.0-dev.489",
|
|
25
25
|
"react-markdown": "^10.1.0"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** Controls which corners of the message bubble are rounded, allowing adjacent bubbles to visually group together. */
|
|
2
2
|
export declare enum BubblePosition {
|
|
3
|
-
/** First bubble in a group — rounds the
|
|
3
|
+
/** First bubble in a group — rounds the bottom-right corner. */
|
|
4
4
|
Bottom = "Bottom",
|
|
5
|
-
/** Subsequent bubble in a group — rounds the
|
|
5
|
+
/** Subsequent bubble in a group — rounds the top-right corner. */
|
|
6
6
|
Top = "Top"
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=bubble-position.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble-position.d.ts","sourceRoot":"","sources":["../../src/types/bubble-position.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,oBAAY,cAAc;IACxB,
|
|
1
|
+
{"version":3,"file":"bubble-position.d.ts","sourceRoot":"","sources":["../../src/types/bubble-position.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,oBAAY,cAAc;IACxB,gEAAgE;IAChE,MAAM,WAAW;IACjB,kEAAkE;IAClE,GAAG,QAAQ;CACZ"}
|