@dsh-external/dsh-home-ui
PiUI-inspired home feed visual refinement for the DSH web client: sidebar palette unified with the conversation feed, feed header aligned with the sidebar controls, and the header hairline replaced by a soft gradient — all via a plugin-owned global stylesheet. Zero core changes; works on official dsh distributions.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:lehhair/dsh-home-ui说明文档
阅读完整 README ↗dsh-home-ui
基于 OpenCodeUI 视觉语言的主页信息流精修插件(纯扩展,零核心改动)。
功能
参考 OpenCodeUI 的主页设计语言,对 DSH web 客户端主页做四处调整,全部通过插件自有的全局样式表实现:
- 侧边栏配色与信息流统一 — 侧边栏列与每一层 shell 的填充色从偏灰的 bluish-50 改为与信息流相同的
bg-base,左右两栏读作同一块表面(OpenCodeUI 中侧边栏与聊天共用同一底色)。 - 信息流 header 与侧边栏按钮对齐 — 侧边栏 shell 顶部控制行中心(展开与收起均为 y=36,官方几何不动)与信息流标题行对齐:standalone header 顶部 padding 从官方 12px 降到 20px,标题中心落在侧边栏按钮的 y=36 线上(0px 误差)。分屏 pane 被显式排除:split-panes 的 split 容器带稳定的
data-direction属性,其内的 pane header 恢复官方 12px——分屏 pane 标题中心 ~37 本就与侧边栏对齐(frame 的 8px padding + 1px border 自然落在按钮线上),插件对分屏 pane 零影响。 - header 底部横线改为渐变 — 官方 header 下方的 1px 实线分隔改为 OpenCodeUI 式渐变带:从信息流底色(不透明)向下渐隐到透明,内容从 header 下浮现而不是被一条线切断(对应 OpenCodeUI 的
data-chat-header-shadow,h-8 from-bg-100 to-transparent)。 - 宽屏模式 — 设置 → 通用 →「信息流宽度」:标准 / 宽屏两档。宽屏把
--dsh-chat-content-width从 748px 放宽到 1080px,消息流、统计行、dock 卡、输入框整体放宽(与官方 748px 同构,只是更大);偏好写入 localStorage,刷新后自动恢复。
明暗两种主题都生效;卸载插件即完全还原官方外观。
安装
# 在 dsh profile 目录
pnpm dsh plugin --profile web add @dsh-external/dsh-home-ui
或在 profile 的 package.json 中:
{
"dependencies": { "@dsh-external/dsh-home-ui": "link:../dsh-home-ui" },
"dsh": { "profile": { "bundles": ["...", "@dsh-external/dsh-home-ui"] } }
}
推荐组合:纯前端 UI 扩展
dsh-home-ui 属于一组纯前端视觉扩展——它们只通过全局样式表、轻量 DOM 控制器和官方开放的 slot 工作,不改任何核心包,可以任意组合、独立卸载,叠加后也不会互相干扰。推荐按需搭配:
| 扩展 | 仓库 | 做什么 | 组合效果 |
|---|---|---|---|
| dsh-home-ui(本插件) | lehhair/dsh-home-ui | 主页信息流视觉精修 + 宽屏模式 | 基准视觉:侧边栏与信息流同底色、header 对齐、渐变分隔、宽屏开关 |
| dsh-diff-viewer | lehhair/dsh-diff-viewer | edit/write 工具的 diff 渲染增强 | 宽屏下 diff 自动左右分栏(按容器宽度判定),与宽屏模式天然契合 |