mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-12 22:24:28 +08:00
修复聊天页面报错重连的 bug
This commit is contained in:
@@ -794,7 +794,13 @@ const sendSSERequest = async (message) => {
|
||||
onerror(err) {
|
||||
console.error('SSE Error:', err)
|
||||
enableInput()
|
||||
ElMessage.error('连接已断开,发生错误:' + err.message)
|
||||
// ElMessage.error('连接已断开,发生错误:' + err.message)
|
||||
const reply = chatData.value[chatData.value.length - 1]
|
||||
if (reply) {
|
||||
reply[
|
||||
'content'
|
||||
].text = `<div class="bg-red-50 text-red-500 p-3 rounded-md">${err.message}</div>`
|
||||
}
|
||||
},
|
||||
onclose() {
|
||||
console.log('SSE connection closed')
|
||||
|
||||
Reference in New Issue
Block a user