@epam/ai-dial-conversation-stages 1.1.0-dev.124 → 1.1.0-dev.125
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/index.js +14 -14
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownRenderer as e, StageStatus as t, buildCssVars as n, copyToClipboard as r, mergeClasses as i } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import { DIAL_ICON_SIZE as a, DialEllipsisTooltip as o,
|
|
2
|
+
import { DIAL_ICON_SIZE as a, DialEllipsisTooltip as o, ElementSize as s, GhostIconButton as c, LinkButton as l, Spinner as u } from "@epam/ai-dial-ui-kit";
|
|
3
3
|
import { IconAlertCircle as d, IconCheck as f, IconChevronDown as p, IconChevronRight as m, IconCopy as h } from "@tabler/icons-react";
|
|
4
4
|
import { memo as g, useCallback as _, useEffect as v, useRef as y, useState as b } from "react";
|
|
5
5
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
@@ -57,7 +57,7 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
|
|
|
57
57
|
codeInline: "_codeInline_1ucl5_63",
|
|
58
58
|
blockquote: "_blockquote_1ucl5_69",
|
|
59
59
|
tableCell: "_tableCell_1ucl5_74"
|
|
60
|
-
}, F = ({ status: e, isLive: n, runningLabel: r = "Running", failedLabel: i = "Failed" }) => n ? /* @__PURE__ */ S(
|
|
60
|
+
}, F = ({ status: e, isLive: n, runningLabel: r = "Running", failedLabel: i = "Failed" }) => n ? /* @__PURE__ */ S(u, {
|
|
61
61
|
size: 16,
|
|
62
62
|
ariaLabel: r
|
|
63
63
|
}) : e === t.Failed ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(d, {
|
|
@@ -72,17 +72,17 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
|
|
|
72
72
|
className: P.iconCompleted,
|
|
73
73
|
"aria-hidden": !0
|
|
74
74
|
}), I = ({ children: e, codeClassName: t, copyAriaLabel: n }) => {
|
|
75
|
-
let [o,
|
|
75
|
+
let [o, l] = b(!1), u = y(null);
|
|
76
76
|
v(() => () => {
|
|
77
77
|
u.current != null && clearTimeout(u.current);
|
|
78
78
|
}, []);
|
|
79
79
|
let d = _(() => {
|
|
80
|
-
r(typeof e == "string" ? e : String(e ?? "")), u.current && clearTimeout(u.current),
|
|
80
|
+
r(typeof e == "string" ? e : String(e ?? "")), u.current && clearTimeout(u.current), l(!0), u.current = setTimeout(() => l(!1), 2e3);
|
|
81
81
|
}, [e]);
|
|
82
82
|
return /* @__PURE__ */ C("pre", {
|
|
83
83
|
className: i("dial-small-text relative max-h-[300px] overflow-auto rounded border p-3", P.codeBlock),
|
|
84
|
-
children: [/* @__PURE__ */ S(
|
|
85
|
-
size:
|
|
84
|
+
children: [/* @__PURE__ */ S(c, {
|
|
85
|
+
size: s.Small,
|
|
86
86
|
icon: S(o ? f : h, {
|
|
87
87
|
size: a.SM,
|
|
88
88
|
className: P.iconSecondary
|
|
@@ -299,12 +299,12 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
|
|
|
299
299
|
doneIcon: "_doneIcon_rt6w3_19",
|
|
300
300
|
failedText: "_failedText_rt6w3_23",
|
|
301
301
|
liveName: "_liveName_rt6w3_27"
|
|
302
|
-
}, H = ({ stages: e, isStreaming: r, labels: o, className:
|
|
302
|
+
}, H = ({ stages: e, isStreaming: r, labels: o, className: s, styles: c }) => {
|
|
303
303
|
let { executedLabel: d = "Executed", stepsLabel: h = () => "steps", failedCountLabel: g = (e) => `${e} failed`, runningStepLabel: _ = (e, t) => `Step ${e} of ${t}`, runningAriaLabel: x = "Running", copyAriaLabel: w, failedAriaLabel: T, attemptLabel: E } = o ?? {}, [O, N] = b(r), P = y(r);
|
|
304
304
|
v(() => {
|
|
305
305
|
P.current && !r && N(!1), P.current = r;
|
|
306
306
|
}, [r]);
|
|
307
|
-
let { colors: F, panel: I } =
|
|
307
|
+
let { colors: F, panel: I } = c ?? {}, L = c?.typography ?? { fontClassName: "dial-small-text" }, R = n({
|
|
308
308
|
"--cs-cg-label": F?.labelColor,
|
|
309
309
|
"--cs-cg-label-hover": F?.labelHoverColor,
|
|
310
310
|
"--cs-cg-steps-count": F?.stepsCountColor,
|
|
@@ -336,10 +336,10 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
|
|
|
336
336
|
if (e.length === 1) return /* @__PURE__ */ S(B, {
|
|
337
337
|
stages: e,
|
|
338
338
|
isStreaming: r,
|
|
339
|
-
className:
|
|
339
|
+
className: s,
|
|
340
340
|
styles: {
|
|
341
341
|
colors: I,
|
|
342
|
-
typography:
|
|
342
|
+
typography: c?.typography
|
|
343
343
|
},
|
|
344
344
|
labels: z
|
|
345
345
|
});
|
|
@@ -354,7 +354,7 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
|
|
|
354
354
|
"aria-live": "polite",
|
|
355
355
|
className: "inline-flex items-center gap-2",
|
|
356
356
|
children: [
|
|
357
|
-
/* @__PURE__ */ S(
|
|
357
|
+
/* @__PURE__ */ S(u, {
|
|
358
358
|
size: 14,
|
|
359
359
|
ariaLabel: x
|
|
360
360
|
}),
|
|
@@ -419,8 +419,8 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
|
|
|
419
419
|
});
|
|
420
420
|
return /* @__PURE__ */ C("div", {
|
|
421
421
|
style: R,
|
|
422
|
-
className: i("flex w-full flex-col gap-1",
|
|
423
|
-
children: [/* @__PURE__ */ S(
|
|
422
|
+
className: i("flex w-full flex-col gap-1", s),
|
|
423
|
+
children: [/* @__PURE__ */ S(l, {
|
|
424
424
|
className: V.toggleButton,
|
|
425
425
|
onClick: () => N((e) => !e),
|
|
426
426
|
"aria-expanded": O,
|
|
@@ -442,7 +442,7 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
|
|
|
442
442
|
isStreaming: r,
|
|
443
443
|
styles: {
|
|
444
444
|
colors: I,
|
|
445
|
-
typography:
|
|
445
|
+
typography: c?.typography
|
|
446
446
|
},
|
|
447
447
|
labels: z,
|
|
448
448
|
className: "pt-1"
|
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.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.125",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"react": "^19.0.0",
|
|
21
21
|
"@tabler/icons-react": "^3.0.0",
|
|
22
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
22
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.125",
|
|
23
23
|
"@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|