@skzhang/dsh-appearance: DSH Web Interface Appearance Management Plugin

Introduction

The DeepSeek Harness (DSH) ecosystem emphasizes plugin-based and modular architecture. For users accustomed to customizing their development environment, managing theme switching, font configuration, and visual effects scattered across multiple plugins can often feel cumbersome. The @skzhang/dsh-appearance plugin consolidates interface appearance configuration into a unified entry point, providing theme management, typography adjustments, and liquid glass effect support. It aims to make visual customization on the Web more centralized and efficient.

Features

Theme Management

The plugin provides DSH’s native light, dark, and system-following modes, featuring two-way synchronization with DSH’s own ui-theme.preference. In addition, it supports various preset themes (such as Catppuccin, Dracula, GitHub, Ayu, etc.).

Preset themes are not merely simple background color replacements; instead, an algorithm derives over 90 DSH tokens from a seed color. These tokens cover all visual elements, including background layers, dividers, input boxes, menus, selection states, scrollbars, code blocks, tooltips, and sidebars. The derivation process utilizes color-mix to handle opacity and color blending, ensuring consistent readability when switching between light and dark presets. Color values are taken directly from official palettes and written to the same location as official themes (the body layer) to prevent custom styles from being overwritten.

Fonts and Typography

Support is provided for custom UI fonts and code fonts. The input box automatically scans system font directories for selection. Font sizes range from 10 to 24px.

The plugin supports font smoothing (implemented via -webkit-font-smoothing), but this effect only applies to web page CSS text and does not affect system-level native controls. In terms of typography, users can adjust conversation stream density (controlling spacing between message entries, where 0 is the most compact) and tool invocation line spacing (implemented via padding-block, which does not participate in window measurement logic).

Liquid Glass Effect

This feature applies only to real floating layers within the page, including menus (role="menu") and dialogs (role="dialog"[aria-modal=true]). Users can adjust the blur, light transmission level, and layer range.

To ensure usability, the light transmission effect has a minimum threshold; regardless of slider adjustments, menus remain readable. When this feature is disabled, the plugin actively clears glass styles that may have been left behind by the dsh-desktop-assist plugin, preventing visual chaos caused by overlapping semi-transparent layers.

Persistent Storage

Appearance settings are written to the host’s settings.yaml via DSH’s settings seam. The plugin features intelligent synchronization logic:
1. If the host partition already has user-level configuration, it is adopted directly at startup.
2. If the host has never accepted a write, the local selection is retained and supplemented to the host to prevent default values from overwriting.
3. Write failures adopt an exponential backoff retry mechanism until the partition content matches the local state. In memory mode, it relies solely on localStorage.

Installation and Activation

Install via the DSH plugin command:

dsh plugin --profile web add @skzhang/dsh-appearance

Once installed, restart dsh web or reopen the Desktop application for the changes to take effect. All settings can be found under “Settings → Appearance” in the interface, requiring no additional configuration.

Development and Licensing

This plugin is open-sourced under the MIT license. The source code structure is clear, with src/client.js serving as the browser-side implementation and scripts/build.mjs handling packaging. The project supports node:test and can be run without additional configuration.

Project URL: https://github.com/shkzhang/dsh-appearance

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye