DSH Hub
dsh-footer-order cover

Choi-Peng/dsh-footer-order

dsh-footer-order

UIWeb UI1 GitHub stars· updated 2026-08-19

dsh-footer-order is a community DeepSeek Harness plugin. Read the repository README before installing.

Install

npx @deepseek-ai/dsh plugin --profile web add "github:Choi-Peng/dsh-footer-order"

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-footer-order DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-footer-order.svg)](https://dshhub.dev/plugins/dsh-footer-order)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from Choi-Peng/dsh-footer-order, cleaned of badges and images.

dsh-footer-order

一个 DeepSeek Harness 的 Web 端插件,解决侧边栏底部(sidebar.footer.action 槽位)多个插件内容挤成一行的布局问题,并让你自由配置这些内容的上下排列顺序。

<tr><th style="text-align: center">修改前</th><th style="text-align: center">修改后</th></tr>
  <td align="center"><img src="docs/imgs/before.png" alt="修改前" width="240"></td>
  <td align="center"><img src="docs/imgs/after.png" alt="修改后" width="240"></td>
  <td align="center"><sub>多个 footer 插件挤在同一行</sub></td>
  <td align="center"><sub>上下排列,清晰可读</sub></td>

[!NOTE] AI 生成声明:本插件由 AI 生成,可能存在错误、安全隐患或不符合预期之处,使用前请自行 review 代码并实测:发现任何问题欢迎提交 issue 或 PR 修正。

问题背景

安装多个插件后,插件会往 sidebar.footer.action 槽位里注册内容。该槽位的渲染锚点 div[data-slot="sidebar.footer.action"] 被 dsh 的 web-react 渲染器赋予了内联样式 display: contents,于是所有条目的根元素直接参与父容器(.footerActionsdisplay: flex,横向)的布局——多个插件的内容就会挤在同一行

本插件通过注入一条带 !important 的样式规则,把该锚点改为纵向 flex 堆叠(display: flex: flex-direction: column),内容自然就上下排列了。

特性

  • sidebar.footer.action 的内容改为上下排列(display: contentsflex column),修复多个 footer 插件挤在一行的问题。
  • 可配置条目上下顺序: 在插件行的 config.order(base 层)里按从上到下写出插件 id 列表,或直接在 设置 → 插件 → Sidebar Footer Order 卡片里用 ↑/↓ 调整。
  • 可配置 layout(column / row / contents)、gap(条目间距)、align(对齐方式)。
  • 兼容不渲染任何内容的条目(如 shell 内置的 cordis-panel,平时返回 null):排序自动跳过这类条目,不会因「条目数 ≠ DOM 节点数」而失效。
  • 配置热加载 —— 在卡片保存(settings 服务热发布)立即生效,无需重启 dsh web;编辑 bundle 的 cordis.patch.yml base 配置则经 patch 层 HMR 重启此 fiber 生效。
  • 不注册任何可见的 footer 条目,只做布局与排序,卸载后不留痕迹(样式与观察器随插件卸载清理)。

架构

文件作用
Hostlib/index.js提供 /footer-order/settings —— 作为 footer-order 设置命名空间的一个薄代理:GET 返回已解析配置 + revision + 是否覆盖标记;POST 通过官方 dsh 设置缝(ctx.settings)保存(update)或重置(replace {})。部署期的 patch config 成为该命名空间的 base 层;运行时编辑落入其上方的 user
Clientlib/client.js注入覆盖样式(锚点改为纵向 flex):监听 DOM 变化,按配置把锚点的子元素重新排序:在 设置 → 插件 注册可编辑的 Sidebar Footer Order 卡片

排序实现:每个注册条目在锚点下渲染为恰好一个子节点(渲染器按 order 升序输出),但部分条目可能渲染为空(如 cordis-panel、收起侧边栏时隐藏的读数)。客户端用三层策略把子节点与 ctx.slots.entriesOfSlot('sidebar.footer.action') 里的条目 id 配对:① 按条目 label 的文本匹配子节点(如「重启 DSH」按钮);② 沿用此前已确认的配对;③ 对剩余子节点做「配置命中优先、位移最小」的子序列枚举。之后按配置顺序重排 DOM。这样即使存在常驻的空渲染条目,排序也始终生效。

安装

通过 plugin-registry 安装

设置 → 插件 → 安装,source 填 @choi-p/dsh-footer-ordergithub:Choi-Peng/dsh-footer-order

手动安装

dsh plugin --profile web add "github:Choi-Peng/dsh-footer-order"

插件包自带 cordis.patch.ymlpackage.json 中的 dsh.bundle.patch),安装时由 dsh 自动挂载。重启 dsh web 后生效。

卸载方式

dsh plugin --profile web remove @choi-p/dsh-footer-order

bundle 挂载随插件移除自动消失;若曾在 profile 层手动写过该行,需先删掉它。

配置

插件设置遵循 dsh 官方双缝配置模型,均实时生效,无需重启 dsh web(要求宿主安装 @deepseek-ai/dsh-settings ≥ 0.1.0-rc.7,标准 dsh web 发行版内置):

来源生效方式
默认值schema 内置
base 层(部署方静态配置)插件 bundle 自带 cordis.patch.yml 行内 configdsh.bundle.patch,安装即自动挂载)dsh web 监听 patch 层(HMR),编辑后自动用新配置重启此 fiber
用户层(运行时设置)设置 → 插件 → Sidebar Footer Order 的保存/重置,经 ctx.settings 持久化到 $DSH_HOME/settings.yaml;重置 = 清空用户层回落 basesettings 服务热发布,立即生效;本插件不再改写 cordis.patch.yml

base 层 config(bundle 默认附带):

Related plugins