@gooddata/sdk-ui-gen-ai 11.65.0-alpha.2 → 11.65.0-alpha.3
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/NOTICE +2 -2
- package/esm/components/GenAIChatDialogConnected.d.ts +12 -3
- package/esm/components/GenAIChatDialogConnected.d.ts.map +1 -1
- package/esm/components/GenAIChatDialogConnected.js +17 -6
- package/esm/components/Messages.d.ts.map +1 -1
- package/esm/components/Messages.js +4 -1
- package/esm/components/hooks/usePublisherDocumentSavedSync.d.ts +2 -0
- package/esm/components/hooks/usePublisherDocumentSavedSync.d.ts.map +1 -1
- package/esm/components/messages/AssistantItem.d.ts.map +1 -1
- package/esm/components/messages/AssistantItem.js +26 -1
- package/esm/components/messages/AssistantItemFeedback.d.ts.map +1 -1
- package/esm/components/messages/AssistantItemFeedback.js +4 -3
- package/esm/components/messages/FeedbackPopup.d.ts +3 -2
- package/esm/components/messages/FeedbackPopup.d.ts.map +1 -1
- package/esm/components/messages/FeedbackPopup.js +7 -3
- package/esm/components/messages/ItemsGroup.d.ts.map +1 -1
- package/esm/components/messages/ItemsGroup.js +1 -1
- package/esm/components/messages/contents/CustomHyperlink.js +1 -1
- package/esm/components/messages/conversationContents/ConversationMultipartContent.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationMultipartContent.js +3 -2
- package/esm/components/messages/conversationContents/ConversationPublisherDocumentContent.d.ts +3 -5
- package/esm/components/messages/conversationContents/ConversationPublisherDocumentContent.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationPublisherDocumentContent.js +18 -7
- package/esm/context/addContextReference.d.ts.map +1 -1
- package/esm/context/addContextReference.js +2 -1
- package/esm/context/build.d.ts.map +1 -1
- package/esm/context/build.js +2 -0
- package/esm/context/collectContextReferences.d.ts.map +1 -1
- package/esm/context/collectContextReferences.js +2 -2
- package/esm/context/removeContextReference.d.ts.map +1 -1
- package/esm/context/removeContextReference.js +3 -2
- package/esm/context/selectContextReferences.js +2 -2
- package/esm/context/viewedPublisherDocument.d.ts +3 -1
- package/esm/context/viewedPublisherDocument.d.ts.map +1 -1
- package/esm/context/viewedPublisherDocument.js +10 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/localization/bundles/de-DE.localization-bundle.js +2 -2
- package/esm/localization/bundles/en-US.localization-bundle.d.ts +8 -0
- package/esm/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-US.localization-bundle.js +8 -0
- package/esm/localization/bundles/fr-FR.localization-bundle.js +1 -1
- package/esm/publisherDocumentPart.d.ts +20 -0
- package/esm/publisherDocumentPart.d.ts.map +1 -0
- package/esm/publisherDocumentPart.js +42 -0
- package/esm/sdk-ui-gen-ai.d.ts +38 -3
- package/esm/store/chatWindow/chatWindowSelectors.d.ts.map +1 -1
- package/esm/store/chatWindow/chatWindowSelectors.js +3 -3
- package/esm/store/chatWindow/chatWindowSlice.d.ts +3 -3
- package/esm/store/chatWindow/chatWindowSlice.d.ts.map +1 -1
- package/esm/store/events.d.ts +34 -4
- package/esm/store/events.d.ts.map +1 -1
- package/esm/store/events.js +7 -0
- package/esm/store/messages/messagesSlice.d.ts +7 -4
- package/esm/store/messages/messagesSlice.d.ts.map +1 -1
- package/esm/store/messages/messagesSlice.js +14 -5
- package/esm/store/sideEffects/onDefinitionReceivedTrigger.d.ts.map +1 -1
- package/esm/store/sideEffects/onDefinitionReceivedTrigger.js +15 -1
- package/esm/store/sideEffects/onEvent.d.ts +10 -2
- package/esm/store/sideEffects/onEvent.d.ts.map +1 -1
- package/esm/store/sideEffects/onEvent.js +18 -9
- package/esm/store/sideEffects/onPublisherDocumentSaved.d.ts.map +1 -1
- package/esm/store/sideEffects/onPublisherDocumentSaved.js +13 -2
- package/esm/store/sideEffects/onUserMessage.d.ts +1 -1
- package/esm/store/sideEffects/onUserMessage.d.ts.map +1 -1
- package/esm/store/sideEffects/onUserMessage.js +27 -2
- package/esm/utils.d.ts +6 -4
- package/esm/utils.d.ts.map +1 -1
- package/esm/utils.js +8 -7
- package/package.json +22 -22
- package/styles/css/conversations.css +3 -3
- package/styles/css/input.css +2 -2
- package/styles/css/intelligence.css +2 -2
- package/styles/css/main.css +55 -55
- package/styles/css/messages.css +15 -15
- package/styles/css/tooltip.css +1 -1
- package/styles/scss/conversations.scss +2 -2
- package/styles/scss/intelligence.scss +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/store/events.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,EAC7C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/store/events.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,EAC7C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,uCAAuC,EAC5C,KAAK,yCAAyC,EACjD,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAElF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;GAGG;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K,EAAE,SAAS,GAAG,IAAI,CAMtC;CACJ"}
|
package/esm/store/events.js
CHANGED
|
@@ -97,6 +97,13 @@ export const isChatUserAnswersEvent = (event) => {
|
|
|
97
97
|
export const isChatAssistantMessageEvent = (event) => {
|
|
98
98
|
return event.type === "chatAssistantMessage";
|
|
99
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Type guard for the ChatReasoningEvent.
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
export const isChatReasoningEvent = (event) => {
|
|
105
|
+
return event.type === "chatReasoning";
|
|
106
|
+
};
|
|
100
107
|
/**
|
|
101
108
|
* Type guard for the ChatFeedbackEvent.
|
|
102
109
|
* @public
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import { type IChatConversationInteractionStep, type IChatConversationItem } from "@gooddata/sdk-backend-spi";
|
|
2
|
+
import { type GenAIPublisherDocumentFormat, type IChatConversationInteractionStep, type IChatConversationItem } from "@gooddata/sdk-backend-spi";
|
|
3
3
|
import { type GenAIChatEffort, type GenAIChatInteractionUserFeedback } from "@gooddata/sdk-model";
|
|
4
4
|
import { type SdkErrorType } from "@gooddata/sdk-ui";
|
|
5
5
|
import { type GenAIAgent, type IChatConversationErrorContent, type IChatConversationLocal, type IChatConversationLocalContent, type IChatConversationLocalItem } from "../../model.js";
|
|
@@ -67,7 +67,9 @@ type MessagesSliceState = {
|
|
|
67
67
|
export declare const LS_VERBOSE_KEY = "gd-gen-ai-verbose";
|
|
68
68
|
export declare const messagesSliceName = "messages";
|
|
69
69
|
export declare const messagesSliceReducer: Reducer<MessagesSliceState>;
|
|
70
|
-
export declare const
|
|
70
|
+
export declare const activateConversationAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
71
|
+
conversationId: string;
|
|
72
|
+
}, "messages/activateConversationAction">, loadThreadAction: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/loadThreadAction">, loadThreadErrorAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
71
73
|
error: Error;
|
|
72
74
|
}, "messages/loadThreadErrorAction">, loadConversationsSuccessAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
73
75
|
conversations: IChatConversationLocal[];
|
|
@@ -92,11 +94,11 @@ export declare const loadThreadAction: import("@reduxjs/toolkit").ActionCreatorW
|
|
|
92
94
|
assistantMessageId: string;
|
|
93
95
|
conversationId?: string;
|
|
94
96
|
}, "messages/evaluateMessageErrorAction">, evaluateMessageStreamingAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
97
|
+
conversationId: string;
|
|
95
98
|
item?: IChatConversationItem;
|
|
96
99
|
content?: IChatConversationLocalContent | IChatConversationErrorContent;
|
|
97
100
|
assistantMessageId: string;
|
|
98
101
|
interactionId?: string;
|
|
99
|
-
conversationId?: string;
|
|
100
102
|
}, "messages/evaluateMessageStreamingAction">, evaluateMessageUpdateAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
101
103
|
userMessageId: string;
|
|
102
104
|
conversation: IChatConversationLocal;
|
|
@@ -106,7 +108,7 @@ export declare const loadThreadAction: import("@reduxjs/toolkit").ActionCreatorW
|
|
|
106
108
|
conversationId?: string;
|
|
107
109
|
}, "messages/evaluateMessageUpdateAction">, evaluateMessageCompleteAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
108
110
|
assistantMessageId: string;
|
|
109
|
-
conversationId
|
|
111
|
+
conversationId: string;
|
|
110
112
|
cancelled?: boolean;
|
|
111
113
|
}, "messages/evaluateMessageCompleteAction">, setMessagesAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
112
114
|
items?: IChatConversationLocalItem[];
|
|
@@ -211,6 +213,7 @@ publisherDocumentSavedAction: import("@reduxjs/toolkit").ActionCreatorWithPayloa
|
|
|
211
213
|
itemId: string;
|
|
212
214
|
documentRef?: string;
|
|
213
215
|
savedDocumentId: string;
|
|
216
|
+
format?: GenAIPublisherDocumentFormat;
|
|
214
217
|
}, "messages/publisherDocumentSavedAction">,
|
|
215
218
|
/**
|
|
216
219
|
* @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messagesSlice.d.ts","sourceRoot":"","sources":["../../../src/store/messages/messagesSlice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAEjF,OAAO,
|
|
1
|
+
{"version":3,"file":"messagesSlice.d.ts","sourceRoot":"","sources":["../../../src/store/messages/messagesSlice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,EACrC,KAAK,qBAAqB,EAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAClG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIrD,OAAO,EACH,KAAK,UAAU,EACf,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAGlC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAEH,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EAC1B,MAAM,gBAAgB,CAAC;AAQxB,KAAK,kBAAkB,GAAG;IACtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,aAAa,EAAE,sBAAsB,EAAE,GAAG,SAAS,CAAC;IACpD;;OAEG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,mBAAmB,EAAE,sBAAsB,GAAG,SAAS,CAAC;IACxD;;OAEG;IACH,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC;;;OAGG;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"@reduxjs/toolkit";
|
|
|
3
3
|
import { selectDefaultAgentId } from "../../components/utils/agentSelection.js";
|
|
4
4
|
import { DEFAULT_EFFORT, deriveConversationEffort } from "../../components/utils/effortSelection.js";
|
|
5
5
|
import { makeAgentChangeItem, } from "../../model.js";
|
|
6
|
+
import { findPublisherDocumentPart } from "../../publisherDocumentPart.js";
|
|
6
7
|
import { createEmptyConversation, getConversationData, getConversationLocalId, isConversationWithLocalId, } from "../utils.js";
|
|
7
8
|
export const LS_VERBOSE_KEY = "gd-gen-ai-verbose";
|
|
8
9
|
export const messagesSliceName = "messages";
|
|
@@ -350,6 +351,17 @@ const messagesSlice = createSlice({
|
|
|
350
351
|
state.selectedAgentId = payload.conversation.agentId ?? state.selectedAgentId;
|
|
351
352
|
seedConversationEffort(state, state.currentConversation?.localId);
|
|
352
353
|
},
|
|
354
|
+
activateConversationAction: (state, { payload: { conversationId } }) => {
|
|
355
|
+
const conversation = [state.currentConversation, ...(state.conversations ?? [])].find((candidate) => candidate?.id === conversationId || candidate?.localId === conversationId);
|
|
356
|
+
if (!conversation || conversation.localId === state.currentConversation?.localId) {
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
state.currentConversation = conversation;
|
|
360
|
+
state.threadId = conversation.id;
|
|
361
|
+
state.loaded = !!state.conversationsData[conversation.localId]?.order.length;
|
|
362
|
+
state.selectedAgentId = conversation.agentId ?? state.selectedAgentId;
|
|
363
|
+
seedConversationEffort(state, conversation.localId);
|
|
364
|
+
},
|
|
353
365
|
setSelectedAgentAction: (state, { payload, }) => {
|
|
354
366
|
const previousAgentId = state.currentConversation?.agentId;
|
|
355
367
|
state.selectedAgentId = payload.agentId;
|
|
@@ -629,10 +641,7 @@ const messagesSlice = createSlice({
|
|
|
629
641
|
if (item?.content.type !== "multipart") {
|
|
630
642
|
return;
|
|
631
643
|
}
|
|
632
|
-
const
|
|
633
|
-
const target = payload.documentRef === undefined
|
|
634
|
-
? documents[0]
|
|
635
|
-
: documents.find((part) => part.ref === payload.documentRef);
|
|
644
|
+
const target = findPublisherDocumentPart(item.content.parts, payload.documentRef);
|
|
636
645
|
if (target) {
|
|
637
646
|
target.saved = payload.savedDocumentId;
|
|
638
647
|
}
|
|
@@ -753,7 +762,7 @@ const messagesSlice = createSlice({
|
|
|
753
762
|
});
|
|
754
763
|
const errorToObject = (error) => Object.fromEntries(Object.getOwnPropertyNames(error).map((key) => [key, error[key]]));
|
|
755
764
|
export const messagesSliceReducer = messagesSlice.reducer;
|
|
756
|
-
export const { loadThreadAction, loadThreadErrorAction, loadConversationsSuccessAction, loadConversationSuccessAction, clearThreadErrorAction, clearConversationSuccessAction, evaluateConversationTitleAction, evaluateMessageAction, evaluateMessageErrorAction, evaluateMessageStreamingAction, evaluateMessageUpdateAction, evaluateMessageCompleteAction, setMessagesAction, setVerboseAction, setGlobalErrorAction, cancelAsyncAction, clearConversationLoadingAction, setUserFeedback, setUserFeedbackError, saveVisualizationAction, savedVisualizationAction, saveVisualizationErrorAction, saveVisualizationSuccessAction, saveVisualisationRenderStatusAction, saveVisualisationRenderStatusSuccessAction, visualizationErrorAction, appendInteractionStepAction, appendTracedActionAction, appendResponseDetailAction, applyPendingAgentSwitchAction, revertAgentSwitchAction, setAgentsAction, setAgentsLoadingAction, pinConversationSuccessAction, pinConversationFailureAction, renameConversationSuccessAction, renameConversationFailureAction, deleteConversationStartAction, deleteConversationSuccessAction, deleteConversationFailureAction, filledFormAction, refocusInput,
|
|
765
|
+
export const { activateConversationAction, loadThreadAction, loadThreadErrorAction, loadConversationsSuccessAction, loadConversationSuccessAction, clearThreadErrorAction, clearConversationSuccessAction, evaluateConversationTitleAction, evaluateMessageAction, evaluateMessageErrorAction, evaluateMessageStreamingAction, evaluateMessageUpdateAction, evaluateMessageCompleteAction, setMessagesAction, setVerboseAction, setGlobalErrorAction, cancelAsyncAction, clearConversationLoadingAction, setUserFeedback, setUserFeedbackError, saveVisualizationAction, savedVisualizationAction, saveVisualizationErrorAction, saveVisualizationSuccessAction, saveVisualisationRenderStatusAction, saveVisualisationRenderStatusSuccessAction, visualizationErrorAction, appendInteractionStepAction, appendTracedActionAction, appendResponseDetailAction, applyPendingAgentSwitchAction, revertAgentSwitchAction, setAgentsAction, setAgentsLoadingAction, pinConversationSuccessAction, pinConversationFailureAction, renameConversationSuccessAction, renameConversationFailureAction, deleteConversationStartAction, deleteConversationSuccessAction, deleteConversationFailureAction, filledFormAction, refocusInput,
|
|
757
766
|
/**
|
|
758
767
|
* @alpha
|
|
759
768
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onDefinitionReceivedTrigger.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onDefinitionReceivedTrigger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onDefinitionReceivedTrigger.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onDefinitionReceivedTrigger.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAGjE;;;GAGG;AACH,wBAAiB,wBAAwB,CACrC,KAAK,EAAE,0BAA0B,GAAG,0BAA0B,EAAE,EAChE,cAAc,EAAE,MAAM,iCAqFzB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
import { put } from "redux-saga/effects";
|
|
3
|
-
import { isChatConversationDashboardContent, isChatConversationMultipartContent, isChatConversationPublisherDocumentContent, isChatConversationVisualisationContent, } from "@gooddata/sdk-backend-spi";
|
|
3
|
+
import { isChatConversationDashboardContent, isChatConversationMultipartContent, isChatConversationPublisherDocumentContent, isChatConversationPublisherDocumentContentV2, isChatConversationVisualisationContent, } from "@gooddata/sdk-backend-spi";
|
|
4
4
|
import { onDefinitionReceivedAction } from "../chatWindow/chatWindowSlice.js";
|
|
5
5
|
/**
|
|
6
6
|
* Notify the store that a definition was received.
|
|
@@ -40,6 +40,20 @@ export function* notifyDefinitionReceived(items, conversationId) {
|
|
|
40
40
|
baseDocumentId: multipartContent.baseDocumentId ?? undefined,
|
|
41
41
|
}));
|
|
42
42
|
}
|
|
43
|
+
else if (isChatConversationPublisherDocumentContentV2(multipartContent) &&
|
|
44
|
+
multipartContent.publisherDocument) {
|
|
45
|
+
yield put(onDefinitionReceivedAction({
|
|
46
|
+
conversationId,
|
|
47
|
+
interactionId,
|
|
48
|
+
itemId: item.id,
|
|
49
|
+
definitionType: "publisherDocumentV2",
|
|
50
|
+
publisherDocumentV2: multipartContent.publisherDocument,
|
|
51
|
+
documentRef: multipartContent.ref ?? undefined,
|
|
52
|
+
refines: multipartContent.refines ?? undefined,
|
|
53
|
+
reworksOpenDocument: multipartContent.reworksOpenDocument === true,
|
|
54
|
+
baseDocumentId: multipartContent.baseDocumentId ?? undefined,
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
43
57
|
else if (isChatConversationVisualisationContent(multipartContent) &&
|
|
44
58
|
multipartContent.visualization) {
|
|
45
59
|
yield put(onDefinitionReceivedAction({
|
|
@@ -3,8 +3,16 @@ import { type ChatAssistantMessageEvent, type ChatClarificationQuestion, type Ev
|
|
|
3
3
|
import { evaluateMessageCompleteAction, evaluateMessageStreamingAction, filledFormAction, newMessageAction } from "../messages/messagesSlice.js";
|
|
4
4
|
export declare function onEvent(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
5
5
|
export declare function onNewMessage({ payload: message }: ReturnType<typeof newMessageAction>): Generator<import("redux-saga/effects").GetContextEffect | import("redux-saga/effects").SelectEffect, void, EventDispatcher & string>;
|
|
6
|
-
export declare function onEvaluateMessageComplete({ payload: { assistantMessageId }, }: ReturnType<typeof evaluateMessageCompleteAction>): Generator<import("redux-saga/effects").CallEffect<Generator<unknown, MessageInfo | null, any>> | import("redux-saga/effects").GetContextEffect | import("redux-saga/effects").SelectEffect, void, MessageInfo & EventDispatcher &
|
|
7
|
-
|
|
6
|
+
export declare function onEvaluateMessageComplete({ payload: { assistantMessageId, cancelled, conversationId }, }: ReturnType<typeof evaluateMessageCompleteAction>): Generator<import("redux-saga/effects").CallEffect<Generator<unknown, MessageInfo | null, any>> | import("redux-saga/effects").GetContextEffect | import("redux-saga/effects").SelectEffect, void, MessageInfo & EventDispatcher & import("@gooddata/sdk-backend-spi").IChatConversation & {
|
|
7
|
+
localId: string;
|
|
8
|
+
generatingTitle?: boolean;
|
|
9
|
+
inProgress?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function onEvaluateMessageStreaming({ payload: { assistantMessageId, conversationId }, }: ReturnType<typeof evaluateMessageStreamingAction>): Generator<import("redux-saga/effects").CallEffect<Generator<unknown, MessageInfo | null, any>> | import("redux-saga/effects").GetContextEffect | import("redux-saga/effects").SelectEffect, void, MessageInfo & EventDispatcher & import("@gooddata/sdk-backend-spi").IChatConversation & {
|
|
12
|
+
localId: string;
|
|
13
|
+
generatingTitle?: boolean;
|
|
14
|
+
inProgress?: boolean;
|
|
15
|
+
}>;
|
|
8
16
|
export declare function onClarificationQuestionsAnswered({ payload: { assistantMessageId, responses }, }: ReturnType<typeof filledFormAction>): Generator<import("redux-saga/effects").CallEffect<Generator<unknown, MessageInfo | null, any>> | import("redux-saga/effects").GetContextEffect | import("redux-saga/effects").SelectEffect, void, MessageInfo & EventDispatcher & string>;
|
|
9
17
|
type MessageInfo = {
|
|
10
18
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onEvent.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onEvent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"onEvent.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onEvent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAiBnE,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACvB,MAAM,cAAc,CAAC;AAQtB,OAAO,EAKH,6BAA6B,EAC7B,8BAA8B,EAC9B,gBAAgB,EAEhB,gBAAgB,EAanB,MAAM,8BAA8B,CAAC;AAKtC,wBAAiB,OAAO,6EA6BvB;AA2MD,wBAAiB,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,wIA+BtF;AAED,wBAAiB,yBAAyB,CAAC,EACvC,OAAO,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,cAAc,EAAE,GAC7D,EAAE,UAAU,CAAC,OAAO,6BAA6B,CAAC;;;;GAqBlD;AAED,wBAAiB,0BAA0B,CAAC,EACxC,OAAO,EAAE,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAClD,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC;;;;GAmBnD;AAED,wBAAiB,gCAAgC,CAAC,EAC9C,OAAO,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAC7C,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,6OAiBrC;AAwGD,KAAK,WAAW,GAAG;IACf,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAC7C,MAAM,CAAC,EAAE,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC7C,sBAAsB,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACrD,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { call, getContext, select, takeEvery } from "redux-saga/effects";
|
|
3
3
|
import { copyToClipboardAction, onDefinitionReceivedAction, setAmbientUserContextAction, setFullscreenAction, setOpenAction, setUserContextAction, } from "../chatWindow/chatWindowSlice.js";
|
|
4
4
|
import { setIsOpened } from "../localStorage.js";
|
|
5
|
-
import { conversationMessagesSelector, threadIdSelector } from "../messages/messagesSelectors.js";
|
|
5
|
+
import { conversationByIdOrLocalIdSelector, conversationMessagesByIdSelector, conversationMessagesSelector, threadIdSelector, } from "../messages/messagesSelectors.js";
|
|
6
6
|
import { clearThreadAction, deleteConversationAction, deleteConversationFailureAction, deleteConversationSuccessAction, evaluateMessageCompleteAction, evaluateMessageStreamingAction, filledFormAction, loadConversationSuccessAction, newMessageAction, pinConversationFailureAction, pinConversationSuccessAction, renameConversationAction, renameConversationFailureAction, renameConversationSuccessAction, saveVisualizationErrorAction, saveVisualizationSuccessAction, setCurrentConversationAction, setSelectedAgentAction, setUserFeedback, setUserFeedbackError, visualizationErrorAction, } from "../messages/messagesSlice.js";
|
|
7
7
|
import { convertToChatClarificationAnswers } from "./converters/toChatClarificationAnswers.js";
|
|
8
8
|
import { convertToChatClarificationQuestions } from "./converters/toChatClarificationQuestions.js";
|
|
@@ -214,28 +214,35 @@ export function* onNewMessage({ payload: message }) {
|
|
|
214
214
|
break;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
export function* onEvaluateMessageComplete({ payload: { assistantMessageId }, }) {
|
|
218
|
-
const message = yield call(loadMessage, assistantMessageId);
|
|
217
|
+
export function* onEvaluateMessageComplete({ payload: { assistantMessageId, cancelled, conversationId }, }) {
|
|
218
|
+
const message = yield call(loadMessage, assistantMessageId, conversationId);
|
|
219
219
|
if (!message?.useCase) {
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
222
222
|
const eventDispatcher = yield getContext("eventDispatcher");
|
|
223
|
-
const
|
|
223
|
+
const conversation = conversationId
|
|
224
|
+
? yield select(conversationByIdOrLocalIdSelector, conversationId)
|
|
225
|
+
: undefined;
|
|
226
|
+
const threadId = conversation?.id || conversationId;
|
|
224
227
|
eventDispatcher.dispatch({
|
|
225
228
|
type: "chatAssistantMessage",
|
|
226
229
|
interactionId: message.id,
|
|
227
230
|
useCase: message.useCase,
|
|
228
231
|
skills: message.skills,
|
|
229
232
|
threadId,
|
|
233
|
+
...(cancelled ? { cancelled: true } : {}),
|
|
230
234
|
});
|
|
231
235
|
}
|
|
232
|
-
export function* onEvaluateMessageStreaming({ payload: { assistantMessageId }, }) {
|
|
233
|
-
const message = yield call(loadMessage, assistantMessageId);
|
|
236
|
+
export function* onEvaluateMessageStreaming({ payload: { assistantMessageId, conversationId }, }) {
|
|
237
|
+
const message = yield call(loadMessage, assistantMessageId, conversationId);
|
|
234
238
|
if (!message?.clarificationQuestions?.length || message.filled) {
|
|
235
239
|
return;
|
|
236
240
|
}
|
|
237
241
|
const eventDispatcher = yield getContext("eventDispatcher");
|
|
238
|
-
const
|
|
242
|
+
const conversation = conversationId
|
|
243
|
+
? yield select(conversationByIdOrLocalIdSelector, conversationId)
|
|
244
|
+
: undefined;
|
|
245
|
+
const threadId = conversation?.id || conversationId;
|
|
239
246
|
eventDispatcher.dispatch({
|
|
240
247
|
type: "chatClarificationQuestions",
|
|
241
248
|
interactionId: message.id,
|
|
@@ -334,8 +341,10 @@ function* onDefinitionReceived({ payload }) {
|
|
|
334
341
|
...payload,
|
|
335
342
|
});
|
|
336
343
|
}
|
|
337
|
-
function* loadMessage(assistantMessageId) {
|
|
338
|
-
const allMessages =
|
|
344
|
+
function* loadMessage(assistantMessageId, conversationId) {
|
|
345
|
+
const allMessages = conversationId
|
|
346
|
+
? yield select(conversationMessagesByIdSelector, conversationId)
|
|
347
|
+
: yield select(conversationMessagesSelector);
|
|
339
348
|
const message = allMessages.find((m) => m.localId === assistantMessageId);
|
|
340
349
|
return message
|
|
341
350
|
? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onPublisherDocumentSaved.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onPublisherDocumentSaved.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onPublisherDocumentSaved.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onPublisherDocumentSaved.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAEjF,wBAAiB,wBAAwB,CAAC,EAAE,OAAO,EAAE,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,qKAgDrG"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { call, getContext, select } from "redux-saga/effects";
|
|
3
|
-
import {
|
|
3
|
+
import { findPublisherDocumentPart, publisherDocumentFormatOf, publisherDocumentPartFormat, } from "../../publisherDocumentPart.js";
|
|
4
|
+
import { settingsSelector } from "../chatWindow/chatWindowSelectors.js";
|
|
5
|
+
import { conversationByIdOrLocalIdSelector, conversationMessagesByIdSelector, } from "../messages/messagesSelectors.js";
|
|
4
6
|
export function* onPublisherDocumentSaved({ payload }) {
|
|
5
7
|
if (payload.documentRef === undefined) {
|
|
6
8
|
return;
|
|
@@ -9,6 +11,13 @@ export function* onPublisherDocumentSaved({ payload }) {
|
|
|
9
11
|
if (!conversation) {
|
|
10
12
|
return;
|
|
11
13
|
}
|
|
14
|
+
const messages = yield select(conversationMessagesByIdSelector, conversation.localId);
|
|
15
|
+
const content = messages.find((message) => message.id === payload.itemId)?.content;
|
|
16
|
+
const part = content?.type === "multipart"
|
|
17
|
+
? findPublisherDocumentPart(content.parts, payload.documentRef)
|
|
18
|
+
: undefined;
|
|
19
|
+
const settings = yield select(settingsSelector);
|
|
20
|
+
const format = payload.format ?? (part ? publisherDocumentPartFormat(part) : publisherDocumentFormatOf(settings));
|
|
12
21
|
const backend = yield getContext("backend");
|
|
13
22
|
const workspace = yield getContext("workspace");
|
|
14
23
|
const isPreview = yield getContext("isPreview");
|
|
@@ -18,7 +27,9 @@ export function* onPublisherDocumentSaved({ payload }) {
|
|
|
18
27
|
.genAI()
|
|
19
28
|
.getChatConversations({ isPreview })
|
|
20
29
|
.getConversationThread(conversation.id);
|
|
21
|
-
yield call(thread.resavePublisherDocument.bind(thread), payload.documentRef, payload.savedDocumentId
|
|
30
|
+
yield call(thread.resavePublisherDocument.bind(thread), payload.documentRef, payload.savedDocumentId, {
|
|
31
|
+
format,
|
|
32
|
+
});
|
|
22
33
|
}
|
|
23
34
|
catch (error) {
|
|
24
35
|
console.error("Failed to notify GenAI about the saved publisher document", error);
|
|
@@ -23,7 +23,7 @@ export declare function onUserMessage({ payload }: ReturnType<typeof newMessageA
|
|
|
23
23
|
}> | import("redux-saga/effects").PutEffect<{
|
|
24
24
|
payload: {
|
|
25
25
|
assistantMessageId: string;
|
|
26
|
-
conversationId
|
|
26
|
+
conversationId: string;
|
|
27
27
|
cancelled?: boolean;
|
|
28
28
|
};
|
|
29
29
|
type: "messages/evaluateMessageCompleteAction";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onUserMessage.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onUserMessage.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,KAAK,iBAAiB,EASzB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"onUserMessage.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onUserMessage.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,KAAK,iBAAiB,EASzB,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EACH,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAElC,MAAM,gBAAgB,CAAC;AAmBxB,OAAO,EAUH,KAAK,gBAAgB,EAGxB,MAAM,8BAA8B,CAAC;AAMtC;;;GAGG;AACH,wBAAiB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oJAS9E"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
import { call, cancel, cancelled, getContext, put, select } from "redux-saga/effects";
|
|
3
3
|
import { isChatConversationError, isChatConversationInteractionStep, isChatConversationItem, } from "@gooddata/sdk-backend-spi";
|
|
4
|
+
import { extractHeading } from "../../components/utils/markdownUtils.js";
|
|
4
5
|
import { makeAssistantItem, } from "../../model.js";
|
|
6
|
+
import { publisherDocumentFormatOf } from "../../publisherDocumentPart.js";
|
|
5
7
|
import { generateTitleFromQuestion } from "../../utils.js";
|
|
6
8
|
import { agentSwitchingActiveSelector, allowedRelationshipTypesSelector, objectTypesSelector, settingsSelector, tagsSelector, userContextSelector, } from "../chatWindow/chatWindowSelectors.js";
|
|
7
9
|
import { conversationEffortSelector, conversationMessagesByIdSelector, conversationSelector, pendingAgentSwitchSelector, selectedAgentIdSelector, } from "../messages/messagesSelectors.js";
|
|
@@ -25,6 +27,7 @@ export function* onUserMessage({ payload }) {
|
|
|
25
27
|
function* conversationUserMessage(message) {
|
|
26
28
|
let initialAssistantMessage = undefined;
|
|
27
29
|
let lastAssistantMessage = undefined;
|
|
30
|
+
let eventDispatcher = undefined;
|
|
28
31
|
// Check current conversation
|
|
29
32
|
const conversationState = yield select(conversationSelector);
|
|
30
33
|
let conversation = undefined;
|
|
@@ -40,6 +43,7 @@ function* conversationUserMessage(message) {
|
|
|
40
43
|
const backend = yield getContext("backend");
|
|
41
44
|
const workspace = yield getContext("workspace");
|
|
42
45
|
const isPreview = yield getContext("isPreview");
|
|
46
|
+
eventDispatcher = yield getContext("eventDispatcher");
|
|
43
47
|
// Check state
|
|
44
48
|
if (!conversationState?.localId) {
|
|
45
49
|
throw new Error("Conversation ID is not available.");
|
|
@@ -86,6 +90,7 @@ function* conversationUserMessage(message) {
|
|
|
86
90
|
if (!conversation) {
|
|
87
91
|
throw new Error("Conversation is not available.");
|
|
88
92
|
}
|
|
93
|
+
eventDispatcher?.dispatch({ type: "chatReasoning", threadId: conversation.id, title: undefined });
|
|
89
94
|
// Flush any pending agent switch before sending the message so that the
|
|
90
95
|
// "Switched to X" item and the switchAgent API call happen together with
|
|
91
96
|
// the first message sent to the new agent. evaluateMessageAction above is
|
|
@@ -153,6 +158,9 @@ function* conversationUserMessage(message) {
|
|
|
153
158
|
}
|
|
154
159
|
}
|
|
155
160
|
finally {
|
|
161
|
+
if (conversation) {
|
|
162
|
+
eventDispatcher?.dispatch({ type: "chatReasoning", threadId: conversation.id, title: undefined });
|
|
163
|
+
}
|
|
156
164
|
const wasCanceled = yield cancelled();
|
|
157
165
|
// Mark the last assistant message as complete
|
|
158
166
|
const messageToComplete = lastAssistantMessage ?? initialAssistantMessage;
|
|
@@ -164,7 +172,7 @@ function* conversationUserMessage(message) {
|
|
|
164
172
|
if (messageExists) {
|
|
165
173
|
yield put(evaluateMessageCompleteAction({
|
|
166
174
|
assistantMessageId: messageToComplete.localId,
|
|
167
|
-
conversationId: conversation?.localId ?? conversationState?.localId,
|
|
175
|
+
conversationId: conversation?.localId ?? conversationState?.localId ?? "",
|
|
168
176
|
cancelled: wasCanceled,
|
|
169
177
|
}));
|
|
170
178
|
}
|
|
@@ -173,6 +181,8 @@ function* conversationUserMessage(message) {
|
|
|
173
181
|
}
|
|
174
182
|
function* evaluateUserConversationMessage(conversation, userMessage, assistantMessage, preparedChatThread, isStartMessage) {
|
|
175
183
|
let reader = undefined;
|
|
184
|
+
const eventDispatcher = yield getContext("eventDispatcher");
|
|
185
|
+
let reasoningTitle = undefined;
|
|
176
186
|
const settings = yield select(settingsSelector);
|
|
177
187
|
const objectTypes = yield select(objectTypesSelector);
|
|
178
188
|
const { includeTags, excludeTags } = yield select(tagsSelector);
|
|
@@ -188,7 +198,8 @@ function* evaluateUserConversationMessage(conversation, userMessage, assistantMe
|
|
|
188
198
|
let queryBuilder = preparedChatThread
|
|
189
199
|
.withSearchLimit(Number(settings?.["aiChatSearchLimit"]) || 10)
|
|
190
200
|
.withObjectTypes(objectTypes)
|
|
191
|
-
.withEffort(selectedEffort)
|
|
201
|
+
.withEffort(selectedEffort)
|
|
202
|
+
.withPublisherDocumentFormat(publisherDocumentFormatOf(settings));
|
|
192
203
|
if (excludeTags) {
|
|
193
204
|
queryBuilder = queryBuilder.withExcludeTags(excludeTags);
|
|
194
205
|
}
|
|
@@ -314,6 +325,20 @@ function* evaluateUserConversationMessage(conversation, userMessage, assistantMe
|
|
|
314
325
|
interactionId: chunkInteractionId,
|
|
315
326
|
item: value,
|
|
316
327
|
}));
|
|
328
|
+
if (value.role === "assistant" && localContent.type === "reasoning") {
|
|
329
|
+
const messages = yield select(conversationMessagesByIdSelector, conversation.localId);
|
|
330
|
+
const content = messages.find((item) => item.localId === currentAssistantMessage.localId)?.content;
|
|
331
|
+
const title = content?.type === "reasoning" ? extractHeading(content.summary) : null;
|
|
332
|
+
if (title && title !== reasoningTitle) {
|
|
333
|
+
reasoningTitle = title;
|
|
334
|
+
eventDispatcher.dispatch({
|
|
335
|
+
type: "chatReasoning",
|
|
336
|
+
threadId: conversation.id,
|
|
337
|
+
interactionId: chunkInteractionId,
|
|
338
|
+
title,
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}
|
|
317
342
|
yield call(notifyDefinitionReceived, {
|
|
318
343
|
...currentAssistantMessage,
|
|
319
344
|
content: localContent,
|
package/esm/utils.d.ts
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { type IntlShape } from "react-intl";
|
|
2
|
-
import { type IChatConversationItem } from "@gooddata/sdk-backend-spi";
|
|
2
|
+
import { type GenAIPublisherDocumentFormat, type IChatConversationItem } from "@gooddata/sdk-backend-spi";
|
|
3
3
|
import { type GenAIObjectReferenceType, type IAttributeOrMeasure, type ObjRef } from "@gooddata/sdk-model";
|
|
4
4
|
import { type IChatConversationLocal, type IChatConversationLocalItem } from "./model.js";
|
|
5
5
|
import { type IGenAIContextListItem, type IGenAIContextObject } from "./types.js";
|
|
6
6
|
export declare function toContextListItem(ref: ObjRef, title: string, visualizationUrl?: string): IGenAIContextListItem;
|
|
7
7
|
export declare function getVisualizationHref(wsId: string, visId: string, status: "draft" | "saved"): string;
|
|
8
8
|
export declare function getDashboardHref(wsId: string, dasId: string, status: "draft" | "saved", useHostedDashboards?: boolean): string;
|
|
9
|
-
export declare function getPublisherDocumentHref(wsId: string, documentId: string): string;
|
|
9
|
+
export declare function getPublisherDocumentHref(wsId: string, documentId: string, format: GenAIPublisherDocumentFormat): string;
|
|
10
10
|
export declare function getPublisherDocumentDraftHref(wsId: string, conversationId: string, itemId: string): string;
|
|
11
|
-
export declare function getPublisherDocumentModifyHref({ workspaceId, documentId, conversationId, itemId, }: {
|
|
11
|
+
export declare function getPublisherDocumentModifyHref({ workspaceId, documentId, conversationId, itemId, format, }: {
|
|
12
12
|
workspaceId: string;
|
|
13
13
|
documentId: string;
|
|
14
14
|
conversationId: string;
|
|
15
15
|
itemId: string;
|
|
16
|
+
format: GenAIPublisherDocumentFormat;
|
|
16
17
|
}): string;
|
|
17
|
-
export declare function getPublisherDocumentItemUrl({ workspaceId, saved, baseDocumentId, conversationId, itemId, }: {
|
|
18
|
+
export declare function getPublisherDocumentItemUrl({ workspaceId, saved, baseDocumentId, conversationId, itemId, format, }: {
|
|
18
19
|
workspaceId: string;
|
|
19
20
|
saved?: string | null;
|
|
20
21
|
baseDocumentId?: string | null;
|
|
21
22
|
conversationId?: string;
|
|
22
23
|
itemId?: string;
|
|
24
|
+
format: GenAIPublisherDocumentFormat;
|
|
23
25
|
}): string | undefined;
|
|
24
26
|
export declare function formatPublisherDocumentPeriod(periodStart: string, periodEnd: string, intl: IntlShape): string | undefined;
|
|
25
27
|
export declare function getAbsoluteVisualizationHref(wsId: string, visId: string, status: "draft" | "saved"): string;
|
package/esm/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SA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CAAuC,CACnD,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,UAGlB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,mBAAmB,EAAE;IAE5D,UAAU;QACN,OAAO;;EAGlB;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,sBAAsB,GAAG,MAAM,CAS5F;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgC9D;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,wBAAwB,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAa3G;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,wBAAwB,CAe3G;AAED,wBAAgB,4BAA4B,CACxC,IAAI,EAAE,0BAA0B,GAAG,qBAAqB,GAAG,SAAS,WAMvE"}
|
package/esm/utils.js
CHANGED
|
@@ -26,8 +26,9 @@ export function getDashboardHref(wsId, dasId, status, useHostedDashboards) {
|
|
|
26
26
|
: `/dashboards/#/workspace/${wsId}/${dasId}/tab/defaultTabId`;
|
|
27
27
|
}
|
|
28
28
|
// Encoded like the Publisher app's own route builder, so an id with a slash stays one segment.
|
|
29
|
-
export function getPublisherDocumentHref(wsId, documentId) {
|
|
30
|
-
|
|
29
|
+
export function getPublisherDocumentHref(wsId, documentId, format) {
|
|
30
|
+
const route = format === "aac-v2" ? "document" : "report";
|
|
31
|
+
return `/workspace/${wsId}/publisher/${route}/${encodeURIComponent(documentId)}`;
|
|
31
32
|
}
|
|
32
33
|
function getPublisherDocumentDraftParams(conversationId, itemId) {
|
|
33
34
|
// The parameter names are what the publisher app reads the draft back by.
|
|
@@ -36,16 +37,16 @@ function getPublisherDocumentDraftParams(conversationId, itemId) {
|
|
|
36
37
|
export function getPublisherDocumentDraftHref(wsId, conversationId, itemId) {
|
|
37
38
|
return `/workspace/${wsId}/publisher/new?${getPublisherDocumentDraftParams(conversationId, itemId)}`;
|
|
38
39
|
}
|
|
39
|
-
export function getPublisherDocumentModifyHref({ workspaceId, documentId, conversationId, itemId, }) {
|
|
40
|
-
return `${getPublisherDocumentHref(workspaceId, documentId)}?${getPublisherDocumentDraftParams(conversationId, itemId)}`;
|
|
40
|
+
export function getPublisherDocumentModifyHref({ workspaceId, documentId, conversationId, itemId, format, }) {
|
|
41
|
+
return `${getPublisherDocumentHref(workspaceId, documentId, format)}?${getPublisherDocumentDraftParams(conversationId, itemId)}`;
|
|
41
42
|
}
|
|
42
|
-
export function getPublisherDocumentItemUrl({ workspaceId, saved, baseDocumentId, conversationId, itemId, }) {
|
|
43
|
+
export function getPublisherDocumentItemUrl({ workspaceId, saved, baseDocumentId, conversationId, itemId, format, }) {
|
|
43
44
|
if (!conversationId || !itemId) {
|
|
44
|
-
return saved ? getPublisherDocumentHref(workspaceId, saved) : undefined;
|
|
45
|
+
return saved ? getPublisherDocumentHref(workspaceId, saved, format) : undefined;
|
|
45
46
|
}
|
|
46
47
|
const documentId = saved || baseDocumentId;
|
|
47
48
|
return documentId
|
|
48
|
-
? getPublisherDocumentModifyHref({ workspaceId, documentId, conversationId, itemId })
|
|
49
|
+
? getPublisherDocumentModifyHref({ workspaceId, documentId, conversationId, itemId, format })
|
|
49
50
|
: getPublisherDocumentDraftHref(workspaceId, conversationId, itemId);
|
|
50
51
|
}
|
|
51
52
|
export function formatPublisherDocumentPeriod(periodStart, periodEnd, intl) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-gen-ai",
|
|
3
|
-
"version": "11.65.0-alpha.
|
|
3
|
+
"version": "11.65.0-alpha.3",
|
|
4
4
|
"description": "GoodData GenAI SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -57,21 +57,21 @@
|
|
|
57
57
|
"reselect": "5.1.1",
|
|
58
58
|
"tslib": "2.8.1",
|
|
59
59
|
"uuid": "11.1.1",
|
|
60
|
-
"@gooddata/api-client-tiger": "11.65.0-alpha.
|
|
61
|
-
"@gooddata/sdk-
|
|
62
|
-
"@gooddata/sdk-
|
|
63
|
-
"@gooddata/sdk-
|
|
64
|
-
"@gooddata/sdk-ui
|
|
65
|
-
"@gooddata/sdk-
|
|
66
|
-
"@gooddata/sdk-ui-
|
|
67
|
-
"@gooddata/sdk-ui-
|
|
68
|
-
"@gooddata/sdk-
|
|
69
|
-
"@gooddata/sdk-ui-
|
|
70
|
-
"@gooddata/sdk-ui-
|
|
71
|
-
"@gooddata/
|
|
72
|
-
"@gooddata/sdk-ui-semantic-search": "11.65.0-alpha.
|
|
73
|
-
"@gooddata/sdk-
|
|
74
|
-
"@gooddata/
|
|
60
|
+
"@gooddata/api-client-tiger": "11.65.0-alpha.3",
|
|
61
|
+
"@gooddata/sdk-backend-spi": "11.65.0-alpha.3",
|
|
62
|
+
"@gooddata/sdk-model": "11.65.0-alpha.3",
|
|
63
|
+
"@gooddata/sdk-pluggable-application-model": "11.65.0-alpha.3",
|
|
64
|
+
"@gooddata/sdk-ui": "11.65.0-alpha.3",
|
|
65
|
+
"@gooddata/sdk-ui-charts": "11.65.0-alpha.3",
|
|
66
|
+
"@gooddata/sdk-ui-ext": "11.65.0-alpha.3",
|
|
67
|
+
"@gooddata/sdk-ui-dashboard": "11.65.0-alpha.3",
|
|
68
|
+
"@gooddata/sdk-ui-filters": "11.65.0-alpha.3",
|
|
69
|
+
"@gooddata/sdk-ui-geo": "11.65.0-alpha.3",
|
|
70
|
+
"@gooddata/sdk-ui-pivot": "11.65.0-alpha.3",
|
|
71
|
+
"@gooddata/sdk-ui-kit": "11.65.0-alpha.3",
|
|
72
|
+
"@gooddata/sdk-ui-semantic-search": "11.65.0-alpha.3",
|
|
73
|
+
"@gooddata/sdk-ui-theme-provider": "11.65.0-alpha.3",
|
|
74
|
+
"@gooddata/util": "11.65.0-alpha.3"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@microsoft/api-documenter": "7.30.16",
|
|
@@ -110,12 +110,12 @@
|
|
|
110
110
|
"svgo": "2.8.4",
|
|
111
111
|
"typescript": "7.0.2",
|
|
112
112
|
"vitest": "5.0.4",
|
|
113
|
-
"@gooddata/
|
|
114
|
-
"@gooddata/
|
|
115
|
-
"@gooddata/
|
|
116
|
-
"@gooddata/
|
|
117
|
-
"@gooddata/
|
|
118
|
-
"@gooddata/stylelint-config": "11.65.0-alpha.
|
|
113
|
+
"@gooddata/eslint-config": "11.65.0-alpha.3",
|
|
114
|
+
"@gooddata/i18n-toolkit": "11.65.0-alpha.3",
|
|
115
|
+
"@gooddata/sdk-backend-mockingbird": "11.65.0-alpha.3",
|
|
116
|
+
"@gooddata/reference-workspace": "11.65.0-alpha.3",
|
|
117
|
+
"@gooddata/oxlint-config": "11.65.0-alpha.3",
|
|
118
|
+
"@gooddata/stylelint-config": "11.65.0-alpha.3"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
121
|
"react": "^18.0.0 || ^19.0.0",
|