Scales the DSH sidebar text, row heights and icons together from 11 to 16 pixels, with a - / + size step in the sidebar More menu, on its own panel page and on the plugin page. The conversation keeps its own font size.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:gaolvsuan/dsh-sidebar-font
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
把 DeepSeek Harness 左侧栏整体按比例缩小:文字、行高、图标和间距一起变,侧栏宽度不变。字号在侧栏的「更多」菜单里直接调。
为什么需要它
侧边栏的尺寸是各组件写死的常量,没有设置项覆盖:
| 位置 | 默认值 |
|---|---|
| 侧边栏根字号 | 14px |
| 会话行标题 | 14px |
| 会话行副信息 / 时间 | 12px / 10px |
| 导航行高 / 图标盒 | 36px / 18px |
「设置 → 通用 → 字号大小」只写入 --dsh-content-font-size(会话正文),桌面端的 Ctrl+= / Ctrl+- 调的也是同一组。侧边栏只能由插件接管。
做了什么
- 在运行时找到侧栏根节点(从
data-sidebar-scrollport向上找<hash>_root,找不到时按「滚动区 → 滚动容器 → 根」的固定层级兜底),打上data-dsh-sidebar-font-root。 - 对这个节点应用一个
zoom系数,系数 = 目标字号 ÷ 14。zoom会等比缩小文字、行高、图标盒、内边距。 - 同时把根节点的
width/height除以同一系数,所以侧栏外框尺寸不变,只是内容整体缩小。 MutationObserver在侧栏重新挂载、折叠再展开后重新打标记。
调整字号
三个入口,改哪个都一样,值存在浏览器的 localStorage(键 dsh-sidebar-font:size),点了即时生效:
- 侧栏「更多」里的 侧边栏字号 面板行:点开是一页设置卡片,带
− 13px +(DSH 原生侧栏把面板行放在面板列表里;替换了原生侧栏的实现,例如 codex-ui,会把它列进自己的「更多」菜单) - 侧栏「更多」菜单里的一行:
侧边栏字号 − 13px +(只在原生侧栏的 More 菜单里出现) - 插件页里这个包自己的页面上(介绍文档下方、包含的组件上方):同名卡片,带一行说明
范围 11–16px,默认 13px。
安装
插件页 → 添加插件 → 输入包名 dsh-sidebar-font → 立即启用。本地目录安装则在插件页选择该目录。
限制
- 只改左侧栏。会话正文、右栏、浮窗不受影响。
- 缩放不改变侧栏宽度:字号调大时行内文字会更容易截断,调小时会露出更多文字。
- 侧栏一直收在 56px 窄条时不会打缩放标记,展开后生效。
- 依赖 DSH 侧栏的 DOM 结构(
data-sidebar-scrollport、<hash>_root命名)。大版本若改动这两处,表现为不生效而不是样式错乱。 - 不读取
ctx.locale:「更多」里那一行的文案按navigator.language选中文或英文。没有注入 locale 服务却去访问它,Cordis 会把这条插件的 fiber 挂在等待服务上,整个插件都不会生效。
开发
client.js 注入样式、打标记、注册「更多」里的字号行
index.js Host 半侧,空实现
cordis.patch.yml 插入插件行
locale/*.json 插件页展示的标题与描述
icon.svg 插件图标
tools/ 自检脚本(不随 npm 包发布)
node tools/self-check.mjs 用本机 Edge 的无头模式加载 tools/self-check.html,在真实 Chromium 里跑一遍客户端模块:根节点是否被标记、缩放后的宽度/图标尺寸、注册到 sidebar.panellist.actions 的行、改 CSS 变量后的效果、卸载后的清理。node tools/probe.mjs 单独测量 zoom 与百分比宽度的组合,用来确定补偿写法。
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10669
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10669
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8366
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7489
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5362
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1070
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.