【优化】AI 对话,如果删除的是选中的对话,需要重新选中

This commit is contained in:
cherishsince 2024-05-21 17:28:02 +08:00
parent da75b1758f
commit 5aa8261b7b

View File

@ -169,6 +169,14 @@ const getChatConversationList = async () => {
// 3
if (!activeId?.value) {
await handleConversationClick(res[0].id)
} else {
// tip:
const filterConversationList = conversationList.value.filter(item => {
return item.id === activeId.value
})
if (filterConversationList.length <= 0) {
await handleConversationClick(res[0].id)
}
}
// 4
if (conversationList.value.length === 0) {