feat: implement multi-channel Feishu Bot settings UI and WebSocket hot reload#303
Open
skloxo wants to merge 11 commits into
Open
feat: implement multi-channel Feishu Bot settings UI and WebSocket hot reload#303skloxo wants to merge 11 commits into
skloxo wants to merge 11 commits into
Conversation
…ort connection retry
…-multi-channel # Conflicts: # agent/api_server.py # frontend/src/i18n/locales/en.json # frontend/src/i18n/locales/zh-CN.json
…hu-multi-channel # Conflicts: # agent/src/platforms/feishu.py # agent/src/platforms/manager.py
Collaborator
|
Thanks for the PR — we’ve seen it and will review as soon as we can. Since this touches settings UI and hot reload behavior, we’ll check the backend/frontend contract, i18n coverage, and whether the first PR keeps the messaging/settings scope clean. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary (概述)
This PR introduces multi-channel Feishu (Lark) Bot settings UI and implements WebSocket connection isolation with hot-reloading. It also resolves critical event loop conflicts in the Lark SDK when running multiple connections concurrently or reloading.
此 PR 实现了多通道飞书(Lark)机器人的可视化配置与热重载,并通过对 Lark SDK WebSocket 模块的动态属性代理,解决了多连接或热重载时因共享主线程 Uvicorn 事件循环引发的
RuntimeError和死锁冲突。Key Changes (主要修改)
Multi-channel Configurations & Visualized UI
feishu_channels.json) and CRUD API endpoints (/settings/platforms/feishu/channels).Event Loop Isolation via Thread-local
LoopProxy(Critical Fix)lark_oapi.ws.client.loopusing a thread-local proxy class. When Lark SDK accesses the loop, it dynamically routes to the dedicated event loop running in its isolated background Thread.RuntimeError: Event loop is already running) when launching or restarting multiple WS connections.loop变量注入LoopProxy动态代理,将每个飞书机器人的长连接隔离在专属的后台线程与事件循环中,彻底解决了多通道热重载与并发时引发的 RuntimeError。User-friendly OpenID Reflection Command & UX
/myidto the Bot even when they are not whitelisted yet./myid反射获取自己的 OpenID,解决初始化配置的死锁;优化了白名单输入框的自动折叠与安全提示横幅。Verification (验证情况)
agent/tests/test_platform_base.py) run successfully and coverage passes./myid,/goal, etc.) stably with instant UI toggling and live reload.