Browse Source

Merge pull request #3369 from H0llyW00dzZ/chatz

Yifei Zhang 1 year ago
parent
commit
ce1715c79e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/store/chat.ts

+ 4 - 1
app/store/chat.ts

@@ -557,7 +557,10 @@ export const useChatStore = createPersistStore(
             },
             onFinish(message) {
               console.log("[Memory] ", message);
-              session.lastSummarizeIndex = lastSummarizeIndex;
+              get().updateCurrentSession((session) => {
+                session.lastSummarizeIndex = lastSummarizeIndex;
+                session.memoryPrompt = message; // Update the memory prompt for stored it in local storage
+              });
             },
             onError(err) {
               console.error("[Summarize] ", err);