@gooddata/sdk-ui-gen-ai 11.55.0-alpha.2 → 11.55.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 (156) hide show
  1. package/NOTICE +9 -9
  2. package/esm/components/ConfigContext.d.ts +1 -0
  3. package/esm/components/ConfigContext.d.ts.map +1 -1
  4. package/esm/components/CustomizationContext.d.ts +36 -0
  5. package/esm/components/CustomizationContext.d.ts.map +1 -0
  6. package/esm/components/CustomizationContext.js +18 -0
  7. package/esm/components/CustomizationProvider.d.ts +3 -12
  8. package/esm/components/CustomizationProvider.d.ts.map +1 -1
  9. package/esm/components/CustomizationProvider.js +109 -13
  10. package/esm/components/GenAIChatAgentDropdown.d.ts +2 -2
  11. package/esm/components/GenAIChatAgentDropdown.d.ts.map +1 -1
  12. package/esm/components/GenAIChatAgentDropdown.js +11 -7
  13. package/esm/components/GenAIChatContextIndicator.d.ts +2 -2
  14. package/esm/components/GenAIChatContextIndicator.d.ts.map +1 -1
  15. package/esm/components/GenAIChatContextIndicator.js +81 -13
  16. package/esm/components/GenAIChatWrapper.js +1 -1
  17. package/esm/components/GenAIStandaloneInput.d.ts +5 -0
  18. package/esm/components/GenAIStandaloneInput.d.ts.map +1 -1
  19. package/esm/components/GenAIStandaloneInput.js +3 -2
  20. package/esm/components/GenAiChatAgentSwitching.d.ts.map +1 -1
  21. package/esm/components/GenAiChatAgentSwitching.js +9 -3
  22. package/esm/components/GenAiChatContextChooser.d.ts.map +1 -1
  23. package/esm/components/GenAiChatContextChooser.js +4 -3
  24. package/esm/components/GenAiChatContextChooserBody.d.ts +3 -1
  25. package/esm/components/GenAiChatContextChooserBody.d.ts.map +1 -1
  26. package/esm/components/GenAiChatContextChooserBody.js +7 -4
  27. package/esm/components/GenAiConversations.d.ts +5 -0
  28. package/esm/components/GenAiConversations.d.ts.map +1 -1
  29. package/esm/components/GenAiConversations.js +2 -2
  30. package/esm/components/Input.js +1 -1
  31. package/esm/components/Messages.d.ts.map +1 -1
  32. package/esm/components/Messages.js +4 -5
  33. package/esm/components/customized/AgentChooser.d.ts +8 -0
  34. package/esm/components/customized/AgentChooser.d.ts.map +1 -0
  35. package/esm/components/customized/AgentChooser.js +11 -0
  36. package/esm/components/customized/AgentItem.d.ts +1 -1
  37. package/esm/components/customized/AgentItem.js +1 -1
  38. package/esm/components/customized/AssistantMessage.d.ts +8 -0
  39. package/esm/components/customized/AssistantMessage.d.ts.map +1 -0
  40. package/esm/components/customized/AssistantMessage.js +11 -0
  41. package/esm/components/customized/Disclaimer.d.ts +3 -1
  42. package/esm/components/customized/Disclaimer.d.ts.map +1 -1
  43. package/esm/components/customized/Disclaimer.js +3 -1
  44. package/esm/components/customized/Feedback.d.ts +8 -0
  45. package/esm/components/customized/Feedback.d.ts.map +1 -0
  46. package/esm/components/customized/Feedback.js +11 -0
  47. package/esm/components/customized/FollowUpButtons.d.ts +8 -0
  48. package/esm/components/customized/FollowUpButtons.d.ts.map +1 -0
  49. package/esm/components/customized/FollowUpButtons.js +11 -0
  50. package/esm/components/customized/FollowUpQuestion.d.ts +8 -0
  51. package/esm/components/customized/FollowUpQuestion.d.ts.map +1 -0
  52. package/esm/components/customized/FollowUpQuestion.js +11 -0
  53. package/esm/components/customized/LandingContainer.d.ts +6 -2
  54. package/esm/components/customized/LandingContainer.d.ts.map +1 -1
  55. package/esm/components/customized/LandingContainer.js +6 -2
  56. package/esm/components/customized/LandingQuestion.d.ts +6 -2
  57. package/esm/components/customized/LandingQuestion.d.ts.map +1 -1
  58. package/esm/components/customized/LandingQuestion.js +3 -1
  59. package/esm/components/customized/LandingScreen.d.ts +4 -2
  60. package/esm/components/customized/LandingScreen.d.ts.map +1 -1
  61. package/esm/components/customized/LandingScreen.js +3 -1
  62. package/esm/components/customized/LandingTitle.d.ts +7 -3
  63. package/esm/components/customized/LandingTitle.d.ts.map +1 -1
  64. package/esm/components/customized/LandingTitle.js +6 -2
  65. package/esm/components/customized/MessageErrorContent.d.ts +8 -0
  66. package/esm/components/customized/MessageErrorContent.d.ts.map +1 -0
  67. package/esm/components/customized/MessageErrorContent.js +11 -0
  68. package/esm/components/customized/MessageMultipartContent.d.ts +8 -0
  69. package/esm/components/customized/MessageMultipartContent.d.ts.map +1 -0
  70. package/esm/components/customized/MessageMultipartContent.js +11 -0
  71. package/esm/components/customized/MessageReasoningContent.d.ts +8 -0
  72. package/esm/components/customized/MessageReasoningContent.d.ts.map +1 -0
  73. package/esm/components/customized/MessageReasoningContent.js +11 -0
  74. package/esm/components/customized/MessageTextContent.d.ts +8 -0
  75. package/esm/components/customized/MessageTextContent.d.ts.map +1 -0
  76. package/esm/components/customized/MessageTextContent.js +11 -0
  77. package/esm/components/customized/UserMessage.d.ts +8 -0
  78. package/esm/components/customized/UserMessage.d.ts.map +1 -0
  79. package/esm/components/customized/UserMessage.js +11 -0
  80. package/esm/components/customized/types.d.ts +260 -1
  81. package/esm/components/customized/types.d.ts.map +1 -1
  82. package/esm/components/hooks/useContextChangeAnnouncement.d.ts +2 -2
  83. package/esm/components/hooks/useContextChangeAnnouncement.d.ts.map +1 -1
  84. package/esm/components/hooks/useContextChangeAnnouncement.js +9 -4
  85. package/esm/components/hooks/useContextItems.d.ts +9 -3
  86. package/esm/components/hooks/useContextItems.d.ts.map +1 -1
  87. package/esm/components/hooks/useContextItems.js +51 -8
  88. package/esm/components/hooks/useSettingsClick.d.ts.map +1 -1
  89. package/esm/components/hooks/useSettingsClick.js +2 -0
  90. package/esm/components/messages/AssistantItem.d.ts.map +1 -1
  91. package/esm/components/messages/AssistantItem.js +3 -3
  92. package/esm/components/messages/AssistantItemFeedback.d.ts +3 -6
  93. package/esm/components/messages/AssistantItemFeedback.d.ts.map +1 -1
  94. package/esm/components/messages/AssistantItemFeedback.js +3 -9
  95. package/esm/components/messages/AssistantItemFollowUpButtons.d.ts +14 -0
  96. package/esm/components/messages/AssistantItemFollowUpButtons.d.ts.map +1 -0
  97. package/esm/components/messages/AssistantItemFollowUpButtons.js +23 -0
  98. package/esm/components/messages/AssistantItemFollowUpQuestion.d.ts +14 -0
  99. package/esm/components/messages/AssistantItemFollowUpQuestion.d.ts.map +1 -0
  100. package/esm/components/messages/AssistantItemFollowUpQuestion.js +8 -0
  101. package/esm/components/messages/AssistantItemSuggestions.d.ts +3 -3
  102. package/esm/components/messages/AssistantItemSuggestions.d.ts.map +1 -1
  103. package/esm/components/messages/AssistantItemSuggestions.js +7 -15
  104. package/esm/components/messages/ConversationItemContents.d.ts.map +1 -1
  105. package/esm/components/messages/ConversationItemContents.js +7 -43
  106. package/esm/components/messages/components/SemanticSearchTreeView.d.ts.map +1 -1
  107. package/esm/components/messages/components/SemanticSearchTreeView.js +2 -0
  108. package/esm/components/messages/contents/CustomHyperlink.d.ts.map +1 -1
  109. package/esm/components/messages/contents/CustomHyperlink.js +1 -0
  110. package/esm/components/messages/contents/VisualizationContents.d.ts.map +1 -1
  111. package/esm/components/messages/contents/VisualizationContents.js +2 -0
  112. package/esm/components/messages/conversationContents/ConversationDashboardContent.d.ts.map +1 -1
  113. package/esm/components/messages/conversationContents/ConversationDashboardContent.js +1 -0
  114. package/esm/components/messages/conversationContents/ConversationMultipartContent.d.ts +8 -0
  115. package/esm/components/messages/conversationContents/ConversationMultipartContent.d.ts.map +1 -0
  116. package/esm/components/messages/conversationContents/ConversationMultipartContent.js +40 -0
  117. package/esm/components/messages/conversationContents/ConversationVisualizationContent.js +2 -0
  118. package/esm/components/utils/groupUtility.d.ts +3 -0
  119. package/esm/components/utils/groupUtility.d.ts.map +1 -1
  120. package/esm/context/addContextReference.d.ts +0 -2
  121. package/esm/context/addContextReference.d.ts.map +1 -1
  122. package/esm/context/addContextReference.js +12 -35
  123. package/esm/context/collectContextReferences.d.ts +2 -2
  124. package/esm/context/collectContextReferences.d.ts.map +1 -1
  125. package/esm/context/collectContextReferences.js +22 -20
  126. package/esm/context/removeContextReference.d.ts +2 -16
  127. package/esm/context/removeContextReference.d.ts.map +1 -1
  128. package/esm/context/removeContextReference.js +7 -70
  129. package/esm/context/selectContextReferences.d.ts +5 -0
  130. package/esm/context/selectContextReferences.d.ts.map +1 -0
  131. package/esm/context/selectContextReferences.js +68 -0
  132. package/esm/index.d.ts +12 -1
  133. package/esm/index.d.ts.map +1 -1
  134. package/esm/index.js +10 -0
  135. package/esm/localization/bundles/en-US.localization-bundle.d.ts +8 -0
  136. package/esm/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  137. package/esm/localization/bundles/en-US.localization-bundle.js +8 -0
  138. package/esm/localization/bundles/zh-HK.localization-bundle.js +9 -9
  139. package/esm/sdk-ui-gen-ai.d.ts +378 -11
  140. package/esm/store/chatWindow/chatWindowSelectors.d.ts +2 -1
  141. package/esm/store/chatWindow/chatWindowSelectors.d.ts.map +1 -1
  142. package/esm/store/chatWindow/chatWindowSelectors.js +1 -0
  143. package/esm/store/chatWindow/chatWindowSlice.d.ts +2 -2
  144. package/esm/store/chatWindow/chatWindowSlice.d.ts.map +1 -1
  145. package/esm/store/chatWindow/chatWindowSlice.js +11 -6
  146. package/esm/store/sideEffects/onVisualizationSuccessSave.d.ts.map +1 -1
  147. package/esm/store/sideEffects/onVisualizationSuccessSave.js +2 -0
  148. package/esm/types.d.ts +22 -0
  149. package/esm/types.d.ts.map +1 -1
  150. package/esm/whatIf/whatIfMapping.d.ts +2 -2
  151. package/esm/whatIf/whatIfMapping.d.ts.map +1 -1
  152. package/esm/whatIf/whatIfMapping.js +3 -3
  153. package/package.json +21 -22
  154. package/styles/css/main.css +4 -0
  155. package/styles/css/main.css.map +1 -1
  156. package/styles/scss/main.scss +5 -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-8-30
