fix: 清除上下文按钮失效的问题

main
ChenZhaoYu 2 years ago
parent 633e9ad8e2
commit 071283c007

@ -31,11 +31,12 @@ function initChat() {
async function handleClear() { async function handleClear() {
try { try {
const { message } = await clearConversations() await clearConversations()
ms.success(message ?? 'Success')
} }
catch (error) { catch (error) {
ms.error('Clear failed, please try again later.') ms.error('Clear failed, please try again later.')
}
finally {
list.value = [] list.value = []
setTimeout(initChat, 100) setTimeout(initChat, 100)
} }

Loading…
Cancel
Save