- Início
- Plugins
- Melhorias de UI
- dsh-first-paint
dsh-first-paint
1jincheng/dsh-first-paint
First-paint splash for DSH: pushes a branded splash page into the boot HTML as an index-injection row, so the desktop window opens already showing the splash instead of a white/loading flash. Fades out and hands over once the startup-animation plugin starts (checked via `window.__DSH_STARTUP_RUNNING__`), with a 6-second fallback (configurable via `maxMs`) so it can never trap the app behind the splash. A normal dsh.bundle plugin: no host changes, no app.asar patching.
Instalar
dsh plugin --profile web add github:1jincheng/dsh-first-paintREADME
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
Plugins relacionados
dsh-web (dsh-task-board)
zhu1090093659/dsh-web
dsh-web (dsh-web-all)
zhu1090093659/dsh-web
dsh-TUI
ccch1mneyyy/dsh-tui
dsh-web-ui (dsh-task-board)
zhu1090093659/dsh-web-ui