diff --git a/app/store/chat.ts b/app/store/chat.ts index ff7eb51b..66a39d2b 100644 --- a/app/store/chat.ts +++ b/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);