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

This commit is contained in:
ChenZhaoYu 2023-02-13 19:25:59 +08:00
parent 633e9ad8e2
commit 071283c007
1 changed files with 3 additions and 2 deletions

View File

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