[Bug] SSE 流结束后 loading 状态闪烁 #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题描述
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 闪烁,不影响功能