@gooddata/sdk-ui-gen-ai 11.50.0-alpha.3 → 11.50.0-alpha.4

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 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-7-27
10
+ Date generated: 2026-7-30
11
11
 
12
- Revision ID: 8409fe979ded6f97ece873ef163dc792102e2b62
12
+ Revision ID: d888e6fac3deae0511e0a86bfb269a788f76f3e1
13
13
 
14
14
  ================================================================================
15
15
  ================================================================================
@@ -29285,4 +29285,4 @@ POSSIBILITY OF SUCH DAMAGE.
29285
29285
  --------------------------------------------------------------------------------
29286
29286
  --------------------------------------------------------------------------------
29287
29287
 
29288
- Report Generated by FOSSA on 2026-7-27
29288
+ Report Generated by FOSSA on 2026-7-30
@@ -1 +1 @@
1
- {"version":3,"file":"GenAIChatContextIndicator.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatContextIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAe,MAAM,OAAO,CAAC;AAc7C,KAAK,iCAAiC,GAAG;IACrC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AA2DF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,iCAAiC,CAG5C,CAAC"}
1
+ {"version":3,"file":"GenAIChatContextIndicator.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatContextIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAe,MAAM,OAAO,CAAC;AAc7C,KAAK,iCAAiC,GAAG;IACrC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AA4DF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,iCAAiC,CAG5C,CAAC"}
@@ -5,7 +5,7 @@ import { useIntl } from "react-intl";
5
5
  import { connect, useSelector } from "react-redux";
6
6
  import { UiChip } from "@gooddata/sdk-ui-kit";
7
7
  import { collectContextReferences } from "../context/collectContextReferences.js";
8
- import { userContextSelector } from "../store/chatWindow/chatWindowSelectors.js";
8
+ import { contextSetupEnabledSelector, userContextSelector } from "../store/chatWindow/chatWindowSelectors.js";
9
9
  import { removeContextReferenceAction } from "../store/chatWindow/chatWindowSlice.js";
10
10
  import { getIconByType } from "./utils/icons.js";
11
11
  /**
@@ -19,6 +19,7 @@ import { getIconByType } from "./utils/icons.js";
19
19
  function GenAIChatContextIndicatorCore({ removeContextReference, onDelete, }) {
20
20
  const intl = useIntl();
21
21
  const emptyReferenceLabel = intl.formatMessage({ id: "gd.gen-ai.context.untitled" });
22
+ const isContextSetupEnabled = useSelector(contextSetupEnabledSelector);
22
23
  const context = useSelector(userContextSelector);
23
24
  const references = collectContextReferences(context, emptyReferenceLabel);
24
25
  const onDeleteHandler = useCallback((reference) => {
@@ -27,7 +28,7 @@ function GenAIChatContextIndicatorCore({ removeContextReference, onDelete, }) {
27
28
  onDelete?.();
28
29
  };
29
30
  }, [removeContextReference, onDelete]);
30
- if (references.length === 0) {
31
+ if (!isContextSetupEnabled || references.length === 0) {
31
32
  return null;
32
33
  }
33
34
  return (_jsx("div", { className: "gd-gen-ai-chat__context-indicator", "aria-live": "polite", children: references.map((reference, index) => (_jsx(UiChip, { isDisabled: true, isDeletable: true, ...getIconByType(reference.type), label: reference.title, isExpandable: false, onDelete: onDeleteHandler(reference) }, index))) }));
@@ -15,6 +15,11 @@ export type GenAIChatDialogProps = Omit<GenAiStoreProps, "children"> & {
15
15
  returnFocusTo?: RefObject<HTMLElement | null> | string;
16
16
  onLinkClick?: (linkClickEvent: LinkHandlerEvent) => string | undefined;
17
17
  LandingScreenComponentProvider?: () => ComponentType;
18
+ /**
19
+ * Set to false while the host renders its own overlay above the chat, so that Escape aimed at
20
+ * that overlay does not also close the chat (see GenAIChatOverlayExternalProps.closeOnEscape).
21
+ */
22
+ closeOnEscape?: boolean;
18
23
  };
