[Bug] SSE 流结束后 loading 状态闪烁 #3

Closed
opened 2026-05-04 22:45:10 +08:00 by admin · 0 comments
Owner

问题描述

AgentChat.vue 中,SSE 流收到 final 事件后,streamingActive 被设为 false (第 496 行),但 loading 要到外层的 finally 块 (第 537 行) 才设为 false。

在 final 事件处理完毕到 finally 块执行之前的短暂间隙中,条件 loading && !streamingActive 重新为 true,导致底部 thinking dots 动画短暂重新出现后消失。

涉及文件

frontend/src/views/AgentChat.vue:496-537

修复建议

在 final 或 error 事件处理中将 loading.value = false 提前设置,或改为用单一状态机管理流式状态。

严重程度

低 - UI 闪烁,不影响功能

## 问题描述 AgentChat.vue 中,SSE 流收到 final 事件后,streamingActive 被设为 false (第 496 行),但 loading 要到外层的 finally 块 (第 537 行) 才设为 false。 在 final 事件处理完毕到 finally 块执行之前的短暂间隙中,条件 loading && !streamingActive 重新为 true,导致底部 thinking dots 动画短暂重新出现后消失。 ## 涉及文件 frontend/src/views/AgentChat.vue:496-537 ## 修复建议 在 final 或 error 事件处理中将 loading.value = false 提前设置,或改为用单一状态机管理流式状态。 ## 严重程度 低 - UI 闪烁,不影响功能
admin self-assigned this 2026-05-04 22:45:10 +08:00
admin closed this issue 2026-05-04 23:56:49 +08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/aiagent#3