mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-30 06:54:25 +08:00
修复聊天页面报错重连的 bug
This commit is contained in:
@@ -794,7 +794,13 @@ const sendSSERequest = async (message) => {
|
|||||||
onerror(err) {
|
onerror(err) {
|
||||||
console.error('SSE Error:', err)
|
console.error('SSE Error:', err)
|
||||||
enableInput()
|
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() {
|
onclose() {
|
||||||
console.log('SSE connection closed')
|
console.log('SSE connection closed')
|
||||||
|
|||||||
Reference in New Issue
Block a user