Open
Conversation
Owner
|
Thanks for the fix. I think this is a bit over-engineered for the problem we are solving. The original issue is that on some Windows machines, ports in the 5xxxx range may fall into Hyper-V / system excluded port ranges, so binding to 51983 can fail. We have already taken that into account and switched the default port from 51983 to 41983, which is currently free and outside the usual dynamic/excluded range on affected setups. Given that, I would prefer a much simpler fix:
So I do not think the extra file + dynamic port management code is worth the added complexity here. |
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.
变更说明
修复桌面宠物在部分 Windows 环境下无法启动的问题。
问题原因
桌面宠物原先固定使用本地端口
51983作为 HTTP 控制端口。在部分 Windows 系统中,该端口可能落入系统排除端口范围,导致启动时报错:
PermissionError: [WinError 10013]这会使桌面宠物进程直接退出,因此用户点击“🐱 桌面宠物”后看不到任何显示效果。
修复内容
stapp.py,发送桌面宠物消息时不再写死51983,而是读取当前端口frontends/desktop_pet.pywfrontends/desktop_pet_v2.pyw影响范围
本次修改仅影响桌面宠物功能,不影响主 Agent、LLM 调用链路或其他前端入口。
验证结果
已完成以下验证:
相关文件
frontends/desktop_pet.pywfrontends/desktop_pet_v2.pywfrontends/stapp.py