rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:wangjiaxi/dsh-chat-wallpaper
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DSH Web 的聊天对话区加一张背景图片,并且保证正文始终看得清:插件按当前主题自动校正亮度(曝光)和对比度,再按正文颜色反解出不透明度,使估算对比度不低于 4.5:1。
localStorage,不上传、不发网络请求# 从 GitHub(推荐先这样试)
dsh plugin --profile web add github:wangjiaxi/dsh-chat-wallpaper
# 从本地目录(开发时用,link 方式,改文件即时生效)
dsh plugin --profile web add /path/to/dsh-chat-wallpaper
# 从 npm(发布之后)
dsh plugin --profile web add dsh-chat-wallpaper@latest
装完刷新一次页面,设置 → 聊天背景 就会出现。
注意:包声明了
dsh.bundle.patch,所以dsh plugin add会自动把它写进dsh.profile.bundles,不需要手改cordis.patch.yml。在 Web UI 的插件页里安装时,
dsh-web进程的PATH里必须有pnpm;如果报spawn pnpm ENOENT,就用上面的命令行方式(在你自己 shell 里带好PATH)装。
设置 → 聊天背景选择图片(PNG / JPEG / WebP,12MB 以内;超过 1800px 会先缩小再存)清除背景 一键回到默认影响阅读的不是某一个参数,而是背景与文字的相对亮度。插件因此分三层,朝同一个方向收敛:
| 参数 | 通俗叫法 | 作用 |
|---|---|---|
brightness |
曝光 | 把整张图的平均亮度移到当前主题底色附近,让壁纸和界面「响度」一致 |
contrast |
对比度 | 压缩明暗跨度。壁纸只需要氛围,不需要满幅细节 |
opacity |
不透明度 | 兜底:解出「最坏像素」仍满足 4.5:1 所需的最大不透明度 |
blur / saturate |
模糊 / 饱和度 | 降低高频细节和高饱和色块对字迹的干扰 |
自动模式的算法:
p01 / p50 / p99 / 均值),透明像素按「露出底色」跳过。--dsw-alias-bg-base(底色)和 --dsw-alias-label-primary(正文色)实时解析真实的 WCAG 相对亮度——不写死深浅色,也不猜。brightness,用目标跨度解出 contrast(只压不涨)。brightness + contrast 后反解不透明度上限,令估算对比度 ≥ 4.5:1,再留 8% 余量。MutationObserver 监听(比对解析出的颜色,不是比对类名),命中就重算重绘。[data-conversation-region="chat"]::before:这是会话正文区的稳定 data- 属性,不依赖打包后的哈希类名。isolation: isolate 得到独立堆叠上下文,伪元素 z-index: -1 正好落在面板底色之上、所有消息行与文字之下;不碰布局,pointer-events: none 也不吃点击。<style data-dshwp-style> 注入 + 一组 --dshwp-* 自定义属性;状态(图片 + 五个参数)写 localStorage['dsh-chat-wallpaper/v1']。window.__ModuleLoader__.load({ id, factory }),不需要构建步骤,仓库里提交的就是运行产物。| 文件 | 作用 |
|---|---|
package.json |
清单:dsh.bundle.patch + dsh.client(web 平台、immediately)+ 兼容性 peerDependencies |
cordis.patch.yml |
挂载一行 chat-wallpaper |
index.js |
Host 半边,空实现(功能全在浏览器端) |
client.js |
设置页 + 样式 + 自动校正算法 |
scripts/validate.mjs |
清单/补丁/导出/注册 id 的自检,可离线跑 |
peerDependencies 里声明了三个 DSH Client 包(@deepseek-ai/dsh-client-ui-slots、dsh-client-locale、dsh-client-ui-conversation),当前对应 dsh 0.2.0-rc.2。
DSH 在装载 bundle 时会用运行时版本校验这些 peer 范围;不匹配会直接跳过整个 bundle(不会报一堆错,只是插件静默不出现)。所以 DSH 升到 0.3 之前请一并更新这里:
"peerDependencies": {
"@deepseek-ai/dsh-client-locale": "^0.3.0",
"@deepseek-ai/dsh-client-ui-slots": "^0.3.0",
"@deepseek-ai/dsh-client-ui-conversation": "^0.3.0"
}
data-conversation-region="chat"。如果上游改名,背景会静默失效(不报错);设置 → 聊天背景 里有「已检测到聊天区域」提示,可以用来判断。node --check client.js
node --check index.js
npm run validate # 清单 / patch / exports / 注册 id
插件装成 link: 时,改 client.js 保存即可,页面侧 HMR 会重新拉取;改 package.json 的 dsh.client 段通常要重启 dsh-web。
DSH Web plugin: an uploaded image as the conversation-area wallpaper. The image is auto-corrected for the active theme — brightness moves its mean luminance onto the theme surface, contrast compresses its range, and opacity is solved so the worst pixel still leaves 4.5:1 against the body text colour. Theme tokens only; no network, no upload, localStorage only. Hand-written client module, no build step. Requires @deepseek-ai/dsh-client-ui-slots / dsh-client-locale / dsh-client-ui-conversation peer ^0.2.0-rc.2.
MIT,见 LICENSE。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。