@gooddata/sdk-ui-gen-ai 11.52.0-alpha.5 → 11.52.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/GenAIChatAgentDropdown.d.ts.map +1 -1
- package/esm/components/GenAIChatAgentDropdown.js +68 -16
- package/esm/components/GenAIChatEffortDropdown.d.ts.map +1 -1
- package/esm/components/GenAIChatEffortDropdown.js +22 -10
- package/esm/components/GenAIChatReasoningMenu.d.ts +7 -0
- package/esm/components/GenAIChatReasoningMenu.d.ts.map +1 -1
- package/esm/components/GenAIChatReasoningMenu.js +33 -10
- package/esm/components/messages/contents/VisualizationContents.d.ts.map +1 -1
- package/esm/components/messages/contents/VisualizationContents.js +5 -3
- package/esm/components/messages/contents/useKdaDefinition.js +8 -0
- package/esm/components/messages/conversationContents/ConversationVisualisation.d.ts +2 -1
- package/esm/components/messages/conversationContents/ConversationVisualisation.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationVisualisation.js +3 -3
- package/esm/components/messages/conversationContents/ConversationVisualizationContent.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationVisualizationContent.js +2 -1
- package/esm/components/messages/conversationContents/useKdaDefinition.js +8 -0
- package/esm/components/utils/effortSelection.d.ts +11 -0
- package/esm/components/utils/effortSelection.d.ts.map +1 -0
- package/esm/components/utils/effortSelection.js +17 -0
- package/esm/context/dashboard.d.ts +1 -1
- package/esm/context/dashboard.d.ts.map +1 -1
- package/esm/context/dashboard.js +4 -2
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -2
- package/esm/internal.d.ts +1 -2
- package/esm/internal.d.ts.map +1 -1
- package/esm/internal.js +1 -2
- package/esm/localization/bundles/en-US.localization-bundle.d.ts +20 -0
- package/esm/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-US.localization-bundle.js +22 -2
- package/esm/sdk-ui-gen-ai.d.ts +41 -1
- package/esm/store/chatWindow/chatWindowSlice.d.ts +1 -0
- package/esm/store/chatWindow/chatWindowSlice.d.ts.map +1 -1
- package/esm/store/events.d.ts +18 -2
- package/esm/store/events.d.ts.map +1 -1
- package/esm/store/events.js +7 -0
- package/esm/store/messages/messagesSelectors.d.ts +1 -0
- package/esm/store/messages/messagesSelectors.d.ts.map +1 -1
- package/esm/store/messages/messagesSelectors.js +8 -1
- package/esm/store/messages/messagesSlice.d.ts +2 -1
- package/esm/store/messages/messagesSlice.d.ts.map +1 -1
- package/esm/store/messages/messagesSlice.js +18 -2
- package/esm/store/sideEffects/onDefinitionReceivedTrigger.d.ts.map +1 -1
- package/esm/store/sideEffects/onDefinitionReceivedTrigger.js +1 -0
- package/esm/store/sideEffects/onEvent.d.ts.map +1 -1
- package/esm/store/sideEffects/onEvent.js +23 -1
- package/esm/store/sideEffects/onUserMessage.js +2 -2
- package/esm/types.d.ts +7 -1
- package/esm/types.d.ts.map +1 -1
- package/package.json +20 -20
|
@@ -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;
|
|
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;AAkC3E,MAAM,MAAM,2BAA2B,GAAG;IACtC,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EACnC,MAAM,EACN,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,SAAS,EACT,aAAa,EACb,gBAAwB,EACxB,cAA+B,EAC/B,cAAc,EACjB,EAAE,2BAA2B,2CA0L7B"}
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2026 GoodData Corporation
|
|
3
|
-
import { useEffect, useMemo } from "react";
|
|
3
|
+
import { useCallback, useEffect, useMemo } from "react";
|
|
4
4
|
import cx from "classnames";
|
|
5
5
|
import { defineMessages, useIntl } from "react-intl";
|
|
6
|
-
import { DefaultUiMenuInteractiveItemWrapper, Dropdown, UiButton, UiIcon, UiMenu, UiSubmenuHeader, typedUiMenuContextStore, } from "@gooddata/sdk-ui-kit";
|
|
6
|
+
import { DefaultUiMenuInteractiveItemWrapper, Dropdown, UiButton, UiIcon, UiMenu, UiSubmenuHeader, typedUiMenuContextStore, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
7
7
|
import { GenAIChatReasoningMenuRow, REASONING_MENU_ITEM_ID, useReasoningMenuItems, useSelectedReasoningLabel, } from "./GenAIChatReasoningMenu.js";
|
|
8
8
|
import { getEffectiveSelectedAgentId, selectDefaultAgentId } from "./utils/agentSelection.js";
|
|
9
|
+
import { DEFAULT_EFFORT } from "./utils/effortSelection.js";
|
|
9
10
|
const msgs = defineMessages({
|
|
10
11
|
agent: {
|
|
11
12
|
id: "gd.gen-ai.agents",
|
|
12
13
|
},
|
|
14
|
+
agentTriggerAriaLabel: {
|
|
15
|
+
id: "gd.gen-ai.agent.trigger.ariaLabel",
|
|
16
|
+
},
|
|
17
|
+
agentTriggerWithReasoningAriaLabel: {
|
|
18
|
+
id: "gd.gen-ai.agent.trigger.withReasoning.ariaLabel",
|
|
19
|
+
},
|
|
13
20
|
loading: {
|
|
14
21
|
id: "gd.gen-ai.agents.loading",
|
|
15
22
|
},
|
|
16
|
-
|
|
23
|
+
closeAgents: {
|
|
17
24
|
id: "gd.gen-ai.close",
|
|
18
25
|
},
|
|
19
26
|
});
|
|
20
|
-
export function GenAIChatAgentDropdown({ agents, conversations, conversationAgentId, selectedAgentId, isDisabled, isLoading, onSelectAgent, reasoningEnabled = false, selectedEffort =
|
|
27
|
+
export function GenAIChatAgentDropdown({ agents, conversations, conversationAgentId, selectedAgentId, isDisabled, isLoading, onSelectAgent, reasoningEnabled = false, selectedEffort = DEFAULT_EFFORT, onSelectEffort, }) {
|
|
21
28
|
const intl = useIntl();
|
|
22
29
|
const effectiveSelectedAgentId = getEffectiveSelectedAgentId({
|
|
23
30
|
agents,
|
|
@@ -33,6 +40,8 @@ export function GenAIChatAgentDropdown({ agents, conversations, conversationAgen
|
|
|
33
40
|
onSelectEffort,
|
|
34
41
|
});
|
|
35
42
|
const reasoningValueLabel = useSelectedReasoningLabel(selectedEffort, "short");
|
|
43
|
+
const agentsTitleId = useIdPrefixed("agents-menu-title");
|
|
44
|
+
const agentTriggerId = useIdPrefixed("agent-dropdown-trigger");
|
|
36
45
|
useEffect(() => {
|
|
37
46
|
const isConversationAgentAvailable = !!conversationAgentId && agents.some((agent) => agent.id === conversationAgentId);
|
|
38
47
|
const isSelectedAgentAvailable = !!selectedAgentId && agents.some((agent) => agent.id === selectedAgentId);
|
|
@@ -64,32 +73,75 @@ export function GenAIChatAgentDropdown({ agents, conversations, conversationAgen
|
|
|
64
73
|
id: agent.id,
|
|
65
74
|
stringTitle: agent.title,
|
|
66
75
|
isSelected,
|
|
76
|
+
selectionRole: "radio",
|
|
67
77
|
isDisabled: false,
|
|
68
78
|
data: { type: "agent", agent },
|
|
69
79
|
tooltip: agent.description || undefined,
|
|
70
|
-
ariaAttributes: agent.description
|
|
71
|
-
? { "aria-label": `${agent.title}. ${agent.description}` }
|
|
72
|
-
: undefined,
|
|
73
80
|
iconRight: agent.description ? (_jsx(UiIcon, { type: "question", size: 12, color: "complementary-5", accessibilityConfig: { ariaHidden: true } })) : undefined,
|
|
74
81
|
};
|
|
75
82
|
});
|
|
76
|
-
|
|
83
|
+
const agentGroupItems = agentItems.length
|
|
84
|
+
? [
|
|
85
|
+
{
|
|
86
|
+
type: "group",
|
|
87
|
+
id: "agents-group",
|
|
88
|
+
stringTitle: "",
|
|
89
|
+
data: undefined,
|
|
90
|
+
subItems: agentItems,
|
|
91
|
+
},
|
|
92
|
+
]
|
|
93
|
+
: [];
|
|
94
|
+
return [...agentGroupItems, ...reasoningItems];
|
|
77
95
|
}, [agents, effectiveSelectedAgentId, reasoningItems]);
|
|
96
|
+
const AgentsMenuGroupItem = useCallback((props) => (_jsx(AgentsGroupItem, { ...props, titleId: agentsTitleId })), [agentsTitleId]);
|
|
97
|
+
const MenuHeader = useCallback(() => _jsx(AgentMenuHeader, { titleId: agentsTitleId }), [agentsTitleId]);
|
|
98
|
+
const agentTriggerAriaLabel = useMemo(() => {
|
|
99
|
+
if (isLoading) {
|
|
100
|
+
return loadingLabel;
|
|
101
|
+
}
|
|
102
|
+
const agentName = selectedAgent?.title ?? agentLabel;
|
|
103
|
+
if (reasoningEnabled && reasoningValueLabel) {
|
|
104
|
+
return intl.formatMessage(msgs.agentTriggerWithReasoningAriaLabel, {
|
|
105
|
+
agent: agentName,
|
|
106
|
+
effort: reasoningValueLabel,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return intl.formatMessage(msgs.agentTriggerAriaLabel, { agent: agentName });
|
|
110
|
+
}, [
|
|
111
|
+
agentLabel,
|
|
112
|
+
intl,
|
|
113
|
+
isLoading,
|
|
114
|
+
loadingLabel,
|
|
115
|
+
reasoningEnabled,
|
|
116
|
+
reasoningValueLabel,
|
|
117
|
+
selectedAgent?.title,
|
|
118
|
+
]);
|
|
78
119
|
return (_jsxs(_Fragment, { children: [
|
|
79
120
|
_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", {
|
|
80
121
|
"gd-gen-ai-chat__input__agent-dropdown--loading": isLoading,
|
|
81
|
-
}), 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), badgeAfter: !isLoading && reasoningEnabled ? reasoningValueLabel : undefined, variant: "dropdownInline", size: "small", iconAfter: isLoading ? undefined : isOpen ? "navigateUp" : "navigateDown", isDisabled: isLoading || isDisabled || !agents.length, onClick: toggleDropdown, dataTestId: "agent_dropdown_button", accessibilityConfig:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
122
|
+
}), alignPoints: [{ align: "tr br", offset: { x: 0, y: 0 } }], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, returnFocusTo: agentTriggerId, accessibilityConfig: { popupRole: "dialog" }, renderButton: ({ isOpen, toggleDropdown, accessibilityConfig }) => (_jsx(UiButton, { id: agentTriggerId, label: isLoading ? loadingLabel : (selectedAgent?.title ?? agentLabel), badgeAfter: !isLoading && reasoningEnabled ? reasoningValueLabel : undefined, variant: "dropdownInline", size: "small", iconAfter: isLoading ? undefined : isOpen ? "navigateUp" : "navigateDown", isDisabled: isLoading || isDisabled || !agents.length, onClick: toggleDropdown, dataTestId: "agent_dropdown_button", accessibilityConfig: {
|
|
123
|
+
...accessibilityConfig,
|
|
124
|
+
ariaLabel: agentTriggerAriaLabel,
|
|
125
|
+
}, disableIconAnimation: true })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx("div", { ...ariaAttributes, "aria-labelledby": agentsTitleId, children: _jsx(UiMenu, { dataTestId: "agent_dropdown_menu", items: items, size: "small", minWidth: 200, maxWidth: 200, containerTopPadding: "small", containerBottomPadding: "small", MenuHeader: MenuHeader, GroupItem: AgentsMenuGroupItem, InteractiveItemWrapper: AgentMenuItemWrapper, onClose: closeDropdown, ariaAttributes: {
|
|
126
|
+
id: `${ariaAttributes.id}-menu`,
|
|
127
|
+
"aria-labelledby": agentsTitleId,
|
|
128
|
+
}, onSelect: (item) => {
|
|
129
|
+
if (item.data.type === "agent") {
|
|
130
|
+
onSelectAgent(item.data.agent.id, { showChangeEvent: true });
|
|
131
|
+
closeDropdown();
|
|
132
|
+
}
|
|
133
|
+
} }) })) })] }));
|
|
134
|
+
}
|
|
135
|
+
function AgentsGroupItem({ item, titleId }) {
|
|
136
|
+
const { useContextStore, createSelector } = typedUiMenuContextStore();
|
|
137
|
+
const ItemComponent = useContextStore(createSelector((ctx) => ctx.ItemComponent));
|
|
138
|
+
return (_jsx("ul", { className: "gd-ui-kit-menu__group", role: "group", "aria-labelledby": titleId, children: item.subItems.map((groupItem, index) => (_jsx(ItemComponent, { item: groupItem }, "id" in groupItem ? groupItem.id : index))) }));
|
|
87
139
|
}
|
|
88
|
-
function AgentMenuHeader() {
|
|
140
|
+
function AgentMenuHeader({ titleId }) {
|
|
89
141
|
const intl = useIntl();
|
|
90
142
|
const { useContextStore, createSelector } = typedUiMenuContextStore();
|
|
91
143
|
const onClose = useContextStore(createSelector((ctx) => ctx.onClose));
|
|
92
|
-
return (_jsx(UiSubmenuHeader, { title: intl.formatMessage(msgs.agent), height: "medium", onClose: onClose, closeAriaLabel: intl.formatMessage(msgs.
|
|
144
|
+
return (_jsx(UiSubmenuHeader, { title: intl.formatMessage(msgs.agent), titleId: titleId, height: "medium", onClose: onClose, closeAriaLabel: intl.formatMessage(msgs.closeAgents) }));
|
|
93
145
|
}
|
|
94
146
|
function AgentMenuItemWrapper(props) {
|
|
95
147
|
if (props.item.id === REASONING_MENU_ITEM_ID) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatEffortDropdown.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatEffortDropdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GenAIChatEffortDropdown.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatEffortDropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAmB3D,MAAM,MAAM,4BAA4B,GAAG;IACvC,cAAc,EAAE,eAAe,CAAC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACpC,cAAc,EACd,UAAU,EACV,cAAc,EACjB,EAAE,4BAA4B,2CAwE9B"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
3
4
|
import { defineMessages, useIntl } from "react-intl";
|
|
4
|
-
import { Dropdown, UiButton, UiMenu,
|
|
5
|
-
import { useReasoningOptionItems, useSelectedReasoningLabel, } from "./GenAIChatReasoningMenu.js";
|
|
5
|
+
import { Dropdown, UiButton, UiMenu, useIdPrefixed } from "@gooddata/sdk-ui-kit";
|
|
6
|
+
import { ReasoningEffortMenuHeader, useReasoningOptionItems, useSelectedReasoningLabel, } from "./GenAIChatReasoningMenu.js";
|
|
6
7
|
const msgs = defineMessages({
|
|
7
8
|
reasoning: {
|
|
8
9
|
id: "gd.gen-ai.reasoning",
|
|
9
10
|
},
|
|
11
|
+
effortTriggerAriaLabel: {
|
|
12
|
+
id: "gd.gen-ai.effort.trigger.ariaLabel",
|
|
13
|
+
},
|
|
10
14
|
});
|
|
11
15
|
/**
|
|
12
16
|
* Standalone reasoning-effort dropdown, structured like GenAIChatAgentDropdown but listing effort
|
|
@@ -18,12 +22,20 @@ export function GenAIChatEffortDropdown({ selectedEffort, isDisabled, onSelectEf
|
|
|
18
22
|
const reasoningLabel = intl.formatMessage(msgs.reasoning);
|
|
19
23
|
const options = useReasoningOptionItems(selectedEffort, "full");
|
|
20
24
|
const valueLabel = useSelectedReasoningLabel(selectedEffort, "full");
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const effortTitleId = useIdPrefixed("effort-menu-title");
|
|
26
|
+
const effortTriggerId = useIdPrefixed("effort-dropdown-trigger");
|
|
27
|
+
const MenuHeader = useCallback(() => _jsx(ReasoningEffortMenuHeader, { titleId: effortTitleId }), [effortTitleId]);
|
|
28
|
+
const effortTriggerAriaLabel = useMemo(() => intl.formatMessage(msgs.effortTriggerAriaLabel, {
|
|
29
|
+
effort: valueLabel ?? reasoningLabel,
|
|
30
|
+
}), [intl, reasoningLabel, valueLabel]);
|
|
31
|
+
return (_jsx(Dropdown, { className: "gd-gen-ai-chat__input__effort-dropdown", alignPoints: [{ align: "tr br", offset: { x: 0, y: 0 } }], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, returnFocusTo: effortTriggerId, accessibilityConfig: { popupRole: "dialog" }, renderButton: ({ isOpen, toggleDropdown, accessibilityConfig }) => (_jsx(UiButton, { id: effortTriggerId, label: valueLabel ?? reasoningLabel, variant: "dropdownInline", size: "small", iconAfter: isOpen ? "navigateUp" : "navigateDown", isDisabled: isDisabled, onClick: toggleDropdown, dataTestId: "effort_dropdown_button", accessibilityConfig: {
|
|
32
|
+
...accessibilityConfig,
|
|
33
|
+
ariaLabel: effortTriggerAriaLabel,
|
|
34
|
+
}, disableIconAnimation: true })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx("div", { ...ariaAttributes, "aria-labelledby": effortTitleId, children: _jsx(UiMenu, { dataTestId: "effort_dropdown_menu", items: options, size: "small", minWidth: 200, maxWidth: 260, containerTopPadding: "small", containerBottomPadding: "small", MenuHeader: MenuHeader, onClose: closeDropdown, ariaAttributes: {
|
|
35
|
+
id: `${ariaAttributes.id}-menu`,
|
|
36
|
+
"aria-labelledby": effortTitleId,
|
|
37
|
+
}, onSelect: (item) => {
|
|
38
|
+
onSelectEffort(item.data.effort);
|
|
39
|
+
closeDropdown();
|
|
40
|
+
} }) })) }));
|
|
29
41
|
}
|
|
@@ -51,6 +51,13 @@ export type EffortMenuItemData = {
|
|
|
51
51
|
* @internal
|
|
52
52
|
*/
|
|
53
53
|
export declare function useReasoningOptionItems(selectedEffort: GenAIChatEffort, labelMode: ReasoningLabelMode): IUiMenuItem<EffortMenuItemData>[];
|
|
54
|
+
/**
|
|
55
|
+
* Header for the standalone effort dropdown (dialog with close control).
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare function ReasoningEffortMenuHeader({ titleId }: {
|
|
59
|
+
titleId: string;
|
|
60
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
54
61
|
/**
|
|
55
62
|
* The "Reasoning" row rendered inside the agent menu. It is a self-contained Dropdown whose trigger
|
|
56
63
|
* is the row and whose body is the effort options — opened as its own overlay on the left of the row.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChatReasoningMenu.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChatReasoningMenu.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,e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SAAS,EAAE,kBAAkB,GAC9B,WAAW,CAAC,kBAAkB,CAAC,EAAE,CA8BnC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,2CAczE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,EACtC,IAAI,EACP,EAAE,kCAAkC,CAAC;IAAE,WAAW,EAAE,qBAAqB,CAAA;CAAE,CAAC,2CAiE5E"}
|
|
@@ -2,11 +2,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2026 GoodData Corporation
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { defineMessages, useIntl } from "react-intl";
|
|
5
|
-
import { Dropdown, UiIcon, UiMenu, typedUiMenuContextStore, } from "@gooddata/sdk-ui-kit";
|
|
5
|
+
import { Dropdown, UiIcon, UiMenu, UiSubmenuHeader, typedUiMenuContextStore, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
6
|
+
import { SUPPORTED_EFFORTS } from "./utils/effortSelection.js";
|
|
6
7
|
const msgs = defineMessages({
|
|
7
8
|
reasoning: {
|
|
8
9
|
id: "gd.gen-ai.reasoning",
|
|
9
10
|
},
|
|
11
|
+
reasoningRowAriaLabel: {
|
|
12
|
+
id: "gd.gen-ai.reasoning.row.ariaLabel",
|
|
13
|
+
},
|
|
14
|
+
closeReasoning: {
|
|
15
|
+
id: "gd.gen-ai.close.reasoning",
|
|
16
|
+
},
|
|
10
17
|
quick: {
|
|
11
18
|
id: "gd.gen-ai.reasoning.quick",
|
|
12
19
|
},
|
|
@@ -27,18 +34,20 @@ const msgs = defineMessages({
|
|
|
27
34
|
},
|
|
28
35
|
});
|
|
29
36
|
export const REASONING_MENU_ITEM_ID = "reasoning";
|
|
30
|
-
const
|
|
31
|
-
{
|
|
32
|
-
effort: "LOW",
|
|
37
|
+
const REASONING_COPY = {
|
|
38
|
+
LOW: {
|
|
33
39
|
labels: { short: msgs.quick, full: msgs.quickFull },
|
|
34
40
|
description: msgs.quickDescription,
|
|
35
41
|
},
|
|
36
|
-
{
|
|
37
|
-
effort: "MEDIUM",
|
|
42
|
+
MEDIUM: {
|
|
38
43
|
labels: { short: msgs.thinking, full: msgs.thinkingFull },
|
|
39
44
|
description: msgs.thinkingDescription,
|
|
40
45
|
},
|
|
41
|
-
|
|
46
|
+
};
|
|
47
|
+
const REASONING_OPTIONS = SUPPORTED_EFFORTS.map((effort) => ({
|
|
48
|
+
effort,
|
|
49
|
+
...REASONING_COPY[effort],
|
|
50
|
+
}));
|
|
42
51
|
/**
|
|
43
52
|
* Localized label of the currently selected reasoning mode ("Quick" or "Quick answer", depending on
|
|
44
53
|
* the label mode), or undefined otherwise.
|
|
@@ -87,14 +96,24 @@ export function useReasoningOptionItems(selectedEffort, labelMode) {
|
|
|
87
96
|
id: `reasoning-${effort}`,
|
|
88
97
|
stringTitle: title,
|
|
89
98
|
isSelected: effort === selectedEffort,
|
|
99
|
+
selectionRole: "radio",
|
|
90
100
|
isDisabled: false,
|
|
91
101
|
data: { effort },
|
|
92
102
|
tooltip: descriptionText,
|
|
93
|
-
ariaAttributes: { "aria-label": `${title}. ${descriptionText}` },
|
|
94
103
|
iconRight: (_jsx(UiIcon, { type: "question", size: 12, color: "complementary-5", accessibilityConfig: { ariaHidden: true } })),
|
|
95
104
|
};
|
|
96
105
|
}), [intl, selectedEffort, labelMode]);
|
|
97
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Header for the standalone effort dropdown (dialog with close control).
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
export function ReasoningEffortMenuHeader({ titleId }) {
|
|
112
|
+
const intl = useIntl();
|
|
113
|
+
const { useContextStore, createSelector } = typedUiMenuContextStore();
|
|
114
|
+
const onClose = useContextStore(createSelector((ctx) => ctx.onClose));
|
|
115
|
+
return (_jsx(UiSubmenuHeader, { title: intl.formatMessage(msgs.reasoning), titleId: titleId, height: "medium", onClose: onClose, closeAriaLabel: intl.formatMessage(msgs.closeReasoning) }));
|
|
116
|
+
}
|
|
98
117
|
/**
|
|
99
118
|
* The "Reasoning" row rendered inside the agent menu. It is a self-contained Dropdown whose trigger
|
|
100
119
|
* is the row and whose body is the effort options — opened as its own overlay on the left of the row.
|
|
@@ -108,12 +127,16 @@ export function GenAIChatReasoningMenuRow({ item, }) {
|
|
|
108
127
|
const options = useReasoningOptionItems(selectedEffort, "short");
|
|
109
128
|
const { useContextStore, createSelector } = typedUiMenuContextStore();
|
|
110
129
|
const closeParentMenu = useContextStore(createSelector((ctx) => ctx.onClose));
|
|
130
|
+
const reasoningTriggerId = useIdPrefixed("reasoning-row-trigger");
|
|
131
|
+
const reasoningRowAriaLabel = intl.formatMessage(msgs.reasoningRowAriaLabel, {
|
|
132
|
+
effort: valueLabel ?? reasoningLabel,
|
|
133
|
+
});
|
|
111
134
|
return (_jsx("li", { role: "none", className: "gd-gen-ai-chat__reasoning-row", children: _jsx(Dropdown, { alignPoints: [
|
|
112
135
|
{ align: "tr tl", offset: { x: -4, y: 0 } },
|
|
113
136
|
{ align: "tl tr", offset: { x: 4, y: 0 } },
|
|
114
|
-
], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, accessibilityConfig: {}, renderButton: ({ isOpen, toggleDropdown }) => (_jsxs("button", { type: "button", className: "gd-gen-ai-chat__reasoning-row__button", "aria-haspopup": "menu", "aria-expanded": isOpen, onClick: toggleDropdown, children: [
|
|
137
|
+
], closeOnEscape: true, fullscreenOnMobile: false, autofocusOnOpen: true, returnFocusTo: reasoningTriggerId, accessibilityConfig: {}, renderButton: ({ isOpen, toggleDropdown }) => (_jsxs("button", { type: "button", id: reasoningTriggerId, className: "gd-gen-ai-chat__reasoning-row__button", "aria-label": reasoningRowAriaLabel, "aria-haspopup": "menu", "aria-expanded": isOpen, onClick: toggleDropdown, children: [
|
|
115
138
|
_jsx("span", { className: "gd-gen-ai-chat__reasoning-row__title", children: reasoningLabel }), valueLabel ? (_jsx("span", { className: "gd-gen-ai-chat__reasoning-row__value", children: valueLabel })) : null, _jsx("i", { className: "gd-icon-navigateright" })
|
|
116
|
-
] })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(UiMenu, { dataTestId: "reasoning_dropdown_menu", items: options, size: "small", minWidth: 200, maxWidth: 260, containerTopPadding: "small", containerBottomPadding: "small", ariaAttributes: ariaAttributes, onSelect: (option) => {
|
|
139
|
+
] })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(UiMenu, { dataTestId: "reasoning_dropdown_menu", items: options, size: "small", minWidth: 200, maxWidth: 260, containerTopPadding: "small", containerBottomPadding: "small", ariaAttributes: ariaAttributes, onClose: closeDropdown, onSelect: (option) => {
|
|
117
140
|
onSelectEffort?.(option.data.effort);
|
|
118
141
|
closeDropdown();
|
|
119
142
|
closeParentMenu?.();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualizationContents.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/contents/VisualizationContents.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAEH,KAAK,aAAa,EAYrB,MAAM,qBAAqB,CAAC;AAgD7B,OAAO,EAAE,KAAK,qBAAqB,EAAqC,MAAM,mBAAmB,CAAC;AAMlG,OAAO,EAEH,0BAA0B,EAC7B,MAAM,8CAA8C,CAAC;AA+BtD,MAAM,MAAM,0BAA0B,GAAG;IACrC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACxD,oBAAoB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,KAAK,IAAI,CAAC;CAC3F,CAAC;AAEF,KAAK,6BAA6B,GAAG,IAAI,CACrC,0BAA0B,EACxB,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,8BAA8B,GAC9B,sBAAsB,GACtB,aAAa,GACb,iBAAiB,GACjB,mBAAmB,GACnB,sBAAsB,CAC3B,CAAC;
|
|
1
|
+
{"version":3,"file":"VisualizationContents.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/contents/VisualizationContents.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAEH,KAAK,aAAa,EAYrB,MAAM,qBAAqB,CAAC;AAgD7B,OAAO,EAAE,KAAK,qBAAqB,EAAqC,MAAM,mBAAmB,CAAC;AAMlG,OAAO,EAEH,0BAA0B,EAC7B,MAAM,8CAA8C,CAAC;AA+BtD,MAAM,MAAM,0BAA0B,GAAG;IACrC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACxD,oBAAoB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,KAAK,IAAI,CAAC;CAC3F,CAAC;AAEF,KAAK,6BAA6B,GAAG,IAAI,CACrC,0BAA0B,EACxB,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,8BAA8B,GAC9B,sBAAsB,GACtB,aAAa,GACb,iBAAiB,GACjB,mBAAmB,GACnB,sBAAsB,CAC3B,CAAC;AAikCF,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,6BAA6B,2CAmClF"}
|
|
@@ -43,7 +43,9 @@ function VisualizationContentsComponentCore({ content, messageId, useMarkdown, c
|
|
|
43
43
|
const visualization = content.createdVisualizations?.[0];
|
|
44
44
|
const { metrics, dimensions, filters, sorts } = useExecution(visualization);
|
|
45
45
|
const config = useConfig();
|
|
46
|
-
const
|
|
46
|
+
const settings = useSelector(settingsSelector);
|
|
47
|
+
const useHostedAnalyticalDesigner = Boolean(settings?.enableShellApplication_analyticalDesigner);
|
|
48
|
+
const enableSecondGranularities = Boolean(settings?.enableSecondGranularities);
|
|
47
49
|
const [saveDialogOpen, setSaveDialogOpen] = useState(null);
|
|
48
50
|
const [hasVisError, setHasVisError] = useState(false);
|
|
49
51
|
const [visLoading, setVisLoading] = useState(true);
|
|
@@ -207,14 +209,14 @@ function VisualizationContentsComponentCore({ content, messageId, useMarkdown, c
|
|
|
207
209
|
type: "keyDriveAnalysis",
|
|
208
210
|
transition: "in-place",
|
|
209
211
|
origin: {},
|
|
210
|
-
}, event);
|
|
212
|
+
}, event, enableSecondGranularities);
|
|
211
213
|
if (keyDriverData.length === 0) {
|
|
212
214
|
setDrillState(null);
|
|
213
215
|
}
|
|
214
216
|
else {
|
|
215
217
|
setDrillState({ keyDriverData, event });
|
|
216
218
|
}
|
|
217
|
-
}, []);
|
|
219
|
+
}, [enableSecondGranularities]);
|
|
218
220
|
const handleSdkError = useCallback((error) => {
|
|
219
221
|
// Ignore NO_DATA error, we still want an option to save the visualization
|
|
220
222
|
if (!isNoDataSdkError(error)) {
|
|
@@ -112,6 +112,14 @@ function getFormatByGranularity(granularity) {
|
|
|
112
112
|
return "M/d/y, h:mm a";
|
|
113
113
|
case "GDC.time.minute_in_hour":
|
|
114
114
|
return "m";
|
|
115
|
+
case "GDC.time.minute_in_day":
|
|
116
|
+
return "h:mm a";
|
|
117
|
+
case "GDC.time.second":
|
|
118
|
+
return "M/d/y, h:mm:ss a";
|
|
119
|
+
case "GDC.time.second_in_minute":
|
|
120
|
+
return "s";
|
|
121
|
+
case "GDC.time.second_in_day":
|
|
122
|
+
return "h:mm:ss a";
|
|
115
123
|
case "GDC.time.month":
|
|
116
124
|
return "MMM y";
|
|
117
125
|
case "GDC.time.month_in_year":
|
|
@@ -17,8 +17,9 @@ export type ConversationVisualisationProps = {
|
|
|
17
17
|
} | null) => void;
|
|
18
18
|
enableDrilling?: boolean;
|
|
19
19
|
enableChangeAnalysis?: boolean;
|
|
20
|
+
enableSecondGranularities?: boolean;
|
|
20
21
|
enableNewPivotTable?: boolean;
|
|
21
22
|
enableAccessibleChartTooltip?: boolean;
|
|
22
23
|
};
|
|
23
|
-
export declare function ConversationVisualisation({ message, colorPalette, visualization, execConfig, agGridToken, isTable, onVisualisationError, onDrillFired, enableDrilling, enableChangeAnalysis, enableNewPivotTable, enableAccessibleChartTooltip }: ConversationVisualisationProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function ConversationVisualisation({ message, colorPalette, visualization, execConfig, agGridToken, isTable, onVisualisationError, onDrillFired, enableDrilling, enableChangeAnalysis, enableSecondGranularities, enableNewPivotTable, enableAccessibleChartTooltip }: ConversationVisualisationProps): import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
//# sourceMappingURL=ConversationVisualisation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationVisualisation.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualisation.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAEH,KAAK,aAAa,EAElB,KAAK,gBAAgB,EAOxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAInB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,4BAA4B,CAAC;AAiBpC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAyBpE,MAAM,MAAM,8BAA8B,GAAG;IACzC,OAAO,EAAE,0BAA0B,CAAC;IACpC,aAAa,EAAE,WAAW,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC,CAAC;IACnF,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,CACX,IAAI,EAAE;QACF,aAAa,EAAE,kCAAkC,EAAE,CAAC;QACpD,KAAK,EAAE,WAAW,CAAC;KACtB,GAAG,IAAI,KACP,IAAI,CAAC;IACV,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,EACtC,OAAO,EACP,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,cAAqB,EACrB,oBAA4B,EAC5B,mBAA0B,EAC1B,4BAAoC,EACvC,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"ConversationVisualisation.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualisation.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAEH,KAAK,aAAa,EAElB,KAAK,gBAAgB,EAOxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAInB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,4BAA4B,CAAC;AAiBpC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAyBpE,MAAM,MAAM,8BAA8B,GAAG;IACzC,OAAO,EAAE,0BAA0B,CAAC;IACpC,aAAa,EAAE,WAAW,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC,CAAC;IACnF,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,CACX,IAAI,EAAE;QACF,aAAa,EAAE,kCAAkC,EAAE,CAAC;QACpD,KAAK,EAAE,WAAW,CAAC;KACtB,GAAG,IAAI,KACP,IAAI,CAAC;IACV,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,EACtC,OAAO,EACP,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,cAAqB,EACrB,oBAA4B,EAC5B,yBAAiC,EACjC,mBAA0B,EAC1B,4BAAoC,EACvC,EAAE,8BAA8B,2CAuPhC"}
|
|
@@ -28,7 +28,7 @@ const legendTooltipOptions = {
|
|
|
28
28
|
responsive: "autoPositionWithPopup",
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
|
-
export function ConversationVisualisation({ message, colorPalette, visualization, execConfig, agGridToken, isTable, onVisualisationError, onDrillFired, enableDrilling = true, enableChangeAnalysis = false, enableNewPivotTable = true, enableAccessibleChartTooltip = false, }) {
|
|
31
|
+
export function ConversationVisualisation({ message, colorPalette, visualization, execConfig, agGridToken, isTable, onVisualisationError, onDrillFired, enableDrilling = true, enableChangeAnalysis = false, enableSecondGranularities = false, enableNewPivotTable = true, enableAccessibleChartTooltip = false, }) {
|
|
32
32
|
const intl = useIntl();
|
|
33
33
|
const dispatch = useDispatch();
|
|
34
34
|
const resolvedAgGridToken = useAgGridToken(agGridToken);
|
|
@@ -90,14 +90,14 @@ export function ConversationVisualisation({ message, colorPalette, visualization
|
|
|
90
90
|
type: "keyDriveAnalysis",
|
|
91
91
|
transition: "in-place",
|
|
92
92
|
origin: {},
|
|
93
|
-
}, event);
|
|
93
|
+
}, event, enableSecondGranularities);
|
|
94
94
|
if (keyDriverData.length === 0) {
|
|
95
95
|
onDrillFired?.(null);
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
98
|
onDrillFired?.({ keyDriverData, event });
|
|
99
99
|
}
|
|
100
|
-
}, [onDrillFired]);
|
|
100
|
+
}, [onDrillFired, enableSecondGranularities]);
|
|
101
101
|
const renderCurrentChart = () => {
|
|
102
102
|
if (!visualization) {
|
|
103
103
|
return null;
|
package/esm/components/messages/conversationContents/ConversationVisualizationContent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationVisualizationContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualizationContent.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAyBvF,OAAO,EAAE,KAAK,0BAA0B,EAAE,KAAK,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAY9G,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAwBlF,MAAM,MAAM,qCAAqC,GAAG;IAChD,OAAO,EAAE,0BAA0B,CAAC;IACpC,IAAI,EAAE,mCAAmC,CAAC;IAC1C,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,aAAa,EAAE,WAAW,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC,CAAC;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,EAC7C,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,SAAS,EACZ,EAAE,qCAAqC,
|
|
1
|
+
{"version":3,"file":"ConversationVisualizationContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualizationContent.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAyBvF,OAAO,EAAE,KAAK,0BAA0B,EAAE,KAAK,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAY9G,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAwBlF,MAAM,MAAM,qCAAqC,GAAG;IAChD,OAAO,EAAE,0BAA0B,CAAC;IACpC,IAAI,EAAE,mCAAmC,CAAC;IAC1C,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,aAAa,EAAE,WAAW,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC,CAAC;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,EAC7C,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,SAAS,EACZ,EAAE,qCAAqC,2CAkHvC"}
|
|
@@ -26,6 +26,7 @@ export function ConversationVisualizationContent({ message, part, scenario, visu
|
|
|
26
26
|
const enableNewPivotTable = useSelector((state) => settingsSelector(state)?.enableNewPivotTable);
|
|
27
27
|
const enableAccessibleChartTooltip = useSelector((state) => settingsSelector(state)?.enableAccessibleChartTooltip);
|
|
28
28
|
const enableChangeAnalysis = useSelector((state) => settingsSelector(state)?.enableChangeAnalysis);
|
|
29
|
+
const enableSecondGranularities = useSelector((state) => settingsSelector(state)?.enableSecondGranularities);
|
|
29
30
|
const containerRef = useRef(null);
|
|
30
31
|
const [hasVisFatal, setVisFatal] = useState(false);
|
|
31
32
|
const [visError, setVisError] = useState(null);
|
|
@@ -56,7 +57,7 @@ export function ConversationVisualizationContent({ message, part, scenario, visu
|
|
|
56
57
|
const classNames = cx("gd-gen-ai-chat__conversation__item__content", "gd-gen-ai-chat__conversation__item__content--visualization", className);
|
|
57
58
|
return (_jsxs("div", { className: classNames, children: [
|
|
58
59
|
_jsx(DrillState, { drillState: drillState, setDrillState: setDrillState, containerRef: containerRef, filters: visualization.insight.filters, children: _jsxs(Wrapper, { containerRef: containerRef, visualization: visualization, children: [
|
|
59
|
-
_jsx(VisualisationMenu, { visualization: visualization, scenario: scenario, isVisualisationSaved: visualisationSaved, isVisualisationCheckLoading: visualisationCheckLoading, isTable: isTable, onTable: setIsTable, hasError: hasVisFatal, moreButtonId: moreButtonDescId, onSave: onSave, onOpen: onOpen, onCopy: onCopy, isLoading: part.reporting ?? false }), _jsx(Title, { id: moreButtonDescId, visualization: visualization, scenario: scenario }), _jsx(VisualisationWrapper, { message: message, colorPalette: colorPalette, isTable: isTable, visualization: visualization, agGridToken: agGridToken, execConfig: scenario?.execConfig, enableChangeAnalysis: enableChangeAnalysis, enableNewPivotTable: enableNewPivotTable, enableAccessibleChartTooltip: enableAccessibleChartTooltip, enableDrilling: !scenario || scenario.isBaseline, onDrillFired: setDrillState, onVisualisationError: onVisualizationError }), _jsx(SaveDialog, {})
|
|
60
|
+
_jsx(VisualisationMenu, { visualization: visualization, scenario: scenario, isVisualisationSaved: visualisationSaved, isVisualisationCheckLoading: visualisationCheckLoading, isTable: isTable, onTable: setIsTable, hasError: hasVisFatal, moreButtonId: moreButtonDescId, onSave: onSave, onOpen: onOpen, onCopy: onCopy, isLoading: part.reporting ?? false }), _jsx(Title, { id: moreButtonDescId, visualization: visualization, scenario: scenario }), _jsx(VisualisationWrapper, { message: message, colorPalette: colorPalette, isTable: isTable, visualization: visualization, agGridToken: agGridToken, execConfig: scenario?.execConfig, enableChangeAnalysis: enableChangeAnalysis, enableSecondGranularities: !!enableSecondGranularities, enableNewPivotTable: enableNewPivotTable, enableAccessibleChartTooltip: enableAccessibleChartTooltip, enableDrilling: !scenario || scenario.isBaseline, onDrillFired: setDrillState, onVisualisationError: onVisualizationError }), _jsx(SaveDialog, {})
|
|
60
61
|
] }) }), _jsx(VisualizationErrorReport, { error: visError })
|
|
61
62
|
] }));
|
|
62
63
|
}
|
|
@@ -114,6 +114,14 @@ function getFormatByGranularity(granularity) {
|
|
|
114
114
|
return "M/d/y, h:mm a";
|
|
115
115
|
case "GDC.time.minute_in_hour":
|
|
116
116
|
return "m";
|
|
117
|
+
case "GDC.time.minute_in_day":
|
|
118
|
+
return "h:mm a";
|
|
119
|
+
case "GDC.time.second":
|
|
120
|
+
return "M/d/y, h:mm:ss a";
|
|
121
|
+
case "GDC.time.second_in_minute":
|
|
122
|
+
return "s";
|
|
123
|
+
case "GDC.time.second_in_day":
|
|
124
|
+
return "h:mm:ss a";
|
|
117
125
|
case "GDC.time.month":
|
|
118
126
|
return "MMM y";
|
|
119
127
|
case "GDC.time.month_in_year":
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type GenAIChatEffort } from "@gooddata/sdk-model";
|
|
2
|
+
import { type IChatConversationLocalItem } from "../../model.js";
|
|
3
|
+
export declare const SUPPORTED_EFFORTS: readonly ["LOW", "MEDIUM"];
|
|
4
|
+
export type SupportedEffort = (typeof SUPPORTED_EFFORTS)[number];
|
|
5
|
+
export declare const DEFAULT_EFFORT: SupportedEffort;
|
|
6
|
+
export declare function sanitizeEffort(effort: GenAIChatEffort | undefined): SupportedEffort | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* The effort a conversation was last using, or undefined when its history records none.
|
|
9
|
+
*/
|
|
10
|
+
export declare function deriveConversationEffort(items: IChatConversationLocalItem[] | undefined): SupportedEffort | undefined;
|
|
11
|
+
//# sourceMappingURL=effortSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effortSelection.d.ts","sourceRoot":"","sources":["../../../src/components/utils/effortSelection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAGjE,eAAO,MAAM,iBAAiB,4BAAsE,CAAC;AAErG,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,eAAO,MAAM,cAAc,EAAE,eAA0B,CAAC;AAExD,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,GAAG,eAAe,GAAG,SAAS,CAE/F;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACpC,KAAK,EAAE,0BAA0B,EAAE,GAAG,SAAS,GAChD,eAAe,GAAG,SAAS,CAQ7B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
// Efforts the UI can represent, in menu order. The backend enum is wider (it also has HIGH).
|
|
3
|
+
export const SUPPORTED_EFFORTS = ["LOW", "MEDIUM"];
|
|
4
|
+
export const DEFAULT_EFFORT = "MEDIUM";
|
|
5
|
+
export function sanitizeEffort(effort) {
|
|
6
|
+
return SUPPORTED_EFFORTS.find((supported) => supported === effort);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The effort a conversation was last using, or undefined when its history records none.
|
|
10
|
+
*/
|
|
11
|
+
export function deriveConversationEffort(items) {
|
|
12
|
+
const lastUserItem = items?.filter((item) => item.role === "user" && item.id).pop();
|
|
13
|
+
if (!lastUserItem) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
return sanitizeEffort(lastUserItem.reasoningEffort) ?? DEFAULT_EFFORT;
|
|
17
|
+
}
|
|
@@ -14,7 +14,7 @@ export declare function buildFiltersContext(filters: FilterContextItem[], displa
|
|
|
14
14
|
/**
|
|
15
15
|
* @internal
|
|
16
16
|
*/
|
|
17
|
-
export declare function buildWidgetsContext(widgetsMap: Pick<Map<ObjRef, IWidget>, "values" | "get"> | undefined, resultsIdMap?: Pick<Map<string, string | undefined>, "values" | "get">): {
|
|
17
|
+
export declare function buildWidgetsContext(widgetsMap: Pick<Map<ObjRef, IWidget>, "values" | "get"> | undefined, resultsIdMap?: Pick<Map<string, string | undefined>, "values" | "get">, visualizationSwitcherActiveVisualizations?: Record<string, string>): {
|
|
18
18
|
widgets: IGenAIWidgetDescriptor[];
|
|
19
19
|
referencedObjects: IGenAIObjectReference[];
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/context/dashboard.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,mCAAmC,EACxC,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EAEtB,KAAK,sBAAsB,EAC3B,KAAK,OAAO,EACZ,KAAK,MAAM,EASd,MAAM,qBAAqB,CAAC;AAM7B;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,sBAAsB,GAAG,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AAuB,GAAG,UAAU,EAC5D,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,OAAO,GAAG,WAAW,GAAG,YAAY,CAAC,CAAC,GACpF,sBAAsB,CAOxB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAC/B,OAAO,EAAE,iBAAiB,EAAE,EAC5B,YAAY,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,mCAAmC,CAAC,EAAE,KAAK,CAAC,GAC7E,sBAAsB,EAAE,CA2E1B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAC/B,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,GAAG,SAAS,EACpE,YAAY,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,EACtE,yCAAyC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACnE;IAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAAC,iBAAiB,EAAE,qBAAqB,EAAE,CAAA;CAAE,CAuEnF"}
|
package/esm/context/dashboard.js
CHANGED
|
@@ -91,7 +91,7 @@ export function buildFiltersContext(filters, displayForms) {
|
|
|
91
91
|
/**
|
|
92
92
|
* @internal
|
|
93
93
|
*/
|
|
94
|
-
export function buildWidgetsContext(widgetsMap, resultsIdMap) {
|
|
94
|
+
export function buildWidgetsContext(widgetsMap, resultsIdMap, visualizationSwitcherActiveVisualizations) {
|
|
95
95
|
const widgets = [];
|
|
96
96
|
const referencedObjects = [];
|
|
97
97
|
if (!widgetsMap) {
|
|
@@ -116,7 +116,9 @@ export function buildWidgetsContext(widgetsMap, resultsIdMap) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
if (isVisualizationSwitcherWidget(widget)) {
|
|
119
|
-
const
|
|
119
|
+
const activeVisualizationId = visualizationSwitcherActiveVisualizations?.[objRefToString(widget.ref)];
|
|
120
|
+
const activeVisualization = widget.visualizations.find((v) => v.identifier === activeVisualizationId) ??
|
|
121
|
+
widget.visualizations[0];
|
|
120
122
|
widgets.push(buildWidgetContext(widget.title || activeVisualization?.title, widget.ref, "visualizationSwitcher", {
|
|
121
123
|
insightRef: activeVisualization?.insight,
|
|
122
124
|
resultId: activeVisualization
|
package/esm/index.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export { GenAIChat, GenAIAssistant, type GenAIChatProps, type GenAIAssistantProp
|
|
|
7
7
|
export { GenAIConversations, type GenAIConversationsProps } from "./components/GenAiConversations.js";
|
|
8
8
|
export { GenAiStore, type GenAiStoreProps } from "./components/GenAiStore.js";
|
|
9
9
|
export { makeUserMessage, makeTextContents, makeUserItem, makeAssistantItem, type Message, type BaseMessage, type UserMessage, type AssistantMessage, type Contents, type TextContents, type SearchContents, type SemanticSearchContents, type RoutingContents, type ReasoningContents, type ReasoningStep, type ReasoningThought, type VisualizationContents, type ChangeAnalysisContents, type ErrorContents, type TextContentObject, type IChatConversationLocalContent, type IChatConversationLocalItem, type IChatConversationErrorContent, type IChatConversationMultipartLocalPart, type IChatConversationLocal, type IChatConversationSystemContent, } from "./model.js";
|
|
10
|
-
export { type ChatEventHandler, type BaseEvent, type ChatAssistantMessageEvent, type ChatUserMessageEvent, type ChatClosedEvent, type ChatOpenedEvent, type ChatResetEvent, type ChatFeedbackEvent, type ChatFeedbackErrorEvent, type ChatEvent, type ChatVisualizationErrorEvent, type ChatSaveVisualizationErrorEvent, type ChatSaveVisualizationSuccessEvent, type ChatCopyToClipboardEvent, type ChatConversationPinnedEvent, type ChatConversationPinErrorEvent, type ChatConversationDeleteEvent, type ChatConversationDeletedSuccessEvent, type ChatConversationDeletedErrorEvent, type ChatConversationRenameEvent, type ChatConversationRenamedSuccessEvent, type ChatConversationRenamedErrorEvent, type ChatConversationChangedEvent, type ChatDefinitionReceivedEvent, type ChatModeChangeEvent, type ChatAgentChangeEvent, isChatAssistantMessageEvent, isChatUserMessageEvent, isChatClosedEvent, isChatOpenedEvent, isChatResetEvent, isChatFeedbackEvent, isChatFeedbackErrorEvent, isChatVisualizationErrorEvent, isChatSaveVisualizationErrorEvent, isChatSaveVisualizationSuccessEvent, isChatCopyToClipboardEvent, isChatConversationPinnedEvent, isChatConversationPinErrorEvent, isChatConversationDeleteEvent, isChatConversationDeletedErrorEvent, isChatConversationDeletedSuccessEvent, isChatConversationRenameEvent, isChatConversationRenamedSuccessEvent, isChatConversationRenamedErrorEvent, isChatConversationChangedEvent, isChatDefinitionReceivedEvent, isChatModeChangeEvent, isChatAgentChangeEvent, } from "./store/events.js";
|
|
10
|
+
export { type ChatEventHandler, type BaseEvent, type ChatAssistantMessageEvent, type ChatUserMessageEvent, type ChatClosedEvent, type ChatOpenedEvent, type ChatResetEvent, type ChatFeedbackEvent, type ChatFeedbackErrorEvent, type ChatEvent, type ChatVisualizationErrorEvent, type ChatSaveVisualizationErrorEvent, type ChatSaveVisualizationSuccessEvent, type ChatCopyToClipboardEvent, type ChatConversationPinnedEvent, type ChatConversationPinErrorEvent, type ChatConversationDeleteEvent, type ChatConversationDeletedSuccessEvent, type ChatConversationDeletedErrorEvent, type ChatConversationRenameEvent, type ChatConversationRenamedSuccessEvent, type ChatConversationRenamedErrorEvent, type ChatConversationChangedEvent, type ChatDefinitionReceivedEvent, type ChatModeChangeEvent, type ChatAgentChangeEvent, type ChatContextChangeEvent, isChatAssistantMessageEvent, isChatUserMessageEvent, isChatClosedEvent, isChatOpenedEvent, isChatResetEvent, isChatFeedbackEvent, isChatFeedbackErrorEvent, isChatVisualizationErrorEvent, isChatSaveVisualizationErrorEvent, isChatSaveVisualizationSuccessEvent, isChatCopyToClipboardEvent, isChatConversationPinnedEvent, isChatConversationPinErrorEvent, isChatConversationDeleteEvent, isChatConversationDeletedErrorEvent, isChatConversationDeletedSuccessEvent, isChatConversationRenameEvent, isChatConversationRenamedSuccessEvent, isChatConversationRenamedErrorEvent, isChatConversationChangedEvent, isChatDefinitionReceivedEvent, isChatModeChangeEvent, isChatAgentChangeEvent, isChatContextChangeEvent, } from "./store/events.js";
|
|
11
11
|
export { clearThreadAction, newMessageAction, startNewConversationAction, setCurrentConversationAction, setSelectedAgentAction, } from "./store/messages/messagesSlice.js";
|
|
12
|
-
export { setFullscreenAction } from "./store/chatWindow/chatWindowSlice.js";
|
|
12
|
+
export { setFullscreenAction, setUserContextAction, setAmbientUserContextAction, } from "./store/chatWindow/chatWindowSlice.js";
|
|
13
13
|
export { type LinkHandlerEvent, type GenAIAssistantMode } from "./components/ConfigContext.js";
|
|
14
14
|
export { useGenAiChatAvailability } from "./hooks/useGenAiChatAvailability.js";
|
|
15
15
|
export { DefaultLandingScreen, type LandingScreenProps } from "./components/customized/LandingScreen.js";
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,EACH,SAAS,EACT,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,mBAAmB,GAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACH,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B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C3B,2BAA2B,EAC3B,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,6BAA6B,EAC7B,iCAAiC,EACjC,mCAAmC,EACnC,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,mCAAmC,EACnC,qCAAqC,EACrC,6BAA6B,EAC7B,qCAAqC,EACrC,mCAAmC,EACnC,8BAA8B,EAC9B,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACH,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,4BAA4B,EAC5B,sBAAsB,GACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACH,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,GAC9B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAI/E,OAAO,EAAE,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACzG,OAAO,EACH,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,kBAAkB,GAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACH,sBAAsB,EACtB,KAAK,qBAAqB,GAC7B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACH,uBAAuB,EACvB,uBAAuB,EACvB,KAAK,oBAAoB,GAC5B,MAAM,6CAA6C,CAAC"}
|
package/esm/index.js
CHANGED
|
@@ -9,9 +9,9 @@ export { GenAIChat, GenAIAssistant, } from "./components/GenAIChat.js";
|
|
|
9
9
|
export { GenAIConversations } from "./components/GenAiConversations.js";
|
|
10
10
|
export { GenAiStore } from "./components/GenAiStore.js";
|
|
11
11
|
export { makeUserMessage, makeTextContents, makeUserItem, makeAssistantItem, } from "./model.js";
|
|
12
|
-
export { isChatAssistantMessageEvent, isChatUserMessageEvent, isChatClosedEvent, isChatOpenedEvent, isChatResetEvent, isChatFeedbackEvent, isChatFeedbackErrorEvent, isChatVisualizationErrorEvent, isChatSaveVisualizationErrorEvent, isChatSaveVisualizationSuccessEvent, isChatCopyToClipboardEvent, isChatConversationPinnedEvent, isChatConversationPinErrorEvent, isChatConversationDeleteEvent, isChatConversationDeletedErrorEvent, isChatConversationDeletedSuccessEvent, isChatConversationRenameEvent, isChatConversationRenamedSuccessEvent, isChatConversationRenamedErrorEvent, isChatConversationChangedEvent, isChatDefinitionReceivedEvent, isChatModeChangeEvent, isChatAgentChangeEvent, } from "./store/events.js";
|
|
12
|
+
export { isChatAssistantMessageEvent, isChatUserMessageEvent, isChatClosedEvent, isChatOpenedEvent, isChatResetEvent, isChatFeedbackEvent, isChatFeedbackErrorEvent, isChatVisualizationErrorEvent, isChatSaveVisualizationErrorEvent, isChatSaveVisualizationSuccessEvent, isChatCopyToClipboardEvent, isChatConversationPinnedEvent, isChatConversationPinErrorEvent, isChatConversationDeleteEvent, isChatConversationDeletedErrorEvent, isChatConversationDeletedSuccessEvent, isChatConversationRenameEvent, isChatConversationRenamedSuccessEvent, isChatConversationRenamedErrorEvent, isChatConversationChangedEvent, isChatDefinitionReceivedEvent, isChatModeChangeEvent, isChatAgentChangeEvent, isChatContextChangeEvent, } from "./store/events.js";
|
|
13
13
|
export { clearThreadAction, newMessageAction, startNewConversationAction, setCurrentConversationAction, setSelectedAgentAction, } from "./store/messages/messagesSlice.js";
|
|
14
|
-
export { setFullscreenAction } from "./store/chatWindow/chatWindowSlice.js";
|
|
14
|
+
export { setFullscreenAction, setUserContextAction, setAmbientUserContextAction, } from "./store/chatWindow/chatWindowSlice.js";
|
|
15
15
|
export { useGenAiChatAvailability } from "./hooks/useGenAiChatAvailability.js";
|
|
16
16
|
//customization
|
|
17
17
|
export { DefaultLandingScreen } from "./components/customized/LandingScreen.js";
|
package/esm/internal.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { makeTextContents, makeUserMessage } from "./model.js";
|
|
2
|
-
import { setAmbientUserContextAction, setUserContextAction } from "./store/chatWindow/chatWindowSlice.js";
|
|
3
2
|
import { clearThreadAction, newMessageAction, setSelectedAgentAction } from "./store/messages/messagesSlice.js";
|
|
4
3
|
export { ChatSkeleton } from "./components/ChatSkeleton.js";
|
|
5
4
|
export { GenAIChatDialog, type GenAIChatDialogProps } from "./components/GenAIChatDialog.js";
|
|
6
5
|
export { GenAIChatDialogConnected, type IGenAIChatDialogConnectedProps, type GenAIChatConnectedEvent, } from "./components/GenAIChatDialogConnected.js";
|
|
7
|
-
export { clearThreadAction, newMessageAction, makeUserMessage, makeTextContents,
|
|
6
|
+
export { clearThreadAction, newMessageAction, makeUserMessage, makeTextContents, setSelectedAgentAction };
|
|
8
7
|
export { GenAIStandaloneInput, type GenAIStandaloneInputProps } from "./components/GenAIStandaloneInput.js";
|
|
9
8
|
//# sourceMappingURL=internal.d.ts.map
|
package/esm/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EACH,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACzB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EACH,wBAAwB,EACxB,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,GAC/B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,CAAC;AAC1G,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,sCAAsC,CAAC"}
|