Replies: 2 comments
|
Great analysis — confirmed and fixed in the guntur-d/deepseek-harness fork (PR #8). |
0 replies
|
分析很到位,已确认并在 guntur-d/deepseek-harness fork 修复(PR #8)。 |
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.
Uh oh!
There was an error while loading. Please reload this page.
环境
复现步骤
dsh web,浏览器打开 Web UICtrl+C停止 dsh但随后 PowerShell 控制台失去输入能力:提示符不再出现、打字无回显、
任何命令都无法执行,只能关闭窗口重开
预期行为
Ctrl+C 后 dsh 正常退出,PowerShell 恢复提示符,可继续输入命令
实际行为
控制台输入失效(提示符不出现、打字无回显),需重开窗口
根因分析(已定位到代码,供参考)
从安装包
lib/profile-boot-DG5t9aNs.js(源码 region:lib/types/profile-boot.js/lib/types/process-shutdown.js)看:process.on("SIGINT", () => interrupt(130));CTRL_C_EVENT返回"已处理",事件被 dsh 吞掉——PowerShell 收不到这次 Ctrl+C;createProcessShutdown的interrupt走优雅关闭,PROCESS_SHUTDOWN_TIMEOUT_MS = 5e3最多等 5 秒才process.exit(130);期间再次 Ctrl+C 会走
forceExitOnce强杀分支;PSReadLine 的输入状态机错乱(提示符不重绘、按键不处理、无回显);
更容易触发第二次 Ctrl+C 强杀——与"多次开关后更容易复现"的现象吻合。
建议修复方向
与 vite/npm 等 Windows 友好的 CLI 行为对齐;
process.on('exit')。临时规避(供其他用户参考)
Start-Process dsh -ArgumentList 'web'在独立窗口运行,主 shell 不受影响;Install-Module PSReadLine -Force)或换 PowerShell 7 可规避。All reactions