dshbase

插件目录 / Developer / dsh-ctrl-c

dsh-ctrl-c

已验证 · 实测可装 Maybemar

✓ 持续维护

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-16最近推送
跨平台平台

功能简介

Ctrl+C 打断停DSH运行; Ctrl+C interrupt plugin for DSH Web

✅
我们的评价
可用 — 实测通过,早期项目

Ctrl+C 打断停DSH运行; Ctrl+C interrupt plugin for DSH Web 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-ctrl-c

DSH Web 客户端插件:在对话生成过程中按 Ctrl+C 直接打断当前轮次 —— 效果与点击输入框上的「停止运行」按钮完全一致(底层都是调用当前会话的 cancel())。

Press Ctrl+C while the agent is generating to stop the current turn — identical to clicking the stop button (both call the scoped session's cancel()).

安装 / Install

# GitHub 直装 / install straight from GitHub
dsh plugin --profile web add github:Maybemar/dsh-ctrl-c

# npm 发布后 / once published to npm
dsh plugin --profile web add @maybemar/dsh-ctrl-c

安装后重启 dsh web 并刷新页面即可(插件集合变更需重启;之后改 bundle 内容只需刷新页面)。
Restart dsh web and refresh the page once; later bundle edits only need a page refresh.

行为规则 / Behavior

场景 Scenario 行为 Behavior
正在生成时按 Ctrl+C(无选中文本) 立即打断当前轮次,顶部弹出确认提示
有选中文本(页面文字或输入框选区)时按 Ctrl+C 正常复制,不打断
没有在生成时按 Ctrl+C 无操作(保持浏览器默认行为)
打断前有排队消息(生成中发的指令) 自动按 FIFO 续跑(先移除再重新入队唤醒驱动)
Ctrl+Shift+C / Ctrl+Alt+C / Ctrl+Cmd+C 不拦截(保留 DevTools 等快捷键)
中文输入法组合期间 不拦截

只打断当前打开的会话。DSH 宿主对打断前排队的消息不会自动唤醒驱动,本插件会在打断成功后把仍在排队的消息按 FIFO 重新入队并自动续跑;如不需要自动续跑,在浏览器控制台执行 localStorage["dsh.ctrlC.autoResume"] = "off" 即可关闭。
Only the currently open session is interrupted; queued messages resume in FIFO order, same as the official stop button.

目录结构 / Layout

  • cordis.patch.yml — 插入 ctrl-c 插件行的 bundle patch
  • lib/index.js — 宿主半边(no-op 宿主插件,让 loader 条目有活动 fiber 供 client-modules 扫描)
  • lib/client.js — 浏览器半边(window.__ModuleLoader__.load 包装的 Ctrl+C 处理器)
  • src/ — 可读源码(src/index.ts 宿主、src/client/index.ts 浏览器)
  • scripts/check.mjs — 包名 / patch 行名 / bundle id 一致性检查(npm run check,发布前自动跑)

开发 / Development

npm run check   # 校验改名等改动没有破坏三处一致(package.json / cordis.patch.yml / lib/client.js)

发布前(npm)会自动执行 prepublishOnly: npm run check。

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-ctrl-c」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:Maybemar/dsh-ctrl-c

Headless(CLI)profile:

dsh plugin --profile headless add github:Maybemar/dsh-ctrl-c

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7819 个插件 →