@epam/ai-dial-conversation-stages 1.3.0-dev.98 → 1.3.0-rc.0
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 -2
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +460 -426
- 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,168 +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
|
-
loading: "
|
|
216
|
-
imageActionButton: "
|
|
217
|
-
|
|
218
|
-
|
|
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, {
|
|
219
219
|
icon: a,
|
|
220
|
-
size:
|
|
221
|
-
className: c(s ? "opacity-100" : "opacity-0 group-hover/attachment-tile:opacity-100 group-focus-visible/attachment-tile:opacity-100 group-has-
|
|
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),
|
|
222
222
|
"aria-label": e,
|
|
223
223
|
"aria-describedby": t ? n : void 0,
|
|
224
224
|
onClick: (e) => {
|
|
225
225
|
e.stopPropagation(), r(i);
|
|
226
226
|
}
|
|
227
|
-
}),
|
|
228
|
-
icon: /* @__PURE__ */ J(
|
|
229
|
-
size:
|
|
227
|
+
}), Xe = ({ ...e }) => /* @__PURE__ */ J(Ye, {
|
|
228
|
+
icon: /* @__PURE__ */ J(fe, {
|
|
229
|
+
size: p.SM,
|
|
230
230
|
"aria-hidden": !0,
|
|
231
|
-
stroke:
|
|
231
|
+
stroke: m
|
|
232
232
|
}),
|
|
233
233
|
className: Q.retryIcon,
|
|
234
234
|
...e
|
|
235
|
-
}),
|
|
236
|
-
icon: /* @__PURE__ */ J(
|
|
237
|
-
size:
|
|
235
|
+
}), Ze = ({ ...e }) => /* @__PURE__ */ J(Ye, {
|
|
236
|
+
icon: /* @__PURE__ */ J(O, {
|
|
237
|
+
size: p.SM,
|
|
238
238
|
"aria-hidden": !0,
|
|
239
|
-
stroke:
|
|
239
|
+
stroke: m
|
|
240
240
|
}),
|
|
241
241
|
...e
|
|
242
|
-
}),
|
|
243
|
-
icon: /* @__PURE__ */ J(
|
|
244
|
-
size:
|
|
242
|
+
}), Qe = ({ ...e }) => /* @__PURE__ */ J(Ye, {
|
|
243
|
+
icon: /* @__PURE__ */ J(k, {
|
|
244
|
+
size: p.SM,
|
|
245
245
|
"aria-hidden": !0,
|
|
246
|
-
stroke:
|
|
246
|
+
stroke: m
|
|
247
247
|
}),
|
|
248
248
|
...e
|
|
249
|
-
}),
|
|
250
|
-
icon: /* @__PURE__ */ J(
|
|
251
|
-
size:
|
|
249
|
+
}), $e = ({ className: e, ...t }) => /* @__PURE__ */ J(Ye, {
|
|
250
|
+
icon: /* @__PURE__ */ J(he, {
|
|
251
|
+
size: p.SM,
|
|
252
252
|
"aria-hidden": !0,
|
|
253
|
-
stroke:
|
|
253
|
+
stroke: m
|
|
254
254
|
}),
|
|
255
255
|
className: c("mobile:opacity-100", e),
|
|
256
256
|
...t
|
|
257
|
-
}),
|
|
257
|
+
}), et = {
|
|
258
258
|
[e.Network]: "Upload failed · network error",
|
|
259
259
|
[e.UnsupportedType]: "Upload failed · unsupported file type",
|
|
260
260
|
[e.FileTooLarge]: "Upload failed · file too large"
|
|
261
|
-
},
|
|
262
|
-
let { clickLabel:
|
|
263
|
-
|
|
264
|
-
},
|
|
265
|
-
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ce());
|
|
266
|
-
}, 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(() => {
|
|
267
265
|
window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
|
|
268
|
-
}, [t]),
|
|
269
|
-
|
|
270
|
-
|
|
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),
|
|
271
270
|
children: n ? /* @__PURE__ */ J(v, {
|
|
272
|
-
text:
|
|
271
|
+
text: G,
|
|
273
272
|
query: n,
|
|
274
273
|
maxLines: 2
|
|
275
|
-
}) :
|
|
276
|
-
}),
|
|
274
|
+
}) : G
|
|
275
|
+
}), ge = re && /* @__PURE__ */ Y("div", {
|
|
277
276
|
className: c("flex w-full items-end gap-1", Z.tileType),
|
|
278
|
-
children: [
|
|
279
|
-
type:
|
|
280
|
-
name:
|
|
281
|
-
fileExtension:
|
|
282
|
-
size:
|
|
277
|
+
children: [ae ? /* @__PURE__ */ J(_, {
|
|
278
|
+
type: h.File,
|
|
279
|
+
name: I ?? "",
|
|
280
|
+
fileExtension: Ue(t),
|
|
281
|
+
size: p.MD,
|
|
283
282
|
decorative: !0
|
|
284
|
-
}) : /* @__PURE__ */ J(
|
|
285
|
-
size:
|
|
283
|
+
}) : /* @__PURE__ */ J(re, {
|
|
284
|
+
size: p.MD,
|
|
286
285
|
className: Q.typeText,
|
|
287
|
-
stroke:
|
|
286
|
+
stroke: m,
|
|
288
287
|
"aria-hidden": !0
|
|
289
288
|
}), /* @__PURE__ */ J("span", {
|
|
290
|
-
className: c(
|
|
291
|
-
children:
|
|
289
|
+
className: c(P?.metaClassName ?? "dial-tiny-text", "min-w-0 flex-1 truncate", Q.typeText),
|
|
290
|
+
children: A ? `${ie} · ${A}` : ie
|
|
292
291
|
})]
|
|
293
|
-
}),
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
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", {
|
|
303
308
|
role: "progressbar",
|
|
304
|
-
"aria-label":
|
|
309
|
+
"aria-label": j,
|
|
305
310
|
className: c("absolute inset-0 flex items-center justify-center rounded-[11px]", Q.track),
|
|
306
|
-
children: /* @__PURE__ */ J(
|
|
311
|
+
children: /* @__PURE__ */ J("span", {
|
|
312
|
+
"aria-hidden": !0,
|
|
313
|
+
className: "flex",
|
|
314
|
+
children: /* @__PURE__ */ J(te, { size: 32 })
|
|
315
|
+
})
|
|
307
316
|
}),
|
|
308
317
|
/* @__PURE__ */ Y("div", {
|
|
309
|
-
className: "absolute
|
|
318
|
+
className: "absolute inset-e-1 top-1 flex",
|
|
310
319
|
children: [
|
|
311
|
-
|
|
312
|
-
ariaLabel:
|
|
313
|
-
errorTitle:
|
|
314
|
-
errorDescId:
|
|
320
|
+
oe && /* @__PURE__ */ J(Ze, {
|
|
321
|
+
ariaLabel: E,
|
|
322
|
+
errorTitle: H,
|
|
323
|
+
errorDescId: V,
|
|
315
324
|
onClick: l,
|
|
316
|
-
id:
|
|
325
|
+
id: F
|
|
317
326
|
}),
|
|
318
|
-
|
|
319
|
-
ariaLabel:
|
|
320
|
-
errorTitle:
|
|
321
|
-
errorDescId:
|
|
327
|
+
se && /* @__PURE__ */ J(Xe, {
|
|
328
|
+
ariaLabel: D,
|
|
329
|
+
errorTitle: H,
|
|
330
|
+
errorDescId: V,
|
|
322
331
|
onClick: i,
|
|
323
|
-
id:
|
|
332
|
+
id: F
|
|
324
333
|
}),
|
|
325
|
-
u && /* @__PURE__ */ J(
|
|
326
|
-
ariaLabel:
|
|
327
|
-
errorTitle:
|
|
328
|
-
errorDescId:
|
|
329
|
-
onClick:
|
|
334
|
+
u && /* @__PURE__ */ J(Qe, {
|
|
335
|
+
ariaLabel: k,
|
|
336
|
+
errorTitle: H,
|
|
337
|
+
errorDescId: V,
|
|
338
|
+
onClick: pe
|
|
330
339
|
}),
|
|
331
|
-
|
|
332
|
-
ariaLabel:
|
|
333
|
-
errorTitle:
|
|
334
|
-
errorDescId:
|
|
335
|
-
onClick:
|
|
336
|
-
id:
|
|
337
|
-
isAlwaysVisible:
|
|
340
|
+
x && /* @__PURE__ */ J($e, {
|
|
341
|
+
ariaLabel: O,
|
|
342
|
+
errorTitle: H,
|
|
343
|
+
errorDescId: V,
|
|
344
|
+
onClick: x,
|
|
345
|
+
id: F,
|
|
346
|
+
isAlwaysVisible: z
|
|
338
347
|
})
|
|
339
348
|
]
|
|
340
349
|
}),
|
|
341
|
-
|
|
342
|
-
id:
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
children: V
|
|
350
|
+
/* @__PURE__ */ J(y, {
|
|
351
|
+
id: V,
|
|
352
|
+
visuallyHidden: !0,
|
|
353
|
+
as: b.Span,
|
|
354
|
+
children: B ? H : ""
|
|
347
355
|
})
|
|
348
356
|
] });
|
|
349
357
|
return /* @__PURE__ */ J("div", {
|
|
350
|
-
style:
|
|
351
|
-
className: c("inline-flex",
|
|
358
|
+
style: f,
|
|
359
|
+
className: c("inline-flex", ne),
|
|
352
360
|
children: /* @__PURE__ */ J("div", {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
children: G
|
|
361
|
+
"aria-busy": z,
|
|
362
|
+
style: f,
|
|
363
|
+
className: c(me, W && "cursor-pointer", Je),
|
|
364
|
+
children: _e
|
|
358
365
|
})
|
|
359
366
|
});
|
|
360
|
-
},
|
|
367
|
+
}, nt = /* @__PURE__ */ function(e) {
|
|
361
368
|
return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
|
|
362
|
-
}({}),
|
|
363
|
-
let n =
|
|
364
|
-
return
|
|
369
|
+
}({}), rt = ({ enabled: e, src: t }) => {
|
|
370
|
+
let n = ye(null), [r, i] = be("idle");
|
|
371
|
+
return _e(() => {
|
|
365
372
|
i(e && t ? "loading" : "idle");
|
|
366
|
-
}, [e, t]),
|
|
373
|
+
}, [e, t]), _e(() => {
|
|
367
374
|
let r = n.current;
|
|
368
375
|
if (!r || !e || !t) return;
|
|
369
376
|
let a = () => i("loaded"), o = () => i("error");
|
|
@@ -374,75 +381,77 @@ var ve = {
|
|
|
374
381
|
imageRef: n,
|
|
375
382
|
imageLoadStatus: r
|
|
376
383
|
};
|
|
377
|
-
},
|
|
378
|
-
let { clickLabel: d = "Open attachment", expandLabel:
|
|
379
|
-
enabled:
|
|
380
|
-
src:
|
|
381
|
-
}),
|
|
382
|
-
|
|
383
|
-
},
|
|
384
|
-
role: "button",
|
|
385
|
-
tabIndex: 0,
|
|
386
|
-
"aria-label": T ? m : d,
|
|
387
|
-
onClick: F,
|
|
388
|
-
onKeyDown: (e) => {
|
|
389
|
-
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), F());
|
|
390
|
-
}
|
|
391
|
-
} : {};
|
|
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({
|
|
386
|
+
enabled: E,
|
|
387
|
+
src: b
|
|
388
|
+
}), N = () => {
|
|
389
|
+
C && n ? n(v) : D && r && r(v);
|
|
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);
|
|
392
391
|
return /* @__PURE__ */ J("div", {
|
|
393
|
-
className:
|
|
394
|
-
|
|
395
|
-
"aria-busy": E,
|
|
392
|
+
className: P,
|
|
393
|
+
"aria-busy": w,
|
|
396
394
|
style: o,
|
|
397
395
|
children: /* @__PURE__ */ Y("div", {
|
|
398
396
|
className: "relative h-full w-full overflow-hidden",
|
|
399
397
|
children: [
|
|
400
398
|
/* @__PURE__ */ Y("div", {
|
|
401
|
-
className: "absolute
|
|
402
|
-
children: [a && /* @__PURE__ */ J(
|
|
399
|
+
className: "absolute inset-e-1 top-1 z-10 flex",
|
|
400
|
+
children: [a && /* @__PURE__ */ J($e, {
|
|
403
401
|
ariaLabel: h,
|
|
404
402
|
onClick: a,
|
|
405
|
-
id:
|
|
403
|
+
id: v,
|
|
406
404
|
className: Q.imageActionButton,
|
|
407
|
-
isAlwaysVisible:
|
|
408
|
-
}),
|
|
405
|
+
isAlwaysVisible: w
|
|
406
|
+
}), k && /* @__PURE__ */ J(Ze, {
|
|
409
407
|
ariaLabel: g,
|
|
410
408
|
onClick: s,
|
|
411
|
-
id:
|
|
409
|
+
id: v,
|
|
412
410
|
className: Q.imageActionButton
|
|
413
411
|
})]
|
|
414
412
|
}),
|
|
415
|
-
|
|
416
|
-
variant:
|
|
413
|
+
M !== nt.Loaded && /* @__PURE__ */ J(x, {
|
|
414
|
+
variant: S.Rectangular,
|
|
417
415
|
width: "100%",
|
|
418
416
|
height: "100%",
|
|
419
|
-
active:
|
|
420
|
-
overlay: /* @__PURE__ */ J(
|
|
421
|
-
size:
|
|
417
|
+
active: M === nt.Loading,
|
|
418
|
+
overlay: /* @__PURE__ */ J(de, {
|
|
419
|
+
size: p.LG,
|
|
422
420
|
className: Q.placeholderIcon,
|
|
423
421
|
"aria-hidden": !0,
|
|
424
|
-
stroke:
|
|
422
|
+
stroke: m
|
|
425
423
|
}),
|
|
426
424
|
className: "absolute inset-0 rounded-xl"
|
|
427
425
|
}),
|
|
428
426
|
/* @__PURE__ */ J("img", {
|
|
429
|
-
ref:
|
|
430
|
-
src:
|
|
431
|
-
alt:
|
|
427
|
+
ref: j,
|
|
428
|
+
src: b,
|
|
429
|
+
alt: y,
|
|
432
430
|
loading: "lazy",
|
|
433
431
|
decoding: "async",
|
|
434
|
-
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")
|
|
435
433
|
}),
|
|
436
|
-
|
|
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", {
|
|
437
442
|
role: "progressbar",
|
|
438
|
-
"aria-label":
|
|
443
|
+
"aria-label": ee,
|
|
439
444
|
className: c("absolute inset-0 flex items-center justify-center rounded-xl", Q.track),
|
|
440
|
-
children: /* @__PURE__ */ J(
|
|
445
|
+
children: /* @__PURE__ */ J("span", {
|
|
446
|
+
"aria-hidden": !0,
|
|
447
|
+
className: "flex",
|
|
448
|
+
children: /* @__PURE__ */ J(te, { size: 32 })
|
|
449
|
+
})
|
|
441
450
|
})
|
|
442
451
|
]
|
|
443
452
|
})
|
|
444
453
|
});
|
|
445
|
-
},
|
|
454
|
+
}, at = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: c, labels: l, styles: u, isSelected: d }) => {
|
|
446
455
|
let { colors: f } = u ?? {}, p = e.type === t.Pasted && a !== void 0, m = s({
|
|
447
456
|
"--ai-tile-bg": f?.background,
|
|
448
457
|
"--ai-tile-border": f?.border,
|
|
@@ -460,8 +469,8 @@ var ve = {
|
|
|
460
469
|
"--ai-tile-hover-icon-bg": f?.hoverIconBackground,
|
|
461
470
|
"--ai-tile-hover-icon-color": f?.hoverIconColor,
|
|
462
471
|
"--ai-tile-progress-track": f?.trackBackground
|
|
463
|
-
}), { isImage: h, isLink: g } =
|
|
464
|
-
return h ? /* @__PURE__ */ J(
|
|
472
|
+
}), { isImage: h, isLink: g } = q(() => Ke(e), [e]);
|
|
473
|
+
return h ? /* @__PURE__ */ J(it, {
|
|
465
474
|
attachment: e,
|
|
466
475
|
labels: l,
|
|
467
476
|
onClick: o,
|
|
@@ -471,7 +480,7 @@ var ve = {
|
|
|
471
480
|
cssVars: m,
|
|
472
481
|
onDownload: c,
|
|
473
482
|
isSelected: d
|
|
474
|
-
}) : /* @__PURE__ */ J(
|
|
483
|
+
}) : /* @__PURE__ */ J(tt, {
|
|
475
484
|
attachment: e,
|
|
476
485
|
searchQuery: n,
|
|
477
486
|
onClick: o,
|
|
@@ -486,64 +495,76 @@ var ve = {
|
|
|
486
495
|
isExpandable: p,
|
|
487
496
|
isSelected: d
|
|
488
497
|
});
|
|
489
|
-
},
|
|
490
|
-
let
|
|
491
|
-
if (!e?.length) return
|
|
492
|
-
let
|
|
498
|
+
}, ot = (e, t) => {
|
|
499
|
+
let n = l(e, t);
|
|
500
|
+
if (!e?.length) return n;
|
|
501
|
+
let r = /* @__PURE__ */ new Map();
|
|
493
502
|
for (let t of e) {
|
|
494
503
|
let e = t.url ?? t.data ?? t.title;
|
|
495
|
-
|
|
504
|
+
r.has(e) || r.set(e, t.type);
|
|
496
505
|
}
|
|
497
|
-
return
|
|
498
|
-
let t =
|
|
506
|
+
return n.map((e) => {
|
|
507
|
+
let t = r.get(e.id);
|
|
499
508
|
return t ? {
|
|
500
509
|
...e,
|
|
501
510
|
contentType: t
|
|
502
511
|
} : e;
|
|
503
512
|
});
|
|
504
|
-
},
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
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
|
+
]);
|
|
514
544
|
return /* @__PURE__ */ J(i, {
|
|
515
545
|
content: e,
|
|
516
546
|
tableScrollRegionAriaLabel: a,
|
|
517
547
|
mathScrollRegionAriaLabel: o,
|
|
518
548
|
classNames: {
|
|
519
|
-
h1:
|
|
520
|
-
h2:
|
|
521
|
-
h3:
|
|
522
|
-
h4:
|
|
523
|
-
h5:
|
|
524
|
-
h6:
|
|
549
|
+
h1: u,
|
|
550
|
+
h2: u,
|
|
551
|
+
h3: u,
|
|
552
|
+
h4: u,
|
|
553
|
+
h5: u,
|
|
554
|
+
h6: u,
|
|
525
555
|
p: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, "mb-1.5"),
|
|
526
|
-
ul: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent,
|
|
527
|
-
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),
|
|
528
558
|
strong: c(t?.strongClassName ?? t?.contentClassName ?? "dial-tiny-text", X.stageContent),
|
|
529
559
|
codeInline: X.codeInline,
|
|
530
|
-
blockquote: c(t?.contentClassName ?? "dial-tiny-text", X.blockquote,
|
|
560
|
+
blockquote: c(t?.contentClassName ?? "dial-tiny-text", X.blockquote, l),
|
|
531
561
|
link: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent),
|
|
532
562
|
tableCell: c(t?.contentClassName ?? "dial-tiny-text", X.tableCell)
|
|
533
563
|
},
|
|
534
|
-
components:
|
|
535
|
-
codeClassName: i,
|
|
536
|
-
blockClassName: t?.codeBlockClassName,
|
|
537
|
-
copyAriaLabel: n,
|
|
538
|
-
copiedLabel: r,
|
|
539
|
-
children: e
|
|
540
|
-
}) : /* @__PURE__ */ J("code", {
|
|
541
|
-
className: c("px-1 py-0.5", t?.codeClassName ?? "dial-tiny-text rounded-md", X.codeInline),
|
|
542
|
-
children: e
|
|
543
|
-
}) }
|
|
564
|
+
components: d
|
|
544
565
|
});
|
|
545
|
-
}),
|
|
546
|
-
let r =
|
|
566
|
+
}), lt = ({ attachments: e, clickLabel: t, onAttachmentClick: n }) => {
|
|
567
|
+
let r = K((t) => {
|
|
547
568
|
let r = e.find((e) => e.id === t);
|
|
548
569
|
r && n?.(r);
|
|
549
570
|
}, [e, n]);
|
|
@@ -552,29 +573,29 @@ var ve = {
|
|
|
552
573
|
className: "flex flex-wrap gap-2",
|
|
553
574
|
children: e.map((e) => /* @__PURE__ */ J("div", {
|
|
554
575
|
role: "listitem",
|
|
555
|
-
children: /* @__PURE__ */ J(
|
|
576
|
+
children: /* @__PURE__ */ J(at, {
|
|
556
577
|
attachment: e,
|
|
557
578
|
onClick: n && r,
|
|
558
579
|
labels: { clickLabel: t }
|
|
559
580
|
})
|
|
560
581
|
}, e.id))
|
|
561
582
|
});
|
|
562
|
-
},
|
|
563
|
-
let [
|
|
564
|
-
|
|
565
|
-
}, [
|
|
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: [
|
|
566
587
|
/* @__PURE__ */ J("span", {
|
|
567
588
|
className: "flex flex-none items-center",
|
|
568
|
-
children: /* @__PURE__ */ J(
|
|
589
|
+
children: /* @__PURE__ */ J(Re, {
|
|
569
590
|
status: e.status,
|
|
570
591
|
isLive: t,
|
|
571
|
-
runningLabel:
|
|
572
|
-
failedLabel:
|
|
592
|
+
runningLabel: S,
|
|
593
|
+
failedLabel: te
|
|
573
594
|
})
|
|
574
595
|
}),
|
|
575
596
|
/* @__PURE__ */ J("span", {
|
|
576
|
-
className: c("max-w-
|
|
577
|
-
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 || "" })
|
|
578
599
|
}),
|
|
579
600
|
e.tag && /* @__PURE__ */ J("span", {
|
|
580
601
|
className: c("flex-none", n?.tagClassName ?? "dial-tiny-lead-text", X.tag),
|
|
@@ -585,162 +606,171 @@ var ve = {
|
|
|
585
606
|
children: E
|
|
586
607
|
})
|
|
587
608
|
] });
|
|
588
|
-
return j ? /* @__PURE__ */ Y(
|
|
589
|
-
expanded:
|
|
590
|
-
onToggle:
|
|
609
|
+
return j ? /* @__PURE__ */ Y(f, {
|
|
610
|
+
expanded: g,
|
|
611
|
+
onToggle: _,
|
|
591
612
|
title: /* @__PURE__ */ J("span", {
|
|
592
613
|
className: "flex min-w-0 items-center gap-2",
|
|
593
614
|
children: M
|
|
594
615
|
}),
|
|
595
|
-
className:
|
|
596
|
-
headerClassName: c(
|
|
616
|
+
className: Fe,
|
|
617
|
+
headerClassName: c(Ie, X.row, X.stageHeader),
|
|
597
618
|
contentClassName: c("-mt-1 flex min-w-0 flex-col gap-3 px-0 py-1", X.stageRegion),
|
|
598
|
-
children: [
|
|
619
|
+
children: [g && A && /* @__PURE__ */ Y("div", {
|
|
599
620
|
className: "flex min-w-0 flex-col gap-3 ps-8",
|
|
600
621
|
children: [e.content && /* @__PURE__ */ J("div", {
|
|
601
622
|
className: "max-h-[300px] min-w-0 overflow-y-auto",
|
|
602
|
-
children: /* @__PURE__ */ J(
|
|
623
|
+
children: /* @__PURE__ */ J(ct, {
|
|
603
624
|
content: e.content,
|
|
604
625
|
typography: n,
|
|
605
|
-
copyAriaLabel:
|
|
606
|
-
copiedLabel:
|
|
607
|
-
tableScrollRegionAriaLabel:
|
|
608
|
-
mathScrollRegionAriaLabel:
|
|
626
|
+
copyAriaLabel: v,
|
|
627
|
+
copiedLabel: y,
|
|
628
|
+
tableScrollRegionAriaLabel: b,
|
|
629
|
+
mathScrollRegionAriaLabel: x,
|
|
630
|
+
renderCitation: l
|
|
609
631
|
})
|
|
610
|
-
}), w.length > 0 && /* @__PURE__ */ J(
|
|
632
|
+
}), w.length > 0 && /* @__PURE__ */ J(lt, {
|
|
611
633
|
attachments: w,
|
|
612
634
|
clickLabel: C,
|
|
613
635
|
onAttachmentClick: a
|
|
614
636
|
})]
|
|
615
|
-
}),
|
|
637
|
+
}), g && u]
|
|
616
638
|
}) : /* @__PURE__ */ J("div", {
|
|
617
639
|
className: c("flex w-full items-center gap-2 px-2 py-1.5", X.row),
|
|
618
640
|
children: M
|
|
619
641
|
});
|
|
620
|
-
},
|
|
621
|
-
let
|
|
622
|
-
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, {
|
|
623
645
|
stage: e.stage,
|
|
624
646
|
nameOverride: n,
|
|
625
647
|
isLive: r && e.stage.status == null,
|
|
626
648
|
typography: a,
|
|
627
649
|
labels: o,
|
|
628
650
|
onAttachmentClick: s,
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
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, {
|
|
632
656
|
nodes: e.children,
|
|
633
|
-
depth:
|
|
634
|
-
className:
|
|
657
|
+
depth: d,
|
|
658
|
+
className: dt(d),
|
|
635
659
|
isStreaming: r,
|
|
636
660
|
expansion: i,
|
|
637
661
|
typography: a,
|
|
638
662
|
labels: o,
|
|
639
|
-
onAttachmentClick: s
|
|
663
|
+
onAttachmentClick: s,
|
|
664
|
+
attachmentDisplayResolvers: c,
|
|
665
|
+
renderCitation: l
|
|
640
666
|
}) : void 0
|
|
641
667
|
});
|
|
642
|
-
},
|
|
643
|
-
let { runningAriaLabel:
|
|
644
|
-
|
|
645
|
-
let
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
/* @__PURE__ */ J(
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
runningLabel: l,
|
|
656
|
-
failedLabel: u
|
|
657
|
-
})
|
|
658
|
-
}),
|
|
659
|
-
/* @__PURE__ */ J("span", {
|
|
660
|
-
className: c("max-w-[22rem] min-w-0 truncate", i?.fontClassName ?? "dial-small-text", X.stageName, h && X.stageNameFailed),
|
|
661
|
-
children: /* @__PURE__ */ J(g, { text: e.name })
|
|
662
|
-
}),
|
|
663
|
-
/* @__PURE__ */ Y("span", {
|
|
664
|
-
className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", X.count),
|
|
665
|
-
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
|
|
666
681
|
})
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
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),
|
|
674
700
|
children: /* @__PURE__ */ J("ul", {
|
|
675
701
|
role: "list",
|
|
676
702
|
className: "flex min-w-0 flex-col gap-0.5",
|
|
677
|
-
children:
|
|
703
|
+
children: b && h.map((e, t) => /* @__PURE__ */ J("li", {
|
|
678
704
|
role: "listitem",
|
|
679
705
|
className: "min-w-0",
|
|
680
|
-
children: /* @__PURE__ */ J(
|
|
706
|
+
children: /* @__PURE__ */ J(pt, {
|
|
681
707
|
node: e,
|
|
682
|
-
depth:
|
|
683
|
-
nameOverride:
|
|
708
|
+
depth: x,
|
|
709
|
+
nameOverride: m(t + 1),
|
|
684
710
|
isStreaming: n,
|
|
685
711
|
expansion: r,
|
|
686
712
|
typography: i,
|
|
687
713
|
labels: a,
|
|
688
|
-
onAttachmentClick: s
|
|
714
|
+
onAttachmentClick: s,
|
|
715
|
+
attachmentDisplayResolvers: l,
|
|
716
|
+
renderCitation: u
|
|
689
717
|
})
|
|
690
718
|
}, e.stage.index))
|
|
691
719
|
})
|
|
692
720
|
});
|
|
693
|
-
},
|
|
721
|
+
}, ht = ({ nodes: e, depth: t, className: n, ...r }) => /* @__PURE__ */ J("ul", {
|
|
694
722
|
role: "list",
|
|
695
723
|
className: c("flex min-w-0 flex-col gap-0.5", n),
|
|
696
|
-
children:
|
|
724
|
+
children: Le(e).map((e) => /* @__PURE__ */ J("li", {
|
|
697
725
|
role: "listitem",
|
|
698
726
|
className: "min-w-0",
|
|
699
|
-
children: e.node ? /* @__PURE__ */ J(
|
|
727
|
+
children: e.node ? /* @__PURE__ */ J(pt, {
|
|
700
728
|
node: e.node,
|
|
701
729
|
depth: t,
|
|
702
730
|
...r
|
|
703
|
-
}) : /* @__PURE__ */ J(
|
|
731
|
+
}) : /* @__PURE__ */ J(mt, {
|
|
704
732
|
row: e,
|
|
705
733
|
depth: t,
|
|
706
734
|
...r
|
|
707
735
|
})
|
|
708
736
|
}, e.key))
|
|
709
|
-
}),
|
|
710
|
-
let { colors:
|
|
711
|
-
"--cs-text":
|
|
712
|
-
"--cs-row-hover":
|
|
713
|
-
"--cs-button-bg":
|
|
714
|
-
"--cs-stage-text":
|
|
715
|
-
"--cs-failed-text":
|
|
716
|
-
"--cs-tag-text":
|
|
717
|
-
"--cs-count-text":
|
|
718
|
-
"--cs-duration-text":
|
|
719
|
-
"--cs-icon-secondary":
|
|
720
|
-
"--cs-icon-completed":
|
|
721
|
-
"--cs-icon-error":
|
|
722
|
-
"--cs-code-bg":
|
|
723
|
-
"--cs-code-border":
|
|
724
|
-
"--cs-code-text":
|
|
725
|
-
"--cs-border":
|
|
726
|
-
}),
|
|
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]);
|
|
727
755
|
return /* @__PURE__ */ J("div", {
|
|
728
|
-
style:
|
|
729
|
-
className: c("w-full min-w-0", X.panel, n,
|
|
730
|
-
children: /* @__PURE__ */ J(
|
|
731
|
-
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,
|
|
732
760
|
depth: 0,
|
|
733
761
|
className: "w-full ps-5",
|
|
734
762
|
isStreaming: t,
|
|
735
|
-
expansion:
|
|
736
|
-
typography:
|
|
763
|
+
expansion: u,
|
|
764
|
+
typography: f,
|
|
737
765
|
labels: i,
|
|
738
|
-
onAttachmentClick: a
|
|
766
|
+
onAttachmentClick: a,
|
|
767
|
+
attachmentDisplayResolvers: o,
|
|
768
|
+
renderCitation: l
|
|
739
769
|
})
|
|
740
770
|
});
|
|
741
|
-
},
|
|
742
|
-
let t =
|
|
743
|
-
return /* @__PURE__ */ J(
|
|
771
|
+
}, _t = (e) => {
|
|
772
|
+
let t = Ce();
|
|
773
|
+
return /* @__PURE__ */ J(gt, {
|
|
744
774
|
...e,
|
|
745
775
|
expansion: t
|
|
746
776
|
});
|
|
@@ -751,20 +781,20 @@ var ve = {
|
|
|
751
781
|
doneIcon: "_doneIcon_16fae_36",
|
|
752
782
|
failedText: "_failedText_16fae_40",
|
|
753
783
|
liveName: "_liveName_16fae_44"
|
|
754
|
-
},
|
|
755
|
-
let { executedLabel:
|
|
756
|
-
|
|
757
|
-
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();
|
|
758
788
|
}, [
|
|
759
789
|
A,
|
|
760
|
-
|
|
790
|
+
T,
|
|
761
791
|
k
|
|
762
792
|
]);
|
|
763
|
-
let j =
|
|
764
|
-
|
|
793
|
+
let j = ye(t);
|
|
794
|
+
_e(() => {
|
|
765
795
|
j.current && !t && D(!1), j.current = t;
|
|
766
796
|
}, [t]);
|
|
767
|
-
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({
|
|
768
798
|
"--cs-cg-label": M?.labelColor,
|
|
769
799
|
"--cs-cg-label-hover": M?.labelHoverColor,
|
|
770
800
|
"--cs-cg-done": M?.doneColor,
|
|
@@ -786,17 +816,17 @@ var ve = {
|
|
|
786
816
|
"--cs-border": N?.borderColor
|
|
787
817
|
});
|
|
788
818
|
if (e.length === 0) return null;
|
|
789
|
-
let
|
|
790
|
-
copyAriaLabel:
|
|
791
|
-
codeBlockCopiedLabel:
|
|
792
|
-
tableScrollRegionAriaLabel:
|
|
793
|
-
mathScrollRegionAriaLabel:
|
|
794
|
-
runningAriaLabel:
|
|
819
|
+
let F = {
|
|
820
|
+
copyAriaLabel: v,
|
|
821
|
+
codeBlockCopiedLabel: y,
|
|
822
|
+
tableScrollRegionAriaLabel: b,
|
|
823
|
+
mathScrollRegionAriaLabel: x,
|
|
824
|
+
runningAriaLabel: _,
|
|
795
825
|
failedAriaLabel: S,
|
|
796
826
|
attemptLabel: C,
|
|
797
|
-
attachmentClickLabel:
|
|
827
|
+
attachmentClickLabel: w
|
|
798
828
|
};
|
|
799
|
-
if (e.length === 1) return /* @__PURE__ */ J(
|
|
829
|
+
if (e.length === 1) return /* @__PURE__ */ J(gt, {
|
|
800
830
|
stages: e,
|
|
801
831
|
isStreaming: t,
|
|
802
832
|
expansion: O,
|
|
@@ -805,74 +835,76 @@ var ve = {
|
|
|
805
835
|
colors: N,
|
|
806
836
|
typography: i?.typography
|
|
807
837
|
},
|
|
808
|
-
labels:
|
|
809
|
-
onAttachmentClick: a
|
|
838
|
+
labels: F,
|
|
839
|
+
onAttachmentClick: a,
|
|
840
|
+
attachmentDisplayResolvers: l,
|
|
841
|
+
renderCitation: u
|
|
810
842
|
});
|
|
811
|
-
let
|
|
843
|
+
let I = e.some((e) => e.status === o.Failed), L;
|
|
812
844
|
if (t) {
|
|
813
|
-
let t =
|
|
814
|
-
|
|
845
|
+
let t = Oe((Ae(e) ?? e[e.length - 1]).name).name;
|
|
846
|
+
L = /* @__PURE__ */ Y("span", {
|
|
815
847
|
role: "status",
|
|
816
848
|
"aria-live": "polite",
|
|
817
849
|
className: "flex min-w-0 items-center gap-2",
|
|
818
850
|
children: [/* @__PURE__ */ J("span", {
|
|
819
851
|
className: "flex flex-none items-center",
|
|
820
|
-
children: /* @__PURE__ */ J(
|
|
852
|
+
children: /* @__PURE__ */ J(te, {
|
|
821
853
|
size: 14,
|
|
822
|
-
ariaLabel:
|
|
854
|
+
ariaLabel: _
|
|
823
855
|
})
|
|
824
856
|
}), t && /* @__PURE__ */ J("span", {
|
|
825
|
-
className: c("max-w-
|
|
826
|
-
children: /* @__PURE__ */ J(
|
|
857
|
+
className: c("max-w-88 min-w-0 truncate", P.fontClassName, $.liveName),
|
|
858
|
+
children: /* @__PURE__ */ J(ee, { text: t })
|
|
827
859
|
})]
|
|
828
860
|
});
|
|
829
|
-
} else if (
|
|
861
|
+
} else if (I) {
|
|
830
862
|
let t = e.filter((e) => e.status === o.Failed).length;
|
|
831
|
-
|
|
863
|
+
L = /* @__PURE__ */ Y("span", {
|
|
832
864
|
className: "inline-flex items-center gap-1",
|
|
833
865
|
children: [/* @__PURE__ */ Y("span", {
|
|
834
866
|
className: c(P.fontClassName, $.executedLabel),
|
|
835
867
|
children: [
|
|
836
|
-
|
|
868
|
+
d,
|
|
837
869
|
" ",
|
|
838
870
|
e.length,
|
|
839
871
|
" ",
|
|
840
|
-
|
|
872
|
+
h(e.length)
|
|
841
873
|
]
|
|
842
874
|
}), /* @__PURE__ */ J("span", {
|
|
843
875
|
className: c(P.fontClassName, $.failedText),
|
|
844
|
-
children:
|
|
876
|
+
children: g(t)
|
|
845
877
|
})]
|
|
846
878
|
});
|
|
847
|
-
} else
|
|
879
|
+
} else L = /* @__PURE__ */ Y("span", {
|
|
848
880
|
className: "inline-flex items-center gap-1",
|
|
849
|
-
children: [/* @__PURE__ */ J(
|
|
850
|
-
size:
|
|
881
|
+
children: [/* @__PURE__ */ J(E, {
|
|
882
|
+
size: p.SM,
|
|
851
883
|
className: $.doneIcon,
|
|
852
884
|
"aria-hidden": !0,
|
|
853
|
-
stroke:
|
|
885
|
+
stroke: m
|
|
854
886
|
}), /* @__PURE__ */ Y("span", {
|
|
855
887
|
className: c(P.fontClassName, $.executedLabel),
|
|
856
888
|
children: [
|
|
857
|
-
|
|
889
|
+
d,
|
|
858
890
|
" ",
|
|
859
891
|
e.length,
|
|
860
892
|
" ",
|
|
861
|
-
|
|
893
|
+
h(e.length)
|
|
862
894
|
]
|
|
863
895
|
})]
|
|
864
896
|
});
|
|
865
897
|
return /* @__PURE__ */ J("div", {
|
|
866
|
-
style:
|
|
867
|
-
className: c("flex w-full flex-col gap-1", r,
|
|
868
|
-
children: /* @__PURE__ */ J(
|
|
869
|
-
title:
|
|
870
|
-
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,
|
|
871
903
|
onToggle: D,
|
|
872
904
|
className: "overflow-visible py-0",
|
|
873
|
-
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),
|
|
874
906
|
contentClassName: c("-mt-2 px-0", $.groupRegion),
|
|
875
|
-
children:
|
|
907
|
+
children: T && /* @__PURE__ */ J(gt, {
|
|
876
908
|
stages: e,
|
|
877
909
|
isStreaming: t,
|
|
878
910
|
expansion: O,
|
|
@@ -880,12 +912,14 @@ var ve = {
|
|
|
880
912
|
colors: N,
|
|
881
913
|
typography: i?.typography
|
|
882
914
|
},
|
|
883
|
-
labels:
|
|
915
|
+
labels: F,
|
|
884
916
|
className: "pt-1",
|
|
885
|
-
onAttachmentClick: a
|
|
917
|
+
onAttachmentClick: a,
|
|
918
|
+
attachmentDisplayResolvers: l,
|
|
919
|
+
renderCitation: u
|
|
886
920
|
})
|
|
887
921
|
})
|
|
888
922
|
});
|
|
889
923
|
};
|
|
890
924
|
//#endregion
|
|
891
|
-
export {
|
|
925
|
+
export { Se as CONVERSATION_STAGES_CLASS, vt as CollapsedGroup, _t as StagesPanel };
|