dsh-whale-avatar

by lhjlol

1 UI 增强github 检测到 manifest package.json#dsh收录于 08-16

DSH 插件:给助手消息加头像与名字(App 图标 + 吃白饭的蓝色大肥鱼)| Adds app-icon avatar and name to assistant messages

安装

dsh plugin --profile web add github:lhjlol/dsh-whale-avatar

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

给 DSH Web UI 的助手消息加上头像与名字:App 图标 + 吃白饭的蓝色大肥鱼。纯 CSS 注入(::before),React 重渲染不会丢,跟随日间/夜间主题令牌。

Adds an avatar (the app icon) and the name to every assistant message in the DSH Web UI. Pure CSS injection — survives React re-renders, theme-aware.

实现

  • 目标元素:[data-chat-flow-kind="assistant-step"](官方 web 应用的助手消息节点)。
  • 注入方式:style 标签内一条 CSS 规则,::before 伪元素渲染「头像 + 名字」,无 DOM 改动。
  • 头像:56px PNG 包进 28×28 SVG 的 data URI(Retina 清晰)。

安装

通过 Oh-DSH Desktop 插件市场安装(或 dsh plugin --profile <name> add github:lhjlol/dsh-whale-avatar)。安装后运行时自动重启生效。

卸载

从市场的插件列表卸载即可;CSS 随之移除。

结构

  • lib/client.js — 浏览器半(__ModuleLoader__ 格式),全部逻辑在此。
  • lib/index.mjs — Node 半,空 apply(纯 client 插件)。
  • cordis.patch.yml — bundle patch:向组合插入本插件行。

原始 README: https://github.com/lhjlol/dsh-whale-avatar/blob/main/README.md ↗