142475/dsh-esc-stop0

dsh-esc-stop

DeepSeek Harness web GUI plugin: press Esc to stop the current conversation generation — same effect as the GUI stop button (session.cancel).

包名
dsh-esc-stop
版本
0.1.0
许可证
MIT
最近更新
2026年8月19日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:142475/dsh-esc-stop

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 Esc anywhere 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.repeat ignored), 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

LayerJob
lib/client.jsWeb 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.jsNode 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 (Esc held down) fires once per press, not continuously.

License

MIT