← Back to home@BOOK-4-1

dsh-highlight-link

让 DSH Web UI 里的链接和 `@` 引用更醒目:统一成一种颜色 `#7b97d9`,链接常驻下划线。

Stars
0
Language
JavaScript
Created
Oct 24, 2026
Updated
Oct 24, 2026

Introduction

dsh-highlight-link

让 DSH Web UI 里的链接和 @ 引用更醒目:统一成一种颜色 #7b97d9,链接常驻下划线。 Makes links and @-references stand out in the DSH Web UI: one color (#7b97d9) plus a permanent underline on links.

中文 · English


中文

它做了什么

插件在激活时注入一张样式表,卸载时移除。只改两处:

目标宿主默认装了本插件后
正文链接、文件链接、来源链接、抓取到的 URLvar(--dsw-alias-link)(蓝),无下划线#7b97d9,实线下划线
@ 引用标签(@文件、@会话、@技能)var(--dsw-alias-state-business-primary)#7b97d9

两处故意分开设置,原因是它们根本不是同一个东西:

  • 链接走语义 token --dsw-alias-link。改这个 token,所有消费它的组件自动跟着变,不需要逐个组件去点名。
  • @ 引用标签不是链接的消费者。宿主用 --dsw-alias-state-business-primary 给它们上色,而这个 token 同时被焦点环、info 色 tag 等共用。所以插件选择直接选中 [data-ref-chip](稳定的业务属性),而不是去覆盖那个公共 token——否则会顺带把焦点环和标签也染成同一个颜色。

插件不碰渲染层以外的任何东西:不发网络请求、没有宿主侧行为、不读写会话数据。

环境要求

  • DeepSeek Harness >= 0.2.1-rc.2(写在 engines.dsh 里)
  • 一个跑 Web UI 的 profile(web)

安装

从 npm:

dsh plugin --profile web add dsh-highlight-link

从本地目录:

dsh plugin --profile web add /absolute/path/to/dsh-highlight-link

装完重启 dsh,或让插件管理器直接应用。卸载:

dsh plugin --profile web remove dsh-highlight-link

也可以在「插件 → 发现」里搜 highlight 或 link,点一下安装。

改颜色

颜色集中在一个常量里,改 client.js 即可:

const LINK = '#7b97d9';

维护上的几个取舍

  • 样式选择器用 [data-ref-chip] 这个业务属性,不用哈希类名 _refChip_<hash>——后者每次上游构建都会变。
  • !important 是刻意保留的:皮肤类插件会把同一个 token 写成 <body> 上的普通内联声明,普通样式表规则压不过内联声明。
  • 浅色主题下 #7b97d9 对默认浅色底约为 2.7:1,是刻意选的柔和色;深色底上约为 6.3:1。如果你更看重浅色下的对比度,把浅色那一档调深即可(同色相 #4a68b8 约 4.9:1)。

English

A small DeepSeek Harness (dsh) plugin that makes links easier to spot in the Web UI: links and @-reference chips get one shared color, and links get a permanent underline instead of the hover-only dotted one.

What it does

The plugin injects a single stylesheet at activation and removes it when it is unloaded. It changes two things:

TargetHost defaultWith this plugin
Markdown body links, file links, source links, fetched URLsvar(--dsw-alias-link) (blue), no underline#7b97d9, solid underline
@-reference chips (@file, @session, @skill)var(--dsw-alias-state-business-primary)#7b97d9

The two targets are set separately on purpose:

  • Links follow the semantic token --dsw-alias-link, so every consumer of that token follows without targeting individual components.
  • @ chips are not link consumers — the host paints them with --dsw-alias-state-business-primary, which is also used by focus rings and info tags. The plugin therefore targets [data-ref-chip] (a stable business attribute) instead of overriding that shared token.

It also does not touch anything outside the renderer: no network requests, no host-side behavior, no session data.

Requirements

  • DeepSeek Harness >= 0.2.1-rc.2 (declared as engines.dsh)
  • A profile that runs the Web UI (web)

Install

From npm:

dsh plugin --profile web add dsh-highlight-link

From a checkout:

dsh plugin --profile web add /absolute/path/to/dsh-highlight-link

Then restart dsh, or let the plugin manager apply the bundle. To remove it:

dsh plugin --profile web remove dsh-highlight-link

You can also find it in Plugins → Discover by searching highlight or link.

How to change the color

Edit client.js; the color lives in one constant:

const LINK = '#7b97d9';

Notes on maintainability

  • The stylesheet targets [data-ref-chip], a business attribute, not the hashed _refChip_<hash> class name (which changes on every upstream build).
  • !important is used deliberately: a skin plugin may write the same token as a normal inline declaration on <body>, which would otherwise win.
  • The light-theme value #7b97d9 measures about 2.7:1 against the default light surface, so it is intentionally a soft color; on the dark surface it measures about 6.3:1. Darken the light value if you need higher contrast there (#4a68b8, same hue, is about 4.9:1).

License

MIT