@zeniai/client-epic-state 4.16.91 → 4.16.92
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.
|
@@ -224,14 +224,16 @@ const aiController = (0, toolkit_1.createSlice)({
|
|
|
224
224
|
},
|
|
225
225
|
setSessions(draft, action) {
|
|
226
226
|
action.payload.forEach((chatSessionPayload) => {
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
// This is to prevent overwriting the session if it is already in state
|
|
228
|
+
if (draft.aiControllerByChatSessionId[chatSessionPayload.chat_session_id] == null) {
|
|
229
|
+
draft.aiControllerByChatSessionId[chatSessionPayload.chat_session_id] = {
|
|
229
230
|
chatSession: toChatSession(chatSessionPayload),
|
|
230
231
|
questionAnswers: [],
|
|
231
232
|
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
// Clear any existing partial Q&A for this session
|
|
234
|
+
draft.partialQuestionAnswers[chatSessionPayload.chat_session_id] =
|
|
235
|
+
undefined;
|
|
236
|
+
}
|
|
235
237
|
});
|
|
236
238
|
},
|
|
237
239
|
setChatHistory(draft, action) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.92",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|