- Главная
- Плагины
- Сеансы и сообщения
- dsh-pause-button
dsh-pause-button
trammels51/dsh-pause-button
Pause or resume the running task from a 28 px button beside the DSH composer: safe pause lets the current step finish, holds the next agent/pre-step boundary, and resumes the same turn without a continuation message; force pause cancels immediately, and the default granularity is configurable in Settings.
Установка
dsh plugin --profile web add github:trammels51/dsh-pause-buttonREADME
dsh-pause-button
English | 中文
A minimal pause/resume control beside the DSH composer, plus /pause and /resume commands.

The button is 28 × 28 px, icon-only, borderless, and inherits the composer tool-row color. It stays at 68% opacity while running, uses one low-saturation blue only when paused, pulses while a safe pause is pending, and fades to 26% when there is no running task. It sits in conversation.input.right, immediately left of Send.
Behavior
Safe pause (default, safe / wait)
- The current step is not interrupted — a running tool or model request is allowed to finish.
- At the next
agent/pre-stepboundary, the turn is held before the next model request. - Resume releases that exact
pre-stepdecision, continuing the same turn in place. Completed steps are not repeated, and no extra user message is inserted. - If the task ends before reaching another boundary, the plugin reports that no pause point was reached instead of pretending to pause.
Force pause (force / stop)
- Calls
agent.cancel({ kind: 'user' }, { keepInbox: true })immediately, interrupting the current step while retaining completed history. - Resume sends one continuation prompt asking the model to continue from the breakpoint without redoing finished work.
- Force resume therefore leaves one visible user-role message; safe resume does not.
Install
Requires DSH 0.2.2-rc.1 through 0.2.x.
From GitHub:
dsh plugin --profile web add github:trammels51/dsh-pause-button
Or from the prebuilt release tarball:
dsh plugin --profile web add https://github.com/trammels51/dsh-pause-button/releases/latest/download/dsh-pause-button.tgz
Refresh the Web page if the button does not appear after installation.
Commands
| Command | Action |
|---|---|
/pause | Pause using the configured default granularity |
/pause force or /pause stop | Force-pause this time, overriding the default |
/pause safe or /pause wait | Safe-pause this time, overriding the default |
/pause status | Show phase, current mode, and default mode |
/pause resume | Same as /resume |
/resume | Resume the held task |
/pause force also escalates a pending safe pause instead of being a no-op.
Settings
Open Settings → General → Pause granularity:
- Safe (wait) — finish the current step, then pause and resume in place.
- Force (stop) — stop the current step now; resume from the breakpoint.
The choice is stored in $DSH_HOME/dsh-pause.json. The composer button and bare /pause follow it; /pause force overrides it once.
Implementation
- Host half —
lib/index.js- Registers
/dsh-pause/state,/pause,/resume, and/configroutes. - Holds
agent/pre-stepfor safe pause and converges state onagent/status/agent/disposed. - Registers
/pauseand/resumethroughctx.commands. - Keeps pause state per Session and settings in
$DSH_HOME/dsh-pause.json.
- Registers
- Browser half —
lib/client.js- A hand-written
window.__ModuleLoader__.loadbundle using the officialconversation.input.rightandsettings.general.itemslots. - Polls the current Session state every 900 ms and pauses polling while the page is hidden.
- Requires only the platform-provided
react; no extra npm dependency.
- A hand-written
Verification
npm test runs both suites:
test/host.test.mjs— safe hold/resume, force cancel, continuation prompt, settings writes, origin fence, idle refusal, and force escalation over a pending safe pause.test/client.test.mjs— bundle exports, both slot registrations, and the pause-state source shape.
A live Web GUI check also paused a subagent during a sleep 8 tool call: the safe pause landed after the tool finished, stayed held at the next boundary, then resumed the same turn and completed.
Limitations
- Only the addressed Agent is paused; its subagents are not paused automatically.
- During a safe pause the Agent status remains
runningbecause the same turn is held. Stop/cancel releases the hold and ends that turn. - Force resume inserts one visible continuation message because there is no held call to release.
- Requires the Web host services
webServerandagents; it is not a headless/ACP plugin.
License
MIT
Похожие плагины
billion-context
ranxianglei/billion-context
dsh-web-ui (dsh-chat-recovery)
zhu1090093659/dsh-web-ui
dsh-synapse
liangmianya/dsh-synapse
dsh-archive-manager
michengai/dsh-archive-manager