forked from XiaoMo/ChatGPT-Next-Web
Fix UI/UX Page Chats [Memory Prompt] [Stored Local Storage]
- [+] fix(chat.ts): update the memory prompt in onFinish callback - [+] feat(chat.ts): update the current session with lastSummarizeIndex and memoryPrompt
This commit is contained in:
parent
b21931c667
commit
ef9e86b50d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user