@gooddata/sdk-ui-gen-ai 10.13.0-alpha.15 → 10.13.0-alpha.17
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 +3 -3
- package/esm/components/Input.d.ts +2 -3
- package/esm/components/Input.d.ts.map +1 -1
- package/esm/components/Input.js +5 -12
- package/esm/components/Input.js.map +1 -1
- package/esm/localization/bundles/en-US.json +0 -5
- package/esm/store/index.d.ts +1 -1
- package/esm/store/index.d.ts.map +1 -1
- package/esm/store/index.js +1 -1
- package/esm/store/index.js.map +1 -1
- 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 +1 -0
- package/esm/store/messages/messagesSelectors.js.map +1 -1
- package/esm/store/messages/messagesSlice.d.ts +7 -9
- package/esm/store/messages/messagesSlice.d.ts.map +1 -1
- package/esm/store/messages/messagesSlice.js +9 -35
- package/esm/store/messages/messagesSlice.js.map +1 -1
- package/esm/store/sideEffects/index.d.ts.map +1 -1
- package/esm/store/sideEffects/index.js +3 -1
- package/esm/store/sideEffects/index.js.map +1 -1
- package/esm/store/sideEffects/onUserMessage.d.ts +2 -18
- package/esm/store/sideEffects/onUserMessage.d.ts.map +1 -1
- package/esm/store/sideEffects/onUserMessage.js +8 -20
- package/esm/store/sideEffects/onUserMessage.js.map +1 -1
- package/esm/store/sideEffects/threadPolling.d.ts +11 -0
- package/esm/store/sideEffects/threadPolling.d.ts.map +1 -0
- package/esm/store/sideEffects/threadPolling.js +82 -0
- package/esm/store/sideEffects/threadPolling.js.map +1 -0
- package/package.json +12 -12
package/NOTICE
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
The following 3rd-party software packages may be used by or distributed with gooddata-ui-sdk. Any information relevant to third-party vendors listed below are collected using common, reasonable means.
|
|
9
9
|
|
|
10
|
-
Date generated: 2024-10-
|
|
10
|
+
Date generated: 2024-10-8
|
|
11
11
|
|
|
12
|
-
Revision ID:
|
|
12
|
+
Revision ID: b8d698772218c98586abd68e3ff709fca6644eac
|
|
13
13
|
|
|
14
14
|
================================================================================
|
|
15
15
|
================================================================================
|
|
@@ -69186,4 +69186,4 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
69186
69186
|
--------------------------------------------------------------------------------
|
|
69187
69187
|
--------------------------------------------------------------------------------
|
|
69188
69188
|
|
|
69189
|
-
Report Generated by FOSSA on 2024-10-
|
|
69189
|
+
Report Generated by FOSSA on 2024-10-8
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { newMessageAction
|
|
2
|
+
import { newMessageAction } from "../store/index.js";
|
|
3
3
|
import { WrappedComponentProps } from "react-intl/src/components/injectIntl.js";
|
|
4
4
|
type InputStateProps = {
|
|
5
5
|
isBusy: boolean;
|
|
@@ -7,12 +7,11 @@ type InputStateProps = {
|
|
|
7
7
|
};
|
|
8
8
|
type InputDispatchProps = {
|
|
9
9
|
newMessage: typeof newMessageAction;
|
|
10
|
-
cancelMessage: typeof cancelLastInteractionAction;
|
|
11
10
|
};
|
|
12
11
|
export declare const Input: import("react-redux").ConnectedComponent<React.FC<import("react-intl").WithIntlProps<InputStateProps & InputDispatchProps & WrappedComponentProps>> & {
|
|
13
12
|
WrappedComponent: React.ComponentType<InputStateProps & InputDispatchProps & WrappedComponentProps>;
|
|
14
13
|
}, import("react-redux").Omit<Omit<InputStateProps & InputDispatchProps & WrappedComponentProps, "intl"> & {
|
|
15
14
|
forwardedRef?: React.Ref<any> | undefined;
|
|
16
|
-
}, "isBusy" | "isEvaluating" | "newMessage"
|
|
15
|
+
}, "isBusy" | "isEvaluating" | "newMessage">>;
|
|
17
16
|
export {};
|
|
18
17
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAwB,gBAAgB,EAAa,MAAM,mBAAmB,CAAC;AAEtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAOhF,KAAK,eAAe,GAAG;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACtB,UAAU,EAAE,OAAO,gBAAgB,CAAC;CACvC,CAAC;AA4EF,eAAO,MAAM,KAAK;;;;6CAA2E,CAAC"}
|
package/esm/components/Input.js
CHANGED
|
@@ -6,14 +6,13 @@ import cx from "classnames";
|
|
|
6
6
|
import { SendIcon } from "./SendIcon.js";
|
|
7
7
|
import { connect } from "react-redux";
|
|
8
8
|
import { makeTextContents, makeUserMessage } from "../model.js";
|
|
9
|
-
import { asyncProcessSelector, newMessageAction
|
|
10
|
-
import { StopIcon } from "./StopIcon.js";
|
|
9
|
+
import { asyncProcessSelector, newMessageAction } from "../store/index.js";
|
|
11
10
|
import { injectIntl } from "react-intl";
|
|
12
11
|
// There are known compatibility issues between CommonJS (CJS) and ECMAScript modules (ESM).
|
|
13
12
|
// In ESM, default exports of CJS modules are wrapped in default properties instead of being exposed directly.
|
|
14
13
|
// https://github.com/microsoft/TypeScript/issues/52086#issuecomment-1385978414
|
|
15
14
|
const TextareaAutosize = defaultImport(DefaultTextArea);
|
|
16
|
-
const InputComponent = ({ isBusy, isEvaluating, newMessage,
|
|
15
|
+
const InputComponent = ({ isBusy, isEvaluating, newMessage, intl, }) => {
|
|
17
16
|
const [value, setValue] = React.useState("");
|
|
18
17
|
const textareaRef = React.useRef(null);
|
|
19
18
|
React.useEffect(() => {
|
|
@@ -28,9 +27,6 @@ const InputComponent = ({ isBusy, isEvaluating, newMessage, cancelMessage, intl,
|
|
|
28
27
|
newMessage(makeUserMessage([makeTextContents(value)]));
|
|
29
28
|
setValue("");
|
|
30
29
|
};
|
|
31
|
-
const handleCancel = () => {
|
|
32
|
-
cancelMessage();
|
|
33
|
-
};
|
|
34
30
|
const handleKeyDown = (e) => {
|
|
35
31
|
if (e.key === "Enter" && !e.shiftKey && !isBusy && value) {
|
|
36
32
|
e.preventDefault();
|
|
@@ -40,16 +36,14 @@ const InputComponent = ({ isBusy, isEvaluating, newMessage, cancelMessage, intl,
|
|
|
40
36
|
const handleChange = (e) => {
|
|
41
37
|
setValue(e.target.value);
|
|
42
38
|
};
|
|
43
|
-
const buttonDisabled = !value || isBusy;
|
|
39
|
+
const buttonDisabled = !value || isBusy || isEvaluating;
|
|
44
40
|
const buttonClasses = cx("gd-gen-ai-chat__input__send_button", {
|
|
45
41
|
"gd-gen-ai-chat__input__send_button--disabled": buttonDisabled,
|
|
46
42
|
});
|
|
47
43
|
return (React.createElement("div", { className: "gd-gen-ai-chat__input" },
|
|
48
44
|
React.createElement(TextareaAutosize, { ref: textareaRef, className: "gd-gen-ai-chat__input__textarea", placeholder: intl.formatMessage({ id: "gd.gen-ai.input-placeholder" }), value: value, onChange: handleChange, onKeyDown: handleKeyDown, disabled: isBusy }),
|
|
49
|
-
|
|
50
|
-
React.createElement(SendIcon, { className: buttonClasses })))
|
|
51
|
-
isEvaluating ? (React.createElement("div", { role: "button", "aria-label": intl.formatMessage({ id: "gd.gen-ai.button.abort" }), onClick: handleCancel },
|
|
52
|
-
React.createElement(StopIcon, { className: "gd-gen-ai-chat__input__send_button" }))) : null));
|
|
45
|
+
React.createElement("div", { role: "button", "aria-label": intl.formatMessage({ id: "gd.gen-ai.button.send" }), onClick: !buttonDisabled ? handleSubmit : undefined },
|
|
46
|
+
React.createElement(SendIcon, { className: buttonClasses }))));
|
|
53
47
|
};
|
|
54
48
|
const mapStateToProps = (state) => {
|
|
55
49
|
const asyncState = asyncProcessSelector(state);
|
|
@@ -60,7 +54,6 @@ const mapStateToProps = (state) => {
|
|
|
60
54
|
};
|
|
61
55
|
const mapDispatchToProps = {
|
|
62
56
|
newMessage: newMessageAction,
|
|
63
|
-
cancelMessage: cancelLastInteractionAction,
|
|
64
57
|
};
|
|
65
58
|
export const Input = connect(mapStateToProps, mapDispatchToProps)(injectIntl(InputComponent));
|
|
66
59
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAa,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,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2
|
export { getStore } from "./store.js";
|
|
3
|
-
export { loadThreadAction, loadThreadErrorAction, loadThreadSuccessAction, clearThreadAction, clearThreadErrorAction, clearThreadSuccessAction, newMessageAction, evaluateMessageAction, evaluateMessageErrorAction,
|
|
3
|
+
export { loadThreadAction, loadThreadErrorAction, loadThreadSuccessAction, clearThreadAction, clearThreadErrorAction, clearThreadSuccessAction, newMessageAction, evaluateMessageAction, evaluateMessageErrorAction, evaluateMessagePollingAction, setMessagesAction, setVerboseAction, setGlobalErrorAction, cancelAsyncAction, } from "./messages/messagesSlice.js";
|
|
4
4
|
export { messagesSelector, isVerboseSelector, lastMessageSelector, hasMessagesSelector, asyncProcessSelector, globalErrorSelector, } from "./messages/messagesSelectors.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/esm/store/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EACH,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EACH,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,GACpB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACH,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,GACtB,MAAM,iCAAiC,CAAC"}
|
package/esm/store/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2024 GoodData Corporation
|
|
2
2
|
export { getStore } from "./store.js";
|
|
3
|
-
export { loadThreadAction, loadThreadErrorAction, loadThreadSuccessAction, clearThreadAction, clearThreadErrorAction, clearThreadSuccessAction, newMessageAction, evaluateMessageAction, evaluateMessageErrorAction,
|
|
3
|
+
export { loadThreadAction, loadThreadErrorAction, loadThreadSuccessAction, clearThreadAction, clearThreadErrorAction, clearThreadSuccessAction, newMessageAction, evaluateMessageAction, evaluateMessageErrorAction, evaluateMessagePollingAction, setMessagesAction, setVerboseAction, setGlobalErrorAction, cancelAsyncAction, } from "./messages/messagesSlice.js";
|
|
4
4
|
export { messagesSelector, isVerboseSelector, lastMessageSelector, hasMessagesSelector, asyncProcessSelector, globalErrorSelector, } from "./messages/messagesSelectors.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/esm/store/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAGhC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EACH,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAGhC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EACH,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,GACpB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACH,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,GACtB,MAAM,iCAAiC,CAAC"}
|
|
@@ -7,4 +7,5 @@ export declare const lastMessageSelector: (state: RootState) => Message | undefi
|
|
|
7
7
|
export declare const hasMessagesSelector: (state: RootState) => boolean;
|
|
8
8
|
export declare const asyncProcessSelector: (state: RootState) => RootState[typeof messagesSliceName]["asyncProcess"];
|
|
9
9
|
export declare const globalErrorSelector: (state: RootState) => string | undefined;
|
|
10
|
+
export declare const lastMessageIdSelector: (state: RootState) => number | undefined;
|
|
10
11
|
//# sourceMappingURL=messagesSelectors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messagesSelectors.d.ts","sourceRoot":"","sources":["../../../src/store/messages/messagesSelectors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAIzC,eAAO,MAAM,gBAAgB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,EAG3D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGrD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,GAAG,SAGjE,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGvD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,CAAC,OAAO,iBAAiB,CAAC,CAAC,cAAc,CACnC,CAAC;AAEzE,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,GAAG,SAGhE,CAAC"}
|
|
1
|
+
{"version":3,"file":"messagesSelectors.d.ts","sourceRoot":"","sources":["../../../src/store/messages/messagesSelectors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAIzC,eAAO,MAAM,gBAAgB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,EAG3D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGrD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,GAAG,SAGjE,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAGvD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,CAAC,OAAO,iBAAiB,CAAC,CAAC,cAAc,CACnC,CAAC;AAEzE,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,GAAG,SAGhE,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,GAAG,SAGlE,CAAC"}
|
|
@@ -8,4 +8,5 @@ export const lastMessageSelector = createSelector(messagesSliceSelector, (state)
|
|
|
8
8
|
export const hasMessagesSelector = createSelector(messagesSliceSelector, (state) => state.messageOrder.length > 0);
|
|
9
9
|
export const asyncProcessSelector = createSelector(messagesSliceSelector, (state) => state.asyncProcess);
|
|
10
10
|
export const globalErrorSelector = createSelector(messagesSliceSelector, (state) => state.globalError);
|
|
11
|
+
export const lastMessageIdSelector = createSelector(messagesSelector, (messages) => [...messages].reverse().find((message) => !!message.id)?.id);
|
|
11
12
|
//# sourceMappingURL=messagesSelectors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messagesSelectors.js","sourceRoot":"","sources":["../../../src/store/messages/messagesSelectors.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,MAAM,qBAAqB,GAAG,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAoC,cAAc,CAC3E,qBAAqB,EACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAChE,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAkC,cAAc,CAC1E,qBAAqB,EACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAA8C,cAAc,CACxF,qBAAqB,EACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAC/E,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAkC,cAAc,CAC5E,qBAAqB,EACrB,CAAC,KAAK,E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cAAc,CAC5E,qBAAqB,EACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAC7B,cAAc,CAAC,qBAAqB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,mBAAmB,GAA6C,cAAc,CACvF,qBAAqB,EACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAA6C,cAAc,CACzF,gBAAgB,EAChB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,CAC5E,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssistantMessage, Message } from "../../model.js";
|
|
1
|
+
import { AssistantMessage, Contents, Message } from "../../model.js";
|
|
2
2
|
type MessagesSliceState = {
|
|
3
3
|
/**
|
|
4
4
|
* A verbose mode defines how much information is shown in the chat.
|
|
@@ -41,14 +41,12 @@ export declare const loadThreadAction: import("@reduxjs/toolkit").ActionCreatorW
|
|
|
41
41
|
error: string;
|
|
42
42
|
assistantMessageId: string;
|
|
43
43
|
userMessageId: string;
|
|
44
|
-
}, "messages/evaluateMessageErrorAction">,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
userMessageId: string;
|
|
51
|
-
}, "messages/evaluateMessageCancelAction">, cancelLastInteractionAction: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/cancelLastInteractionAction">, setMessagesAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
44
|
+
}, "messages/evaluateMessageErrorAction">, evaluateMessagePollingAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
45
|
+
contents: Contents[];
|
|
46
|
+
complete: boolean;
|
|
47
|
+
localId: string;
|
|
48
|
+
interactionId: number;
|
|
49
|
+
}, "messages/evaluateMessagePollingAction">, setMessagesAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
52
50
|
messages: Message[];
|
|
53
51
|
}, "messages/setMessagesAction">, setVerboseAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
54
52
|
verbose: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messagesSlice.d.ts","sourceRoot":"","sources":["../../../src/store/messages/messagesSlice.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,gBAAgB,
|
|
1
|
+
{"version":3,"file":"messagesSlice.d.ts","sourceRoot":"","sources":["../../../src/store/messages/messagesSlice.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,gBAAgB,EAChB,QAAQ,EAIR,OAAO,EAEV,MAAM,gBAAgB,CAAC;AAExB,KAAK,kBAAkB,GAAG;IACtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC;CACxD,CAAC;AAEF,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAClD,eAAO,MAAM,iBAAiB,aAAa,CAAC;AA+J5C,eAAO,MAAM,oBAAoB,wDAAwB,CAAC;AAC1D,eAAO,MACH,gBAAgB,uFAChB,qBAAqB;WArH6D,MAAM;sCAsHxF,uBAAuB;cAhHsC,OAAO,EAAE;wCAiHtE,iBAAiB,wFACjB,sBAAsB;WA1G6D,MAAM;uCA2GzF,wBAAwB,+FACxB,gBAAgB,6FAChB,qBAAqB;aAvFsC,gBAAgB;sCAwF3E,0BAA0B;WA1EP,MAAM;wBACO,MAAM;mBACX,MAAM;2CAyEjC,4BAA4B;cAjDN,QAAQ,EAAE;cACV,OAAO;aACR,MAAM;mBACA,MAAM;6CA+CjC,iBAAiB;cA3BmE,OAAO,EAAE;kCA4B7F,gBAAgB;aAzBiE,OAAO;iCA0BxF,oBAAoB;WAvB6D,MAAM;qCAwBvF,iBAAiB,sFACI,CAAC"}
|
|
@@ -85,46 +85,20 @@ const messagesSlice = createSlice({
|
|
|
85
85
|
assistantMessage.complete = true;
|
|
86
86
|
assistantMessage.content.push(makeErrorContents(payload.error));
|
|
87
87
|
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (!assistantMessage || !userMessage) {
|
|
88
|
+
evaluateMessagePollingAction: (state, { payload, }) => {
|
|
89
|
+
const assistantMessage = state.messages[payload.localId];
|
|
90
|
+
if (!assistantMessage || !isAssistantMessage(assistantMessage)) {
|
|
92
91
|
// This should not happen
|
|
93
92
|
state.globalError = `Unexpected error during message evaluation.`;
|
|
94
93
|
return;
|
|
95
94
|
}
|
|
96
|
-
assistantMessage.
|
|
97
|
-
assistantMessage.
|
|
95
|
+
assistantMessage.id = payload.interactionId;
|
|
96
|
+
assistantMessage.content = payload.contents;
|
|
97
|
+
assistantMessage.complete = payload.complete;
|
|
98
98
|
assistantMessage.cancelled = false;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
evaluateMessageCancelAction: (state, { payload, }) => {
|
|
102
|
-
delete state.asyncProcess;
|
|
103
|
-
const [userMessage, assistantMessage] = resolveInteraction(state, payload.userMessageId, payload.assistantMessageId);
|
|
104
|
-
if (!assistantMessage || !userMessage) {
|
|
105
|
-
// This should not happen
|
|
106
|
-
state.globalError = `Unexpected error during message evaluation.`;
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
assistantMessage.cancelled = true;
|
|
110
|
-
userMessage.cancelled = true;
|
|
111
|
-
},
|
|
112
|
-
cancelLastInteractionAction: (state) => {
|
|
113
|
-
delete state.asyncProcess;
|
|
114
|
-
const lastMessageId = state.messageOrder[state.messageOrder.length - 1];
|
|
115
|
-
const lastMessage = state.messages[lastMessageId];
|
|
116
|
-
const previousMessageId = state.messageOrder[state.messageOrder.length - 2];
|
|
117
|
-
const previousMessage = state.messages[previousMessageId];
|
|
118
|
-
if (!lastMessage ||
|
|
119
|
-
!isAssistantMessage(lastMessage) ||
|
|
120
|
-
!previousMessage ||
|
|
121
|
-
!isUserMessage(previousMessage)) {
|
|
122
|
-
// This should not happen
|
|
123
|
-
state.globalError = `Attempting to cancel evaluation on invalid message.`;
|
|
124
|
-
return;
|
|
99
|
+
if (payload.complete) {
|
|
100
|
+
delete state.asyncProcess;
|
|
125
101
|
}
|
|
126
|
-
lastMessage.cancelled = true;
|
|
127
|
-
previousMessage.cancelled = true;
|
|
128
102
|
},
|
|
129
103
|
setMessagesAction: (state, { payload: { messages } }) => {
|
|
130
104
|
setNormalizedMessages(state, messages);
|
|
@@ -141,5 +115,5 @@ const messagesSlice = createSlice({
|
|
|
141
115
|
},
|
|
142
116
|
});
|
|
143
117
|
export const messagesSliceReducer = messagesSlice.reducer;
|
|
144
|
-
export const { loadThreadAction, loadThreadErrorAction, loadThreadSuccessAction, clearThreadAction, clearThreadErrorAction, clearThreadSuccessAction, newMessageAction, evaluateMessageAction, evaluateMessageErrorAction,
|
|
118
|
+
export const { loadThreadAction, loadThreadErrorAction, loadThreadSuccessAction, clearThreadAction, clearThreadErrorAction, clearThreadSuccessAction, newMessageAction, evaluateMessageAction, evaluateMessageErrorAction, evaluateMessagePollingAction, setMessagesAction, setVerboseAction, setGlobalErrorAction, cancelAsyncAction, } = messagesSlice.actions;
|
|
145
119
|
//# sourceMappingURL=messagesSlice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messagesSlice.js","sourceRoot":"","sources":["../../../src/store/messages/messagesSlice.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"messagesSlice.js","sourceRoot":"","sources":["../../../src/store/messages/messagesSlice.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAGH,kBAAkB,EAClB,aAAa,EACb,iBAAiB,GAGpB,MAAM,gBAAgB,CAAC;AA8BxB,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAClD,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE5C,MAAM,YAAY,GAAuB;IACrC,0EAA0E;IAC1E,YAAY,EAAE,SAAS;IACvB,YAAY,EAAE,EAAE;IAChB,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,MAAM;CAClE,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,KAAyB,EAAE,QAAmB,EAAE,EAAE;IAC7E,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;QAC9C,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;QAC/B,OAAO,GAAG,CAAC;IACf,CAAC,EAAE,EAAoC,CAAC,CAAC;IACzC,KAAK,CAAC,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CACvB,KAAyB,EACzB,aAAqB,EACrB,kBAA0B,EACmB,EAAE;IAC/C,MAAM,gBAAgB,GAAG,KAAK,CAAC,QAAQ,CAAC,kB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O,KAAK,CAAC,YAAY,CAAC;QAC9B,CAAC;KACJ;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC,OAAO,CAAC;AAC1D,MAAM,CAAC,MAAM,EACT,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,GACpB,GAAG,aAAa,CAAC,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/index.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,wBAAiB,QAAQ,6EAMxB"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// (C) 2024 GoodData Corporation
|
|
2
2
|
import { takeEvery, takeLatest } from "redux-saga/effects";
|
|
3
|
-
import { setVerboseAction, loadThreadAction, clearThreadAction, newMessageAction, } from "../messages/messagesSlice.js";
|
|
3
|
+
import { setVerboseAction, loadThreadAction, clearThreadAction, newMessageAction, evaluateMessageAction, } from "../messages/messagesSlice.js";
|
|
4
4
|
import { onVerboseStore } from "./onVerboseStore.js";
|
|
5
5
|
import { onThreadLoad } from "./onThreadLoad.js";
|
|
6
6
|
import { onThreadClear } from "./onThreadClear.js";
|
|
7
7
|
import { onUserMessage } from "./onUserMessage.js";
|
|
8
|
+
import { threadPolling } from "./threadPolling.js";
|
|
8
9
|
/**
|
|
9
10
|
* One saga to rule them all.
|
|
10
11
|
* @internal
|
|
@@ -14,5 +15,6 @@ export function* rootSaga() {
|
|
|
14
15
|
yield takeLatest(loadThreadAction.type, onThreadLoad);
|
|
15
16
|
yield takeLatest(clearThreadAction.type, onThreadClear);
|
|
16
17
|
yield takeLatest(newMessageAction.type, onUserMessage);
|
|
18
|
+
yield takeLatest(evaluateMessageAction.type, threadPolling);
|
|
17
19
|
}
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/sideEffects/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/sideEffects/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;GAGG;AACH,MAAM,SAAS,CAAC,CAAC,QAAQ;IACrB,MAAM,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IACvD,MAAM,UAAU,CAAC,gBAAgB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACtD,MAAM,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACxD,MAAM,UAAU,CAAC,gBAAgB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACvD,MAAM,UAAU,CAAC,qBAAqB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -10,28 +10,12 @@ export declare function onUserMessage({ payload }: PayloadAction<Message>): Gene
|
|
|
10
10
|
message: import("../../model.js").AssistantMessage;
|
|
11
11
|
};
|
|
12
12
|
type: "messages/evaluateMessageAction";
|
|
13
|
-
}> | import("redux-saga/effects").
|
|
14
|
-
payload: {
|
|
15
|
-
assistantMessageId: string;
|
|
16
|
-
userMessageId: string;
|
|
17
|
-
};
|
|
18
|
-
type: "messages/evaluateMessageCancelAction";
|
|
19
|
-
}> | import("redux-saga/effects").PutEffect<{
|
|
20
|
-
payload: {
|
|
21
|
-
assistantMessageContents: import("../../model.js").Contents[];
|
|
22
|
-
assistantMessageId: string;
|
|
23
|
-
userMessageId: string;
|
|
24
|
-
};
|
|
25
|
-
type: "messages/evaluateMessageSuccessAction";
|
|
26
|
-
}> | import("redux-saga/effects").PutEffect<{
|
|
13
|
+
}> | import("redux-saga/effects").CallEffect<IGenAIChatEvaluation> | import("redux-saga/effects").PutEffect<{
|
|
27
14
|
payload: {
|
|
28
15
|
error: string;
|
|
29
16
|
assistantMessageId: string;
|
|
30
17
|
userMessageId: string;
|
|
31
18
|
};
|
|
32
19
|
type: "messages/evaluateMessageErrorAction";
|
|
33
|
-
}>, void, IAnalyticalBackend & string
|
|
34
|
-
payload: undefined;
|
|
35
|
-
type: "messages/cancelAsyncAction";
|
|
36
|
-
}]>;
|
|
20
|
+
}>, void, IAnalyticalBackend & string>;
|
|
37
21
|
//# sourceMappingURL=onUserMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onUserMessage.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onUserMessage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAoB,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"onUserMessage.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/onUserMessage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAoB,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAIvG,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAuD,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9F;;;GAGG;AACH,wBAAiB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,aAAa,CAAC,OAAO,CAAC;;;;;;;;;;;;uCAmCjE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// (C) 2024 GoodData Corporation
|
|
2
|
-
import { call, cancelled, getContext, put
|
|
3
|
-
import {
|
|
4
|
-
import { processContents } from "./converters/interactionsToMessages.js";
|
|
2
|
+
import { call, cancelled, getContext, put } from "redux-saga/effects";
|
|
3
|
+
import { evaluateMessageAction, evaluateMessageErrorAction } from "../messages/messagesSlice.js";
|
|
5
4
|
import { extractError } from "./utils.js";
|
|
6
5
|
import { isTextContents, isUserMessage, makeAssistantMessage } from "../../model.js";
|
|
7
6
|
/**
|
|
@@ -11,33 +10,22 @@ import { isTextContents, isUserMessage, makeAssistantMessage } from "../../model
|
|
|
11
10
|
export function* onUserMessage({ payload }) {
|
|
12
11
|
const newAssistantMessage = makeAssistantMessage([]);
|
|
13
12
|
try {
|
|
13
|
+
// Make sure the message is a user message and it got text contents
|
|
14
14
|
if (!isUserMessage(payload)) {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
const textContents = payload.content.find(
|
|
17
|
+
const textContents = payload.content.find(isTextContents)?.text;
|
|
18
18
|
if (!textContents) {
|
|
19
|
-
// TODO - handle error?
|
|
20
19
|
return;
|
|
21
20
|
}
|
|
22
|
-
yield put(evaluateMessageAction({ message: newAssistantMessage }));
|
|
23
21
|
// Retrieve backend from context
|
|
24
22
|
const backend = yield getContext("backend");
|
|
25
23
|
const workspace = yield getContext("workspace");
|
|
24
|
+
// Set evaluation state in store and start polling
|
|
25
|
+
yield put(evaluateMessageAction({ message: newAssistantMessage }));
|
|
26
|
+
// Make the request to start the evaluation
|
|
26
27
|
const chatThreadQuery = backend.workspace(workspace).genAI().getChatThread().query(textContents);
|
|
27
|
-
|
|
28
|
-
if (cancelled) {
|
|
29
|
-
yield put(evaluateMessageCancelAction({
|
|
30
|
-
assistantMessageId: newAssistantMessage.localId,
|
|
31
|
-
userMessageId: payload.localId,
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
yield put(evaluateMessageSuccessAction({
|
|
36
|
-
userMessageId: payload.localId,
|
|
37
|
-
assistantMessageId: newAssistantMessage.localId,
|
|
38
|
-
assistantMessageContents: processContents(results),
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
28
|
+
yield call(evaluateUserMessage, chatThreadQuery);
|
|
41
29
|
}
|
|
42
30
|
catch (e) {
|
|
43
31
|
yield put(evaluateMessageErrorAction({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onUserMessage.js","sourceRoot":"","sources":["../../../src/store/sideEffects/onUserMessage.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAGhC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"onUserMessage.js","sourceRoot":"","sources":["../../../src/store/sideEffects/onUserMessage.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAGhC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACjG,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAW,MAAM,gBAAgB,CAAC;AAE9F;;;G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AAkB,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE;YAChG,MAAM,EAAE,UAAU,CAAC,MAAM;SAC5B,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACnB,CAAC;YAAS,CAAC;QACP,MAAM,YAAY,GAAY,MAAM,SAAS,EAAE,CAAC;QAEhD,IAAI,YAAY,EAAE,CAAC;YACf,UAAU,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;IACL,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
import { Task } from "redux-saga";
|
|
3
|
+
import { AssistantMessage } from "../../model.js";
|
|
4
|
+
/**
|
|
5
|
+
* Load thread history and put it to the store.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare function threadPolling({ payload: { message } }: PayloadAction<{
|
|
9
|
+
message: AssistantMessage;
|
|
10
|
+
}>): Generator<import("redux-saga/effects").SelectEffect | import("redux-saga/effects").GetContextEffect | import("redux-saga/effects").ForkEffect<void> | import("redux-saga/effects").RaceEffect<import("redux-saga/effects").TakeEffect | Task<any>>, void, never>;
|
|
11
|
+
//# sourceMappingURL=threadPolling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threadPolling.d.ts","sourceRoot":"","sources":["../../../src/store/sideEffects/threadPolling.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;;GAGG;AACH,wBAAiB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,CAAC;IAAE,OAAO,EAAE,gBAAgB,CAAA;CAAE,CAAC,oQAoBpG"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
import { call, cancelled, getContext, race, take, fork, delay, put, select } from "redux-saga/effects";
|
|
3
|
+
import { cancelAsyncAction, evaluateMessageErrorAction, evaluateMessagePollingAction, newMessageAction, } from "../messages/messagesSlice.js";
|
|
4
|
+
import { processContents } from "./converters/interactionsToMessages.js";
|
|
5
|
+
import { lastMessageIdSelector } from "../messages/messagesSelectors.js";
|
|
6
|
+
/**
|
|
7
|
+
* Load thread history and put it to the store.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export function* threadPolling({ payload: { message } }) {
|
|
11
|
+
// Get the last known thread id
|
|
12
|
+
const lastInteractionId = yield select(lastMessageIdSelector);
|
|
13
|
+
// Retrieve backend from context and prepare the chat thread service
|
|
14
|
+
const backend = yield getContext("backend");
|
|
15
|
+
const workspace = yield getContext("workspace");
|
|
16
|
+
const chatThread = backend.workspace(workspace).genAI().getChatThread();
|
|
17
|
+
// Start the polling task
|
|
18
|
+
const pollingTask = yield fork(fetchChatHistoryPolling, message, chatThread, lastInteractionId);
|
|
19
|
+
// Any of the following actions will cancel the polling
|
|
20
|
+
// The loser effects will be cancelled automatically, i.e. no need to explicitly cancel polling
|
|
21
|
+
yield race([
|
|
22
|
+
pollingTask,
|
|
23
|
+
take(cancelAsyncAction.type),
|
|
24
|
+
take(evaluateMessageErrorAction.type),
|
|
25
|
+
take(newMessageAction.type),
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
function* fetchChatHistoryPolling(message, preparedChatThread, lastInteractionId) {
|
|
29
|
+
// +1 to avoid fetching the same interaction again
|
|
30
|
+
const interactionId = lastInteractionId ? lastInteractionId + 1 : 0;
|
|
31
|
+
// The internal loop, each iteration is a single poll
|
|
32
|
+
while (true) {
|
|
33
|
+
try {
|
|
34
|
+
// Delay to avoid overwhelming the server
|
|
35
|
+
yield delay(1000);
|
|
36
|
+
// Make the server request
|
|
37
|
+
const results = yield call(doTheCall, preparedChatThread, interactionId);
|
|
38
|
+
if ((results?.interactions?.length ?? 0) > 1) {
|
|
39
|
+
// Server feeds do not have stable IDs at the moment, it's hard to
|
|
40
|
+
// merge the results. We have to make an assumption that a single
|
|
41
|
+
// evaluation is running at a time.
|
|
42
|
+
console.warn("Unexpected interactions", results);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const interaction = results?.interactions?.[0];
|
|
46
|
+
if (interaction) {
|
|
47
|
+
// Update the store with new content
|
|
48
|
+
yield put(evaluateMessagePollingAction({
|
|
49
|
+
contents: processContents(interaction),
|
|
50
|
+
interactionId: interaction.interactionId,
|
|
51
|
+
complete: interaction.interactionFinished,
|
|
52
|
+
localId: message.localId,
|
|
53
|
+
}));
|
|
54
|
+
if (interaction.interactionFinished) {
|
|
55
|
+
// Polling is done, exit the loop
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (e) {
|
|
61
|
+
const isCancelled = yield cancelled();
|
|
62
|
+
if (isCancelled) {
|
|
63
|
+
// Polling is done, exit the loop
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function* doTheCall(preparedChatThread, nextInteraction) {
|
|
70
|
+
const controller = new AbortController();
|
|
71
|
+
try {
|
|
72
|
+
const results = yield call(preparedChatThread.loadHistory.bind(preparedChatThread), nextInteraction, { signal: controller.signal });
|
|
73
|
+
return results;
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
const isCancelled = yield cancelled();
|
|
77
|
+
if (isCancelled) {
|
|
78
|
+
controller.abort();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=threadPolling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threadPolling.js","sourceRoot":"","sources":["../../../src/store/sideEffects/threadPolling.ts"],"names":[],"mappings":"AAAA,gCAAgC;AA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,IAAI,eAAe,EAAE,CAAC;IAEzC,IAAI,CAAC;QACD,MAAM,OAAO,GAAuB,MAAM,IAAI,CAC1C,kBAAkB,CAAC,WAAW,CAAC,IAAI,CAAC,kBAAkB,CAAC,EACvD,eAAe,EACf,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAChC,CAAC;QAEF,OAAO,OAAO,CAAC;IACnB,CAAC;YAAS,CAAC;QACP,MAAM,WAAW,GAAY,MAAM,SAAS,EAAE,CAAC;QAE/C,IAAI,WAAW,EAAE,CAAC;YACd,UAAU,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;IACL,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-gen-ai",
|
|
3
|
-
"version": "10.13.0-alpha.
|
|
3
|
+
"version": "10.13.0-alpha.17",
|
|
4
4
|
"description": "GoodData GenAI SDK",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"react-textarea-autosize": "8.4.0",
|
|
45
45
|
"uuid": "^8.3.2",
|
|
46
46
|
"react-loading-skeleton": "^3.4.0",
|
|
47
|
-
"@gooddata/
|
|
48
|
-
"@gooddata/sdk-backend-spi": "10.13.0-alpha.
|
|
49
|
-
"@gooddata/
|
|
50
|
-
"@gooddata/sdk-ui": "10.13.0-alpha.
|
|
51
|
-
"@gooddata/sdk-ui-charts": "10.13.0-alpha.
|
|
52
|
-
"@gooddata/
|
|
53
|
-
"@gooddata/
|
|
54
|
-
"@gooddata/sdk-ui-kit": "10.13.0-alpha.
|
|
47
|
+
"@gooddata/api-client-tiger": "10.13.0-alpha.17",
|
|
48
|
+
"@gooddata/sdk-backend-spi": "10.13.0-alpha.17",
|
|
49
|
+
"@gooddata/sdk-model": "10.13.0-alpha.17",
|
|
50
|
+
"@gooddata/sdk-ui": "10.13.0-alpha.17",
|
|
51
|
+
"@gooddata/sdk-ui-charts": "10.13.0-alpha.17",
|
|
52
|
+
"@gooddata/util": "10.13.0-alpha.17",
|
|
53
|
+
"@gooddata/sdk-ui-pivot": "10.13.0-alpha.17",
|
|
54
|
+
"@gooddata/sdk-ui-kit": "10.13.0-alpha.17"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"react": "^16.10.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
"vitest-dom": "0.1.1",
|
|
101
101
|
"@types/react-native-listener": "~1.1.3",
|
|
102
102
|
"@types/uuid": "^8.3.4",
|
|
103
|
-
"@gooddata/i18n-toolkit": "10.13.0-alpha.
|
|
104
|
-
"@gooddata/sdk-backend-mockingbird": "10.13.0-alpha.
|
|
105
|
-
"@gooddata/reference-workspace": "10.13.0-alpha.
|
|
103
|
+
"@gooddata/i18n-toolkit": "10.13.0-alpha.17",
|
|
104
|
+
"@gooddata/sdk-backend-mockingbird": "10.13.0-alpha.17",
|
|
105
|
+
"@gooddata/reference-workspace": "10.13.0-alpha.17"
|
|
106
106
|
},
|
|
107
107
|
"scripts": {
|
|
108
108
|
"clean": "rm -rf ci dist esm coverage *.log styles/css tsconfig.tsbuildinfo",
|