@gooddata/sdk-ui-gen-ai 11.40.0-alpha.5 → 11.40.0

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.
@@ -456,11 +456,12 @@ const messagesSlice = createSlice({
456
456
  state.loaded = !!data?.order.length;
457
457
  state.threadId = payload.conversation.id;
458
458
  existing.id = payload.conversation.id;
459
+ existing.localId = payload.conversation.localId;
459
460
  }
460
461
  else {
461
462
  state.conversations = [payload.conversation, ...(state.conversations ?? [])];
462
463
  state.currentConversation = payload.conversation;
463
- state.threadId = payload.conversation.localId;
464
+ state.threadId = payload.conversation.id;
464
465
  state.loaded = true;
465
466
  }
466
467
  },
@@ -3,7 +3,7 @@ import { call, cancelled, getContext, put, race, select, take } from "redux-saga
3
3
  import { isAssistantMessage, isSemanticSearchContents, makeConversationItem, } from "../../model.js";
4
4
  import { settingsSelector } from "../chatWindow/chatWindowSelectors.js";
5
5
  import { loadMessages } from "../localStorage.js";
6
- import { conversationSelector, conversationsLoadedSelector, conversationsSelector, } from "../messages/messagesSelectors.js";
6
+ import { conversationMessagesByIdSelector, conversationSelector, conversationsLoadedSelector, conversationsSelector, } from "../messages/messagesSelectors.js";
7
7
  import { cancelAsyncAction, loadConversationSuccessAction, loadConversationsSuccessAction, loadThreadErrorAction, loadThreadSuccessAction, restoreCachedMessagesAction, } from "../messages/messagesSlice.js";
8
8
  import { createEmptyConversation } from "../utils.js";
9
9
  import { interactionsToMessages } from "./converters/interactionsToMessages.js";
