@gooddata/sdk-ui-gen-ai 11.55.0-alpha.3 → 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 (114) hide show
  1. package/NOTICE +8 -8
  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/GenAIChatWrapper.js +1 -1
  14. package/esm/components/GenAIStandaloneInput.d.ts +5 -0
  15. package/esm/components/GenAIStandaloneInput.d.ts.map +1 -1
  16. package/esm/components/GenAIStandaloneInput.js +3 -2
  17. package/esm/components/GenAiChatAgentSwitching.d.ts.map +1 -1
  18. package/esm/components/GenAiChatAgentSwitching.js +9 -3
  19. package/esm/components/GenAiConversations.d.ts +5 -0
  20. package/esm/components/GenAiConversations.d.ts.map +1 -1
  21. package/esm/components/GenAiConversations.js +2 -2
  22. package/esm/components/Messages.d.ts.map +1 -1
  23. package/esm/components/Messages.js +4 -5
  24. package/esm/components/customized/AgentChooser.d.ts +8 -0
  25. package/esm/components/customized/AgentChooser.d.ts.map +1 -0
  26. package/esm/components/customized/AgentChooser.js +11 -0
  27. package/esm/components/customized/AgentItem.d.ts +1 -1
  28. package/esm/components/customized/AgentItem.js +1 -1
  29. package/esm/components/customized/AssistantMessage.d.ts +8 -0
  30. package/esm/components/customized/AssistantMessage.d.ts.map +1 -0
  31. package/esm/components/customized/AssistantMessage.js +11 -0
  32. package/esm/components/customized/Disclaimer.d.ts +3 -1
  33. package/esm/components/customized/Disclaimer.d.ts.map +1 -1
  34. package/esm/components/customized/Disclaimer.js +3 -1
  35. package/esm/components/customized/Feedback.d.ts +8 -0
  36. package/esm/components/customized/Feedback.d.ts.map +1 -0
  37. package/esm/components/customized/Feedback.js +11 -0
  38. package/esm/components/customized/FollowUpButtons.d.ts +8 -0
  39. package/esm/components/customized/FollowUpButtons.d.ts.map +1 -0
  40. package/esm/components/customized/FollowUpButtons.js +11 -0
  41. package/esm/components/customized/FollowUpQuestion.d.ts +8 -0
  42. package/esm/components/customized/FollowUpQuestion.d.ts.map +1 -0
  43. package/esm/components/customized/FollowUpQuestion.js +11 -0
  44. package/esm/components/customized/LandingContainer.d.ts +6 -2
  45. package/esm/components/customized/LandingContainer.d.ts.map +1 -1
  46. package/esm/components/customized/LandingContainer.js +6 -2
  47. package/esm/components/customized/LandingQuestion.d.ts +6 -2
  48. package/esm/components/customized/LandingQuestion.d.ts.map +1 -1
  49. package/esm/components/customized/LandingQuestion.js +3 -1
  50. package/esm/components/customized/LandingScreen.d.ts +4 -2
  51. package/esm/components/customized/LandingScreen.d.ts.map +1 -1
  52. package/esm/components/customized/LandingScreen.js +3 -1
  53. package/esm/components/customized/LandingTitle.d.ts +7 -3
  54. package/esm/components/customized/LandingTitle.d.ts.map +1 -1
  55. package/esm/components/customized/LandingTitle.js +6 -2
  56. package/esm/components/customized/MessageErrorContent.d.ts +8 -0
  57. package/esm/components/customized/MessageErrorContent.d.ts.map +1 -0
  58. package/esm/components/customized/MessageErrorContent.js +11 -0
  59. package/esm/components/customized/MessageMultipartContent.d.ts +8 -0
  60. package/esm/components/customized/MessageMultipartContent.d.ts.map +1 -0
  61. package/esm/components/customized/MessageMultipartContent.js +11 -0
  62. package/esm/components/customized/MessageReasoningContent.d.ts +8 -0
  63. package/esm/components/customized/MessageReasoningContent.d.ts.map +1 -0
  64. package/esm/components/customized/MessageReasoningContent.js +11 -0
  65. package/esm/components/customized/MessageTextContent.d.ts +8 -0
  66. package/esm/components/customized/MessageTextContent.d.ts.map +1 -0
  67. package/esm/components/customized/MessageTextContent.js +11 -0
  68. package/esm/components/customized/UserMessage.d.ts +8 -0
  69. package/esm/components/customized/UserMessage.d.ts.map +1 -0
  70. package/esm/components/customized/UserMessage.js +11 -0
  71. package/esm/components/customized/types.d.ts +260 -1
  72. package/esm/components/customized/types.d.ts.map +1 -1
  73. package/esm/components/hooks/useSettingsClick.d.ts.map +1 -1
  74. package/esm/components/hooks/useSettingsClick.js +2 -0
  75. package/esm/components/messages/AssistantItem.d.ts.map +1 -1
  76. package/esm/components/messages/AssistantItem.js +3 -3
  77. package/esm/components/messages/AssistantItemFeedback.d.ts +3 -6
  78. package/esm/components/messages/AssistantItemFeedback.d.ts.map +1 -1
  79. package/esm/components/messages/AssistantItemFeedback.js +3 -9
  80. package/esm/components/messages/AssistantItemFollowUpButtons.d.ts +14 -0
  81. package/esm/components/messages/AssistantItemFollowUpButtons.d.ts.map +1 -0
  82. package/esm/components/messages/AssistantItemFollowUpButtons.js +23 -0
  83. package/esm/components/messages/AssistantItemFollowUpQuestion.d.ts +14 -0
  84. package/esm/components/messages/AssistantItemFollowUpQuestion.d.ts.map +1 -0
  85. package/esm/components/messages/AssistantItemFollowUpQuestion.js +8 -0
  86. package/esm/components/messages/AssistantItemSuggestions.d.ts +3 -3
  87. package/esm/components/messages/AssistantItemSuggestions.d.ts.map +1 -1
  88. package/esm/components/messages/AssistantItemSuggestions.js +7 -15
  89. package/esm/components/messages/ConversationItemContents.d.ts.map +1 -1
  90. package/esm/components/messages/ConversationItemContents.js +7 -43
  91. package/esm/components/messages/components/SemanticSearchTreeView.d.ts.map +1 -1
  92. package/esm/components/messages/components/SemanticSearchTreeView.js +2 -0
  93. package/esm/components/messages/contents/CustomHyperlink.d.ts.map +1 -1
  94. package/esm/components/messages/contents/CustomHyperlink.js +1 -0
  95. package/esm/components/messages/contents/VisualizationContents.d.ts.map +1 -1
  96. package/esm/components/messages/contents/VisualizationContents.js +2 -0
  97. package/esm/components/messages/conversationContents/ConversationDashboardContent.d.ts.map +1 -1
  98. package/esm/components/messages/conversationContents/ConversationDashboardContent.js +1 -0
  99. package/esm/components/messages/conversationContents/ConversationMultipartContent.d.ts +8 -0
  100. package/esm/components/messages/conversationContents/ConversationMultipartContent.d.ts.map +1 -0
  101. package/esm/components/messages/conversationContents/ConversationMultipartContent.js +40 -0
  102. package/esm/components/messages/conversationContents/ConversationVisualizationContent.js +2 -0
  103. package/esm/components/utils/groupUtility.d.ts +3 -0
  104. package/esm/components/utils/groupUtility.d.ts.map +1 -1
  105. package/esm/index.d.ts +12 -1
  106. package/esm/index.d.ts.map +1 -1
  107. package/esm/index.js +10 -0
  108. package/esm/sdk-ui-gen-ai.d.ts +378 -11
  109. package/esm/store/sideEffects/onVisualizationSuccessSave.d.ts.map +1 -1
  110. package/esm/store/sideEffects/onVisualizationSuccessSave.js +2 -0
  111. package/esm/whatIf/whatIfMapping.d.ts +2 -2
  112. package/esm/whatIf/whatIfMapping.d.ts.map +1 -1
  113. package/esm/whatIf/whatIfMapping.js +3 -3
  114. package/package.json +20 -21
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-31
10
+ Date generated: 2026-9-1
11
11
 
