@epam/ai-dial-conversation-stages 1.2.0-dev.225 → 1.2.0-dev.231
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 +8 -2
- package/components/StageItem/StageItem.d.ts.map +1 -1
- package/components/StageList/StageList.d.ts +29 -0
- package/components/StageList/StageList.d.ts.map +1 -0
- package/components/StagesPanel/StagesPanel.d.ts +15 -1
- package/components/StagesPanel/StagesPanel.d.ts.map +1 -1
- package/constants/stage-accordion.d.ts +9 -3
- package/constants/stage-accordion.d.ts.map +1 -1
- package/hooks/useStageExpansion/useStageExpansion.d.ts +9 -0
- package/hooks/useStageExpansion/useStageExpansion.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.js +329 -244
- package/models/stage-grouping.d.ts +6 -6
- package/models/stage-grouping.d.ts.map +1 -1
- package/models/stage-tree.d.ts +21 -0
- package/models/stage-tree.d.ts.map +1 -0
- package/models/stages-props.d.ts +1 -1
- package/models/stages-props.d.ts.map +1 -1
- package/package.json +4 -4
- package/utils/stage-grouping.d.ts +7 -3
- package/utils/stage-grouping.d.ts.map +1 -1
- package/utils/stage-tree.d.ts +14 -0
- package/utils/stage-tree.d.ts.map +1 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** A row rendered inside
|
|
1
|
+
import { StageNode } from './stage-tree';
|
|
2
|
+
/** A row rendered inside one sibling list — either one stage node or a collapsed `×N` group of identical attempts. */
|
|
3
3
|
export interface StageRow {
|
|
4
4
|
/** Stable key for list rendering — the first attempt's index. */
|
|
5
5
|
key: number;
|
|
6
6
|
/** Shared cleaned display name for the group. */
|
|
7
7
|
name?: string;
|
|
8
|
-
/** The single stage for this row (present only when there is one attempt). */
|
|
9
|
-
|
|
10
|
-
/** Individual attempts in original order. */
|
|
11
|
-
attempts?:
|
|
8
|
+
/** The single stage node for this row (present only when there is one attempt). */
|
|
9
|
+
node?: StageNode;
|
|
10
|
+
/** Individual attempts in original order, each keeping its own descendants. */
|
|
11
|
+
attempts?: StageNode[];
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=stage-grouping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-grouping.d.ts","sourceRoot":"","sources":["../../src/models/stage-grouping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"stage-grouping.d.ts","sourceRoot":"","sources":["../../src/models/stage-grouping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,sHAAsH;AACtH,MAAM,WAAW,QAAQ;IACvB,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;CACxB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Stage } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
/** One stage in the display hierarchy derived from `parent_stage_index`. */
|
|
3
|
+
export interface StageNode {
|
|
4
|
+
/** The original normalized stage; never mutated. */
|
|
5
|
+
stage: Stage;
|
|
6
|
+
/** Child nodes in their input encounter order. */
|
|
7
|
+
children: StageNode[];
|
|
8
|
+
}
|
|
9
|
+
/** Panel-local disclosure state, keyed by stable stage identity. */
|
|
10
|
+
export interface StageExpansion {
|
|
11
|
+
/** Returns whether the disclosure with this key is expanded. */
|
|
12
|
+
isExpanded: (key: string) => boolean;
|
|
13
|
+
/** Records the user's expand/collapse choice for this key. */
|
|
14
|
+
onToggle: (key: string, isExpanded: boolean) => void;
|
|
15
|
+
}
|
|
16
|
+
/** Disclosure state together with the owner's ability to discard every choice. */
|
|
17
|
+
export interface StageExpansionState extends StageExpansion {
|
|
18
|
+
/** Collapses every disclosure, e.g. when the surrounding panel unmounts. */
|
|
19
|
+
reset: () => void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=stage-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage-tree.d.ts","sourceRoot":"","sources":["../../src/models/stage-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,4EAA4E;AAC5E,MAAM,WAAW,SAAS;IACxB,oDAAoD;IACpD,KAAK,EAAE,KAAK,CAAC;IACb,kDAAkD;IAClD,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB;AAED,oEAAoE;AACpE,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACrC,8DAA8D;IAC9D,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CACtD;AAED,kFAAkF;AAClF,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,4EAA4E;IAC5E,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB"}
|
package/models/stages-props.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface StagesPanelColors {
|
|
|
38
38
|
durationTextColor?: string;
|
|
39
39
|
/** Color of secondary (non-status) icons. Defaults to `--text-secondary` at 70% opacity. */
|
|
40
40
|
iconSecondaryColor?: string;
|
|
41
|
-
/** Color of the completed-check icon. Defaults to `--text-
|
|
41
|
+
/** Color of the completed-check icon. Defaults to `--text-success`. */
|
|
42
42
|
iconCompletedColor?: string;
|
|
43
43
|
/** Color of the error/exception icon. Defaults to `--text-warning`. */
|
|
44
44
|
iconErrorColor?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stages-props.d.ts","sourceRoot":"","sources":["../../src/models/stages-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAE1E,gGAAgG;AAChG,MAAM,WAAW,eAAe;IAC9B,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wJAAwJ;IACxJ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kJAAkJ;IAClJ,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kIAAkI;IAClI,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oGAAoG;IACpG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,6GAA6G;IAC7G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gIAAgI;IAChI,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,2EAA2E;AAC3E,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4FAA4F;IAC5F,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,
|
|
1
|
+
{"version":3,"file":"stages-props.d.ts","sourceRoot":"","sources":["../../src/models/stages-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,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AC,EAAE,MAAM,CAAC;IACvB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wFAAwF;AACxF,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,iEAAiE;IACjE,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+FAA+F;IAC/F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kGAAkG;IAClG,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,sHAAsH;IACtH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,yEAAyE;IACzE,WAAW,EAAE,OAAO,CAAC;IACrB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,wGAAwG;IACxG,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.
|
|
4
|
+
"version": "1.2.0-dev.231",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tabler/icons-react": "^3.44.0",
|
|
21
|
-
"@epam/ai-dial-attachment-input": "1.2.0-dev.
|
|
21
|
+
"@epam/ai-dial-attachment-input": "1.2.0-dev.231"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": "^19.2.8",
|
|
25
|
-
"@epam/ai-dial-chat-shared": "1.2.0-dev.
|
|
26
|
-
"@epam/ai-dial-ui-kit": "^0.15.0-dev.
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.2.0-dev.231",
|
|
26
|
+
"@epam/ai-dial-ui-kit": "^0.15.0-dev.30"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { Stage } from '@epam/ai-dial-chat-shared';
|
|
2
1
|
import { StageRow } from '../models/stage-grouping';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { StageNode } from '../models/stage-tree';
|
|
3
|
+
/**
|
|
4
|
+
* Groups consecutive sibling nodes with the same cleaned name into a `×N`
|
|
5
|
+
* group row; all others render as single rows. Applied to one sibling list
|
|
6
|
+
* at a time, so equal names under different parents never share a group.
|
|
7
|
+
*/
|
|
8
|
+
export declare const groupStagesByName: (nodes: StageNode[]) => StageRow[];
|
|
5
9
|
//# sourceMappingURL=stage-grouping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-grouping.d.ts","sourceRoot":"","sources":["../../src/utils/stage-grouping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"stage-grouping.d.ts","sourceRoot":"","sources":["../../src/utils/stage-grouping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,SAAS,EAAE,KAAG,QAAQ,EA2B9D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Stage } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { StageNode } from '../models/stage-tree';
|
|
3
|
+
/**
|
|
4
|
+
* Derives the display forest from a flat, normalized stage array in O(n).
|
|
5
|
+
* Roots and each child list keep input encounter order; a stage whose parent
|
|
6
|
+
* reference is missing, unknown, self/forward-pointing or malformed becomes a
|
|
7
|
+
* root. Every input stage appears exactly once; the input is not mutated.
|
|
8
|
+
*/
|
|
9
|
+
export declare const buildStageTree: (stages: Stage[]) => StageNode[];
|
|
10
|
+
/** Disclosure key of a single stage — its stable index, never its streaming name. */
|
|
11
|
+
export declare const getStageExpansionKey: (stageIndex: number) => string;
|
|
12
|
+
/** Disclosure key of a `×N` retry group — its first attempt's index. */
|
|
13
|
+
export declare const getGroupExpansionKey: (firstAttemptIndex: number) => string;
|
|
14
|
+
//# sourceMappingURL=stage-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage-tree.d.ts","sourceRoot":"","sources":["../../src/utils/stage-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAuBtD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,KAAK,EAAE,KAAG,SAAS,EAgBzD,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,oBAAoB,GAAI,YAAY,MAAM,KAAG,MACnC,CAAC;AAExB,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,GAAI,mBAAmB,MAAM,KAAG,MACnC,CAAC"}
|