@gooddata/sdk-ui-gen-ai 11.55.0 → 11.56.0-alpha.1
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/NOTICE +5 -5
- package/esm/components/ConfigContext.d.ts +6 -1
- package/esm/components/ConfigContext.d.ts.map +1 -1
- package/esm/components/GenAIChatAgentDropdown.js +1 -2
- package/esm/components/GenAIChatContextIndicator.js +3 -7
- package/esm/components/GenAIChatConversations.js +5 -16
- package/esm/components/GenAIChatDialog.d.ts +1 -1
- package/esm/components/GenAIChatDialog.d.ts.map +1 -1
- package/esm/components/GenAIChatDialog.js +4 -5
- package/esm/components/GenAIChatDialogConnected.d.ts +9 -2
- package/esm/components/GenAIChatDialogConnected.d.ts.map +1 -1
- package/esm/components/GenAIChatDialogConnected.js +2 -2
- package/esm/components/GenAIChatHeader.js +1 -3
- package/esm/components/GenAIChatOverlay.d.ts +3 -1
- package/esm/components/GenAIChatOverlay.d.ts.map +1 -1
- package/esm/components/GenAIChatOverlay.js +12 -8
- package/esm/components/GenAIChatReasoningMenu.js +1 -3
- package/esm/components/GenAIChatWrapper.js +1 -2
- package/esm/components/GenAIStandaloneInput.js +1 -3
- package/esm/components/GenAiChatAgentSwitching.js +1 -2
- package/esm/components/GenAiChatContextChooserBody.js +3 -7
- package/esm/components/GenAiStore.d.ts +6 -2
- package/esm/components/GenAiStore.d.ts.map +1 -1
- package/esm/components/GenAiStore.js +1 -1
- package/esm/components/GlobalError.js +2 -10
- package/esm/components/Input.js +2 -6
- package/esm/components/completion/InfoComponent.js +2 -11
- package/esm/components/completion/plugins/rehype-references.d.ts.map +1 -1
- package/esm/components/completion/plugins/remark-references.d.ts.map +1 -1
- package/esm/components/completion/utils.d.ts.map +1 -1
- package/esm/components/customized/LandingScreen.js +1 -5
- package/esm/components/hooks/useContextItems.d.ts +5 -5
- package/esm/components/hooks/useContextItems.d.ts.map +1 -1
- package/esm/components/hooks/useInputAutofocus.d.ts.map +1 -1
- package/esm/components/hooks/useInputAutofocus.js +9 -5
- package/esm/components/hooks/useSettingsClick.d.ts +1 -1
- package/esm/components/hooks/useSettingsClick.d.ts.map +1 -1
- package/esm/components/intelligence/GenAiInteractionIntelligence.js +1 -2
- package/esm/components/intelligence/data/types.d.ts.map +1 -1
- package/esm/components/intelligence/detail/IntelligenceCategoryDetail.js +1 -3
- package/esm/components/intelligence/detail/IntelligenceDetailHeader.js +1 -3
- package/esm/components/intelligence/detail/IntelligenceDetailRows.js +1 -3
- package/esm/components/intelligence/detail/IntelligenceStepCarousel.js +2 -4
- package/esm/components/intelligence/intelligenceBem.d.ts +1 -1
- package/esm/components/intelligence/intelligenceBem.d.ts.map +1 -1
- package/esm/components/intelligence/panel/IntelligenceCategoryRow.js +1 -3
- package/esm/components/intelligence/panel/IntelligenceDurationTokens.js +1 -3
- package/esm/components/intelligence/panel/IntelligenceFooter.js +1 -3
- package/esm/components/intelligence/panel/IntelligenceHeader.js +1 -3
- package/esm/components/intelligence/panel/IntelligenceStepTooltip.js +1 -4
- package/esm/components/intelligence/panel/IntelligenceTimeline.d.ts.map +1 -1
- package/esm/components/intelligence/panel/TimelineBar.d.ts.map +1 -1
- package/esm/components/messages/AgentChangeItem.js +1 -3
- package/esm/components/messages/AssistantItem.js +1 -3
- package/esm/components/messages/AssistantItemFeedback.js +1 -2
- package/esm/components/messages/AssistantMessage.js +3 -7
- package/esm/components/messages/FeedbackPopup.js +3 -10
- package/esm/components/messages/ItemsGroup.js +2 -6
- package/esm/components/messages/MessageContents.js +1 -2
- package/esm/components/messages/MessageScroller.d.ts.map +1 -1
- package/esm/components/messages/ReasoningDropdown.js +1 -4
- package/esm/components/messages/UserItem.js +1 -3
- package/esm/components/messages/UserMessage.js +1 -3
- package/esm/components/messages/contents/ChangeAnalysisContentsComponent.js +2 -4
- package/esm/components/messages/contents/ReasoningContents.js +1 -5
- package/esm/components/messages/contents/SemanticSearchContents.js +1 -6
- package/esm/components/messages/contents/VisualizationContents.js +3 -8
- package/esm/components/messages/contents/VisualizationSaveDialog.js +2 -4
- package/esm/components/messages/contents/replaceLinks.d.ts.map +1 -1
- package/esm/components/messages/contents/useExecution.d.ts +1 -1
- package/esm/components/messages/contents/useExecution.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationAlertProposalContent.js +16 -49
- package/esm/components/messages/conversationContents/ConversationDashboardContent.js +1 -13
- package/esm/components/messages/conversationContents/ConversationErrorContent.js +5 -11
- package/esm/components/messages/conversationContents/ConversationKdaContent.js +1 -3
- package/esm/components/messages/conversationContents/ConversationSearchContent.js +1 -5
- package/esm/components/messages/conversationContents/ConversationVisualizationContent.js +3 -9
- package/esm/components/messages/conversationContents/SaveVisualizationDialog.js +2 -4
- package/esm/components/messages/conversationContents/useExecution.d.ts +2 -1
- package/esm/components/messages/conversationContents/useExecution.d.ts.map +1 -1
- package/esm/components/utils/animation.js +3 -6
- package/esm/components/utils/conversationGrouper.js +1 -2
- package/esm/hooks/useGenAIStandaloneInputData.d.ts.map +1 -1
- package/esm/hooks/useGenAIStore.d.ts +16 -15
- package/esm/hooks/useGenAIStore.d.ts.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-US.localization-bundle.d.ts +560 -560
- package/esm/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/model.d.ts +7 -7
- package/esm/model.d.ts.map +1 -1
- package/esm/permissions/PermissionsContext.d.ts.map +1 -1
- package/esm/sdk-ui-gen-ai.d.ts +18 -8
- package/esm/store/chatWindow/chatWindowSlice.d.ts +19 -19
- package/esm/store/chatWindow/chatWindowSlice.d.ts.map +1 -1
- package/esm/store/events.d.ts.map +1 -1
- package/esm/store/messages/messagesSelectors.d.ts +10 -10
- package/esm/store/messages/messagesSelectors.d.ts.map +1 -1
- package/esm/store/messages/messagesSlice.d.ts +31 -30
- package/esm/store/messages/messagesSlice.d.ts.map +1 -1
- package/esm/store/sideEffects/converters/interactionsToMessages.d.ts +1 -1
- package/esm/store/sideEffects/converters/interactionsToMessages.d.ts.map +1 -1
- package/esm/store/sideEffects/loadColorPalette.d.ts +1 -1
- package/esm/store/sideEffects/loadSettings.d.ts +1 -1
- package/esm/store/sideEffects/onChatOpenSync.d.ts +2 -2
- package/esm/store/sideEffects/onConversationDelete.d.ts +2 -2
- package/esm/store/sideEffects/onConversationPin.d.ts +1 -1
- package/esm/store/sideEffects/onConversationRename.d.ts +1 -1
- package/esm/store/sideEffects/onThreadLoad.d.ts +1 -1
- package/esm/store/sideEffects/onUserFeedback.d.ts +3 -3
- package/esm/store/sideEffects/onUserMessage.d.ts +9 -9
- package/esm/store/sideEffects/onUserMessageUpdate.d.ts +3 -3
- package/esm/store/sideEffects/onVisualisationRender.d.ts +3 -3
- package/esm/store/sideEffects/onVisualizationSave.d.ts +7 -7
- package/esm/store/sideEffects/onVisualizationSave.d.ts.map +1 -1
- package/esm/store/sideEffects/onVisualizationSuccessSave.d.ts +2 -2
- package/esm/store/store.d.ts.map +1 -1
- package/esm/utils.d.ts.map +1 -1
- package/package.json +21 -21
- package/styles/css/main.css +12 -1
- package/styles/css/main.css.map +1 -1
- package/styles/css/window.css +11 -0
- package/styles/css/window.css.map +1 -1
- package/styles/scss/main.scss +1 -1
- package/styles/scss/window.scss +12 -0
package/NOTICE
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
The following 3rd-party software packages may be used by or distributed with gooddata-ui-sdk. Any information relevant to third-party vendors listed below are collected using common, reasonable means.
|
|
9
9
|
|
|
10
|
-
Date generated: 2026-9-
|
|
10
|
+
Date generated: 2026-9-3
|
|
11
11
|
|
|
12
|
-
Revision ID:
|
|
12
|
+
Revision ID: afa814c354459436e47d18bcacd7eced035b8b8e
|
|
13
13
|
|
|
14
14
|
================================================================================
|
|
15
15
|
================================================================================
|
|
@@ -11253,7 +11253,7 @@ MIT
|
|
|
11253
11253
|
|
|
11254
11254
|
Authors: opensource+npm@fb.com, react-core@meta.com
|
|
11255
11255
|
Package Manager: NPM
|
|
11256
|
-
Project URL: https://
|
|
11256
|
+
Project URL: https://react.dev/
|
|
11257
11257
|
Package Download URL: https://registry.npmjs.org/react/-/react-19.1.1.tgz
|
|
11258
11258
|
Dependency Path: @aaronhayes/react-use-hubspot-form > react > @evil-internetmann/react-dnd > react > @floating-ui/react > @floating-ui/react-dom > react > @floating-ui/react > react > @floating-ui/react-dom > react > @rc-component/picker > @rc-component/overflow > react > @rc-component/picker > @rc-component/trigger > @rc-component/motion > react > react > react-select > @emotion/react > @emotion/use-insertion-effect-with-fallbacks > react > react-select > @emotion/react > react
|
|
11259
11259
|
File Path(s): common/config/subspaces/sdk/pnpm-lock.yaml
|
|
@@ -11645,7 +11645,7 @@ MIT
|
|
|
11645
11645
|
|
|
11646
11646
|
Authors: opensource+npm@fb.com, react-core@meta.com
|
|
11647
11647
|
Package Manager: NPM
|
|
11648
|
-
Project URL: https://
|
|
11648
|
+
Project URL: https://react.dev/
|
|
11649
11649
|
Package Download URL: https://registry.npmjs.org/react-dom/-/react-dom-19.1.1.tgz
|
|
11650
11650
|
Dependency Path: @aaronhayes/react-use-hubspot-form > react-dom > @floating-ui/react > @floating-ui/react-dom > react-dom > @floating-ui/react > react-dom > @floating-ui/react-dom > react-dom > @rc-component/picker > @rc-component/overflow > @rc-component/resize-observer > react-dom > @rc-component/picker > @rc-component/overflow > react-dom > @rc-component/picker > @rc-component/trigger > @rc-component/motion > react-dom > @rc-component/picker > @rc-component/trigger > @rc-component/portal > react-dom > @rc-component/picker > react-dom > react-dom
|
|
11651
11651
|
File Path(s): common/config/subspaces/sdk/pnpm-lock.yaml
|
|
@@ -64477,4 +64477,4 @@ File Path(s): common/config/subspaces/sdk/pnpm-lock.yaml
|
|
|
64477
64477
|
--------------------------------------------------------------------------------
|
|
64478
64478
|
--------------------------------------------------------------------------------
|
|
64479
64479
|
|
|
64480
|
-
Report Generated by FOSSA on 2026-9-
|
|
64480
|
+
Report Generated by FOSSA on 2026-9-3
|
|
@@ -27,10 +27,15 @@ export type LinkHandlerEvent = {
|
|
|
27
27
|
action: "copy" | "open";
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Mode of the Gen AI assistant.
|
|
31
31
|
* @public
|
|
32
32
|
*/
|
|
33
33
|
export type GenAIAssistantMode = "docked" | "fullscreen";
|
|
34
|
+
/**
|
|
35
|
+
* Display mode of the Gen AI assistant.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export type GenAIAssistantDisplayMode = "inline" | "modal";
|
|
34
39
|
export declare function ConfigProvider({ children, allowNativeLinks, linkHandler, catalogItems, canManage, canAnalyze, canFullControl }: PropsWithChildren<ConfigContext>): import("react/jsx-runtime").JSX.Element;
|
|
35
40
|
export declare const useConfig: () => ConfigContext;
|
|
36
41
|
//# sourceMappingURL=ConfigContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigContext.d.ts","sourceRoot":"","sources":["../../src/components/ConfigContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAsC,MAAM,OAAO,CAAC;AAEnF,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE7G,MAAM,MAAM,aAAa,GAAG;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,cAAc,EAAE,gBAAgB,KAAK,MAAM,GAAG,SAAS,CAAC;IACvE,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,IAAI,EAAE,SAAS,GAAG,eAAe,CAAC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,OAA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AE,MAAM,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACpC,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACxC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAI3D,wBAAgB,cAAc,CAAC,EAC3B,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,cAAc,EACjB,EAAE,iBAAiB,CAAC,aAAa,CAAC,2CAsBlC;AAED,eAAO,MAAM,SAAS,QAAO,aAE5B,CAAC"}
|
|
@@ -133,8 +133,7 @@ export function GenAIChatAgentDropdown({ agents, conversations, conversationAgen
|
|
|
133
133
|
reasoningValueLabel,
|
|
134
134
|
selectedAgent?.title,
|
|
135
135
|
]);
|
|
136
|
-
return (_jsxs(_Fragment, { children: [
|
|
137
|
-
_jsx("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: isLoading ? loadingLabel : "" }), _jsx(Dropdown, { className: cx("gd-gen-ai-chat__input__agent-dropdown", {
|
|
136
|
+
return (_jsxs(_Fragment, { children: [_jsx("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: isLoading ? loadingLabel : "" }), _jsx(Dropdown, { className: cx("gd-gen-ai-chat__input__agent-dropdown", {
|
|
138
137
|
"gd-gen-ai-chat__input__agent-dropdown--loading": isLoading,
|
|
139
138
|
}), alignPoints: [{ align: "tr br", offset: { x: 0, y: 0 } }], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, returnFocusTo: agentTriggerId, accessibilityConfig: { popupRole: "dialog" }, renderButton: ({ isOpen, toggleDropdown, accessibilityConfig }) => (_jsx(UiButton, { id: agentTriggerId, label: isLoading ? loadingLabel : (selectedAgent?.title ?? agentLabel), badgeAfter: !isLoading && reasoningEnabled ? reasoningValueLabel : undefined, variant: "dropdownInline", size: "small", iconAfter: isLoading ? undefined : isOpen ? "navigateUp" : "navigateDown", isDisabled: isLoading || isDisabled || !agents.length, onClick: toggleDropdown, dataTestId: "agent_dropdown_button", accessibilityConfig: {
|
|
140
139
|
...accessibilityConfig,
|
|
@@ -70,8 +70,7 @@ export function GenAIChatContextIndicator({ onUpdate }) {
|
|
|
70
70
|
if (!isContextSetupEnabled) {
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
return (_jsxs(_Fragment, { children: [
|
|
74
|
-
_jsxs(ContextWrapper, { groupLabel: msgs.groupLabel, groupLabelId: groupLabelId, children: [selectedContext?.dashboard || ambientLoading ? (_jsx(Dropdown, { alignPoints: [{ align: "tl bl", offset: { x: 0, y: 0 } }], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, accessibilityConfig: { popupRole: "dialog" }, onOpenStateChanged: onOpenStateChanged, renderButton: ({ isOpen, toggleDropdown, accessibilityConfig }) => {
|
|
73
|
+
return (_jsxs(_Fragment, { children: [_jsxs(ContextWrapper, { groupLabel: msgs.groupLabel, groupLabelId: groupLabelId, children: [selectedContext?.dashboard || ambientLoading ? (_jsx(Dropdown, { alignPoints: [{ align: "tl bl", offset: { x: 0, y: 0 } }], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, accessibilityConfig: { popupRole: "dialog" }, onOpenStateChanged: onOpenStateChanged, renderButton: ({ isOpen, toggleDropdown, accessibilityConfig }) => {
|
|
75
74
|
if (ambientLoading) {
|
|
76
75
|
return (_jsx(UiSkeleton, { inline: true, itemWidth: 150, itemPadding: 0, itemHeight: 27, itemBorderRadius: 50 }));
|
|
77
76
|
}
|
|
@@ -110,14 +109,11 @@ export function GenAIChatContextIndicator({ onUpdate }) {
|
|
|
110
109
|
}),
|
|
111
110
|
iconBeforeAriaLabel: getTypeLabel(reference.type, intl),
|
|
112
111
|
} }, index)))
|
|
113
|
-
: null] }), _jsx("span", { className: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: announcement })
|
|
114
|
-
] }));
|
|
112
|
+
: null] }), _jsx("span", { className: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: announcement })] }));
|
|
115
113
|
}
|
|
116
114
|
function ContextWrapper({ groupLabel, groupLabelId, children }) {
|
|
117
115
|
const intl = useIntl();
|
|
118
|
-
return (_jsxs(_Fragment, { children: [
|
|
119
|
-
_jsx("span", { className: "sr-only", id: groupLabelId, children: intl.formatMessage(groupLabel) }), _jsx("div", { className: "gd-gen-ai-chat__context-indicator", role: "group", "aria-labelledby": groupLabelId, children: children })
|
|
120
|
-
] }));
|
|
116
|
+
return (_jsxs(_Fragment, { children: [_jsx("span", { className: "sr-only", id: groupLabelId, children: intl.formatMessage(groupLabel) }), _jsx("div", { className: "gd-gen-ai-chat__context-indicator", role: "group", "aria-labelledby": groupLabelId, children: children })] }));
|
|
121
117
|
}
|
|
122
118
|
// utils
|
|
123
119
|
function getSelectedTitle(selectedContext, emptyReferenceLabel) {
|
|
@@ -228,11 +228,7 @@ function DrawerComponent({ onClose, children }) {
|
|
|
228
228
|
const ref = useRef(undefined);
|
|
229
229
|
const { isHistory } = useHistoryCheck();
|
|
230
230
|
const intl = useIntl();
|
|
231
|
-
return (_jsxs(_Fragment, { children: [
|
|
232
|
-
_jsx("div", { className: "gd-gen-ai-chat__window__drawer", ref: ref }), _jsx(UiDrawer, { anchor: "left", closeButtonSize: "medium", showCloseButton: true, open: isHistory, node: ref.current, showBackdrop: false, header: _jsxs("div", { style: { width: "100%" }, children: [
|
|
233
|
-
_jsx("div", { className: "gd-gen-ai-chat__window__conversations__header", children: intl.formatMessage({ id: "gd.gen-ai.conversations.title" }) }), _jsx("div", { className: "gd-gen-ai-chat__window__conversations__divider" })
|
|
234
|
-
] }), closeLabel: intl.formatMessage({ id: "gd.gen-ai.conversations.close-label" }), onClickClose: onClose, onClickOutside: onClose, children: children })
|
|
235
|
-
] }));
|
|
231
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "gd-gen-ai-chat__window__drawer", ref: ref }), _jsx(UiDrawer, { anchor: "left", closeButtonSize: "medium", showCloseButton: true, open: isHistory, node: ref.current, showBackdrop: false, header: _jsxs("div", { style: { width: "100%" }, children: [_jsx("div", { className: "gd-gen-ai-chat__window__conversations__header", children: intl.formatMessage({ id: "gd.gen-ai.conversations.title" }) }), _jsx("div", { className: "gd-gen-ai-chat__window__conversations__divider" })] }), closeLabel: intl.formatMessage({ id: "gd.gen-ai.conversations.close-label" }), onClickClose: onClose, onClickOutside: onClose, children: children })] }));
|
|
236
232
|
}
|
|
237
233
|
function DrawerContent({ isOpen, openedId, selectedId, menuRef, conversations, menuItems, handleSelect, draggedConversation, conversationLoaded, activeDropZone, onDragStart, onDragEnd, onDropZoneDragOver, onDropZoneDragLeave, onDropZoneDrop, onMenuUnhandledKeyDown, }) {
|
|
238
234
|
const intl = useIntl();
|
|
@@ -253,27 +249,20 @@ function DrawerContent({ isOpen, openedId, selectedId, menuRef, conversations, m
|
|
|
253
249
|
if (!conversationLoaded) {
|
|
254
250
|
return _jsx(UiSkeleton, { itemsCount: 3, itemWidth: "auto", itemHeight: 20, itemsGap: 8 });
|
|
255
251
|
}
|
|
256
|
-
return (_jsx(_Fragment, { children: (conversations ?? []).length === 0 ? (_jsxs("div", { className: "gd-gen-ai-chat__window__conversations__empty", children: [
|
|
257
|
-
_jsx(UiIcon, { type: "history2", size: 20, color: "complementary-6" }), _jsx("div", { className: "gd-gen-ai-chat__window__conversations__empty__text", children: _jsx(FormattedMessage, { id: "gd.gen-ai.conversations.empty", values: {
|
|
252
|
+
return (_jsx(_Fragment, { children: (conversations ?? []).length === 0 ? (_jsxs("div", { className: "gd-gen-ai-chat__window__conversations__empty", children: [_jsx(UiIcon, { type: "history2", size: 20, color: "complementary-6" }), _jsx("div", { className: "gd-gen-ai-chat__window__conversations__empty__text", children: _jsx(FormattedMessage, { id: "gd.gen-ai.conversations.empty", values: {
|
|
258
253
|
br: _jsx("br", {}),
|
|
259
|
-
} }) })
|
|
260
|
-
] })) : (_jsxs("div", { className: "gd-gen-ai-chat__window__conversations__list", ref: conversationsListRef, children: [
|
|
261
|
-
_jsxs("div", { className: "gd-gen-ai-chat__window__conversations__drop-group", onDragLeave: onDropZoneDragLeave, onDragOver: (event) => onDropZoneDragOver("pin", event), onDrop: (event) => onDropZoneDrop("pin", event), children: [
|
|
262
|
-
_jsx("div", { className: cx("gd-gen-ai-chat__window__conversations__drop-placeholder", {
|
|
254
|
+
} }) })] })) : (_jsxs("div", { className: "gd-gen-ai-chat__window__conversations__list", ref: conversationsListRef, children: [_jsxs("div", { className: "gd-gen-ai-chat__window__conversations__drop-group", onDragLeave: onDropZoneDragLeave, onDragOver: (event) => onDropZoneDragOver("pin", event), onDrop: (event) => onDropZoneDrop("pin", event), children: [_jsx("div", { className: cx("gd-gen-ai-chat__window__conversations__drop-placeholder", {
|
|
263
255
|
isDragging: activeDropZone === "body" && !draggedConversation?.pinned,
|
|
264
256
|
isDraggingOver: activeDropZone === "pin",
|
|
265
257
|
isEmpty: pinnedItems.length === 0,
|
|
266
258
|
}), children: _jsx("div", { className: "gd-gen-ai-chat__window__conversations__drop-placeholder__content", children: intl.formatMessage({
|
|
267
259
|
id: "gd.gen-ai.conversations.dnd.pin-placeholder",
|
|
268
|
-
}) }) }), _jsx(ConversationsList, { id: "gd-gen-ai-conversations-pinned", menuRef: menuRef, openedId: openedId, listItems: pinnedItems, onDragStart: onDragStart, onDragEnd: onDragEnd, onMenuUnhandledKeyDown: onMenuUnhandledKeyDown, handleSelect: handleSelect })
|
|
269
|
-
] }), _jsxs("div", { className: "gd-gen-ai-chat__window__conversations__drop-group", onDragOver: (event) => onDropZoneDragOver("unpin", event), onDragLeave: onDropZoneDragLeave, onDrop: (event) => onDropZoneDrop("unpin", event), children: [
|
|
270
|
-
_jsx("div", { className: cx("gd-gen-ai-chat__window__conversations__drop-placeholder", {
|
|
260
|
+
}) }) }), _jsx(ConversationsList, { id: "gd-gen-ai-conversations-pinned", menuRef: menuRef, openedId: openedId, listItems: pinnedItems, onDragStart: onDragStart, onDragEnd: onDragEnd, onMenuUnhandledKeyDown: onMenuUnhandledKeyDown, handleSelect: handleSelect })] }), _jsxs("div", { className: "gd-gen-ai-chat__window__conversations__drop-group", onDragOver: (event) => onDropZoneDragOver("unpin", event), onDragLeave: onDropZoneDragLeave, onDrop: (event) => onDropZoneDrop("unpin", event), children: [_jsx("div", { className: cx("gd-gen-ai-chat__window__conversations__drop-placeholder", {
|
|
271
261
|
isDragging: activeDropZone === "body" && draggedConversation?.pinned,
|
|
272
262
|
isDraggingOver: activeDropZone === "unpin",
|
|
273
263
|
}), children: _jsx("div", { className: "gd-gen-ai-chat__window__conversations__drop-placeholder__content", children: intl.formatMessage({
|
|
274
264
|
id: "gd.gen-ai.conversations.dnd.unpin-placeholder",
|
|
275
|
-
}) }) }), _jsx(ConversationsList, { id: "gd-gen-ai-conversations-rest", menuRef: menuRef, openedId: openedId, listItems: restItems, onDragStart: onDragStart, onDragEnd: onDragEnd, onMenuUnhandledKeyDown: onMenuUnhandledKeyDown, handleSelect: handleSelect })
|
|
276
|
-
] }), draggedConversation ? (_jsx("div", { className: cx("gd-gen-ai-chat__window__conversations__drop-overlay", {
|
|
265
|
+
}) }) }), _jsx(ConversationsList, { id: "gd-gen-ai-conversations-rest", menuRef: menuRef, openedId: openedId, listItems: restItems, onDragStart: onDragStart, onDragEnd: onDragEnd, onMenuUnhandledKeyDown: onMenuUnhandledKeyDown, handleSelect: handleSelect })] }), draggedConversation ? (_jsx("div", { className: cx("gd-gen-ai-chat__window__conversations__drop-overlay", {
|
|
277
266
|
isDragging: !!activeDropZone,
|
|
278
267
|
}) })) : null] })) }));
|
|
279
268
|
}
|
|
@@ -25,5 +25,5 @@ export type GenAIChatDialogProps = Omit<GenAiStoreProps, "children"> & {
|
|
|
25
25
|
*/
|
|
26
26
|
closeOnEscape?: boolean;
|
|
27
27
|
};
|
|
28
|
-
export declare function GenAIChatDialog({ backend, workspace, locale, disabled, isOpen, onOpen, onClose, settings, className, dialogPosition, allowNativeLinks, returnFocusTo, objectTypes, includeTags, excludeTags, canManage, canAnalyze, canFullControl, eventHandlers, catalogItems, colorPalette, onLinkClick, onDispatcher, mode, slots, closeOnEscape }: GenAIChatDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function GenAIChatDialog({ backend, workspace, locale, disabled, isOpen, onOpen, onClose, settings, className, dialogPosition, allowNativeLinks, returnFocusTo, objectTypes, includeTags, excludeTags, canManage, canAnalyze, canFullControl, eventHandlers, catalogItems, colorPalette, onLinkClick, onDispatcher, mode, displayMode, slots, closeOnEscape }: GenAIChatDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
//# sourceMappingURL=GenAIChatDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatDialog.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAC;AAchF,OAAO,
|
|
1
|
+
{"version":3,"file":"GenAIChatDialog.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAC;AAchF,OAAO,EAAkD,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3G,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,iBAAiB,C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HAT_Z_INDEX
|
|
20
20
|
const DEFAULT_KDA_Z_INDEX = 3050;
|
|
21
|
-
export function GenAIChatDialog({ backend, workspace, locale, disabled, isOpen, onOpen, onClose, settings, className, dialogPosition, allowNativeLinks = true, returnFocusTo, objectTypes, includeTags, excludeTags, canManage = false, canAnalyze = false, canFullControl = false, eventHandlers, catalogItems, colorPalette, onLinkClick, onDispatcher, mode, slots, closeOnEscape, }) {
|
|
21
|
+
export function GenAIChatDialog({ backend, workspace, locale, disabled, isOpen, onOpen, onClose, settings, className, dialogPosition, allowNativeLinks = true, returnFocusTo, objectTypes, includeTags, excludeTags, canManage = false, canAnalyze = false, canFullControl = false, eventHandlers, catalogItems, colorPalette, onLinkClick, onDispatcher, mode, displayMode, slots, closeOnEscape, }) {
|
|
22
22
|
const effectiveBackend = useBackendStrict(backend);
|
|
23
23
|
const effectiveWorkspace = useWorkspaceStrict(workspace);
|
|
24
|
-
return (_jsx(IntlWrapper, { locale: locale, children: _jsx(GenAiStore, { backend: effectiveBackend, workspace: effectiveWorkspace, onDispatcher: onDispatcher, eventHandlers: eventHandlers, colorPalette: colorPalette, allowNativeLinks: allowNativeLinks, onLinkClick: onLinkClick, settings: settings, objectTypes: objectTypes, includeTags: includeTags, excludeTags: excludeTags, catalogItems: catalogItems, mode: mode, children: (genAIStore) => (_jsx(GenAIChatDialogContent, { genAIStore: genAIStore, backend: effectiveBackend, workspace: effectiveWorkspace, className: className, dialogPosition: dialogPosition, disabled: disabled, isOpen: isOpen, onOpen: onOpen, onClose: onClose, returnFocusTo: returnFocusTo, closeOnEscape: closeOnEscape, allowNativeLinks: allowNativeLinks, onLinkClick: onLinkClick, catalogItems: catalogItems, canManage: canManage, canAnalyze: canAnalyze, canFullControl: canFullControl, slots: slots })) }) }));
|
|
24
|
+
return (_jsx(IntlWrapper, { locale: locale, children: _jsx(GenAiStore, { backend: effectiveBackend, workspace: effectiveWorkspace, onDispatcher: onDispatcher, eventHandlers: eventHandlers, colorPalette: colorPalette, allowNativeLinks: allowNativeLinks, onLinkClick: onLinkClick, settings: settings, objectTypes: objectTypes, includeTags: includeTags, excludeTags: excludeTags, catalogItems: catalogItems, mode: mode, children: (genAIStore) => (_jsx(GenAIChatDialogContent, { genAIStore: genAIStore, backend: effectiveBackend, workspace: effectiveWorkspace, className: className, dialogPosition: dialogPosition, disabled: disabled, isOpen: isOpen, onOpen: onOpen, onClose: onClose, returnFocusTo: returnFocusTo, closeOnEscape: closeOnEscape, allowNativeLinks: allowNativeLinks, onLinkClick: onLinkClick, catalogItems: catalogItems, canManage: canManage, canAnalyze: canAnalyze, canFullControl: canFullControl, slots: slots, displayMode: displayMode })) }) }));
|
|
25
25
|
}
|
|
26
|
-
function GenAIChatDialogContent({ genAIStore, backend, workspace, className, dialogPosition, disabled, isOpen, onOpen, onClose, returnFocusTo, onLinkClick, allowNativeLinks, catalogItems, canManage, canAnalyze, canFullControl, slots, closeOnEscape, }) {
|
|
26
|
+
function GenAIChatDialogContent({ genAIStore, backend, workspace, className, dialogPosition, disabled, isOpen, onOpen, onClose, returnFocusTo, onLinkClick, allowNativeLinks, catalogItems, canManage, canAnalyze, canFullControl, slots, displayMode, closeOnEscape, }) {
|
|
27
27
|
const open = useRef(onOpen);
|
|
28
28
|
open.current = onOpen;
|
|
29
29
|
const close = useRef(onClose);
|
|
@@ -63,6 +63,5 @@ function GenAIChatDialogContent({ genAIStore, backend, workspace, className, dia
|
|
|
63
63
|
const parentOverlayController = useOverlayController();
|
|
64
64
|
const chatOverlayController = useMemo(() => parentOverlayController ?? OverlayController.getInstance(DEFAULT_CHAT_Z_INDEX), [parentOverlayController]);
|
|
65
65
|
const kdaOverlayController = useMemo(() => parentOverlayController ?? OverlayController.getInstance(DEFAULT_KDA_Z_INDEX), [parentOverlayController]);
|
|
66
|
-
return (_jsx(BackendProvider, { backend: backend, children: _jsx(WorkspaceProvider, { workspace: workspace, children: _jsxs(OverlayControllerProvider, { overlayController: chatOverlayController, children: [isOpen && !disabled ? (_jsx(ConfigProvider, { allowNativeLinks: allowNativeLinks, linkHandler: onLinkClick, catalogItems: catalogItems, canManage: canManage, canAnalyze: canAnalyze, canFullControl: canFullControl, children: _jsx(CustomizationProvider, { slots: slots, children: _jsx(GenAIChatOverlay, { className: className, dialogPosition: dialogPosition, returnFocusTo: returnFocusTo, closeOnEscape: closeOnEscape, onClose: onCloseHandler }) }) })) : null, _jsx(OverlayControllerProvider, { overlayController: kdaOverlayController, children: _jsx(KeyDriverAnalysis, {}) })
|
|
67
|
-
] }) }) }));
|
|
66
|
+
return (_jsx(BackendProvider, { backend: backend, children: _jsx(WorkspaceProvider, { workspace: workspace, children: _jsxs(OverlayControllerProvider, { overlayController: chatOverlayController, children: [isOpen && !disabled ? (_jsx(ConfigProvider, { allowNativeLinks: allowNativeLinks, linkHandler: onLinkClick, catalogItems: catalogItems, canManage: canManage, canAnalyze: canAnalyze, canFullControl: canFullControl, children: _jsx(CustomizationProvider, { slots: slots, children: _jsx(GenAIChatOverlay, { className: className, dialogPosition: dialogPosition, returnFocusTo: returnFocusTo, closeOnEscape: closeOnEscape, displayMode: displayMode, onClose: onCloseHandler }) }) })) : null, _jsx(OverlayControllerProvider, { overlayController: kdaOverlayController, children: _jsx(KeyDriverAnalysis, {}) })] }) }) }));
|
|
68
67
|
}
|
|
@@ -2,7 +2,7 @@ import { type RefObject } from "react";
|
|
|
2
2
|
import { type IAnalyticalBackend, type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi";
|
|
3
3
|
import type { GenAIObjectType, IColorPalette, IGenAIUserContext } from "@gooddata/sdk-model";
|
|
4
4
|
import { type ChatAssistantMessageEvent, type ChatClosedEvent, type ChatCopyToClipboardEvent, type ChatDefinitionReceivedEvent, type ChatEvent, type ChatFeedbackErrorEvent, type ChatFeedbackEvent, type ChatOpenedEvent, type ChatResetEvent, type ChatSaveVisualizationErrorEvent, type ChatSaveVisualizationSuccessEvent, type ChatUserMessageEvent } from "../store/events.js";
|
|
5
|
-
import { type LinkHandlerEvent } from "./ConfigContext.js";
|
|
5
|
+
import { type GenAIAssistantDisplayMode, type LinkHandlerEvent } from "./ConfigContext.js";
|
|
6
6
|
/**
|
|
7
7
|
* Discriminated union of GenAI chat events surfaced to a caller via {@link IGenAIChatDialogConnectedProps.onEvent}.
|
|
8
8
|
*
|
|
@@ -75,6 +75,13 @@ export interface IGenAIChatDialogConnectedProps {
|
|
|
75
75
|
isDisabled?: boolean;
|
|
76
76
|
onOpen: () => void;
|
|
77
77
|
onClose: () => void;
|
|
78
|
+
/**
|
|
79
|
+
* Display mode of the Gen AI chat.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* Defaults to "modal". The "inline" mode is used when the chat is embedded within another component.
|
|
83
|
+
*/
|
|
84
|
+
displayMode?: GenAIAssistantDisplayMode;
|
|
78
85
|
/** A question to seed into the chat when it opens. */
|
|
79
86
|
askedQuestion?: string | null;
|
|
80
87
|
/**
|
|
@@ -133,5 +140,5 @@ export interface IGenAIChatDialogConnectedProps {
|
|
|
133
140
|
*
|
|
134
141
|
* @internal
|
|
135
142
|
*/
|
|
136
|
-
export declare function GenAIChatDialogConnected({ backend, workspace, locale, canManage, canAnalyze, canFullControl, settings, agentId, isOpen, isDisabled, onOpen, onClose, askedQuestion, askSeq, userContext, ambientUserContext, ambientUserContextLoading, appendToChat, replaceUserContext, includeTags, excludeTags, objectTypes: objectTypesOverride, onEvent, onAnyEvent, dialogPosition, className, colorPalette, allowNativeLinks, onLinkClick, returnFocusTo }: IGenAIChatDialogConnectedProps): import("react/jsx-runtime").JSX.Element;
|
|
143
|
+
export declare function GenAIChatDialogConnected({ backend, workspace, locale, canManage, canAnalyze, canFullControl, settings, agentId, isOpen, isDisabled, displayMode, onOpen, onClose, askedQuestion, askSeq, userContext, ambientUserContext, ambientUserContextLoading, appendToChat, replaceUserContext, includeTags, excludeTags, objectTypes: objectTypesOverride, onEvent, onAnyEvent, dialogPosition, className, colorPalette, allowNativeLinks, onLinkClick, returnFocusTo }: IGenAIChatDialogConnectedProps): import("react/jsx-runtime").JSX.Element;
|
|
137
144
|
//# sourceMappingURL=GenAIChatDialogConnected.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatDialogConnected.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatDialogConnected.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAqD,MAAM,OAAO,CAAC;AAE1F,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAI7F,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EAY5B,MAAM,oBAAoB,CAAC;AAO5B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"GenAIChatDialogConnected.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatDialogConnected.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAqD,MAAM,OAAO,CAAC;AAE1F,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAI7F,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KA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AClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4EAA4E;IAC5E,WAAW,CAAC,EAAE,CAAC,cAAc,EAAE,gBAAgB,KAAK,MAAM,GAAG,SAAS,CAAC;IACvE,iDAAiD;IACjD,aAAa,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC;CAC1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,OAAO,EACP,SAAS,EACT,MAAM,EACN,SAAS,EACT,UAAU,EACV,cAAc,EACd,QAAQ,EACR,OAAO,EACP,MAAM,EACN,UAAiB,EACjB,WAAW,EACX,MAAM,EACN,OAAO,EACP,aAAa,EACb,MAAM,EACN,WAAW,EACX,kBAAkB,EAClB,yBAAyB,EACzB,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,WAAW,EAAE,mBAAmB,EAChC,OAAO,EACP,UAAU,EACV,cAAc,EACd,SAAS,EACT,YAAY,EACZ,gBAAuB,EACvB,WAAW,EACX,aAAa,EAChB,EAAE,8BAA8B,2CA4KhC"}
|
|
@@ -17,7 +17,7 @@ import { GenAIChatDialog } from "./GenAIChatDialog.js";
|
|
|
17
17
|
*
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
|
-
export function GenAIChatDialogConnected({ backend, workspace, locale, canManage, canAnalyze, canFullControl, settings, agentId, isOpen, isDisabled = true, onOpen, onClose, askedQuestion, askSeq, userContext, ambientUserContext, ambientUserContextLoading, appendToChat, replaceUserContext, includeTags, excludeTags, objectTypes: objectTypesOverride, onEvent, onAnyEvent, dialogPosition, className, colorPalette, allowNativeLinks = true, onLinkClick, returnFocusTo, }) {
|
|
20
|
+
export function GenAIChatDialogConnected({ backend, workspace, locale, canManage, canAnalyze, canFullControl, settings, agentId, isOpen, isDisabled = true, displayMode, onOpen, onClose, askedQuestion, askSeq, userContext, ambientUserContext, ambientUserContextLoading, appendToChat, replaceUserContext, includeTags, excludeTags, objectTypes: objectTypesOverride, onEvent, onAnyEvent, dialogPosition, className, colorPalette, allowNativeLinks = true, onLinkClick, returnFocusTo, }) {
|
|
21
21
|
const defaultLinkClick = useCallback(({ itemUrl, newTab, preventDefault, type, dashboardStatus, }) => {
|
|
22
22
|
// NOTE: If dashboard is draft, do nothing for now
|
|
23
23
|
if (type === "dashboard" && dashboardStatus === "draft") {
|
|
@@ -150,5 +150,5 @@ export function GenAIChatDialogConnected({ backend, workspace, locale, canManage
|
|
|
150
150
|
settings,
|
|
151
151
|
replaceUserContext,
|
|
152
152
|
]);
|
|
153
|
-
return (_jsx(GenAIChatDialog, { isOpen: isOpen, disabled: isDisabled, locale: locale, backend: backend, workspace: workspace, canManage: canManage, canAnalyze: canAnalyze, canFullControl: canFullControl, settings: settings, objectTypes: objectTypes, includeTags: includeTags, excludeTags: excludeTags, className: className, dialogPosition: dialogPosition, colorPalette: colorPalette, allowNativeLinks: allowNativeLinks, onLinkClick: onLinkClick ?? defaultLinkClick, onOpen: onOpen, onClose: onClose, eventHandlers: eventHandlers, onDispatcher: onDispatcher, returnFocusTo: returnFocusTo }));
|
|
153
|
+
return (_jsx(GenAIChatDialog, { isOpen: isOpen, disabled: isDisabled, locale: locale, backend: backend, displayMode: displayMode, workspace: workspace, canManage: canManage, canAnalyze: canAnalyze, canFullControl: canFullControl, settings: settings, objectTypes: objectTypes, includeTags: includeTags, excludeTags: excludeTags, className: className, dialogPosition: dialogPosition, colorPalette: colorPalette, allowNativeLinks: allowNativeLinks, onLinkClick: onLinkClick ?? defaultLinkClick, onOpen: onOpen, onClose: onClose, eventHandlers: eventHandlers, onDispatcher: onDispatcher, returnFocusTo: returnFocusTo }));
|
|
154
154
|
}
|
|
@@ -25,7 +25,5 @@ export function GenAIChatHeader({ onClose }) {
|
|
|
25
25
|
id: "gd.gen-ai.header.new-conversation-tooltip",
|
|
26
26
|
}), onClick: () => startNewConversation(), disabled: !canStartOver })) : null, _jsx(HeaderIcon, { icon: isFullscreen ? "minimize" : "expand", arrowPlacement: "top-end", tooltip: isFullscreen
|
|
27
27
|
? intl.formatMessage({ id: "gd.gen-ai.header.contract-tooltip" })
|
|
28
|
-
: intl.formatMessage({ id: "gd.gen-ai.header.expand-tooltip" }), onClick: () => setFullscreen({ isFullscreen: !isFullscreen }) })
|
|
29
|
-
] })), _jsx(HeaderIcon, { icon: "cross", arrowPlacement: "top-end", tooltip: intl.formatMessage({ id: "gd.gen-ai.header.close-tooltip" }), onClick: onClose })
|
|
30
|
-
] }));
|
|
28
|
+
: intl.formatMessage({ id: "gd.gen-ai.header.expand-tooltip" }), onClick: () => setFullscreen({ isFullscreen: !isFullscreen }) })] })), _jsx(HeaderIcon, { icon: "cross", arrowPlacement: "top-end", tooltip: intl.formatMessage({ id: "gd.gen-ai.header.close-tooltip" }), onClick: onClose })] }));
|
|
31
29
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type RefObject } from "react";
|
|
2
|
+
import { type GenAIAssistantDisplayMode } from "./ConfigContext.js";
|
|
2
3
|
export type GenAIChatOverlayExternalProps = {
|
|
3
4
|
returnFocusTo?: RefObject<HTMLElement | null> | string;
|
|
4
5
|
className?: string;
|
|
5
6
|
dialogPosition?: "left" | "right";
|
|
7
|
+
displayMode?: GenAIAssistantDisplayMode;
|
|
6
8
|
/**
|
|
7
9
|
* Host-side gate for Escape-to-close, on top of the built-in guard that already keeps the
|
|
8
10
|
* chat open while it is visually covered by another overlay (see chatOverlayEscapeGuard).
|
|
@@ -12,5 +14,5 @@ export type GenAIChatOverlayExternalProps = {
|
|
|
12
14
|
closeOnEscape?: boolean;
|
|
13
15
|
onClose: () => void;
|
|
14
16
|
};
|
|
15
|
-
export declare function GenAIChatOverlay({ onClose, returnFocusTo, dialogPosition, className, closeOnEscape: closeOnEscapeProp }: GenAIChatOverlayExternalProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function GenAIChatOverlay({ onClose, returnFocusTo, dialogPosition, className, displayMode, closeOnEscape: closeOnEscapeProp }: GenAIChatOverlayExternalProps): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
//# sourceMappingURL=GenAIChatOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatOverlay.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"GenAIChatOverlay.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,SAAS,EAAmC,MAAM,OAAO,CAAC;AAkBxF,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAMpE,MAAM,MAAM,6BAA6B,GAAG;IACxC,aAAa,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC7B,OAAO,EACP,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAqB,EACrB,aAAa,EAAE,iBAAwB,EAC1C,EAAE,6BAA6B,2CA+F/B"}
|
|
@@ -13,7 +13,7 @@ import { GenAIChatConversations } from "./GenAIChatConversations.js";
|
|
|
13
13
|
import { GenAIChatHeader } from "./GenAIChatHeader.js";
|
|
14
14
|
import { GenAIChatWrapper } from "./GenAIChatWrapper.js";
|
|
15
15
|
import { useFullscreenCheck } from "./hooks/useFullscreenCheck.js";
|
|
16
|
-
export function GenAIChatOverlay({ onClose, returnFocusTo, dialogPosition, className, closeOnEscape: closeOnEscapeProp = true, }) {
|
|
16
|
+
export function GenAIChatOverlay({ onClose, returnFocusTo, dialogPosition, className, displayMode = "modal", closeOnEscape: closeOnEscapeProp = true, }) {
|
|
17
17
|
const intl = useIntl();
|
|
18
18
|
const { isFullscreen } = useFullscreenCheck();
|
|
19
19
|
const dispatch = useDispatch();
|
|
@@ -58,11 +58,15 @@ export function GenAIChatOverlay({ onClose, returnFocusTo, dialogPosition, class
|
|
|
58
58
|
window.addEventListener("keydown", onKeyDown);
|
|
59
59
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
60
60
|
}, [closeOnEscape, onClose]);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
isModal: isFullscreen,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
const Wrapper = useCallback(({ children }) => {
|
|
62
|
+
if (displayMode === "modal") {
|
|
63
|
+
return (_jsx(Dialog, { isModal: isFullscreen, returnFocusTo: returnFocusTo, returnFocusAfterClose: !!returnFocusTo, alignPoints: [{ align: position }], closeOnEscape: false, submitOnEnterKey: false, closeOnParentScroll: false, closeOnMouseDrag: false, onClose: onClose, className: classNames, accessibilityConfig: {
|
|
64
|
+
title: intl.formatMessage({ id: "gd.gen-ai.dialog.label" }),
|
|
65
|
+
isModal: isFullscreen,
|
|
66
|
+
dialogId: HEADER_CHAT_PANEL_ID,
|
|
67
|
+
}, children: children }));
|
|
68
|
+
}
|
|
69
|
+
return _jsx("div", { className: "gd-gen-ai-chat__inline", children: children });
|
|
70
|
+
}, [classNames, displayMode, intl, isFullscreen, onClose, position, returnFocusTo]);
|
|
71
|
+
return (_jsxs(Wrapper, { children: [_jsx(GenAIChatHeader, { onClose: onClose }), _jsx(GenAIChatConversations, { onClose: onHistoryClose, onSelect: onSelectConversation }), _jsx(GenAIChatWrapper, { autofocus: true })] }));
|
|
68
72
|
}
|
|
@@ -135,9 +135,7 @@ export function GenAIChatReasoningMenuRow({ item, }) {
|
|
|
135
135
|
return (_jsx("li", { role: "none", className: "gd-gen-ai-chat__reasoning-row", children: _jsx(Dropdown, { alignPoints: [
|
|
136
136
|
{ align: "tr tl", offset: { x: -4, y: 0 } },
|
|
137
137
|
{ align: "tl tr", offset: { x: 4, y: 0 } },
|
|
138
|
-
], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, returnFocusTo: reasoningTriggerId, accessibilityConfig: {}, renderButton: ({ isOpen, toggleDropdown }) => (_jsxs("button", { type: "button", id: reasoningTriggerId, className: "gd-gen-ai-chat__reasoning-row__button", "aria-label": reasoningRowAriaLabel, "aria-haspopup": "menu", "aria-expanded": isOpen, onClick: toggleDropdown, children: [
|
|
139
|
-
_jsx("span", { className: "gd-gen-ai-chat__reasoning-row__title", children: reasoningLabel }), valueLabel ? (_jsx("span", { className: "gd-gen-ai-chat__reasoning-row__value", children: valueLabel })) : null, _jsx("i", { className: "gd-icon-navigateright" })
|
|
140
|
-
] })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(UiMenu, { dataTestId: "reasoning_dropdown_menu", items: options, size: "small", minWidth: 200, maxWidth: 260, containerTopPadding: "small", containerBottomPadding: "small", ariaAttributes: ariaAttributes, onClose: closeDropdown, onSelect: (option) => {
|
|
138
|
+
], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, returnFocusTo: reasoningTriggerId, accessibilityConfig: {}, renderButton: ({ isOpen, toggleDropdown }) => (_jsxs("button", { type: "button", id: reasoningTriggerId, className: "gd-gen-ai-chat__reasoning-row__button", "aria-label": reasoningRowAriaLabel, "aria-haspopup": "menu", "aria-expanded": isOpen, onClick: toggleDropdown, children: [_jsx("span", { className: "gd-gen-ai-chat__reasoning-row__title", children: reasoningLabel }), valueLabel ? (_jsx("span", { className: "gd-gen-ai-chat__reasoning-row__value", children: valueLabel })) : null, _jsx("i", { className: "gd-icon-navigateright" })] })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(UiMenu, { dataTestId: "reasoning_dropdown_menu", items: options, size: "small", minWidth: 200, maxWidth: 260, containerTopPadding: "small", containerBottomPadding: "small", ariaAttributes: ariaAttributes, onClose: closeDropdown, onSelect: (option) => {
|
|
141
139
|
onSelectEffort?.(option.data.effort);
|
|
142
140
|
closeDropdown();
|
|
143
141
|
closeParentMenu?.();
|
|
@@ -60,8 +60,7 @@ function GenAIChatWrapperComponent({ loadThread, clearThread, cancelLoading, set
|
|
|
60
60
|
restart();
|
|
61
61
|
}, clearing: isClearing, buttonsBefore: _jsx(_Fragment, { children: _jsx(Button, { className: "gd-button-link", value: intl.formatMessage({ id: "gd.gen-ai.global-no-llm.button-create-llm" }), onClick: onSettingClick("create") }) }) }));
|
|
62
62
|
}
|
|
63
|
-
return (_jsx(ErrorBoundary, { children: _jsxs("div", { className: cx("gd-gen-ai-chat", className), children: [
|
|
64
|
-
_jsx(NavigationBypass, {}), _jsx(Messages, {}), _jsx(Input, { targetRef: targetRef, autofocus: autofocus, canManage: canManage, canAnalyze: canAnalyze }), DisclaimerComponent ? _jsx(DisclaimerComponent, {}) : null] }) }));
|
|
63
|
+
return (_jsx(ErrorBoundary, { children: _jsxs("div", { className: cx("gd-gen-ai-chat", className), children: [_jsx(NavigationBypass, {}), _jsx(Messages, {}), _jsx(Input, { targetRef: targetRef, autofocus: autofocus, canManage: canManage, canAnalyze: canAnalyze }), DisclaimerComponent ? _jsx(DisclaimerComponent, {}) : null] }) }));
|
|
65
64
|
}
|
|
66
65
|
function NavigationBypass() {
|
|
67
66
|
const intl = useIntl();
|
|
@@ -60,9 +60,7 @@ function StandaloneInputContent({ onStart, onAgentSet, className, canManage, can
|
|
|
60
60
|
"gd-gen-ai-chat__input--big-screen": isBigScreen,
|
|
61
61
|
"gd-gen-ai-chat__input--small-screen": isSmallScreen,
|
|
62
62
|
"gd-gen-ai-chat__input--agent-switching": agentSwitchingEnabled,
|
|
63
|
-
}), children: _jsx("div", { className: "gd-gen-ai-chat__input__content", children: _jsxs("div", { className: "gd-gen-ai-chat__input__container", children: [
|
|
64
|
-
_jsx("div", { className: "gd-gen-ai-chat__input__text", ...ref, children: _jsx(SyntaxHighlightingInput, { className: "gd-gen-ai-chat__input__mc", placeholder: placeholder ?? intl.formatMessage(msgs.placeholder), value: value, onApi: setApi, onChange: setValue, onKeyDown: handleKeyDown, beforeExtensions: beforeExtensions, extensions: extensions, onCompletion: onCompletion }) }), _jsx(GenAiChatAgentSwitching, { disabled: !value.trim(), agentDropdownDisabled: false, isAssistantLoading: false, isConversationsLoading: false, handleSubmit: handleSubmit })
|
|
65
|
-
] }) }) }));
|
|
63
|
+
}), children: _jsx("div", { className: "gd-gen-ai-chat__input__content", children: _jsxs("div", { className: "gd-gen-ai-chat__input__container", children: [_jsx("div", { className: "gd-gen-ai-chat__input__text", ...ref, children: _jsx(SyntaxHighlightingInput, { className: "gd-gen-ai-chat__input__mc", placeholder: placeholder ?? intl.formatMessage(msgs.placeholder), value: value, onApi: setApi, onChange: setValue, onKeyDown: handleKeyDown, beforeExtensions: beforeExtensions, extensions: extensions, onCompletion: onCompletion }) }), _jsx(GenAiChatAgentSwitching, { disabled: !value.trim(), agentDropdownDisabled: false, isAssistantLoading: false, isConversationsLoading: false, handleSubmit: handleSubmit })] }) }) }));
|
|
66
64
|
}
|
|
67
65
|
/**
|
|
68
66
|
* @internal
|
|
@@ -69,8 +69,7 @@ function GenAiChatAgentSwitchingCore({ agentSwitchingEnabled, isAssistantLoading
|
|
|
69
69
|
"gd-gen-ai-chat__input__send_button--disabled": !agentSwitchingEnabled && buttonDisabled,
|
|
70
70
|
}), onMouseDown: agentSwitchingEnabled ? onMouseDown : undefined, children: [leftContent, agentSwitchingActive && hasNoAgents ? (_jsx("span", { className: "gd-gen-ai-chat__input__no-agent", "data-testid": "no_agent_available", role: "status", "aria-live": "polite", "aria-atomic": "true", children: noAgentAvailableLabel })) : agentSwitchingEnabled ? (_jsxs(_Fragment, { children: [agentSwitchingActive ? (_jsx(AgentChooserComponent, { agents: availableAgents, conversations: conversations, conversationAgentId: conversation?.agentId, selectedAgentId: selectedAgentId, effectiveSelectedAgentId: effectiveSelectedAgentId, isDisabled: agentDropdownDisabled || isSelectionLoading, isLoading: isSelectionLoading, onSelectAgent: handleSelectAgent, selectedEffort: selectedEffort, onSelectEffort: handleSelectEffort })) : reasoningEffortEnabled ? (_jsx(GenAIChatEffortDropdown, { selectedEffort: selectedEffort, isDisabled: agentDropdownDisabled, onSelectEffort: handleSelectEffort })) : null, _jsx(UiTooltip, { triggerBy: ["focus", "hover"], arrowPlacement: "bottom", anchor: _jsx(UiIconButton, { icon: "arrowUp", variant: "primary", size: "small", dataTestId: "send_message", isDisabled: buttonDisabled, onClick: buttonDisabled ? undefined : handleSubmitHandler, accessibilityConfig: {
|
|
71
71
|
ariaLabel: sendLabel,
|
|
72
|
-
} }), content: sendLabel })
|
|
73
|
-
] })) : (_jsx(UiTooltip, { triggerBy: ["focus", "hover"], arrowPlacement: "bottom", anchor: _jsx(UiIconButton, { icon: "send", variant: "tertiary", size: "medium", dataTestId: "send_message", isDisabled: buttonDisabled, onClick: buttonDisabled ? undefined : handleSubmitHandler, accessibilityConfig: {
|
|
72
|
+
} }), content: sendLabel })] })) : (_jsx(UiTooltip, { triggerBy: ["focus", "hover"], arrowPlacement: "bottom", anchor: _jsx(UiIconButton, { icon: "send", variant: "tertiary", size: "medium", dataTestId: "send_message", isDisabled: buttonDisabled, onClick: buttonDisabled ? undefined : handleSubmitHandler, accessibilityConfig: {
|
|
74
73
|
ariaLabel: sendLabel,
|
|
75
74
|
} }), content: sendLabel }))] }));
|
|
76
75
|
}
|
|
@@ -70,9 +70,7 @@ export function GenAiChatContextChooserBody({ inputItems, title, titleId, search
|
|
|
70
70
|
const shouldShowPagedList = !hasNoData || hasNextPage;
|
|
71
71
|
const skeletonItemsCount = isLoading || (hasNextPage && inputItems.length === 0) ? LOADING_SKELETON_ITEMS_COUNT : 0;
|
|
72
72
|
const listMaxHeight = MAX_VISIBLE_ITEMS * DEFAULT_ITEM_HEIGHT;
|
|
73
|
-
return (_jsxs("div", { ...ariaAttributes, "aria-labelledby": titleId, className: "gd-gen-ai-chat__context-chooser", "data-testid": "context_chooser_menu", children: [
|
|
74
|
-
_jsx(UiSubmenuHeader, { title: title, titleId: titleId, height: "medium", onClose: closeDropdown, closeAriaLabel: intl.formatMessage(msgs.close) }), isSearchFieldVisible ? (_jsxs(_Fragment, { children: [
|
|
75
|
-
_jsx("div", { onKeyDown: (event) => {
|
|
73
|
+
return (_jsxs("div", { ...ariaAttributes, "aria-labelledby": titleId, className: "gd-gen-ai-chat__context-chooser", "data-testid": "context_chooser_menu", children: [_jsx(UiSubmenuHeader, { title: title, titleId: titleId, height: "medium", onClose: closeDropdown, closeAriaLabel: intl.formatMessage(msgs.close) }), isSearchFieldVisible ? (_jsxs(_Fragment, { children: [_jsx("div", { onKeyDown: (event) => {
|
|
76
74
|
if (isTypingKey(event)) {
|
|
77
75
|
event.stopPropagation();
|
|
78
76
|
}
|
|
@@ -81,8 +79,7 @@ export function GenAiChatContextChooserBody({ inputItems, title, titleId, search
|
|
|
81
79
|
ariaControls: listboxId,
|
|
82
80
|
} }) }), _jsx(UiSearchResultsAnnouncement, { totalResults: normalizedSearch ? inputItems.length : undefined, resultValues: inputItems.length <= DETAILED_ANNOUNCEMENT_THRESHOLD
|
|
83
81
|
? inputItems.map((item) => item.title)
|
|
84
|
-
: undefined })
|
|
85
|
-
] })) : null, shouldShowPagedList ? (_jsx(ScopedIdStore, { value: scopedIdStoreValue, children: _jsx(UiPagedVirtualList, { maxHeight: listMaxHeight, items: inputItems, itemHeight: DEFAULT_ITEM_HEIGHT, itemsGap: 0, itemPadding: 0, skeletonItemsCount: skeletonItemsCount, isLoading: isLoading, hasNextPage: hasNextPage, loadNextPage: loadNextPage, representAs: "listbox", closeDropdown: closeDropdown, onKeyDownConfirm: handleSelect, listboxProps: {
|
|
82
|
+
: undefined })] })) : null, shouldShowPagedList ? (_jsx(ScopedIdStore, { value: scopedIdStoreValue, children: _jsx(UiPagedVirtualList, { maxHeight: listMaxHeight, items: inputItems, itemHeight: DEFAULT_ITEM_HEIGHT, itemsGap: 0, itemPadding: 0, skeletonItemsCount: skeletonItemsCount, isLoading: isLoading, hasNextPage: hasNextPage, loadNextPage: loadNextPage, representAs: "listbox", closeDropdown: closeDropdown, onKeyDownConfirm: handleSelect, listboxProps: {
|
|
86
83
|
id: listboxId,
|
|
87
84
|
"aria-label": intl.formatMessage(msgs.listAriaLabel),
|
|
88
85
|
}, children: (item) => (_jsx(ContextChooserItem, { item: item, selected: selectedIds?.some((r) => areObjRefsEqual(r, item.ref)), onSelect: () => handleSelect(item) })) }) })) : (_jsx(NoData, { hasNoMatchingData: hasNoMatchingData, notFoundLabel: intl.formatMessage(msgs.noMatchingData), noDataLabel: intl.formatMessage(msgs.noDataAvailable) }))] }));
|
|
@@ -91,6 +88,5 @@ function ContextChooserItem({ item, selected, onSelect, }) {
|
|
|
91
88
|
const icon = getIconByObject(item);
|
|
92
89
|
return (_jsxs("div", { className: cx("gd-list-item", {
|
|
93
90
|
"gd-list-item--selected": selected,
|
|
94
|
-
}), onClick: onSelect, "aria-selected": selected, children: [icon.iconBefore ? _jsx(UiIcon, { size: 16, type: icon.iconBefore, color: icon.iconColor }) : null, _jsx(ShortenedText, { ellipsisPosition: "end", children: item.alternativeTitle ?? item.title })
|
|
95
|
-
] }));
|
|
91
|
+
}), onClick: onSelect, "aria-selected": selected, children: [icon.iconBefore ? _jsx(UiIcon, { size: 16, type: icon.iconBefore, color: icon.iconColor }) : null, _jsx(ShortenedText, { ellipsisPosition: "end", children: item.alternativeTitle ?? item.title })] }));
|
|
96
92
|
}
|
|
@@ -3,7 +3,7 @@ import { type EnhancedStore, type Store } from "@reduxjs/toolkit";
|
|
|
3
3
|
import { type IAnalyticalBackend, type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi";
|
|
4
4
|
import { type CatalogItem, type GenAIObjectType, type IColorPalette, type IInsight, type IListedDashboard } from "@gooddata/sdk-model";
|
|
5
5
|
import { type ChatEventHandler } from "../store/events.js";
|
|
6
|
-
import { type GenAIAssistantMode, type LinkHandlerEvent } from "./ConfigContext.js";
|
|
6
|
+
import { type GenAIAssistantDisplayMode, type GenAIAssistantMode, type LinkHandlerEvent } from "./ConfigContext.js";
|
|
7
7
|
/**
|
|
8
8
|
* Props for the GenAiStore component.
|
|
9
9
|
* @public
|
|
@@ -68,11 +68,15 @@ export type GenAiStoreProps = {
|
|
|
68
68
|
*/
|
|
69
69
|
colorPalette?: IColorPalette;
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* Mode of the assistant. Adapts the internal layout to a narrow or to a wide container;
|
|
72
72
|
* the assistant always fills its parent element, so this does not resize it.
|
|
73
73
|
* On small screens the fullscreen layout is always used.
|
|
74
74
|
*/
|
|
75
75
|
mode?: GenAIAssistantMode;
|
|
76
|
+
/**
|
|
77
|
+
* Display mode of the Gen AI assistant.
|
|
78
|
+
*/
|
|
79
|
+
displayMode?: GenAIAssistantDisplayMode;
|
|
76
80
|
/**
|
|
77
81
|
* When provided, the function will be called with the store dispatch function
|
|
78
82
|
* after the store has been initialized.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAiStore.d.ts","sourceRoot":"","sources":["../../src/components/GenAiStore.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAmC,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGlE,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACxB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,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AAC,EAAE,gBAAgB,EAAE,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IAC7D;;OAEG;IACH,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,UAAU,EAAE,aAAa,KAAK,SAAS,CAAC,CAAC;IAEjE;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;OAOG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEF;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,kDAmDhD"}
|
|
@@ -6,7 +6,7 @@ import { useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
|
6
6
|
import { useGenAIStore } from "../hooks/useGenAIStore.js";
|
|
7
7
|
import { chatWindowSliceName } from "../store/chatWindow/chatWindowSlice.js";
|
|
8
8
|
import { messagesSliceName } from "../store/messages/messagesSlice.js";
|
|
9
|
-
import { ConfigProvider } from "./ConfigContext.js";
|
|
9
|
+
import { ConfigProvider, } from "./ConfigContext.js";
|
|
10
10
|
/**
|
|
11
11
|
* Provides the Gen AI store to the application.
|
|
12
12
|
* @public
|
|
@@ -8,15 +8,7 @@ export function GlobalError({ errorMessage, errorDescription, errorDetails, erro
|
|
|
8
8
|
const intl = useIntl();
|
|
9
9
|
const [showMore, setShowMore] = useState(false);
|
|
10
10
|
const hasShowMoreButton = Boolean(errorDetails && !showMore);
|
|
11
|
-
return (_jsxs("div", { className: "gd-gen-ai-chat__global_error", children: [
|
|
12
|
-
_jsx("div", { children: _jsx(ErrorComponent, { message: errorMessage ?? intl.formatMessage({ id: "gd.gen-ai.global-error" }), description: errorDescription ?? intl.formatMessage({ id: "gd.gen-ai.global-error.description" }) }) }), _jsxs("div", { className: "gd-gen-ai-chat__global_error__buttons", children: [buttonsBefore || clearError ? (_jsxs("div", { className: "gd-gen-ai-chat__global_error__buttons_first", children: [buttonsBefore, clearError ? (_jsx(Button, { className: "gd-button-link", value: intl.formatMessage({ id: "gd.gen-ai.global-error.button-clear" }), onClick: clearError, disabled: clearing })) : null] })) : null, hasShowMoreButton ? (_jsx(Button, { className: "gd-button-link", value: intl.formatMessage({ id: "gd.gen-ai.global-error.button-details" }), onClick: () => setShowMore(true), disabled: clearing })) : null] }), showMore ? (_jsxs("div", { className: "gd-gen-ai-chat__global_error__details__content", children: [
|
|
13
|
-
_jsxs("div", { className: "gd-gen-ai-chat__global_error__details__content-title", children: [
|
|
14
|
-
_jsx("div", { className: "gd-gen-ai-chat__global_error__details__content-title-text", children: intl.formatMessage({ id: "gd.gen-ai.global-error.details.title" }) }), _jsx(UiTooltip, { triggerBy: ["hover", "focus"], anchor: _jsx(UiIconButton, { icon: "question", variant: "tertiary" }), content: intl.formatMessage({
|
|
11
|
+
return (_jsxs("div", { className: "gd-gen-ai-chat__global_error", children: [_jsx("div", { children: _jsx(ErrorComponent, { message: errorMessage ?? intl.formatMessage({ id: "gd.gen-ai.global-error" }), description: errorDescription ?? intl.formatMessage({ id: "gd.gen-ai.global-error.description" }) }) }), _jsxs("div", { className: "gd-gen-ai-chat__global_error__buttons", children: [buttonsBefore || clearError ? (_jsxs("div", { className: "gd-gen-ai-chat__global_error__buttons_first", children: [buttonsBefore, clearError ? (_jsx(Button, { className: "gd-button-link", value: intl.formatMessage({ id: "gd.gen-ai.global-error.button-clear" }), onClick: clearError, disabled: clearing })) : null] })) : null, hasShowMoreButton ? (_jsx(Button, { className: "gd-button-link", value: intl.formatMessage({ id: "gd.gen-ai.global-error.button-details" }), onClick: () => setShowMore(true), disabled: clearing })) : null] }), showMore ? (_jsxs("div", { className: "gd-gen-ai-chat__global_error__details__content", children: [_jsxs("div", { className: "gd-gen-ai-chat__global_error__details__content-title", children: [_jsx("div", { className: "gd-gen-ai-chat__global_error__details__content-title-text", children: intl.formatMessage({ id: "gd.gen-ai.global-error.details.title" }) }), _jsx(UiTooltip, { triggerBy: ["hover", "focus"], anchor: _jsx(UiIconButton, { icon: "question", variant: "tertiary" }), content: intl.formatMessage({
|
|
15
12
|
id: "gd.gen-ai.global-error.details.title.tooltip",
|
|
16
|
-
}) })
|
|
17
|
-
] }), _jsx("div", { className: "gd-gen-ai-chat__global_error__details__content-description", children: errorDetails })
|
|
18
|
-
] })) : null, errorTraceId ? (_jsxs("div", { className: "gd-gen-ai-chat__global_error__trace-id", children: [
|
|
19
|
-
_jsxs("div", { children: [
|
|
20
|
-
_jsxs("span", { className: "gd-gen-ai-chat__global_error__trace-id-name", children: [intl.formatMessage({ id: "gd.gen-ai.global-error.traceId" }), ":"] }), " ", errorTraceId] }), _jsx(UiCopyButton, { label: intl.formatMessage({ id: "gd.gen-ai.global-error.traceId.copy" }), clipboardContent: errorTraceId ?? "" })
|
|
21
|
-
] })) : null] }));
|
|
13
|
+
}) })] }), _jsx("div", { className: "gd-gen-ai-chat__global_error__details__content-description", children: errorDetails })] })) : null, errorTraceId ? (_jsxs("div", { className: "gd-gen-ai-chat__global_error__trace-id", children: [_jsxs("div", { children: [_jsxs("span", { className: "gd-gen-ai-chat__global_error__trace-id-name", children: [intl.formatMessage({ id: "gd.gen-ai.global-error.traceId" }), ":"] }), " ", errorTraceId] }), _jsx(UiCopyButton, { label: intl.formatMessage({ id: "gd.gen-ai.global-error.traceId.copy" }), clipboardContent: errorTraceId ?? "" })] })) : null] }));
|
|
22
14
|
}
|
package/esm/components/Input.js
CHANGED
|
@@ -111,9 +111,7 @@ function InputComponent({ autofocus = false, canManage, canAnalyze, targetRef })
|
|
|
111
111
|
"gd-gen-ai-chat__input--empty": isEmpty,
|
|
112
112
|
"gd-gen-ai-chat__input--agent-switching": agentSwitchingEnabled,
|
|
113
113
|
"gd-gen-ai-chat__input--no-agents": hasNoAgents,
|
|
114
|
-
}), children: _jsxs("div", { className: "gd-gen-ai-chat__input__content", children: [
|
|
115
|
-
_jsx(HintText, { focused: focused, where: "top" }), _jsxs("div", { className: "gd-gen-ai-chat__input__container", children: [
|
|
116
|
-
_jsx("div", { className: "gd-gen-ai-chat__input__context", onMouseDown: handleContextMouseDown, children: _jsx(GenAIChatContextIndicator, { onUpdate: handleOnFocus }) }), _jsx("div", { ref: targetRef, onFocus: handleOnFocus }), _jsx("div", { className: "gd-gen-ai-chat__input__text", ...ref, children: _jsx(SyntaxHighlightingInput, { className: "gd-gen-ai-chat__input__mc", placeholder: intl.formatMessage(msgs.placeholder), label: isMac ? intl.formatMessage(msgs.labelMac) : intl.formatMessage(msgs.labelWin), value: value, autocompletion: {
|
|
114
|
+
}), children: _jsxs("div", { className: "gd-gen-ai-chat__input__content", children: [_jsx(HintText, { focused: focused, where: "top" }), _jsxs("div", { className: "gd-gen-ai-chat__input__container", children: [_jsx("div", { className: "gd-gen-ai-chat__input__context", onMouseDown: handleContextMouseDown, children: _jsx(GenAIChatContextIndicator, { onUpdate: handleOnFocus }) }), _jsx("div", { ref: targetRef, onFocus: handleOnFocus }), _jsx("div", { className: "gd-gen-ai-chat__input__text", ...ref, children: _jsx(SyntaxHighlightingInput, { className: "gd-gen-ai-chat__input__mc", placeholder: intl.formatMessage(msgs.placeholder), label: isMac ? intl.formatMessage(msgs.labelMac) : intl.formatMessage(msgs.labelWin), value: value, autocompletion: {
|
|
117
115
|
aboveCursor: true,
|
|
118
116
|
whenTyping: true,
|
|
119
117
|
whenTypingDelay: 300,
|
|
@@ -121,9 +119,7 @@ function InputComponent({ autofocus = false, canManage, canAnalyze, targetRef })
|
|
|
121
119
|
setFocused(true);
|
|
122
120
|
}, onBlur: () => {
|
|
123
121
|
setFocused(false);
|
|
124
|
-
}, onKeyDown: handleKeyDown, onCompletion: onCompletion }) }), _jsx(GenAiChatAgentSwitching, { disabled: buttonDisabled, isConversationsLoading: !conversationsLoaded, isAssistantLoading: isAssistantLoading, agentDropdownDisabled: agentDropdownDisabled, handleSubmit: handleSubmit, onMouseDown: handleActionsMouseDown, setBusy: setAreAgentsBusy, setNoAgents: setHasNoAgents, leftContent: _jsx(GenAiChatContextChooser, { onAddContext: handleOnFocus }) })
|
|
125
|
-
] }), _jsx(HintText, { focused: focused, where: "bottom" })
|
|
126
|
-
] }) }));
|
|
122
|
+
}, onKeyDown: handleKeyDown, onCompletion: onCompletion }) }), _jsx(GenAiChatAgentSwitching, { disabled: buttonDisabled, isConversationsLoading: !conversationsLoaded, isAssistantLoading: isAssistantLoading, agentDropdownDisabled: agentDropdownDisabled, handleSubmit: handleSubmit, onMouseDown: handleActionsMouseDown, setBusy: setAreAgentsBusy, setNoAgents: setHasNoAgents, leftContent: _jsx(GenAiChatContextChooser, { onAddContext: handleOnFocus }) })] }), _jsx(HintText, { focused: focused, where: "bottom" })] }) }));
|
|
127
123
|
}
|
|
128
124
|
export const Input = InputComponent;
|
|
129
125
|
function HintText({ where, focused }) {
|
|
@@ -3,9 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
4
|
import { isIdentifierRef, } from "@gooddata/sdk-model";
|
|
5
5
|
export function InfoComponent({ item, intl, canManage, canAnalyze, dataset, group, id, }) {
|
|
6
|
-
return (_jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info", children: [
|
|
7
|
-
_jsx("h3", { children: item.title }), item.description ? _jsx("p", { children: item.description }) : null, _jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info__item", children: [
|
|
8
|
-
_jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__title", children: intl.formatMessage({ id: "gd.gen-ai.autocomplete.type" }) }), _jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info__item__value", children: [item.type === "attribute"
|
|
6
|
+
return (_jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info", children: [_jsx("h3", { children: item.title }), item.description ? _jsx("p", { children: item.description }) : null, _jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info__item", children: [_jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__title", children: intl.formatMessage({ id: "gd.gen-ai.autocomplete.type" }) }), _jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info__item__value", children: [item.type === "attribute"
|
|
9
7
|
? intl.formatMessage({ id: "gd.gen-ai.autocomplete.attribute" })
|
|
10
8
|
: null, item.type === "fact" ? intl.formatMessage({ id: "gd.gen-ai.autocomplete.fact" }) : null, item.type === "measure"
|
|
11
9
|
? intl.formatMessage({ id: "gd.gen-ai.autocomplete.metric" })
|
|
@@ -17,14 +15,7 @@ export function InfoComponent({ item, intl, canManage, canAnalyze, dataset, grou
|
|
|
17
15
|
? intl.formatMessage({ id: "gd.gen-ai.autocomplete.analyticalDashboard" })
|
|
18
16
|
: null, item.type === "displayForm"
|
|
19
17
|
? intl.formatMessage({ id: "gd.gen-ai.autocomplete.displayForm" })
|
|
20
|
-
: null] })
|
|
21
|
-
] }), dataset ? (_jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info__item", children: [
|
|
22
|
-
_jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__title", children: intl.formatMessage({ id: "gd.gen-ai.autocomplete.dataset" }) }), _jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__value", children: dataset?.title })
|
|
23
|
-
] })) : null, group && isIdentifierRef(group) ? (_jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info__item", children: [
|
|
24
|
-
_jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__title", children: intl.formatMessage({ id: "gd.gen-ai.autocomplete.dataset" }) }), _jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__value", children: group?.identifier })
|
|
25
|
-
] })) : null, canManage || canAnalyze ? (_jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info__item", children: [
|
|
26
|
-
_jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__title", children: intl.formatMessage({ id: "gd.gen-ai.autocomplete.id" }) }), _jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__value", children: id })
|
|
27
|
-
] })) : null] }));
|
|
18
|
+
: null] })] }), dataset ? (_jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info__item", children: [_jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__title", children: intl.formatMessage({ id: "gd.gen-ai.autocomplete.dataset" }) }), _jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__value", children: dataset?.title })] })) : null, group && isIdentifierRef(group) ? (_jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info__item", children: [_jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__title", children: intl.formatMessage({ id: "gd.gen-ai.autocomplete.dataset" }) }), _jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__value", children: group?.identifier })] })) : null, canManage || canAnalyze ? (_jsxs("div", { className: "gd-gen-ai-chat__autocomplete__info__item", children: [_jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__title", children: intl.formatMessage({ id: "gd.gen-ai.autocomplete.id" }) }), _jsx("div", { className: "gd-gen-ai-chat__autocomplete__info__item__value", children: id })] })) : null] }));
|
|
28
19
|
}
|
|
29
20
|
export function getInfo(intl, id, item, { dataset, group, canManage, canAnalyze, }) {
|
|
30
21
|
return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rehype-references.d.ts","sourceRoot":"","sources":["../../../../src/components/completion/plugins/rehype-references.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK3D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"rehype-references.d.ts","sourceRoot":"","sources":["../../../../src/components/completion/plugins/rehype-references.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK3D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAEnD,IAAI,UA2ClC"}
|