12
- Revision ID: 14f5c085f7e749fb111a5c2dfbbf7a3d25b73682
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
 
@@ -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-31
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 m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G,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,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AM,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)}…`;
@@ -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"}
@@ -8,9 +8,9 @@ import { UiIconButton, UiTooltip } from "@gooddata/sdk-ui-kit";
8
8
  import { agentSwitchingActiveSelector, agentSwitchingEnabledSelector, reasoningEffortEnabledSelector, } from "../store/chatWindow/chatWindowSelectors.js";
9
9
  import { agentsSelector, conversationSelector, conversationsLoadedSelector, conversationsSelector, selectedAgentIdSelector, selectedEffortSelector, } from "../store/messages/messagesSelectors.js";
10
10
  import { setSelectedAgentAction, setSelectedEffortAction } from "../store/messages/messagesSlice.js";
11
- import { GenAIChatAgentDropdown } from "./GenAIChatAgentDropdown.js";
11
+ import { useCustomization } from "./CustomizationContext.js";
12
12
  import { GenAIChatEffortDropdown } from "./GenAIChatEffortDropdown.js";
13
- import { getAgentSelectionStatus } from "./utils/agentSelection.js";
13
+ import { getAgentSelectionStatus, getEffectiveSelectedAgentId } from "./utils/agentSelection.js";
14
14
  const msgs = defineMessages({
15
15
  send: {
16
16
  id: "gd.gen-ai.button.send",
@@ -21,6 +21,7 @@ const msgs = defineMessages({
21
21
  });
22
22
  function GenAiChatAgentSwitchingCore({ agentSwitchingEnabled, isAssistantLoading, isConversationsLoading, handleSubmit, conversations, conversation, agentDropdownDisabled, agents, selectedAgentId, selectedEffort, reasoningEffortEnabled, agentSwitchingActive, disabled, onMouseDown, setSelectedAgent, setSelectedEffort, setBusy, setNoAgents, leftContent, }) {
23
23
  const intl = useIntl();
24
+ const { AgentChooserComponent } = useCustomization();
24
25
  const sendLabel = intl.formatMessage(msgs.send);
25
26
  const noAgentAvailableLabel = intl.formatMessage(msgs.noAgentAvailable);
26
27
  const { availableAgents, hasNoAgents, isSelectionLoading } = getAgentSelectionStatus({
@@ -30,6 +31,11 @@ function GenAiChatAgentSwitchingCore({ agentSwitchingEnabled, isAssistantLoading
30
31
  agents,
31
32
  selectedAgentId,
32
33
  });
34
+ const effectiveSelectedAgentId = getEffectiveSelectedAgentId({
35
+ agents: availableAgents,
36
+ conversationAgentId: conversation?.agentId,
37
+ selectedAgentId,
38
+ });
33
39
  const buttonDisabled = disabled || (agentSwitchingActive && hasNoAgents);
34
40
  const isBusy = agentSwitchingActive && (hasNoAgents || isSelectionLoading);
35
41
  const handleSubmitHandler = useCallback(() => {
@@ -61,7 +67,7 @@ function GenAiChatAgentSwitchingCore({ agentSwitchingEnabled, isAssistantLoading
61
67
  "gd-gen-ai-chat__input__actions": agentSwitchingEnabled,
62
68
  "gd-gen-ai-chat__input__send_button": !agentSwitchingEnabled,
63
69
  "gd-gen-ai-chat__input__send_button--disabled": !agentSwitchingEnabled && buttonDisabled,
64
- }), onMouseDown: agentSwitchingEnabled ? onMouseDown : undefined, children: [leftContent, agentSwitchingActive && hasNoAgents ? (_jsx("span", { className: "gd-gen-ai-chat__input__no-agent", "data-testid": "no_agent_available", role: "status", "aria-live": "polite", "aria-atomic": "true", children: noAgentAvailableLabel })) : agentSwitchingEnabled ? (_jsxs(_Fragment, { children: [agentSwitchingActive ? (_jsx(GenAIChatAgentDropdown, { agents: availableAgents, conversations: conversations, conversationAgentId: conversation?.agentId, selectedAgentId: selectedAgentId, isDisabled: agentDropdownDisabled || isSelectionLoading, isLoading: isSelectionLoading, onSelectAgent: handleSelectAgent, reasoningEnabled: reasoningEffortEnabled, selectedEffort: selectedEffort, onSelectEffort: handleSelectEffort })) : reasoningEffortEnabled ? (_jsx(GenAIChatEffortDropdown, { selectedEffort: selectedEffort, isDisabled: agentDropdownDisabled, onSelectEffort: handleSelectEffort })) : null, _jsx(UiTooltip, { triggerBy: ["focus", "hover"], arrowPlacement: "bottom", anchor: _jsx(UiIconButton, { icon: "arrowUp", variant: "primary", size: "small", dataTestId: "send_message", isDisabled: buttonDisabled, onClick: buttonDisabled ? undefined : handleSubmitHandler, accessibilityConfig: {
70
+ }), onMouseDown: agentSwitchingEnabled ? onMouseDown : undefined, children: [leftContent, agentSwitchingActive && hasNoAgents ? (_jsx("span", { className: "gd-gen-ai-chat__input__no-agent", "data-testid": "no_agent_available", role: "status", "aria-live": "polite", "aria-atomic": "true", children: noAgentAvailableLabel })) : agentSwitchingEnabled ? (_jsxs(_Fragment, { children: [agentSwitchingActive ? (_jsx(AgentChooserComponent, { agents: availableAgents, conversations: conversations, conversationAgentId: conversation?.agentId, selectedAgentId: selectedAgentId, effectiveSelectedAgentId: effectiveSelectedAgentId, isDisabled: agentDropdownDisabled || isSelectionLoading, isLoading: isSelectionLoading, onSelectAgent: handleSelectAgent, selectedEffort: selectedEffort, onSelectEffort: handleSelectEffort })) : reasoningEffortEnabled ? (_jsx(GenAIChatEffortDropdown, { selectedEffort: selectedEffort, isDisabled: agentDropdownDisabled, onSelectEffort: handleSelectEffort })) : null, _jsx(UiTooltip, { triggerBy: ["focus", "hover"], arrowPlacement: "bottom", anchor: _jsx(UiIconButton, { icon: "arrowUp", variant: "primary", size: "small", dataTestId: "send_message", isDisabled: buttonDisabled, onClick: buttonDisabled ? undefined : handleSubmitHandler, accessibilityConfig: {
65
71
  ariaLabel: sendLabel,
66
72
  } }), content: sendLabel })
67
73
  ] })) : (_jsx(UiTooltip, { triggerBy: ["focus", "hover"], arrowPlacement: "bottom", anchor: _jsx(UiIconButton, { icon: "send", variant: "tertiary", size: "medium", dataTestId: "send_message", isDisabled: buttonDisabled, onClick: buttonDisabled ? undefined : handleSubmitHandler, accessibilityConfig: {
@@ -1,4 +1,5 @@
1
1
  import { type IChatConversationLocal } from "../model.js";
2
+ import type { IGenAIAssistantSlots } from "./customized/types.js";
2
3
  import { type GenAiStoreProps } from "./GenAiStore.js";
3
4
  /**
4
5
  * Properties for the GenAIConversations component.
@@ -18,6 +19,10 @@ export type GenAIConversationsProps = Omit<GenAiStoreProps, "children"> & {
18
19
  * Additional class name applied to the root element.
19
20
  */
20
21
  className?: string;
22
+ /**
23
+ * Customizations for the Gen AI assistant.
24
+ */
25
+ slots?: IGenAIAssistantSlots;
21
26
  };
22
27
  /**
23
28
  * UI component that renders the Gen AI assistant.
@@ -1 +1 @@
1
- {"version":3,"file":"GenAiConversations.d.ts","sourceRoot":"","sources":["../../src/components/GenAiConversations.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAa1D,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGnE;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IACtE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACtE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAiDhE"}
1
+ {"version":3,"file":"GenAiConversations.d.ts","sourceRoot":"","sources":["../../src/components/GenAiConversations.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAY1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGnE;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IACtE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACtE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAiDhE"}
@@ -26,7 +26,7 @@ export function GenAIConversations(props) {
26
26
  return (_jsx(IntlWrapper, { locale: locale, children: _jsx(GenAiStore, { providedStore: providedStore, backend: effectiveBackend, workspace: effectiveWorkspace, onDispatcher: onDispatcher, eventHandlers: eventHandlers, allowNativeLinks: allowNativeLinks, onLinkClick: onLinkClick, settings: settings, catalogItems: catalogItems, isPreview: isPreview, excludeTags: excludeTags, includeTags: includeTags, colorPalette: colorPalette, objectTypes: objectTypes, children: _jsx(BackendProvider, { backend: effectiveBackend, children: _jsx(WorkspaceProvider, { workspace: effectiveWorkspace, children: _jsx(PermissionsProvider, { children: _jsx(GenAIConversationsContent, { ...props }) }) }) }) }) }));
27
27
  }
28
28
  function GenAIConversationsContent(props) {
29
- const { catalogItems, className, onConversationSelect = noop } = props;
29
+ const { catalogItems, className, onConversationSelect = noop, slots } = props;
30
30
  const dispatch = useDispatch();
31
31
  const settings = useSelector(settingsSelector);
32
32
  const { loading } = usePermissions();
@@ -46,5 +46,5 @@ function GenAIConversationsContent(props) {
46
46
  dispatch(setCurrentConversationAction({ conversation }));
47
47
  onConversationSelect(conversation);
48
48
  }, [dispatch, onConversationSelect]);
49
- return (_jsx(ConfigProvider, { catalogItems: catalogItems, allowNativeLinks: false, canFullControl: false, canManage: false, canAnalyze: false, children: _jsx(CustomizationProvider, { children: _jsx(GenAIChatConversations, { wrapper: _jsx("div", { className: classNames }), onSelect: onSelectConversation }) }) }));
49
+ return (_jsx(ConfigProvider, { catalogItems: catalogItems, allowNativeLinks: false, canFullControl: false, canManage: false, canAnalyze: false, children: _jsx(CustomizationProvider, { slots: slots, children: _jsx(GenAIChatConversations, { wrapper: _jsx("div", { className: classNames }), onSelect: onSelectConversation }) }) }));
50
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Messages.d.ts","sourceRoot":"","sources":["../../src/components/Messages.tsx"],"names":[],"mappings":"AAoCA,KAAK,sBAAsB,GAAG;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EAAE,YAAY,EAAE,EAAE,sBAAsB,2CAmDhE"}
1
+ {"version":3,"file":"Messages.d.ts","sourceRoot":"","sources":["../../src/components/Messages.tsx"],"names":[],"mappings":"AAkCA,KAAK,sBAAsB,GAAG;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EAAE,YAAY,EAAE,EAAE,sBAAsB,2CAmDhE"}
@@ -9,15 +9,13 @@ import { agentSwitchingActiveSelector, catalogItemsSelector, } from "../store/ch
9
9
  import { asyncProcessSelector, conversationMessagesSelector, conversationSelector, messagesSelector, } from "../store/messages/messagesSelectors.js";
10
10
  import { ChatSkeleton } from "./ChatSkeleton.js";
11
11
  import { parseReferences } from "./completion/references.js";
12
- import { useCustomization } from "./CustomizationProvider.js";
12
+ import { useCustomization } from "./CustomizationContext.js";
13
13
  import { useFullscreenCheck } from "./hooks/useFullscreenCheck.js";
14
- import { AssistantItemComponent } from "./messages/AssistantItem.js";
15
14
  import { AssistantMessageComponent } from "./messages/AssistantMessage.js";
16
15
  import { ItemsGroup } from "./messages/ItemsGroup.js";
17
16
  import { useMessageScroller } from "./messages/MessageScroller.js";
18
17
  import { SystemItemComponent } from "./messages/SystemItem.js";
19
18
  import { ToolItemComponent } from "./messages/ToolItem.js";
20
- import { UserItemComponent } from "./messages/UserItem.js";
21
19
  import { UserMessageComponent } from "./messages/UserMessage.js";
22
20
  import { groupMessages } from "./utils/groupUtility.js";
23
21
  export function Messages({ initializing }) {
@@ -63,6 +61,7 @@ function ConversationMessages({ messages, catalogItems }) {
63
61
  });
64
62
  }, [messages, catalogItems]);
65
63
  const groups = useMemo(() => groupMessages(currentMessages), [currentMessages]);
64
+ const { UserMessageComponent, AssistantMessageComponent } = useCustomization();
66
65
  return (_jsx(_Fragment, { children: groups.map((group, gi) => {
67
66
  const previousGroup = groups[gi - 1];
68
67
  const isLastGroup = gi === groups.length - 1;
@@ -70,9 +69,9 @@ function ConversationMessages({ messages, catalogItems }) {
70
69
  const isLast = isLastGroup && mi === group.messages.length - 1;
71
70
  switch (message.role) {
72
71
  case "user":
73
- return (_jsx(UserItemComponent, { groups: groups, message: message, isLast: isLast }, message.localId));
72
+ return (_jsx(UserMessageComponent, { groups: groups, message: message, isLast: isLast }, message.localId));
74
73
  case "assistant":
75
- return (_jsx(AssistantItemComponent, { groups: groups, message: message, isLast: isLast }, message.localId));
74
+ return (_jsx(AssistantMessageComponent, { groups: groups, message: message, isLast: isLast }, message.localId));
76
75
  case "tool":
77
76
  return (_jsx(ToolItemComponent, { groups: groups, message: message, isLast: isLast }, message.localId));
78
77
  case "system":
@@ -0,0 +1,8 @@
1
+ import type { IGenAIAssistantAgentChooserProps } from "./types.js";
2
+ /**
3
+ * Default implementation of the AgentChooser slot.
4
+ *
5
+ * @alpha
6
+ */
7
+ export declare function DefaultAgentChooser(props: IGenAIAssistantAgentChooserProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=AgentChooser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentChooser.d.ts","sourceRoot":"","sources":["../../../src/components/customized/AgentChooser.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gCAAgC,2CAE1E"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2026 GoodData Corporation
3
+ import { GenAIChatAgentDropdown } from "../GenAIChatAgentDropdown.js";
4
+ /**
5
+ * Default implementation of the AgentChooser slot.
6
+ *
7
+ * @alpha
8
+ */
9
+ export function DefaultAgentChooser(props) {
10
+ return _jsx(GenAIChatAgentDropdown, { ...props });
11
+ }
@@ -2,7 +2,7 @@ import { type IGenAIAssistantAgentItemProps } from "./types.js";
2
2
  /**
3
3
  * Default implementation of the AgentItem slot.
4
4
  *
5
- * @public
5
+ * @alpha
6
6
  */
7
7
  export declare function DefaultAgentItem(props: IGenAIAssistantAgentItemProps): import("react/jsx-runtime").JSX.Element;
8
8
  //# sourceMappingURL=AgentItem.d.ts.map
@@ -4,7 +4,7 @@ import { DefaultUiMenuInteractiveItemWrapper } from "@gooddata/sdk-ui-kit";
4
4
  /**
5
5
  * Default implementation of the AgentItem slot.
6
6
  *
7
- * @public
7
+ * @alpha
8
8
  */
9
9
  export function DefaultAgentItem(props) {
10
10
  const { menuItemProps, Content } = props;
@@ -0,0 +1,8 @@
1
+ import { type IGenAIAssistantAssistantMessageProps } from "./types.js";
2
+ /**
3
+ * Default implementation of the AssistantMessage slot.
4
+ *
5
+ * @alpha
6
+ */
7
+ export declare function DefaultAssistantMessage(props: IGenAIAssistantAssistantMessageProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=AssistantMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssistantMessage.d.ts","sourceRoot":"","sources":["../../../src/components/customized/AssistantMessage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,YAAY,CAAC;AAEvE;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,oCAAoC,2CAElF"}