@epam/ai-dial-conversation-stages 1.2.0-dev.21 → 1.2.0-dev.217
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 +3 -1
- package/components/StageItem/StageItem.d.ts.map +1 -1
- package/components/StageMarkdownContent/StageCodeBlock.d.ts +2 -2
- package/components/StageMarkdownContent/StageCodeBlock.d.ts.map +1 -1
- package/components/StagesPanel/StagesPanel.d.ts.map +1 -1
- package/constants/public-class-names.d.ts +9 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/constants/stage-accordion.d.ts +5 -0
- package/constants/stage-accordion.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +687 -371
- package/models/collapsed-group.d.ts +5 -3
- package/models/collapsed-group.d.ts.map +1 -1
- package/models/stages-props.d.ts +6 -2
- package/models/stages-props.d.ts.map +1 -1
- package/package.json +5 -4
- package/utils/stage-attachments.d.ts +11 -0
- package/utils/stage-attachments.d.ts.map +1 -0
- package/utils/stage-progress.d.ts +0 -2
- package/utils/stage-progress.d.ts.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Stage } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { DisplayAttachment, Stage } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { StagesPanelColors } from './stages-props';
|
|
3
3
|
/** Color overrides for the `CollapsedGroup` component applied as CSS custom properties. */
|
|
4
4
|
export interface CollapsedGroupColors {
|
|
@@ -35,8 +35,6 @@ export interface CollapsedGroupLabels {
|
|
|
35
35
|
stepsLabel?: (count: number) => string;
|
|
36
36
|
/** Returns the "N failed" text in the failed summary. Defaults to `(n) => \`${n} failed\``. */
|
|
37
37
|
failedCountLabel?: (failedCount: number) => string;
|
|
38
|
-
/** Returns the "Step X of Y" text in the running summary. Defaults to `(current, total) => \`Step ${current} of ${total}\``. */
|
|
39
|
-
runningStepLabel?: (current: number, total: number) => string;
|
|
40
38
|
/** Accessible label announced for the running summary's spinner. Defaults to `'Running'`. */
|
|
41
39
|
runningAriaLabel?: string;
|
|
42
40
|
/** Accessible label for the copy button on each stage's content. Defaults to `'Copy'`. */
|
|
@@ -45,6 +43,8 @@ export interface CollapsedGroupLabels {
|
|
|
45
43
|
failedAriaLabel?: string;
|
|
46
44
|
/** Returns the label for a single attempt inside a collapsed `×N` group. Defaults to `(n) => \`Attempt ${n}\``. */
|
|
47
45
|
attemptLabel?: (attemptNumber: number) => string;
|
|
46
|
+
/** Accessible label for a stage attachment tile's interactive click action. Defaults to `'Preview search result'`. */
|
|
47
|
+
attachmentClickLabel?: string;
|
|
48
48
|
}
|
|
49
49
|
/** Props accepted by the `CollapsedGroup` component. */
|
|
50
50
|
export interface CollapsedGroupProps {
|
|
@@ -58,5 +58,7 @@ export interface CollapsedGroupProps {
|
|
|
58
58
|
className?: string;
|
|
59
59
|
/** Color and typography overrides applied as CSS custom properties. */
|
|
60
60
|
styles?: CollapsedGroupStyles;
|
|
61
|
+
/** Called when a stage attachment tile is clicked/activated. Forwarded unchanged to the inner `StagesPanel`. */
|
|
62
|
+
onAttachmentClick?: (attachment: DisplayAttachment) => void;
|
|
61
63
|
}
|
|
62
64
|
//# sourceMappingURL=collapsed-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsed-group.d.ts","sourceRoot":"","sources":["../../src/models/collapsed-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;
|
|
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,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AyC;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/models/stages-props.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Stage } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { DisplayAttachment, Stage } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
/** Typography class overrides for stage name and expanded content elements in `StagesPanel`. */
|
|
3
3
|
export interface StageTypography {
|
|
4
4
|
/** CSS utility class applied to the stage/step name. Defaults to `'dial-small-text'`. */
|
|
@@ -11,7 +11,7 @@ export interface StageTypography {
|
|
|
11
11
|
headingClassName?: string;
|
|
12
12
|
/** CSS utility class applied to inline code elements. Defaults to `'dial-code-text rounded-md'`. */
|
|
13
13
|
codeClassName?: string;
|
|
14
|
-
/** CSS utility class applied to fenced code blocks
|
|
14
|
+
/** CSS utility class applied to fenced code blocks. Defaults to `'dial-code-text'`. */
|
|
15
15
|
codeBlockClassName?: string;
|
|
16
16
|
/** CSS utility class applied to count badges (e.g. `×N` collapsed group). Defaults to `'dial-tiny-text'`. */
|
|
17
17
|
countFontClassName?: string;
|
|
@@ -68,6 +68,8 @@ export interface StagesPanelLabels {
|
|
|
68
68
|
failedAriaLabel?: string;
|
|
69
69
|
/** Label for a single attempt given its 1-based number. Defaults to `(n) => \`Attempt ${n}\``. */
|
|
70
70
|
attemptLabel?: (attemptNumber: number) => string;
|
|
71
|
+
/** Accessible label for a stage attachment tile's interactive click action. Defaults to `'Preview search result'`. */
|
|
72
|
+
attachmentClickLabel?: string;
|
|
71
73
|
}
|
|
72
74
|
/** Props accepted by the `StagesPanel` component. */
|
|
73
75
|
export interface StagesPanelProps {
|
|
@@ -81,5 +83,7 @@ export interface StagesPanelProps {
|
|
|
81
83
|
styles?: StagesPanelStyles;
|
|
82
84
|
/** User-visible strings. */
|
|
83
85
|
labels?: StagesPanelLabels;
|
|
86
|
+
/** Called when a stage attachment tile is clicked/activated. Receives the mapped display attachment. */
|
|
87
|
+
onAttachmentClick?: (attachment: DisplayAttachment) => void;
|
|
84
88
|
}
|
|
85
89
|
//# sourceMappingURL=stages-props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stages-props.d.ts","sourceRoot":"","sources":["../../src/models/stages-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;
|
|
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,E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C;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.217",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -17,12 +17,13 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@tabler/icons-react": "^3.44.0"
|
|
20
|
+
"@tabler/icons-react": "^3.44.0",
|
|
21
|
+
"@epam/ai-dial-attachment-input": "1.2.0-dev.217"
|
|
21
22
|
},
|
|
22
23
|
"peerDependencies": {
|
|
23
24
|
"react": "^19.2.8",
|
|
24
|
-
"@epam/ai-dial-chat-shared": "1.2.0-dev.
|
|
25
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.2.0-dev.217",
|
|
26
|
+
"@epam/ai-dial-ui-kit": "^0.15.0-dev.27"
|
|
26
27
|
},
|
|
27
28
|
"repository": {
|
|
28
29
|
"type": "git",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DisplayAttachment, MessageAttachment } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
/**
|
|
3
|
+
* Maps stage attachments to their display-only model, preferring each
|
|
4
|
+
* attachment's own declared `type` for `contentType` over the type inferred
|
|
5
|
+
* from `reference_url`'s path. A stage attachment's `reference_url` points at
|
|
6
|
+
* the source document a search result was extracted from, not at the
|
|
7
|
+
* attachment's own content, so the generic message-attachment mapper's
|
|
8
|
+
* reference-url-first inference produces the wrong content type here.
|
|
9
|
+
*/
|
|
10
|
+
export declare const mapStageAttachmentsToDisplay: (attachments?: MessageAttachment[]) => DisplayAttachment[];
|
|
11
|
+
//# sourceMappingURL=stage-attachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage-attachments.d.ts","sourceRoot":"","sources":["../../src/utils/stage-attachments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAGnC;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,GACvC,cAAc,iBAAiB,EAAE,KAChC,iBAAiB,EAqBnB,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Stage } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
/** Returns the last stage with `status: null` (the currently executing stage), or `undefined` if none exists. */
|
|
3
3
|
export declare const findLiveStage: (stages: Stage[]) => Stage | undefined;
|
|
4
|
-
/** 1-based position of `stage` within `stages`, by its stable `index` field. */
|
|
5
|
-
export declare const stagePosition: (stages: Stage[], stage: Stage) => number;
|
|
6
4
|
//# sourceMappingURL=stage-progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-progress.d.ts","sourceRoot":"","sources":["../../src/utils/stage-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,iHAAiH;AACjH,eAAO,MAAM,aAAa,GAAI,QAAQ,KAAK,EAAE,KAAG,KAAK,GAAG,SACK,CAAC
|
|
1
|
+
{"version":3,"file":"stage-progress.d.ts","sourceRoot":"","sources":["../../src/utils/stage-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,iHAAiH;AACjH,eAAO,MAAM,aAAa,GAAI,QAAQ,KAAK,EAAE,KAAG,KAAK,GAAG,SACK,CAAC"}
|