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