10
+ Date generated: 2026-9-1
11
11
 
12
- Revision ID: ddb9da987c2b38f109d24ae5d452deb8e2f28bd2
12
+ Revision ID: 3404f1a0d36039369213be192418b30d4f1226a6
13
13
 
14
14
  ================================================================================
15
15
  ================================================================================
@@ -518,7 +518,7 @@ No first party licenses found in gooddata-ui-sdk
518
518
  - open (7.4.2) [MIT]
519
519
  - ora (5.4.1) [MIT]
520
520
  - oxc-transform (0.147.0) [MIT]
521
- - oxfmt (0.52.0) [MIT, 0BSD]
521
+ - oxfmt (0.58.0) [MIT, 0BSD]
522
522
  - p-map (3.0.0) [MIT]
523
523
  - package-json-from-dist (1.0.1) [blueoak-1.0.0]
524
524
  - parent-module (1.0.1) [MIT]
@@ -10463,9 +10463,9 @@ Dependency Path: oxc-transform
10463
10463
  File Path(s): common/config/subspaces/sdk/pnpm-lock.yaml
10464
10464
 
10465
10465
  --------------------------------------------------------------------------------
10466
- Package Title: oxfmt (0.52.0)
10466
+ Package Title: oxfmt (0.58.0)
10467
10467
 
