|
|
@ -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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|