mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-10-14 23:21:47 +00:00
fix: reset history title on clear (#453)
This commit is contained in:
@@ -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()
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user