dsh-chat-wallpaper: Adding Background Images to DSH Web Chat Area with Guaranteed Content Readability

Introduction

When using the DeepSeek Harness (DSH) Web interface for long conversations, the interface often features a plain solid background. If you wish to set a wallpaper in the conversation body area without sacrificing readability, the common approach is to manually adjust brightness or overlay a semi-transparent mask, which often requires re-adjusting parameters after switching between light and dark themes. The community plugin dsh-chat-wallpaper (maintained by wangjiaxi) is designed for DSH Web: it allows selecting local images, renders them only within the conversation body area, automatically corrects exposure and contrast based on the current theme, and calculates opacity based on text color to ensure the estimated contrast ratio is not lower than 4.5:1. Images are stored only in localStorage; they are not uploaded or sent via network requests.

The following section describes the plugin’s positioning, capabilities, and installation instructions; installation commands and configuration are based on the repository’s README and package.json.

What is this

dsh-chat-wallpaper is a DSH Web-side plugin (npm package name dsh-chat-wallpaper, current version 0.1.0, MIT License). It provides a Settings → Chat Background entry in the sidebar, allowing users to add a background image to the chat conversation area while ensuring the body text remains legible. The Host side (index.js) is an empty implementation; the functionality is completed in the browser-side client.js. The repository submission is the runtime product, requiring no build steps.

Core Features

  • Scope: The background is drawn only in the conversation body area, without covering message bubbles, the input box, the sidebar, or the title bar; the title bar and input box remain opaque to prioritize readability.
  • Theme Adaptation: Automatic adaptation for light and dark themes; parameters are recalculated immediately upon theme switching. Colors utilize theme tokens (such as --dsw-alias-bg-base, --dsw-alias-label-primary) rather than hard-coded light or dark colors.
  • Auto Correction: “Auto Correction” is enabled by default. The plugin uses a three-layer approach to balance the relative luminance of the background and text: brightness (exposure), contrast (contrast), and opacity (opacity, as a fallback to satisfy the estimated WCAG contrast ratio ≥ 4.5:1). Additionally, blur / saturate are used to reduce interference from details and saturated color blocks on the text.
  • Local Storage: The image and the state of the five parameters are written to localStorage['dsh-chat-wallpaper/v1'].
  • Implementation Anchor: The background is drawn on [data-conversation-region="chat"]::before; the settings page includes a “Chat region detected” prompt to help determine if the upstream DOM still matches.

Installation and Activation

The package declares dsh.bundle.patch. When running dsh plugin add, it will automatically write to dsh.profile.bundles, so manual modification of cordis.patch.yml is generally not required.

When installing via the Web UI plugin page, pnpm must be available in the PATH of the dsh-web process; if spawn pnpm ENOENT appears, please install it in your local shell using the following commands (ensure your PATH is configured):

# From GitHub (Recommended to try first)
dsh plugin --profile web add github:wangjiaxi/dsh-chat-wallpaper

# From local directory (For development, link mode, changes take effect immediately)
dsh plugin --profile web add /path/to/dsh-chat-wallpaper

# From npm (After release)
dsh plugin --profile web add dsh-chat-wallpaper@latest

After installation, refresh the page once, and Settings → Chat Background will appear.

Compatibility: peerDependencies declares @deepseek-ai/dsh-client-ui-slots, @deepseek-ai/dsh-client-locale, and @deepseek-ai/dsh-client-ui-conversation, currently corresponding to dsh 0.2.0-rc.2. DSH validates the peer range when loading the bundle; a mismatch will result in the entire bundle being silently skipped (the plugin will not appear). Before upgrading DSH to 0.3, the peer version range needs to be updated accordingly as per the README.

The plugin runs with the permissions of the current DSH process; it is recommended to read the repository source code and MIT License before installation to ensure compliance with your environment policies.

Typical Usage

  1. Open Settings → Chat Background.
  2. Click Select Image (Supports PNG / JPEG / WebP, within 12MB; images with width or height exceeding 1800px will be scaled down before storage).
  3. “Auto Correction” is enabled by default, and the five sliders display the calculated values.
  4. If still unsatisfactory, you can disable auto mode and adjust manually; the page will display the “Estimated body contrast x.x:1” in real-time.
  5. Clear Background can restore the default with one click.

During development, if installed via link:, saving changes to client.js will trigger a re-fetch via page-side HMR; modifying the dsh.client section of package.json usually requires restarting dsh-web.

Use Cases and Notes

Suitable for: Users who wish to use local wallpapers in the DSH Web conversation body area and require automatic assurance of body text readability based on the theme.

Notes:

  • Depends on data-conversation-region="chat"; if the upstream renames this attribute, the background will silently fail, which can be identified via the detection prompt on the settings page.
  • There are no browser automation tests for visuals and interactions; the repository only performs manifest, bundle distribution, and slot registration validation (npm run validate).
  • The DeepSeek Harness ecosystem emphasizes “Everything is a plugin”; the community directory SkillHub Plugin Page is an independent site and has no official affiliation with DeepSeek or Hithink RoyalFlush.

Conclusion

dsh-chat-wallpaper restricts the wallpaper to the conversation body area, utilizing theme tokens and multi-layer parameters (exposure, contrast, opacity, etc.) to maintain the estimated contrast ratio above 4.5:1, with data remaining locally. To try it out or contribute code, please visit the GitHub Repository and the SkillHub Directory Page.

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

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

Xiaoye