2927683690myn-rgb/dsh-sidebar-tune ↗★ 0

dsh-sidebar-tune

DSH client plugin: slightly larger sidebar buttons and breathing room (icon buttons 28→36px, session rows 32→40px, controls gap 8→12px). Client-only CSS, no tools, no settings.

Package
dsh-sidebar-tune
Compatibility
Unverified
Version
0.2.0
License
MIT
Last updated
Oct 26, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

dsh-sidebar-tune

DeepSeek Harness(DSH)客户端插件:把左侧边栏的按钮放大一点、行距和间距松一点。

只做一件事——往页面里注入一张样式表。不注册工具、不联网、不读文件、不改任何设置。

位置原本插件
图标按钮28px36px
按钮里的图标16px20px
会话行高32px40px
行间空隙—+3px
按钮组间距8px12px
按钮左右内边距8px12px

为什么需要它

DSH 的界面密度是为桌面调的:图标按钮 28px、会话行 32px、按钮组间距 8px。在触屏上(尤其手机宽度 ≤767px 时侧栏会变成抽屉)这个尺寸偏紧,点起来容易误触。

DSH 自带的 ui-theme 只有字号档位(正文/代码/终端),没有「控件尺寸」这一项,所以用一张 CSS 补上。

安装

# 1. 放进 profile 的插件目录
git clone https://github.com/2927683690myn-rgb/dsh-sidebar-tune.git \
  ~/.dsh/profiles/web/plugins/dsh-sidebar-tune

# 2. 让 loader 能按包名找到它
ln -sfn ../plugins/dsh-sidebar-tune ~/.dsh/profiles/web/node_modules/dsh-sidebar-tune

# 3. 在 ~/.dsh/profiles/web/cordis.patch.yml 里注册
#    - insert:
#        - id: sidebar-tune
#          name: dsh-sidebar-tune

# 4. (可选)package.json 加一条依赖,pnpm 才不会把它当野包
#    "dsh-sidebar-tune": "file:./plugins/dsh-sidebar-tune"

重启 DSH 后生效:客户端插件的清单(window.__DSH_BOOT__ 里的模块图)在启动时一次性生成,改完 patch 需要重启进程才会被扫描到。

先预览,再决定装不装

不装插件也能看效果:把 sidebar-tune.css 的内容贴进 better-sidebar 的「自定义 CSS」,保存即生效;不满意删掉就恢复。

自己调数值

样式表顶部有四个变量,改这一行就够,其余规则跟着缩放:

[class*="_sidebarCol"] {
  --st-icon: 36px;  /* 图标按钮边长,原 28 */
  --st-svg:  20px;  /* 图标本身,原 16 */
  --st-row:  40px;  /* 会话行高度,原 32 */
  --st-gap:  12px;  /* 按钮组间距,原 8 */
}

三个常用档位:

档位iconsvgrowgap
轻(v0.2)36204012
中(v0.3)42244816
重(v0.4)48285620

实现细节

DSH 的 CSS Modules 类名带构建哈希(如 .pI_x6G_sidebarCol、.YDXeBa_sessionRow),哈希每次构建都会变,但后缀稳定。所以选择器统一写成属性子串匹配:

[class*="_sidebarCol"] [class*="_iconButton"] { … }

这样 DSH 升级换了哈希,样式也不会失效。已对本机 0.1.x 构建核对过三个真实类名:_sidebarCol(布局列)、_iconButton、_sessionRow。

测试

不开浏览器也能测:

npm test        # node test/smoke.mjs

用假 DOM 跑一遍 lib/client.js,断言四件事:模块 id 等于包名、apply 注入 ``、重复 apply 幂等、卸载时把样式表摘掉。

卸载

删掉 cordis.patch.yml 里那条 insert、package.json 里的依赖、node_modules 软链和 plugins/dsh-sidebar-tune 目录,重启即恢复原样。

License

MIT