10468
- Package Locator: npm+oxfmt$0.52.0
10468
+ Package Locator: npm+oxfmt$0.58.0
10469
10469
 
10470
10470
  Package Depth: Direct
10471
10471
  --------------------------------------------------------------------------------
@@ -10535,7 +10535,7 @@ SOFTWARE.
10535
10535
  0BSD
10536
10536
  --------------------------------------------------------------------------------
10537
10537
  File matches:
10538
- - dist/plugin-C4twtOn4.js
10538
+ - dist/plugin-B4cguZ1l.js
10539
10539
  - Copyright (c) Microsoft Corporation.
10540
10540
  --------------------------------------------------------------------------------
10541
10541
 
@@ -10560,7 +10560,7 @@ MIT
10560
10560
  Authors: boshenc@gmail.com
10561
10561
  Package Manager: NPM
10562
10562
  Project URL: https://oxc.rs/docs/guide/usage/formatter
10563
- Package Download URL: https://registry.npmjs.org/oxfmt/-/oxfmt-0.52.0.tgz
10563
+ Package Download URL: https://registry.npmjs.org/oxfmt/-/oxfmt-0.58.0.tgz
10564
10564
  Dependency Path: oxfmt
10565
10565
  File Path(s): common/config/subspaces/sdk/pnpm-lock.yaml
10566
10566
 
@@ -35327,7 +35327,7 @@ MIT
35327
35327
 
35328
35328
  Authors: admin@simonboudrias.com
35329
35329
  Package Manager: NPM
35330
- Project URL: https://www.npmjs.com/package/run-async
35330
+ Project URL: https://github.com/SBoudrias/run-async#readme
35331
35331
  Package Download URL: https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz
35332
35332
  Dependency Path: inquirer > run-async
35333
35333
  File Path(s): common/config/subspaces/sdk/pnpm-lock.yaml
@@ -64321,4 +64321,4 @@ File Path(s): common/config/subspaces/sdk/pnpm-lock.yaml
64321
64321
  --------------------------------------------------------------------------------
64322
64322
  --------------------------------------------------------------------------------
64323
64323
 
64324
- Report Generated by FOSSA on 2026-8-30
64324
+ Report Generated by FOSSA on 2026-9-1
@@ -24,6 +24,7 @@ export type LinkHandlerEvent = {
24
24
  dashboardStatus?: "saved" | "draft";
25
25
  visualization?: IInsight;
26
26
  visualizationStatus?: "saved" | "draft";
27
+ action: "copy" | "open";
27
28
  };
28
29
  /**
29
30
  * Display mode of the Gen AI assistant.
@@ -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,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,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;CAC3C,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,YAAY,CAAC;AAIzD,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,qBAErB,CAAC"}
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,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,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;AAIzD,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,qBAErB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type ComponentType } from "react";
2
+ import { type IGenAIAssistantAgentChooserProps, type IGenAIAssistantAgentItemProps, type IGenAIAssistantAssistantMessageProps, type IGenAIAssistantFeedbackProps, type IGenAIAssistantFollowUpButtonsProps, type IGenAIAssistantFollowUpQuestionProps, type IGenAIAssistantMessageErrorContentProps, type IGenAIAssistantMessageMultipartContentProps, type IGenAIAssistantMessageReasoningContentProps, type IGenAIAssistantMessageTextContentProps, type IGenAIAssistantSlots, type IGenAIAssistantUserMessageProps } from "./customized/types.js";
3
+ /**
4
+ * @internal
5
+ */
6
+ export interface IGenAIAssistantComponents {
7
+ LandingScreenComponent: ComponentType;
8
+ DisclaimerComponent: ComponentType;
9
+ AgentItemComponent: ComponentType<IGenAIAssistantAgentItemProps>;
10
+ UserMessageComponent: ComponentType<IGenAIAssistantUserMessageProps>;
11
+ AssistantMessageComponent: ComponentType<IGenAIAssistantAssistantMessageProps>;
12
+ MessageTextContentComponent: ComponentType<IGenAIAssistantMessageTextContentProps>;
13
+ MessageErrorContentComponent: ComponentType<IGenAIAssistantMessageErrorContentProps>;
14
+ MessageReasoningContentComponent: ComponentType<IGenAIAssistantMessageReasoningContentProps>;
15
+ MessageMultipartContentComponent: ComponentType<IGenAIAssistantMessageMultipartContentProps>;
16
+ FollowUpButtonsComponent: ComponentType<IGenAIAssistantFollowUpButtonsProps>;
17
+ FollowUpQuestionComponent: ComponentType<IGenAIAssistantFollowUpQuestionProps>;
18
+ FeedbackComponent: ComponentType<IGenAIAssistantFeedbackProps>;
19
+ AgentChooserComponent: ComponentType<IGenAIAssistantAgentChooserProps>;
20
+ }
21
+ /**
22
+ * @internal
23
+ */
24
+ export type CustomizationContext = {
25
+ slots?: IGenAIAssistantSlots;
26
+ components?: IGenAIAssistantComponents;
27
+ };
28
+ /**
29
+ * @internal
30
+ */
31
+ export declare const customizationContext: import("react").Context<CustomizationContext>;
32
+ /**
33
+ * @internal
34
+ */
35
+ export declare const useCustomization: () => IGenAIAssistantComponents;
36
+ //# sourceMappingURL=CustomizationContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomizationContext.d.ts","sourceRoot":"","sources":["../../src/components/CustomizationContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAA6B,MAAM,OAAO,CAAC;AAEtE,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EACxC,KAAK,oCAAoC,EACzC,KAAK,uCAAuC,EAC5C,KAAK,2CAA2C,EAChD,KAAK,2CAA2C,EAChD,KAAK,sCAAsC,EAC3C,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACvC,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,sBAAsB,EAAE,aAAa,CAAC;IACtC,mBAAmB,EAAE,aAAa,CAAC;IACnC,kBAAkB,EAAE,aAAa,CAAC,6BAA6B,CAAC,CAAC;IACjE,oBAAoB,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAC;IACrE,yBAAyB,EAAE,aAAa,CAAC,oCAAoC,CAAC,CAAC;IAC/E,2BAA2B,EAAE,aAAa,CAAC,sCAAsC,CAAC,CAAC;IACnF,4BAA4B,EAAE,aAAa,CAAC,uCAAuC,CAAC,CAAC;IACrF,gCAAgC,EAAE,aAAa,CAAC,2CAA2C,CAAC,CAAC;IAC7F,gCAAgC,EAAE,aAAa,CAAC,2CAA2C,CAAC,CAAC;IAC7F,wBAAwB,EAAE,aAAa,CAAC,mCAAmC,CAAC,CAAC;IAC7E,yBAAyB,EAAE,aAAa,CAAC,oCAAoC,CAAC,CAAC;IAC/E,iBAAiB,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;IAC/D,qBAAqB,EAAE,aAAa,CAAC,gCAAgC,CAAC,CAAC;CAC1E;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,UAAU,CAAC,EAAE,yBAAyB,CAAC;CAC1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,+CAE/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,iCAM5B,CAAC"}
@@ -0,0 +1,18 @@
1
+ // (C) 2025-2026 GoodData Corporation
2
+ import { createContext, useContext } from "react";
3
+ /**
4
+ * @internal
5
+ */
6
+ export const customizationContext = createContext({
7
+ slots: {},
8
+ });
9
+ /**
10
+ * @internal
11
+ */
12
+ export const useCustomization = () => {
13
+ const { components } = useContext(customizationContext);
14
+ if (!components) {
15
+ throw new Error("useCustomization must be used within a CustomizationProvider");
16
+ }
17
+ return components;
18
+ };
@@ -1,16 +1,7 @@
1
1
  import { type PropsWithChildren } from "react";
