myagent-ai 1.23.64 → 1.23.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -199,9 +199,15 @@ class ChatBotManager:
199
199
  await bot.start()
200
200
  except asyncio.CancelledError:
201
201
  logger.info(f"聊天平台 {name} 已取消")
202
+ # Cancelled 意味着外部已调用 stop(),不要重复调用
202
203
  except Exception as e:
203
204
  logger.error(f"聊天平台 {name} 运行异常: {e}")
204
- # 运行异常时移除 bot 实例,下次热更新会重新创建全新的 bot
205
+ # 异常时必须清理残留的 polling 连接,否则新 bot 会冲突
206
+ try:
207
+ await bot.stop()
208
+ except Exception:
209
+ pass
210
+ # 移除 bot 实例,下次热更新会重新创建全新的 bot
205
211
  self._bots.pop(name, None)
206
212
  self._bot_tasks.pop(name, None)
207
213
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myagent-ai",
3
- "version": "1.23.64",
3
+ "version": "1.23.65",
4
4
  "description": "本地桌面端执行型AI助手 - Open Interpreter 风格 | Local Desktop Execution-Oriented AI Assistant",
5
5
  "main": "main.py",
6
6
  "bin": {