zchuxi/dsh-restart-task ↗★ 0

dsh-restart-task

DSH web plugin: a three-tier recovery policy for broken turns — silent in-turn retry, in-turn keep-alive for truncated output, and an opt-in continuation turn — with a round control in the composer, the shipped send button taking over as "continue", and a settings card. 适合需要解决对话截断、超时等问题,实现自动重试或一键继续的用户。

Package
dsh-restart-task
Compatibility
Unverified
Version
1.2.4
License
MIT
Last updated
Sep 26, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zchuxi/dsh-restart-task

值是怎么进出的(0.1.7 的配置模型)

设置命名空间已经不存在,所以接线是这样的:

  • 宿主半边的 Config 就是表单。 每个字段都标了 .volatile(),这是它能被实时编辑的前提;loader 随后给 apply 每个字段一个引用,config..get() 就是三层策略每次决策时读取的东西。一次写入在下一次中断时生效,无需重启,也不涉及任何插件事件。
  • 表单用 profile 条目 id 寻址,即 restart-task —— 本包 cordis.patch.yml 插入的那个 id。它不是包名,而浏览器半边无法 import 宿主半边的常量,所以两半和 patch 文件各写一遍;回归测试会断言三者一致。
  • 写入经 configForms.get('restart-task')(浏览器半边为该条目共享的表单):快照给出被服务的表单值加原始用户层,逐字段 set / unset,底下是带版本号的改动队列。被拒绝的写入返回 false,冲突则重新读取宿主而不是覆盖它。
  • 宿主不会再生成一个页面:插件在可选的 settings 子上下文里注册 settings.configure({ auto: false }, ctx.fiber)。这个子上下文是刻意可选的 —— 没有设置域的组装仍然能跑三层恢复和输入框控件,只是卡片和两个对话记录遍历不出现。