@gooddata/sdk-ui-gen-ai 11.42.0-alpha.2 → 11.42.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 (125) hide show
  1. package/NOTICE +6 -6
  2. package/esm/components/GenAIChatAgentDropdown.d.ts.map +1 -1
  3. package/esm/components/GenAIChatAgentDropdown.js +2 -2
  4. package/esm/components/Messages.js +4 -4
  5. package/esm/components/completion/references.d.ts +1 -1
  6. package/esm/components/completion/references.d.ts.map +1 -1
  7. package/esm/components/completion/references.js +11 -6
  8. package/esm/components/completion/useToolsReferences.d.ts +1 -1
  9. package/esm/components/completion/useToolsReferences.d.ts.map +1 -1
  10. package/esm/components/completion/useToolsReferences.js +2 -4
  11. package/esm/components/completion/utils.d.ts +3 -1
  12. package/esm/components/completion/utils.d.ts.map +1 -1
  13. package/esm/components/completion/utils.js +18 -1
  14. package/esm/components/customized/LandingQuestion.d.ts +3 -2
  15. package/esm/components/customized/LandingQuestion.d.ts.map +1 -1
  16. package/esm/components/customized/LandingQuestion.js +4 -5
  17. package/esm/components/customized/LandingScreen.d.ts.map +1 -1
  18. package/esm/components/customized/LandingScreen.js +4 -5
  19. package/esm/components/messages/AssistantItem.d.ts +1 -1
  20. package/esm/components/messages/AssistantItem.d.ts.map +1 -1
  21. package/esm/components/messages/AssistantItem.js +2 -2
  22. package/esm/components/messages/AssistantItemSuggestions.d.ts +3 -2
  23. package/esm/components/messages/AssistantItemSuggestions.d.ts.map +1 -1
  24. package/esm/components/messages/AssistantItemSuggestions.js +3 -2
  25. package/esm/components/messages/ConversationItemContents.d.ts.map +1 -1
  26. package/esm/components/messages/ConversationItemContents.js +4 -0
  27. package/esm/components/messages/SystemItem.d.ts +1 -1
  28. package/esm/components/messages/SystemItem.d.ts.map +1 -1
  29. package/esm/components/messages/ToolItem.d.ts +1 -1
  30. package/esm/components/messages/ToolItem.d.ts.map +1 -1
  31. package/esm/components/messages/UserItem.d.ts +1 -1
  32. package/esm/components/messages/UserItem.d.ts.map +1 -1
  33. package/esm/components/messages/conversationContents/ConversationAlertProposalContent.d.ts +11 -0
  34. package/esm/components/messages/conversationContents/ConversationAlertProposalContent.d.ts.map +1 -0
  35. package/esm/components/messages/conversationContents/ConversationAlertProposalContent.js +64 -0
  36. package/esm/hooks/useGenAIStore.d.ts.map +1 -1
  37. package/esm/hooks/useGenAIStore.js +8 -7
  38. package/esm/localization/bundles/de-DE.localization-bundle.d.ts +23 -0
  39. package/esm/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
  40. package/esm/localization/bundles/de-DE.localization-bundle.js +23 -0
  41. package/esm/localization/bundles/en-AU.localization-bundle.d.ts +23 -0
  42. package/esm/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
  43. package/esm/localization/bundles/en-AU.localization-bundle.js +23 -0
  44. package/esm/localization/bundles/en-GB.localization-bundle.d.ts +23 -0
  45. package/esm/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
  46. package/esm/localization/bundles/en-GB.localization-bundle.js +23 -0
  47. package/esm/localization/bundles/en-US.localization-bundle.d.ts +92 -0
  48. package/esm/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  49. package/esm/localization/bundles/en-US.localization-bundle.js +92 -0
  50. package/esm/localization/bundles/es-419.localization-bundle.d.ts +23 -0
  51. package/esm/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
  52. package/esm/localization/bundles/es-419.localization-bundle.js +23 -0
  53. package/esm/localization/bundles/es-ES.localization-bundle.d.ts +23 -0
  54. package/esm/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
  55. package/esm/localization/bundles/es-ES.localization-bundle.js +23 -0
  56. package/esm/localization/bundles/fi-FI.localization-bundle.d.ts +23 -0
  57. package/esm/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
  58. package/esm/localization/bundles/fi-FI.localization-bundle.js +23 -0
  59. package/esm/localization/bundles/fr-CA.localization-bundle.d.ts +23 -0
  60. package/esm/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
  61. package/esm/localization/bundles/fr-CA.localization-bundle.js +23 -0
  62. package/esm/localization/bundles/fr-FR.localization-bundle.d.ts +23 -0
  63. package/esm/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
  64. package/esm/localization/bundles/fr-FR.localization-bundle.js +23 -0
  65. package/esm/localization/bundles/id-ID.localization-bundle.d.ts +23 -0
  66. package/esm/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
  67. package/esm/localization/bundles/id-ID.localization-bundle.js +23 -0
  68. package/esm/localization/bundles/it-IT.localization-bundle.d.ts +23 -0
  69. package/esm/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
  70. package/esm/localization/bundles/it-IT.localization-bundle.js +23 -0
  71. package/esm/localization/bundles/ja-JP.localization-bundle.d.ts +23 -0
  72. package/esm/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
  73. package/esm/localization/bundles/ja-JP.localization-bundle.js +23 -0
  74. package/esm/localization/bundles/ko-KR.localization-bundle.d.ts +23 -0
  75. package/esm/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
  76. package/esm/localization/bundles/ko-KR.localization-bundle.js +23 -0
  77. package/esm/localization/bundles/nl-NL.localization-bundle.d.ts +23 -0
  78. package/esm/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
  79. package/esm/localization/bundles/nl-NL.localization-bundle.js +23 -0
  80. package/esm/localization/bundles/pl-PL.localization-bundle.d.ts +23 -0
  81. package/esm/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
  82. package/esm/localization/bundles/pl-PL.localization-bundle.js +23 -0
  83. package/esm/localization/bundles/pt-BR.localization-bundle.d.ts +23 -0
  84. package/esm/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
  85. package/esm/localization/bundles/pt-BR.localization-bundle.js +23 -0
  86. package/esm/localization/bundles/pt-PT.localization-bundle.d.ts +23 -0
  87. package/esm/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
  88. package/esm/localization/bundles/pt-PT.localization-bundle.js +23 -0
  89. package/esm/localization/bundles/ru-RU.localization-bundle.d.ts +23 -0
  90. package/esm/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
  91. package/esm/localization/bundles/ru-RU.localization-bundle.js +23 -0
  92. package/esm/localization/bundles/sl-SI.localization-bundle.d.ts +23 -0
  93. package/esm/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
  94. package/esm/localization/bundles/sl-SI.localization-bundle.js +23 -0
  95. package/esm/localization/bundles/th-TH.localization-bundle.d.ts +23 -0
  96. package/esm/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
  97. package/esm/localization/bundles/th-TH.localization-bundle.js +23 -0
  98. package/esm/localization/bundles/tr-TR.localization-bundle.d.ts +23 -0
  99. package/esm/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
  100. package/esm/localization/bundles/tr-TR.localization-bundle.js +23 -0
  101. package/esm/localization/bundles/uk-UA.localization-bundle.d.ts +23 -0
  102. package/esm/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
  103. package/esm/localization/bundles/uk-UA.localization-bundle.js +23 -0
  104. package/esm/localization/bundles/vi-VN.localization-bundle.d.ts +23 -0
  105. package/esm/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
  106. package/esm/localization/bundles/vi-VN.localization-bundle.js +23 -0
  107. package/esm/localization/bundles/zh-HK.localization-bundle.d.ts +23 -0
  108. package/esm/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
  109. package/esm/localization/bundles/zh-HK.localization-bundle.js +23 -0
  110. package/esm/localization/bundles/zh-Hans.localization-bundle.d.ts +23 -0
  111. package/esm/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
  112. package/esm/localization/bundles/zh-Hans.localization-bundle.js +23 -0
  113. package/esm/localization/bundles/zh-Hant.localization-bundle.d.ts +23 -0
  114. package/esm/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
  115. package/esm/localization/bundles/zh-Hant.localization-bundle.js +23 -0
  116. package/esm/sdk-ui-gen-ai.d.ts +2 -1
  117. package/esm/store/sideEffects/onChatOpenSync.d.ts.map +1 -1
  118. package/esm/store/sideEffects/onChatOpenSync.js +16 -1
  119. package/package.json +20 -20
  120. package/styles/css/main.css +82 -32
  121. package/styles/css/main.css.map +1 -1
  122. package/styles/css/messages.css +81 -32
  123. package/styles/css/messages.css.map +1 -1
  124. package/styles/scss/main.scss +1 -0
  125. package/styles/scss/messages.scss +92 -34
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-6-10
10
+ Date generated: 2026-6-15
11
11
 
