fix: 停止机器人后UI消失 & UDP send error日志刷屏

- botDisconnected事件改为更新状态而非删除,停止机器人后正确显示离线状态
- 节流UDP send error日志,2秒内重复错误只输出一条汇总

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
saopig1andClaude Opus 4.6 committed 2026-03-30 21:50:04 +08:00
1 parent d0d2f57066
commit 43004fc44a
3 files changed
+43 -3

No files matched your search

+5 -1
View File
@@ -65,7 +65,11 @@ export function setupWebSocket(
};
const onDisconnected = () => {
broadcast({ type: "botDisconnected", botId: bot.id });
broadcast({
type: "botDisconnected",
botId: bot.id,
status: bot.getStatus(),
});
};
bot.on("stateChange", onStateChange);