@gooddata/sdk-ui-gen-ai 11.53.0-alpha.2 → 11.53.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.
Files changed (127) hide show
  1. package/NOTICE +6 -6
  2. package/esm/components/GenAIChat.d.ts.map +1 -1
  3. package/esm/components/GenAIChat.js +2 -2
  4. package/esm/components/GenAIChatDialogConnected.d.ts +10 -1
  5. package/esm/components/GenAIChatDialogConnected.d.ts.map +1 -1
  6. package/esm/components/GenAIChatDialogConnected.js +2 -2
  7. package/esm/components/GenAiChatContextChooser.d.ts.map +1 -1
  8. package/esm/components/GenAiChatContextChooser.js +10 -4
  9. package/esm/components/GenAiChatContextChooserBody.d.ts +3 -1
  10. package/esm/components/GenAiChatContextChooserBody.d.ts.map +1 -1
  11. package/esm/components/GenAiChatContextChooserBody.js +9 -5
  12. package/esm/components/GenAiStore.d.ts +6 -1
  13. package/esm/components/GenAiStore.d.ts.map +1 -1
  14. package/esm/components/GenAiStore.js +2 -1
  15. package/esm/components/hooks/useContextItems.d.ts +6 -1
  16. package/esm/components/hooks/useContextItems.d.ts.map +1 -1
  17. package/esm/components/hooks/useContextItems.js +31 -5
  18. package/esm/components/intelligence/GenAiInteractionIntelligence.d.ts.map +1 -1
  19. package/esm/components/intelligence/GenAiInteractionIntelligence.js +3 -0
  20. package/esm/components/intelligence/data/deriveInteractionIntelligenceFromSteps.d.ts +3 -2
  21. package/esm/components/intelligence/data/deriveInteractionIntelligenceFromSteps.d.ts.map +1 -1
  22. package/esm/components/intelligence/data/deriveInteractionIntelligenceFromSteps.js +45 -11
  23. package/esm/components/intelligence/data/types.d.ts +1 -1
  24. package/esm/components/intelligence/panel/TimelineBar.d.ts +2 -1
  25. package/esm/components/intelligence/panel/TimelineBar.d.ts.map +1 -1
  26. package/esm/components/intelligence/panel/TimelineBar.js +7 -3
  27. package/esm/hooks/useGenAIStore.d.ts +2 -1
  28. package/esm/hooks/useGenAIStore.d.ts.map +1 -1
  29. package/esm/hooks/useGenAIStore.js +8 -2
  30. package/esm/localization/bundles/de-DE.localization-bundle.d.ts +63 -0
  31. package/esm/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
  32. package/esm/localization/bundles/de-DE.localization-bundle.js +63 -0
  33. package/esm/localization/bundles/en-AU.localization-bundle.d.ts +63 -0
  34. package/esm/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
  35. package/esm/localization/bundles/en-AU.localization-bundle.js +63 -0
  36. package/esm/localization/bundles/en-GB.localization-bundle.d.ts +63 -0
  37. package/esm/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
  38. package/esm/localization/bundles/en-GB.localization-bundle.js +63 -0
  39. package/esm/localization/bundles/es-419.localization-bundle.d.ts +63 -0
  40. package/esm/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
  41. package/esm/localization/bundles/es-419.localization-bundle.js +63 -0
  42. package/esm/localization/bundles/es-ES.localization-bundle.d.ts +63 -0
  43. package/esm/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
  44. package/esm/localization/bundles/es-ES.localization-bundle.js +63 -0
  45. package/esm/localization/bundles/fi-FI.localization-bundle.d.ts +63 -0
  46. package/esm/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
  47. package/esm/localization/bundles/fi-FI.localization-bundle.js +63 -0
  48. package/esm/localization/bundles/fr-CA.localization-bundle.d.ts +63 -0
  49. package/esm/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
  50. package/esm/localization/bundles/fr-CA.localization-bundle.js +63 -0
  51. package/esm/localization/bundles/fr-FR.localization-bundle.d.ts +63 -0
  52. package/esm/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
  53. package/esm/localization/bundles/fr-FR.localization-bundle.js +63 -0
  54. package/esm/localization/bundles/id-ID.localization-bundle.d.ts +63 -0
  55. package/esm/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
  56. package/esm/localization/bundles/id-ID.localization-bundle.js +63 -0
  57. package/esm/localization/bundles/it-IT.localization-bundle.d.ts +63 -0
  58. package/esm/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
  59. package/esm/localization/bundles/it-IT.localization-bundle.js +63 -0
  60. package/esm/localization/bundles/ja-JP.localization-bundle.d.ts +63 -0
  61. package/esm/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
  62. package/esm/localization/bundles/ja-JP.localization-bundle.js +63 -0
  63. package/esm/localization/bundles/ko-KR.localization-bundle.d.ts +63 -0
  64. package/esm/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
  65. package/esm/localization/bundles/ko-KR.localization-bundle.js +63 -0
  66. package/esm/localization/bundles/nl-NL.localization-bundle.d.ts +63 -0
  67. package/esm/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
  68. package/esm/localization/bundles/nl-NL.localization-bundle.js +63 -0
  69. package/esm/localization/bundles/pl-PL.localization-bundle.d.ts +63 -0
  70. package/esm/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
  71. package/esm/localization/bundles/pl-PL.localization-bundle.js +63 -0
  72. package/esm/localization/bundles/pt-BR.localization-bundle.d.ts +63 -0
  73. package/esm/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
  74. package/esm/localization/bundles/pt-BR.localization-bundle.js +63 -0
  75. package/esm/localization/bundles/pt-PT.localization-bundle.d.ts +63 -0
  76. package/esm/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
  77. package/esm/localization/bundles/pt-PT.localization-bundle.js +63 -0
  78. package/esm/localization/bundles/ru-RU.localization-bundle.d.ts +63 -0
  79. package/esm/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
  80. package/esm/localization/bundles/ru-RU.localization-bundle.js +63 -0
  81. package/esm/localization/bundles/sl-SI.localization-bundle.d.ts +63 -0
  82. package/esm/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
  83. package/esm/localization/bundles/sl-SI.localization-bundle.js +63 -0
  84. package/esm/localization/bundles/th-TH.localization-bundle.d.ts +63 -0
  85. package/esm/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
  86. package/esm/localization/bundles/th-TH.localization-bundle.js +63 -0
  87. package/esm/localization/bundles/tr-TR.localization-bundle.d.ts +63 -0
  88. package/esm/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
  89. package/esm/localization/bundles/tr-TR.localization-bundle.js +63 -0
  90. package/esm/localization/bundles/uk-UA.localization-bundle.d.ts +63 -0
  91. package/esm/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
  92. package/esm/localization/bundles/uk-UA.localization-bundle.js +63 -0
  93. package/esm/localization/bundles/vi-VN.localization-bundle.d.ts +63 -0
  94. package/esm/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
  95. package/esm/localization/bundles/vi-VN.localization-bundle.js +63 -0
  96. package/esm/localization/bundles/zh-HK.localization-bundle.d.ts +63 -0
  97. package/esm/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
  98. package/esm/localization/bundles/zh-HK.localization-bundle.js +63 -0
  99. package/esm/localization/bundles/zh-Hans.localization-bundle.d.ts +63 -0
  100. package/esm/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
  101. package/esm/localization/bundles/zh-Hans.localization-bundle.js +63 -0
  102. package/esm/localization/bundles/zh-Hant.localization-bundle.d.ts +63 -0
  103. package/esm/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
  104. package/esm/localization/bundles/zh-Hant.localization-bundle.js +63 -0
  105. package/esm/sdk-ui-gen-ai.d.ts +6 -0
  106. package/esm/store/chatWindow/chatWindowSelectors.d.ts +2 -0
  107. package/esm/store/chatWindow/chatWindowSelectors.d.ts.map +1 -1
  108. package/esm/store/chatWindow/chatWindowSelectors.js +1 -0
  109. package/esm/store/chatWindow/chatWindowSlice.d.ts +12 -3
  110. package/esm/store/chatWindow/chatWindowSlice.d.ts.map +1 -1
  111. package/esm/store/chatWindow/chatWindowSlice.js +48 -1
  112. package/esm/store/options.d.ts +4 -1
  113. package/esm/store/options.d.ts.map +1 -1
  114. package/esm/store/options.js +7 -0
  115. package/esm/store/sideEffects/index.d.ts.map +1 -1
  116. package/esm/store/sideEffects/index.js +6 -2
  117. package/esm/store/sideEffects/loadContextDashboards.d.ts +12 -0
  118. package/esm/store/sideEffects/loadContextDashboards.d.ts.map +1 -0
  119. package/esm/store/sideEffects/loadContextDashboards.js +57 -0
  120. package/esm/types.d.ts +19 -0
  121. package/esm/types.d.ts.map +1 -1
  122. package/package.json +20 -20
  123. package/styles/css/intelligence.css +4 -4
  124. package/styles/css/intelligence.css.map +1 -1
  125. package/styles/css/main.css +4 -4
  126. package/styles/css/main.css.map +1 -1
  127. package/styles/scss/intelligence.scss +8 -4
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-8-13
10
+ Date generated: 2026-8-17
11
11
 
