dsh tui: every slash command via commands.execute fails - signal passed in the images slot (TypeError reading 'aborted') #4839
Replies: 2 comments
|
这个定位是对的。我用官方 alpha.1 建议两处都统一改成: await commands.execute(agent, line, [], controller.signal)其中 context-low 修复后的验证不应只看异常消失,至少要覆盖:
我把版本/加载路径取证、两调用点修复、失败分流和 8 项 adapter 回归契约整理成了完整 runbook: 英文 canonical 文档: |
|
Fixed and regression-tested in Jstn-1g/dsh-tui-plugin PR #1. Both |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
In the TUI, every slash command routed through the command registry fails immediately with:
The TUI calls
commands.execute(...)with the wrong argument order — theAbortSignalis passed in theimagesslot, leavingsignalundefined.Environment
dsh0.1.1-rc.2,dsh-tui-plugin0.3.0, Windows (Git Bash)Root cause
@deepseek-ai/dsh-commandsexecutesignature is(agent, line, images, signal):dsh-tui-plugin@0.3.0calls it with 3 arguments (noimagesplaceholder), so the signal lands in the images slot:→
images = controller.signal,signal = undefined→signal.abortedat line 305 throws the reported TypeError. Because this happens insideexecute()before the command handler runs, all registered slash commands (not just/compact) fail this way. Local TUI commands like/sessionsstill work because they are handled in-app and never reachcommands.execute.Repro
dsh --profile tui/compactCommand failed: TypeError: Cannot read properties of undefined (reading 'aborted')Expected
The command runs;
/compactshould perform a manual compaction (it is actively suggested by the TUI's context-low banner).Suggested fix
Pass
undefined(or[]) in the images slot at both call sites:All reactions