@epam/ai-dial-conversation-stages 1.3.0-dev.16 → 1.3.0-dev.161
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/CollapsedGroup/CollapsedGroup.d.ts.map +1 -1
- package/components/StageItem/StageItem.d.ts +5 -1
- package/components/StageItem/StageItem.d.ts.map +1 -1
- package/components/StageList/StageList.d.ts +4 -0
- package/components/StageList/StageList.d.ts.map +1 -1
- package/components/StageMarkdownContent/StageMarkdownContent.d.ts +3 -1
- package/components/StageMarkdownContent/StageMarkdownContent.d.ts.map +1 -1
- package/components/StagesPanel/StagesPanel.d.ts.map +1 -1
- package/index.css +2 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +480 -430
- package/models/collapsed-group.d.ts +6 -2
- package/models/collapsed-group.d.ts.map +1 -1
- package/models/stages-props.d.ts +8 -1
- package/models/stages-props.d.ts.map +1 -1
- package/package.json +4 -4
- package/utils/stage-attachments.d.ts +4 -2
- package/utils/stage-attachments.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { AttachmentErrorReason as e, AttachmentType as t, MIME_TYPE_EXT_MAP as n, MarkdownCodeBlock as r, MarkdownRenderer as i, RequestStatus as a, StageStatus as o, buildCssVars as s, mergeClasses as c, messageAttachmentsToDisplayAttachments as l, normalizeMimeType as u } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import { Accordion as d, DIAL_ICON_SIZE as f, DIAL_KIT_ICON_STROKE as p,
|
|
3
|
-
import { IconAlertCircle as
|
|
4
|
-
import { memo as me, useCallback as
|
|
5
|
-
import { Fragment as _e, jsx as
|
|
2
|
+
import { Accordion as d, DIAL_ICON_SIZE as f, DIAL_KIT_ICON_STROKE as p, DialItemType as m, ElementSize as h, EllipsisTooltip as g, FileIcon as _, Highlight as v, Skeleton as y, SkeletonVariant as b, Spinner as x, StaticIconButton as S } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { IconAlertCircle as C, IconCheck as w, IconClipboard as T, IconDownload as E, IconExternalLink as D, IconFile as O, IconFileTypeBmp as k, IconFileTypeCss as A, IconFileTypeCsv as j, IconFileTypeDoc as M, IconFileTypeDocx as N, IconFileTypeHtml as P, IconFileTypeJpg as F, IconFileTypeJs as I, IconFileTypeJsx as L, IconFileTypePdf as R, IconFileTypePhp as z, IconFileTypePng as B, IconFileTypePpt as V, IconFileTypeRs as ee, IconFileTypeSql as te, IconFileTypeSvg as ne, IconFileTypeTs as re, IconFileTypeTsx as ie, IconFileTypeTxt as ae, IconFileTypeVue as H, IconFileTypeXls as oe, IconFileTypeXml as se, IconFileTypeZip as ce, IconMusic as le, IconPhoto as U, IconReload as ue, IconTerminal2 as de, IconVideo as fe, IconX as pe } from "@tabler/icons-react";
|
|
4
|
+
import { memo as me, useCallback as W, useEffect as G, useId as he, useMemo as K, useRef as ge, useState as q } from "react";
|
|
5
|
+
import { Fragment as _e, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
6
6
|
//#region src/constants/public-class-names.ts
|
|
7
|
-
var
|
|
7
|
+
var ve = {
|
|
8
8
|
panel: "dial-conversation-stages-panel",
|
|
9
9
|
group: "dial-conversation-stages-group",
|
|
10
10
|
groupToggle: "dial-conversation-stages-group-toggle"
|
|
11
|
-
},
|
|
12
|
-
let [e, t] =
|
|
11
|
+
}, ye = () => {
|
|
12
|
+
let [e, t] = q(() => /* @__PURE__ */ new Set()), n = W((e, n) => {
|
|
13
13
|
t((t) => {
|
|
14
14
|
if (t.has(e) === n) return t;
|
|
15
15
|
let r = new Set(t);
|
|
16
16
|
return n ? r.add(e) : r.delete(e), r;
|
|
17
17
|
});
|
|
18
|
-
}, []), r =
|
|
18
|
+
}, []), r = W(() => {
|
|
19
19
|
t((e) => e.size ? /* @__PURE__ */ new Set() : e);
|
|
20
20
|
}, []);
|
|
21
|
-
return
|
|
21
|
+
return K(() => ({
|
|
22
22
|
isExpanded: (t) => e.has(t),
|
|
23
23
|
onToggle: n,
|
|
24
24
|
reset: r
|
|
@@ -27,30 +27,30 @@ var J = {
|
|
|
27
27
|
n,
|
|
28
28
|
r
|
|
29
29
|
]);
|
|
30
|
-
},
|
|
30
|
+
}, be = /[([][^()[\]]*[)\]]/g, xe = /(\d+(?:\.\d+)?)\s*s\b/, Se = (e) => {
|
|
31
31
|
let t = e.trimEnd();
|
|
32
32
|
return t.endsWith(":") ? t.slice(0, -1) : t;
|
|
33
|
-
},
|
|
34
|
-
|
|
33
|
+
}, Ce = (e) => {
|
|
34
|
+
be.lastIndex = 0;
|
|
35
35
|
let t;
|
|
36
|
-
for (; t =
|
|
37
|
-
let e = t[0].slice(1, -1), n =
|
|
36
|
+
for (; t = be.exec(e);) {
|
|
37
|
+
let e = t[0].slice(1, -1), n = xe.exec(e);
|
|
38
38
|
if (n) return {
|
|
39
39
|
durationLabel: `${n[1]}s`,
|
|
40
40
|
groupIndex: t.index,
|
|
41
41
|
groupLength: t[0].length
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
},
|
|
45
|
-
let t = e ?? "", n =
|
|
44
|
+
}, we = (e) => {
|
|
45
|
+
let t = e ?? "", n = Ce(t);
|
|
46
46
|
return {
|
|
47
|
-
name:
|
|
47
|
+
name: Se(n ? t.slice(0, n.groupIndex) + t.slice(n.groupIndex + n.groupLength) : t).trim().replace(/ {2,}/g, " "),
|
|
48
48
|
durationLabel: n?.durationLabel
|
|
49
49
|
};
|
|
50
|
-
},
|
|
50
|
+
}, Te = (e) => e.length > 0 && !/\s/.test(e) && e.includes("_"), Ee = (e) => [...e].reverse().find((e) => e.status == null), De = (e, t) => {
|
|
51
51
|
let n = e.parent_stage_index;
|
|
52
52
|
if (!(n == null || !Number.isInteger(n) || n < 0 || n >= e.index)) return t.get(n);
|
|
53
|
-
},
|
|
53
|
+
}, Oe = (e) => {
|
|
54
54
|
let t = e.map((e) => ({
|
|
55
55
|
stage: e,
|
|
56
56
|
children: []
|
|
@@ -58,15 +58,15 @@ var J = {
|
|
|
58
58
|
for (let e of t) n.has(e.stage.index) || n.set(e.stage.index, e);
|
|
59
59
|
let r = [];
|
|
60
60
|
for (let e of t) {
|
|
61
|
-
let t =
|
|
61
|
+
let t = De(e.stage, n);
|
|
62
62
|
t ? t.children.push(e) : r.push(e);
|
|
63
63
|
}
|
|
64
64
|
return r;
|
|
65
|
-
},
|
|
65
|
+
}, ke = (e) => `stage:${e}`, Ae = (e) => `group:${e}`, je = "min-w-0 overflow-visible py-0", Me = "min-w-0 justify-start gap-2 rounded-lg px-2 py-1.5 text-start mobile:min-h-11", Ne = (e) => {
|
|
66
66
|
let t = [], n = 0;
|
|
67
67
|
for (; n < e.length;) {
|
|
68
|
-
let r = e[n], i =
|
|
69
|
-
for (; a < e.length &&
|
|
68
|
+
let r = e[n], i = we(r.stage.name).name, a = n + 1;
|
|
69
|
+
for (; a < e.length && we(e[a].stage.name).name === i;) a += 1;
|
|
70
70
|
let o = e.slice(n, a);
|
|
71
71
|
o.length > 1 ? t.push({
|
|
72
72
|
key: r.stage.index,
|
|
@@ -98,44 +98,44 @@ var J = {
|
|
|
98
98
|
codeInline: "_codeInline_w65is_84",
|
|
99
99
|
blockquote: "_blockquote_w65is_91",
|
|
100
100
|
tableCell: "_tableCell_w65is_96"
|
|
101
|
-
},
|
|
101
|
+
}, Pe = ({ status: e, isLive: t, runningLabel: n = "Running", failedLabel: r = "Failed" }) => e === o.Failed ? /* @__PURE__ */ Y(_e, { children: [/* @__PURE__ */ J(C, {
|
|
102
102
|
size: f.MD,
|
|
103
103
|
className: X.iconError,
|
|
104
104
|
"aria-hidden": !0,
|
|
105
105
|
stroke: p
|
|
106
|
-
}), /* @__PURE__ */
|
|
106
|
+
}), /* @__PURE__ */ J("span", {
|
|
107
107
|
className: "sr-only",
|
|
108
108
|
children: r
|
|
109
|
-
})] }) : e === o.Completed ? /* @__PURE__ */
|
|
109
|
+
})] }) : e === o.Completed ? /* @__PURE__ */ J(w, {
|
|
110
110
|
size: f.SM,
|
|
111
111
|
className: X.iconCompleted,
|
|
112
112
|
"aria-hidden": !0,
|
|
113
113
|
stroke: p
|
|
114
|
-
}) : t ? /* @__PURE__ */
|
|
114
|
+
}) : t ? /* @__PURE__ */ J(x, {
|
|
115
115
|
size: 16,
|
|
116
116
|
ariaLabel: n
|
|
117
|
-
}) : null,
|
|
117
|
+
}) : null, Fe = (e) => {
|
|
118
118
|
if (e == null) return "";
|
|
119
119
|
let t = e.lastIndexOf(".");
|
|
120
120
|
return t > 0 ? e.slice(0, t) : e;
|
|
121
|
-
},
|
|
122
|
-
if (!e) return
|
|
121
|
+
}, Ie = (e) => {
|
|
122
|
+
if (!e) return O;
|
|
123
123
|
let t = u(e);
|
|
124
124
|
if (t.startsWith("image/")) switch (t) {
|
|
125
|
-
case "image/jpeg": return
|
|
126
|
-
case "image/png": return
|
|
125
|
+
case "image/jpeg": return F;
|
|
126
|
+
case "image/png": return B;
|
|
127
127
|
case "image/svg+xml": return ne;
|
|
128
|
-
case "image/bmp": return
|
|
129
|
-
default: return
|
|
128
|
+
case "image/bmp": return k;
|
|
129
|
+
default: return U;
|
|
130
130
|
}
|
|
131
131
|
if (t.startsWith("video/")) return fe;
|
|
132
132
|
if (t.startsWith("audio/")) return le;
|
|
133
133
|
switch (t) {
|
|
134
|
-
case "application/pdf": return
|
|
135
|
-
case "application/msword": return
|
|
136
|
-
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return
|
|
137
|
-
case "application/vnd.ms-powerpoint": return
|
|
138
|
-
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return
|
|
134
|
+
case "application/pdf": return R;
|
|
135
|
+
case "application/msword": return M;
|
|
136
|
+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return N;
|
|
137
|
+
case "application/vnd.ms-powerpoint": return V;
|
|
138
|
+
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return V;
|
|
139
139
|
case "application/vnd.ms-excel": return oe;
|
|
140
140
|
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return oe;
|
|
141
141
|
case "application/zip":
|
|
@@ -143,53 +143,57 @@ var J = {
|
|
|
143
143
|
case "application/x-7z-compressed":
|
|
144
144
|
case "application/gzip":
|
|
145
145
|
case "application/x-tar": return ce;
|
|
146
|
-
case "text/csv": return
|
|
147
|
-
case "text/plain": return
|
|
146
|
+
case "text/csv": return j;
|
|
147
|
+
case "text/plain": return ae;
|
|
148
148
|
case "text/html":
|
|
149
|
-
case "application/xhtml+xml": return
|
|
149
|
+
case "application/xhtml+xml": return P;
|
|
150
150
|
case "application/xml": return se;
|
|
151
151
|
case "application/sql": return te;
|
|
152
|
-
case "text/javascript": return
|
|
153
|
-
case "text/jsx": return
|
|
152
|
+
case "text/javascript": return I;
|
|
153
|
+
case "text/jsx": return L;
|
|
154
154
|
case "text/typescript": return re;
|
|
155
|
-
case "text/tsx": return
|
|
156
|
-
case "text/css": return
|
|
157
|
-
case "text/x-php": return
|
|
155
|
+
case "text/tsx": return ie;
|
|
156
|
+
case "text/css": return A;
|
|
157
|
+
case "text/x-php": return z;
|
|
158
158
|
case "text/x-rustsrc": return ee;
|
|
159
|
-
case "text/x-vue": return
|
|
160
|
-
default: return
|
|
159
|
+
case "text/x-vue": return H;
|
|
160
|
+
default: return O;
|
|
161
161
|
}
|
|
162
|
-
},
|
|
162
|
+
}, Le = (e) => {
|
|
163
163
|
let { type: n, contentType: r } = e;
|
|
164
|
-
return n === t.Prompt ? de : n === t.Pasted ?
|
|
165
|
-
},
|
|
164
|
+
return n === t.Prompt ? de : n === t.Pasted ? T : n === t.Image ? U : Ie(r ?? "");
|
|
165
|
+
}, Re = (e) => {
|
|
166
166
|
let t = u(e), r = n[t];
|
|
167
167
|
if (r) return r;
|
|
168
168
|
let i = t.split("/")[1];
|
|
169
169
|
if (i && !i.startsWith("vnd.") && !i.includes("+")) return i;
|
|
170
|
-
},
|
|
171
|
-
let {
|
|
170
|
+
}, ze = (e) => {
|
|
171
|
+
let { name: t, contentType: n } = e;
|
|
172
|
+
if (n) {
|
|
173
|
+
let e = Re(n);
|
|
174
|
+
if (e) return e;
|
|
175
|
+
}
|
|
176
|
+
if (t == null) return;
|
|
177
|
+
let r = t.lastIndexOf(".");
|
|
178
|
+
if (r > 0 && r < t.length - 1) return t.slice(r + 1).toLowerCase();
|
|
179
|
+
}, Be = (e) => e.type !== t.Prompt && e.type !== t.Pasted, Ve = (e, n) => {
|
|
180
|
+
let { type: r, name: i } = e;
|
|
172
181
|
if (r === t.Prompt) return n.promptLabel ?? "Prompt";
|
|
173
182
|
if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
|
|
174
183
|
if (r === t.Image) return n.imageLabel ?? "Image";
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
if (i == null) return "";
|
|
180
|
-
let o = i.lastIndexOf(".");
|
|
181
|
-
return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
|
|
182
|
-
}, Re = (e, n = {}) => {
|
|
184
|
+
let a = ze(e);
|
|
185
|
+
return a ? `.${a}` : i ?? "";
|
|
186
|
+
}, He = (e, n = {}) => {
|
|
183
187
|
let { type: r, status: i, previewUrl: o, url: s } = e, c = i === a.Loading, l = i === a.Error, u = r === t.Image && !!(o ?? s) && !l, d = r === t.Link && !l;
|
|
184
188
|
return {
|
|
185
189
|
isLoading: c,
|
|
186
190
|
isError: l,
|
|
187
191
|
isImage: u,
|
|
188
192
|
isLink: d,
|
|
189
|
-
BottomIcon: d ? null :
|
|
190
|
-
typeLabel: d ? null :
|
|
193
|
+
BottomIcon: d ? null : Le(e),
|
|
194
|
+
typeLabel: d ? null : Ve(e, n)
|
|
191
195
|
};
|
|
192
|
-
},
|
|
196
|
+
}, Ue = "flex size-[100px] items-center justify-center rounded-xl border", We = "outline-offset-1 focus-visible:outline-1", Z = {
|
|
193
197
|
tray: "dial-ai-attachment-tray",
|
|
194
198
|
trayItem: "dial-ai-attachment-tray-item",
|
|
195
199
|
tile: "dial-ai-attachment-tile",
|
|
@@ -198,156 +202,168 @@ var J = {
|
|
|
198
202
|
tileType: "dial-ai-attachment-tile-type",
|
|
199
203
|
tileAction: "dial-ai-attachment-tile-action"
|
|
200
204
|
}, Q = {
|
|
201
|
-
tile: "
|
|
202
|
-
hovered: "
|
|
203
|
-
selected: "
|
|
204
|
-
tileError: "
|
|
205
|
-
nameText: "
|
|
206
|
-
typeText: "
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
205
|
+
tile: "_tile_23kve_12",
|
|
206
|
+
hovered: "_hovered_23kve_18",
|
|
207
|
+
selected: "_selected_23kve_28",
|
|
208
|
+
tileError: "_tileError_23kve_33",
|
|
209
|
+
nameText: "_nameText_23kve_38",
|
|
210
|
+
typeText: "_typeText_23kve_42",
|
|
211
|
+
placeholderIcon: "_placeholderIcon_23kve_46",
|
|
212
|
+
retryIcon: "_retryIcon_23kve_50",
|
|
213
|
+
track: "_track_23kve_54",
|
|
214
|
+
actionButton: "_actionButton_23kve_65",
|
|
215
|
+
loading: "_loading_23kve_86",
|
|
216
|
+
imageActionButton: "_imageActionButton_23kve_87",
|
|
217
|
+
proxyFocus: "_proxyFocus_23kve_96"
|
|
218
|
+
}, Ge = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o, isAlwaysVisible: s }) => /* @__PURE__ */ J(S, {
|
|
212
219
|
icon: a,
|
|
213
|
-
size:
|
|
214
|
-
className: c("opacity-0
|
|
220
|
+
size: h.Small,
|
|
221
|
+
className: c(s ? "opacity-100" : "opacity-0 group-hover/attachment-tile:opacity-100 group-focus-visible/attachment-tile:opacity-100 group-has-[:focus-visible]/attachment-tile:opacity-100", Q.actionButton, o, Z.tileAction),
|
|
215
222
|
"aria-label": e,
|
|
216
223
|
"aria-describedby": t ? n : void 0,
|
|
217
224
|
onClick: (e) => {
|
|
218
225
|
e.stopPropagation(), r(i);
|
|
219
226
|
}
|
|
220
|
-
}),
|
|
221
|
-
icon: /* @__PURE__ */
|
|
227
|
+
}), Ke = ({ ...e }) => /* @__PURE__ */ J(Ge, {
|
|
228
|
+
icon: /* @__PURE__ */ J(ue, {
|
|
222
229
|
size: f.SM,
|
|
223
230
|
"aria-hidden": !0,
|
|
224
231
|
stroke: p
|
|
225
232
|
}),
|
|
226
233
|
className: Q.retryIcon,
|
|
227
234
|
...e
|
|
228
|
-
}),
|
|
229
|
-
icon: /* @__PURE__ */
|
|
235
|
+
}), qe = ({ ...e }) => /* @__PURE__ */ J(Ge, {
|
|
236
|
+
icon: /* @__PURE__ */ J(E, {
|
|
230
237
|
size: f.SM,
|
|
231
238
|
"aria-hidden": !0,
|
|
232
239
|
stroke: p
|
|
233
240
|
}),
|
|
234
241
|
...e
|
|
235
|
-
}),
|
|
236
|
-
icon: /* @__PURE__ */
|
|
242
|
+
}), Je = ({ ...e }) => /* @__PURE__ */ J(Ge, {
|
|
243
|
+
icon: /* @__PURE__ */ J(D, {
|
|
237
244
|
size: f.SM,
|
|
238
245
|
"aria-hidden": !0,
|
|
239
246
|
stroke: p
|
|
240
247
|
}),
|
|
241
248
|
...e
|
|
242
|
-
}),
|
|
243
|
-
icon: /* @__PURE__ */
|
|
249
|
+
}), Ye = ({ className: e, ...t }) => /* @__PURE__ */ J(Ge, {
|
|
250
|
+
icon: /* @__PURE__ */ J(pe, {
|
|
244
251
|
size: f.SM,
|
|
245
252
|
"aria-hidden": !0,
|
|
246
253
|
stroke: p
|
|
247
254
|
}),
|
|
248
|
-
|
|
249
|
-
|
|
255
|
+
className: c("mobile:opacity-100", e),
|
|
256
|
+
...t
|
|
257
|
+
}), Xe = {
|
|
250
258
|
[e.Network]: "Upload failed · network error",
|
|
251
259
|
[e.UnsupportedType]: "Upload failed · unsupported file type",
|
|
252
260
|
[e.FileTooLarge]: "Upload failed · file too large"
|
|
253
|
-
},
|
|
254
|
-
let { clickLabel:
|
|
255
|
-
|
|
256
|
-
},
|
|
257
|
-
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
258
|
-
},
|
|
261
|
+
}, Ze = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: i, labels: o, styles: s, onDownload: l, isLink: u, cssVars: d, onExpand: h, isExpandable: g, onRemove: y, isSelected: b }) => {
|
|
262
|
+
let { clickLabel: S = "Download attachment", expandLabel: C = "Expand pasted text", downloadLabel: w = "Download attachment", retryLabel: T = "Retry upload", removeLabel: E = "Remove attachment", openInNewTabLabel: D = "Open in new tab", sizeLabel: O, uploadingLabel: k = "Uploading", errorReasonLabels: A, genericErrorLabel: j = "Upload failed" } = o ?? {}, { typography: M, className: N } = s ?? {}, { id: P, name: F, status: I, errorReason: L } = t, R = I === a.Loading, z = I === a.Error, B = he(), V = z ? L && (A?.[L] ?? Xe[L]) || j : "", { BottomIcon: ee, typeLabel: te } = He(t), ne = Be(t), re = !z && !R && l && !u, ie = z && !!i && L !== e.UnsupportedType && L !== e.FileTooLarge, ae = !!g && h !== void 0, H = ae || r !== void 0, oe = Number(!!re) + Number(!!ie) + Number(!!u) + Number(!!y), se = !H && oe === 1, ce = () => {
|
|
263
|
+
ae ? h(P) : r?.(P);
|
|
264
|
+
}, le = (e) => {
|
|
265
|
+
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ce());
|
|
266
|
+
}, U = K(() => Fe(F), [F]), ue = W(() => {
|
|
259
267
|
window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
|
|
260
|
-
}, [t]),
|
|
261
|
-
title:
|
|
262
|
-
className: c(
|
|
263
|
-
children: n ? /* @__PURE__ */
|
|
264
|
-
text:
|
|
268
|
+
}, [t]), de = c(Ue, "group/attachment-tile relative flex-col justify-between items-start gap-2 overflow-hidden p-3", Q.tile, H && !z && !R && Q.hovered, R && Q.loading, b && Q.selected, z && Q.tileError, se && Q.proxyFocus, Z.tile, b && Z.tileSelected), fe = /* @__PURE__ */ J("div", {
|
|
269
|
+
title: U,
|
|
270
|
+
className: c(M?.nameClassName ?? "dial-tiny-text", "line-clamp-2 w-full min-w-0 break-words", Q.nameText, Z.tileName),
|
|
271
|
+
children: n ? /* @__PURE__ */ J(v, {
|
|
272
|
+
text: U,
|
|
265
273
|
query: n,
|
|
266
274
|
maxLines: 2
|
|
267
|
-
}) :
|
|
268
|
-
}),
|
|
269
|
-
className: c("flex w-full items-
|
|
270
|
-
children: [/* @__PURE__ */
|
|
271
|
-
|
|
275
|
+
}) : U
|
|
276
|
+
}), pe = ee && /* @__PURE__ */ Y("div", {
|
|
277
|
+
className: c("flex w-full items-end gap-1", Z.tileType),
|
|
278
|
+
children: [ne ? /* @__PURE__ */ J(_, {
|
|
279
|
+
type: m.File,
|
|
280
|
+
name: F ?? "",
|
|
281
|
+
fileExtension: ze(t),
|
|
282
|
+
size: f.MD,
|
|
283
|
+
decorative: !0
|
|
284
|
+
}) : /* @__PURE__ */ J(ee, {
|
|
285
|
+
size: f.MD,
|
|
272
286
|
className: Q.typeText,
|
|
287
|
+
stroke: p,
|
|
273
288
|
"aria-hidden": !0
|
|
274
|
-
}), /* @__PURE__ */
|
|
275
|
-
className: c(
|
|
276
|
-
children:
|
|
289
|
+
}), /* @__PURE__ */ J("span", {
|
|
290
|
+
className: c(M?.metaClassName ?? "dial-tiny-text", "min-w-0 flex-1 truncate", Q.typeText),
|
|
291
|
+
children: O ? `${te} · ${O}` : te
|
|
277
292
|
})]
|
|
278
|
-
}),
|
|
293
|
+
}), me = H ? {
|
|
279
294
|
role: "button",
|
|
280
295
|
tabIndex: 0,
|
|
281
|
-
"aria-label":
|
|
282
|
-
onClick:
|
|
283
|
-
onKeyDown:
|
|
284
|
-
} : {},
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
296
|
+
"aria-label": ae ? C : S,
|
|
297
|
+
onClick: ce,
|
|
298
|
+
onKeyDown: le
|
|
299
|
+
} : {}, G = /* @__PURE__ */ Y(_e, { children: [
|
|
300
|
+
fe,
|
|
301
|
+
pe,
|
|
302
|
+
R && /* @__PURE__ */ J("div", {
|
|
288
303
|
role: "progressbar",
|
|
289
|
-
"aria-label":
|
|
290
|
-
className: c("absolute
|
|
291
|
-
children: /* @__PURE__ */
|
|
304
|
+
"aria-label": k,
|
|
305
|
+
className: c("absolute inset-0 flex items-center justify-center rounded-[11px]", Q.track),
|
|
306
|
+
children: /* @__PURE__ */ J(x, { size: 32 })
|
|
292
307
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
className: "absolute
|
|
308
|
+
/* @__PURE__ */ Y("div", {
|
|
309
|
+
className: "absolute inset-e-1 top-1 flex",
|
|
295
310
|
children: [
|
|
296
|
-
|
|
297
|
-
ariaLabel:
|
|
298
|
-
errorTitle:
|
|
299
|
-
errorDescId:
|
|
311
|
+
re && /* @__PURE__ */ J(qe, {
|
|
312
|
+
ariaLabel: w,
|
|
313
|
+
errorTitle: V,
|
|
314
|
+
errorDescId: B,
|
|
300
315
|
onClick: l,
|
|
301
|
-
id:
|
|
316
|
+
id: P
|
|
302
317
|
}),
|
|
303
|
-
|
|
304
|
-
ariaLabel:
|
|
305
|
-
errorTitle:
|
|
306
|
-
errorDescId:
|
|
318
|
+
ie && /* @__PURE__ */ J(Ke, {
|
|
319
|
+
ariaLabel: T,
|
|
320
|
+
errorTitle: V,
|
|
321
|
+
errorDescId: B,
|
|
307
322
|
onClick: i,
|
|
308
|
-
id:
|
|
323
|
+
id: P
|
|
309
324
|
}),
|
|
310
|
-
u && /* @__PURE__ */
|
|
311
|
-
ariaLabel:
|
|
312
|
-
errorTitle:
|
|
313
|
-
errorDescId:
|
|
314
|
-
onClick:
|
|
325
|
+
u && /* @__PURE__ */ J(Je, {
|
|
326
|
+
ariaLabel: D,
|
|
327
|
+
errorTitle: V,
|
|
328
|
+
errorDescId: B,
|
|
329
|
+
onClick: ue
|
|
315
330
|
}),
|
|
316
|
-
|
|
317
|
-
ariaLabel:
|
|
318
|
-
errorTitle:
|
|
319
|
-
errorDescId:
|
|
320
|
-
onClick:
|
|
321
|
-
id:
|
|
331
|
+
y && /* @__PURE__ */ J(Ye, {
|
|
332
|
+
ariaLabel: E,
|
|
333
|
+
errorTitle: V,
|
|
334
|
+
errorDescId: B,
|
|
335
|
+
onClick: y,
|
|
336
|
+
id: P,
|
|
337
|
+
isAlwaysVisible: R
|
|
322
338
|
})
|
|
323
339
|
]
|
|
324
340
|
}),
|
|
325
|
-
|
|
326
|
-
id:
|
|
341
|
+
z && /* @__PURE__ */ J("span", {
|
|
342
|
+
id: B,
|
|
327
343
|
role: "status",
|
|
328
344
|
"aria-live": "polite",
|
|
329
345
|
className: "sr-only",
|
|
330
|
-
children:
|
|
346
|
+
children: V
|
|
331
347
|
})
|
|
332
348
|
] });
|
|
333
|
-
return /* @__PURE__ */
|
|
349
|
+
return /* @__PURE__ */ J("div", {
|
|
334
350
|
style: d,
|
|
335
|
-
className: c("inline-flex",
|
|
336
|
-
children: /* @__PURE__ */
|
|
337
|
-
...
|
|
338
|
-
"aria-busy":
|
|
351
|
+
className: c("inline-flex", N),
|
|
352
|
+
children: /* @__PURE__ */ J("div", {
|
|
353
|
+
...me,
|
|
354
|
+
"aria-busy": R,
|
|
339
355
|
style: d,
|
|
340
|
-
className: c(
|
|
341
|
-
children:
|
|
356
|
+
className: c(de, H && "cursor-pointer", We),
|
|
357
|
+
children: G
|
|
342
358
|
})
|
|
343
359
|
});
|
|
344
|
-
},
|
|
360
|
+
}, Qe = /* @__PURE__ */ function(e) {
|
|
345
361
|
return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
|
|
346
|
-
}({}),
|
|
347
|
-
let n = ge(null), [r, i] =
|
|
348
|
-
return
|
|
362
|
+
}({}), $e = ({ enabled: e, src: t }) => {
|
|
363
|
+
let n = ge(null), [r, i] = q("idle");
|
|
364
|
+
return G(() => {
|
|
349
365
|
i(e && t ? "loading" : "idle");
|
|
350
|
-
}, [e, t]),
|
|
366
|
+
}, [e, t]), G(() => {
|
|
351
367
|
let r = n.current;
|
|
352
368
|
if (!r || !e || !t) return;
|
|
353
369
|
let a = () => i("loaded"), o = () => i("error");
|
|
@@ -358,67 +374,75 @@ var J = {
|
|
|
358
374
|
imageRef: n,
|
|
359
375
|
imageLoadStatus: r
|
|
360
376
|
};
|
|
361
|
-
},
|
|
362
|
-
let { clickLabel: d = "Open attachment", expandLabel: m = "Expand pasted text", removeLabel: h = "Remove attachment", downloadLabel: g = "Download attachment" } = i ?? {}, { className:
|
|
363
|
-
enabled:
|
|
364
|
-
src:
|
|
365
|
-
}),
|
|
366
|
-
|
|
367
|
-
},
|
|
377
|
+
}, et = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: l, isSelected: u }) => {
|
|
378
|
+
let { clickLabel: d = "Open attachment", expandLabel: m = "Expand pasted text", removeLabel: h = "Remove attachment", downloadLabel: g = "Download attachment", uploadingLabel: _ = "Uploading" } = i ?? {}, { className: v } = l ?? {}, { id: S, name: C } = e, w = e.previewUrl ?? e.url, T = e.type === t.Pasted && n !== void 0, { isLoading: E, isError: D, isImage: O } = K(() => He(e), [e]), k = r !== void 0 && !T && !E && !D, A = T || k, j = !!s && !E, M = !A && Number(!!a) + Number(j) === 1, { imageRef: N, imageLoadStatus: P } = $e({
|
|
379
|
+
enabled: O,
|
|
380
|
+
src: w
|
|
381
|
+
}), F = () => {
|
|
382
|
+
T && n ? n(S) : k && r && r(S);
|
|
383
|
+
}, I = A ? {
|
|
368
384
|
role: "button",
|
|
369
385
|
tabIndex: 0,
|
|
370
|
-
"aria-label":
|
|
371
|
-
onClick:
|
|
386
|
+
"aria-label": T ? m : d,
|
|
387
|
+
onClick: F,
|
|
372
388
|
onKeyDown: (e) => {
|
|
373
|
-
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
389
|
+
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), F());
|
|
374
390
|
}
|
|
375
|
-
} : {};
|
|
376
|
-
return /* @__PURE__ */
|
|
377
|
-
className:
|
|
378
|
-
...
|
|
391
|
+
} : {}, L = c(Ue, "group/attachment-tile", A && "cursor-pointer", Q.tile, u && Q.selected, E && Q.loading, M && Q.proxyFocus, We, v, Z.tile, u && Z.tileSelected);
|
|
392
|
+
return /* @__PURE__ */ J("div", {
|
|
393
|
+
className: L,
|
|
394
|
+
...I,
|
|
395
|
+
"aria-busy": E,
|
|
379
396
|
style: o,
|
|
380
|
-
children: /* @__PURE__ */
|
|
397
|
+
children: /* @__PURE__ */ Y("div", {
|
|
381
398
|
className: "relative h-full w-full overflow-hidden",
|
|
382
399
|
children: [
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
className: "absolute
|
|
385
|
-
children: [a && /* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ Y("div", {
|
|
401
|
+
className: "absolute inset-e-1 top-1 z-10 flex",
|
|
402
|
+
children: [a && /* @__PURE__ */ J(Ye, {
|
|
386
403
|
ariaLabel: h,
|
|
387
404
|
onClick: a,
|
|
388
|
-
id:
|
|
389
|
-
className: Q.imageActionButton
|
|
390
|
-
|
|
405
|
+
id: S,
|
|
406
|
+
className: Q.imageActionButton,
|
|
407
|
+
isAlwaysVisible: E
|
|
408
|
+
}), j && /* @__PURE__ */ J(qe, {
|
|
391
409
|
ariaLabel: g,
|
|
392
410
|
onClick: s,
|
|
393
|
-
id:
|
|
411
|
+
id: S,
|
|
394
412
|
className: Q.imageActionButton
|
|
395
413
|
})]
|
|
396
414
|
}),
|
|
397
|
-
|
|
398
|
-
variant:
|
|
415
|
+
P !== Qe.Loaded && /* @__PURE__ */ J(y, {
|
|
416
|
+
variant: b.Rectangular,
|
|
399
417
|
width: "100%",
|
|
400
418
|
height: "100%",
|
|
401
|
-
active:
|
|
402
|
-
overlay: /* @__PURE__ */
|
|
419
|
+
active: P === Qe.Loading,
|
|
420
|
+
overlay: /* @__PURE__ */ J(U, {
|
|
403
421
|
size: f.LG,
|
|
404
|
-
className: Q.
|
|
422
|
+
className: Q.placeholderIcon,
|
|
405
423
|
"aria-hidden": !0,
|
|
406
424
|
stroke: p
|
|
407
425
|
}),
|
|
408
426
|
className: "absolute inset-0 rounded-xl"
|
|
409
427
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
ref:
|
|
412
|
-
src:
|
|
413
|
-
alt:
|
|
428
|
+
/* @__PURE__ */ J("img", {
|
|
429
|
+
ref: N,
|
|
430
|
+
src: w,
|
|
431
|
+
alt: C,
|
|
414
432
|
loading: "lazy",
|
|
415
433
|
decoding: "async",
|
|
416
|
-
className: c("h-full w-full rounded-xl object-cover transition-opacity duration-200",
|
|
434
|
+
className: c("h-full w-full rounded-xl object-cover transition-opacity duration-200", P === Qe.Loaded ? "opacity-100" : "opacity-0")
|
|
435
|
+
}),
|
|
436
|
+
E && /* @__PURE__ */ J("div", {
|
|
437
|
+
role: "progressbar",
|
|
438
|
+
"aria-label": _,
|
|
439
|
+
className: c("absolute inset-0 flex items-center justify-center rounded-xl", Q.track),
|
|
440
|
+
children: /* @__PURE__ */ J(x, { size: 32 })
|
|
417
441
|
})
|
|
418
442
|
]
|
|
419
443
|
})
|
|
420
444
|
});
|
|
421
|
-
},
|
|
445
|
+
}, tt = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: c, labels: l, styles: u, isSelected: d }) => {
|
|
422
446
|
let { colors: f } = u ?? {}, p = e.type === t.Pasted && a !== void 0, m = s({
|
|
423
447
|
"--ai-tile-bg": f?.background,
|
|
424
448
|
"--ai-tile-border": f?.border,
|
|
@@ -432,11 +456,12 @@ var J = {
|
|
|
432
456
|
"--ai-tile-error-text": f?.errorText,
|
|
433
457
|
"--ai-tile-name-text": f?.nameText,
|
|
434
458
|
"--ai-tile-type-text": f?.typeText,
|
|
459
|
+
"--ai-tile-placeholder-icon": f?.placeholderIcon,
|
|
435
460
|
"--ai-tile-hover-icon-bg": f?.hoverIconBackground,
|
|
436
461
|
"--ai-tile-hover-icon-color": f?.hoverIconColor,
|
|
437
462
|
"--ai-tile-progress-track": f?.trackBackground
|
|
438
|
-
}), { isImage: h, isLink: g } =
|
|
439
|
-
return h ? /* @__PURE__ */
|
|
463
|
+
}), { isImage: h, isLink: g } = K(() => He(e), [e]);
|
|
464
|
+
return h ? /* @__PURE__ */ J(et, {
|
|
440
465
|
attachment: e,
|
|
441
466
|
labels: l,
|
|
442
467
|
onClick: o,
|
|
@@ -446,7 +471,7 @@ var J = {
|
|
|
446
471
|
cssVars: m,
|
|
447
472
|
onDownload: c,
|
|
448
473
|
isSelected: d
|
|
449
|
-
}) : /* @__PURE__ */
|
|
474
|
+
}) : /* @__PURE__ */ J(Ze, {
|
|
450
475
|
attachment: e,
|
|
451
476
|
searchQuery: n,
|
|
452
477
|
onClick: o,
|
|
@@ -461,261 +486,282 @@ var J = {
|
|
|
461
486
|
isExpandable: p,
|
|
462
487
|
isSelected: d
|
|
463
488
|
});
|
|
464
|
-
},
|
|
465
|
-
let
|
|
466
|
-
if (!e?.length) return
|
|
467
|
-
let
|
|
489
|
+
}, nt = (e, t) => {
|
|
490
|
+
let n = l(e, t);
|
|
491
|
+
if (!e?.length) return n;
|
|
492
|
+
let r = /* @__PURE__ */ new Map();
|
|
468
493
|
for (let t of e) {
|
|
469
494
|
let e = t.url ?? t.data ?? t.title;
|
|
470
|
-
|
|
495
|
+
r.has(e) || r.set(e, t.type);
|
|
471
496
|
}
|
|
472
|
-
return
|
|
473
|
-
let t =
|
|
497
|
+
return n.map((e) => {
|
|
498
|
+
let t = r.get(e.id);
|
|
474
499
|
return t ? {
|
|
475
500
|
...e,
|
|
476
501
|
contentType: t
|
|
477
502
|
} : e;
|
|
478
503
|
});
|
|
479
|
-
},
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
504
|
+
}, rt = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: i, copiedLabel: a }) => {
|
|
505
|
+
let o = t?.replace(/^language-/, "") ?? "";
|
|
506
|
+
return /* @__PURE__ */ J(r, {
|
|
507
|
+
language: o,
|
|
508
|
+
value: typeof e == "string" ? e : String(e ?? ""),
|
|
509
|
+
codeClassName: n,
|
|
510
|
+
containerClassName: c(X.codeBlock, n),
|
|
511
|
+
copyLabel: i,
|
|
512
|
+
copiedLabel: a,
|
|
513
|
+
hideDownload: !0
|
|
514
|
+
});
|
|
515
|
+
}, it = me(({ content: e, typography: t, copyAriaLabel: n = "Copy", copiedLabel: r, tableScrollRegionAriaLabel: a, mathScrollRegionAriaLabel: o, renderCitation: s }) => {
|
|
516
|
+
let l = "mb-1.5 last:mb-0", u = c(t?.headingClassName ?? "dial-small-semi-text", X.stageContent, l), d = K(() => ({
|
|
517
|
+
code: ({ children: e, className: i }) => i?.includes("language-") ? /* @__PURE__ */ J(rt, {
|
|
518
|
+
codeClassName: i,
|
|
519
|
+
blockClassName: t?.codeBlockClassName,
|
|
520
|
+
copyAriaLabel: n,
|
|
521
|
+
copiedLabel: r,
|
|
522
|
+
children: e
|
|
523
|
+
}) : /* @__PURE__ */ J("code", {
|
|
524
|
+
className: c("px-1 py-0.5", t?.codeClassName ?? "dial-tiny-text rounded-md", X.codeInline),
|
|
525
|
+
children: e
|
|
526
|
+
}),
|
|
527
|
+
...s != null && { cit: (e) => s(e["data-id"], e.children) }
|
|
528
|
+
}), [
|
|
529
|
+
t?.codeClassName,
|
|
530
|
+
t?.codeBlockClassName,
|
|
531
|
+
n,
|
|
532
|
+
r,
|
|
533
|
+
s
|
|
534
|
+
]);
|
|
535
|
+
return /* @__PURE__ */ J(i, {
|
|
490
536
|
content: e,
|
|
491
537
|
tableScrollRegionAriaLabel: a,
|
|
492
538
|
mathScrollRegionAriaLabel: o,
|
|
493
539
|
classNames: {
|
|
494
|
-
h1:
|
|
495
|
-
h2:
|
|
496
|
-
h3:
|
|
497
|
-
h4:
|
|
498
|
-
h5:
|
|
499
|
-
h6:
|
|
540
|
+
h1: u,
|
|
541
|
+
h2: u,
|
|
542
|
+
h3: u,
|
|
543
|
+
h4: u,
|
|
544
|
+
h5: u,
|
|
545
|
+
h6: u,
|
|
500
546
|
p: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, "mb-1.5"),
|
|
501
|
-
ul: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent,
|
|
502
|
-
ol: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent,
|
|
547
|
+
ul: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, l),
|
|
548
|
+
ol: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, l),
|
|
503
549
|
strong: c(t?.strongClassName ?? t?.contentClassName ?? "dial-tiny-text", X.stageContent),
|
|
504
550
|
codeInline: X.codeInline,
|
|
505
|
-
blockquote: c(t?.contentClassName ?? "dial-tiny-text", X.blockquote,
|
|
551
|
+
blockquote: c(t?.contentClassName ?? "dial-tiny-text", X.blockquote, l),
|
|
506
552
|
link: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent),
|
|
507
553
|
tableCell: c(t?.contentClassName ?? "dial-tiny-text", X.tableCell)
|
|
508
554
|
},
|
|
509
|
-
components:
|
|
510
|
-
codeClassName: i,
|
|
511
|
-
blockClassName: t?.codeBlockClassName,
|
|
512
|
-
copyAriaLabel: n,
|
|
513
|
-
copiedLabel: r,
|
|
514
|
-
children: e
|
|
515
|
-
}) : /* @__PURE__ */ K("code", {
|
|
516
|
-
className: c("px-1 py-0.5", t?.codeClassName ?? "dial-tiny-text rounded-md", X.codeInline),
|
|
517
|
-
children: e
|
|
518
|
-
}) }
|
|
555
|
+
components: d
|
|
519
556
|
});
|
|
520
|
-
}),
|
|
521
|
-
let r =
|
|
557
|
+
}), at = ({ attachments: e, clickLabel: t, onAttachmentClick: n }) => {
|
|
558
|
+
let r = W((t) => {
|
|
522
559
|
let r = e.find((e) => e.id === t);
|
|
523
560
|
r && n?.(r);
|
|
524
561
|
}, [e, n]);
|
|
525
|
-
return /* @__PURE__ */
|
|
562
|
+
return /* @__PURE__ */ J("div", {
|
|
526
563
|
role: "list",
|
|
527
|
-
className: "flex flex-wrap gap-
|
|
528
|
-
children: e.map((e) => /* @__PURE__ */
|
|
564
|
+
className: "flex flex-wrap gap-2",
|
|
565
|
+
children: e.map((e) => /* @__PURE__ */ J("div", {
|
|
529
566
|
role: "listitem",
|
|
530
|
-
children: /* @__PURE__ */
|
|
567
|
+
children: /* @__PURE__ */ J(tt, {
|
|
531
568
|
attachment: e,
|
|
532
569
|
onClick: n && r,
|
|
533
570
|
labels: { clickLabel: t }
|
|
534
571
|
})
|
|
535
572
|
}, e.id))
|
|
536
573
|
});
|
|
537
|
-
},
|
|
538
|
-
let [
|
|
539
|
-
|
|
540
|
-
}, [
|
|
541
|
-
/* @__PURE__ */
|
|
574
|
+
}, ot = ({ stage: e, isLive: t, typography: n, labels: r, nameOverride: i, onAttachmentClick: a, attachmentDisplayResolvers: s, renderCitation: l, childList: u, isExpanded: f, onToggle: p }) => {
|
|
575
|
+
let [m, h] = q(!1), _ = f ?? m, v = W((e) => {
|
|
576
|
+
f === void 0 && h(e), p?.(e);
|
|
577
|
+
}, [f, p]), { copyAriaLabel: y = "Copy stage content", codeBlockCopiedLabel: b, tableScrollRegionAriaLabel: x, mathScrollRegionAriaLabel: S, runningAriaLabel: C, failedAriaLabel: w, attachmentClickLabel: T = "Preview search result" } = r ?? {}, E = K(() => nt(e.attachments, s), [e.attachments, s]), { name: D, durationLabel: O } = we(e.name), k = i ?? D, A = !i && Te(D), j = e.status === o.Failed, M = !!e.content || !!e.attachments?.length, N = M || u != null, P = /* @__PURE__ */ Y(_e, { children: [
|
|
578
|
+
/* @__PURE__ */ J("span", {
|
|
542
579
|
className: "flex flex-none items-center",
|
|
543
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ J(Pe, {
|
|
544
581
|
status: e.status,
|
|
545
582
|
isLive: t,
|
|
546
|
-
runningLabel:
|
|
547
|
-
failedLabel:
|
|
583
|
+
runningLabel: C,
|
|
584
|
+
failedLabel: w
|
|
548
585
|
})
|
|
549
586
|
}),
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
-
className: c("
|
|
552
|
-
children: /* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ J("span", {
|
|
588
|
+
className: c("max-w-[22rem] min-w-0 truncate", n?.fontClassName ?? "dial-small-text", X.stageName, j && X.stageNameFailed, A && X.monoName),
|
|
589
|
+
children: /* @__PURE__ */ J(g, { text: k || e.status || "" })
|
|
553
590
|
}),
|
|
554
|
-
e.tag && /* @__PURE__ */
|
|
591
|
+
e.tag && /* @__PURE__ */ J("span", {
|
|
555
592
|
className: c("flex-none", n?.tagClassName ?? "dial-tiny-lead-text", X.tag),
|
|
556
593
|
children: e.tag
|
|
557
594
|
}),
|
|
558
|
-
|
|
595
|
+
O && /* @__PURE__ */ J("span", {
|
|
559
596
|
className: c("flex-none", n?.countFontClassName ?? "dial-tiny-text", X.duration),
|
|
560
|
-
children:
|
|
597
|
+
children: O
|
|
561
598
|
})
|
|
562
599
|
] });
|
|
563
|
-
return
|
|
564
|
-
expanded:
|
|
565
|
-
onToggle:
|
|
566
|
-
title: /* @__PURE__ */
|
|
600
|
+
return N ? /* @__PURE__ */ Y(d, {
|
|
601
|
+
expanded: _,
|
|
602
|
+
onToggle: v,
|
|
603
|
+
title: /* @__PURE__ */ J("span", {
|
|
567
604
|
className: "flex min-w-0 items-center gap-2",
|
|
568
|
-
children:
|
|
605
|
+
children: P
|
|
569
606
|
}),
|
|
570
|
-
className:
|
|
571
|
-
headerClassName: c(
|
|
607
|
+
className: je,
|
|
608
|
+
headerClassName: c(Me, X.row, X.stageHeader),
|
|
572
609
|
contentClassName: c("-mt-1 flex min-w-0 flex-col gap-3 px-0 py-1", X.stageRegion),
|
|
573
|
-
children: [
|
|
610
|
+
children: [_ && M && /* @__PURE__ */ Y("div", {
|
|
574
611
|
className: "flex min-w-0 flex-col gap-3 ps-8",
|
|
575
|
-
children: [e.content && /* @__PURE__ */
|
|
612
|
+
children: [e.content && /* @__PURE__ */ J("div", {
|
|
576
613
|
className: "max-h-[300px] min-w-0 overflow-y-auto",
|
|
577
|
-
children: /* @__PURE__ */
|
|
614
|
+
children: /* @__PURE__ */ J(it, {
|
|
578
615
|
content: e.content,
|
|
579
616
|
typography: n,
|
|
580
|
-
copyAriaLabel:
|
|
581
|
-
copiedLabel:
|
|
582
|
-
tableScrollRegionAriaLabel:
|
|
583
|
-
mathScrollRegionAriaLabel:
|
|
617
|
+
copyAriaLabel: y,
|
|
618
|
+
copiedLabel: b,
|
|
619
|
+
tableScrollRegionAriaLabel: x,
|
|
620
|
+
mathScrollRegionAriaLabel: S,
|
|
621
|
+
renderCitation: l
|
|
584
622
|
})
|
|
585
|
-
}),
|
|
586
|
-
attachments:
|
|
587
|
-
clickLabel:
|
|
623
|
+
}), E.length > 0 && /* @__PURE__ */ J(at, {
|
|
624
|
+
attachments: E,
|
|
625
|
+
clickLabel: T,
|
|
588
626
|
onAttachmentClick: a
|
|
589
627
|
})]
|
|
590
|
-
}),
|
|
591
|
-
}) : /* @__PURE__ */
|
|
628
|
+
}), _ && u]
|
|
629
|
+
}) : /* @__PURE__ */ J("div", {
|
|
592
630
|
className: c("flex w-full items-center gap-2 px-2 py-1.5", X.row),
|
|
593
|
-
children:
|
|
631
|
+
children: P
|
|
594
632
|
});
|
|
595
|
-
},
|
|
596
|
-
let
|
|
597
|
-
return /* @__PURE__ */
|
|
633
|
+
}, st = (e) => e <= 3 ? "ps-4" : "ps-0", ct = (e) => e <= 3 ? "ps-6" : "ps-0", lt = ({ node: e, depth: t, nameOverride: n, isStreaming: r, expansion: i, typography: a, labels: o, onAttachmentClick: s, attachmentDisplayResolvers: c, renderCitation: l }) => {
|
|
634
|
+
let u = ke(e.stage.index), d = t + 1;
|
|
635
|
+
return /* @__PURE__ */ J(ot, {
|
|
598
636
|
stage: e.stage,
|
|
599
637
|
nameOverride: n,
|
|
600
638
|
isLive: r && e.stage.status == null,
|
|
601
639
|
typography: a,
|
|
602
640
|
labels: o,
|
|
603
641
|
onAttachmentClick: s,
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
642
|
+
attachmentDisplayResolvers: c,
|
|
643
|
+
renderCitation: l,
|
|
644
|
+
isExpanded: i.isExpanded(u),
|
|
645
|
+
onToggle: (e) => i.onToggle(u, e),
|
|
646
|
+
childList: e.children.length > 0 ? /* @__PURE__ */ J(dt, {
|
|
607
647
|
nodes: e.children,
|
|
608
|
-
depth:
|
|
609
|
-
className:
|
|
648
|
+
depth: d,
|
|
649
|
+
className: st(d),
|
|
610
650
|
isStreaming: r,
|
|
611
651
|
expansion: i,
|
|
612
652
|
typography: a,
|
|
613
653
|
labels: o,
|
|
614
|
-
onAttachmentClick: s
|
|
654
|
+
onAttachmentClick: s,
|
|
655
|
+
attachmentDisplayResolvers: c,
|
|
656
|
+
renderCitation: l
|
|
615
657
|
}) : void 0
|
|
616
658
|
});
|
|
617
|
-
},
|
|
618
|
-
let { runningAriaLabel:
|
|
619
|
-
|
|
620
|
-
let
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
runningLabel: l,
|
|
631
|
-
failedLabel: u
|
|
632
|
-
})
|
|
633
|
-
}),
|
|
634
|
-
/* @__PURE__ */ K("span", {
|
|
635
|
-
className: c("min-w-0 max-w-[22rem] truncate", i?.fontClassName ?? "dial-small-text", X.stageName, g && X.stageNameFailed),
|
|
636
|
-
children: /* @__PURE__ */ K(h, { text: e.name })
|
|
637
|
-
}),
|
|
638
|
-
/* @__PURE__ */ q("span", {
|
|
639
|
-
className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", X.count),
|
|
640
|
-
children: ["×", p.length]
|
|
659
|
+
}, ut = ({ row: e, depth: t, isStreaming: n, expansion: r, typography: i, labels: a, onAttachmentClick: s, attachmentDisplayResolvers: l, renderCitation: u }) => {
|
|
660
|
+
let { runningAriaLabel: f, failedAriaLabel: p, attemptLabel: m = (e) => `Attempt ${e}` } = a ?? {}, h = e.attempts ?? [], _ = h.some((e) => e.stage.status == null), v = h.some((e) => e.stage.status === o.Failed), y = o.Completed;
|
|
661
|
+
_ ? y = null : v && (y = o.Failed);
|
|
662
|
+
let b = Ae(e.key), x = r.isExpanded(b), S = t + 1, C = /* @__PURE__ */ Y("span", {
|
|
663
|
+
className: "flex min-w-0 items-center gap-2",
|
|
664
|
+
children: [
|
|
665
|
+
/* @__PURE__ */ J("span", {
|
|
666
|
+
className: "flex flex-none items-center",
|
|
667
|
+
children: /* @__PURE__ */ J(Pe, {
|
|
668
|
+
status: y,
|
|
669
|
+
isLive: n && _,
|
|
670
|
+
runningLabel: f,
|
|
671
|
+
failedLabel: p
|
|
641
672
|
})
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
673
|
+
}),
|
|
674
|
+
/* @__PURE__ */ J("span", {
|
|
675
|
+
className: c("max-w-[22rem] min-w-0 truncate", i?.fontClassName ?? "dial-small-text", X.stageName, v && X.stageNameFailed),
|
|
676
|
+
children: /* @__PURE__ */ J(g, { text: e.name })
|
|
677
|
+
}),
|
|
678
|
+
/* @__PURE__ */ Y("span", {
|
|
679
|
+
className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", X.count),
|
|
680
|
+
children: ["×", h.length]
|
|
681
|
+
})
|
|
682
|
+
]
|
|
683
|
+
});
|
|
684
|
+
return /* @__PURE__ */ J(d, {
|
|
685
|
+
title: C,
|
|
686
|
+
expanded: x,
|
|
687
|
+
onToggle: (e) => r.onToggle(b, e),
|
|
688
|
+
className: je,
|
|
689
|
+
headerClassName: c(Me, X.collapseButton, X.row, X.stageHeader),
|
|
690
|
+
contentClassName: c("-mt-2 min-w-0 px-0", ct(S), X.stageRegion),
|
|
691
|
+
children: /* @__PURE__ */ J("ul", {
|
|
650
692
|
role: "list",
|
|
651
693
|
className: "flex min-w-0 flex-col gap-0.5",
|
|
652
|
-
children:
|
|
694
|
+
children: x && h.map((e, t) => /* @__PURE__ */ J("li", {
|
|
653
695
|
role: "listitem",
|
|
654
696
|
className: "min-w-0",
|
|
655
|
-
children: /* @__PURE__ */
|
|
697
|
+
children: /* @__PURE__ */ J(lt, {
|
|
656
698
|
node: e,
|
|
657
|
-
depth:
|
|
658
|
-
nameOverride:
|
|
699
|
+
depth: S,
|
|
700
|
+
nameOverride: m(t + 1),
|
|
659
701
|
isStreaming: n,
|
|
660
702
|
expansion: r,
|
|
661
703
|
typography: i,
|
|
662
704
|
labels: a,
|
|
663
|
-
onAttachmentClick: s
|
|
705
|
+
onAttachmentClick: s,
|
|
706
|
+
attachmentDisplayResolvers: l,
|
|
707
|
+
renderCitation: u
|
|
664
708
|
})
|
|
665
709
|
}, e.stage.index))
|
|
666
710
|
})
|
|
667
711
|
});
|
|
668
|
-
},
|
|
712
|
+
}, dt = ({ nodes: e, depth: t, className: n, ...r }) => /* @__PURE__ */ J("ul", {
|
|
669
713
|
role: "list",
|
|
670
714
|
className: c("flex min-w-0 flex-col gap-0.5", n),
|
|
671
|
-
children:
|
|
715
|
+
children: Ne(e).map((e) => /* @__PURE__ */ J("li", {
|
|
672
716
|
role: "listitem",
|
|
673
717
|
className: "min-w-0",
|
|
674
|
-
children: e.node ? /* @__PURE__ */
|
|
718
|
+
children: e.node ? /* @__PURE__ */ J(lt, {
|
|
675
719
|
node: e.node,
|
|
676
720
|
depth: t,
|
|
677
721
|
...r
|
|
678
|
-
}) : /* @__PURE__ */
|
|
722
|
+
}) : /* @__PURE__ */ J(ut, {
|
|
679
723
|
row: e,
|
|
680
724
|
depth: t,
|
|
681
725
|
...r
|
|
682
726
|
})
|
|
683
727
|
}, e.key))
|
|
684
|
-
}),
|
|
685
|
-
let { colors:
|
|
686
|
-
"--cs-text":
|
|
687
|
-
"--cs-row-hover":
|
|
688
|
-
"--cs-button-bg":
|
|
689
|
-
"--cs-stage-text":
|
|
690
|
-
"--cs-failed-text":
|
|
691
|
-
"--cs-tag-text":
|
|
692
|
-
"--cs-count-text":
|
|
693
|
-
"--cs-duration-text":
|
|
694
|
-
"--cs-icon-secondary":
|
|
695
|
-
"--cs-icon-completed":
|
|
696
|
-
"--cs-icon-error":
|
|
697
|
-
"--cs-code-bg":
|
|
698
|
-
"--cs-code-border":
|
|
699
|
-
"--cs-code-text":
|
|
700
|
-
"--cs-border":
|
|
701
|
-
}),
|
|
702
|
-
return /* @__PURE__ */
|
|
703
|
-
style:
|
|
704
|
-
className: c("w-full min-w-0", X.panel, n,
|
|
705
|
-
children: /* @__PURE__ */
|
|
706
|
-
nodes:
|
|
728
|
+
}), ft = ({ stages: e, isStreaming: t, className: n, styles: r, labels: i, onAttachmentClick: a, attachmentDisplayResolvers: o, renderCitation: l, expansion: u }) => {
|
|
729
|
+
let { colors: d, typography: f } = r ?? {}, p = s({
|
|
730
|
+
"--cs-text": d?.text,
|
|
731
|
+
"--cs-row-hover": d?.rowHoverColor,
|
|
732
|
+
"--cs-button-bg": d?.collapsedButtonBg,
|
|
733
|
+
"--cs-stage-text": d?.stageTextColor,
|
|
734
|
+
"--cs-failed-text": d?.failedColor,
|
|
735
|
+
"--cs-tag-text": d?.tagTextColor,
|
|
736
|
+
"--cs-count-text": d?.countTextColor,
|
|
737
|
+
"--cs-duration-text": d?.durationTextColor,
|
|
738
|
+
"--cs-icon-secondary": d?.iconSecondaryColor,
|
|
739
|
+
"--cs-icon-completed": d?.iconCompletedColor,
|
|
740
|
+
"--cs-icon-error": d?.iconErrorColor,
|
|
741
|
+
"--cs-code-bg": d?.codeBg,
|
|
742
|
+
"--cs-code-border": d?.codeBorderColor,
|
|
743
|
+
"--cs-code-text": d?.codeTextColor,
|
|
744
|
+
"--cs-border": d?.borderColor
|
|
745
|
+
}), m = K(() => Oe(e), [e]);
|
|
746
|
+
return /* @__PURE__ */ J("div", {
|
|
747
|
+
style: p,
|
|
748
|
+
className: c("w-full min-w-0", X.panel, n, ve.panel),
|
|
749
|
+
children: /* @__PURE__ */ J(dt, {
|
|
750
|
+
nodes: m,
|
|
707
751
|
depth: 0,
|
|
708
752
|
className: "w-full ps-5",
|
|
709
753
|
isStreaming: t,
|
|
710
|
-
expansion:
|
|
711
|
-
typography:
|
|
754
|
+
expansion: u,
|
|
755
|
+
typography: f,
|
|
712
756
|
labels: i,
|
|
713
|
-
onAttachmentClick: a
|
|
757
|
+
onAttachmentClick: a,
|
|
758
|
+
attachmentDisplayResolvers: o,
|
|
759
|
+
renderCitation: l
|
|
714
760
|
})
|
|
715
761
|
});
|
|
716
|
-
},
|
|
717
|
-
let t =
|
|
718
|
-
return /* @__PURE__ */
|
|
762
|
+
}, pt = (e) => {
|
|
763
|
+
let t = ye();
|
|
764
|
+
return /* @__PURE__ */ J(ft, {
|
|
719
765
|
...e,
|
|
720
766
|
expansion: t
|
|
721
767
|
});
|
|
@@ -726,141 +772,145 @@ var J = {
|
|
|
726
772
|
doneIcon: "_doneIcon_16fae_36",
|
|
727
773
|
failedText: "_failedText_16fae_40",
|
|
728
774
|
liveName: "_liveName_16fae_44"
|
|
729
|
-
},
|
|
730
|
-
let { executedLabel:
|
|
731
|
-
|
|
732
|
-
|
|
775
|
+
}, mt = ({ stages: e, isStreaming: t, labels: n, className: r, styles: i, onAttachmentClick: a, attachmentDisplayResolvers: l, renderCitation: u }) => {
|
|
776
|
+
let { executedLabel: m = "Executed", stepsLabel: h = () => "steps", failedCountLabel: _ = (e) => `${e} failed`, runningAriaLabel: v = "Running", copyAriaLabel: y, codeBlockCopiedLabel: b, tableScrollRegionAriaLabel: S, mathScrollRegionAriaLabel: C, failedAriaLabel: T, attemptLabel: E, attachmentClickLabel: D } = n ?? {}, [O, k] = q(t), A = ye(), { reset: j } = A, M = e.length > 1;
|
|
777
|
+
G(() => {
|
|
778
|
+
M && !O && j();
|
|
733
779
|
}, [
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
780
|
+
M,
|
|
781
|
+
O,
|
|
782
|
+
j
|
|
737
783
|
]);
|
|
738
|
-
let
|
|
739
|
-
|
|
740
|
-
|
|
784
|
+
let N = ge(t);
|
|
785
|
+
G(() => {
|
|
786
|
+
N.current && !t && k(!1), N.current = t;
|
|
741
787
|
}, [t]);
|
|
742
|
-
let { colors:
|
|
743
|
-
"--cs-cg-label":
|
|
744
|
-
"--cs-cg-label-hover":
|
|
745
|
-
"--cs-cg-done":
|
|
746
|
-
"--cs-cg-failed":
|
|
747
|
-
"--cs-text":
|
|
748
|
-
"--cs-row-hover":
|
|
749
|
-
"--cs-button-bg":
|
|
750
|
-
"--cs-stage-text":
|
|
751
|
-
"--cs-failed-text":
|
|
752
|
-
"--cs-tag-text":
|
|
753
|
-
"--cs-count-text":
|
|
754
|
-
"--cs-duration-text":
|
|
755
|
-
"--cs-icon-secondary":
|
|
756
|
-
"--cs-icon-completed":
|
|
757
|
-
"--cs-icon-error":
|
|
758
|
-
"--cs-code-bg":
|
|
759
|
-
"--cs-code-border":
|
|
760
|
-
"--cs-code-text":
|
|
761
|
-
"--cs-border":
|
|
788
|
+
let { colors: P, panel: F } = i ?? {}, I = i?.typography ?? { fontClassName: "dial-small-text" }, L = s({
|
|
789
|
+
"--cs-cg-label": P?.labelColor,
|
|
790
|
+
"--cs-cg-label-hover": P?.labelHoverColor,
|
|
791
|
+
"--cs-cg-done": P?.doneColor,
|
|
792
|
+
"--cs-cg-failed": P?.failedColor,
|
|
793
|
+
"--cs-text": F?.text,
|
|
794
|
+
"--cs-row-hover": F?.rowHoverColor,
|
|
795
|
+
"--cs-button-bg": F?.collapsedButtonBg,
|
|
796
|
+
"--cs-stage-text": F?.stageTextColor,
|
|
797
|
+
"--cs-failed-text": F?.failedColor,
|
|
798
|
+
"--cs-tag-text": F?.tagTextColor,
|
|
799
|
+
"--cs-count-text": F?.countTextColor,
|
|
800
|
+
"--cs-duration-text": F?.durationTextColor,
|
|
801
|
+
"--cs-icon-secondary": F?.iconSecondaryColor,
|
|
802
|
+
"--cs-icon-completed": F?.iconCompletedColor,
|
|
803
|
+
"--cs-icon-error": F?.iconErrorColor,
|
|
804
|
+
"--cs-code-bg": F?.codeBg,
|
|
805
|
+
"--cs-code-border": F?.codeBorderColor,
|
|
806
|
+
"--cs-code-text": F?.codeTextColor,
|
|
807
|
+
"--cs-border": F?.borderColor
|
|
762
808
|
});
|
|
763
809
|
if (e.length === 0) return null;
|
|
764
|
-
let
|
|
765
|
-
copyAriaLabel:
|
|
766
|
-
codeBlockCopiedLabel:
|
|
767
|
-
tableScrollRegionAriaLabel:
|
|
768
|
-
mathScrollRegionAriaLabel:
|
|
769
|
-
runningAriaLabel:
|
|
770
|
-
failedAriaLabel:
|
|
771
|
-
attemptLabel:
|
|
772
|
-
attachmentClickLabel:
|
|
810
|
+
let R = {
|
|
811
|
+
copyAriaLabel: y,
|
|
812
|
+
codeBlockCopiedLabel: b,
|
|
813
|
+
tableScrollRegionAriaLabel: S,
|
|
814
|
+
mathScrollRegionAriaLabel: C,
|
|
815
|
+
runningAriaLabel: v,
|
|
816
|
+
failedAriaLabel: T,
|
|
817
|
+
attemptLabel: E,
|
|
818
|
+
attachmentClickLabel: D
|
|
773
819
|
};
|
|
774
|
-
if (e.length === 1) return /* @__PURE__ */
|
|
820
|
+
if (e.length === 1) return /* @__PURE__ */ J(ft, {
|
|
775
821
|
stages: e,
|
|
776
822
|
isStreaming: t,
|
|
777
|
-
expansion:
|
|
823
|
+
expansion: A,
|
|
778
824
|
className: r,
|
|
779
825
|
styles: {
|
|
780
|
-
colors:
|
|
826
|
+
colors: F,
|
|
781
827
|
typography: i?.typography
|
|
782
828
|
},
|
|
783
|
-
labels:
|
|
784
|
-
onAttachmentClick: a
|
|
829
|
+
labels: R,
|
|
830
|
+
onAttachmentClick: a,
|
|
831
|
+
attachmentDisplayResolvers: l,
|
|
832
|
+
renderCitation: u
|
|
785
833
|
});
|
|
786
|
-
let
|
|
834
|
+
let z = e.some((e) => e.status === o.Failed), B;
|
|
787
835
|
if (t) {
|
|
788
|
-
let t =
|
|
789
|
-
|
|
836
|
+
let t = we((Ee(e) ?? e[e.length - 1]).name).name;
|
|
837
|
+
B = /* @__PURE__ */ Y("span", {
|
|
790
838
|
role: "status",
|
|
791
839
|
"aria-live": "polite",
|
|
792
840
|
className: "flex min-w-0 items-center gap-2",
|
|
793
|
-
children: [/* @__PURE__ */
|
|
841
|
+
children: [/* @__PURE__ */ J("span", {
|
|
794
842
|
className: "flex flex-none items-center",
|
|
795
|
-
children: /* @__PURE__ */
|
|
843
|
+
children: /* @__PURE__ */ J(x, {
|
|
796
844
|
size: 14,
|
|
797
|
-
ariaLabel:
|
|
845
|
+
ariaLabel: v
|
|
798
846
|
})
|
|
799
|
-
}), t && /* @__PURE__ */
|
|
800
|
-
className: c("
|
|
801
|
-
children: /* @__PURE__ */
|
|
847
|
+
}), t && /* @__PURE__ */ J("span", {
|
|
848
|
+
className: c("max-w-[22rem] min-w-0 truncate", I.fontClassName, $.liveName),
|
|
849
|
+
children: /* @__PURE__ */ J(g, { text: t })
|
|
802
850
|
})]
|
|
803
851
|
});
|
|
804
|
-
} else if (
|
|
852
|
+
} else if (z) {
|
|
805
853
|
let t = e.filter((e) => e.status === o.Failed).length;
|
|
806
|
-
|
|
854
|
+
B = /* @__PURE__ */ Y("span", {
|
|
807
855
|
className: "inline-flex items-center gap-1",
|
|
808
|
-
children: [/* @__PURE__ */
|
|
809
|
-
className: c(
|
|
856
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
857
|
+
className: c(I.fontClassName, $.executedLabel),
|
|
810
858
|
children: [
|
|
811
|
-
|
|
859
|
+
m,
|
|
812
860
|
" ",
|
|
813
861
|
e.length,
|
|
814
862
|
" ",
|
|
815
|
-
|
|
863
|
+
h(e.length)
|
|
816
864
|
]
|
|
817
|
-
}), /* @__PURE__ */
|
|
818
|
-
className: c(
|
|
819
|
-
children:
|
|
865
|
+
}), /* @__PURE__ */ J("span", {
|
|
866
|
+
className: c(I.fontClassName, $.failedText),
|
|
867
|
+
children: _(t)
|
|
820
868
|
})]
|
|
821
869
|
});
|
|
822
|
-
} else
|
|
870
|
+
} else B = /* @__PURE__ */ Y("span", {
|
|
823
871
|
className: "inline-flex items-center gap-1",
|
|
824
|
-
children: [/* @__PURE__ */
|
|
872
|
+
children: [/* @__PURE__ */ J(w, {
|
|
825
873
|
size: f.SM,
|
|
826
874
|
className: $.doneIcon,
|
|
827
875
|
"aria-hidden": !0,
|
|
828
876
|
stroke: p
|
|
829
|
-
}), /* @__PURE__ */
|
|
830
|
-
className: c(
|
|
877
|
+
}), /* @__PURE__ */ Y("span", {
|
|
878
|
+
className: c(I.fontClassName, $.executedLabel),
|
|
831
879
|
children: [
|
|
832
|
-
|
|
880
|
+
m,
|
|
833
881
|
" ",
|
|
834
882
|
e.length,
|
|
835
883
|
" ",
|
|
836
|
-
|
|
884
|
+
h(e.length)
|
|
837
885
|
]
|
|
838
886
|
})]
|
|
839
887
|
});
|
|
840
|
-
return /* @__PURE__ */
|
|
841
|
-
style:
|
|
842
|
-
className: c("flex w-full flex-col gap-1", r,
|
|
843
|
-
children: /* @__PURE__ */
|
|
844
|
-
title:
|
|
845
|
-
expanded:
|
|
846
|
-
onToggle:
|
|
888
|
+
return /* @__PURE__ */ J("div", {
|
|
889
|
+
style: L,
|
|
890
|
+
className: c("flex w-full flex-col gap-1", r, ve.group),
|
|
891
|
+
children: /* @__PURE__ */ J(d, {
|
|
892
|
+
title: B,
|
|
893
|
+
expanded: O,
|
|
894
|
+
onToggle: k,
|
|
847
895
|
className: "overflow-visible py-0",
|
|
848
|
-
headerClassName: c("justify-start gap-1 rounded-none px-0", $.toggleButton,
|
|
896
|
+
headerClassName: c("justify-start gap-1 rounded-none px-0", $.toggleButton, ve.groupToggle),
|
|
849
897
|
contentClassName: c("-mt-2 px-0", $.groupRegion),
|
|
850
|
-
children:
|
|
898
|
+
children: O && /* @__PURE__ */ J(ft, {
|
|
851
899
|
stages: e,
|
|
852
900
|
isStreaming: t,
|
|
853
|
-
expansion:
|
|
901
|
+
expansion: A,
|
|
854
902
|
styles: {
|
|
855
|
-
colors:
|
|
903
|
+
colors: F,
|
|
856
904
|
typography: i?.typography
|
|
857
905
|
},
|
|
858
|
-
labels:
|
|
906
|
+
labels: R,
|
|
859
907
|
className: "pt-1",
|
|
860
|
-
onAttachmentClick: a
|
|
908
|
+
onAttachmentClick: a,
|
|
909
|
+
attachmentDisplayResolvers: l,
|
|
910
|
+
renderCitation: u
|
|
861
911
|
})
|
|
862
912
|
})
|
|
863
913
|
});
|
|
864
914
|
};
|
|
865
915
|
//#endregion
|
|
866
|
-
export {
|
|
916
|
+
export { ve as CONVERSATION_STAGES_CLASS, mt as CollapsedGroup, pt as StagesPanel };
|