DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

1jincheng /

1jincheng/dsh-first-paint

Verified

首帧启动页:把启动页写进 DSH 首帧 HTML,消除启动白闪(独立插件,不改主程序)

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: master@4139785a

dsh-first-paint(首帧启动页)

给 DeepSeek Harness 桌面端/网页端补一块首帧启动页:窗口一出现就是黑底品牌页,而不是先闪一下白屏或先看到聊天界面,然后再等启动动画补上来。

不改主程序、不碰 app.asar,只是一个独立插件。

解决什么问题

  • DSH 桌面端启动时会先建窗口、再加载页面,页面首帧是应用自己的空白/白色加载态;
  • 启动动画插件(如 dsh-startup-screen)通常用 webServer.tapIndex 往 HTML 里塞启动页,但桌面端这条链路只渲染 index-inject 注入行,tapIndex 不生效;
  • 结果就是:黑窗 → 白闪 1–2 秒 → 启动动画才出来。

本插件订阅 webserver/index-inject,把启动页作为一条 script 注入行交给 webServer 的 index 渲染器,桌面端随 boot payload 一起下发,所以第一帧就是黑底品牌页。

安装

dsh plugin --profile desktop add dsh-first-paint
# 或 web profile
dsh plugin --profile web add dsh-first-paint

装完完全退出 DSH 再打开。

配置

可选,默认开箱即用。配置文件:~/.dsh/dsh-first-paint.json(DSH_HOME 可覆盖目录)

{
  "enabled": true,
  "cn": "天枢",
  "en": "TIANSHU",
  "maxMs": 6000,
  "handoffDelayMs": 500,
  "background": "#0A0A0B",
  "accent": "#FF7500"
}
字段 默认 说明
enabled true 关掉后完全不注入
cn HARNESS 大字(中文/任意文本)
en LOADING 副标题(英文/小字)
maxMs 6000 兜底:没检测到启动动画接管时,最多挡这么久
handoffDelayMs 500 检测到启动动画后,延迟多久淡出
background #0A0A0B 底色
accent #FF7500 强调色(副标题 + 进度条)

与 dsh-startup-screen 的关系

两个插件互相独立:

  • dsh-startup-screen 负责完整的启动动画(授权序列、语音等);
  • 本插件只负责首帧兜底:先铺黑底品牌页,等检测到 #dsh-startup-root / window.__DSH_STARTUP_RUNNING__ 后自动淡出,把画面交给启动动画;
  • 不装 dsh-startup-screen 也能用:到 maxMs 自动淡出,不会把人锁在启动页里。
  • 升级 dsh-startup-screen 不会影响本插件(两个包、两条 bundle 行)。

发布

npm publish            # 包名:dsh-first-paint

在 Design and Make Marketplace / DSH 插件市场提交时,声明 dsh.bundle.patch 即可被 dsh plugin add 识别。

限制

  • 只影响首屏渲染,不改窗口显示时机(窗口由 Electron 主进程创建,插件无权延迟 show());
  • 若宿主改了 index 注入行的渲染位置,可能需要跟着调整;
  • 注入行内容全部内联,不依赖任何外部资源,离线可用。

许可

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit 4139785a44ba

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout