dsh-esc-stop
DeepSeek Harness Web GUI 插件:按 Esc 停止当前会话生成,效果等同 GUI 停止按钮的 session.cancel。
AI 分析
适合需快速中断长时间生成的用户,通过键盘 Esc 即时终止当前回合。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:142475/dsh-esc-stop說明文件
閱讀完整 README ↗dsh-esc-stop
A DeepSeek Harness web GUI plugin: press Esc to stop the current conversation generation — the exact same effect as clicking the GUI stop button.
No extra UI, no config, no host code. The browser half captures the Escape key and cancels the active turn through the same RPC the GUI stop button uses (session.cancel, via the shared connection service).
Features
- Press
Escanywhere in a session → the running turn stops immediately. - Equivalent to the built-in stop button: pending inbox work is preserved and resumes later.
- Key-repeat safe (
e.repeatignored), no visible UI added. - Works per active session: the listener binds to the session that is open.
Install
Add the package to your web profile and register the bundle:
# from your dsh profile directory (e.g. ~/.dsh/profiles/web)
dsh plugin --profile web add git+https://github.com/142475/dsh-esc-stop.git
Then add "dsh-esc-stop" to the dsh.profile.bundles array in that profile's package.json:
{
"dsh": {
"profile": {
"bundles": [
"dsh-esc-stop"
]
}
}
}
Restart dsh web. Done — no further configuration.
How it works
| Layer | Job |
|---|---|
lib/client.js | Web client half: registers a hidden entry in the session header action slot, installs a window keydown listener, and calls connection.api.sessions.cancel({ sessionId }) on Escape. |
lib/index.js | Node half: minimal cordis row so the bundle patch mounts; all behaviour lives in the client half. |
The session.cancel RPC is the same one the GUI stop button invokes, so behaviour (including inbox preservation and subagent agent-busy semantics) is identical.
Notes
- Web profile only (
dsh web); the tui/headless profiles have their own stop key. - The listener is active while a session is open; there is nothing to stop on the no-session hero screen.
- Key-repeat (
Escheld down) fires once per press, not continuously.
License
MIT