fix: 清空上下文时不应该重置会话标题

This commit is contained in:
ChenZhaoYu 2023-03-13 08:49:21 +08:00
parent db502e1412
commit efc9e81e83
1 changed files with 0 additions and 2 deletions

View File

@ -165,7 +165,6 @@ export const useChatStore = defineStore('chat-store', {
if (!uuid || uuid === 0) { if (!uuid || uuid === 0) {
if (this.chat.length) { if (this.chat.length) {
this.chat[0].data = [] this.chat[0].data = []
this.history[0].title = 'New Chat'
this.recordState() this.recordState()
} }
return return
@ -174,7 +173,6 @@ export const useChatStore = defineStore('chat-store', {
const index = this.chat.findIndex(item => item.uuid === uuid) const index = this.chat.findIndex(item => item.uuid === uuid)
if (index !== -1) { if (index !== -1) {
this.chat[index].data = [] this.chat[index].data = []
this.history[index].title = 'New Chat'
this.recordState() this.recordState()
} }
}, },