12
- Revision ID: f75738464fd32f3d4e0f874c715181b53a187ef8
12
+ Revision ID: a109cf6c2e762b7d0655e4f6da695420f910643f
13
13
 
14
14
  ================================================================================
15
15
  ================================================================================
@@ -383,7 +383,7 @@ Revision ID: f75738464fd32f3d4e0f874c715181b53a187ef8
383
383
  - balanced-match (2.0.0) [MIT]
384
384
  - balanced-match (4.0.4) [MIT]
385
385
  - base64-js (1.5.1) [MIT]
386
- - baseline-browser-mapping (2.10.34) [Apache-2.0]
386
+ - baseline-browser-mapping (2.10.37) [Apache-2.0]
387
387
  - batch (0.6.1) [MIT]
388
388
  - binary-extensions (2.3.0) [MIT]
389
389
  - bl (4.1.0) [MIT]
@@ -5454,9 +5454,9 @@ MIT
5454
5454
 
5455
5455
 
5456
5456
  --------------------------------------------------------------------------------
5457
- Package Title: baseline-browser-mapping (2.10.34)
5457
+ Package Title: baseline-browser-mapping (2.10.37)
5458
5458
 
5459
- Package Locator: npm+baseline-browser-mapping$2.10.34
5459
+ Package Locator: npm+baseline-browser-mapping$2.10.37
5460
5460
 
5461
5461
  Package Depth: Transitive
5462
5462
  --------------------------------------------------------------------------------
@@ -38571,4 +38571,4 @@ POSSIBILITY OF SUCH DAMAGE.
38571
38571
  --------------------------------------------------------------------------------
38572
38572
  --------------------------------------------------------------------------------
38573
38573
 
38574
- Report Generated by FOSSA on 2026-6-10
38574
+ Report Generated by FOSSA on 2026-6-15
@@ -1 +1 @@
1
- {"version":3,"file":"GenAIChatAgentDropdown.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatAgentDropdown.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAiB3E,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;CACjG,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EACnC,MAAM,EACN,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,SAAS,EACT,aAAa,EAChB,EAAE,2BAA2B,2CAqH7B"}
1
+ {"version":3,"file":"GenAIChatAgentDropdown.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatAgentDropdown.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAiB3E,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;CACjG,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EACnC,MAAM,EACN,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,SAAS,EACT,aAAa,EAChB,EAAE,2BAA2B,2CAsH7B"}
@@ -59,13 +59,13 @@ export function GenAIChatAgentDropdown({ agents, conversations, conversationAgen
59
59
  ariaAttributes: agent.description
60
60
  ? { "aria-label": `${agent.title}. ${agent.description}` }
61
61
  : undefined,
62
- iconRight: agent.description ? (_jsx(UiIcon, { type: "question", size: 12, color: isSelected ? "complementary-7" : "complementary-5", accessibilityConfig: { ariaHidden: true } })) : undefined,
62
+ iconRight: agent.description ? (_jsx(UiIcon, { type: "question", size: 12, color: "complementary-5", accessibilityConfig: { ariaHidden: true } })) : undefined,
63
63
  };
64
64
  }), [agents, effectiveSelectedAgentId]);
65
65
  return (_jsxs(_Fragment, { children: [
66
66
  _jsx("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: isLoading ? loadingLabel : "" }), _jsx(Dropdown, { className: cx("gd-gen-ai-chat__input__agent-dropdown", {
67
67
  "gd-gen-ai-chat__input__agent-dropdown--loading": isLoading,
68
- }), alignPoints: [{ align: "tr br", offset: { x: 0, y: 0 } }], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, accessibilityConfig: {}, renderButton: ({ isOpen, toggleDropdown, accessibilityConfig }) => (_jsx(UiButton, { label: isLoading ? loadingLabel : (selectedAgent?.title ?? agentLabel), variant: "dropdownInline", size: "small", iconAfter: isLoading ? undefined : isOpen ? "navigateUp" : "navigateDown", isDisabled: isLoading || isDisabled || !agents.length, onClick: toggleDropdown, dataTestId: "agent_dropdown_button", accessibilityConfig: accessibilityConfig })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(UiMenu, { dataTestId: "agent_dropdown_menu", items: items, size: "small", minWidth: 160, maxWidth: 220, containerTopPadding: "small", containerBottomPadding: "small", MenuHeader: AgentMenuHeader, ariaAttributes: ariaAttributes, onSelect: (item) => {
68
+ }), alignPoints: [{ align: "tr br", offset: { x: 0, y: 0 } }], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, accessibilityConfig: {}, renderButton: ({ isOpen, toggleDropdown, accessibilityConfig }) => (_jsx(UiButton, { label: isLoading ? loadingLabel : (selectedAgent?.title ?? agentLabel), variant: "dropdownInline", size: "small", iconAfter: isLoading ? undefined : isOpen ? "navigateUp" : "navigateDown", isDisabled: isLoading || isDisabled || !agents.length, onClick: toggleDropdown, dataTestId: "agent_dropdown_button", accessibilityConfig: accessibilityConfig, disableIconAnimation: true })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(UiMenu, { dataTestId: "agent_dropdown_menu", items: items, size: "small", minWidth: 160, maxWidth: 220, containerTopPadding: "small", containerBottomPadding: "small", MenuHeader: AgentMenuHeader, ariaAttributes: ariaAttributes, onSelect: (item) => {
69
69
  onSelectAgent(item.data.id, { showChangeEvent: true });
70
70
  closeDropdown();
71
71
  } })) })] }));
