DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

yy1588133 /

yy1588133/dsh-continue-button

Verified

DeepSeek Harness 插件:会话中断后发送按钮变成「继续」按钮,一键续跑。

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@54be274b

dsh-continue-button

会话中断后,输入框的发送按钮自动变成「继续」按钮,一键接着跑;输入框里只要有内容,就始终显示发送。

复刻自 dsh-tauri/deepseek-harness-desktop 的 packages/builtin-plugin-ui/src/client/register/composer-resume.ts, 判断规则、图标路径、文案都对着原实现抄,没有自己发挥。

安装

从 GitHub 直接装,不需要发 npm:

dsh plugin --profile <你的 profile> add yy1588133/dsh-continue-button

也可以写完整地址:github:yy1588133/dsh-continue-button。

装完重启 DSH 桌面端。插件行会自动进 dsh.profile.bundles,不用手工改配置。

更新:

dsh plugin --profile <你的 profile> remove dsh-continue-button
dsh plugin --profile <你的 profile> add yy1588133/dsh-continue-button

(先删再装是 dsh 的现有行为:同版本号重复安装会报 already-installed,换版本号则可以直接 add。)

这个包是纯 JavaScript,没有构建步骤。pnpm 10.26 起默认阻止 git 依赖执行 prepare 脚本,纯 JS 包正好不受影响——装下来就能跑。

行为

输入框 上一轮怎么结束的 主按钮
空 aborted / error / interrupted ▶「继续任务」,可点,点一下接着跑
空 completed / blocked / max-tokens ↑ 发送(灰的,正常情况)
空 正在跑 ■ 停止
有内容 随便 ↑ 发送

「有内容就显示发送」不是特判出来的:空输入框才有占位符,插件就是靠占位符判断空的, 一开始打字占位符就没了,图标自然换回发送。

为什么要写两条半边

  • lib/client.js —— 浏览器半边。输入框是 React 画的,插件不去重画它,只改那颗按钮的 d / aria-label / title / disabled / svg 尺寸,改之前先把 React 原来写的值记下来, 条件一不成立就原样放回去。点击是 capture 阶段截下来的,所以不会先被 React 当成 「提交空内容」处理掉。

  • lib/index.js —— 宿主半边。浏览器没法自己往会话的 Inbox 里塞消息,这条只能宿主做:

    • GET /api/continue-button/state?sessionId=… —— 这个会话现在能不能继续
    • POST /api/continue-button/resume —— 真的继续(followup 一条 continue 消息)

    两条都挂在 Connection 的 /api 鉴权后面,页面伪造不了。

续接时投递的那句话和原版一字不差:

Continue the interrupted task from where it stopped. Do not repeat work that is already complete.

source.kind: 'continue',所以在聊天记录里它是上下文行,不是你说的话。

本地开发时怎么装

想让改动立刻生效,用 file: 指向源码目录:

dsh plugin --profile <你的 profile> add file:<这个目录的绝对路径>

测试

node --test

宿主侧 13 条(各种 turn 结束类型、运行中、404/409/400、没有事件日志时的保守回答), 客户端 11 条(空/有内容、中断/正常结束/运行中/子代理、点击拦截、别的按钮不拦、英文界面)。

许可

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit 54be274b0905

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout