WONGIII/dsh-turn-status-text ↗★ 0

@dsh-external/dsh-turn-status-text

Custom text and colour for the DSH chat running-status line — the 「深度求索中,用时 12秒 ···」 row — configured from the Plugins page. 适合想要个性化定制DSH界面运行状态提示文案和视觉风格的用户。

パッケージ
@dsh-external/dsh-turn-status-text
互換性
未検証
バージョン
0.1.2
ライセンス
MIT
最終更新
2026/09/29

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:WONGIII/dsh-turn-status-text

ドキュメント

README 全文を読む ↗

配置页

设置项就是这一行的 Config:cordis.patch.yml 里 - id: dsh-turn-status-text 这个 row id 就是设置条目的 key, Host 把 row 的 Config schema 投影成设置分区(settings/describe 里的一个 namespace),所以不需要任何 settings.register 之类的注册调用, 三方(Host 投影、插件页表单、浏览器半侧读取)天然对齐同一个 id。

两个字段都带 volatile():volatile 是"值可以在不重新挂载这个 row 的前提下被改,并且读到的始终是最新值", 插件页因此把它放进可编辑表单;空串默认值表示"继承"(部署原文案 / 主题原色)。

但设置分区被提供 ≠ 插件页会给出入口:插件页只给注册过 plugins.row.config 的行渲染那个带 › 的「配置」标题, key 必须是 #。所以浏览器半侧要做的第二件事就是这个注册:

const inject = ['slots', 'locale']                       // 必需服务:只有这两个
ctx.inject(['configForms', 'slots'], (scoped) => {       // 设置表单可选:没有它标签覆盖照常工作
  scope = scoped.configForms.get('dsh-turn-status-text')  // ConfigFormController:getSnapshot/ subscribe/ set/ mutate
  const card = new TurnStatusTextCardController(scope)    // 包住平台的 SettingsFormModel
  scoped.configForms.whileServed([NS], () => scoped.slots.inject('plugins.row.config', () => scoped.slots.register({
    name: 'plugins.row.config',
    key: '@dsh-external/dsh-turn-status-text#dsh-turn-status-text',
    locale: CARD_NS,
    inject: () => card.inject(),                          // { hooks, edit, resetField, discard, save }
  }, TurnStatusTextCard)))
})

whileServed 是平台提供的"只在 Host 真的提供这个设置条目时才挂这一页"的守卫:没组合这一行的部署里,插件页看不到任何痕迹。 行配置页会以 view: 'page' 调用组件(行列表里的摘要行是 view: 'summary'),平台同时还会传一个 form({state, mutate})进来; 本插件用自己包好的 SettingsFormModel(同一份 configForms scope),因此暂存/保存/放弃/恢复默认的语义与部署自带设置页完全一致。

在插件页里配置的整条闭环(实测)

重启 DSH 后,设置条目被正常提供(node tools/verify-live.mjs →

OK: dsh-turn-status-text is served -> {"text":"","color":""}

),然后用 headless Chromium 走了一遍真实 UI:

  1. 侧栏 插件 → 插件列表里点开 @dsh-external/dsh-turn-status-text;
  2. 该行标题变成带 › 的按钮,aria-label="配置 @dsh-external/dsh-turn-status-text"(没有 plugins.row.config 注册时它只是纯文本);
  3. 点开 → 这一页渲染出 自定义文字 / 文字颜色 两个字段;
  4. 填入 宝宝正在努力思考… {duration} 与 #ff5500,点 保存;
  5. 回到会话读状态行:
{"found":true,"rowClass":"xz4KEq_running","text":"宝宝正在努力思考…宝宝正在努力思考… 6分43秒",
 "rowColor":"rgb(255, 85, 0)","deepDivingVar":"#ff5500","shimmerVar":"#ff5500"}

前半段是 aria-live 播报、后半段是可见那行;配置页见 docs/plugins-config.png。 也就是说:从插件页保存 → 聊天区那行立刻按你的文字和颜色渲染,全程不需要刷新。