@@ -162,14 +162,19 @@ function* fetchCurrentConversation() {
162
162
  if (cancelledItems) {
163
163
  return;
164
164
  }
165
+ //Load previously created messages
166
+ const messages = yield select(conversationMessagesByIdSelector, selectedConversation.localId);
165
167
  yield put(loadConversationSuccessAction({
166
168
  currentConversation: selectedConversation,
167
- conversationItems: resultsItems.map((item) => {
168
- return makeConversationItem({
169
- ...item,
170
- content: convertToLocalContent(item.content),
171
- });
172
- }),
169
+ conversationItems: [
170
+ ...messages,
171
+ ...resultsItems.map((item) => {
172
+ return makeConversationItem({
173
+ ...item,
174
+ content: convertToLocalContent(item.content),
175
+ });
176
+ }),
177
+ ],
173
178
  threadId: selectedConversation.id,
174
179
  }));
175
180
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-gen-ai",
3
- "version": "11.40.0-alpha.5",
3
+ "version": "11.40.0",
4
4
  "description": "GoodData GenAI SDK",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -56,18 +56,18 @@
56
56
  "reselect": "5.1.1",
57
57
  "tslib": "2.8.1",
58
58
  "uuid": "11.1.0",
59
- "@gooddata/api-client-tiger": "11.40.0-alpha.5",
60
- "@gooddata/sdk-backend-spi": "11.40.0-alpha.5",
61
- "@gooddata/sdk-model": "11.40.0-alpha.5",
62
- "@gooddata/sdk-ui-charts": "11.40.0-alpha.5",
63
- "@gooddata/sdk-ui": "11.40.0-alpha.5",
64
- "@gooddata/sdk-ui-dashboard": "11.40.0-alpha.5",
65
- "@gooddata/sdk-ui-filters": "11.40.0-alpha.5",
66
- "@gooddata/sdk-ui-pivot": "11.40.0-alpha.5",
67
- "@gooddata/sdk-ui-kit": "11.40.0-alpha.5",
68
- "@gooddata/sdk-ui-theme-provider": "11.40.0-alpha.5",
69
- "@gooddata/sdk-ui-semantic-search": "11.40.0-alpha.5",
70
- "@gooddata/util": "11.40.0-alpha.5"
59
+ "@gooddata/api-client-tiger": "11.40.0",
60
+ "@gooddata/sdk-backend-spi": "11.40.0",
61
+ "@gooddata/sdk-model": "11.40.0",
62
+ "@gooddata/sdk-ui": "11.40.0",
63
+ "@gooddata/sdk-ui-charts": "11.40.0",
64
+ "@gooddata/sdk-ui-filters": "11.40.0",
65
+ "@gooddata/sdk-ui-kit": "11.40.0",
66
+ "@gooddata/sdk-ui-dashboard": "11.40.0",
67
+ "@gooddata/sdk-ui-pivot": "11.40.0",
68
+ "@gooddata/sdk-ui-semantic-search": "11.40.0",
69
+ "@gooddata/sdk-ui-theme-provider": "11.40.0",
70
+ "@gooddata/util": "11.40.0"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@microsoft/api-documenter": "^7.17.0",
@@ -83,7 +83,7 @@
83
83
  "@typescript-eslint/eslint-plugin": "8.58.0",
84
84
  "@typescript-eslint/parser": "8.58.0",
85
85
  "@typescript/native-preview": "7.0.0-dev.20260202.1",
86
- "@vitest/eslint-plugin": "1.6.6",
86
+ "@vitest/eslint-plugin": "1.6.19",
87
87
  "dependency-cruiser": "17.3.10",
88
88
  "eslint": "^9.39.2",
89
89
  "eslint-import-resolver-typescript": "4.4.4",
@@ -96,7 +96,7 @@
96
96
  "eslint-plugin-react": "7.37.5",
97
97
  "eslint-plugin-react-hooks": "5.2.0",
98
98
  "eslint-plugin-sonarjs": "3.0.6",
99
- "happy-dom": "18.0.1",
99
+ "happy-dom": "20.9.0",
100
100
  "npm-run-all": "^4.1.5",
101
101
  "oxfmt": "0.52.0",
102
102
  "oxlint": "1.51.0",
@@ -110,13 +110,13 @@
110
110
  "typescript": "5.9.3",
111
111
  "vitest": "4.1.8",
112
112
  "vitest-dom": "0.1.1",
113
- "@gooddata/eslint-config": "11.40.0-alpha.5",
114
- "@gooddata/i18n-toolkit": "11.40.0-alpha.5",
115
- "@gooddata/oxlint-config": "11.40.0-alpha.5",
116
- "@gooddata/reference-workspace": "11.40.0-alpha.5",
117
- "@gooddata/sdk-backend-mockingbird": "11.40.0-alpha.5",
118
- "@gooddata/stylelint-config": "11.40.0-alpha.5",
119
- "@gooddata/sdk-ui-theme-provider": "11.40.0-alpha.5"
113
+ "@gooddata/eslint-config": "11.40.0",
114
+ "@gooddata/i18n-toolkit": "11.40.0",
115
+ "@gooddata/oxlint-config": "11.40.0",
116
+ "@gooddata/reference-workspace": "11.40.0",
117
+ "@gooddata/sdk-backend-mockingbird": "11.40.0",
118
+ "@gooddata/sdk-ui-theme-provider": "11.40.0",
119
+ "@gooddata/stylelint-config": "11.40.0"
120
120
  },
121
121
  "peerDependencies": {
122
122
  "react": "^18.0.0 || ^19.0.0",
@@ -135,8 +135,8 @@
135
135
  "dep-cruiser": "depcruise --validate .dependency-cruiser.js --output-type err-long src/",
136
136
  "format-check": "oxfmt --check .",
137
137
  "format-write": "oxfmt .",
138
- "lint": "oxlint . --type-aware --quiet && eslint .",
139
- "lint-fix": "oxlint . --type-aware --quiet --fix && eslint . --fix",
138
+ "lint": "oxlint . --quiet && eslint .",
139
+ "lint-fix": "oxlint . --quiet --fix && eslint . --fix",
140
140
  "scss": "sass --load-path=node_modules styles/scss:styles/css",
141
141
  "stylelint": "stylelint '**/*.scss'",
142
142
  "stylelint-fix": "stylelint '**/*.scss' --fix",