[Bug] Windows 无控制台宿主(pm2 后台托管)下执行 shell 工具命令会弹出 PowerShell 窗口 #1102
starkirby125918
started this conversation in
General
Replies: 2 comments
|
是的。当电脑安装了一些安全软件这个窗口还会被kill掉导致pwsh命令直接崩溃,我上午有提过这个问题,感觉可能的解决方案还有出一个官方的守护进程支持,算是webview的锅吧 |
0 replies
|
补充一个官方路径也能触发(无需 pm2/第三方托管): 环境:DSH 0.1.0-rc.6,Windows,宿主由桌面客户端无控制台拉起 现象:重启前正常,重启后每次 pwsh/bash 工具调用都会弹一个 PowerShell 窗口;后台任务(run_in_background job)的窗口会一直挂到任务结束。排查确认:
修复建议同本贴与 #1344:
社区已按上述方案做了幂等补丁并在本机验证(#1564 / Culeot/dsh-no-console-flash)。希望官方能把这两处收进正式包。 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
环境
dsh web通过 pm2 后台托管运行(进程无控制台)现象
运行 agent 任务时,每次执行 shell 工具(pwsh / bash)命令,屏幕都会闪现一个控制台窗口后立即关闭。之前在前台终端直接运行
dsh web时无此现象。原因定位
@deepseek-ai/dsh-subprocess-local的spawnSubprocess()中调用:Windows 下未设置
windowsHide(Node 默认 false)。当父进程(dsh-web)没有控制台时(pm2 / 服务等后台托管场景),Windows 会为每个子进程新建一个可见的控制台窗口;此前前台终端运行时子进程继承终端控制台,所以不弹窗。同仓库其他组件(
dsh-native-command、dsh-host-directory-picker-native)均已正确设置windowsHide: true,唯独主 subprocess 路径漏掉了。建议修复
在 spawn options 中增加一行(与现有
detached写法同风格):影响面:所有走
ctx.subprocess的工具(dsh-tool-pwsh / dsh-tool-bash 等)在 Windows 无控制台宿主下均会弹窗。node-pty 终端路径(ConPTY)不受影响。All reactions