@epam/ai-dial-conversation-stages 1.2.0-dev.285 → 1.2.0-dev.288

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsedGroup.d.ts","sourceRoot":"","sources":["../../../src/components/CollapsedGroup/CollapsedGroup.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAGxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAUxE,gJAAgJ;AAChJ,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAwOlD,CAAC"}
1
+ {"version":3,"file":"CollapsedGroup.d.ts","sourceRoot":"","sources":["../../../src/components/CollapsedGroup/CollapsedGroup.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAGxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAMxE,gJAAgJ;AAChJ,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA8MlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StageList.d.ts","sourceRoot":"","sources":["../../../src/components/StageList/StageList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EAChB,MAAM,2BAA2B,CAAC;AAcnC,+DAA+D;AAC/D,UAAU,eAAe;IACvB,iFAAiF;IACjF,WAAW,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,SAAS,EAAE,cAAc,CAAC;IAC1B,+DAA+D;IAC/D,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,gHAAgH;IAChH,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;CAC3D;AAED,mCAAmC;AACnC,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,mDAAmD;IACnD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAwLD,mGAAmG;AACnG,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAoBxC,CAAC"}
1
+ {"version":3,"file":"StageList.d.ts","sourceRoot":"","sources":["../../../src/components/StageList/StageList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EAChB,MAAM,2BAA2B,CAAC;AAUnC,+DAA+D;AAC/D,UAAU,eAAe;IACvB,iFAAiF;IACjF,WAAW,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,SAAS,EAAE,cAAc,CAAC;IAC1B,+DAA+D;IAC/D,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,gHAAgH;IAChH,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;CAC3D;AAED,mCAAmC;AACnC,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,mDAAmD;IACnD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAwKD,mGAAmG;AACnG,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAoBxC,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
- ._panel_w65is_2{color:var(--cs-text,var(--text-primary,#161b2d))}._row_w65is_6:hover{background:var(--cs-row-hover,var(--bg-layer-sunken,#eef1f7))}._collapseButton_w65is_10{background:var(--cs-button-bg,transparent)}._stageHeader_w65is_19._stageHeader_w65is_19:hover{background:var(--cs-row-hover,var(--bg-layer-sunken,#eef1f7))}._stageHeader_w65is_19._stageHeader_w65is_19>svg{color:var(--cs-icon-secondary,var(--text-secondary,#57647a));opacity:.7}._stageRegion_w65is_28._stageRegion_w65is_28{color:inherit}._stageName_w65is_32{color:var(--cs-stage-text,var(--text-secondary,#57647a))}._stageNameFailed_w65is_36{color:var(--cs-failed-text,var(--text-warning,#7f6300))}._monoName_w65is_40{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}._tag_w65is_44{color:var(--cs-tag-text,var(--text-tertiary,#848e9c))}._count_w65is_48{color:var(--cs-count-text,var(--text-tertiary,#848e9c));font-variant-numeric:tabular-nums}._duration_w65is_53{color:var(--cs-duration-text,var(--text-tertiary,#848e9c));font-variant-numeric:tabular-nums}._iconSecondary_w65is_58{color:var(--cs-icon-secondary,var(--text-secondary,#57647a));opacity:.7}._iconCompleted_w65is_63{color:var(--cs-icon-completed,var(--text-success,#007274))}._iconError_w65is_67{color:var(--cs-icon-error,var(--text-warning,#7f6300))}._stageContent_w65is_71{color:var(--cs-stage-text,var(--text-secondary,#57647a))}._codeBlock_w65is_75{background:var(--cs-code-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cs-code-border,var(--stroke-secondary,#d1dbea));color:var(--cs-code-text,var(--text-primary,#161b2d))}._codeInline_w65is_84{font-family:var(--theme-font-mono,var(--font-fira-code,"Fira Code"), ui-monospace, monospace);background:var(--cs-code-bg,var(--bg-layer-raised,#fcfcfc));border:1px solid var(--cs-code-border,var(--stroke-secondary,#d1dbea));color:var(--cs-code-text,var(--text-primary,#161b2d))}._blockquote_w65is_91{border-color:var(--cs-stage-text,var(--text-secondary,#57647a));color:var(--cs-stage-text,var(--text-secondary,#57647a))}._tableCell_w65is_96{border-color:var(--cs-border,var(--stroke-secondary,#d1dbea));color:var(--cs-stage-text,var(--text-secondary,#57647a))}._toggleButton_1kyyc_7._toggleButton_1kyyc_7{color:var(--cs-cg-label,var(--text-secondary,#57647a));text-align:start;width:100%;min-width:0}._toggleButton_1kyyc_7._toggleButton_1kyyc_7:hover{color:var(--cs-cg-label-hover,var(--text-primary,#161b2d));background:0 0}._toggleButton_1kyyc_7._toggleButton_1kyyc_7>svg{width:12px;height:12px;color:inherit}._toggleButton_1kyyc_7._toggleButton_1kyyc_7>span>span{white-space:normal}._groupRegion_1kyyc_28._groupRegion_1kyyc_28{color:inherit}._executedLabel_1kyyc_32{color:var(--cs-cg-label,var(--text-secondary,#57647a))}._stepsCount_1kyyc_36{color:var(--cs-cg-steps-count,var(--text-tertiary,#848e9c));font-variant-numeric:tabular-nums}._doneIcon_1kyyc_41{color:var(--cs-cg-done,var(--text-success,#007274))}._failedText_1kyyc_45{color:var(--cs-cg-failed,var(--text-warning,#7f6300))}._liveName_1kyyc_49{color:var(--cs-cg-label,var(--text-primary,#161b2d))}
1
+ ._panel_w65is_2{color:var(--cs-text,var(--text-primary,#161b2d))}._row_w65is_6:hover{background:var(--cs-row-hover,var(--bg-layer-sunken,#eef1f7))}._collapseButton_w65is_10{background:var(--cs-button-bg,transparent)}._stageHeader_w65is_19._stageHeader_w65is_19:hover{background:var(--cs-row-hover,var(--bg-layer-sunken,#eef1f7))}._stageHeader_w65is_19._stageHeader_w65is_19>svg{color:var(--cs-icon-secondary,var(--text-secondary,#57647a));opacity:.7}._stageRegion_w65is_28._stageRegion_w65is_28{color:inherit}._stageName_w65is_32{color:var(--cs-stage-text,var(--text-secondary,#57647a))}._stageNameFailed_w65is_36{color:var(--cs-failed-text,var(--text-warning,#7f6300))}._monoName_w65is_40{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}._tag_w65is_44{color:var(--cs-tag-text,var(--text-tertiary,#848e9c))}._count_w65is_48{color:var(--cs-count-text,var(--text-tertiary,#848e9c));font-variant-numeric:tabular-nums}._duration_w65is_53{color:var(--cs-duration-text,var(--text-tertiary,#848e9c));font-variant-numeric:tabular-nums}._iconSecondary_w65is_58{color:var(--cs-icon-secondary,var(--text-secondary,#57647a));opacity:.7}._iconCompleted_w65is_63{color:var(--cs-icon-completed,var(--text-success,#007274))}._iconError_w65is_67{color:var(--cs-icon-error,var(--text-warning,#7f6300))}._stageContent_w65is_71{color:var(--cs-stage-text,var(--text-secondary,#57647a))}._codeBlock_w65is_75{background:var(--cs-code-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cs-code-border,var(--stroke-secondary,#d1dbea));color:var(--cs-code-text,var(--text-primary,#161b2d))}._codeInline_w65is_84{font-family:var(--theme-font-mono,var(--font-fira-code,"Fira Code"), ui-monospace, monospace);background:var(--cs-code-bg,var(--bg-layer-raised,#fcfcfc));border:1px solid var(--cs-code-border,var(--stroke-secondary,#d1dbea));color:var(--cs-code-text,var(--text-primary,#161b2d))}._blockquote_w65is_91{border-color:var(--cs-stage-text,var(--text-secondary,#57647a));color:var(--cs-stage-text,var(--text-secondary,#57647a))}._tableCell_w65is_96{border-color:var(--cs-border,var(--stroke-secondary,#d1dbea));color:var(--cs-stage-text,var(--text-secondary,#57647a))}._toggleButton_16fae_7._toggleButton_16fae_7{color:var(--cs-cg-label,var(--text-secondary,#57647a));text-align:start;width:100%;min-width:0}._toggleButton_16fae_7._toggleButton_16fae_7:hover{color:var(--cs-cg-label-hover,var(--text-primary,#161b2d));background:0 0}._toggleButton_16fae_7._toggleButton_16fae_7>svg{width:12px;height:12px;color:inherit}._toggleButton_16fae_7._toggleButton_16fae_7>span>span{white-space:normal}._groupRegion_16fae_28._groupRegion_16fae_28{color:inherit}._executedLabel_16fae_32{color:var(--cs-cg-label,var(--text-secondary,#57647a))}._doneIcon_16fae_36{color:var(--cs-cg-done,var(--text-success,#007274))}._failedText_16fae_40{color:var(--cs-cg-failed,var(--text-warning,#7f6300))}._liveName_16fae_44{color:var(--cs-cg-label,var(--text-primary,#161b2d))}
2
2
  /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.collapse{visibility:collapse}.-mt-1{margin-top:-.25rem}.-mt-2{margin-top:-.5rem}.mb-1\.5{margin-bottom:.375rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.max-h-\[300px\]{max-height:300px}.w-full{width:100%}.min-w-0{min-width:0}.max-w-\[22rem\]{max-width:22rem}.flex-none{flex:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-start{justify-content:flex-start}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0{padding-bottom:0;padding-top:0}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.ps-0{padding-inline-start:0}.ps-4{padding-inline-start:1rem}.ps-5{padding-inline-start:1.25rem}.ps-6{padding-inline-start:1.5rem}.ps-8{padding-inline-start:2rem}.pt-1{padding-top:.25rem}.text-start{text-align:start}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.last\:mb-0:last-child{margin-bottom:0}@media (max-width:1279px){.mobile\:min-h-11{min-height:2.75rem}}
package/index.js CHANGED
@@ -1,24 +1,24 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, MIME_TYPE_EXT_MAP as n, MarkdownCodeBlock as r, MarkdownRenderer as i, RequestStatus as a, StageStatus as o, buildCssVars as s, mergeClasses as c, messageAttachmentsToDisplayAttachments as l, normalizeMimeType as u } from "@epam/ai-dial-chat-shared";
2
2
  import { Accordion as d, DIAL_ICON_SIZE as f, DIAL_KIT_ICON_STROKE as p, ElementSize as m, EllipsisTooltip as h, Highlight as g, Skeleton as _, SkeletonVariant as v, Spinner as y, StaticIconButton as b } from "@epam/ai-dial-ui-kit";
3
- import { IconAlertCircle as x, IconCheck as S, IconClipboard as C, IconDownload as w, IconExternalLink as T, IconFile as E, IconFileTypeBmp as D, IconFileTypeCss as O, IconFileTypeCsv as k, IconFileTypeDoc as A, IconFileTypeDocx as j, IconFileTypeHtml as M, IconFileTypeJpg as N, IconFileTypeJs as P, IconFileTypeJsx as F, IconFileTypePdf as I, IconFileTypePhp as L, IconFileTypePng as ee, IconFileTypePpt as R, IconFileTypeRs as te, IconFileTypeSql as z, IconFileTypeSvg as ne, IconFileTypeTs as re, IconFileTypeTsx as B, IconFileTypeTxt as ie, IconFileTypeVue as ae, IconFileTypeXls as oe, IconFileTypeXml as se, IconFileTypeZip as ce, IconMusic as le, IconPhoto as ue, IconReload as de, IconTerminal2 as fe, IconVideo as pe, IconX as me } from "@tabler/icons-react";
4
- import { memo as he, useCallback as V, useEffect as H, useId as ge, useMemo as U, useRef as _e, useState as W } from "react";
5
- import { Fragment as ve, jsx as G, jsxs as K } from "react/jsx-runtime";
3
+ import { IconAlertCircle as x, IconCheck as S, IconClipboard as C, IconDownload as w, IconExternalLink as T, IconFile as E, IconFileTypeBmp as D, IconFileTypeCss as O, IconFileTypeCsv as k, IconFileTypeDoc as A, IconFileTypeDocx as j, IconFileTypeHtml as M, IconFileTypeJpg as N, IconFileTypeJs as P, IconFileTypeJsx as F, IconFileTypePdf as I, IconFileTypePhp as ee, IconFileTypePng as te, IconFileTypePpt as L, IconFileTypeRs as ne, IconFileTypeSql as re, IconFileTypeSvg as ie, IconFileTypeTs as ae, IconFileTypeTsx as R, IconFileTypeTxt as oe, IconFileTypeVue as se, IconFileTypeXls as ce, IconFileTypeXml as le, IconFileTypeZip as ue, IconMusic as de, IconPhoto as fe, IconReload as pe, IconTerminal2 as me, IconVideo as he, IconX as ge } from "@tabler/icons-react";
4
+ import { memo as _e, useCallback as z, useEffect as B, useId as ve, useMemo as V, useRef as ye, useState as H } from "react";
5
+ import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
6
6
  //#region src/constants/public-class-names.ts
7
- var q = {
7
+ var K = {
8
8
  panel: "dial-conversation-stages-panel",
9
9
  group: "dial-conversation-stages-group",
10
10
  groupToggle: "dial-conversation-stages-group-toggle"
11
- }, ye = () => {
12
- let [e, t] = W(() => /* @__PURE__ */ new Set()), n = V((e, n) => {
11
+ }, be = () => {
12
+ let [e, t] = H(() => /* @__PURE__ */ new Set()), n = z((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 = V(() => {
18
+ }, []), r = z(() => {
19
19
  t((e) => e.size ? /* @__PURE__ */ new Set() : e);
20
20
  }, []);
21
- return U(() => ({
21
+ return V(() => ({
22
22
  isExpanded: (t) => e.has(t),
23
23
  onToggle: n,
24
24
  reset: r
@@ -27,60 +27,30 @@ var q = {
27
27
  n,
28
28
  r
29
29
  ]);
30
- }, be = /[([][^()[\]]*[)\]]/g, xe = /(\d+(?:\.\d+)?)\s*s\b/, Se = /\bStart:\s*(\d{1,2}):([0-5]\d):([0-5]\d(?:\.\d+)?)\b/i, Ce = (e) => {
30
+ }, xe = /[([][^()[\]]*[)\]]/g, Se = /(\d+(?:\.\d+)?)\s*s\b/, Ce = (e) => {
31
31
  let t = e.trimEnd();
32
32
  return t.endsWith(":") ? t.slice(0, -1) : t;
33
- }, we = 1440 * 60, Te = we / 2, Ee = (e) => {
34
- let t = Se.exec(e);
35
- if (!t) return;
36
- let n = Number(t[1]);
37
- if (!(n > 23)) return n * 60 * 60 + Number(t[2]) * 60 + Number(t[3]);
38
- }, De = (e) => {
39
- be.lastIndex = 0;
33
+ }, we = (e) => {
34
+ xe.lastIndex = 0;
40
35
  let t;
41
- for (; t = be.exec(e);) {
42
- let e = t[0].slice(1, -1), n = xe.exec(e);
36
+ for (; t = xe.exec(e);) {
37
+ let e = t[0].slice(1, -1), n = Se.exec(e);
43
38
  if (n) return {
44
39
  durationLabel: `${n[1]}s`,
45
40
  groupIndex: t.index,
46
- groupLength: t[0].length,
47
- startTimeSeconds: Ee(e)
41
+ groupLength: t[0].length
48
42
  };
49
43
  }
50
- }, J = (e) => {
51
- let t = e ?? "", n = De(t);
44
+ }, q = (e) => {
45
+ let t = e ?? "", n = we(t);
52
46
  return {
53
47
  name: Ce(n ? t.slice(0, n.groupIndex) + t.slice(n.groupIndex + n.groupLength) : t).trim().replace(/ {2,}/g, " "),
54
48
  durationLabel: n?.durationLabel
55
49
  };
56
- }, Oe = (e) => e.length > 0 && !/\s/.test(e) && e.includes("_"), ke = (e) => e >= 60 ? `${Math.floor(e / 60)}m ${Math.round(e % 60)}s` : `${e.toFixed(1)}s`, Ae = (e) => {
57
- if (!e) return;
58
- let t = /^(\d+(?:\.\d+)?)s$/.exec(e);
59
- return t ? parseFloat(t[1]) : void 0;
60
- }, je = (e) => {
61
- let t = e.flatMap((e) => {
62
- let t = De(e ?? ""), n = Ae(t?.durationLabel);
63
- return n == null ? [] : [{
64
- durationSeconds: n,
65
- startTimeSeconds: t?.startTimeSeconds
66
- }];
67
- });
68
- if (t.length === 0) return 0;
69
- if (t.some(({ startTimeSeconds: e }) => e == null)) return t.reduce((e, { durationSeconds: t }) => e + t, 0);
70
- let n = 0, r, i = t.flatMap(({ durationSeconds: e, startTimeSeconds: t }) => {
71
- if (t == null) return [];
72
- let i = t + n;
73
- return r != null && r - i > Te && (n += we, i += we), r = i, {
74
- start: i,
75
- end: i + e
76
- };
77
- }).sort((e, t) => e.start - t.start), a = 0, o = i[0].start, s = i[0].end;
78
- for (let e of i.slice(1)) e.start <= s ? s = Math.max(s, e.end) : (a += s - o, o = e.start, s = e.end);
79
- return a + s - o;
80
- }, Me = (e) => [...e].reverse().find((e) => e.status == null), Ne = (e, t) => {
50
+ }, Te = (e) => e.length > 0 && !/\s/.test(e) && e.includes("_"), Ee = (e) => [...e].reverse().find((e) => e.status == null), De = (e, t) => {
81
51
  let n = e.parent_stage_index;
82
52
  if (!(n == null || !Number.isInteger(n) || n < 0 || n >= e.index)) return t.get(n);
83
- }, Pe = (e) => {
53
+ }, Oe = (e) => {
84
54
  let t = e.map((e) => ({
85
55
  stage: e,
86
56
  children: []
@@ -88,15 +58,15 @@ var q = {
88
58
  for (let e of t) n.has(e.stage.index) || n.set(e.stage.index, e);
89
59
  let r = [];
90
60
  for (let e of t) {
91
- let t = Ne(e.stage, n);
61
+ let t = De(e.stage, n);
92
62
  t ? t.children.push(e) : r.push(e);
93
63
  }
94
64
  return r;
95
- }, Fe = (e) => `stage:${e}`, Ie = (e) => `group:${e}`, Le = "min-w-0 overflow-visible py-0", Re = "min-w-0 justify-start gap-2 rounded-lg px-2 py-1.5 text-start mobile:min-h-11", ze = (e) => {
65
+ }, ke = (e) => `stage:${e}`, Ae = (e) => `group:${e}`, je = "min-w-0 overflow-visible py-0", Me = "min-w-0 justify-start gap-2 rounded-lg px-2 py-1.5 text-start mobile:min-h-11", Ne = (e) => {
96
66
  let t = [], n = 0;
97
67
  for (; n < e.length;) {
98
- let r = e[n], i = J(r.stage.name).name, a = n + 1;
99
- for (; a < e.length && J(e[a].stage.name).name === i;) a += 1;
68
+ let r = e[n], i = q(r.stage.name).name, a = n + 1;
69
+ for (; a < e.length && q(e[a].stage.name).name === i;) a += 1;
100
70
  let o = e.slice(n, a);
101
71
  o.length > 1 ? t.push({
102
72
  key: r.stage.index,
@@ -108,7 +78,7 @@ var q = {
108
78
  }), n = a;
109
79
  }
110
80
  return t;
111
- }, Y = {
81
+ }, J = {
112
82
  panel: "_panel_w65is_2",
113
83
  row: "_row_w65is_6",
114
84
  collapseButton: "_collapseButton_w65is_10",
@@ -128,98 +98,98 @@ var q = {
128
98
  codeInline: "_codeInline_w65is_84",
129
99
  blockquote: "_blockquote_w65is_91",
130
100
  tableCell: "_tableCell_w65is_96"
131
- }, Be = ({ status: e, isLive: t, runningLabel: n = "Running", failedLabel: r = "Failed" }) => e === o.Failed ? /* @__PURE__ */ K(ve, { children: [/* @__PURE__ */ G(x, {
101
+ }, Pe = ({ status: e, isLive: t, runningLabel: n = "Running", failedLabel: r = "Failed" }) => e === o.Failed ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(x, {
132
102
  size: f.MD,
133
- className: Y.iconError,
103
+ className: J.iconError,
134
104
  "aria-hidden": !0,
135
105
  stroke: p
136
- }), /* @__PURE__ */ G("span", {
106
+ }), /* @__PURE__ */ W("span", {
137
107
  className: "sr-only",
138
108
  children: r
139
- })] }) : e === o.Completed ? /* @__PURE__ */ G(S, {
109
+ })] }) : e === o.Completed ? /* @__PURE__ */ W(S, {
140
110
  size: f.SM,
141
- className: Y.iconCompleted,
111
+ className: J.iconCompleted,
142
112
  "aria-hidden": !0,
143
113
  stroke: p
144
- }) : t ? /* @__PURE__ */ G(y, {
114
+ }) : t ? /* @__PURE__ */ W(y, {
145
115
  size: 16,
146
116
  ariaLabel: n
147
- }) : null, Ve = (e) => {
117
+ }) : null, Fe = (e) => {
148
118
  if (e == null) return "";
149
119
  let t = e.lastIndexOf(".");
150
120
  return t > 0 ? e.slice(0, t) : e;
151
- }, He = (e) => {
121
+ }, Ie = (e) => {
152
122
  if (!e) return E;
153
123
  let t = u(e);
154
124
  if (t.startsWith("image/")) switch (t) {
155
125
  case "image/jpeg": return N;
156
- case "image/png": return ee;
157
- case "image/svg+xml": return ne;
126
+ case "image/png": return te;
127
+ case "image/svg+xml": return ie;
158
128
  case "image/bmp": return D;
159
- default: return ue;
129
+ default: return fe;
160
130
  }
161
- if (t.startsWith("video/")) return pe;
162
- if (t.startsWith("audio/")) return le;
131
+ if (t.startsWith("video/")) return he;
132
+ if (t.startsWith("audio/")) return de;
163
133
  switch (t) {
164
134
  case "application/pdf": return I;
165
135
  case "application/msword": return A;
166
136
  case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return j;
167
- case "application/vnd.ms-powerpoint": return R;
168
- case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return R;
169
- case "application/vnd.ms-excel": return oe;
170
- case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return oe;
137
+ case "application/vnd.ms-powerpoint": return L;
138
+ case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return L;
139
+ case "application/vnd.ms-excel": return ce;
140
+ case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return ce;
171
141
  case "application/zip":
172
142
  case "application/vnd.rar":
173
143
  case "application/x-7z-compressed":
174
144
  case "application/gzip":
175
- case "application/x-tar": return ce;
145
+ case "application/x-tar": return ue;
176
146
  case "text/csv": return k;
177
- case "text/plain": return ie;
147
+ case "text/plain": return oe;
178
148
  case "text/html":
179
149
  case "application/xhtml+xml": return M;
180
- case "application/xml": return se;
181
- case "application/sql": return z;
150
+ case "application/xml": return le;
151
+ case "application/sql": return re;
182
152
  case "text/javascript": return P;
183
153
  case "text/jsx": return F;
184
- case "text/typescript": return re;
185
- case "text/tsx": return B;
154
+ case "text/typescript": return ae;
155
+ case "text/tsx": return R;
186
156
  case "text/css": return O;
187
- case "text/x-php": return L;
188
- case "text/x-rustsrc": return te;
189
- case "text/x-vue": return ae;
157
+ case "text/x-php": return ee;
158
+ case "text/x-rustsrc": return ne;
159
+ case "text/x-vue": return se;
190
160
  default: return E;
191
161
  }
192
- }, Ue = (e) => {
162
+ }, Le = (e) => {
193
163
  let { type: n, contentType: r } = e;
194
- return n === t.Prompt ? fe : n === t.Pasted ? C : n === t.Image ? ue : He(r ?? "");
195
- }, We = (e) => {
164
+ return n === t.Prompt ? me : n === t.Pasted ? C : n === t.Image ? fe : Ie(r ?? "");
165
+ }, Re = (e) => {
196
166
  let t = u(e), r = n[t];
197
167
  if (r) return r;
198
168
  let i = t.split("/")[1];
199
169
  if (i && !i.startsWith("vnd.") && !i.includes("+")) return i;
200
- }, Ge = (e, n) => {
170
+ }, ze = (e, n) => {
201
171
  let { type: r, name: i, contentType: a } = e;
202
172
  if (r === t.Prompt) return n.promptLabel ?? "Prompt";
203
173
  if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
204
174
  if (r === t.Image) return n.imageLabel ?? "Image";
205
175
  if (a) {
206
- let e = We(a);
176
+ let e = Re(a);
207
177
  if (e) return `.${e}`;
208
178
  }
209
179
  if (i == null) return "";
210
180
  let o = i.lastIndexOf(".");
211
181
  return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
212
- }, Ke = (e, n = {}) => {
182
+ }, Be = (e, n = {}) => {
213
183
  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;
214
184
  return {
215
185
  isLoading: c,
216
186
  isError: l,
217
187
  isImage: u,
218
188
  isLink: d,
219
- BottomIcon: d ? null : Ue(e),
220
- typeLabel: d ? null : Ge(e, n)
189
+ BottomIcon: d ? null : Le(e),
190
+ typeLabel: d ? null : ze(e, n)
221
191
  };
222
- }, qe = "flex size-[84px] items-center justify-center rounded-xl border", X = {
192
+ }, Ve = "flex size-[84px] items-center justify-center rounded-xl border", Y = {
223
193
  tray: "dial-ai-attachment-tray",
224
194
  trayItem: "dial-ai-attachment-tray-item",
225
195
  tile: "dial-ai-attachment-tile",
@@ -227,7 +197,7 @@ var q = {
227
197
  tileName: "dial-ai-attachment-tile-name",
228
198
  tileType: "dial-ai-attachment-tile-type",
229
199
  tileAction: "dial-ai-attachment-tile-action"
230
- }, Z = {
200
+ }, X = {
231
201
  tile: "_tile_s2es2_12",
232
202
  hovered: "_hovered_s2es2_18",
233
203
  selected: "_selected_s2es2_28",
@@ -238,106 +208,106 @@ var q = {
238
208
  track: "_track_s2es2_50",
239
209
  actionButton: "_actionButton_s2es2_56",
240
210
  imageActionButton: "_imageActionButton_s2es2_60"
241
- }, Q = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o }) => /* @__PURE__ */ G(b, {
211
+ }, Z = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o }) => /* @__PURE__ */ W(b, {
242
212
  icon: a,
243
213
  size: m.Small,
244
- className: c("opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", Z.actionButton, o, X.tileAction),
214
+ className: c("opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", X.actionButton, o, Y.tileAction),
245
215
  "aria-label": e,
246
216
  "aria-describedby": t ? n : void 0,
247
217
  onClick: (e) => {
248
218
  e.stopPropagation(), r(i);
249
219
  }
250
- }), Je = ({ ...e }) => /* @__PURE__ */ G(Q, {
251
- icon: /* @__PURE__ */ G(de, {
220
+ }), He = ({ ...e }) => /* @__PURE__ */ W(Z, {
221
+ icon: /* @__PURE__ */ W(pe, {
252
222
  size: f.SM,
253
223
  "aria-hidden": !0,
254
224
  stroke: p
255
225
  }),
256
- className: Z.retryIcon,
226
+ className: X.retryIcon,
257
227
  ...e
258
- }), Ye = ({ ...e }) => /* @__PURE__ */ G(Q, {
259
- icon: /* @__PURE__ */ G(w, {
228
+ }), Ue = ({ ...e }) => /* @__PURE__ */ W(Z, {
229
+ icon: /* @__PURE__ */ W(w, {
260
230
  size: f.SM,
261
231
  "aria-hidden": !0,
262
232
  stroke: p
263
233
  }),
264
234
  ...e
265
- }), Xe = ({ ...e }) => /* @__PURE__ */ G(Q, {
266
- icon: /* @__PURE__ */ G(T, {
235
+ }), We = ({ ...e }) => /* @__PURE__ */ W(Z, {
236
+ icon: /* @__PURE__ */ W(T, {
267
237
  size: f.SM,
268
238
  "aria-hidden": !0,
269
239
  stroke: p
270
240
  }),
271
241
  ...e
272
- }), Ze = ({ ...e }) => /* @__PURE__ */ G(Q, {
273
- icon: /* @__PURE__ */ G(me, {
242
+ }), Ge = ({ ...e }) => /* @__PURE__ */ W(Z, {
243
+ icon: /* @__PURE__ */ W(ge, {
274
244
  size: f.SM,
275
245
  "aria-hidden": !0,
276
246
  stroke: p
277
247
  }),
278
248
  ...e
279
- }), Qe = {
249
+ }), Ke = {
280
250
  [e.Network]: "Upload failed · network error",
281
251
  [e.UnsupportedType]: "Upload failed · unsupported file type",
282
252
  [e.FileTooLarge]: "Upload failed · file too large"
283
- }, $e = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: i, labels: o, styles: s, onDownload: l, isPasted: u, isLink: d, cssVars: f, onExpand: p, isExpandable: m, onRemove: h, isSelected: _ }) => {
284
- let { clickLabel: v = "Download attachment", retryLabel: b = "Retry upload", removeLabel: x = "Remove attachment", openInNewTabLabel: S = "Open in new tab", sizeLabel: C, uploadingLabel: w = "Uploading", errorReasonLabels: T, genericErrorLabel: E = "Upload failed" } = o ?? {}, { typography: D, className: O } = s ?? {}, { id: k, name: A, status: j, errorReason: M } = t, N = j === a.Loading, P = j === a.Error, F = ge(), I = P ? M && (T?.[M] ?? Qe[M]) || E : "", { BottomIcon: L, typeLabel: ee } = Ke(t), R = !P && !N && l && !d, te = P && !!i && M !== e.UnsupportedType && M !== e.FileTooLarge, z = Number(!!R) + Number(!!te) + Number(!!d) + Number(!!h), ne = z > 1 ? "pe-11" : z === 1 ? "pe-5" : void 0, re = (e) => {
253
+ }, qe = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: i, labels: o, styles: s, onDownload: l, isPasted: u, isLink: d, cssVars: f, onExpand: p, isExpandable: m, onRemove: h, isSelected: _ }) => {
254
+ let { clickLabel: v = "Download attachment", retryLabel: b = "Retry upload", removeLabel: x = "Remove attachment", openInNewTabLabel: S = "Open in new tab", sizeLabel: C, uploadingLabel: w = "Uploading", errorReasonLabels: T, genericErrorLabel: E = "Upload failed" } = o ?? {}, { typography: D, className: O } = s ?? {}, { id: k, name: A, status: j, errorReason: M } = t, N = j === a.Loading, P = j === a.Error, F = ve(), I = P ? M && (T?.[M] ?? Ke[M]) || E : "", { BottomIcon: ee, typeLabel: te } = Be(t), L = !P && !N && l && !d, ne = P && !!i && M !== e.UnsupportedType && M !== e.FileTooLarge, re = Number(!!L) + Number(!!ne) + Number(!!d) + Number(!!h), ie = re > 1 ? "pe-11" : re === 1 ? "pe-5" : void 0, ae = (e) => {
285
255
  e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r?.(t.id));
286
- }, B = U(() => u ? A : Ve(A), [u, A]), ie = V(() => {
256
+ }, R = V(() => u ? A : Fe(A), [u, A]), oe = z(() => {
287
257
  window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
288
- }, [t]), ae = c(qe, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", Z.tile, !P && Z.hovered, _ && Z.selected, P && Z.tileError, X.tile, _ && X.tileSelected), oe = /* @__PURE__ */ G("div", {
289
- title: B,
290
- className: c(D?.nameClassName ?? "dial-caption-text", "line-clamp-2 w-full min-w-0 break-words", Z.nameText, !P && ne, X.tileName),
291
- children: n ? /* @__PURE__ */ G(g, {
292
- text: B,
258
+ }, [t]), se = c(Ve, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", X.tile, !P && X.hovered, _ && X.selected, P && X.tileError, Y.tile, _ && Y.tileSelected), ce = /* @__PURE__ */ W("div", {
259
+ title: R,
260
+ className: c(D?.nameClassName ?? "dial-caption-text", "line-clamp-2 w-full min-w-0 break-words", X.nameText, !P && ie, Y.tileName),
261
+ children: n ? /* @__PURE__ */ W(g, {
262
+ text: R,
293
263
  query: n,
294
264
  maxLines: 2
295
- }) : B
296
- }), se = L && /* @__PURE__ */ K("div", {
297
- className: c("flex w-full items-center gap-1", P && ne, X.tileType),
298
- children: [/* @__PURE__ */ G(L, {
265
+ }) : R
266
+ }), le = ee && /* @__PURE__ */ G("div", {
267
+ className: c("flex w-full items-center gap-1", P && ie, Y.tileType),
268
+ children: [/* @__PURE__ */ W(ee, {
299
269
  size: 16,
300
- className: Z.typeText,
270
+ className: X.typeText,
301
271
  "aria-hidden": !0
302
- }), /* @__PURE__ */ G("span", {
303
- className: c(D?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", Z.typeText),
304
- children: C ? `${ee} · ${C}` : ee
272
+ }), /* @__PURE__ */ W("span", {
273
+ className: c(D?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", X.typeText),
274
+ children: C ? `${te} · ${C}` : te
305
275
  })]
306
- }), ce = () => {
276
+ }), ue = () => {
307
277
  m && p ? p(k) : r && r(k);
308
- }, le = /* @__PURE__ */ K(ve, { children: [
309
- oe,
310
- se,
311
- N && /* @__PURE__ */ G("div", {
278
+ }, de = /* @__PURE__ */ G(U, { children: [
279
+ ce,
280
+ le,
281
+ N && /* @__PURE__ */ W("div", {
312
282
  role: "progressbar",
313
283
  "aria-label": w,
314
- className: c("absolute start-[-1px] top-[-1px] flex size-full items-center justify-center rounded", Z.track),
315
- children: /* @__PURE__ */ G(y, { size: 32 })
284
+ className: c("absolute start-[-1px] top-[-1px] flex size-full items-center justify-center rounded", X.track),
285
+ children: /* @__PURE__ */ W(y, { size: 32 })
316
286
  }),
317
- /* @__PURE__ */ K("div", {
287
+ /* @__PURE__ */ G("div", {
318
288
  className: "absolute end-1 top-1 flex gap-1",
319
289
  children: [
320
- R && /* @__PURE__ */ G(Ye, {
290
+ L && /* @__PURE__ */ W(Ue, {
321
291
  ariaLabel: v,
322
292
  errorTitle: I,
323
293
  errorDescId: F,
324
294
  onClick: l,
325
295
  id: k
326
296
  }),
327
- te && /* @__PURE__ */ G(Je, {
297
+ ne && /* @__PURE__ */ W(He, {
328
298
  ariaLabel: b,
329
299
  errorTitle: I,
330
300
  errorDescId: F,
331
301
  onClick: i,
332
302
  id: k
333
303
  }),
334
- d && /* @__PURE__ */ G(Xe, {
304
+ d && /* @__PURE__ */ W(We, {
335
305
  ariaLabel: S,
336
306
  errorTitle: I,
337
307
  errorDescId: F,
338
- onClick: ie
308
+ onClick: oe
339
309
  }),
340
- h && /* @__PURE__ */ G(Ze, {
310
+ h && /* @__PURE__ */ W(Ge, {
341
311
  ariaLabel: x,
342
312
  errorTitle: I,
343
313
  errorDescId: F,
@@ -346,7 +316,7 @@ var q = {
346
316
  })
347
317
  ]
348
318
  }),
349
- P && /* @__PURE__ */ G("span", {
319
+ P && /* @__PURE__ */ W("span", {
350
320
  id: F,
351
321
  role: "status",
352
322
  "aria-live": "polite",
@@ -354,28 +324,28 @@ var q = {
354
324
  children: I
355
325
  })
356
326
  ] });
357
- return /* @__PURE__ */ G("div", {
327
+ return /* @__PURE__ */ W("div", {
358
328
  style: f,
359
329
  className: c("inline-flex", O),
360
- children: /* @__PURE__ */ G("div", {
330
+ children: /* @__PURE__ */ W("div", {
361
331
  role: "button",
362
332
  tabIndex: 0,
363
333
  "aria-label": v,
364
334
  "aria-busy": N,
365
- onClick: ce,
366
- onKeyDown: re,
335
+ onClick: ue,
336
+ onKeyDown: ae,
367
337
  style: f,
368
- className: c(ae, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
369
- children: le
338
+ className: c(se, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
339
+ children: de
370
340
  })
371
341
  });
372
- }, et = /* @__PURE__ */ function(e) {
342
+ }, Je = /* @__PURE__ */ function(e) {
373
343
  return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
374
- }({}), tt = ({ enabled: e, src: t }) => {
375
- let n = _e(null), [r, i] = W("idle");
376
- return H(() => {
344
+ }({}), Ye = ({ enabled: e, src: t }) => {
345
+ let n = ye(null), [r, i] = H("idle");
346
+ return B(() => {
377
347
  i(e && t ? "loading" : "idle");
378
- }, [e, t]), H(() => {
348
+ }, [e, t]), B(() => {
379
349
  let r = n.current;
380
350
  if (!r || !e || !t) return;
381
351
  let a = () => i("loaded"), o = () => i("error");
@@ -386,15 +356,15 @@ var q = {
386
356
  imageRef: n,
387
357
  imageLoadStatus: r
388
358
  };
389
- }, nt = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: l, isSelected: u }) => {
390
- let { clickLabel: d = "Open attachment", expandLabel: m = "Expand pasted text", removeLabel: h = "Remove attachment", downloadLabel: g = "Download attachment" } = i ?? {}, { className: y } = l ?? {}, { id: b, name: x } = e, S = e.previewUrl ?? e.url, C = e.type === t.Pasted && n !== void 0, { isLoading: w, isError: T, isImage: E } = U(() => Ke(e), [e]), D = r !== void 0 && !C && !w && !T, { imageRef: O, imageLoadStatus: k } = tt({
359
+ }, Xe = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: l, isSelected: u }) => {
360
+ let { clickLabel: d = "Open attachment", expandLabel: m = "Expand pasted text", removeLabel: h = "Remove attachment", downloadLabel: g = "Download attachment" } = i ?? {}, { className: y } = l ?? {}, { id: b, name: x } = e, S = e.previewUrl ?? e.url, C = e.type === t.Pasted && n !== void 0, { isLoading: w, isError: T, isImage: E } = V(() => Be(e), [e]), D = r !== void 0 && !C && !w && !T, { imageRef: O, imageLoadStatus: k } = Ye({
391
361
  enabled: E,
392
362
  src: S
393
363
  }), A = () => {
394
364
  C && n ? n(b) : D && r && r(b);
395
365
  };
396
- return /* @__PURE__ */ G("div", {
397
- className: c(qe, "group/attachment-tile", D && "cursor-pointer", Z.tile, u && Z.selected, y, X.tile, u && X.tileSelected),
366
+ return /* @__PURE__ */ W("div", {
367
+ className: c(Ve, "group/attachment-tile", D && "cursor-pointer", X.tile, u && X.selected, y, Y.tile, u && Y.tileSelected),
398
368
  onClick: A,
399
369
  onKeyDown: (e) => {
400
370
  e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), A());
@@ -403,48 +373,48 @@ var q = {
403
373
  role: "button",
404
374
  style: o,
405
375
  "aria-label": D ? d : C ? m : void 0,
406
- children: /* @__PURE__ */ K("div", {
376
+ children: /* @__PURE__ */ G("div", {
407
377
  className: "relative h-full w-full overflow-hidden",
408
378
  children: [
409
- /* @__PURE__ */ K("div", {
379
+ /* @__PURE__ */ G("div", {
410
380
  className: "absolute end-1 top-1 z-10 flex gap-1",
411
- children: [a && /* @__PURE__ */ G(Ze, {
381
+ children: [a && /* @__PURE__ */ W(Ge, {
412
382
  ariaLabel: h,
413
383
  onClick: a,
414
384
  id: b,
415
- className: Z.imageActionButton
416
- }), s && /* @__PURE__ */ G(Ye, {
385
+ className: X.imageActionButton
386
+ }), s && /* @__PURE__ */ W(Ue, {
417
387
  ariaLabel: g,
418
388
  onClick: s,
419
389
  id: b,
420
- className: Z.imageActionButton
390
+ className: X.imageActionButton
421
391
  })]
422
392
  }),
423
- k !== et.Loaded && /* @__PURE__ */ G(_, {
393
+ k !== Je.Loaded && /* @__PURE__ */ W(_, {
424
394
  variant: v.Rectangular,
425
395
  width: "100%",
426
396
  height: "100%",
427
- active: k === et.Loading,
428
- overlay: /* @__PURE__ */ G(ue, {
397
+ active: k === Je.Loading,
398
+ overlay: /* @__PURE__ */ W(fe, {
429
399
  size: f.LG,
430
- className: Z.typeText,
400
+ className: X.typeText,
431
401
  "aria-hidden": !0,
432
402
  stroke: p
433
403
  }),
434
404
  className: "absolute inset-0 rounded-xl"
435
405
  }),
436
- /* @__PURE__ */ G("img", {
406
+ /* @__PURE__ */ W("img", {
437
407
  ref: O,
438
408
  src: S,
439
409
  alt: x,
440
410
  loading: "lazy",
441
411
  decoding: "async",
442
- className: c("h-full w-full rounded-xl object-cover transition-opacity duration-200", k === et.Loaded ? "opacity-100" : "opacity-0")
412
+ className: c("h-full w-full rounded-xl object-cover transition-opacity duration-200", k === Je.Loaded ? "opacity-100" : "opacity-0")
443
413
  })
444
414
  ]
445
415
  })
446
416
  });
447
- }, rt = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: c, labels: l, styles: u, isSelected: d }) => {
417
+ }, Ze = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: c, labels: l, styles: u, isSelected: d }) => {
448
418
  let { colors: f } = u ?? {}, p = e.type === t.Pasted, m = p && a !== void 0, h = s({
449
419
  "--ai-tile-bg": f?.background,
450
420
  "--ai-tile-border": f?.border,
@@ -461,8 +431,8 @@ var q = {
461
431
  "--ai-tile-hover-icon-bg": f?.hoverIconBackground,
462
432
  "--ai-tile-hover-icon-color": f?.hoverIconColor,
463
433
  "--ai-tile-progress-track": f?.trackBackground
464
- }), { isImage: g, isLink: _ } = U(() => Ke(e), [e]);
465
- return g ? /* @__PURE__ */ G(nt, {
434
+ }), { isImage: g, isLink: _ } = V(() => Be(e), [e]);
435
+ return g ? /* @__PURE__ */ W(Xe, {
466
436
  attachment: e,
467
437
  labels: l,
468
438
  onClick: o,
@@ -472,7 +442,7 @@ var q = {
472
442
  cssVars: h,
473
443
  onDownload: c,
474
444
  isSelected: d
475
- }) : /* @__PURE__ */ G($e, {
445
+ }) : /* @__PURE__ */ W(qe, {
476
446
  attachment: e,
477
447
  searchQuery: n,
478
448
  onClick: o,
@@ -488,7 +458,7 @@ var q = {
488
458
  isExpandable: m,
489
459
  isSelected: d
490
460
  });
491
- }, it = (e) => {
461
+ }, Qe = (e) => {
492
462
  let t = l(e);
493
463
  if (!e?.length) return t;
494
464
  let n = /* @__PURE__ */ new Map();
@@ -503,16 +473,16 @@ var q = {
503
473
  contentType: t
504
474
  } : e;
505
475
  });
506
- }, at = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: i }) => /* @__PURE__ */ G(r, {
476
+ }, $e = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: i }) => /* @__PURE__ */ W(r, {
507
477
  language: t?.replace(/^language-/, "") ?? "",
508
478
  value: typeof e == "string" ? e : String(e ?? ""),
509
479
  codeClassName: n,
510
- containerClassName: c(Y.codeBlock, n),
480
+ containerClassName: c(J.codeBlock, n),
511
481
  copyLabel: i,
512
482
  hideDownload: !0
513
- }), ot = he(({ content: e, typography: t, copyAriaLabel: n = "Copy" }) => {
514
- let r = "mb-1.5 last:mb-0", a = c(t?.headingClassName ?? "dial-small-semi-text", Y.stageContent, r);
515
- return /* @__PURE__ */ G(i, {
483
+ }), et = _e(({ content: e, typography: t, copyAriaLabel: n = "Copy" }) => {
484
+ let r = "mb-1.5 last:mb-0", a = c(t?.headingClassName ?? "dial-small-semi-text", J.stageContent, r);
485
+ return /* @__PURE__ */ W(i, {
516
486
  content: e,
517
487
  classNames: {
518
488
  h1: a,
@@ -521,100 +491,100 @@ var q = {
521
491
  h4: a,
522
492
  h5: a,
523
493
  h6: a,
524
- p: c(t?.contentClassName ?? "dial-tiny-text", Y.stageContent, "mb-1.5"),
525
- ul: c(t?.contentClassName ?? "dial-tiny-text", Y.stageContent, r),
526
- ol: c(t?.contentClassName ?? "dial-tiny-text", Y.stageContent, r),
527
- strong: c(t?.strongClassName ?? t?.contentClassName ?? "dial-tiny-text", Y.stageContent),
528
- codeInline: Y.codeInline,
529
- blockquote: c(t?.contentClassName ?? "dial-tiny-text", Y.blockquote, r),
530
- link: c(t?.contentClassName ?? "dial-tiny-text", Y.stageContent),
531
- tableCell: c(t?.contentClassName ?? "dial-tiny-text", Y.tableCell)
494
+ p: c(t?.contentClassName ?? "dial-tiny-text", J.stageContent, "mb-1.5"),
495
+ ul: c(t?.contentClassName ?? "dial-tiny-text", J.stageContent, r),
496
+ ol: c(t?.contentClassName ?? "dial-tiny-text", J.stageContent, r),
497
+ strong: c(t?.strongClassName ?? t?.contentClassName ?? "dial-tiny-text", J.stageContent),
498
+ codeInline: J.codeInline,
499
+ blockquote: c(t?.contentClassName ?? "dial-tiny-text", J.blockquote, r),
500
+ link: c(t?.contentClassName ?? "dial-tiny-text", J.stageContent),
501
+ tableCell: c(t?.contentClassName ?? "dial-tiny-text", J.tableCell)
532
502
  },
533
- components: { code: ({ children: e, className: r }) => r?.includes("language-") ? /* @__PURE__ */ G(at, {
503
+ components: { code: ({ children: e, className: r }) => r?.includes("language-") ? /* @__PURE__ */ W($e, {
534
504
  codeClassName: r,
535
505
  blockClassName: t?.codeBlockClassName,
536
506
  copyAriaLabel: n,
537
507
  children: e
538
- }) : /* @__PURE__ */ G("code", {
539
- className: c("px-1 py-0.5", t?.codeClassName ?? "dial-tiny-text rounded-md", Y.codeInline),
508
+ }) : /* @__PURE__ */ W("code", {
509
+ className: c("px-1 py-0.5", t?.codeClassName ?? "dial-tiny-text rounded-md", J.codeInline),
540
510
  children: e
541
511
  }) }
542
512
  });
543
- }), st = ({ attachments: e, clickLabel: t, onAttachmentClick: n }) => {
544
- let r = V((t) => {
513
+ }), tt = ({ attachments: e, clickLabel: t, onAttachmentClick: n }) => {
514
+ let r = z((t) => {
545
515
  let r = e.find((e) => e.id === t);
546
516
  r && n?.(r);
547
517
  }, [e, n]);
548
- return /* @__PURE__ */ G("div", {
518
+ return /* @__PURE__ */ W("div", {
549
519
  role: "list",
550
520
  className: "flex flex-wrap gap-3",
551
- children: e.map((e) => /* @__PURE__ */ G("div", {
521
+ children: e.map((e) => /* @__PURE__ */ W("div", {
552
522
  role: "listitem",
553
- children: /* @__PURE__ */ G(rt, {
523
+ children: /* @__PURE__ */ W(Ze, {
554
524
  attachment: e,
555
525
  onClick: n && r,
556
526
  labels: { clickLabel: t }
557
527
  })
558
528
  }, e.id))
559
529
  });
560
- }, ct = ({ stage: e, isLive: t, typography: n, labels: r, nameOverride: i, onAttachmentClick: a, childList: s, isExpanded: l, onToggle: u }) => {
561
- let [f, p] = W(!1), m = l ?? f, g = V((e) => {
530
+ }, nt = ({ stage: e, isLive: t, typography: n, labels: r, nameOverride: i, onAttachmentClick: a, childList: s, isExpanded: l, onToggle: u }) => {
531
+ let [f, p] = H(!1), m = l ?? f, g = z((e) => {
562
532
  l === void 0 && p(e), u?.(e);
563
- }, [l, u]), { copyAriaLabel: _ = "Copy stage content", runningAriaLabel: v, failedAriaLabel: y, attachmentClickLabel: b = "Preview search result" } = r ?? {}, x = U(() => it(e.attachments), [e.attachments]), { name: S, durationLabel: C } = J(e.name), w = i ?? S, T = !i && Oe(S), E = e.status === o.Failed, D = !!e.content || !!e.attachments?.length, O = D || s != null, k = /* @__PURE__ */ K(ve, { children: [
564
- /* @__PURE__ */ G("span", {
533
+ }, [l, u]), { copyAriaLabel: _ = "Copy stage content", runningAriaLabel: v, failedAriaLabel: y, attachmentClickLabel: b = "Preview search result" } = r ?? {}, x = V(() => Qe(e.attachments), [e.attachments]), { name: S, durationLabel: C } = q(e.name), w = i ?? S, T = !i && Te(S), E = e.status === o.Failed, D = !!e.content || !!e.attachments?.length, O = D || s != null, k = /* @__PURE__ */ G(U, { children: [
534
+ /* @__PURE__ */ W("span", {
565
535
  className: "flex flex-none items-center",
566
- children: /* @__PURE__ */ G(Be, {
536
+ children: /* @__PURE__ */ W(Pe, {
567
537
  status: e.status,
568
538
  isLive: t,
569
539
  runningLabel: v,
570
540
  failedLabel: y
571
541
  })
572
542
  }),
573
- /* @__PURE__ */ G("span", {
574
- className: c("min-w-0 max-w-[22rem] truncate", n?.fontClassName ?? "dial-small-text", Y.stageName, E && Y.stageNameFailed, T && Y.monoName),
575
- children: /* @__PURE__ */ G(h, { text: w || e.status || "" })
543
+ /* @__PURE__ */ W("span", {
544
+ className: c("min-w-0 max-w-[22rem] truncate", n?.fontClassName ?? "dial-small-text", J.stageName, E && J.stageNameFailed, T && J.monoName),
545
+ children: /* @__PURE__ */ W(h, { text: w || e.status || "" })
576
546
  }),
577
- e.tag && /* @__PURE__ */ G("span", {
578
- className: c("flex-none", n?.tagClassName ?? "dial-tiny-lead-text", Y.tag),
547
+ e.tag && /* @__PURE__ */ W("span", {
548
+ className: c("flex-none", n?.tagClassName ?? "dial-tiny-lead-text", J.tag),
579
549
  children: e.tag
580
550
  }),
581
- C && /* @__PURE__ */ G("span", {
582
- className: c("flex-none", n?.countFontClassName ?? "dial-tiny-text", Y.duration),
551
+ C && /* @__PURE__ */ W("span", {
552
+ className: c("flex-none", n?.countFontClassName ?? "dial-tiny-text", J.duration),
583
553
  children: C
584
554
  })
585
555
  ] });
586
- return O ? /* @__PURE__ */ K(d, {
556
+ return O ? /* @__PURE__ */ G(d, {
587
557
  expanded: m,
588
558
  onToggle: g,
589
- title: /* @__PURE__ */ G("span", {
559
+ title: /* @__PURE__ */ W("span", {
590
560
  className: "flex min-w-0 items-center gap-2",
591
561
  children: k
592
562
  }),
593
- className: Le,
594
- headerClassName: c(Re, Y.row, Y.stageHeader),
595
- contentClassName: c("-mt-1 flex min-w-0 flex-col gap-3 px-0 py-1", Y.stageRegion),
596
- children: [m && D && /* @__PURE__ */ K("div", {
563
+ className: je,
564
+ headerClassName: c(Me, J.row, J.stageHeader),
565
+ contentClassName: c("-mt-1 flex min-w-0 flex-col gap-3 px-0 py-1", J.stageRegion),
566
+ children: [m && D && /* @__PURE__ */ G("div", {
597
567
  className: "flex min-w-0 flex-col gap-3 ps-8",
598
- children: [e.content && /* @__PURE__ */ G("div", {
568
+ children: [e.content && /* @__PURE__ */ W("div", {
599
569
  className: "max-h-[300px] min-w-0 overflow-y-auto",
600
- children: /* @__PURE__ */ G(ot, {
570
+ children: /* @__PURE__ */ W(et, {
601
571
  content: e.content,
602
572
  typography: n,
603
573
  copyAriaLabel: _
604
574
  })
605
- }), x.length > 0 && /* @__PURE__ */ G(st, {
575
+ }), x.length > 0 && /* @__PURE__ */ W(tt, {
606
576
  attachments: x,
607
577
  clickLabel: b,
608
578
  onAttachmentClick: a
609
579
  })]
610
580
  }), m && s]
611
- }) : /* @__PURE__ */ G("div", {
612
- className: c("flex w-full items-center gap-2 px-2 py-1.5", Y.row),
581
+ }) : /* @__PURE__ */ W("div", {
582
+ className: c("flex w-full items-center gap-2 px-2 py-1.5", J.row),
613
583
  children: k
614
584
  });
615
- }, lt = (e) => e <= 3 ? "ps-4" : "ps-0", ut = (e) => e <= 3 ? "ps-6" : "ps-0", dt = ({ node: e, depth: t, nameOverride: n, isStreaming: r, expansion: i, typography: a, labels: o, onAttachmentClick: s }) => {
616
- let c = Fe(e.stage.index), l = t + 1;
617
- return /* @__PURE__ */ G(ct, {
585
+ }, rt = (e) => e <= 3 ? "ps-4" : "ps-0", it = (e) => e <= 3 ? "ps-6" : "ps-0", at = ({ node: e, depth: t, nameOverride: n, isStreaming: r, expansion: i, typography: a, labels: o, onAttachmentClick: s }) => {
586
+ let c = ke(e.stage.index), l = t + 1;
587
+ return /* @__PURE__ */ W(nt, {
618
588
  stage: e.stage,
619
589
  nameOverride: n,
620
590
  isLive: r && e.stage.status == null,
@@ -623,10 +593,10 @@ var q = {
623
593
  onAttachmentClick: s,
624
594
  isExpanded: i.isExpanded(c),
625
595
  onToggle: (e) => i.onToggle(c, e),
626
- childList: e.children.length > 0 ? /* @__PURE__ */ G(pt, {
596
+ childList: e.children.length > 0 ? /* @__PURE__ */ W(st, {
627
597
  nodes: e.children,
628
598
  depth: l,
629
- className: lt(l),
599
+ className: rt(l),
630
600
  isStreaming: r,
631
601
  expansion: i,
632
602
  typography: a,
@@ -634,51 +604,47 @@ var q = {
634
604
  onAttachmentClick: s
635
605
  }) : void 0
636
606
  });
637
- }, ft = ({ row: e, depth: t, isStreaming: n, expansion: r, typography: i, labels: a, onAttachmentClick: s }) => {
607
+ }, ot = ({ row: e, depth: t, isStreaming: n, expansion: r, typography: i, labels: a, onAttachmentClick: s }) => {
638
608
  let { runningAriaLabel: l, failedAriaLabel: u, attemptLabel: f = (e) => `Attempt ${e}` } = a ?? {}, p = e.attempts ?? [], m = p.some((e) => e.stage.status == null), g = p.some((e) => e.stage.status === o.Failed), _ = o.Completed;
639
609
  m ? _ = null : g && (_ = o.Failed);
640
- let v = je(p.map((e) => e.stage.name)), y = v > 0 ? ke(v) : void 0, b = Ie(e.key), x = r.isExpanded(b), S = t + 1;
641
- return /* @__PURE__ */ G(d, {
642
- title: /* @__PURE__ */ K("span", {
610
+ let v = Ae(e.key), y = r.isExpanded(v), b = t + 1;
611
+ return /* @__PURE__ */ W(d, {
612
+ title: /* @__PURE__ */ G("span", {
643
613
  className: "flex min-w-0 items-center gap-2",
644
614
  children: [
645
- /* @__PURE__ */ G("span", {
615
+ /* @__PURE__ */ W("span", {
646
616
  className: "flex flex-none items-center",
647
- children: /* @__PURE__ */ G(Be, {
617
+ children: /* @__PURE__ */ W(Pe, {
648
618
  status: _,
649
619
  isLive: n && m,
650
620
  runningLabel: l,
651
621
  failedLabel: u
652
622
  })
653
623
  }),
654
- /* @__PURE__ */ G("span", {
655
- className: c("min-w-0 max-w-[22rem] truncate", i?.fontClassName ?? "dial-small-text", Y.stageName, g && Y.stageNameFailed),
656
- children: /* @__PURE__ */ G(h, { text: e.name })
624
+ /* @__PURE__ */ W("span", {
625
+ className: c("min-w-0 max-w-[22rem] truncate", i?.fontClassName ?? "dial-small-text", J.stageName, g && J.stageNameFailed),
626
+ children: /* @__PURE__ */ W(h, { text: e.name })
657
627
  }),
658
- /* @__PURE__ */ K("span", {
659
- className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", Y.count),
628
+ /* @__PURE__ */ G("span", {
629
+ className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", J.count),
660
630
  children: ["×", p.length]
661
- }),
662
- y && /* @__PURE__ */ G("span", {
663
- className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", Y.duration),
664
- children: y
665
631
  })
666
632
  ]
667
633
  }),
668
- expanded: x,
669
- onToggle: (e) => r.onToggle(b, e),
670
- className: Le,
671
- headerClassName: c(Re, Y.collapseButton, Y.row, Y.stageHeader),
672
- contentClassName: c("-mt-2 min-w-0 px-0", ut(S), Y.stageRegion),
673
- children: /* @__PURE__ */ G("ul", {
634
+ expanded: y,
635
+ onToggle: (e) => r.onToggle(v, e),
636
+ className: je,
637
+ headerClassName: c(Me, J.collapseButton, J.row, J.stageHeader),
638
+ contentClassName: c("-mt-2 min-w-0 px-0", it(b), J.stageRegion),
639
+ children: /* @__PURE__ */ W("ul", {
674
640
  role: "list",
675
641
  className: "flex min-w-0 flex-col gap-0.5",
676
- children: x && p.map((e, t) => /* @__PURE__ */ G("li", {
642
+ children: y && p.map((e, t) => /* @__PURE__ */ W("li", {
677
643
  role: "listitem",
678
644
  className: "min-w-0",
679
- children: /* @__PURE__ */ G(dt, {
645
+ children: /* @__PURE__ */ W(at, {
680
646
  node: e,
681
- depth: S,
647
+ depth: b,
682
648
  nameOverride: f(t + 1),
683
649
  isStreaming: n,
684
650
  expansion: r,
@@ -689,23 +655,23 @@ var q = {
689
655
  }, e.stage.index))
690
656
  })
691
657
  });
692
- }, pt = ({ nodes: e, depth: t, className: n, ...r }) => /* @__PURE__ */ G("ul", {
658
+ }, st = ({ nodes: e, depth: t, className: n, ...r }) => /* @__PURE__ */ W("ul", {
693
659
  role: "list",
694
660
  className: c("flex min-w-0 flex-col gap-0.5", n),
695
- children: ze(e).map((e) => /* @__PURE__ */ G("li", {
661
+ children: Ne(e).map((e) => /* @__PURE__ */ W("li", {
696
662
  role: "listitem",
697
663
  className: "min-w-0",
698
- children: e.node ? /* @__PURE__ */ G(dt, {
664
+ children: e.node ? /* @__PURE__ */ W(at, {
699
665
  node: e.node,
700
666
  depth: t,
701
667
  ...r
702
- }) : /* @__PURE__ */ G(ft, {
668
+ }) : /* @__PURE__ */ W(ot, {
703
669
  row: e,
704
670
  depth: t,
705
671
  ...r
706
672
  })
707
673
  }, e.key))
708
- }), mt = ({ stages: e, isStreaming: t, className: n, styles: r, labels: i, onAttachmentClick: a, expansion: o }) => {
674
+ }), Q = ({ stages: e, isStreaming: t, className: n, styles: r, labels: i, onAttachmentClick: a, expansion: o }) => {
709
675
  let { colors: l, typography: u } = r ?? {}, d = s({
710
676
  "--cs-text": l?.text,
711
677
  "--cs-row-hover": l?.rowHoverColor,
@@ -722,11 +688,11 @@ var q = {
722
688
  "--cs-code-border": l?.codeBorderColor,
723
689
  "--cs-code-text": l?.codeTextColor,
724
690
  "--cs-border": l?.borderColor
725
- }), f = U(() => Pe(e), [e]);
726
- return /* @__PURE__ */ G("div", {
691
+ }), f = V(() => Oe(e), [e]);
692
+ return /* @__PURE__ */ W("div", {
727
693
  style: d,
728
- className: c("w-full min-w-0", Y.panel, n, q.panel),
729
- children: /* @__PURE__ */ G(pt, {
694
+ className: c("w-full min-w-0", J.panel, n, K.panel),
695
+ children: /* @__PURE__ */ W(st, {
730
696
  nodes: f,
731
697
  depth: 0,
732
698
  className: "w-full ps-5",
@@ -737,37 +703,35 @@ var q = {
737
703
  onAttachmentClick: a
738
704
  })
739
705
  });
740
- }, ht = (e) => {
741
- let t = ye();
742
- return /* @__PURE__ */ G(mt, {
706
+ }, ct = (e) => {
707
+ let t = be();
708
+ return /* @__PURE__ */ W(Q, {
743
709
  ...e,
744
710
  expansion: t
745
711
  });
746
712
  }, $ = {
747
- toggleButton: "_toggleButton_1kyyc_7",
748
- groupRegion: "_groupRegion_1kyyc_28",
749
- executedLabel: "_executedLabel_1kyyc_32",
750
- stepsCount: "_stepsCount_1kyyc_36",
751
- doneIcon: "_doneIcon_1kyyc_41",
752
- failedText: "_failedText_1kyyc_45",
753
- liveName: "_liveName_1kyyc_49"
754
- }, gt = ({ stages: e, isStreaming: t, labels: n, className: r, styles: i, onAttachmentClick: a }) => {
755
- let { executedLabel: l = "Executed", stepsLabel: u = () => "steps", failedCountLabel: m = (e) => `${e} failed`, runningAriaLabel: g = "Running", copyAriaLabel: _, failedAriaLabel: v, attemptLabel: b, attachmentClickLabel: x } = n ?? {}, [C, w] = W(t), T = ye(), { reset: E } = T, D = e.length > 1;
756
- H(() => {
713
+ toggleButton: "_toggleButton_16fae_7",
714
+ groupRegion: "_groupRegion_16fae_28",
715
+ executedLabel: "_executedLabel_16fae_32",
716
+ doneIcon: "_doneIcon_16fae_36",
717
+ failedText: "_failedText_16fae_40",
718
+ liveName: "_liveName_16fae_44"
719
+ }, lt = ({ stages: e, isStreaming: t, labels: n, className: r, styles: i, onAttachmentClick: a }) => {
720
+ let { executedLabel: l = "Executed", stepsLabel: u = () => "steps", failedCountLabel: m = (e) => `${e} failed`, runningAriaLabel: g = "Running", copyAriaLabel: _, failedAriaLabel: v, attemptLabel: b, attachmentClickLabel: x } = n ?? {}, [C, w] = H(t), T = be(), { reset: E } = T, D = e.length > 1;
721
+ B(() => {
757
722
  D && !C && E();
758
723
  }, [
759
724
  D,
760
725
  C,
761
726
  E
762
727
  ]);
763
- let O = _e(t);
764
- H(() => {
728
+ let O = ye(t);
729
+ B(() => {
765
730
  O.current && !t && w(!1), O.current = t;
766
731
  }, [t]);
767
732
  let { colors: k, panel: A } = i ?? {}, j = i?.typography ?? { fontClassName: "dial-small-text" }, M = s({
768
733
  "--cs-cg-label": k?.labelColor,
769
734
  "--cs-cg-label-hover": k?.labelHoverColor,
770
- "--cs-cg-steps-count": k?.stepsCountColor,
771
735
  "--cs-cg-done": k?.doneColor,
772
736
  "--cs-cg-failed": k?.failedColor,
773
737
  "--cs-text": A?.text,
@@ -794,7 +758,7 @@ var q = {
794
758
  attemptLabel: b,
795
759
  attachmentClickLabel: x
796
760
  };
797
- if (e.length === 1) return /* @__PURE__ */ G(mt, {
761
+ if (e.length === 1) return /* @__PURE__ */ W(Q, {
798
762
  stages: e,
799
763
  isStreaming: t,
800
764
  expansion: T,
@@ -806,59 +770,29 @@ var q = {
806
770
  labels: N,
807
771
  onAttachmentClick: a
808
772
  });
809
- let P = e.some((e) => e.status === o.Failed), F = je(e.map((e) => e.name)), I = F > 0 ? ke(F) : void 0, L;
773
+ let P = e.some((e) => e.status === o.Failed), F;
810
774
  if (t) {
811
- let t = J((Me(e) ?? e[e.length - 1]).name).name;
812
- L = /* @__PURE__ */ K("span", {
775
+ let t = q((Ee(e) ?? e[e.length - 1]).name).name;
776
+ F = /* @__PURE__ */ G("span", {
813
777
  role: "status",
814
778
  "aria-live": "polite",
815
779
  className: "flex min-w-0 items-center gap-2",
816
- children: [/* @__PURE__ */ G("span", {
780
+ children: [/* @__PURE__ */ W("span", {
817
781
  className: "flex flex-none items-center",
818
- children: /* @__PURE__ */ G(y, {
782
+ children: /* @__PURE__ */ W(y, {
819
783
  size: 14,
820
784
  ariaLabel: g
821
785
  })
822
- }), t && /* @__PURE__ */ G("span", {
786
+ }), t && /* @__PURE__ */ W("span", {
823
787
  className: c("min-w-0 max-w-[22rem] truncate", j.fontClassName, $.liveName),
824
- children: /* @__PURE__ */ G(h, { text: t })
788
+ children: /* @__PURE__ */ W(h, { text: t })
825
789
  })]
826
790
  });
827
791
  } else if (P) {
828
792
  let t = e.filter((e) => e.status === o.Failed).length;
829
- L = /* @__PURE__ */ K("span", {
793
+ F = /* @__PURE__ */ G("span", {
830
794
  className: "inline-flex items-center gap-1",
831
- children: [
832
- /* @__PURE__ */ K("span", {
833
- className: c(j.fontClassName, $.executedLabel),
834
- children: [
835
- l,
836
- " ",
837
- e.length,
838
- " ",
839
- u(e.length)
840
- ]
841
- }),
842
- /* @__PURE__ */ G("span", {
843
- className: c(j.fontClassName, $.failedText),
844
- children: m(t)
845
- }),
846
- I && /* @__PURE__ */ G("span", {
847
- className: c(j.fontClassName, $.stepsCount),
848
- children: I
849
- })
850
- ]
851
- });
852
- } else L = /* @__PURE__ */ K("span", {
853
- className: "inline-flex items-center gap-1",
854
- children: [
855
- /* @__PURE__ */ G(S, {
856
- size: f.SM,
857
- className: $.doneIcon,
858
- "aria-hidden": !0,
859
- stroke: p
860
- }),
861
- /* @__PURE__ */ K("span", {
795
+ children: [/* @__PURE__ */ G("span", {
862
796
  className: c(j.fontClassName, $.executedLabel),
863
797
  children: [
864
798
  l,
@@ -867,24 +801,40 @@ var q = {
867
801
  " ",
868
802
  u(e.length)
869
803
  ]
870
- }),
871
- I && /* @__PURE__ */ G("span", {
872
- className: c(j.fontClassName, $.stepsCount),
873
- children: I
874
- })
875
- ]
804
+ }), /* @__PURE__ */ W("span", {
805
+ className: c(j.fontClassName, $.failedText),
806
+ children: m(t)
807
+ })]
808
+ });
809
+ } else F = /* @__PURE__ */ G("span", {
810
+ className: "inline-flex items-center gap-1",
811
+ children: [/* @__PURE__ */ W(S, {
812
+ size: f.SM,
813
+ className: $.doneIcon,
814
+ "aria-hidden": !0,
815
+ stroke: p
816
+ }), /* @__PURE__ */ G("span", {
817
+ className: c(j.fontClassName, $.executedLabel),
818
+ children: [
819
+ l,
820
+ " ",
821
+ e.length,
822
+ " ",
823
+ u(e.length)
824
+ ]
825
+ })]
876
826
  });
877
- return /* @__PURE__ */ G("div", {
827
+ return /* @__PURE__ */ W("div", {
878
828
  style: M,
879
- className: c("flex w-full flex-col gap-1", r, q.group),
880
- children: /* @__PURE__ */ G(d, {
881
- title: L,
829
+ className: c("flex w-full flex-col gap-1", r, K.group),
830
+ children: /* @__PURE__ */ W(d, {
831
+ title: F,
882
832
  expanded: C,
883
833
  onToggle: w,
884
834
  className: "overflow-visible py-0",
885
- headerClassName: c("justify-start gap-1 rounded-none px-0", $.toggleButton, q.groupToggle),
835
+ headerClassName: c("justify-start gap-1 rounded-none px-0", $.toggleButton, K.groupToggle),
886
836
  contentClassName: c("-mt-2 px-0", $.groupRegion),
887
- children: C && /* @__PURE__ */ G(mt, {
837
+ children: C && /* @__PURE__ */ W(Q, {
888
838
  stages: e,
889
839
  isStreaming: t,
890
840
  expansion: T,
@@ -900,4 +850,4 @@ var q = {
900
850
  });
901
851
  };
902
852
  //#endregion
903
- export { q as CONVERSATION_STAGES_CLASS, gt as CollapsedGroup, ht as StagesPanel };
853
+ export { K as CONVERSATION_STAGES_CLASS, lt as CollapsedGroup, ct as StagesPanel };
@@ -6,8 +6,6 @@ export interface CollapsedGroupColors {
6
6
  labelColor?: string;
7
7
  /** Color of the toggle button label and icon on hover. */
8
8
  labelHoverColor?: string;
9
- /** Color of the execution time. */
10
- stepsCountColor?: string;
11
9
  /** Color of the leading check icon in the finished-and-successful summary. */
12
10
  doneColor?: string;
13
11
  /** Color of the "N failed" text in the failed summary. */
@@ -1 +1 @@
1
- {"version":3,"file":"collapsed-group.d.ts","sourceRoot":"","sources":["../../src/models/collapsed-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mCAAmC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,iEAAiE;AACjE,MAAM,WAAW,wBAAwB;IACvC,6FAA6F;IAC7F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,4DAA4D;IAC5D,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,+FAA+F;IAC/F,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+FAA+F;IAC/F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mHAAmH;IACnH,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,sHAAsH;IACtH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IAClC,yCAAyC;IACzC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,8FAA8F;IAC9F,WAAW,EAAE,OAAO,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,gHAAgH;IAChH,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC7D"}
1
+ {"version":3,"file":"collapsed-group.d.ts","sourceRoot":"","sources":["../../src/models/collapsed-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,iEAAiE;AACjE,MAAM,WAAW,wBAAwB;IACvC,6FAA6F;IAC7F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,4DAA4D;IAC5D,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,+FAA+F;IAC/F,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+FAA+F;IAC/F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mHAAmH;IACnH,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,sHAAsH;IACtH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IAClC,yCAAyC;IACzC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,8FAA8F;IAC9F,WAAW,EAAE,OAAO,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,gHAAgH;IAChH,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC7D"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-conversation-stages",
3
3
  "description": "Panel for displaying agent processing stages during LLM response streaming",
4
- "version": "1.2.0-dev.285",
4
+ "version": "1.2.0-dev.288",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tabler/icons-react": "^3.44.0",
21
- "@epam/ai-dial-attachment-input": "1.2.0-dev.285"
21
+ "@epam/ai-dial-attachment-input": "1.2.0-dev.288"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": "^19.2.8",
25
- "@epam/ai-dial-chat-shared": "1.2.0-dev.285",
25
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.288",
26
26
  "@epam/ai-dial-ui-kit": "^0.15.0-dev.36"
27
27
  },
28
28
  "repository": {
@@ -9,11 +9,5 @@ interface CleanedStageName {
9
9
  export declare const cleanStageName: (rawName: string) => CleanedStageName;
10
10
  /** Returns true if the name looks like a raw identifier: no whitespace and contains an underscore. */
11
11
  export declare const isIdentifierLike: (name: string) => boolean;
12
- /** Formats a total duration in seconds as `'Xm Ys'` when >= 60s, otherwise `'X.Xs'`. */
13
- export declare const formatTotalDuration: (totalSeconds: number) => string;
14
- /** Parses a duration label produced by {@link cleanStageName} (e.g. `'3.99s'`) back into seconds. */
15
- export declare const parseDurationSeconds: (durationLabel: string | undefined) => number | undefined;
16
- /** Returns the elapsed duration represented by stage names, without double-counting overlapping timed stages. */
17
- export declare const calculateStagesDurationSeconds: (stageNames: string[]) => number;
18
12
  export {};
19
13
  //# sourceMappingURL=stage-name.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stage-name.d.ts","sourceRoot":"","sources":["../../src/utils/stage-name.ts"],"names":[],"mappings":"AAuCA,+DAA+D;AAC/D,UAAU,gBAAgB;IACxB,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,8FAA8F;IAC9F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAkCD,0HAA0H;AAC1H,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,gBAiBhD,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,OACW,CAAC;AAE5D,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,GAAI,cAAc,MAAM,KAAG,MAO1D,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,oBAAoB,GAC/B,eAAe,MAAM,GAAG,SAAS,KAChC,MAAM,GAAG,SAIX,CAAC;AAEF,iHAAiH;AACjH,eAAO,MAAM,8BAA8B,GACzC,YAAY,MAAM,EAAE,KACnB,MA2DF,CAAC"}
1
+ {"version":3,"file":"stage-name.d.ts","sourceRoot":"","sources":["../../src/utils/stage-name.ts"],"names":[],"mappings":"AA+BA,+DAA+D;AAC/D,UAAU,gBAAgB;IACxB,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,8FAA8F;IAC9F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAuBD,0HAA0H;AAC1H,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,gBAiBhD,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,OACW,CAAC"}