12
- Revision ID: 03b276147864f291b2ed2694a19ccbfa1d69ce6b
12
+ Revision ID: a87db0e8382a288c7d652219ae8787851fb066a3
13
13
 
14
14
  ================================================================================
15
15
  ================================================================================
@@ -375,7 +375,7 @@ Revision ID: 03b276147864f291b2ed2694a19ccbfa1d69ce6b
375
375
  - balanced-match (2.0.0) [MIT]
376
376
  - balanced-match (4.0.4) [MIT]
377
377
  - base64-js (1.5.1) [MIT]
378
- - baseline-browser-mapping (2.11.13) [Apache-2.0]
378
+ - baseline-browser-mapping (2.11.14) [Apache-2.0]
379
379
  - batch (0.6.1) [MIT]
380
380
  - binary-extensions (2.3.0) [MIT]
381
381
  - bl (4.1.0) [MIT]
@@ -5303,9 +5303,9 @@ MIT
5303
5303
 
5304
5304
 
5305
5305
  --------------------------------------------------------------------------------
5306
- Package Title: baseline-browser-mapping (2.11.13)
5306
+ Package Title: baseline-browser-mapping (2.11.14)
5307
5307
 
5308
- Package Locator: npm+baseline-browser-mapping$2.11.13
5308
+ Package Locator: npm+baseline-browser-mapping$2.11.14
5309
5309
 
5310
5310
  Package Depth: Transitive
5311
5311
  --------------------------------------------------------------------------------
@@ -29407,4 +29407,4 @@ POSSIBILITY OF SUCH DAMAGE.
29407
29407
  --------------------------------------------------------------------------------
29408
29408
  --------------------------------------------------------------------------------
29409
29409
 
29410
- Report Generated by FOSSA on 2026-8-13
29410
+ Report Generated by FOSSA on 2026-8-17
@@ -1 +1 @@
1
- {"version":3,"file":"GenAIChat.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAQ3C,OAAO,EAEH,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAExB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IAClE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,cAAc,EAAE,gBAAgB,KAAK,MAAM,GAAG,SAAS,CAAC;IAEvE;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,8BAA8B,CAAC,EAAE,MAAM,aAAa,CAAC;IAErD;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,IAAI,CAA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kB,CAAC;IAE1B;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAuDxD;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,uBAAiB,CAAC"}
@@ -12,10 +12,10 @@ import { GenAiStore } from "./GenAiStore.js";
12
12
  * @public
13
13
  */
14
14
  export function GenAIAssistant(props) {
15
- const { backend, workspace, locale, colorPalette, eventHandlers, settings, objectTypes, catalogItems, includeTags, excludeTags, isPreview, allowInteractionIntelligence, providedStore, onDispatcher, onLinkClick, mode, allowNativeLinks, } = props;
15
+ const { backend, workspace, locale, colorPalette, eventHandlers, settings, objectTypes, catalogItems, dashboards, includeTags, excludeTags, isPreview, allowInteractionIntelligence, providedStore, onDispatcher, onLinkClick, mode, allowNativeLinks, } = props;
16
16
  const effectiveBackend = useBackendStrict(backend);
17
17
  const effectiveWorkspace = useWorkspaceStrict(workspace);
18
- return (_jsx(IntlWrapper, { locale: locale, children: _jsx(GenAiStore, { backend: effectiveBackend, workspace: effectiveWorkspace, onDispatcher: onDispatcher, colorPalette: colorPalette, mode: mode, eventHandlers: eventHandlers, allowNativeLinks: allowNativeLinks, onLinkClick: onLinkClick, settings: settings, objectTypes: objectTypes, includeTags: includeTags, excludeTags: excludeTags, catalogItems: catalogItems, isPreview: isPreview, allowInteractionIntelligence: allowInteractionIntelligence, providedStore: providedStore, children: _jsx(BackendProvider, { backend: effectiveBackend, children: _jsx(WorkspaceProvider, { workspace: effectiveWorkspace, children: _jsx(PermissionsProvider, { children: _jsx(GenAIContent, { ...props }) }) }) }) }) }));
18
+ return (_jsx(IntlWrapper, { locale: locale, children: _jsx(GenAiStore, { backend: effectiveBackend, workspace: effectiveWorkspace, onDispatcher: onDispatcher, colorPalette: colorPalette, mode: mode, eventHandlers: eventHandlers, allowNativeLinks: allowNativeLinks, onLinkClick: onLinkClick, settings: settings, objectTypes: objectTypes, includeTags: includeTags, excludeTags: excludeTags, catalogItems: catalogItems, dashboards: dashboards, isPreview: isPreview, allowInteractionIntelligence: allowInteractionIntelligence, providedStore: providedStore, children: _jsx(BackendProvider, { backend: effectiveBackend, children: _jsx(WorkspaceProvider, { workspace: effectiveWorkspace, children: _jsx(PermissionsProvider, { children: _jsx(GenAIContent, { ...props }) }) }) }) }) }));
19
19
  }