19
- 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, LandingScreenComponentProvider }: GenAIChatDialogProps): import("react/jsx-runtime").JSX.Element;
24
+ 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, LandingScreenComponentProvider, closeOnEscape }: GenAIChatDialogProps): import("react/jsx-runtime").JSX.Element;
20
25
  //# 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,aAAa,EAAE,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAC;AAcpG,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGnE,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IACnE,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;I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AAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC;IACvD,WAAW,CAAC,EAAE,CAAC,cAAc,EAAE,gBAAgB,KAAK,MAAM,GAAG,SAAS,CAAC;IACvE,8BAA8B,CAAC,EAAE,MAAM,aAAa,CAAC;IACrD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AASF,wBAAgB,eAAe,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAS,EACT,cAAc,EACd,gBAAuB,EACvB,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,SAAiB,EACjB,UAAkB,EAClB,cAAsB,EACtB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,8BAA8B,EAC9B,aAAa,EAChB,EAAE,oBAAoB,2CA6CtB"}
@@ -18,12 +18,12 @@ import { KeyDriverAnalysis } from "./KeyDriverAnalysis.js";
18
18
  const DEFAULT_CHAT_Z_INDEX = 3000;
19
19
  // - Must be more than DEFAULT_CHAT_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, LandingScreenComponentProvider, }) {
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, LandingScreenComponentProvider, 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, children: (genAIStore) => (_jsx(GenAIChatDialogContent, { genAIStore: genAIStore, backend: effectiveBackend, workspace: effectiveWorkspace, className: className, dialogPosition: dialogPosition, disabled: disabled, isOpen: isOpen, onOpen: onOpen, onClose: onClose, returnFocusTo: returnFocusTo, allowNativeLinks: allowNativeLinks, onLinkClick: onLinkClick, catalogItems: catalogItems, canManage: canManage, canAnalyze: canAnalyze, canFullControl: canFullControl, LandingScreenComponentProvider: LandingScreenComponentProvider })) }) }));
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, 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, LandingScreenComponentProvider: LandingScreenComponentProvider })) }) }));
25
25
  }
26
- function GenAIChatDialogContent({ genAIStore, backend, workspace, className, dialogPosition, disabled, isOpen, onOpen, onClose, returnFocusTo, onLinkClick, allowNativeLinks, catalogItems, canManage, canAnalyze, canFullControl, LandingScreenComponentProvider, }) {
26
+ function GenAIChatDialogContent({ genAIStore, backend, workspace, className, dialogPosition, disabled, isOpen, onOpen, onClose, returnFocusTo, onLinkClick, allowNativeLinks, catalogItems, canManage, canAnalyze, canFullControl, LandingScreenComponentProvider, closeOnEscape, }) {
27
27
  const open = useRef(onOpen);
28
28
  open.current = onOpen;
29
29
  const close = useRef(onClose);
@@ -63,6 +63,6 @@ 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, { landingScreenComponentProvider: LandingScreenComponentProvider, children: _jsx(GenAIChatOverlay, { className: className, dialogPosition: dialogPosition, returnFocusTo: returnFocusTo, onClose: onCloseHandler }) }) })) : null, _jsx(OverlayControllerProvider, { overlayController: kdaOverlayController, children: _jsx(KeyDriverAnalysis, {}) })
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, { landingScreenComponentProvider: LandingScreenComponentProvider, children: _jsx(GenAIChatOverlay, { className: className, dialogPosition: dialogPosition, returnFocusTo: returnFocusTo, closeOnEscape: closeOnEscape, onClose: onCloseHandler }) }) })) : null, _jsx(OverlayControllerProvider, { overlayController: kdaOverlayController, children: _jsx(KeyDriverAnalysis, {}) })
67
67
  ] }) }) }));
68
68
  }
@@ -14,6 +14,13 @@ export type GenAIChatOverlayExternalProps = {
14
14
  returnFocusTo?: RefObject<HTMLElement | null> | string;
15
15
  className?: string;
16
16
  dialogPosition?: "left" | "right";
17
+ /**
18
+ * Host-side gate for Escape-to-close, on top of the built-in guard that already keeps the
19
+ * chat open while it is visually covered by another overlay (see chatOverlayEscapeGuard).
20
+ * Set to false to suppress Escape-to-close entirely, e.g. while the host runs UI whose
21
+ * Escape handling must win even though it does not cover the chat window.
22
+ */
23
+ closeOnEscape?: boolean;
17
24
  onClose: () => void;
18
25
  };
