@gooddata/sdk-ui-gen-ai 11.52.0-alpha.6 → 11.52.0-alpha.7
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/esm/components/messages/contents/VisualizationContents.d.ts.map +1 -1
- package/esm/components/messages/contents/VisualizationContents.js +5 -3
- package/esm/components/messages/contents/useKdaDefinition.js +8 -0
- package/esm/components/messages/conversationContents/ConversationVisualisation.d.ts +2 -1
- package/esm/components/messages/conversationContents/ConversationVisualisation.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationVisualisation.js +3 -3
- package/esm/components/messages/conversationContents/ConversationVisualizationContent.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationVisualizationContent.js +2 -1
- package/esm/components/messages/conversationContents/useKdaDefinition.js +8 -0
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -2
- package/esm/internal.d.ts +1 -2
- package/esm/internal.d.ts.map +1 -1
- package/esm/internal.js +1 -2
- package/esm/sdk-ui-gen-ai.d.ts +41 -1
- package/esm/store/chatWindow/chatWindowSlice.d.ts +1 -0
- package/esm/store/chatWindow/chatWindowSlice.d.ts.map +1 -1
- package/esm/store/events.d.ts +18 -2
- package/esm/store/events.d.ts.map +1 -1
- package/esm/store/events.js +7 -0
- package/esm/store/sideEffects/onDefinitionReceivedTrigger.d.ts.map +1 -1
- package/esm/store/sideEffects/onDefinitionReceivedTrigger.js +1 -0
- package/esm/store/sideEffects/onEvent.d.ts.map +1 -1
- package/esm/store/sideEffects/onEvent.js +23 -1
- package/package.json +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualizationContents.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/contents/VisualizationContents.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAEH,KAAK,aAAa,EAYrB,MAAM,qBAAqB,CAAC;AAgD7B,OAAO,EAAE,KAAK,qBAAqB,EAAqC,MAAM,mBAAmB,CAAC;AAMlG,OAAO,EAEH,0BAA0B,EAC7B,MAAM,8CAA8C,CAAC;AA+BtD,MAAM,MAAM,0BAA0B,GAAG;IACrC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACxD,oBAAoB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,KAAK,IAAI,CAAC;CAC3F,CAAC;AAEF,KAAK,6BAA6B,GAAG,IAAI,CACrC,0BAA0B,EACxB,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,8BAA8B,GAC9B,sBAAsB,GACtB,aAAa,GACb,iBAAiB,GACjB,mBAAmB,GACnB,sBAAsB,CAC3B,CAAC;
|
|
1
|
+
{"version":3,"file":"VisualizationContents.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/contents/VisualizationContents.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAEH,KAAK,aAAa,EAYrB,MAAM,qBAAqB,CAAC;AAgD7B,OAAO,EAAE,KAAK,qBAAqB,EAAqC,MAAM,mBAAmB,CAAC;AAMlG,OAAO,EAEH,0BAA0B,EAC7B,MAAM,8CAA8C,CAAC;AA+BtD,MAAM,MAAM,0BAA0B,GAAG;IACrC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACxD,oBAAoB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,KAAK,IAAI,CAAC;CAC3F,CAAC;AAEF,KAAK,6BAA6B,GAAG,IAAI,CACrC,0BAA0B,EACxB,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,8BAA8B,GAC9B,sBAAsB,GACtB,aAAa,GACb,iBAAiB,GACjB,mBAAmB,GACnB,sBAAsB,CAC3B,CAAC;AAikCF,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,6BAA6B,2CAmClF"}
|
|
@@ -43,7 +43,9 @@ function VisualizationContentsComponentCore({ content, messageId, useMarkdown, c
|
|
|
43
43
|
const visualization = content.createdVisualizations?.[0];
|
|
44
44
|
const { metrics, dimensions, filters, sorts } = useExecution(visualization);
|
|
45
45
|
const config = useConfig();
|
|
46
|
-
const
|
|
46
|
+
const settings = useSelector(settingsSelector);
|
|
47
|
+
const useHostedAnalyticalDesigner = Boolean(settings?.enableShellApplication_analyticalDesigner);
|
|
48
|
+
const enableSecondGranularities = Boolean(settings?.enableSecondGranularities);
|
|
47
49
|
const [saveDialogOpen, setSaveDialogOpen] = useState(null);
|
|
48
50
|
const [hasVisError, setHasVisError] = useState(false);
|
|
49
51
|
const [visLoading, setVisLoading] = useState(true);
|
|
@@ -207,14 +209,14 @@ function VisualizationContentsComponentCore({ content, messageId, useMarkdown, c
|
|
|
207
209
|
type: "keyDriveAnalysis",
|
|
208
210
|
transition: "in-place",
|
|
209
211
|
origin: {},
|
|
210
|
-
}, event);
|
|
212
|
+
}, event, enableSecondGranularities);
|
|
211
213
|
if (keyDriverData.length === 0) {
|
|
212
214
|
setDrillState(null);
|
|
213
215
|
}
|
|
214
216
|
else {
|
|
215
217
|
setDrillState({ keyDriverData, event });
|
|
216
218
|
}
|
|
217
|
-
}, []);
|
|
219
|
+
}, [enableSecondGranularities]);
|
|
218
220
|
const handleSdkError = useCallback((error) => {
|
|
219
221
|
// Ignore NO_DATA error, we still want an option to save the visualization
|
|
220
222
|
if (!isNoDataSdkError(error)) {
|
|
@@ -112,6 +112,14 @@ function getFormatByGranularity(granularity) {
|
|
|
112
112
|
return "M/d/y, h:mm a";
|
|
113
113
|
case "GDC.time.minute_in_hour":
|
|
114
114
|
return "m";
|
|
115
|
+
case "GDC.time.minute_in_day":
|
|
116
|
+
return "h:mm a";
|
|
117
|
+
case "GDC.time.second":
|
|
118
|
+
return "M/d/y, h:mm:ss a";
|
|
119
|
+
case "GDC.time.second_in_minute":
|
|
120
|
+
return "s";
|
|
121
|
+
case "GDC.time.second_in_day":
|
|
122
|
+
return "h:mm:ss a";
|
|
115
123
|
case "GDC.time.month":
|
|
116
124
|
return "MMM y";
|
|
117
125
|
case "GDC.time.month_in_year":
|
|
@@ -17,8 +17,9 @@ export type ConversationVisualisationProps = {
|
|
|
17
17
|
} | null) => void;
|
|
18
18
|
enableDrilling?: boolean;
|
|
19
19
|
enableChangeAnalysis?: boolean;
|
|
20
|
+
enableSecondGranularities?: boolean;
|
|
20
21
|
enableNewPivotTable?: boolean;
|
|
21
22
|
enableAccessibleChartTooltip?: boolean;
|
|
22
23
|
};
|
|
23
|
-
export declare function ConversationVisualisation({ message, colorPalette, visualization, execConfig, agGridToken, isTable, onVisualisationError, onDrillFired, enableDrilling, enableChangeAnalysis, enableNewPivotTable, enableAccessibleChartTooltip }: ConversationVisualisationProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function ConversationVisualisation({ message, colorPalette, visualization, execConfig, agGridToken, isTable, onVisualisationError, onDrillFired, enableDrilling, enableChangeAnalysis, enableSecondGranularities, enableNewPivotTable, enableAccessibleChartTooltip }: ConversationVisualisationProps): import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
//# sourceMappingURL=ConversationVisualisation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationVisualisation.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualisation.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAEH,KAAK,aAAa,EAElB,KAAK,gBAAgB,EAOxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAInB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,4BAA4B,CAAC;AAiBpC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAyBpE,MAAM,MAAM,8BAA8B,GAAG;IACzC,OAAO,EAAE,0BAA0B,CAAC;IACpC,aAAa,EAAE,WAAW,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC,CAAC;IACnF,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,CACX,IAAI,EAAE;QACF,aAAa,EAAE,kCAAkC,EAAE,CAAC;QACpD,KAAK,EAAE,WAAW,CAAC;KACtB,GAAG,IAAI,KACP,IAAI,CAAC;IACV,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,EACtC,OAAO,EACP,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,cAAqB,EACrB,oBAA4B,EAC5B,mBAA0B,EAC1B,4BAAoC,EACvC,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"ConversationVisualisation.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualisation.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAEH,KAAK,aAAa,EAElB,KAAK,gBAAgB,EAOxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAInB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,4BAA4B,CAAC;AAiBpC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAyBpE,MAAM,MAAM,8BAA8B,GAAG;IACzC,OAAO,EAAE,0BAA0B,CAAC;IACpC,aAAa,EAAE,WAAW,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC,CAAC;IACnF,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,CACX,IAAI,EAAE;QACF,aAAa,EAAE,kCAAkC,EAAE,CAAC;QACpD,KAAK,EAAE,WAAW,CAAC;KACtB,GAAG,IAAI,KACP,IAAI,CAAC;IACV,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,EACtC,OAAO,EACP,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,cAAqB,EACrB,oBAA4B,EAC5B,yBAAiC,EACjC,mBAA0B,EAC1B,4BAAoC,EACvC,EAAE,8BAA8B,2CAuPhC"}
|
|
@@ -28,7 +28,7 @@ const legendTooltipOptions = {
|
|
|
28
28
|
responsive: "autoPositionWithPopup",
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
|
-
export function ConversationVisualisation({ message, colorPalette, visualization, execConfig, agGridToken, isTable, onVisualisationError, onDrillFired, enableDrilling = true, enableChangeAnalysis = false, enableNewPivotTable = true, enableAccessibleChartTooltip = false, }) {
|
|
31
|
+
export function ConversationVisualisation({ message, colorPalette, visualization, execConfig, agGridToken, isTable, onVisualisationError, onDrillFired, enableDrilling = true, enableChangeAnalysis = false, enableSecondGranularities = false, enableNewPivotTable = true, enableAccessibleChartTooltip = false, }) {
|
|
32
32
|
const intl = useIntl();
|
|
33
33
|
const dispatch = useDispatch();
|
|
34
34
|
const resolvedAgGridToken = useAgGridToken(agGridToken);
|
|
@@ -90,14 +90,14 @@ export function ConversationVisualisation({ message, colorPalette, visualization
|
|
|
90
90
|
type: "keyDriveAnalysis",
|
|
91
91
|
transition: "in-place",
|
|
92
92
|
origin: {},
|
|
93
|
-
}, event);
|
|
93
|
+
}, event, enableSecondGranularities);
|
|
94
94
|
if (keyDriverData.length === 0) {
|
|
95
95
|
onDrillFired?.(null);
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
98
|
onDrillFired?.({ keyDriverData, event });
|
|
99
99
|
}
|
|
100
|
-
}, [onDrillFired]);
|
|
100
|
+
}, [onDrillFired, enableSecondGranularities]);
|
|
101
101
|
const renderCurrentChart = () => {
|
|
102
102
|
if (!visualization) {
|
|
103
103
|
return null;
|
package/esm/components/messages/conversationContents/ConversationVisualizationContent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationVisualizationContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualizationContent.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAyBvF,OAAO,EAAE,KAAK,0BAA0B,EAAE,KAAK,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAY9G,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAwBlF,MAAM,MAAM,qCAAqC,GAAG;IAChD,OAAO,EAAE,0BAA0B,CAAC;IACpC,IAAI,EAAE,mCAAmC,CAAC;IAC1C,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,aAAa,EAAE,WAAW,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC,CAAC;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,EAC7C,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,SAAS,EACZ,EAAE,qCAAqC,
|
|
1
|
+
{"version":3,"file":"ConversationVisualizationContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualizationContent.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAyBvF,OAAO,EAAE,KAAK,0BAA0B,EAAE,KAAK,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAY9G,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAwBlF,MAAM,MAAM,qCAAqC,GAAG;IAChD,OAAO,EAAE,0BAA0B,CAAC;IACpC,IAAI,EAAE,mCAAmC,CAAC;IAC1C,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,aAAa,EAAE,WAAW,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC,CAAC;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,EAC7C,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,SAAS,EACZ,EAAE,qCAAqC,2CAkHvC"}
|
|
@@ -26,6 +26,7 @@ export function ConversationVisualizationContent({ message, part, scenario, visu
|
|
|
26
26
|
const enableNewPivotTable = useSelector((state) => settingsSelector(state)?.enableNewPivotTable);
|
|
27
27
|
const enableAccessibleChartTooltip = useSelector((state) => settingsSelector(state)?.enableAccessibleChartTooltip);
|
|
28
28
|
const enableChangeAnalysis = useSelector((state) => settingsSelector(state)?.enableChangeAnalysis);
|
|
29
|
+
const enableSecondGranularities = useSelector((state) => settingsSelector(state)?.enableSecondGranularities);
|
|
29
30
|
const containerRef = useRef(null);
|
|
30
31
|
const [hasVisFatal, setVisFatal] = useState(false);
|
|
31
32
|
const [visError, setVisError] = useState(null);
|
|
@@ -56,7 +57,7 @@ export function ConversationVisualizationContent({ message, part, scenario, visu
|
|
|
56
57
|
const classNames = cx("gd-gen-ai-chat__conversation__item__content", "gd-gen-ai-chat__conversation__item__content--visualization", className);
|
|
57
58
|
return (_jsxs("div", { className: classNames, children: [
|
|
58
59
|
_jsx(DrillState, { drillState: drillState, setDrillState: setDrillState, containerRef: containerRef, filters: visualization.insight.filters, children: _jsxs(Wrapper, { containerRef: containerRef, visualization: visualization, children: [
|
|
59
|
-
_jsx(VisualisationMenu, { visualization: visualization, scenario: scenario, isVisualisationSaved: visualisationSaved, isVisualisationCheckLoading: visualisationCheckLoading, isTable: isTable, onTable: setIsTable, hasError: hasVisFatal, moreButtonId: moreButtonDescId, onSave: onSave, onOpen: onOpen, onCopy: onCopy, isLoading: part.reporting ?? false }), _jsx(Title, { id: moreButtonDescId, visualization: visualization, scenario: scenario }), _jsx(VisualisationWrapper, { message: message, colorPalette: colorPalette, isTable: isTable, visualization: visualization, agGridToken: agGridToken, execConfig: scenario?.execConfig, enableChangeAnalysis: enableChangeAnalysis, enableNewPivotTable: enableNewPivotTable, enableAccessibleChartTooltip: enableAccessibleChartTooltip, enableDrilling: !scenario || scenario.isBaseline, onDrillFired: setDrillState, onVisualisationError: onVisualizationError }), _jsx(SaveDialog, {})
|
|
60
|
+
_jsx(VisualisationMenu, { visualization: visualization, scenario: scenario, isVisualisationSaved: visualisationSaved, isVisualisationCheckLoading: visualisationCheckLoading, isTable: isTable, onTable: setIsTable, hasError: hasVisFatal, moreButtonId: moreButtonDescId, onSave: onSave, onOpen: onOpen, onCopy: onCopy, isLoading: part.reporting ?? false }), _jsx(Title, { id: moreButtonDescId, visualization: visualization, scenario: scenario }), _jsx(VisualisationWrapper, { message: message, colorPalette: colorPalette, isTable: isTable, visualization: visualization, agGridToken: agGridToken, execConfig: scenario?.execConfig, enableChangeAnalysis: enableChangeAnalysis, enableSecondGranularities: !!enableSecondGranularities, enableNewPivotTable: enableNewPivotTable, enableAccessibleChartTooltip: enableAccessibleChartTooltip, enableDrilling: !scenario || scenario.isBaseline, onDrillFired: setDrillState, onVisualisationError: onVisualizationError }), _jsx(SaveDialog, {})
|
|
60
61
|
] }) }), _jsx(VisualizationErrorReport, { error: visError })
|
|
61
62
|
] }));
|
|
62
63
|
}
|
|
@@ -114,6 +114,14 @@ function getFormatByGranularity(granularity) {
|
|
|
114
114
|
return "M/d/y, h:mm a";
|
|
115
115
|
case "GDC.time.minute_in_hour":
|
|
116
116
|
return "m";
|
|
117
|
+
case "GDC.time.minute_in_day":
|
|
118
|
+
return "h:mm a";
|
|
119
|
+
case "GDC.time.second":
|
|
120
|
+
return "M/d/y, h:mm:ss a";
|
|
121
|
+
case "GDC.time.second_in_minute":
|
|
122
|
+
return "s";
|
|
123
|
+
case "GDC.time.second_in_day":
|
|
124
|
+
return "h:mm:ss a";
|
|
117
125
|
case "GDC.time.month":
|
|
118
126
|
return "MMM y";
|
|
119
127
|
case "GDC.time.month_in_year":
|
package/esm/index.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export { GenAIChat, GenAIAssistant, type GenAIChatProps, type GenAIAssistantProp
|
|
|
7
7
|
export { GenAIConversations, type GenAIConversationsProps } from "./components/GenAiConversations.js";
|
|
8
8
|
export { GenAiStore, type GenAiStoreProps } from "./components/GenAiStore.js";
|
|
9
9
|
export { makeUserMessage, makeTextContents, makeUserItem, makeAssistantItem, type Message, type BaseMessage, type UserMessage, type AssistantMessage, type Contents, type TextContents, type SearchContents, type SemanticSearchContents, type RoutingContents, type ReasoningContents, type ReasoningStep, type ReasoningThought, type VisualizationContents, type ChangeAnalysisContents, type ErrorContents, type TextContentObject, type IChatConversationLocalContent, type IChatConversationLocalItem, type IChatConversationErrorContent, type IChatConversationMultipartLocalPart, type IChatConversationLocal, type IChatConversationSystemContent, } from "./model.js";
|
|
10
|
-
export { type ChatEventHandler, type BaseEvent, type ChatAssistantMessageEvent, type ChatUserMessageEvent, type ChatClosedEvent, type ChatOpenedEvent, type ChatResetEvent, type ChatFeedbackEvent, type ChatFeedbackErrorEvent, type ChatEvent, type ChatVisualizationErrorEvent, type ChatSaveVisualizationErrorEvent, type ChatSaveVisualizationSuccessEvent, type ChatCopyToClipboardEvent, type ChatConversationPinnedEvent, type ChatConversationPinErrorEvent, type ChatConversationDeleteEvent, type ChatConversationDeletedSuccessEvent, type ChatConversationDeletedErrorEvent, type ChatConversationRenameEvent, type ChatConversationRenamedSuccessEvent, type ChatConversationRenamedErrorEvent, type ChatConversationChangedEvent, type ChatDefinitionReceivedEvent, type ChatModeChangeEvent, type ChatAgentChangeEvent, isChatAssistantMessageEvent, isChatUserMessageEvent, isChatClosedEvent, isChatOpenedEvent, isChatResetEvent, isChatFeedbackEvent, isChatFeedbackErrorEvent, isChatVisualizationErrorEvent, isChatSaveVisualizationErrorEvent, isChatSaveVisualizationSuccessEvent, isChatCopyToClipboardEvent, isChatConversationPinnedEvent, isChatConversationPinErrorEvent, isChatConversationDeleteEvent, isChatConversationDeletedErrorEvent, isChatConversationDeletedSuccessEvent, isChatConversationRenameEvent, isChatConversationRenamedSuccessEvent, isChatConversationRenamedErrorEvent, isChatConversationChangedEvent, isChatDefinitionReceivedEvent, isChatModeChangeEvent, isChatAgentChangeEvent, } from "./store/events.js";
|
|
10
|
+
export { type ChatEventHandler, type BaseEvent, type ChatAssistantMessageEvent, type ChatUserMessageEvent, type ChatClosedEvent, type ChatOpenedEvent, type ChatResetEvent, type ChatFeedbackEvent, type ChatFeedbackErrorEvent, type ChatEvent, type ChatVisualizationErrorEvent, type ChatSaveVisualizationErrorEvent, type ChatSaveVisualizationSuccessEvent, type ChatCopyToClipboardEvent, type ChatConversationPinnedEvent, type ChatConversationPinErrorEvent, type ChatConversationDeleteEvent, type ChatConversationDeletedSuccessEvent, type ChatConversationDeletedErrorEvent, type ChatConversationRenameEvent, type ChatConversationRenamedSuccessEvent, type ChatConversationRenamedErrorEvent, type ChatConversationChangedEvent, type ChatDefinitionReceivedEvent, type ChatModeChangeEvent, type ChatAgentChangeEvent, type ChatContextChangeEvent, isChatAssistantMessageEvent, isChatUserMessageEvent, isChatClosedEvent, isChatOpenedEvent, isChatResetEvent, isChatFeedbackEvent, isChatFeedbackErrorEvent, isChatVisualizationErrorEvent, isChatSaveVisualizationErrorEvent, isChatSaveVisualizationSuccessEvent, isChatCopyToClipboardEvent, isChatConversationPinnedEvent, isChatConversationPinErrorEvent, isChatConversationDeleteEvent, isChatConversationDeletedErrorEvent, isChatConversationDeletedSuccessEvent, isChatConversationRenameEvent, isChatConversationRenamedSuccessEvent, isChatConversationRenamedErrorEvent, isChatConversationChangedEvent, isChatDefinitionReceivedEvent, isChatModeChangeEvent, isChatAgentChangeEvent, isChatContextChangeEvent, } from "./store/events.js";
|
|
11
11
|
export { clearThreadAction, newMessageAction, startNewConversationAction, setCurrentConversationAction, setSelectedAgentAction, } from "./store/messages/messagesSlice.js";
|
|
12
|
-
export { setFullscreenAction } from "./store/chatWindow/chatWindowSlice.js";
|
|
12
|
+
export { setFullscreenAction, setUserContextAction, setAmbientUserContextAction, } from "./store/chatWindow/chatWindowSlice.js";
|
|
13
13
|
export { type LinkHandlerEvent, type GenAIAssistantMode } from "./components/ConfigContext.js";
|
|
14
14
|
export { useGenAiChatAvailability } from "./hooks/useGenAiChatAvailability.js";
|
|
15
15
|
export { DefaultLandingScreen, type LandingScreenProps } from "./components/customized/LandingScreen.js";
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,EACH,SAAS,EACT,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,mBAAmB,GAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACH,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,iBAAi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AIConversations } from "./components/GenAiConversations.js";
|
|
10
10
|
export { GenAiStore } from "./components/GenAiStore.js";
|
|
11
11
|
export { makeUserMessage, makeTextContents, makeUserItem, makeAssistantItem, } from "./model.js";
|
|
12
|
-
export { isChatAssistantMessageEvent, isChatUserMessageEvent, isChatClosedEvent, isChatOpenedEvent, isChatResetEvent, isChatFeedbackEvent, isChatFeedbackErrorEvent, isChatVisualizationErrorEvent, isChatSaveVisualizationErrorEvent, isChatSaveVisualizationSuccessEvent, isChatCopyToClipboardEvent, isChatConversationPinnedEvent, isChatConversationPinErrorEvent, isChatConversationDeleteEvent, isChatConversationDeletedErrorEvent, isChatConversationDeletedSuccessEvent, isChatConversationRenameEvent, isChatConversationRenamedSuccessEvent, isChatConversationRenamedErrorEvent, isChatConversationChangedEvent, isChatDefinitionReceivedEvent, isChatModeChangeEvent, isChatAgentChangeEvent, } from "./store/events.js";
|
|
12
|
+
export { isChatAssistantMessageEvent, isChatUserMessageEvent, isChatClosedEvent, isChatOpenedEvent, isChatResetEvent, isChatFeedbackEvent, isChatFeedbackErrorEvent, isChatVisualizationErrorEvent, isChatSaveVisualizationErrorEvent, isChatSaveVisualizationSuccessEvent, isChatCopyToClipboardEvent, isChatConversationPinnedEvent, isChatConversationPinErrorEvent, isChatConversationDeleteEvent, isChatConversationDeletedErrorEvent, isChatConversationDeletedSuccessEvent, isChatConversationRenameEvent, isChatConversationRenamedSuccessEvent, isChatConversationRenamedErrorEvent, isChatConversationChangedEvent, isChatDefinitionReceivedEvent, isChatModeChangeEvent, isChatAgentChangeEvent, isChatContextChangeEvent, } from "./store/events.js";
|
|
13
13
|
export { clearThreadAction, newMessageAction, startNewConversationAction, setCurrentConversationAction, setSelectedAgentAction, } from "./store/messages/messagesSlice.js";
|
|
14
|
-
export { setFullscreenAction } from "./store/chatWindow/chatWindowSlice.js";
|
|
14
|
+
export { setFullscreenAction, setUserContextAction, setAmbientUserContextAction, } from "./store/chatWindow/chatWindowSlice.js";
|
|
15
15
|
export { useGenAiChatAvailability } from "./hooks/useGenAiChatAvailability.js";
|
|
16
16
|
//customization
|
|
17
17
|
export { DefaultLandingScreen } from "./components/customized/LandingScreen.js";
|
package/esm/internal.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { makeTextContents, makeUserMessage } from "./model.js";
|
|
2
|
-
import { setAmbientUserContextAction, setUserContextAction } from "./store/chatWindow/chatWindowSlice.js";
|
|
3
2
|
import { clearThreadAction, newMessageAction, setSelectedAgentAction } from "./store/messages/messagesSlice.js";
|
|
4
3
|
export { ChatSkeleton } from "./components/ChatSkeleton.js";
|
|
5
4
|
export { GenAIChatDialog, type GenAIChatDialogProps } from "./components/GenAIChatDialog.js";
|
|
6
5
|
export { GenAIChatDialogConnected, type IGenAIChatDialogConnectedProps, type GenAIChatConnectedEvent, } from "./components/GenAIChatDialogConnected.js";
|
|
7
|
-
export { clearThreadAction, newMessageAction, makeUserMessage, makeTextContents,
|
|
6
|
+
export { clearThreadAction, newMessageAction, makeUserMessage, makeTextContents, setSelectedAgentAction };
|
|
8
7
|
export { GenAIStandaloneInput, type GenAIStandaloneInputProps } from "./components/GenAIStandaloneInput.js";
|
|
9
8
|
//# sourceMappingURL=internal.d.ts.map
|
package/esm/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EACH,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACzB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EACH,wBAAwB,EACxB,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,GAC/B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,CAAC;AAC1G,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,sCAAsC,CAAC"}
|
package/esm/internal.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
/* oxlint-disable no-barrel-files/no-barrel-files */
|
|
3
3
|
import { makeTextContents, makeUserMessage } from "./model.js";
|
|
4
|
-
import { setAmbientUserContextAction, setUserContextAction } from "./store/chatWindow/chatWindowSlice.js";
|
|
5
4
|
import { clearThreadAction, newMessageAction, setSelectedAgentAction, } from "./store/messages/messagesSlice.js";
|
|
6
5
|
export { ChatSkeleton } from "./components/ChatSkeleton.js";
|
|
7
6
|
export { GenAIChatDialog } from "./components/GenAIChatDialog.js";
|
|
8
7
|
export { GenAIChatDialogConnected, } from "./components/GenAIChatDialogConnected.js";
|
|
9
|
-
export { clearThreadAction, newMessageAction, makeUserMessage, makeTextContents,
|
|
8
|
+
export { clearThreadAction, newMessageAction, makeUserMessage, makeTextContents, setSelectedAgentAction };
|
|
10
9
|
export { GenAIStandaloneInput } from "./components/GenAIStandaloneInput.js";
|
package/esm/sdk-ui-gen-ai.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ import { IChatSuggestions } from '@gooddata/sdk-backend-spi';
|
|
|
23
23
|
import { IColorPalette } from '@gooddata/sdk-model';
|
|
24
24
|
import { IDashboard } from '@gooddata/sdk-model';
|
|
25
25
|
import type { IGenAIChangeAnalysisParams } from '@gooddata/sdk-model';
|
|
26
|
+
import { IGenAIUserContext } from '@gooddata/sdk-model';
|
|
26
27
|
import type { IGenAIVisualization } from '@gooddata/sdk-model';
|
|
27
28
|
import { IInsight } from '@gooddata/sdk-model';
|
|
28
29
|
import type { ISemanticSearchRelationship } from '@gooddata/sdk-model';
|
|
@@ -117,6 +118,17 @@ export declare type ChatClosedEvent = BaseEvent & {
|
|
|
117
118
|
type: "chatClosed";
|
|
118
119
|
};
|
|
119
120
|
|
|
121
|
+
/**
|
|
122
|
+
* A chat context change event.
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
export declare type ChatContextChangeEvent = BaseEvent & {
|
|
126
|
+
type: "onContextChange";
|
|
127
|
+
contextType: "ambient" | "user";
|
|
128
|
+
userContext?: IGenAIUserContext;
|
|
129
|
+
replaceUserContext?: boolean;
|
|
130
|
+
};
|
|
131
|
+
|
|
120
132
|
/**
|
|
121
133
|
* A chat copy to clipboard event.
|
|
122
134
|
* @public
|
|
@@ -225,6 +237,7 @@ export declare type ChatDefinitionReceivedEvent = BaseEvent & {
|
|
|
225
237
|
conversationId: string;
|
|
226
238
|
interactionId?: string;
|
|
227
239
|
dashboard?: IDashboard;
|
|
240
|
+
insights?: IInsight[];
|
|
228
241
|
visualization?: NonNullable<IChatConversationVisualisationContent["visualization"]>;
|
|
229
242
|
};
|
|
230
243
|
|
|
@@ -232,7 +245,7 @@ export declare type ChatDefinitionReceivedEvent = BaseEvent & {
|
|
|
232
245
|
* A union type for all chat events.
|
|
233
246
|
* @public
|
|
234
247
|
*/
|
|
235
|
-
export declare type ChatEvent = ChatOpenedEvent | ChatClosedEvent | ChatResetEvent | ChatModeChangeEvent | ChatConversationPinnedEvent | ChatConversationPinErrorEvent | ChatConversationDeleteEvent | ChatConversationDeletedSuccessEvent | ChatConversationDeletedErrorEvent | ChatConversationRenameEvent | ChatConversationRenamedSuccessEvent | ChatConversationRenamedErrorEvent | ChatUserMessageEvent | ChatAgentChangeEvent | ChatAssistantMessageEvent | ChatFeedbackEvent | ChatFeedbackErrorEvent | ChatCopyToClipboardEvent | ChatVisualizationErrorEvent | ChatSaveVisualizationErrorEvent | ChatSaveVisualizationSuccessEvent | ChatConversationChangedEvent | ChatDefinitionReceivedEvent;
|
|
248
|
+
export declare type ChatEvent = ChatOpenedEvent | ChatClosedEvent | ChatResetEvent | ChatModeChangeEvent | ChatConversationPinnedEvent | ChatConversationPinErrorEvent | ChatConversationDeleteEvent | ChatConversationDeletedSuccessEvent | ChatConversationDeletedErrorEvent | ChatConversationRenameEvent | ChatConversationRenamedSuccessEvent | ChatConversationRenamedErrorEvent | ChatUserMessageEvent | ChatAgentChangeEvent | ChatAssistantMessageEvent | ChatFeedbackEvent | ChatFeedbackErrorEvent | ChatContextChangeEvent | ChatCopyToClipboardEvent | ChatVisualizationErrorEvent | ChatSaveVisualizationErrorEvent | ChatSaveVisualizationSuccessEvent | ChatConversationChangedEvent | ChatDefinitionReceivedEvent;
|
|
236
249
|
|
|
237
250
|
/**
|
|
238
251
|
* An event handler for the Chat component.
|
|
@@ -700,6 +713,12 @@ export declare const isChatAssistantMessageEvent: (event: ChatEvent) => event is
|
|
|
700
713
|
*/
|
|
701
714
|
export declare const isChatClosedEvent: (event: ChatEvent) => event is ChatClosedEvent;
|
|
702
715
|
|
|
716
|
+
/**
|
|
717
|
+
* Type guard for the ChatContextChangeEvent.
|
|
718
|
+
* @public
|
|
719
|
+
*/
|
|
720
|
+
export declare const isChatContextChangeEvent: (event: ChatEvent) => event is ChatContextChangeEvent;
|
|
721
|
+
|
|
703
722
|
/**
|
|
704
723
|
* Type guard for the ChatCopyToClipboardEvent.
|
|
705
724
|
* @public
|
|
@@ -934,6 +953,16 @@ export declare type SemanticSearchContents = {
|
|
|
934
953
|
relationships: ISemanticSearchRelationship[];
|
|
935
954
|
};
|
|
936
955
|
|
|
956
|
+
/**
|
|
957
|
+
* @public
|
|
958
|
+
*/
|
|
959
|
+
export declare const /**
|
|
960
|
+
* @public
|
|
961
|
+
*/
|
|
962
|
+
setAmbientUserContextAction: ActionCreatorWithPayload< {
|
|
963
|
+
userContext?: IGenAIUserContext | undefined;
|
|
964
|
+
}, "chatWindow/setAmbientUserContextAction">;
|
|
965
|
+
|
|
937
966
|
/**
|
|
938
967
|
* @public
|
|
939
968
|
*/
|
|
@@ -968,6 +997,17 @@ previousAgentId?: string | undefined;
|
|
|
968
997
|
showChangeEvent?: boolean | undefined;
|
|
969
998
|
}, "messages/setSelectedAgentAction">;
|
|
970
999
|
|
|
1000
|
+
/**
|
|
1001
|
+
* @public
|
|
1002
|
+
*/
|
|
1003
|
+
export declare const /**
|
|
1004
|
+
* @public
|
|
1005
|
+
*/
|
|
1006
|
+
setUserContextAction: ActionCreatorWithPayload< {
|
|
1007
|
+
userContext?: IGenAIUserContext | undefined;
|
|
1008
|
+
replaceUserContext?: boolean | undefined;
|
|
1009
|
+
}, "chatWindow/setUserContextAction">;
|
|
1010
|
+
|
|
971
1011
|
/**
|
|
972
1012
|
* @public
|
|
973
1013
|
*/
|
|
@@ -94,6 +94,7 @@ export declare const setOpenAction: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
94
94
|
itemId: string;
|
|
95
95
|
interactionId?: string | undefined;
|
|
96
96
|
dashboard?: IDashboard<import("@gooddata/sdk-model").IDashboardWidget> | undefined;
|
|
97
|
+
insights?: IInsight[] | undefined;
|
|
97
98
|
visualization?: IInsight | undefined;
|
|
98
99
|
}, "chatWindow/onDefinitionReceivedAction">, addContextReferenceAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
99
100
|
object: IGenAIContextObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatWindowSlice.d.ts","sourceRoot":"","sources":["../../../src/store/chatWindow/chatWindowSlice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KA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AoB,CAA2B,CAAC;AAC7F,eAAO,MACH,aAAa;;gCACb,gBAAgB;;mCAChB,qBAAqB;;wCACrB,iBAAiB;;oCACjB,qBAAqB;;wCACrB,0BAA0B;;6CAC1B,mCAAmC;;sDACnC,oBAAoB;;uCACpB,aAAa;;;gCACb,sBAAsB,+HACtB,iCAAiC;;oDACjC,0BAA0B;;;;;;;;6CAC1B,yBAAyB;;4CACzB,4BAA4B;;+CAC5B,kBAAkB;;;AAClB;;;GAGG;AACH,mBAAmB;;;AACnB;;GAEG;AACH,2BAA2B;;;AAC3B;;GAEG;AACH,oBAAoB;;;qCACG,CAAC"}
|
package/esm/store/events.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IChatConversation, type IChatConversationVisualisationContent } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { type IDashboard } from "@gooddata/sdk-model";
|
|
2
|
+
import { type IDashboard, type IGenAIUserContext, type IInsight } from "@gooddata/sdk-model";
|
|
3
3
|
import { type SdkErrorType } from "@gooddata/sdk-ui";
|
|
4
4
|
import { type GenAIAssistantMode } from "../components/ConfigContext.js";
|
|
5
5
|
import { type IChatConversationLocal, type TextContentObject } from "../model.js";
|
|
@@ -292,6 +292,7 @@ export type ChatDefinitionReceivedEvent = BaseEvent & {
|
|
|
292
292
|
conversationId: string;
|
|
293
293
|
interactionId?: string;
|
|
294
294
|
dashboard?: IDashboard;
|
|
295
|
+
insights?: IInsight[];
|
|
295
296
|
visualization?: NonNullable<IChatConversationVisualisationContent["visualization"]>;
|
|
296
297
|
};
|
|
297
298
|
/**
|
|
@@ -326,11 +327,26 @@ export type ChatAgentChangeEvent = BaseEvent & {
|
|
|
326
327
|
* @public
|
|
327
328
|
*/
|
|
328
329
|
export declare const isChatAgentChangeEvent: (event: ChatEvent) => event is ChatAgentChangeEvent;
|
|
330
|
+
/**
|
|
331
|
+
* A chat context change event.
|
|
332
|
+
* @public
|
|
333
|
+
*/
|
|
334
|
+
export type ChatContextChangeEvent = BaseEvent & {
|
|
335
|
+
type: "onContextChange";
|
|
336
|
+
contextType: "ambient" | "user";
|
|
337
|
+
userContext?: IGenAIUserContext;
|
|
338
|
+
replaceUserContext?: boolean;
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Type guard for the ChatContextChangeEvent.
|
|
342
|
+
* @public
|
|
343
|
+
*/
|
|
344
|
+
export declare const isChatContextChangeEvent: (event: ChatEvent) => event is ChatContextChangeEvent;
|
|
329
345
|
/**
|
|
330
346
|
* A union type for all chat events.
|
|
331
347
|
* @public
|
|
332
348
|
*/
|
|
333
|
-
export type ChatEvent = ChatOpenedEvent | ChatClosedEvent | ChatResetEvent | ChatModeChangeEvent | ChatConversationPinnedEvent | ChatConversationPinErrorEvent | ChatConversationDeleteEvent | ChatConversationDeletedSuccessEvent | ChatConversationDeletedErrorEvent | ChatConversationRenameEvent | ChatConversationRenamedSuccessEvent | ChatConversationRenamedErrorEvent | ChatUserMessageEvent | ChatAgentChangeEvent | ChatAssistantMessageEvent | ChatFeedbackEvent | ChatFeedbackErrorEvent | ChatCopyToClipboardEvent | ChatVisualizationErrorEvent | ChatSaveVisualizationErrorEvent | ChatSaveVisualizationSuccessEvent | ChatConversationChangedEvent | ChatDefinitionReceivedEvent;
|
|
349
|
+
export type ChatEvent = ChatOpenedEvent | ChatClosedEvent | ChatResetEvent | ChatModeChangeEvent | ChatConversationPinnedEvent | ChatConversationPinErrorEvent | ChatConversationDeleteEvent | ChatConversationDeletedSuccessEvent | ChatConversationDeletedErrorEvent | ChatConversationRenameEvent | ChatConversationRenamedSuccessEvent | ChatConversationRenamedErrorEvent | ChatUserMessageEvent | ChatAgentChangeEvent | ChatAssistantMessageEvent | ChatFeedbackEvent | ChatFeedbackErrorEvent | ChatContextChangeEvent | ChatCopyToClipboardEvent | ChatVisualizationErrorEvent | ChatSaveVisualizationErrorEvent | ChatSaveVisualizationSuccessEvent | ChatConversationChangedEvent | ChatDefinitionReceivedEvent;
|
|
334
350
|
/**
|
|
335
351
|
* An event handler for the Chat component.
|
|
336
352
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/store/events.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,EAC7C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/store/events.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,EAC7C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAElF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACtC,IAAI,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,gDAE7B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACtC,IAAI,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,gDAE7B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG;IACrC,IAAI,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF;;;GA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GACf,eAAe,GACf,eAAe,GACf,cAAc,GACd,mBAAmB,GACnB,2BAA2B,GAC3B,6BAA6B,GAC7B,2BAA2B,GAC3B,mCAAmC,GACnC,iCAAiC,GACjC,2BAA2B,GAC3B,mCAAmC,GACnC,iCAAiC,GACjC,oBAAoB,GACpB,oBAAoB,GACpB,yBAAyB,GACzB,iBAAiB,GACjB,sBAAsB,GACtB,sBAAsB,GACtB,wBAAwB,GACxB,2BAA2B,GAC3B,+BAA+B,GAC/B,iCAAiC,GACjC,4BAA4B,GAC5B,2BAA2B,CAAC;AAElC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,MAAM,SAAS,SAAS,GAAG,GAAG,IAAI;IAC3D;;OAEG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,KAAK,IAAI,MAAM,CAAC;IAC5C;;OAEG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF;;;GAGG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,QAAQ,CAA0B;IAEnC,WAAW,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAErD;IAEM,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAMtC;CACJ"}
|
package/esm/store/events.js
CHANGED
|
@@ -160,6 +160,13 @@ export const isChatModeChangeEvent = (event) => {
|
|
|
160
160
|
export const isChatAgentChangeEvent = (event) => {
|
|
161
161
|
return event.type === "onSelectedAgentAction";
|
|
162
162
|
};
|
|
163
|
+
/**
|
|
164
|
+
* Type guard for the ChatContextChangeEvent.
|
|
165
|
+
* @public
|
|
166
|
+
*/
|
|
167
|
+
export const isChatContextChangeEvent = (event) => {
|
|
168
|
+
return event.type === "onContextChange";
|
|
169
|
+
};
|
|
163
170
|
/**
|
|
164
171
|
* A dispatcher for chat events.
|
|
165
172
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onDefinitionReceivedTrigger.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onDefinitionReceivedTrigger.ts"],"names":[],"mappings":"AAYA,OAAO,EACH,KAAK,0BAA0B,EAC/B,KAAK,OAAO,EAGf,MAAM,gBAAgB,CAAC;AAGxB;;;GAGG;AACH,wBAAiB,wBAAwB,CACrC,KAAK,EAAE,0BAA0B,GAAG,OAAO,GAAG,CAAC,0BAA0B,GAAG,OAAO,CAAC,EAAE,EACtF,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"onDefinitionReceivedTrigger.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onDefinitionReceivedTrigger.ts"],"names":[],"mappings":"AAYA,OAAO,EACH,KAAK,0BAA0B,EAC/B,KAAK,OAAO,EAGf,MAAM,gBAAgB,CAAC;AAGxB;;;GAGG;AACH,wBAAiB,wBAAwB,CACrC,KAAK,EAAE,0BAA0B,GAAG,OAAO,GAAG,CAAC,0BAA0B,GAAG,OAAO,CAAC,EAAE,EACtF,cAAc,EAAE,MAAM,iCAuDzB"}
|
|
@@ -24,6 +24,7 @@ export function* notifyDefinitionReceived(items, conversationId) {
|
|
|
24
24
|
itemId: item.id,
|
|
25
25
|
definitionType: "dashboard",
|
|
26
26
|
dashboard: multipartContent.dashboard,
|
|
27
|
+
insights: multipartContent.insights ?? [],
|
|
27
28
|
}));
|
|
28
29
|
}
|
|
29
30
|
else if (isChatConversationVisualisationContent(multipartContent) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onEvent.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onEvent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onEvent.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onEvent.ts"],"names":[],"mappings":"AAyDA,wBAAiB,OAAO,6EA4BvB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
import { call, getContext, select, takeEvery } from "redux-saga/effects";
|
|
3
3
|
import { isChatConversationLocalItem, isRoutingContents, isTextContents, isUserMessage, } from "../../model.js";
|
|
4
|
-
import { copyToClipboardAction, onDefinitionReceivedAction, setFullscreenAction, setOpenAction, } from "../chatWindow/chatWindowSlice.js";
|
|
4
|
+
import { copyToClipboardAction, onDefinitionReceivedAction, setAmbientUserContextAction, setFullscreenAction, setOpenAction, setUserContextAction, } from "../chatWindow/chatWindowSlice.js";
|
|
5
5
|
import { clearCachedMessages, saveMessages, setIsOpened } from "../localStorage.js";
|
|
6
6
|
import { conversationMessagesSelector, conversationSelector, messagesSelector, threadIdSelector, } from "../messages/messagesSelectors.js";
|
|
7
7
|
import { clearThreadAction, deleteConversationAction, deleteConversationFailureAction, deleteConversationSuccessAction, evaluateMessageCompleteAction, loadConversationSuccessAction, loadThreadSuccessAction, newMessageAction, pinConversationFailureAction, pinConversationSuccessAction, renameConversationAction, renameConversationFailureAction, renameConversationSuccessAction, saveVisualizationErrorAction, saveVisualizationSuccessAction, setCurrentConversationAction, setSelectedAgentAction, setUserFeedback, setUserFeedbackError, visualizationErrorAction, } from "../messages/messagesSlice.js";
|
|
@@ -31,6 +31,8 @@ export function* onEvent() {
|
|
|
31
31
|
yield takeEvery(renameConversationFailureAction.type, onConversationRenamedError);
|
|
32
32
|
yield takeEvery(setCurrentConversationAction.type, onConversationChanged);
|
|
33
33
|
yield takeEvery(loadConversationSuccessAction.type, onConversationLoaded);
|
|
34
|
+
yield takeEvery(setAmbientUserContextAction.type, onAmbientUserContextChanged);
|
|
35
|
+
yield takeEvery(setUserContextAction.type, onUserContextChanged);
|
|
34
36
|
}
|
|
35
37
|
function* onConversationPinUpdated({ payload: { conversation, pinned }, }) {
|
|
36
38
|
const eventDispatcher = yield getContext("eventDispatcher");
|
|
@@ -360,3 +362,23 @@ function convertMessageTypeTo(content) {
|
|
|
360
362
|
return "GENERAL";
|
|
361
363
|
}
|
|
362
364
|
}
|
|
365
|
+
function* onAmbientUserContextChanged({ payload }) {
|
|
366
|
+
const eventDispatcher = yield getContext("eventDispatcher");
|
|
367
|
+
const threadId = yield select(threadIdSelector);
|
|
368
|
+
eventDispatcher.dispatch({
|
|
369
|
+
type: "onContextChange",
|
|
370
|
+
threadId,
|
|
371
|
+
contextType: "ambient",
|
|
372
|
+
...payload,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function* onUserContextChanged({ payload }) {
|
|
376
|
+
const eventDispatcher = yield getContext("eventDispatcher");
|
|
377
|
+
const threadId = yield select(threadIdSelector);
|
|
378
|
+
eventDispatcher.dispatch({
|
|
379
|
+
type: "onContextChange",
|
|
380
|
+
threadId,
|
|
381
|
+
contextType: "user",
|
|
382
|
+
...payload,
|
|
383
|
+
});
|
|
384
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-gen-ai",
|
|
3
|
-
"version": "11.52.0-alpha.
|
|
3
|
+
"version": "11.52.0-alpha.7",
|
|
4
4
|
"description": "GoodData GenAI SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -57,18 +57,18 @@
|
|
|
57
57
|
"reselect": "5.1.1",
|
|
58
58
|
"tslib": "2.8.1",
|
|
59
59
|
"uuid": "11.1.1",
|
|
60
|
-
"@gooddata/api-client-tiger": "11.52.0-alpha.
|
|
61
|
-
"@gooddata/sdk-backend-spi": "11.52.0-alpha.
|
|
62
|
-
"@gooddata/sdk-model": "11.52.0-alpha.
|
|
63
|
-
"@gooddata/sdk-ui": "11.52.0-alpha.
|
|
64
|
-
"@gooddata/sdk-ui
|
|
65
|
-
"@gooddata/sdk-ui-dashboard": "11.52.0-alpha.
|
|
66
|
-
"@gooddata/sdk-ui-filters": "11.52.0-alpha.
|
|
67
|
-
"@gooddata/sdk-ui-kit": "11.52.0-alpha.
|
|
68
|
-
"@gooddata/sdk-ui-
|
|
69
|
-
"@gooddata/sdk-ui-
|
|
70
|
-
"@gooddata/sdk-ui-theme-provider": "11.52.0-alpha.
|
|
71
|
-
"@gooddata/util": "11.52.0-alpha.
|
|
60
|
+
"@gooddata/api-client-tiger": "11.52.0-alpha.7",
|
|
61
|
+
"@gooddata/sdk-backend-spi": "11.52.0-alpha.7",
|
|
62
|
+
"@gooddata/sdk-model": "11.52.0-alpha.7",
|
|
63
|
+
"@gooddata/sdk-ui-charts": "11.52.0-alpha.7",
|
|
64
|
+
"@gooddata/sdk-ui": "11.52.0-alpha.7",
|
|
65
|
+
"@gooddata/sdk-ui-dashboard": "11.52.0-alpha.7",
|
|
66
|
+
"@gooddata/sdk-ui-filters": "11.52.0-alpha.7",
|
|
67
|
+
"@gooddata/sdk-ui-kit": "11.52.0-alpha.7",
|
|
68
|
+
"@gooddata/sdk-ui-semantic-search": "11.52.0-alpha.7",
|
|
69
|
+
"@gooddata/sdk-ui-pivot": "11.52.0-alpha.7",
|
|
70
|
+
"@gooddata/sdk-ui-theme-provider": "11.52.0-alpha.7",
|
|
71
|
+
"@gooddata/util": "11.52.0-alpha.7"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -111,13 +111,13 @@
|
|
|
111
111
|
"typescript": "5.9.3",
|
|
112
112
|
"vitest": "4.1.8",
|
|
113
113
|
"vitest-dom": "0.1.1",
|
|
114
|
-
"@gooddata/
|
|
115
|
-
"@gooddata/
|
|
116
|
-
"@gooddata/
|
|
117
|
-
"@gooddata/
|
|
118
|
-
"@gooddata/sdk-
|
|
119
|
-
"@gooddata/
|
|
120
|
-
"@gooddata/stylelint-config": "11.52.0-alpha.
|
|
114
|
+
"@gooddata/i18n-toolkit": "11.52.0-alpha.7",
|
|
115
|
+
"@gooddata/reference-workspace": "11.52.0-alpha.7",
|
|
116
|
+
"@gooddata/eslint-config": "11.52.0-alpha.7",
|
|
117
|
+
"@gooddata/oxlint-config": "11.52.0-alpha.7",
|
|
118
|
+
"@gooddata/sdk-backend-mockingbird": "11.52.0-alpha.7",
|
|
119
|
+
"@gooddata/sdk-ui-theme-provider": "11.52.0-alpha.7",
|
|
120
|
+
"@gooddata/stylelint-config": "11.52.0-alpha.7"
|
|
121
121
|
},
|
|
122
122
|
"peerDependencies": {
|
|
123
123
|
"react": "^18.0.0 || ^19.0.0",
|