20
20
  /**
21
21
  * UI component that renders the Gen AI chat.
@@ -64,6 +64,15 @@ export interface IGenAIChatDialogConnectedProps {
64
64
  settings?: IUserWorkspaceSettings;
65
65
  /** Open-state is fully controlled by the caller (props, not redux). */
66
66
  isOpen: boolean;
67
+ /**
68
+ * Whether the Gen AI chat dialog is disabled.
69
+ *
70
+ * @remarks
71
+ * Defaults to true. The shell application is expected to explicitly enable the dialog by setting this to false.
72
+ * This default prevents the dialog from briefly appearing (blinking) before the application state is fully
73
+ * initialized.
74
+ */
75
+ isDisabled?: boolean;
67
76
  onOpen: () => void;
68
77
  onClose: () => void;
69
78
  /** A question to seed into the chat when it opens. */
@@ -120,5 +129,5 @@ export interface IGenAIChatDialogConnectedProps {
120
129
  *
121
130
  * @internal
122
131
  */
123
- export declare function GenAIChatDialogConnected({ backend, workspace, locale, canManage, canAnalyze, canFullControl, settings, agentId, isOpen, onOpen, onClose, askedQuestion, askSeq, userContext, ambientUserContext, appendToChat, replaceUserContext, includeTags, excludeTags, objectTypes: objectTypesOverride, onEvent, onAnyEvent, dialogPosition, className, colorPalette, allowNativeLinks, onLinkClick, returnFocusTo }: IGenAIChatDialogConnectedProps): import("react/jsx-runtime").JSX.Element;
132
+ export declare function GenAIChatDialogConnected({ backend, workspace, locale, canManage, canAnalyze, canFullControl, settings, agentId, isOpen, isDisabled, onOpen, onClose, askedQuestion, askSeq, userContext, ambientUserContext, appendToChat, replaceUserContext, includeTags, excludeTags, objectTypes: objectTypesOverride, onEvent, onAnyEvent, dialogPosition, className, colorPalette, allowNativeLinks, onLinkClick, returnFocusTo }: IGenAIChatDialogConnectedProps): import("react/jsx-runtime").JSX.Element;
124
133
  //# 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;AAG3D;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAC7B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,cAAc,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,OAAO,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C,EAAE,MAAM,EAAE,CAAC;IACvB,wGAAwG;IACxG,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAEhC,wEAAwE;IACxE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACnD,sFAAsF;IACtF,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAExC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,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,MAAM,EACN,OAAO,EACP,aAAa,EACb,MAAM,EACN,WAAW,EACX,kBAAkB,EAClB,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,2CAsKhC"}
@@ -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, onOpen, onClose, askedQuestion, askSeq, userContext, ambientUserContext, 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, onOpen, onClose, askedQuestion, askSeq, userContext, ambientUserContext, 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") {
@@ -147,5 +147,5 @@ export function GenAIChatDialogConnected({ backend, workspace, locale, canManage
147
147
  settings,
148
148
  replaceUserContext,
149
149
  ]);
150
- return (_jsx(GenAIChatDialog, { isOpen: isOpen, 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 }));
150
+ 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 }));
151
151
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GenAiChatContextChooser.d.ts","sourceRoot":"","sources":["../../src/components/GenAiChatContextChooser.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAWvD,KAAK,+BAA+B,GAAG;IACnC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACzD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,EAAE,YAAY,EAAE,EAAE,+BAA+B,kDAoDxF"}
1
+ {"version":3,"file":"GenAiChatContextChooser.d.ts","sourceRoot":"","sources":["../../src/components/GenAiChatContextChooser.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAWvD,KAAK,+BAA+B,GAAG;IACnC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACzD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,EAAE,YAAY,EAAE,EAAE,+BAA+B,kDAiExF"}
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  // (C) 2026 GoodData Corporation
3
+ import { useCallback } from "react";
3
4
  import { defineMessages, useIntl } from "react-intl";
4
5
  import { useDispatch, useSelector } from "react-redux";
5
6
  import { Dropdown, UiIconButton, useIdPrefixed } from "@gooddata/sdk-ui-kit";
6
7
  import { ambientContextSelector, userContextSelector } from "../store/chatWindow/chatWindowSelectors.js";
7
- import { addContextReferenceAction } from "../store/chatWindow/chatWindowSlice.js";
8
+ import { addContextReferenceAction, initContextDashboardsAction, } from "../store/chatWindow/chatWindowSlice.js";
8
9
  import { GenAiChatContextChooserBody } from "./GenAiChatContextChooserBody.js";
9
10
  import { useContextItems } from "./hooks/useContextItems.js";
10
11
  const msgs = defineMessages({
@@ -18,15 +19,20 @@ export function GenAiChatContextChooser({ onAddContext }) {
18
19
  const titleId = useIdPrefixed("context-chooser-title");
19
20
  const ambient = useSelector((state) => ambientContextSelector(state));
20
21
  const active = useSelector((state) => userContextSelector(state));
21
- const inputItems = useContextItems(ambient, active);
22
+ const { items: inputItems, isLoading, hasNextPage, loadNextPage } = useContextItems(ambient, active);
22
23
  const addContextLabel = intl.formatMessage(msgs.add);
24
+ const onOpenStateChanged = useCallback((isOpen) => {
25
+ if (isOpen) {
26
+ dispatch(initContextDashboardsAction());
27
+ }
28
+ }, [dispatch]);
23
29
  if (!ambient) {
24
30
  return null;
25
31
  }
26
- return (_jsx("div", { className: "gd-gen-ai-chat__input__context", children: _jsx(Dropdown, { alignPoints: [{ align: "tl bl", offset: { x: 0, y: 0 } }], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, accessibilityConfig: {}, renderButton: ({ isOpen, toggleDropdown, accessibilityConfig }) => (_jsx(UiIconButton, { icon: "plus", variant: "tertiary", size: "small", dataTestId: "choose_context", isActive: isOpen, accessibilityConfig: {
32
+ return (_jsx("div", { className: "gd-gen-ai-chat__input__context", children: _jsx(Dropdown, { alignPoints: [{ align: "tl bl", offset: { x: 0, y: 0 } }], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, accessibilityConfig: {}, onOpenStateChanged: onOpenStateChanged, renderButton: ({ isOpen, toggleDropdown, accessibilityConfig }) => (_jsx(UiIconButton, { icon: "plus", variant: "tertiary", size: "small", dataTestId: "choose_context", isActive: isOpen, accessibilityConfig: {
27
33
  ...accessibilityConfig,
28
34
  ariaLabel: addContextLabel,
29
- }, onClick: toggleDropdown, isDisabled: !inputItems.length })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(GenAiChatContextChooserBody, { inputItems: inputItems, title: addContextLabel, titleId: titleId, ariaAttributes: ariaAttributes, closeDropdown: closeDropdown, onSelect: (item) => {
35
+ }, onClick: toggleDropdown, isDisabled: !inputItems.length && !hasNextPage && !isLoading })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(GenAiChatContextChooserBody, { inputItems: inputItems, title: addContextLabel, titleId: titleId, isLoading: isLoading, hasNextPage: hasNextPage, loadNextPage: loadNextPage, ariaAttributes: ariaAttributes, closeDropdown: closeDropdown, onSelect: (item) => {
30
36
  dispatch(addContextReferenceAction({ object: item }));
31
37
  onAddContext?.(item);
32
38
  } })) }) }));
@@ -4,6 +4,8 @@ type GenAiChatContextChooserBodyProps = {
4
4
  title: string;
5
5
  titleId: string;
6
6
  isLoading?: boolean;
7
+ hasNextPage?: boolean;
8
+ loadNextPage?: () => void;
7
9
  ariaAttributes: {
8
10
  id: string;
9
11
  role?: string;
@@ -12,6 +14,6 @@ type GenAiChatContextChooserBodyProps = {
12
14
  onSelect: (item: IGenAIContextObject) => void;
13
15
  closeDropdown: () => void;
14
16
  };
15
- export declare function GenAiChatContextChooserBody({ inputItems, title, titleId, isLoading, ariaAttributes, onSelect, closeDropdown }: GenAiChatContextChooserBodyProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function GenAiChatContextChooserBody({ inputItems, title, titleId, isLoading, hasNextPage, loadNextPage, ariaAttributes, onSelect, closeDropdown }: GenAiChatContextChooserBodyProps): import("react/jsx-runtime").JSX.Element;
16
18
  export {};
17
19
  //# sourceMappingURL=GenAiChatContextChooserBody.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenAiChatContextChooserBody.d.ts","sourceRoot":"","sources":["../../src/components/GenAiChatContextChooserBody.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA6BvD,KAAK,gCAAgC,GAAG;IACpC,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC9C,aAAa,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,EACxC,UAAU,EACV,KAAK,EACL,OAAO,EACP,SAAiB,EACjB,cAAc,EACd,QAAQ,EACR,aAAa,EAChB,EAAE,gCAAgC,2CA+HlC"}
1
+ {"version":3,"file":"GenAiChatContextChooserBody.d.ts","sourceRoot":"","sources":["../../src/components/GenAiChatContextChooserBody.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA6BvD,KAAK,gCAAgC,GAAG;IACpC,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,EAAE;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC9C,aAAa,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,EACxC,UAAU,EACV,KAAK,EACL,OAAO,EACP,SAAiB,EACjB,WAAmB,EACnB,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,aAAa,EAChB,EAAE,gCAAgC,2CAsIlC"}
@@ -28,11 +28,11 @@ const msgs = defineMessages({
28
28
  id: "gd.gen-ai.context.noDataAvailable",
29
29
  },
30
30
  });
31
- export function GenAiChatContextChooserBody({ inputItems, title, titleId, isLoading = false, ariaAttributes, onSelect, closeDropdown, }) {
31
+ export function GenAiChatContextChooserBody({ inputItems, title, titleId, isLoading = false, hasNextPage = false, loadNextPage, ariaAttributes, onSelect, closeDropdown, }) {
32
32
  const intl = useIntl();
33
33
  const listboxId = useId();
34
34
  const [searchString, setSearchString] = useState("");
35
- const isSearchFieldVisible = inputItems.length > SEARCH_FIELD_VISIBILITY_THRESHOLD && !isLoading;
35
+ const isSearchFieldVisible = inputItems.length > SEARCH_FIELD_VISIBILITY_THRESHOLD;
36
36
  const searchStringToUse = isSearchFieldVisible ? searchString : "";
37
37
  const normalizedSearch = searchStringToUse.trim().toLowerCase();
38
38
  const filteredItems = useMemo(() => {
@@ -57,7 +57,11 @@ export function GenAiChatContextChooserBody({ inputItems, title, titleId, isLoad
57
57
  closeDropdown();
58
58
  }
59
59
  }, [closeDropdown, searchFilled]);
60
- const listMaxHeight = Math.min(Math.max(filteredItems.length, 1), MAX_VISIBLE_ITEMS) * DEFAULT_ITEM_HEIGHT;
60
+ const canLoadNextPage = hasNextPage && normalizedSearch.length === 0;
61
+ const shouldShowPagedList = !hasNoData || canLoadNextPage;
62
+ const skeletonItemsCount = isLoading || (canLoadNextPage && filteredItems.length === 0) ? LOADING_SKELETON_ITEMS_COUNT : 0;
63
+ const visibleRowsCount = filteredItems.length + skeletonItemsCount;
64
+ const listMaxHeight = Math.min(Math.max(visibleRowsCount, 1), MAX_VISIBLE_ITEMS) * DEFAULT_ITEM_HEIGHT;
61
65
  return (_jsxs("div", { ...ariaAttributes, "aria-labelledby": titleId, className: "gd-gen-ai-chat__context-chooser", "data-testid": "context_chooser_menu", children: [
62
66
  _jsx(UiSubmenuHeader, { title: title, titleId: titleId, height: "medium", onClose: closeDropdown, closeAriaLabel: intl.formatMessage(msgs.close) }), isSearchFieldVisible ? (_jsxs(_Fragment, { children: [
63
67
  _jsx("div", { onKeyDown: (event) => {
@@ -70,10 +74,10 @@ export function GenAiChatContextChooserBody({ inputItems, title, titleId, isLoad
70
74
  } }) }), _jsx(UiSearchResultsAnnouncement, { totalResults: normalizedSearch ? filteredItems.length : undefined, resultValues: filteredItems.length <= DETAILED_ANNOUNCEMENT_THRESHOLD
71
75
  ? filteredItems.map((item) => item.title)
72
76
  : undefined })
73
- ] })) : null, hasNoData ? (_jsx(NoData, { hasNoMatchingData: hasNoMatchingData, notFoundLabel: intl.formatMessage(msgs.noMatchingData), noDataLabel: intl.formatMessage(msgs.noDataAvailable) })) : (_jsx(ScopedIdStore, { value: scopedIdStoreValue, children: _jsx(UiPagedVirtualList, { maxHeight: listMaxHeight, items: filteredItems, itemHeight: DEFAULT_ITEM_HEIGHT, itemsGap: 0, itemPadding: 0, skeletonItemsCount: isLoading ? LOADING_SKELETON_ITEMS_COUNT : 0, isLoading: isLoading, representAs: "listbox", closeDropdown: closeDropdown, onKeyDownConfirm: handleSelect, listboxProps: {
77
+ ] })) : null, shouldShowPagedList ? (_jsx(ScopedIdStore, { value: scopedIdStoreValue, children: _jsx(UiPagedVirtualList, { maxHeight: listMaxHeight, items: filteredItems, itemHeight: DEFAULT_ITEM_HEIGHT, itemsGap: 0, itemPadding: 0, skeletonItemsCount: skeletonItemsCount, isLoading: isLoading, hasNextPage: canLoadNextPage, loadNextPage: loadNextPage, representAs: "listbox", closeDropdown: closeDropdown, onKeyDownConfirm: handleSelect, listboxProps: {
74
78
  id: listboxId,
75
79
  "aria-label": intl.formatMessage(msgs.listAriaLabel),
76
- }, children: (item) => _jsx(ContextChooserItem, { item: item, onSelect: () => handleSelect(item) }) }) }))] }));
80
+ }, children: (item) => _jsx(ContextChooserItem, { item: item, onSelect: () => handleSelect(item) }) }) })) : (_jsx(NoData, { hasNoMatchingData: hasNoMatchingData, notFoundLabel: intl.formatMessage(msgs.noMatchingData), noDataLabel: intl.formatMessage(msgs.noDataAvailable) }))] }));
77
81
  }
78
82
  function ContextChooserItem({ item, onSelect }) {
79
83
  const icon = getIconByType(item.type);
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type EnhancedStore, type Store } from "@reduxjs/toolkit";
3
3
  import { type IAnalyticalBackend, type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi";
4
- import { type CatalogItem, type GenAIObjectType, type IColorPalette } from "@gooddata/sdk-model";
4
+ import { type CatalogItem, type GenAIObjectType, type IColorPalette, type IListedDashboard } from "@gooddata/sdk-model";
5
5
  import { type ChatEventHandler } from "../store/events.js";
6
6
  import { type GenAIAssistantMode, type LinkHandlerEvent } from "./ConfigContext.js";
7
7
  /**
@@ -25,6 +25,11 @@ export type GenAiStoreProps = {
25
25
  * Catalog items for autocomplete.
26
26
  */
27
27
  catalogItems?: CatalogItem[];
28
+ /**
29
+ * Dashboards offered by the context chooser. When provided, the list is taken as complete and
30
+ * no dashboards are loaded from the backend.
31
+ */
32
+ dashboards?: IListedDashboard[];
28
33
  /**
29
34
  * User settings to use for the chat UI.
30
35
  */
@@ -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,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKjG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,OAAO,EAAkB,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEpG;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B;;OAEG;IACH,OAAO,CAAC,EAA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AE,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"}
@@ -59,7 +59,7 @@ function InjectedStore({ onDispatcher, children, currentStore, }) {
59
59
  const content = typeof children === "function" ? children(currentStore) : children;
60
60
  return _jsx(StoreProvider, { store: currentStore, children: content });
61
61
  }
62
- function InternalStore({ backend, workspace, onDispatcher, children, eventHandlers, settings, catalogItems, includeTags, excludeTags, objectTypes, allowNativeLinks, onLinkClick, mode, isPreview, allowInteractionIntelligence, colorPalette, }) {
62
+ function InternalStore({ backend, workspace, onDispatcher, children, eventHandlers, settings, catalogItems, dashboards, includeTags, excludeTags, objectTypes, allowNativeLinks, onLinkClick, mode, isPreview, allowInteractionIntelligence, colorPalette, }) {
63
63
  const effectiveBackend = useBackendStrict(backend);
64
64
  const effectiveWorkspace = useWorkspaceStrict(workspace);
65
65
  const genAIStore = useGenAIStore(effectiveBackend, effectiveWorkspace, {
@@ -70,6 +70,7 @@ function InternalStore({ backend, workspace, onDispatcher, children, eventHandle
70
70
  includeTags,
71
71
  excludeTags,
72
72
  catalogItems,
73
+ dashboards,
73
74
  isPreview,
74
75
  allowInteractionIntelligence,
75
76
  allowNativeLinks,
@@ -1,4 +1,9 @@
1
1
  import { type IGenAIUserContext } from "@gooddata/sdk-model";
2
2
  import { type IGenAIContextObject } from "../../types.js";
3
- export declare function useContextItems(ambient: IGenAIUserContext | undefined, active: IGenAIUserContext | undefined): IGenAIContextObject[];
3
+ export declare function useContextItems(ambient: IGenAIUserContext | undefined, active: IGenAIUserContext | undefined): {
4
+ items: IGenAIContextObject[];
5
+ isLoading: boolean;
6
+ hasNextPage: boolean;
7
+ loadNextPage: () => void;
8
+ };
4
9
  //# sourceMappingURL=useContextItems.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useContextItems.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useContextItems.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAM7D,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,wBAAgB,eAAe,CAC3B,OAAO,EAAE,iBAAiB,GAAG,SAAS,EACtC,MAAM,EAAE,iBAAiB,GAAG,SAAS,GACtC,mBAAmB,EAAE,CAgBvB"}
1
+ {"version":3,"file":"useContextItems.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useContextItems.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,qBAAqB,CAAC;AAQ9E,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,wBAAgB,eAAe,CAC3B,OAAO,EAAE,iBAAiB,GAAG,SAAS,EACtC,MAAM,EAAE,iBAAiB,GAAG,SAAS;;;;;EA4CxC"}
@@ -1,13 +1,39 @@
1
1
  // (C) 2026 GoodData Corporation
2
- import { useMemo } from "react";
2
+ import { useCallback, useMemo } from "react";
3
3
  import { useIntl } from "react-intl";
4
+ import { useDispatch, useSelector } from "react-redux";
5
+ import { serializeObjRef } from "@gooddata/sdk-model";
4
6
  import { collectAvailableReferences, collectContextReferences, } from "../../context/collectContextReferences.js";
7
+ import { contextDashboardsSelector } from "../../store/chatWindow/chatWindowSelectors.js";
8
+ import { loadContextDashboardsNextPageAction } from "../../store/chatWindow/chatWindowSlice.js";
5
9
  export function useContextItems(ambient, active) {
6
10
  const intl = useIntl();
11
+ const dispatch = useDispatch();
7
12
  const emptyReferenceLabel = intl.formatMessage({ id: "gd.gen-ai.context.untitled" });
8
- return useMemo(() => {
9
- const currentReferences = collectAvailableReferences(ambient, emptyReferenceLabel);
13
+ const dashboards = useSelector(contextDashboardsSelector);
14
+ const items = useMemo(() => {
15
+ const ambientReferences = collectAvailableReferences(ambient, emptyReferenceLabel);
10
16
  const selectedReferences = collectContextReferences(active, emptyReferenceLabel);
11
- return currentReferences.filter((reference) => !selectedReferences.some((selectedReference) => selectedReference.id === reference.id && selectedReference.type === reference.type));
12
- }, [active, ambient, emptyReferenceLabel]);
17
+ const offered = new Set(ambientReferences.map((reference) => serializeObjRef(reference.ref)));
18
+ const dashboardReferences = dashboards.items
19
+ .filter((dashboard) => !offered.has(serializeObjRef(dashboard.ref)))
20
+ .map((dashboard) => ({
21
+ id: dashboard.id,
22
+ ref: dashboard.ref,
23
+ type: "dashboard",
24
+ where: "referencedObjects",
25
+ title: dashboard.title || emptyReferenceLabel || dashboard.id,
26
+ nesting: 1,
27
+ }));
28
+ return [...ambientReferences, ...dashboardReferences].filter((reference) => !selectedReferences.some((selectedReference) => selectedReference.id === reference.id && selectedReference.type === reference.type));
29
+ }, [active, ambient, dashboards.items, emptyReferenceLabel]);
30
+ const loadNextPage = useCallback(() => {
31
+ dispatch(loadContextDashboardsNextPageAction());
32
+ }, [dispatch]);
33
+ return {
34
+ items,
35
+ isLoading: dashboards.isLoading,
36
+ hasNextPage: dashboards.hasNextPage,
37
+ loadNextPage,
38
+ };
13
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GenAiInteractionIntelligence.d.ts","sourceRoot":"","sources":["../../../src/components/intelligence/GenAiInteractionIntelligence.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAwB,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AASzF;;;GAGG;AACH,MAAM,WAAW,kCAAkC;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAC1C,+FAA+F;IAC/F,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,EACzC,UAAU,EACV,OAAO,EACP,WAAoB,EACpB,eAAe,EAClB,EAAE,kCAAkC,kDAmEpC"}
1
+ {"version":3,"file":"GenAiInteractionIntelligence.d.ts","sourceRoot":"","sources":["../../../src/components/intelligence/GenAiInteractionIntelligence.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAwB,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AASzF;;;GAGG;AACH,MAAM,WAAW,kCAAkC;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAC1C,+FAA+F;IAC/F,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,EACzC,UAAU,EACV,OAAO,EACP,WAAoB,EACpB,eAAe,EAClB,EAAE,kCAAkC,kDAsEpC"}
@@ -33,6 +33,9 @@ export function GenAiInteractionIntelligence({ responseId, onClose, initialMode
33
33
  : { mode: "list", categoryIndex: 0 });
34
34
  const openCategory = useCallback((categoryIndex) => {
35
35
  setView({ mode: "detail", categoryIndex });
36
+ // Clicking a row unmounts the list, so its `mouseleave` never fires — the hover would
37
+ // otherwise still be highlighting that row's tiles on the way back.
38
+ setHoveredStepIndexes(undefined);
36
39
  }, []);
37
40
  const backToList = useCallback(() => setView({ mode: "list", categoryIndex: 0 }), []);
38
41
  const hasData = !!data;
@@ -10,8 +10,9 @@ import type { IInteractionIntelligence, IInteractionIntelligenceTotals } from ".
10
10
  * though its step keeps its time regardless.
11
11
  *
12
12
  * A tile's `index` is its array position, not the backend's `stepIndex` — it is the highlight key.
13
- * A category can also come from a detail that belongs to the response rather than a step, which
14
- * yields a row with no `stepIndexes` and so nothing to highlight.
13
+ * The memory applied to the turn runs before the backend's first step and has none of its own, so
14
+ * it becomes the turn's first step here when it reports a duration, shifting the rest one place
15
+ * along; without one it still gets a category row, with no tile to highlight.
15
16
  * @internal
16
17
  */
17
18
  export declare function deriveInteractionIntelligenceFromSteps(responseId: string, trace: IChatConversationResponseTrace): IInteractionIntelligence;
@@ -1 +1 @@
1
- {"version":3,"file":"deriveInteractionIntelligenceFromSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/intelligence/data/deriveInteractionIntelligenceFromSteps.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAIxE,OAAO,KAAK,EAIR,wBAAwB,EACxB,8BAA8B,EAEjC,MAAM,YAAY,CAAC;AAqBpB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sCAAsC,CAClD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,8BAA8B,GACtC,wBAAwB,CAgE1B;AAED;;;;;GAKG;AACH,wBAAgB,mCAAmC,CAC/C,KAAK,EAAE,8BAA8B,GACtC,8BAA8B,CAYhC"}
1
+ {"version":3,"file":"deriveInteractionIntelligenceFromSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/intelligence/data/deriveInteractionIntelligenceFromSteps.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAIxE,OAAO,KAAK,EAIR,wBAAwB,EACxB,8BAA8B,EAEjC,MAAM,YAAY,CAAC;AAuCpB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sCAAsC,CAClD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,8BAA8B,GACtC,wBAAwB,CAmF1B;AAED;;;;;GAKG;AACH,wBAAgB,mCAAmC,CAC/C,KAAK,EAAE,8BAA8B,GACtC,8BAA8B,CAgBhC"}
@@ -14,6 +14,18 @@ const CATEGORY_LABEL_MESSAGES = defineMessages({
14
14
  metricQuery: { id: "gd.gen-ai.interactionIntelligence.category.metricQuery" },
15
15
  composeAnswer: { id: "gd.gen-ai.interactionIntelligence.category.composeAnswer" },
16
16
  });
17
+ /** `stepId` of the memory step. The backend records none for it, so this collides with no real one. */
18
+ const MEMORY_STEP_ID = "memory";
19
+ /** The details of the work done before the first step — the memory applied to the turn. */
20
+ function preStepDetails(trace) {
21
+ return (trace.responseDetails ?? [])
22
+ .map(({ detail }) => detail)
23
+ .filter((detail) => !!detail);
24
+ }
25
+ /** How long that work took, and so the width of its step. 0 when it reported no duration. */
26
+ function preStepDurationMs(trace) {
27
+ return preStepDetails(trace).reduce((sum, detail) => sum + (detail.category === "applyMemory" ? (detail.durationMs ?? 0) : 0), 0);
28
+ }
17
29
  /**
18
30
  * Builds the render model for one response: a step carries timing/token spend but no category,
19
31
  * the actions within it carry a category but no timing, and the two are joined here.
@@ -24,24 +36,32 @@ const CATEGORY_LABEL_MESSAGES = defineMessages({
24
36
  * though its step keeps its time regardless.
25
37
  *
26
38
  * A tile's `index` is its array position, not the backend's `stepIndex` — it is the highlight key.
27
- * A category can also come from a detail that belongs to the response rather than a step, which
28
- * yields a row with no `stepIndexes` and so nothing to highlight.
39
+ * The memory applied to the turn runs before the backend's first step and has none of its own, so
40
+ * it becomes the turn's first step here when it reports a duration, shifting the rest one place
41
+ * along; without one it still gets a category row, with no tile to highlight.
29
42
  * @internal
30
43
  */
31
44
  export function deriveInteractionIntelligenceFromSteps(responseId, trace) {
32
45
  const sorted = [...trace.steps].sort((a, b) => a.stepIndex - b.stepIndex);
33
46
  const byCategory = new Map();
34
- // Seeded first, so a response-scoped category sorts above the steps' ownit happened before
35
- // them. Its `stepIndexes` stay empty: there is no tile it ran in.
36
- for (const { detail } of trace.responseDetails ?? []) {
37
- if (!detail) {
38
- continue;
39
- }
47
+ // Seeded first, since this happened before the first stepits category sorts above theirs.
48
+ // A duration turns it into the turn's own first step, shifting the rest one place along.
49
+ const memoryDetails = preStepDetails(trace);
50
+ const memoryDuration = preStepDurationMs(trace);
51
+ const hasMemoryStep = memoryDuration > 0;
52
+ const firstStepIndex = hasMemoryStep ? 1 : 0;
53
+ for (const detail of memoryDetails) {
40
54
  const entry = byCategory.get(detail.category) ?? { stepIndexes: [], details: [] };
41
55
  byCategory.set(detail.category, entry);
56
+ // Only memory earns the step: another category running outside the steps would not have
57
+ // spent its time, so it keeps a row with nothing to highlight.
58
+ if (hasMemoryStep && detail.category === "applyMemory" && entry.stepIndexes.length === 0) {
59
+ entry.stepIndexes.push(0);
60
+ }
42
61
  entry.details.push(detail);
43
62
  }
44
- const steps = sorted.map((step, index) => {
63
+ const steps = sorted.map((step, position) => {
64
+ const index = position + firstStepIndex;
45
65
  const actions = trace.detailsByStepId[step.stepId] ?? [];
46
66
  const categoriesInStep = [];
47
67
  for (const { detail } of actions) {
@@ -67,6 +87,16 @@ export function deriveInteractionIntelligenceFromSteps(responseId, trace) {
67
87
  categories: categoriesInStep,
68
88
  };
69
89
  });
90
+ if (hasMemoryStep) {
91
+ // No tokens: the retrieval spends none, and a 0 would render as spend rather than absence.
92
+ steps.unshift({
93
+ stepId: MEMORY_STEP_ID,
94
+ index: 0,
95
+ durationMs: memoryDuration,
96
+ // Only memory ran in this step, whatever else arrived without one.
97
+ categories: ["applyMemory"],
98
+ });
99
+ }
70
100
  // Map insertion order already reflects each category's earliest step, since steps are
71
101
  // walked in order above.
72
102
  const categories = Array.from(byCategory.entries()).map(([category, entry]) => ({
@@ -94,9 +124,13 @@ export function deriveInteractionIntelligenceFromSteps(responseId, trace) {
94
124
  */
95
125
  export function deriveInteractionIntelligenceTotals(trace) {
96
126
  const reported = trace.steps.filter((step) => step.tokens.total !== undefined);
127
+ // The memory step is a step of the turn like any other, so it counts here too — otherwise the
128
+ // timeline would show a tile the totals deny.
129
+ const memoryDuration = preStepDurationMs(trace);
130
+ const memorySteps = memoryDuration > 0 ? 1 : 0;
97
131
  return {
98
- stepsCount: trace.steps.length,
99
- durationMs: trace.steps.reduce((sum, step) => sum + step.durationMs, 0),
132
+ stepsCount: trace.steps.length + memorySteps,
133
+ durationMs: trace.steps.reduce((sum, step) => sum + step.durationMs, memoryDuration),
100
134
  // Left undefined when no step reported a token total, so "unknown" never renders as "0".
101
135
  tokens: reported.length === 0
102
136
  ? undefined
@@ -110,7 +110,7 @@ export interface IInteractionCategory {
110
110
  labelId?: string;
111
111
  /**
112
112
  * Indexes into {@link IInteractionIntelligence.steps} where this category occurred. Empty for
113
- * a category that belongs to the response rather than any step, which highlights nothing.
113
+ * a category that ran outside any step and reported no duration, which highlights nothing.
114
114
  */
115
115
  stepIndexes: number[];
116
116
  /** The list row's right-hand summary. Absent renders no excerpt. */
@@ -13,7 +13,8 @@ export interface ITimelineBarProps {
13
13
  * order. Purely informational — a tile is never clickable, only hoverable when `renderTooltip`
14
14
  * is given. Tiles in `highlightedStepIndexes` render highlighted; every other tile dims once
15
15
  * that list is non-empty, and all tiles render at the same neutral shade when it's absent (the
16
- * list view's resting state).
16
+ * list view's resting state). Hovering a tile takes the highlight over while it lasts — only
17
+ * the hovered tile stays highlighted, whatever the surrounding view has highlighted.
17
18
  */
18
19
  export declare function TimelineBar({ segments, highlightedStepIndexes, renderTooltip }: ITimelineBarProps): import("react/jsx-runtime").JSX.Element;
19
20
  //# sourceMappingURL=TimelineBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TimelineBar.d.ts","sourceRoot":"","sources":["../../../../src/components/intelligence/panel/TimelineBar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAMzD,MAAM,WAAW,iBAAiB;IAC9B,qFAAmF;IACnF,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,yFAAyF;IACzF,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAClC,+EAA+E;IAC/E,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,SAAS,CAAC;CAC5D;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,sBAAsB,EAAE,aAAa,EAAE,EAAE,iBAAiB,2CAuCjG"}
1
+ {"version":3,"file":"TimelineBar.d.ts","sourceRoot":"","sources":["../../../../src/components/intelligence/panel/TimelineBar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAIjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAMzD,MAAM,WAAW,iBAAiB;IAC9B,qFAAmF;IACnF,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,yFAAyF;IACzF,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAClC,+EAA+E;IAC/E,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,SAAS,CAAC;CAC5D;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,sBAAsB,EAAE,aAAa,EAAE,EAAE,iBAAiB,2CA8CjG"}
@@ -1,4 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2026 GoodData Corporation
3
+ import { useState } from "react";
2
4
  import { UiTooltip } from "@gooddata/sdk-ui-kit";
3
5
  import { e } from "../intelligenceBem.js";
4
6
  /** Gap between two tiles, matching `$timeline-gap` in intelligence.scss. */
@@ -8,10 +10,12 @@ const TIMELINE_GAP_PX = 1;
8
10
  * order. Purely informational — a tile is never clickable, only hoverable when `renderTooltip`
9
11
  * is given. Tiles in `highlightedStepIndexes` render highlighted; every other tile dims once
10
12
  * that list is non-empty, and all tiles render at the same neutral shade when it's absent (the
11
- * list view's resting state).
13
+ * list view's resting state). Hovering a tile takes the highlight over while it lasts — only
14
+ * the hovered tile stays highlighted, whatever the surrounding view has highlighted.
12
15
  */
13
16
  export function TimelineBar({ segments, highlightedStepIndexes, renderTooltip }) {
14
- const highlighted = new Set(highlightedStepIndexes);
17
+ const [hoveredStepIndex, setHoveredStepIndex] = useState(undefined);
18
+ const highlighted = new Set(hoveredStepIndex === undefined ? highlightedStepIndexes : [hoveredStepIndex]);
15
19
  // Widths sum to exactly 100%, so each tile has to give back its share of the 1px gaps
16
20
  // between them — otherwise the track overflows and clips its last tile.
17
21
  const totalGapPx = TIMELINE_GAP_PX * Math.max(segments.length - 1, 0);
@@ -29,6 +33,6 @@ export function TimelineBar({ segments, highlightedStepIndexes, renderTooltip })
29
33
  if (!renderTooltip) {
30
34
  return _jsx("div", { className: className, style: style }, segment.stepId);
31
35
  }
32
- return (_jsx(UiTooltip, { triggerBy: ["hover", "focus"], arrowPlacement: "bottom", variant: "none", anchorWrapperStyles: { flex: "0 0 auto", width: style.width }, anchor: _jsx("div", { className: className }), content: () => renderTooltip(segment) }, segment.stepId));
36
+ return (_jsx(UiTooltip, { triggerBy: ["hover", "focus"], arrowPlacement: "bottom", variant: "none", anchorWrapperStyles: { flex: "0 0 auto", width: style.width }, anchor: _jsx("div", { className: className, onMouseEnter: () => setHoveredStepIndex(segment.stepIndex), onMouseLeave: () => setHoveredStepIndex(undefined) }), content: () => renderTooltip(segment) }, segment.stepId));
33
37
  }) }));
34
38
  }
@@ -1,5 +1,5 @@
1
1
  import { type IAnalyticalBackend, type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi";
2
- import { type CatalogItem, type GenAIObjectType, type IColorPalette } from "@gooddata/sdk-model";
2
+ import { type CatalogItem, type GenAIObjectType, type IColorPalette, type IListedDashboard } from "@gooddata/sdk-model";
3
3
  import type { GenAIAssistantMode, LinkHandlerEvent } from "../components/ConfigContext.js";
4
4
  import { type ChatEventHandler } from "../store/events.js";
5
5
  export declare const useGenAIStore: (backend: IAnalyticalBackend, workspace: string, opts: {
@@ -10,6 +10,7 @@ export declare const useGenAIStore: (backend: IAnalyticalBackend, workspace: str
10
10
  includeTags?: string[] | undefined;
11
11
  excludeTags?: string[] | undefined;
12
12
  catalogItems?: CatalogItem[] | undefined;
13
+ dashboards?: IListedDashboard[] | undefined;
13
14
  isPreview?: boolean | undefined;
14
15
  allowInteractionIntelligence?: boolean | undefined;
15
16
  onLinkClick?: ((linkClickEvent: LinkHandlerEvent) => string | undefined) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useGenAIStore.d.ts","sourceRoot":"","sources":["../../src/hooks/useGenAIStore.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEjG,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAU3F,OAAO,EAAE,KAAK,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;AAI5E,eAAO,MAAM,aAAa;;;;;;;;;;;;;wEAgIzB,CAAC"}
1
+ {"version":3,"file":"useGenAIStore.d.ts","sourceRoot":"","sources":["../../src/hooks/useGenAIStore.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAW3F,OAAO,EAAE,KAAK,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;AAI5E,eAAO,MAAM,aAAa;;;;;;;;;;;;;;wEAyIzB,CAAC"}
@@ -1,11 +1,11 @@
1
1
  // (C) 2024-2026 GoodData Corporation
2
2
  import { useEffect, useMemo } from "react";
3
- import { setCatalogItemsActions, setColorPaletteAction, setFullscreenAction, setIsPreviewAction, setObjectTypesAction, setSettingsAction, setTagsAction, } from "../store/chatWindow/chatWindowSlice.js";
3
+ import { setCatalogItemsActions, setColorPaletteAction, setContextDashboardsAction, setFullscreenAction, setIsPreviewAction, setObjectTypesAction, setSettingsAction, setTagsAction, } from "../store/chatWindow/chatWindowSlice.js";
4
4
  import { EventDispatcher } from "../store/events.js";
5
5
  import { OptionsDispatcher } from "../store/options.js";
6
6
  import { getStore } from "../store/store.js";
7
7
  export const useGenAIStore = (backend, workspace, opts) => {
8
- const { eventHandlers, colorPalette, settings, objectTypes, includeTags, excludeTags, catalogItems, isPreview, allowInteractionIntelligence, onLinkClick, allowNativeLinks, mode, } = opts;
8
+ const { eventHandlers, colorPalette, settings, objectTypes, includeTags, excludeTags, catalogItems, dashboards, isPreview, allowInteractionIntelligence, onLinkClick, allowNativeLinks, mode, } = opts;
9
9
  // Instantiate EventDispatcher. It's a designed to hold a reference to the handlers, so that
10
10
  // we don't update the context every time a new array of handlers is passed.
11
11
  // Similar to how React handles event listeners.
@@ -63,6 +63,12 @@ export const useGenAIStore = (backend, workspace, opts) => {
63
63
  store.dispatch(setCatalogItemsActions(catalogItems));
64
64
  }
65
65
  }, [eventHandlers, eventDispatcher, catalogItems, optionsDispatcher, store]);
66
+ useEffect(() => {
67
+ if (dashboards) {
68
+ optionsDispatcher.setDashboards(dashboards);
69
+ store.dispatch(setContextDashboardsAction({ items: dashboards }));
70
+ }
71
+ }, [dashboards, optionsDispatcher, store]);
66
72
  useEffect(() => {
67
73
  if (mode && mode !== optionsDispatcher.getMode()) {
68
74
  optionsDispatcher.setMode(mode);