19
26
  export type GenAIChatOverlayProps = GenAIChatOverlayExternalProps & GenAIChatOverlayDispatchProps & GenAIChatOverlayStateProps;
@@ -1 +1 @@
1
- {"version":3,"file":"GenAIChatOverlay.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAwB,MAAM,OAAO,CAAC;AAMtE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAQjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAQlF,MAAM,MAAM,6BAA6B,GAAG;IACxC,UAAU,EAAE,OAAO,gBAAgB,CAAC;IACpC,gBAAgB,EAAE,OAAO,4BAA4B,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACrC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AG,OAAO,CAAC;IAClC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,6BAA6B,GAC7D,6BAA6B,GAC7B,0BAA0B,CAAC;AAoG/B,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,6BAA6B,CAGnC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // (C) 2024-2026 GoodData Corporation
3
- import { useCallback, useMemo } from "react";
3
+ import { useCallback, useEffect, useMemo } from "react";
4
4
  import cx from "classnames";
5
5
  import { useIntl } from "react-intl";
6
6
  import { connect } from "react-redux";
@@ -8,11 +8,12 @@ import { Dialog } from "@gooddata/sdk-ui-kit";
8
8
  import { keyDriverAnalysisMinimizedSelector, keyDriverAnalysisSelector, } from "../store/chatWindow/chatWindowSelectors.js";
9
9
  import { setHistoryAction } from "../store/chatWindow/chatWindowSlice.js";
10
10
  import { setCurrentConversationAction } from "../store/messages/messagesSlice.js";
11
+ import { isChatWindowCovered } from "./chatOverlayEscapeGuard.js";
11
12
  import { GenAIChatConversations } from "./GenAIChatConversations.js";
12
13
  import { GenAIChatHeader } from "./GenAIChatHeader.js";
13
14
  import { GenAIChatWrapper } from "./GenAIChatWrapper.js";
14
15
  import { useFullscreenCheck } from "./hooks/useFullscreenCheck.js";
15
- function GenAIChatOverlayComponent({ onClose, returnFocusTo, setHistory, loadConversation, dialogPosition, keyDriverAnalysis, keyDriverAnalysisMinimized, className, }) {
16
+ function GenAIChatOverlayComponent({ onClose, returnFocusTo, setHistory, loadConversation, dialogPosition, keyDriverAnalysis, keyDriverAnalysisMinimized, className, closeOnEscape: closeOnEscapeProp = true, }) {
16
17
  const intl = useIntl();
17
18
  const { isFullscreen } = useFullscreenCheck();
18
19
  const classNames = cx("gd-gen-ai-chat__window", className, {
@@ -36,8 +37,25 @@ function GenAIChatOverlayComponent({ onClose, returnFocusTo, setHistory, loadCon
36
37
  }
37
38
  return "br br";
38
39
  }, [dialogPosition, isFullscreen]);
39
- const closeOnEscape = !keyDriverAnalysis || keyDriverAnalysisMinimized;
40
- return (_jsxs(Dialog, { isModal: isFullscreen, returnFocusTo: returnFocusTo, returnFocusAfterClose: !!returnFocusTo, alignPoints: [{ align: position }], closeOnEscape: closeOnEscape, submitOnEnterKey: false, closeOnParentScroll: false, closeOnMouseDrag: false, onClose: onClose, className: classNames, accessibilityConfig: {
40
+ const closeOnEscape = closeOnEscapeProp && (!keyDriverAnalysis || keyDriverAnalysisMinimized);
41
+ // Escape handling is ours, not the Dialog's: its closeOnEscape listens on window with no
42
+ // overlay stack awareness, so an Escape aimed at an overlay covering the chat (e.g.
43
+ // Dashboards' insight editing overlay) would close the chat with the very same press. Close
44
+ // only when the chat window is not covered — Escape then peels one layer per press, the
45
+ // covering layer closing itself through its own listener.
46
+ useEffect(() => {
47
+ if (!closeOnEscape) {
48
+ return undefined;
49
+ }
50
+ const onKeyDown = (e) => {
51
+ if (e.key === "Escape" && !isChatWindowCovered()) {
52
+ onClose();
53
+ }
54
+ };
55
+ window.addEventListener("keydown", onKeyDown);
56
+ return () => window.removeEventListener("keydown", onKeyDown);
57
+ }, [closeOnEscape, onClose]);
58
+ return (_jsxs(Dialog, { isModal: isFullscreen, returnFocusTo: returnFocusTo, returnFocusAfterClose: !!returnFocusTo, alignPoints: [{ align: position }], closeOnEscape: false, submitOnEnterKey: false, closeOnParentScroll: false, closeOnMouseDrag: false, onClose: onClose, className: classNames, accessibilityConfig: {
41
59
  title: intl.formatMessage({ id: "gd.gen-ai.dialog.label" }),
42
60
  isModal: isFullscreen,
43
61
  }, children: [
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Tells whether the chat window is visually covered by other UI (e.g. Dashboards' insight editing
3
+ * overlay opened over the chat).
4
+ *
5
+ * The chat handles Escape itself on window level with no overlay stack awareness, and the covering
6
+ * overlay may be rendered by a different application layer (host shell vs. dashboards remote), so
7
+ * neither props nor a shared overlay controller can carry the "something is above you" signal
8
+ * reliably. Hit-testing the chat window's center answers exactly the question that matters — what
9
+ * would the user's click land on — regardless of who rendered the covering layer and how its
10
+ * z-index came to be. When covered, Escape must be left to the covering layer; the chat may only
11
+ * close itself when it is on top.
12
+ */
13
+ export declare function isChatWindowCovered(doc?: Document): boolean;
14
+ //# sourceMappingURL=chatOverlayEscapeGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatOverlayEscapeGuard.d.ts","sourceRoot":"","sources":["../../src/components/chatOverlayEscapeGuard.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,QAAmB,GAAG,OAAO,CAQrE"}
@@ -0,0 +1,23 @@
1
+ // (C) 2026 GoodData Corporation
2
+ const CHAT_WINDOW_SELECTOR = ".gd-gen-ai-chat__window";
3
+ /**
4
+ * Tells whether the chat window is visually covered by other UI (e.g. Dashboards' insight editing
5
+ * overlay opened over the chat).
6
+ *
7
+ * The chat handles Escape itself on window level with no overlay stack awareness, and the covering
8
+ * overlay may be rendered by a different application layer (host shell vs. dashboards remote), so
9
+ * neither props nor a shared overlay controller can carry the "something is above you" signal
10
+ * reliably. Hit-testing the chat window's center answers exactly the question that matters — what
11
+ * would the user's click land on — regardless of who rendered the covering layer and how its
12
+ * z-index came to be. When covered, Escape must be left to the covering layer; the chat may only
13
+ * close itself when it is on top.
14
+ */
15
+ export function isChatWindowCovered(doc = document) {
16
+ const chatWindow = doc.querySelector(CHAT_WINDOW_SELECTOR);
17
+ if (!chatWindow) {
18
+ return false;
19
+ }
20
+ const rect = chatWindow.getBoundingClientRect();
21
+ const hit = doc.elementFromPoint(rect.left + rect.width / 2, rect.top + rect.height / 2);
22
+ return !!hit && !chatWindow.contains(hit);
23
+ }
@@ -9,6 +9,7 @@ export declare const colorPaletteSelector: (state: RootState) => IColorPalette |
9
9
  export declare const settingsSelector: (state: RootState) => IUserWorkspaceSettings | undefined;
10
10
  export declare const isPreviewSelector: (state: RootState) => boolean;
11
11
  export declare const agentSwitchingEnabledSelector: (state: RootState) => boolean;
12
+ export declare const contextSetupEnabledSelector: (state: RootState) => boolean;
12
13
  export declare const agentSwitchingActiveSelector: (state: RootState) => boolean;
13
14
  export declare const objectTypesSelector: (state: RootState) => GenAIObjectType[] | undefined;
14
15
  export declare const allowedRelationshipTypesSelector: (state: RootState) => IAllowedRelationshipType[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"chatWindowSelectors.d.ts","sourceRoot":"","sources":["../../../src/store/chatWindow/chatWindowSelectors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,eAAO,MAAM,cAAc,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGlD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGxD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGrD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,aAAa,GAAG,SAGxE,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,sBAAsB,GAAG,SAG7E,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGrD,CAAC;AAEF,eAAO,MAAM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AAK,WAAW,EAKnE,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,cAAc,GAAG,SAG9E,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,GAAG,SAGhF,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,iBAAiB,GAAG,SAG3E,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,iBAAiB,GAAG,SAG9E,CAAC"}
@@ -9,6 +9,7 @@ export const colorPaletteSelector = createSelector(chatWindowSliceSelector, (sta
9
9
  export const settingsSelector = createSelector(chatWindowSliceSelector, (state) => state.settings);
10
10
  export const isPreviewSelector = createSelector(chatWindowSliceSelector, (state) => state.isPreview === true);
11
11
  export const agentSwitchingEnabledSelector = createSelector(settingsSelector, (settings) => settings?.["enableGenAiAgentSwitching"] === true);
12
+ export const contextSetupEnabledSelector = createSelector(settingsSelector, (settings) => settings?.enableAiContextSetup === true);
12
13
  // Whether the agent switcher is usable in the current chat context. It is never usable in preview
13
14
  // mode: the assistant is pinned to the single preview agent being built, so the switcher stays
14
15
  // hidden and the legacy input is used.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-gen-ai",
3
- "version": "11.50.0-alpha.3",
3
+ "version": "11.50.0-alpha.4",
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.50.0-alpha.3",
61
- "@gooddata/sdk-backend-spi": "11.50.0-alpha.3",
62
- "@gooddata/sdk-model": "11.50.0-alpha.3",
63
- "@gooddata/sdk-ui-charts": "11.50.0-alpha.3",
64
- "@gooddata/sdk-ui": "11.50.0-alpha.3",
65
- "@gooddata/sdk-ui-kit": "11.50.0-alpha.3",
66
- "@gooddata/sdk-ui-filters": "11.50.0-alpha.3",
67
- "@gooddata/sdk-ui-dashboard": "11.50.0-alpha.3",
68
- "@gooddata/sdk-ui-pivot": "11.50.0-alpha.3",
69
- "@gooddata/sdk-ui-semantic-search": "11.50.0-alpha.3",
70
- "@gooddata/util": "11.50.0-alpha.3",
71
- "@gooddata/sdk-ui-theme-provider": "11.50.0-alpha.3"
60
+ "@gooddata/api-client-tiger": "11.50.0-alpha.4",
61
+ "@gooddata/sdk-backend-spi": "11.50.0-alpha.4",
62
+ "@gooddata/sdk-model": "11.50.0-alpha.4",
63
+ "@gooddata/sdk-ui": "11.50.0-alpha.4",
64
+ "@gooddata/sdk-ui-charts": "11.50.0-alpha.4",
65
+ "@gooddata/sdk-ui-dashboard": "11.50.0-alpha.4",
66
+ "@gooddata/sdk-ui-filters": "11.50.0-alpha.4",
67
+ "@gooddata/sdk-ui-kit": "11.50.0-alpha.4",
68
+ "@gooddata/sdk-ui-pivot": "11.50.0-alpha.4",
69
+ "@gooddata/sdk-ui-semantic-search": "11.50.0-alpha.4",
70
+ "@gooddata/sdk-ui-theme-provider": "11.50.0-alpha.4",
71
+ "@gooddata/util": "11.50.0-alpha.4"
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/eslint-config": "11.50.0-alpha.3",
115
- "@gooddata/i18n-toolkit": "11.50.0-alpha.3",
116
- "@gooddata/reference-workspace": "11.50.0-alpha.3",
117
- "@gooddata/oxlint-config": "11.50.0-alpha.3",
118
- "@gooddata/sdk-ui-theme-provider": "11.50.0-alpha.3",
119
- "@gooddata/stylelint-config": "11.50.0-alpha.3",
120
- "@gooddata/sdk-backend-mockingbird": "11.50.0-alpha.3"
114
+ "@gooddata/eslint-config": "11.50.0-alpha.4",
115
+ "@gooddata/i18n-toolkit": "11.50.0-alpha.4",
116
+ "@gooddata/oxlint-config": "11.50.0-alpha.4",
117
+ "@gooddata/reference-workspace": "11.50.0-alpha.4",
118
+ "@gooddata/sdk-backend-mockingbird": "11.50.0-alpha.4",
119
+ "@gooddata/sdk-ui-theme-provider": "11.50.0-alpha.4",
120
+ "@gooddata/stylelint-config": "11.50.0-alpha.4"
121
121
  },
122
122
  "peerDependencies": {
123
123
  "react": "^18.0.0 || ^19.0.0",