2
- import { type IGenAIAssistantAgentItemProps, type IGenAIAssistantSlots } from "./customized/types.js";
3
- export type CustomizationContext = {
2
+ import { type IGenAIAssistantSlots } from "./customized/types.js";
3
+ export type CustomizationProviderProps = {
4
4
  slots?: IGenAIAssistantSlots;
5
5
  };
6
- declare function LandingScreenSlotRenderer(): import("react/jsx-runtime").JSX.Element;
7
- declare function DisclaimerSlotRenderer(): import("react/jsx-runtime").JSX.Element;
8
- declare function AgentItemSlotRenderer(props: IGenAIAssistantAgentItemProps): import("react/jsx-runtime").JSX.Element;
9
- export declare function CustomizationProvider({ children, slots }: PropsWithChildren<CustomizationContext>): import("react/jsx-runtime").JSX.Element;
10
- export declare const useCustomization: () => {
11
- LandingScreenComponent: typeof LandingScreenSlotRenderer;
12
- DisclaimerComponent: typeof DisclaimerSlotRenderer;
13
- AgentItemComponent: typeof AgentItemSlotRenderer;
14
- };
15
- export {};
6
+ export declare function CustomizationProvider({ children, slots }: PropsWithChildren<CustomizationProviderProps>): import("react/jsx-runtime").JSX.Element;
16
7
  //# sourceMappingURL=CustomizationProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomizationProvider.d.ts","sourceRoot":"","sources":["../../src/components/CustomizationProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAsC,MAAM,OAAO,CAAC;AAKnF,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAGtG,MAAM,MAAM,oBAAoB,GAAG;IAC/B,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAChC,CAAC;AAQF,iBAAS,yBAAyB,4CAWjC;AAED,iBAAS,sBAAsB,4CAS9B;AAED,iBAAS,qBAAqB,CAAC,KAAK,EAAE,6BAA6B,2CAUlE;AAED,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,2CASjG;AAED,eAAO,MAAM,gBAAgB;;;;CAS5B,CAAC"}
1
+ {"version":3,"file":"CustomizationProvider.d.ts","sourceRoot":"","sources":["../../src/components/CustomizationProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAepE,OAAO,EAWH,KAAK,oBAAoB,EAE5B,MAAM,uBAAuB,CAAC;AAI/B,MAAM,MAAM,0BAA0B,GAAG;IACrC,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAChC,CAAC;AA0IF,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,iBAAiB,CAAC,0BAA0B,CAAC,2CA6BvG"}
@@ -1,14 +1,21 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  // (C) 2025-2026 GoodData Corporation
3
- import { createContext, useContext, useMemo } from "react";
3
+ import { useContext, useMemo } from "react";
4
+ import { customizationContext } from "./CustomizationContext.js";
5
+ import { DefaultAgentChooser } from "./customized/AgentChooser.js";
4
6
  import { DefaultAgentItem } from "./customized/AgentItem.js";
7
+ import { DefaultAssistantMessage } from "./customized/AssistantMessage.js";
5
8
  import { DefaultDisclaimer } from "./customized/Disclaimer.js";
9
+ import { DefaultFeedback } from "./customized/Feedback.js";
10
+ import { DefaultFollowUpButtons } from "./customized/FollowUpButtons.js";
11
+ import { DefaultFollowUpQuestion } from "./customized/FollowUpQuestion.js";
6
12
  import { DefaultLandingScreen } from "./customized/LandingScreen.js";
13
+ import { DefaultMessageErrorContent } from "./customized/MessageErrorContent.js";
14
+ import { DefaultMessageMultipartContent } from "./customized/MessageMultipartContent.js";
15
+ import { DefaultMessageReasoningContent } from "./customized/MessageReasoningContent.js";
16
+ import { DefaultMessageTextContent } from "./customized/MessageTextContent.js";
17
+ import { DefaultUserMessage } from "./customized/UserMessage.js";
7
18
  import { useFullscreenCheck } from "./hooks/useFullscreenCheck.js";
8
- const defaultCustomizationContext = {
9
- slots: {},
10
- };
11
- const customizationContext = createContext(defaultCustomizationContext);
12
19
  function LandingScreenSlotRenderer() {
13
20
  const { slots } = useContext(customizationContext);
14
21
  const { isFullscreen, isBigScreen, isSmallScreen } = useFullscreenCheck();
@@ -38,16 +45,105 @@ function AgentItemSlotRenderer(props) {
38
45
  }
39
46
  return _jsx(DefaultAgentItem, { ...props });
40
47
  }
41
- export function CustomizationProvider({ children, slots }) {
42
- const value = useMemo(() => ({
43
- slots: slots ?? {},
44
- }), [slots]);
45
- return _jsx(customizationContext.Provider, { value: value, children: children });
48
+ function UserMessageSlotRenderer(props) {
49
+ const { slots } = useContext(customizationContext);
50
+ const UserMessageSlot = slots?.UserMessage;
51
+ if (UserMessageSlot) {
52
+ return _jsx(UserMessageSlot, { Default: DefaultUserMessage, defaultProps: props });
53
+ }
54
+ return _jsx(DefaultUserMessage, { ...props });
55
+ }
56
+ function AssistantMessageSlotRenderer(props) {
57
+ const { slots } = useContext(customizationContext);
58
+ const AssistantMessageSlot = slots?.AssistantMessage;
59
+ if (AssistantMessageSlot) {
60
+ return _jsx(AssistantMessageSlot, { Default: DefaultAssistantMessage, defaultProps: props });
61
+ }
62
+ return _jsx(DefaultAssistantMessage, { ...props });
63
+ }
64
+ function MessageTextContentSlotRenderer(props) {
65
+ const { slots } = useContext(customizationContext);
66
+ const MessageTextContentSlot = slots?.MessageTextContent;
67
+ if (MessageTextContentSlot) {
68
+ return _jsx(MessageTextContentSlot, { Default: DefaultMessageTextContent, defaultProps: props });
69
+ }
70
+ return _jsx(DefaultMessageTextContent, { ...props });
71
+ }
72
+ function MessageErrorContentSlotRenderer(props) {
73
+ const { slots } = useContext(customizationContext);
74
+ const MessageErrorContentSlot = slots?.MessageErrorContent;
75
+ if (MessageErrorContentSlot) {
76
+ return _jsx(MessageErrorContentSlot, { Default: DefaultMessageErrorContent, defaultProps: props });
77
+ }
78
+ return _jsx(DefaultMessageErrorContent, { ...props });
79
+ }
80
+ function MessageReasoningContentSlotRenderer(props) {
81
+ const { slots } = useContext(customizationContext);
82
+ const MessageReasoningContentSlot = slots?.MessageReasoningContent;
83
+ if (MessageReasoningContentSlot) {
84
+ return _jsx(MessageReasoningContentSlot, { Default: DefaultMessageReasoningContent, defaultProps: props });
85
+ }
86
+ return _jsx(DefaultMessageReasoningContent, { ...props });
87
+ }
88
+ function MessageMultipartContentSlotRenderer(props) {
89
+ const { slots } = useContext(customizationContext);
90
+ const MessageMultipartContentSlot = slots?.MessageMultipartContent;
91
+ if (MessageMultipartContentSlot) {
92
+ return _jsx(MessageMultipartContentSlot, { Default: DefaultMessageMultipartContent, defaultProps: props });
93
+ }
94
+ return _jsx(DefaultMessageMultipartContent, { ...props });
95
+ }
96
+ function FollowUpButtonsSlotRenderer(props) {
97
+ const { slots } = useContext(customizationContext);
98
+ const FollowUpButtonsSlot = slots?.FollowUpButtons;
99
+ if (FollowUpButtonsSlot) {
100
+ return _jsx(FollowUpButtonsSlot, { Default: DefaultFollowUpButtons, defaultProps: props });
101
+ }
102
+ return _jsx(DefaultFollowUpButtons, { ...props });
46
103
  }
47
- export const useCustomization = () => {
48
- return useMemo(() => ({
104
+ function FollowUpQuestionSlotRenderer(props) {
105
+ const { slots } = useContext(customizationContext);
106
+ const FollowUpQuestionSlot = slots?.FollowUpQuestion;
107
+ if (FollowUpQuestionSlot) {
108
+ return _jsx(FollowUpQuestionSlot, { Default: DefaultFollowUpQuestion, defaultProps: props });
109
+ }
110
+ return _jsx(DefaultFollowUpQuestion, { ...props });
111
+ }
112
+ function FeedbackSlotRenderer(props) {
113
+ const { slots } = useContext(customizationContext);
114
+ const FeedbackSlot = slots?.Feedback;
115
+ if (FeedbackSlot) {
116
+ return _jsx(FeedbackSlot, { Default: DefaultFeedback, defaultProps: props });
117
+ }
118
+ return _jsx(DefaultFeedback, { ...props });
119
+ }
120
+ function AgentChooserSlotRenderer(props) {
121
+ const { slots } = useContext(customizationContext);
122
+ const AgentChooserSlot = slots?.AgentChooser;
123
+ if (AgentChooserSlot) {
124
+ return _jsx(AgentChooserSlot, { Default: DefaultAgentChooser, defaultProps: props });
125
+ }
126
+ return _jsx(DefaultAgentChooser, { ...props });
127
+ }
128
+ export function CustomizationProvider({ children, slots }) {
129
+ const components = useMemo(() => ({
49
130
  LandingScreenComponent: LandingScreenSlotRenderer,
50
131
  DisclaimerComponent: DisclaimerSlotRenderer,
51
132
  AgentItemComponent: AgentItemSlotRenderer,
133
+ UserMessageComponent: UserMessageSlotRenderer,
134
+ AssistantMessageComponent: AssistantMessageSlotRenderer,
135
+ MessageTextContentComponent: MessageTextContentSlotRenderer,
136
+ MessageErrorContentComponent: MessageErrorContentSlotRenderer,
137
+ MessageReasoningContentComponent: MessageReasoningContentSlotRenderer,
138
+ MessageMultipartContentComponent: MessageMultipartContentSlotRenderer,
139
+ FollowUpButtonsComponent: FollowUpButtonsSlotRenderer,
140
+ FollowUpQuestionComponent: FollowUpQuestionSlotRenderer,
141
+ FeedbackComponent: FeedbackSlotRenderer,
142
+ AgentChooserComponent: AgentChooserSlotRenderer,
52
143
  }), []);
53
- };
144
+ const value = useMemo(() => ({
145
+ slots: slots ?? {},
146
+ components,
147
+ }), [slots, components]);
148
+ return _jsx(customizationContext.Provider, { value: value, children: children });
149
+ }
@@ -10,9 +10,9 @@ export type GenAIChatAgentDropdownProps = {
10
10
  onSelectAgent: (agentId: string | undefined, options?: {
11
11
  showChangeEvent?: boolean;
12
12
  }) => void;
13
- reasoningEnabled?: boolean;
14
13
  selectedEffort?: GenAIChatEffort;
14
+ effectiveSelectedAgentId?: string;
15
15
  onSelectEffort?: (effort: GenAIChatEffort) => void;
16
16
  };
17
- export declare function GenAIChatAgentDropdown({ agents, conversations, conversationAgentId, selectedAgentId, isDisabled, isLoading, onSelectAgent, reasoningEnabled, selectedEffort, onSelectEffort }: GenAIChatAgentDropdownProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function GenAIChatAgentDropdown({ agents, conversations, conversationAgentId, selectedAgentId, isDisabled, isLoading, onSelectAgent, onSelectEffort, selectedEffort, effectiveSelectedAgentId: effectiveSelectedAgentIdFromProps }: GenAIChatAgentDropdownProps): import("react/jsx-runtime").JSX.Element;
18
18
  //# sourceMappingURL=GenAIChatAgentDropdown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenAIChatAgentDropdown.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatAgentDropdown.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAgB3D,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAmC3E,MAAM,MAAM,2BAA2B,GAAG;IACtC,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EACnC,MAAM,EACN,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,SAAS,EACT,aAAa,EACb,gBAAwB,EACxB,cAA+B,EAC/B,cAAc,EACjB,EAAE,2BAA2B,2CA0N7B"}
1
+ {"version":3,"file":"GenAIChatAgentDropdown.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatAgentDropdown.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAgB3D,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAqC3E,MAAM,MAAM,2BAA2B,GAAG;IACtC,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9F,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EACnC,MAAM,EACN,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,cAA+B,EAC/B,wBAAwB,EAAE,iCAAiC,EAC9D,EAAE,2BAA2B,2CA8N7B"}
@@ -3,8 +3,10 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
3
3
  import { useCallback, useEffect, useMemo } from "react";
4
4
  import cx from "classnames";
5
5
  import { defineMessages, useIntl } from "react-intl";
6
+ import { useSelector } from "react-redux";
6
7
  import { DefaultUiMenuInteractiveItemWrapper, Dropdown, UiButton, UiIcon, UiMenu, UiSubmenuHeader, typedUiMenuContextStore, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
7
- import { useCustomization } from "./CustomizationProvider.js";
8
+ import { reasoningEffortEnabledSelector } from "../store/chatWindow/chatWindowSelectors.js";
9
+ import { useCustomization } from "./CustomizationContext.js";
8
10
  import { GenAIChatReasoningMenuRow, REASONING_MENU_ITEM_ID, useReasoningMenuItems, useSelectedReasoningLabel, } from "./GenAIChatReasoningMenu.js";
9
11
  import { getEffectiveSelectedAgentId, selectDefaultAgentId } from "./utils/agentSelection.js";
10
12
  import { DEFAULT_EFFORT } from "./utils/effortSelection.js";
@@ -25,13 +27,15 @@ const msgs = defineMessages({
25
27
  id: "gd.gen-ai.close",
26
28
  },
27
29
  });
28
- export function GenAIChatAgentDropdown({ agents, conversations, conversationAgentId, selectedAgentId, isDisabled, isLoading, onSelectAgent, reasoningEnabled = false, selectedEffort = DEFAULT_EFFORT, onSelectEffort, }) {
30
+ export function GenAIChatAgentDropdown({ agents, conversations, conversationAgentId, selectedAgentId, isDisabled, isLoading, onSelectAgent, onSelectEffort, selectedEffort = DEFAULT_EFFORT, effectiveSelectedAgentId: effectiveSelectedAgentIdFromProps, }) {
31
+ const reasoningEnabled = useSelector((state) => reasoningEffortEnabledSelector(state));
29
32
  const intl = useIntl();
30
- const effectiveSelectedAgentId = getEffectiveSelectedAgentId({
31
- agents,
32
- conversationAgentId,
33
- selectedAgentId,
34
- });
33
+ const effectiveSelectedAgentId = effectiveSelectedAgentIdFromProps ??
34
+ getEffectiveSelectedAgentId({
35
+ agents,
36
+ conversationAgentId,
37
+ selectedAgentId,
38
+ });
35
39
  const selectedAgent = agents.find((agent) => agent.id === effectiveSelectedAgentId);
36
40
  const agentLabel = intl.formatMessage(msgs.agent);
37
41
  const loadingLabel = `${intl.formatMessage(msgs.loading)}…`;
@@ -1,5 +1,5 @@
1
1
  type GenAIChatContextIndicatorOwnProps = {
2
- onDelete?: () => void;
2
+ onUpdate?: () => void;
3
3
  };
4
4
  /**
5
5
  * Shows what ambient context the assistant is answering about — the open dashboard and its live
@@ -9,6 +9,6 @@ type GenAIChatContextIndicatorOwnProps = {
9
9
  *
10
10
  * @internal
11
11
  */
12
- export declare function GenAIChatContextIndicator({ onDelete }: GenAIChatContextIndicatorOwnProps): import("react/jsx-runtime").JSX.Element | null;
12
+ export declare function GenAIChatContextIndicator({ onUpdate }: GenAIChatContextIndicatorOwnProps): import("react/jsx-runtime").JSX.Element | null;
13
13
  export {};
14
14
  //# sourceMappingURL=GenAIChatContextIndicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenAIChatContextIndicator.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatContextIndicator.tsx"],"names":[],"mappings":"AA6BA,KAAK,iCAAiC,GAAG;IACrC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,EAAE,QAAQ,EAAE,EAAE,iCAAiC,kDAuExF"}
1
+ {"version":3,"file":"GenAIChatContextIndicator.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatContextIndicator.tsx"],"names":[],"mappings":"AA0CA,KAAK,iCAAiC,GAAG;IACrC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,EAAE,QAAQ,EAAE,EAAE,iCAAiC,kDAyJxF"}
@@ -3,11 +3,13 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
3
3
  import { useCallback, useMemo } from "react";
4
4
  import { defineMessages, useIntl } from "react-intl";
5
5
  import { useDispatch, useSelector } from "react-redux";
6
- import { UiChip, useIdPrefixed } from "@gooddata/sdk-ui-kit";
6
+ import { Dropdown, UiChip, useIdPrefixed } from "@gooddata/sdk-ui-kit";
7
7
  import { collectContextReferences } from "../context/collectContextReferences.js";
8
- import { contextSetupEnabledSelector, userContextSelector } from "../store/chatWindow/chatWindowSelectors.js";
9
- import { removeContextReferenceAction } from "../store/chatWindow/chatWindowSlice.js";
8
+ import { ambientContextSelector, contextSetupEnabledSelector, selectedContextSelector, userContextSelector, } from "../store/chatWindow/chatWindowSelectors.js";
9
+ import { removeContextReferenceAction, selectedContextReferencesAction, } from "../store/chatWindow/chatWindowSlice.js";
10
+ import { GenAiChatContextChooserBody } from "./GenAiChatContextChooserBody.js";
10
11
  import { useContextChangeAnnouncement } from "./hooks/useContextChangeAnnouncement.js";
12
+ import { useAmbientContextItems } from "./hooks/useContextItems.js";
11
13
  import { getIconByObject, getTypeLabel } from "./utils/icons.js";
12
14
  const msgs = defineMessages({
13
15
  untitled: {
@@ -19,6 +21,9 @@ const msgs = defineMessages({
19
21
  groupLabel: {
20
22
  id: "gd.gen-ai.context.group.ariaLabel",
21
23
  },
24
+ focusOn: {
25
+ id: "gd.gen-ai.context.focus_on",
26
+ },
22
27
  });
23
28
  /**
24
29
  * Shows what ambient context the assistant is answering about — the open dashboard and its live
@@ -28,32 +33,95 @@ const msgs = defineMessages({
28
33
  *
29
34
  * @internal
30
35
  */
31
- export function GenAIChatContextIndicator({ onDelete }) {
36
+ export function GenAIChatContextIndicator({ onUpdate }) {
32
37
  const intl = useIntl();
33
38
  const emptyReferenceLabel = intl.formatMessage(msgs.untitled);
34
39
  const groupLabelId = useIdPrefixed("context-indicator-label");
35
40
  const isContextSetupEnabled = useSelector(contextSetupEnabledSelector);
36
- const context = useSelector(userContextSelector);
37
- const references = useMemo(() => collectContextReferences(context, emptyReferenceLabel), [context, emptyReferenceLabel]);
41
+ const ambientContext = useSelector(ambientContextSelector);
42
+ const userContext = useSelector(userContextSelector);
43
+ const selectedContext = useSelector(selectedContextSelector);
44
+ const { items, search, setSearch, selectedIds } = useAmbientContextItems(ambientContext);
45
+ const addContextLabel = intl.formatMessage(msgs.focusOn);
46
+ const titleId = useIdPrefixed("context-focuson-title");
47
+ const references = useMemo(() => collectContextReferences(userContext, selectedContext, emptyReferenceLabel), [userContext, selectedContext, emptyReferenceLabel]);
38
48
  const dispatch = useDispatch();
39
49
  const removeContextReference = useCallback((payload) => dispatch(removeContextReferenceAction(payload)), [dispatch]);
50
+ const onAmbientToggleHandler = useCallback(() => {
51
+ return () => {
52
+ dispatch(selectedContextReferencesAction({
53
+ ...selectedContext,
54
+ activated: !selectedContext?.activated,
55
+ }));
56
+ onUpdate?.();
57
+ };
58
+ }, [dispatch, onUpdate, selectedContext]);
40
59
  const onDeleteHandler = useCallback((reference) => {
41
60
  return () => {
42
61
  removeContextReference({ object: reference });
43
- onDelete?.();
62
+ onUpdate?.();
44
63
  };
45
- }, [removeContextReference, onDelete]);
46
- const announcement = useContextChangeAnnouncement(references);
64
+ }, [removeContextReference, onUpdate]);
65
+ const onOpenStateChanged = useCallback(() => {
66
+ setSearch("");
67
+ }, [setSearch]);
68
+ const announcement = useContextChangeAnnouncement(selectedContext, references);
47
69
  if (!isContextSetupEnabled) {
48
70
  return null;
49
71
  }
50
- return (_jsxs(_Fragment, { children: [references.length > 0 ? (_jsxs(_Fragment, { children: [
51
- _jsx("span", { className: "sr-only", id: groupLabelId, children: intl.formatMessage(msgs.groupLabel) }), _jsx("div", { className: "gd-gen-ai-chat__context-indicator", role: "group", "aria-labelledby": groupLabelId, children: references.map((reference, index) => (_jsx(UiChip, { isDisabled: true, isDeletable: true, ...getIconByObject(reference), label: reference.title, isExpandable: false, onDelete: onDeleteHandler(reference), accessibilityConfig: {
72
+ return (_jsxs(_Fragment, { children: [
73
+ _jsxs(ContextWrapper, { groupLabel: msgs.groupLabel, groupLabelId: groupLabelId, children: [selectedContext?.dashboard ? (_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 }) => {
74
+ const item = selectedContext.visualization ?? selectedContext.dashboard;
75
+ if (!item) {
76
+ return null;
77
+ }
78
+ return (_jsx(UiChip, { isActionable: true, isExpandable: true, isActive: isOpen, ...getIconByObject(item), label: getSelectedTitle(selectedContext, emptyReferenceLabel), iconAction: selectedContext.activated ? "visible" : "invisible", variant: selectedContext.activated ? "normal" : "inactive", onClick: toggleDropdown, onAction: onAmbientToggleHandler(), accessibilityConfig: {
79
+ ...accessibilityConfig,
80
+ deleteAriaLabel: intl.formatMessage(msgs.remove, {
81
+ title: getSelectedTitle(selectedContext, emptyReferenceLabel),
82
+ }),
83
+ iconBeforeAriaLabel: getTypeLabel(item.type, intl),
84
+ } }));
85
+ }, renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(GenAiChatContextChooserBody, { inputItems: items, selectedIds: selectedIds, title: addContextLabel, titleId: titleId, search: search, onSearchChange: setSearch, ariaAttributes: ariaAttributes, closeDropdown: closeDropdown, onSelect: (item) => {
86
+ dispatch(selectedContextReferencesAction({
87
+ ...selectedContext,
88
+ ...(item.type === "dashboard"
89
+ ? {
90
+ dashboard: item,
91
+ visualization: undefined,
92
+ }
93
+ : {}),
94
+ ...(item.type === "visualization" || item.type === "widget"
95
+ ? {
96
+ visualization: item,
97
+ }
98
+ : {}),
99
+ activated: true,
100
+ }));
101
+ onUpdate?.();
102
+ } })) })) : null, references.length > 0
103
+ ? references.map((reference, index) => (_jsx(UiChip, { isDisabled: true, isDeletable: true, ...getIconByObject(reference), label: reference.title, isExpandable: false, onDelete: onDeleteHandler(reference), accessibilityConfig: {
52
104
  deleteAriaLabel: intl.formatMessage(msgs.remove, {
53
105
  title: reference.title,
54
106
  }),
55
107
  iconBeforeAriaLabel: getTypeLabel(reference.type, intl),
56
- } }, index))) })
57
- ] })) : null, _jsx("span", { className: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: announcement })
108
+ } }, index)))
109
+ : null] }), _jsx("span", { className: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: announcement })
58
110
  ] }));
59
111
  }
112
+ function ContextWrapper({ groupLabel, groupLabelId, children }) {
113
+ const intl = useIntl();
114
+ return (_jsxs(_Fragment, { children: [
115
+ _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 })
116
+ ] }));
117
+ }
118
+ // utils
119
+ function getSelectedTitle(selectedContext, emptyReferenceLabel) {
120
+ const label = [
121
+ ...(selectedContext.dashboard ? [selectedContext.dashboard.title || emptyReferenceLabel] : []),
122
+ ...(selectedContext.visualization
123
+ ? [selectedContext.visualization.title || emptyReferenceLabel]
124
+ : []),
125
+ ];
126
+ return label.join(" / ");
127
+ }
@@ -11,7 +11,7 @@ import { setAllowedRelationshipTypesAction } from "../store/chatWindow/chatWindo
11
11
  import { asyncProcessSelector } from "../store/messages/messagesSelectors.js";
12
12
  import { cancelAsyncAction, clearThreadAction, loadThreadAction } from "../store/messages/messagesSlice.js";
13
13
  import { useConfig } from "./ConfigContext.js";
14
- import { useCustomization } from "./CustomizationProvider.js";
14
+ import { useCustomization } from "./CustomizationContext.js";
15
15
  import { ErrorBoundary } from "./ErrorBoundary.js";
16
16
  import { GlobalError } from "./GlobalError.js";
17
17
  import { useEndpointCheck } from "./hooks/useEndpointCheck.js";
@@ -1,3 +1,4 @@
1
+ import type { IGenAIAssistantSlots } from "./customized/types.js";
1
2
  import { type GenAiStoreProps } from "./GenAiStore.js";
2
3
  /**
3
4
  * @internal
@@ -35,6 +36,10 @@ export type GenAIStandaloneInputProps = Omit<GenAiStoreProps, "children"> & {
35
36
  * Whether the input should autofocus.
36
37
  */
37
38
  autofocus?: boolean;
39
+ /**
40
+ * Customization slots for the assistant.
41
+ */
42
+ slots?: IGenAIAssistantSlots;
38
43
  };
39
44
  /**
40
45
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"GenAIStandaloneInput.d.ts","sourceRoot":"","sources":["../../src/components/GenAIStandaloneInput.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAWnE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IACxE;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AA2FF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CAYpE"}
1
+ {"version":3,"file":"GenAIStandaloneInput.d.ts","sourceRoot":"","sources":["../../src/components/GenAIStandaloneInput.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAWnE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IACxE;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAChC,CAAC;AA2FF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CAcpE"}
@@ -8,6 +8,7 @@ import { SyntaxHighlightingInput } from "@gooddata/sdk-ui-kit";
8
8
  import { useGenAIStandaloneInputData } from "../hooks/useGenAIStandaloneInputData.js";
9
9
  import { IntlWrapper } from "../localization/IntlWrapper.js";
10
10
  import { useCompletion } from "./completion/useCompletion.js";
11
+ import { CustomizationProvider } from "./CustomizationProvider.js";
11
12
  import { GenAiChatAgentSwitching } from "./GenAiChatAgentSwitching.js";
12
13
  import { GenAiStore } from "./GenAiStore.js";
13
14
  import { useHighlight } from "./highlight/useHighlight.js";
@@ -67,8 +68,8 @@ function StandaloneInputContent({ onStart, onAgentSet, className, canManage, can
67
68
  * @internal
68
69
  */
69
70
  export function GenAIStandaloneInput(props) {
70
- const { backend, workspace, locale, ...rest } = props;
71
+ const { backend, workspace, locale, slots, ...rest } = props;
71
72
  const effectiveBackend = useBackendStrict(backend);
72
73
  const effectiveWorkspace = useWorkspaceStrict(workspace);
73
- return (_jsx(IntlWrapper, { locale: locale, children: _jsx(GenAiStore, { ...props, backend: effectiveBackend, workspace: effectiveWorkspace, children: _jsx(StandaloneInputContent, { ...rest }) }) }));
74
+ return (_jsx(IntlWrapper, { locale: locale, children: _jsx(GenAiStore, { ...props, backend: effectiveBackend, workspace: effectiveWorkspace, children: _jsx(CustomizationProvider, { slots: slots, children: _jsx(StandaloneInputContent, { ...rest }) }) }) }));
74
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GenAiChatAgentSwitching.d.ts","sourceRoot":"","sources":["../../src/components/GenAiChatAgentSwitching.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAA0B,MAAM,OAAO,CAAC;AAqChF,KAAK,+BAA+B,GAAG;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sBAAsB,EAAE,OAAO,CAAC;IAChC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC1D,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAsLF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,+BAA+B,2CAyChF"}
1
+ {"version":3,"file":"GenAiChatAgentSwitching.d.ts","sourceRoot":"","sources":["../../src/components/GenAiChatAgentSwitching.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAA0B,MAAM,OAAO,CAAC;AAqChF,KAAK,+BAA+B,GAAG;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sBAAsB,EAAE,OAAO,CAAC;IAChC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC1D,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AA6LF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,+BAA+B,2CAyChF"}