From 7e8e15a628705d321afea5314b9245334c22c7ba Mon Sep 17 00:00:00 2001 From: RyanzeX Date: Fri, 10 Mar 2023 05:24:36 +0000 Subject: [PATCH] fix: reset history title on clear (#453) --- src/store/modules/chat/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/store/modules/chat/index.ts b/src/store/modules/chat/index.ts index 540954d..3a44723 100644 --- a/src/store/modules/chat/index.ts +++ b/src/store/modules/chat/index.ts @@ -165,6 +165,7 @@ export const useChatStore = defineStore('chat-store', { if (!uuid || uuid === 0) { if (this.chat.length) { this.chat[0].data = [] + this.history[0].title = 'New Chat' this.recordState() } return @@ -173,6 +174,7 @@ export const useChatStore = defineStore('chat-store', { const index = this.chat.findIndex(item => item.uuid === uuid) if (index !== -1) { this.chat[index].data = [] + this.history[index].title = 'New Chat' this.recordState() } },