瀏覽代碼

Merge pull request #3369 from H0llyW00dzZ/chatz

Yifei Zhang 1 年之前
父節點
當前提交
ce1715c79e
共有 1 個文件被更改,包括 4 次插入1 次删除
  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);