@@ -64,13 +64,13 @@ function ConversationMessages({ messages, catalogItems }) {
64
64
  const isLast = isLastGroup && mi === group.messages.length - 1;
65
65
  switch (message.role) {
66
66
  case "user":
67
- return (_jsx(UserItemComponent, { groups: [previousGroup, group], message: message, isLast: isLast }, message.localId));
67
+ return (_jsx(UserItemComponent, { groups: groups, message: message, isLast: isLast }, message.localId));
68
68
  case "assistant":
69
- return (_jsx(AssistantItemComponent, { groups: [previousGroup, group], message: message, isLast: isLast }, message.localId));
69
+ return (_jsx(AssistantItemComponent, { groups: groups, message: message, isLast: isLast }, message.localId));
70
70
  case "tool":
71
- return (_jsx(ToolItemComponent, { groups: [previousGroup, group], message: message, isLast: isLast }, message.localId));
71
+ return (_jsx(ToolItemComponent, { groups: groups, message: message, isLast: isLast }, message.localId));
72
72
  case "system":
73
- return (_jsx(SystemItemComponent, { groups: [previousGroup, group], message: message }, message.localId));
73
+ return (_jsx(SystemItemComponent, { groups: groups, message: message }, message.localId));
74
74
  default:
75
75
  return assertNever(message.role);
76
76
  }
@@ -2,7 +2,7 @@ import { type CatalogItem, type ICatalogDateAttribute } from "@gooddata/sdk-mode
2
2
  import { type IChatConversationLocalItem, type IChatConversationMultipartLocalPart, type TextContentObject } from "../../model.js";
3
3
  export declare const REFERENCE_REGEX_PART = "[^{}\\/]+\\/[^{}]+";
4
4
  export declare const REFERENCE_REGEX: RegExp;
5
- export declare function collectReferences(text: string, used: (CatalogItem | ICatalogDateAttribute)[]): TextContentObject[];
5
+ export declare function collectReferences(where: string | true, used: (CatalogItem | ICatalogDateAttribute)[]): TextContentObject[];
6
6
  export declare function parseReferences<T extends IChatConversationLocalItem["content"] | IChatConversationMultipartLocalPart>(content: T, catalogItems: CatalogItem[]): T;
7
7
  export declare function replaceReferences(text: string, references: TextContentObject[]): string;
8
8
  //# sourceMappingURL=references.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../../src/components/completion/references.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,WAAW,EAEhB,KAAK,qBAAqB,EAG7B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACH,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACzB,MAAM,gBAAgB,CAAC;AAIxB,eAAO,MAAM,oBAAoB,uBAAuB,CAAC;AACzD,eAAO,MAAM,eAAe,QAAmD,CAAC;AAEhF,wBAAgB,iBAAiB,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,CAAC,WAAW,GAAG,qBAAqB,CAAC,EAAE,GAC9C,iBAAiB,EAAE,CAiBrB;AAuBD,wBAAgB,eAAe,CAC3B,CAAC,SAAS,0BAA0B,CAAC,SAAS,CAAC,GAAG,mCAAmC,EACvF,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,CAAC,CAyB5C;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAMvF"}
1
+ {"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../../src/components/completion/references.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,WAAW,EAEhB,KAAK,qBAAqB,EAG7B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACH,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACzB,MAAM,gBAAgB,CAAC;AAIxB,eAAO,MAAM,oBAAoB,uBAAuB,CAAC;AACzD,eAAO,MAAM,eAAe,QAAmD,CAAC;AAEhF,wBAAgB,iBAAiB,CAC7B,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,IAAI,EAAE,CAAC,WAAW,GAAG,qBAAqB,CAAC,EAAE,GAC9C,iBAAiB,EAAE,CAiBrB;AAuBD,wBAAgB,eAAe,CAC3B,CAAC,SAAS,0BAA0B,CAAC,SAAS,CAAC,GAAG,mCAAmC,EACvF,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,CAAC,CA8B5C;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAMvF"}
@@ -3,29 +3,29 @@ import { isCatalogAttribute, isCatalogDateDataset, } from "@gooddata/sdk-model";
3
3
  import { getCatalogItemId, getCatalogItemTitle, getCatalogItemType } from "./utils.js";
4
4
  export const REFERENCE_REGEX_PART = "[^{}\\/]+\\/[^{}]+";
5
5
  export const REFERENCE_REGEX = new RegExp(`\\{${REFERENCE_REGEX_PART}\\}`, "g");
6
- export function collectReferences(text, used) {
6
+ export function collectReferences(where, used) {
7
7
  const items = [];
8
8
  used.forEach((item) => {
9
- collectReference(items, text, item);
9
+ collectReference(items, where, item);
10
10
  if (isCatalogDateDataset(item)) {
11
11
  item.dateAttributes.forEach((dateAttribute) => {
12
- collectReference(items, text, dateAttribute);
12
+ collectReference(items, where, dateAttribute);
13
13
  });
14
14
  }
15
15
  if (isCatalogAttribute(item)) {
16
16
  item.displayForms.forEach((displayForm) => {
17
- collectReference(items, text, displayForm);
17
+ collectReference(items, where, displayForm);
18
18
  });
19
19
  }
20
20
  });
21
21
  return items;
22
22
  }
23
- function collectReference(items, text, item) {
23
+ function collectReference(items, where, item) {
24
24
  const id = getCatalogItemId(item);
25
25
  const type = getCatalogItemType(item);
26
26
  if (id && type) {
27
27
  const regex = new RegExp(`\\{${type}/${id}\\}`, "g");
28
- if (regex.test(text)) {
28
+ if (where === true || regex.test(where)) {
29
29
  const title = getCatalogItemTitle(item);
30
30
  items.push({
31
31
  id,
@@ -40,6 +40,11 @@ export function parseReferences(content, catalogItems) {
40
40
  return content;
41
41
  }
42
42
  switch (content.type) {
43
+ case "alertProposal":
44
+ return {
45
+ ...content,
46
+ objects: collectReferences(true, catalogItems),
47
+ };
43
48
  case "reasoning":
44
49
  return {
45
50
  ...content,
@@ -1,4 +1,4 @@
1
1
  import { type TextContentObject } from "../../model.js";
2
2
  import { type IChatMessagesGroup } from "../utils/groupUtility.js";
3
- export declare function useToolsReferences(g: [IChatMessagesGroup | undefined, IChatMessagesGroup]): TextContentObject[];
3
+ export declare function useToolsReferences(groups: IChatMessagesGroup[]): TextContentObject[];
4
4
  //# sourceMappingURL=useToolsReferences.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useToolsReferences.d.ts","sourceRoot":"","sources":["../../../src/components/completion/useToolsReferences.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,wBAAgB,kBAAkB,CAC9B,CAAC,EAAE,CAAC,kBAAkB,GAAG,SAAS,EAAE,kBAAkB,CAAC,GACxD,iBAAiB,EAAE,CAsBrB"}
1
+ {"version":3,"file":"useToolsReferences.d.ts","sourceRoot":"","sources":["../../../src/components/completion/useToolsReferences.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,EAAE,GAAG,iBAAiB,EAAE,CAmBpF"}
@@ -1,10 +1,8 @@
1
1
  // (C) 2026 GoodData Corporation
2
2
  import { useMemo } from "react";
3
3
  import { isChatConversationToolResultContent, } from "@gooddata/sdk-backend-spi";
4
- export function useToolsReferences(g) {
5
- const [group1, group2] = g;
4
+ export function useToolsReferences(groups) {
6
5
  return useMemo(() => {
7
- const groups = [group1, group2].filter((g) => g);
8
6
  const references = [];
9
7
  groups.forEach((group) => {
10
8
  group.messages.forEach((message) => {
@@ -19,7 +17,7 @@ export function useToolsReferences(g) {
19
17
  });
20
18
  });
21
19
  return references;
22
- }, [group1, group2]);
20
+ }, [groups]);
23
21
  }
24
22
  function parseToolResults(references, cont) {
25
23
  // Is not an objects, skip it
@@ -1,6 +1,7 @@
1
1
  import { type Completion } from "@codemirror/autocomplete";
2
2
  import { type IntlShape } from "react-intl";
3
- import { type CatalogItem, type IAttributeDisplayFormMetadataObject, type ICatalogDateAttribute } from "@gooddata/sdk-model";
3
+ import { type CatalogItem, type IAttributeDisplayFormMetadataObject, type ICatalogDateAttribute, type ObjRef } from "@gooddata/sdk-model";
4
+ import { type TextContentObject } from "../../model.js";
4
5
  export interface ICompletionItem extends Completion {
5
6
  item: CatalogItem | ICatalogDateAttribute;
6
7
  }
@@ -19,6 +20,7 @@ export declare function getItems(intl: IntlShape, item: CatalogItem, { canManage
19
20
  canAnalyze?: boolean;
20
21
  onCompletionSelected?: (completion: ICompletionItem) => void;
21
22
  }): ICompletionItem[];
23
+ export declare function objRefToTextContentObject(objRef: ObjRef, title?: string, forceType?: TextContentObject["type"]): TextContentObject | null;
22
24
  export declare function getCompletionItemId(data: ICompletionItem): string | null;
23
25
  export declare function getCatalogItemId(item: CatalogItem | ICatalogDateAttribute | IAttributeDisplayFormMetadataObject): string | null;
24
26
  export declare function getCatalogItemTitle(item: CatalogItem | ICatalogDateAttribute | IAttributeDisplayFormMetadataObject): string;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/completion/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,mCAAmC,EACxC,KAAK,qBAAqB,EAO7B,MAAM,qBAAqB,CAAC;AAI7B,MAAM,WAAW,eAAgB,SAAQ,UAAU;IAC/C,IAAI,EAAE,WAAW,GAAG,qBAAqB,CAAC;CAC7C;AAGD,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,iBAW7C;AAGD,wBAAgB,UAAU,CACtB,IAAI,EAAE,SAAS,EACf,EACI,KAAK,EACL,MAAM,EACN,SAAS,EACT,UAAU,EACV,oBAA+B,EAClC,EAAE;IACC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,IAAI,CAAC;CAChE,GACF,eAAe,EAAE,CAanB;AAED,QAAA,MAAM,uBAAuB,wEAAyE,CAAC;AAGvG,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,OAAO,UAKhD;AAGD,wBAAgB,QAAQ,CACpB,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,WAAW,EACjB,EACI,SAAS,EACT,UAAU,EACV,oBAAoB,EACvB,EAAE;IACC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,IAAI,CAAC;CAChE,GACF,eAAe,EAAE,CAqGnB;AAUD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,iBAExD;AAGD,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,WAAW,GAAG,qBAAqB,GAAG,mCAAmC,GAChF,MAAM,GAAG,IAAI,CAoBf;AAGD,wBAAgB,mBAAmB,CAC/B,IAAI,EAAE,WAAW,GAAG,qBAAqB,GAAG,mCAAmC,UAqBlF;AAGD,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,WAAW,GAAG,qBAAqB,GAAG,mCAAmC,GAChF,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAoBjD"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/completion/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,mCAAmC,EACxC,KAAK,qBAAqB,EAC1B,KAAK,MAAM,EAQd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD,MAAM,WAAW,eAAgB,SAAQ,UAAU;IAC/C,IAAI,EAAE,WAAW,GAAG,qBAAqB,CAAC;CAC7C;AAGD,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,iBAW7C;AAGD,wBAAgB,UAAU,CACtB,IAAI,EAAE,SAAS,EACf,EACI,KAAK,EACL,MAAM,EACN,SAAS,EACT,UAAU,EACV,oBAA+B,EAClC,EAAE;IACC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,IAAI,CAAC;CAChE,GACF,eAAe,EAAE,CAanB;AAED,QAAA,MAAM,uBAAuB,wEAAyE,CAAC;AAGvG,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,OAAO,UAKhD;AAGD,wBAAgB,QAAQ,CACpB,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,WAAW,EACjB,EACI,SAAS,EACT,UAAU,EACV,oBAAoB,EACvB,EAAE;IACC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,IAAI,CAAC;CAChE,GACF,eAAe,EAAE,CAqGnB;AAUD,wBAAgB,yBAAyB,CACrC,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,GACtC,iBAAiB,GAAG,IAAI,CAgB1B;AAGD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,iBAExD;AAGD,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,WAAW,GAAG,qBAAqB,GAAG,mCAAmC,GAChF,MAAM,GAAG,IAAI,CAoBf;AAGD,wBAAgB,mBAAmB,CAC/B,IAAI,EAAE,WAAW,GAAG,qBAAqB,GAAG,mCAAmC,UAqBlF;AAGD,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,WAAW,GAAG,qBAAqB,GAAG,mCAAmC,GAChF,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAoBjD"}
@@ -1,5 +1,5 @@
1
1
  // (C) 2025-2026 GoodData Corporation
2
- import { isAttributeDisplayFormMetadataObject, isCatalogAttribute, isCatalogDateAttribute, isCatalogDateDataset, isCatalogFact, isCatalogMeasure, } from "@gooddata/sdk-model";
2
+ import { isAttributeDisplayFormMetadataObject, isCatalogAttribute, isCatalogDateAttribute, isCatalogDateDataset, isCatalogFact, isCatalogMeasure, isIdentifierRef, } from "@gooddata/sdk-model";
3
3
  import { getInfo } from "./InfoComponent.js";
4
4
  // Utility: Get item title
5
5
  export function getItemTitle(item) {
@@ -144,6 +144,23 @@ function applyItem(view, insert, from, to) {
144
144
  selection: { anchor: from - 1 + insert.length },
145
145
  });
146
146
  }
147
+ // Utility: Get item for completion
148
+ export function objRefToTextContentObject(objRef, title, forceType) {
149
+ if (isIdentifierRef(objRef)) {
150
+ const type = objRef.type;
151
+ return {
152
+ id: objRef.identifier,
153
+ title: title ?? objRef.identifier,
154
+ type: forceType ??
155
+ (type === "measure"
156
+ ? "metric"
157
+ : type === "displayForm"
158
+ ? "label"
159
+ : type),
160
+ };
161
+ }
162
+ return null;
163
+ }
147
164
  // Utility: Get completion item ID
148
165
  export function getCompletionItemId(data) {
149
166
  return getCatalogItemId(data.item);
@@ -1,11 +1,12 @@
1
- import { type FC, type ReactNode } from "react";
1
+ import { type FC } from "react";
2
+ import { type IUiButtonProps } from "@gooddata/sdk-ui-kit";
2
3
  /**
3
4
  * @beta
4
5
  */
5
6
  export interface ILandingQuestionProps {
6
7
  question: string;
7
8
  answer: string;
8
- icon?: ReactNode;
9
+ icon?: IUiButtonProps["iconBefore"];
9
10
  title?: string;
10
11
  }
11
12
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"LandingQuestion.d.ts","sourceRoot":"","sources":["../../../src/components/customized/LandingQuestion.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA+BhD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AA0ED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,qBAAqB,CAGlC,CAAC"}
1
+ {"version":3,"file":"LandingQuestion.d.ts","sourceRoot":"","sources":["../../../src/components/customized/LandingQuestion.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,sBAAsB,CAAC;AA0BhF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAsED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,qBAAqB,CAGlC,CAAC"}
@@ -1,7 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { defineMessage, useIntl } from "react-intl";
3
3
  import { connect } from "react-redux";
4
- import { Button, UiTooltip } from "@gooddata/sdk-ui-kit";
4
+ import { UiButton, UiTooltip } from "@gooddata/sdk-ui-kit";
5
5
  import { makeAssistantItem, makeAssistantMessage, makeTextContents, makeUserItem, makeUserMessage, } from "../../model.js";
6
6
  import { agentSwitchingActiveSelector } from "../../store/chatWindow/chatWindowSelectors.js";
7
7
  import { agentsAvailableSelector } from "../../store/messages/messagesSelectors.js";
@@ -14,7 +14,7 @@ const disabledTooltip = defineMessage({ id: "gd.gen-ai.agent.unavailable.disable
14
14
  function LandingQuestionComponent({ setMessagesAction, agentSwitchingActive, agentsAvailable, icon, question, answer, title = question, }) {
15
15
  const intl = useIntl();
16
16
  const isDisabled = agentSwitchingActive && agentsAvailable !== true;
17
- const button = (_jsxs(Button, { disabled: isDisabled, onClick: () => {
17
+ const button = (_jsx(UiButton, { isDisabled: isDisabled, onClick: () => {
18
18
  if (isDisabled) {
19
19
  return;
20
20
  }
@@ -28,8 +28,7 @@ function LandingQuestionComponent({ setMessagesAction, agentSwitchingActive, age
28
28
  makeAssistantItem({ type: "text", text: escapeMarkdown(answer) }, "", true),
29
29
  ],
30
30
  });
31
- }, variant: "secondary", children: [icon ? (_jsx("span", { role: "presentation", className: "gd-gen-ai-chat__messages__empty__icon", children: icon })) : null, _jsx("span", { className: "gd-gen-ai-chat__messages__empty__text", children: title })
32
- ] }));
31
+ }, variant: "secondary", size: "medium", iconBefore: icon, label: title }));
33
32
  if (!isDisabled) {
34
33
  return button;
35
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LandingScreen.d.ts","sourceRoot":"","sources":["../../../src/components/customized/LandingScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAgCpD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAgDF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,kBAAkB,CAA6C,CAAC"}
1
+ {"version":3,"file":"LandingScreen.d.ts","sourceRoot":"","sources":["../../../src/components/customized/LandingScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA8BpD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAgDF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,kBAAkB,CAA6C,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { FormattedMessage, defineMessage, useIntl } from "react-intl";
3
3
  import { connect } from "react-redux";
4
- import { IconChatBubble, IconNewVisualization, IconSearch } from "@gooddata/sdk-ui-kit";
5
4
  import { DefaultLandingContainer, DefaultLandingQuestions } from "./LandingContainer.js";
6
5
  import { DefaultLandingQuestion } from "./LandingQuestion.js";
7
6
  import { DefaultLandingTitle, DefaultLandingTitleAscent } from "./LandingTitle.js";
@@ -10,19 +9,19 @@ const quickOptions = [
10
9
  title: defineMessage({ id: "gd.gen-ai.welcome.option-1.title" }),
11
10
  question: defineMessage({ id: "gd.gen-ai.welcome.option-1.title" }),
12
11
  answer: defineMessage({ id: "gd.gen-ai.welcome.option-1.answer" }),
13
- Icon: IconSearch,
12
+ icon: "search",
14
13
  },
15
14
  {
16
15
  title: defineMessage({ id: "gd.gen-ai.welcome.option-2.title" }),
17
16
  question: defineMessage({ id: "gd.gen-ai.welcome.option-2.title" }),
18
17
  answer: defineMessage({ id: "gd.gen-ai.welcome.option-2.answer" }),
19
- Icon: IconNewVisualization,
18
+ icon: "pieChart",
20
19
  },
21
20
  {
22
21
  title: defineMessage({ id: "gd.gen-ai.welcome.option-3.title" }),
23
22
  question: defineMessage({ id: "gd.gen-ai.welcome.option-3.title" }),
24
23
  answer: defineMessage({ id: "gd.gen-ai.welcome.option-3.answer" }),
25
- Icon: IconChatBubble,
24
+ icon: "speechBubble",
26
25
  },
27
26
  ];
28
27
  function LandingScreenComponent({ LandingScreen, isBigScreen, isSmallScreen, isFullscreen, }) {
@@ -30,7 +29,7 @@ function LandingScreenComponent({ LandingScreen, isBigScreen, isSmallScreen, isF
30
29
  return (_jsx("div", { className: "gd-gen-ai-chat__messages__empty", children: LandingScreen ? (_jsx(LandingScreen, {})) : (_jsxs(DefaultLandingContainer, { isFullscreen: isFullscreen, isBigScreen: isBigScreen, isSmallScreen: isSmallScreen, children: [
31
30
  _jsxs(DefaultLandingTitle, { children: [
32
31
  _jsx(DefaultLandingTitleAscent, { children: _jsx(FormattedMessage, { id: "gd.gen-ai.welcome.line-1" }) }), _jsx("br", {}), _jsx(FormattedMessage, { id: "gd.gen-ai.welcome.line-2" })
33
- ] }), _jsx(DefaultLandingQuestions, { isFullscreen: isFullscreen, isBigScreen: isBigScreen, isSmallScreen: isSmallScreen, children: quickOptions.map((option) => (_jsx(DefaultLandingQuestion, { icon: _jsx(option.Icon, { width: 18, height: 18, ariaHidden: true }), title: intl.formatMessage(option.title), question: intl.formatMessage(option.question), answer: intl.formatMessage(option.answer) }, option.title.id))) })
32
+ ] }), _jsx(DefaultLandingQuestions, { isFullscreen: isFullscreen, isBigScreen: isBigScreen, isSmallScreen: isSmallScreen, children: quickOptions.map((option) => (_jsx(DefaultLandingQuestion, { icon: option.icon, title: intl.formatMessage(option.title), question: intl.formatMessage(option.question), answer: intl.formatMessage(option.answer) }, option.title.id))) })
34
33
  ] })) }));
35
34
  }
36
35
  /**
@@ -1,7 +1,7 @@
1
1
  import { type IChatConversationLocalItem } from "../../model.js";
2
2
  import { type IChatMessagesGroup } from "../utils/groupUtility.js";
3
3
  type AssistantItemProps = {
4
- groups: [IChatMessagesGroup | undefined, IChatMessagesGroup];
4
+ groups: IChatMessagesGroup[];
5
5
  message: IChatConversationLocalItem;
6
6
  isLast?: boolean;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantItem.d.ts","sourceRoot":"","sources":["../../../src/components/messages/AssistantItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAQnE,KAAK,kBAAkB,GAAG;IACtB,MAAM,EAAE,CAAC,kBAAkB,GAAG,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAC7D,OAAO,EAAE,0BAA0B,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,kBAAkB,2CAqCrF"}
1
+ {"version":3,"file":"AssistantItem.d.ts","sourceRoot":"","sources":["../../../src/components/messages/AssistantItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAQnE,KAAK,kBAAkB,GAAG;IACtB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,OAAO,EAAE,0BAA0B,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,kBAAkB,2CA0CrF"}
@@ -10,11 +10,11 @@ import { ConversationItemContents } from "./ConversationItemContents.js";
10
10
  import { getItemState } from "./itemState.js";
11
11
  export function AssistantItemComponent({ message, groups, isLast }) {
12
12
  const intl = useIntl();
13
- const [, group] = groups;
13
+ const group = groups[groups.length - 1];
14
14
  const messageState = getItemState(message);
15
15
  const references = useToolsReferences(groups);
16
16
  const classNames = cx("gd-gen-ai-chat__messages__conversation", "gd-gen-ai-chat__messages__conversation--assistant", `gd-gen-ai-chat__messages__conversation--${message.content.type}`, messageState === "cancelled" && "gd-gen-ai-chat__messages__conversation--cancelled", isLast && "gd-gen-ai-chat__messages__conversation--isLast");
17
17
  return (_jsxs("div", { className: classNames, "data-state": messageState, "data-testid": "gen-ai-conversation-assistant-message", children: [
18
- _jsx("span", { className: "gd-gen-ai-chat__visually__hidden", children: intl.formatMessage({ id: "gd.gen-ai.message.label.assistant" }) }), _jsx(ReasoningIcon, { content: message.content }), _jsx(ConversationItemContents, { role: "assistant", message: message, references: references, isLoading: messageState === "loading", isLast: isLast }), _jsx(AssistantItemSuggestions, { type: "followUp", content: message.content, showSuggestions: true }), _jsx(AssistantItemFeedback, { group: group, message: message, isLast: isLast }), _jsx(AssistantItemSuggestions, { type: "actions", content: message.content, showSuggestions: isLast })
18
+ _jsx("span", { className: "gd-gen-ai-chat__visually__hidden", children: intl.formatMessage({ id: "gd.gen-ai.message.label.assistant" }) }), _jsx(ReasoningIcon, { content: message.content }), _jsx(ConversationItemContents, { role: "assistant", message: message, references: references, isLoading: messageState === "loading", isLast: isLast }), _jsx(AssistantItemSuggestions, { type: "followUp", content: message.content, showSuggestions: true, references: references }), _jsx(AssistantItemFeedback, { group: group, message: message, isLast: isLast }), _jsx(AssistantItemSuggestions, { type: "actions", content: message.content, showSuggestions: isLast })
19
19
  ] }));
20
20
  }
@@ -1,8 +1,9 @@
1
- import { type IChatConversationErrorContent, type IChatConversationLocalContent, type IChatConversationSystemContent } from "../../model.js";
1
+ import { type IChatConversationErrorContent, type IChatConversationLocalContent, type IChatConversationSystemContent, type TextContentObject } from "../../model.js";
2
2
  export interface IAssistantItemSuggestionsProps {
3
3
  showSuggestions?: boolean;
4
+ references?: TextContentObject[];
4
5
  content: IChatConversationLocalContent | IChatConversationErrorContent | IChatConversationSystemContent;
5
6
  type: "followUp" | "actions";
6
7
  }
7
- export declare function AssistantItemSuggestions({ type, content, showSuggestions }: IAssistantItemSuggestionsProps): import("react/jsx-runtime").JSX.Element | null;
8
+ export declare function AssistantItemSuggestions({ type, content, showSuggestions, references }: IAssistantItemSuggestionsProps): import("react/jsx-runtime").JSX.Element | null;
8
9
  //# sourceMappingURL=AssistantItemSuggestions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantItemSuggestions.d.ts","sourceRoot":"","sources":["../../../src/components/messages/AssistantItemSuggestions.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EAEtC,MAAM,gBAAgB,CAAC;AAQxB,MAAM,WAAW,8BAA8B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,EAAE,6BAA6B,GAAG,6BAA6B,GAAG,8BAA8B,CAAC;IACxG,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;CAChC;AAED,wBAAgB,wBAAwB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,EAAE,8BAA8B,kDAgD1G"}
1
+ {"version":3,"file":"AssistantItemSuggestions.d.ts","sourceRoot":"","sources":["../../../src/components/messages/AssistantItemSuggestions.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,iBAAiB,EAEzB,MAAM,gBAAgB,CAAC;AAUxB,MAAM,WAAW,8BAA8B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACjC,OAAO,EAAE,6BAA6B,GAAG,6BAA6B,GAAG,8BAA8B,CAAC;IACxG,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;CAChC;AAED,wBAAgB,wBAAwB,CAAC,EACrC,IAAI,EACJ,OAAO,EACP,eAAe,EACf,UAAU,EACb,EAAE,8BAA8B,kDAkDhC"}
@@ -6,7 +6,8 @@ import { makeUserItem, } from "../../model.js";
6
6
  import { agentSwitchingActiveSelector, settingsSelector, } from "../../store/chatWindow/chatWindowSelectors.js";
7
7
  import { agentsAvailableSelector } from "../../store/messages/messagesSelectors.js";
8
8
  import { newMessageAction } from "../../store/messages/messagesSlice.js";
9
- export function AssistantItemSuggestions({ type, content, showSuggestions }) {
9
+ import { MarkdownComponent } from "./contents/Markdown.js";
10
+ export function AssistantItemSuggestions({ type, content, showSuggestions, references, }) {
10
11
  const dispatch = useDispatch();
11
12
  const settings = useSelector(settingsSelector);
12
13
  const agentSwitchingActive = useSelector(agentSwitchingActiveSelector);
@@ -24,5 +25,5 @@ export function AssistantItemSuggestions({ type, content, showSuggestions }) {
24
25
  }
25
26
  return (_jsxs(_Fragment, { children: [suggestions.actions && type === "actions" ? (_jsx("div", { className: "gd-gen-ai-chat__conversation__visualization__suggestions", children: suggestions.actions?.map((suggestion) => (_jsx(UiButton, { label: suggestion.label, variant: "secondary", size: "small", isDisabled: isDisabled, onClick: () => {
26
27
  dispatch(newMessageAction(makeUserItem({ type: "text", text: suggestion.query })));
27
- }, tooltip: suggestion.query }, suggestion.label))) })) : null, suggestions.followUpQuestion && type === "followUp" ? (_jsx("div", { className: "gd-gen-ai-chat__conversation__visualization__followUp", children: suggestions.followUpQuestion })) : null] }));
28
+ }, tooltip: suggestion.query }, suggestion.label))) })) : null, suggestions.followUpQuestion && type === "followUp" ? (_jsx("div", { className: "gd-gen-ai-chat__conversation__visualization__followUp", children: _jsx(MarkdownComponent, { allowMarkdown: true, references: references ?? [], children: suggestions.followUpQuestion }) })) : null] }));
28
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationItemContents.d.ts","sourceRoot":"","sources":["../../../src/components/messages/ConversationItemContents.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,0BAA0B,EAE/B,KAAK,iBAAiB,EACzB,MAAM,gBAAgB,CAAC;AAaxB,KAAK,6BAA6B,GAAG;IACjC,OAAO,EAAE,0BAA0B,CAAC;IACpC,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,6BAA6B,kDA6GzG"}
1
+ {"version":3,"file":"ConversationItemContents.d.ts","sourceRoot":"","sources":["../../../src/components/messages/ConversationItemContents.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,0BAA0B,EAE/B,KAAK,iBAAiB,EACzB,MAAM,gBAAgB,CAAC;AAcxB,KAAK,6BAA6B,GAAG;IACjC,OAAO,EAAE,0BAA0B,CAAC;IACpC,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,6BAA6B,kDAwHzG"}
@@ -1,5 +1,6 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { loadWhatIfScenarios } from "../../whatIf/whatIfMapping.js";
3
+ import { ConversationAlertProposalContent } from "./conversationContents/ConversationAlertProposalContent.js";
3
4
  import { ConversationErrorContent } from "./conversationContents/ConversationErrorContent.js";
4
5
  import { ConversationKdaContent } from "./conversationContents/ConversationKdaContent.js";
5
6
  import { ConversationReasoningContent } from "./conversationContents/ConversationReasoningContent.js";
@@ -26,6 +27,9 @@ export function ConversationItemContents({ message, references, isLoading }) {
26
27
  if (part.type === "text") {
27
28
  return (_jsx(ConversationTextContent, { useMarkdown: true, text: part.text, objects: [...(part.objects ?? []), ...references] }, index));
28
29
  }
30
+ if (part.type === "alertProposal") {
31
+ return (_jsx(ConversationAlertProposalContent, { message: message, part: part, alertProposal: part.alertProposal, objects: [...(part.objects ?? []), ...references] }, index));
32
+ }
29
33
  if (part.type === "visualization" && !whatIf) {
30
34
  return (_jsx(ConversationVisualizationContent, { message: message, part: part, visualization: part.visualization }, index));
31
35
  }
@@ -1,7 +1,7 @@
1
1
  import { type IChatConversationLocalItem } from "../../model.js";
2
2
  import { type IChatMessagesGroup } from "../utils/groupUtility.js";
3
3
  type SystemItemProps = {
4
- groups: [IChatMessagesGroup | undefined, IChatMessagesGroup];
4
+ groups: IChatMessagesGroup[];
5
5
  message: IChatConversationLocalItem;
6
6
  };
7
7
  export declare function SystemItemComponent({ message }: SystemItemProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"SystemItem.d.ts","sourceRoot":"","sources":["../../../src/components/messages/SystemItem.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAInE,KAAK,eAAe,GAAG;IACnB,MAAM,EAAE,CAAC,kBAAkB,GAAG,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAC7D,OAAO,EAAE,0BAA0B,CAAC;CACvC,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,EAAE,eAAe,kDAQ/D"}
1
+ {"version":3,"file":"SystemItem.d.ts","sourceRoot":"","sources":["../../../src/components/messages/SystemItem.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAInE,KAAK,eAAe,GAAG;IACnB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,OAAO,EAAE,0BAA0B,CAAC;CACvC,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,EAAE,eAAe,kDAQ/D"}
@@ -2,7 +2,7 @@ import { type IChatConversationLocalItem } from "../../model.js";
2
2
  import { type IChatMessagesGroup } from "../utils/groupUtility.js";
3
3
  type ToolItemProps = {
4
4
  message: IChatConversationLocalItem;
5
- groups: [IChatMessagesGroup | undefined, IChatMessagesGroup];
5
+ groups: IChatMessagesGroup[];
6
6
  isLast?: boolean;
7
7
  };
8
8
  export declare function ToolItemComponent({ message, groups, isLast }: ToolItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ToolItem.d.ts","sourceRoot":"","sources":["../../../src/components/messages/ToolItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAKnE,KAAK,aAAa,GAAG;IACjB,OAAO,EAAE,0BAA0B,CAAC;IACpC,MAAM,EAAE,CAAC,kBAAkB,GAAG,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,aAAa,2CA0B3E"}
1
+ {"version":3,"file":"ToolItem.d.ts","sourceRoot":"","sources":["../../../src/components/messages/ToolItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAKnE,KAAK,aAAa,GAAG;IACjB,OAAO,EAAE,0BAA0B,CAAC;IACpC,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,aAAa,2CA0B3E"}
@@ -2,7 +2,7 @@ import { type IChatConversationLocalItem } from "../../model.js";
2
2
  import { type IChatMessagesGroup } from "../utils/groupUtility.js";
3
3
  type UserItemProps = {
4
4
  message: IChatConversationLocalItem;
5
- groups: [IChatMessagesGroup | undefined, IChatMessagesGroup];
5
+ groups: IChatMessagesGroup[];
6
6
  isLast?: boolean;
7
7
  };
8
8
  export declare function UserItemComponent({ message, isLast, groups }: UserItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"UserItem.d.ts","sourceRoot":"","sources":["../../../src/components/messages/UserItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAKnE,KAAK,aAAa,GAAG;IACjB,OAAO,EAAE,0BAA0B,CAAC;IACpC,MAAM,EAAE,CAAC,kBAAkB,GAAG,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,aAAa,2CA0B3E"}
1
+ {"version":3,"file":"UserItem.d.ts","sourceRoot":"","sources":["../../../src/components/messages/UserItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAKnE,KAAK,aAAa,GAAG;IACjB,OAAO,EAAE,0BAA0B,CAAC;IACpC,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,aAAa,2CA0B3E"}
@@ -0,0 +1,11 @@
1
+ import { type IAlertProposal } from "@gooddata/sdk-backend-spi";
2
+ import type { IChatConversationLocalItem, IChatConversationMultipartLocalPart, TextContentObject } from "../../../model.js";
3
+ export type ConversationAlertProposalContentProps = {
4
+ message: IChatConversationLocalItem;
5
+ part: IChatConversationMultipartLocalPart;
6
+ objects?: TextContentObject[];
7
+ alertProposal: IAlertProposal | undefined;
8
+ className?: string;
9
+ };
10
+ export declare function ConversationAlertProposalContent({ className, alertProposal, objects }: ConversationAlertProposalContentProps): import("react/jsx-runtime").JSX.Element | null;
11
+ //# sourceMappingURL=ConversationAlertProposalContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationAlertProposalContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationAlertProposalContent.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,OAAO,KAAK,EACR,0BAA0B,EAC1B,mCAAmC,EACnC,iBAAiB,EACpB,MAAM,mBAAmB,CAAC;AAI3B,MAAM,MAAM,qCAAqC,GAAG;IAChD,OAAO,EAAE,0BAA0B,CAAC;IACpC,IAAI,EAAE,mCAAmC,CAAC;IAC1C,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,aAAa,EAAE,cAAc,GAAG,SAAS,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,EAC7C,SAAS,EACT,aAAa,EACb,OAAO,EACV,EAAE,qCAAqC,kDAgPvC"}
@@ -0,0 +1,64 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // (C) 2024-2026 GoodData Corporation
3
+ import cx from "classnames";
4
+ import { FormattedMessage, useIntl } from "react-intl";
5
+ import { Typography, UiIcon, UiTag } from "@gooddata/sdk-ui-kit";
6
+ import { objRefToTextContentObject } from "../../completion/utils.js";
7
+ import { MarkdownComponent } from "../contents/Markdown.js";
8
+ export function ConversationAlertProposalContent({ className, alertProposal, objects, }) {
9
+ const intl = useIntl();
10
+ const classNames = cx("gd-gen-ai-chat__conversation__item__content", "gd-gen-ai-chat__conversation__item__content--alertProposal", className);
11
+ if (!alertProposal) {
12
+ return null;
13
+ }
14
+ return (_jsxs("div", { className: classNames, children: [
15
+ _jsxs("div", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-header", children: [
16
+ _jsx(UiIcon, { type: "alert", size: 14, color: "complementary-6", backgroundSize: 26, backgroundColor: "complementary-2" }), _jsx(FormattedMessage, { id: "gd.gen-ai.alert-proposal.title" })
17
+ ] }), _jsxs("div", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-frame", children: [
18
+ _jsxs("ul", { children: [
19
+ _jsx(AlertItem, { markdown: true, title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.title" }), description: alertProposal.title, objects: objects }), _jsx(AlertReference, { title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.metric" }), ref: alertProposal.baseMetric.id, refTitle: alertProposal.baseMetric.title, format: alertProposal.baseMetric.format }), alertProposal.compareMetric ? (_jsx(AlertReference, { title: intl.formatMessage({
20
+ id: "gd.gen-ai.alert-proposal.summary.metric-compared",
21
+ }), ref: alertProposal.compareMetric.id, refTitle: alertProposal.compareMetric.title, format: alertProposal.compareMetric.format })) : null, alertProposal.attributes?.length ? (_jsx(AlertAttributes, { title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.attributes" }), attributes: alertProposal.attributes, objects: objects })) : null, alertProposal.date ? (_jsx(AlertReference, { title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.date" }), ref: alertProposal.date.id, refTitle: alertProposal.date.title, forceType: "date" })) : null, alertProposal.filters?.length ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.filters" }), description: alertProposal.filters.length.toString(), objects: objects })) : null, alertProposal.notificationChannel ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({
22
+ id: "gd.gen-ai.alert-proposal.summary.notification-channel",
23
+ }), description: alertProposal.notificationChannel.name, objects: objects })) : null, alertProposal.dashboard ? (_jsx(AlertReference, { title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.dashboard" }), ref: alertProposal.dashboard.id, refTitle: alertProposal.dashboard.title })) : null, alertProposal.operator ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.operator" }), description: alertProposal.operator, objects: objects })) : null, alertProposal.arithmeticOperator ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({
24
+ id: "gd.gen-ai.alert-proposal.summary.arithmeticOperator",
25
+ }), description: alertProposal.arithmeticOperator, objects: objects })) : null, alertProposal.threshold ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.threshold" }), description: alertProposal.threshold.toString(), objects: objects })) : null, alertProposal.fromValue !== undefined && alertProposal.toValue !== undefined ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.range" }), description: `${alertProposal.fromValue} - ${alertProposal.toValue}`, objects: objects })) : null, alertProposal.fromValue !== undefined && alertProposal.toValue === undefined ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.from" }), description: alertProposal.fromValue.toString(), objects: objects })) : null, alertProposal.fromValue === undefined && alertProposal.toValue !== undefined ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.to" }), description: alertProposal.toValue.toString(), objects: objects })) : null, alertProposal.granularity ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.granularity" }), description: alertProposal.granularity, objects: objects })) : null, alertProposal.sensitivity ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.sensitivity" }), description: alertProposal.sensitivity, objects: objects })) : null] }), alertProposal.trigger ? (_jsxs(_Fragment, { children: [
26
+ _jsx(Typography, { tagName: "p", className: "gd-gen-ai-chat__conversation__item__content-alertProposal-subheader", children: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.trigger" }) }), _jsxs("ul", { children: [alertProposal.trigger.trigger ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({
27
+ id: "gd.gen-ai.alert-proposal.summary.trigger.mode",
28
+ }), description: alertProposal.trigger.trigger, objects: objects })) : null, alertProposal.trigger.interval ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({
29
+ id: "gd.gen-ai.alert-proposal.summary.trigger.interval",
30
+ }), description: alertProposal.trigger.interval, objects: objects })) : null, alertProposal.trigger.cron ? (_jsx(AlertItem, { markdown: true, type: "code", title: intl.formatMessage({
31
+ id: "gd.gen-ai.alert-proposal.summary.trigger.cron",
32
+ }), description: alertProposal.trigger.cron, objects: objects })) : null, alertProposal.trigger.timezone ? (_jsx(AlertItem, { bold: true, markdown: true, title: intl.formatMessage({
33
+ id: "gd.gen-ai.alert-proposal.summary.trigger.timezone",
34
+ }), description: alertProposal.trigger.timezone, objects: objects })) : null] })
35
+ ] })) : null, alertProposal.recipients?.length ? (_jsxs(_Fragment, { children: [
36
+ _jsx(Typography, { tagName: "p", className: "gd-gen-ai-chat__conversation__item__content-alertProposal-subheader", children: intl.formatMessage({ id: "gd.gen-ai.alert-proposal.summary.recipients" }) }), alertProposal.recipients.map((recipient, index) => (_jsx(UiTag, { label: recipient.name ?? recipient.id }, index)))] })) : null] })
37
+ ] }));
38
+ }
39
+ function AlertItem({ markdown, title, description, objects, bold, type = "normal" }) {
40
+ return (_jsxs("li", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-item", children: [
41
+ _jsxs("div", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-item-title", children: [title, ":"] }), _jsxs("div", { className: cx("gd-gen-ai-chat__conversation__item__content-alertProposal-item-description", {
42
+ bold,
43
+ }), children: [type === "normal" ? (_jsx(MarkdownComponent, { allowMarkdown: markdown, references: objects, children: description })) : null, type === "code" ? _jsx("code", { children: description }) : null] })
44
+ ] }));
45
+ }
46
+ function AlertReference({ title, ref, refTitle, format, forceType }) {
47
+ const rf = objRefToTextContentObject(ref, refTitle, forceType);
48
+ if (!rf) {
49
+ return null;
50
+ }
51
+ return (_jsxs("li", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-item", children: [
52
+ _jsxs("div", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-item-title", children: [title, ":"] }), _jsx("div", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-item-description", children: _jsx(MarkdownComponent, { allowMarkdown: true, references: [rf], children: `{${rf.type}/${rf.id}}` }) }), format ? (_jsxs("div", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-item-format", children: ["(", format, ")"] })) : null] }));
53
+ }
54
+ function AlertAttributes({ title, attributes, objects }) {
55
+ const rf = attributes
56
+ .map((attribute) => objRefToTextContentObject(attribute.attribute.displayForm, attribute.attribute.alias))
57
+ .filter(Boolean);
58
+ if (rf.length === 0) {
59
+ return null;
60
+ }
61
+ return (_jsxs("li", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-item", children: [
62
+ _jsxs("div", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-item-title", children: [title, ":"] }), _jsx("div", { className: "gd-gen-ai-chat__conversation__item__content-alertProposal-item-description", children: _jsx(MarkdownComponent, { allowMarkdown: true, references: [...(objects ?? []), ...rf], children: rf.map((rf) => `{${rf.type}/${rf.id}}`).join(" ") }) })
63
+ ] }));
64
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"useGenAIStore.d.ts","sourceRoot":"","sources":["../../src/hooks/useGenAIStore.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUjG,OAAO,EAAE,KAAK,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;AAI5E,eAAO,MAAM,aAAa;;;;;;;;;wEAqGzB,CAAC"}
1
+ {"version":3,"file":"useGenAIStore.d.ts","sourceRoot":"","sources":["../../src/hooks/useGenAIStore.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUjG,OAAO,EAAE,KAAK,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;AAI5E,eAAO,MAAM,aAAa;;;;;;;;;wEAsGzB,CAAC"}