chore:可以正常清空聊天记录
This commit is contained in:
@@ -1464,6 +1464,22 @@ export default {
|
||||
this.$emit('location-selected', locationMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 清空聊天记录
|
||||
clearMessages() {
|
||||
// 清空消息数组
|
||||
this.messages = []
|
||||
// 重置消息 ID
|
||||
this.messageId = 0
|
||||
// 清除会话 ID
|
||||
this.currentConversationId = null
|
||||
aiService.clearConversationId()
|
||||
this.clearConversationIdFromLocal()
|
||||
// 重置历史偏移量
|
||||
this.historyOffset = 0
|
||||
// 触发清空事件
|
||||
this.$emit('messages-cleared')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user