dsh-any-background 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +48 -209
- package/README.zh.md +51 -211
- package/cordis.patch.yml +8 -8
- package/lib/client.js +3681 -1088
- package/lib/client.js.map +1 -1
- package/lib/index.js +352 -44
- package/lib/invariant.js +0 -11
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Tkingxiao
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tkingxiao
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -10,284 +10,123 @@ A **DeepSeek Harness** appearance plugin that lets you fully customize the Web U
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
- **PS-style Color Wheel** — Pick hue on the ring, adjust saturation & lightness in the inscribed square. Generates 30+ CSS design tokens in real time and applies them instantly.
|
|
16
|
-
- **Precise HSL / RGB Input** — Enter exact color values numerically (HSL or RGB tabs) with instant bidirectional sync to the wheel.
|
|
17
|
-
- **Smart Color Extraction** — One click derives a theme color from your wallpaper: the framed (visible) region is sampled, quantized, filtered of gray/near-black/near-white pixels, and the most dominant vivid hue becomes the theme color. Runs fully client-side with a 64×64 sample — no RPC traffic.
|
|
18
|
-
- **Eyedropper** — Hover the wallpaper to preview a color and click to pick it as the theme color.
|
|
19
|
-
- **Background Wallpaper** — Choose any image as your wallpaper. Drag to pan, scroll to zoom (anchored at the view center) inside a viewport-proportional editor. What you see is what you get.
|
|
20
|
-
- **Per-part Interface Opacity** — Independent sliders for main background, sidebar, cards & panels, plus the settings panel and wallpaper.
|
|
21
|
-
- **Per-part Interface Blur** — Frosted-glass `backdrop-filter` blur (0–60 px) for each interface part, independently adjustable.
|
|
22
|
-
- **Theme Export / Import** — One-click export to a self-contained `dsh-any-theme.json` (config + wallpaper) and import to restore it anywhere.
|
|
23
|
-
- **File-based Persistence** — All settings (color, opacities, blurs, wallpaper, editor position) are stored on the **filesystem** under `~/.dsh/.dsh-any-background-data/` via the node half, and restored on next launch. No more `localStorage` quota worries.
|
|
24
|
-
- **Bilingual** — Full Chinese / English UI with automatic locale detection.
|
|
25
|
-
- **Theme Watchdog** — A background watchdog re-asserts the custom theme if the host resets it, so your pick never silently disappears.
|
|
26
|
-
|
|
27
|
-
## Project Structure
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
dsh-any-background/
|
|
31
|
-
├── package.json # Package metadata, dsh.client declaration, dependencies
|
|
32
|
-
├── cordis.patch.yml # Bundle patch layer (inserted into profile composition)
|
|
33
|
-
├── cordis.yml # Patch overlay for dev usage (pnpm dsh web --patch)
|
|
34
|
-
├── tsdown.config.ts # Build config: node-half (ESM) + client-half (CJS browser bundle)
|
|
35
|
-
├── src/
|
|
36
|
-
│ ├── index.ts # Node half — file-backed persistence (RPC file store)
|
|
37
|
-
│ ├── invariant.ts # Invariant companion (registers package ownership)
|
|
38
|
-
│ └── client/ # Browser half — modularized by concern
|
|
39
|
-
│ ├── index.tsx # Lifecycle wiring (theme, wallpaper, i18n, section, watchdog)
|
|
40
|
-
│ ├── types.ts # Shared type definitions
|
|
41
|
-
│ ├── state.ts # In-memory config mirror + getters
|
|
42
|
-
│ ├── rpc.ts # File-backed persistence RPC client
|
|
43
|
-
│ ├── wallpaper.ts # Wallpaper DOM layer + per-part opacity/blur application
|
|
44
|
-
│ ├── i18n.ts # zh/en dictionaries
|
|
45
|
-
│ ├── styles.ts # Shared inline styles
|
|
46
|
-
│ ├── utils/
|
|
47
|
-
│ │ ├── color.ts # Color math, token generation, wallpaper color extraction
|
|
48
|
-
│ │ └── image.ts # Wallpaper file reading (as-is data URL)
|
|
49
|
-
│ └── components/
|
|
50
|
-
│ ├── ThemeSection.tsx # Settings panel section (all controls)
|
|
51
|
-
│ ├── ColorWheel.tsx # Hue ring + SL square canvas
|
|
52
|
-
│ ├── ColorInputs.tsx # Precise HSL/RGB entry
|
|
53
|
-
│ ├── ColorPicker.tsx # Eyedropper modal
|
|
54
|
-
│ ├── BgEditor.tsx # Wallpaper position/size editor
|
|
55
|
-
│ ├── LiveSlider.tsx # Throttled live slider
|
|
56
|
-
│ ├── ErrorBoundary.tsx # Crash fallback for the panel
|
|
57
|
-
│ └── icons.tsx # Migrated nav glyphs (sun icon)
|
|
58
|
-
├── lib/ # Built output, committed so installs need no build step
|
|
59
|
-
│ ├── index.js # Node entry
|
|
60
|
-
│ ├── invariant.js # Invariant entry
|
|
61
|
-
│ ├── client.js # Browser bundle (wrapped for __ModuleLoader__)
|
|
62
|
-
│ └── client.js.map # Source map
|
|
63
|
-
├── example_img/ # Example screenshots
|
|
64
|
-
├── README.md # This file (English)
|
|
65
|
-
└── README.zh.md # 中文版
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Implementation
|
|
69
|
-
|
|
70
|
-
The plugin is a Cordis plugin split into two halves:
|
|
71
|
-
|
|
72
|
-
- **Node half** (`src/index.ts`) — owns file-backed persistence. It manages the `.dsh-any-background-data/` store under the DSH data home (`~/.dsh/`) and exposes a small RPC surface over the dedicated `/dsh-any-background` channel.
|
|
73
|
-
- **Browser half** (`src/client/`) — all UI logic lives here. The browser cannot touch the filesystem, so it reads/writes the store through the node half's RPC endpoints.
|
|
74
|
-
|
|
75
|
-
### Persistence
|
|
76
|
-
|
|
77
|
-
Since the plugin surfaces in the browser, persisted data is stored on disk by the **node half**:
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
~/.dsh/.dsh-any-background-data/
|
|
81
|
-
├── theme-config.json # color, per-part opacities & blurs, settings/wallpaper opacity, blur, bg edit state
|
|
82
|
-
└── wallpaper.jpg # the chosen background image (deleted when removed)
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
- On startup the client calls `read`, which returns the config and (if present) the wallpaper as a data URL.
|
|
86
|
-
- Every setting change is written back synchronously to `theme-config.json`; changing the wallpaper writes `wallpaper.jpg`, removing it deletes the file.
|
|
87
|
-
- The store is created automatically if missing; a missing or malformed config falls back to defaults (with a warning), and all writes are error-guarded to avoid data loss.
|
|
88
|
-
- Older configs (single `opacity` field, no per-part fields) migrate automatically to the per-part structure on load.
|
|
89
|
-
|
|
90
|
-
### Architecture
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
┌─────────────────────────────────────────────────────────┐
|
|
94
|
-
│ apply(ctx) — Plugin entry point │
|
|
95
|
-
├─────────────────────────────────────────────────────────┤
|
|
96
|
-
│ │
|
|
97
|
-
│ 1. Restore saved color → registerCustom() → setTheme │
|
|
98
|
-
│ 2. Inject gradient <style> into <head> │
|
|
99
|
-
│ 3. Create state store (defineStore) │
|
|
100
|
-
│ 4. applyWp() → wallpaper + per-part opacity/blur │
|
|
101
|
-
│ 5. Listen theme/change → re-apply │
|
|
102
|
-
│ 6. ResizeObserver → viewport-aware re-positioning │
|
|
103
|
-
│ 7. Locale registration (zh/en) │
|
|
104
|
-
│ 8. Settings section injection (ThemeSection) │
|
|
105
|
-
│ 9. Settings-nav icon patch (sun glyph) │
|
|
106
|
-
│ 10. Deferred boot restore (300ms, 1500ms) │
|
|
107
|
-
│ 11. Theme watchdog (1s interval) │
|
|
108
|
-
│ │
|
|
109
|
-
└─────────────────────────────────────────────────────────┘
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Color Wheel
|
|
113
|
-
|
|
114
|
-
- Single `<canvas>` element: hue ring (360° segments) + inscribed SL square (HSV S-V plane).
|
|
115
|
-
- `hitTest()` determines whether a click lands on the ring (hue) or square (saturation/lightness).
|
|
116
|
-
- HSV values from the canvas are converted to HSL via `hsvToHsl()` before passing to `genTokens()`.
|
|
117
|
-
- `genTokens()` generates 30+ CSS custom properties (`--dsw-alias-*`) for the picked color, choosing dark or light scheme based on lightness.
|
|
118
|
-
- The full token set is written as inline styles on `<body>`, so the theme color never depends on the theme service's timing.
|
|
119
|
-
- A **precise input panel** (HSL / RGB tabs) sits next to the wheel — numeric entry syncs both ways with the canvas in real time.
|
|
120
|
-
|
|
121
|
-
#### Theme Color Adjustment
|
|
13
|
+
## Screenshots
|
|
122
14
|
|
|
123
15
|
<p align="center">
|
|
124
|
-
<img src="example_img/image.png" alt="
|
|
16
|
+
<img src="example_img/image.png" alt="Custom homepage" width="720">
|
|
125
17
|
<br/>
|
|
126
|
-
<em>
|
|
18
|
+
<em>Custom homepage · wallpaper + theme color applied</em>
|
|
127
19
|
</p>
|
|
128
20
|
|
|
129
21
|
<p align="center">
|
|
130
|
-
<img src="example_img/image-
|
|
22
|
+
<img src="example_img/image-2.png" alt="Theme color picker" width="720">
|
|
131
23
|
<br/>
|
|
132
|
-
<em>
|
|
24
|
+
<em>Theme color picker · PS-style wheel + precise HSL/RGB inputs</em>
|
|
133
25
|
</p>
|
|
134
26
|
|
|
135
|
-
### Background Wallpaper
|
|
136
|
-
|
|
137
|
-
- A `<div>` with `position:fixed; z-index:-1` is prepended to `<body>`.
|
|
138
|
-
- The chosen image is stored **as-is** (original data URL, no re-encoding), so the wallpaper keeps full fidelity; the node half writes it to `~/.dsh/.dsh-any-background-data/wallpaper.jpg`, and the client keeps the data URL in memory for display.
|
|
139
|
-
- The editor modal shows a viewport-proportional rectangle; drag to pan, scroll to zoom (0.1×–10×) anchored at the view center.
|
|
140
|
-
- Committed position is stored as fractional center coordinates + natural image size, so the layout survives viewport changes.
|
|
141
|
-
- Wallpaper opacity is applied directly to the `<div>` element; wallpaper blur via `filter: blur()`.
|
|
142
|
-
|
|
143
|
-
#### Wallpaper Preview
|
|
144
|
-
|
|
145
27
|
<p align="center">
|
|
146
|
-
<img src="example_img/image-
|
|
28
|
+
<img src="example_img/image-3.png" alt="Per-part opacity and blur" width="720">
|
|
147
29
|
<br/>
|
|
148
|
-
<em>
|
|
30
|
+
<em>Per-part opacity and blur · main background, sidebar, cards, settings</em>
|
|
149
31
|
</p>
|
|
150
32
|
|
|
151
|
-
#### Editor Adjustment
|
|
152
|
-
|
|
153
33
|
<p align="center">
|
|
154
|
-
<img src="example_img/image-
|
|
155
|
-
<img src="example_img/image-4.png" alt="Background mapping" width="400">
|
|
34
|
+
<img src="example_img/image-4.png" alt="Background editor" width="720">
|
|
156
35
|
<br/>
|
|
157
|
-
<em>
|
|
36
|
+
<em>Background editor · image/video wallpapers support drag-to-pan and scroll-to-zoom</em>
|
|
158
37
|
</p>
|
|
159
38
|
|
|
160
|
-
### Interface Opacity & Blur
|
|
161
|
-
|
|
162
|
-
Each interface part has its own **opacity** and **blur** slider. Opacity is applied by re-emitting the theme's surface tokens at the part's alpha; blur is applied via `backdrop-filter: blur()` on the AppFrame columns (the settings panel via a CSS variable).
|
|
163
|
-
|
|
164
|
-
| Part | Opacity field | Blur field | Default opacity | Mechanism |
|
|
165
|
-
|------|---------------|------------|-----------------|-----------|
|
|
166
|
-
| Main background | `opacities.bg` | `blurs.bg` | 85% | Inline token override on `<body>` |
|
|
167
|
-
| Sidebar | `opacities.sidebar` | `blurs.sidebar` | 93% | Inline token override on `<body>` |
|
|
168
|
-
| Cards & panels | `opacities.card` | `blurs.card` | 100% | Inline token override on `<body>` |
|
|
169
|
-
| Settings panel | `settingsOpacity` | `blurs.settings` | 100% | CSS variable via `[aria-modal]` selector |
|
|
170
|
-
| Wallpaper | `wallpaperOpacity` | — | 100% | `style.opacity` on the wallpaper `<div>` |
|
|
171
|
-
|
|
172
|
-
#### Settings Opacity
|
|
173
|
-
|
|
174
39
|
<p align="center">
|
|
175
|
-
<img src="example_img/image-
|
|
176
|
-
<img src="example_img/image-6.png" alt="Settings opacity 49%" width="400">
|
|
40
|
+
<img src="example_img/image-6.png" alt="Generated dynamic background" width="720">
|
|
177
41
|
<br/>
|
|
178
|
-
<em>
|
|
42
|
+
<em>Generated dynamic background · mesh gradient / Shader / geometric presets</em>
|
|
179
43
|
</p>
|
|
180
44
|
|
|
181
|
-
#### Main Interface Opacity
|
|
182
|
-
|
|
183
45
|
<p align="center">
|
|
184
|
-
<img src="example_img/image-
|
|
185
|
-
<img src="example_img/image-7.png" alt="Main interface opacity 0%" width="400">
|
|
46
|
+
<img src="example_img/image-9.png" alt="Geometric background, low-poly mode" width="720">
|
|
186
47
|
<br/>
|
|
187
|
-
<em>
|
|
48
|
+
<em>Generated dynamic background · geometric low-poly mode preview</em>
|
|
188
49
|
</p>
|
|
189
50
|
|
|
190
|
-
#### Wallpaper Opacity
|
|
191
|
-
|
|
192
51
|
<p align="center">
|
|
193
|
-
<img src="example_img/image-
|
|
194
|
-
<img src="example_img/image-9.png" alt="Wallpaper opacity 50%" width="400">
|
|
52
|
+
<img src="example_img/image-10.png" alt="Config export and import" width="720">
|
|
195
53
|
<br/>
|
|
196
|
-
<em>
|
|
54
|
+
<em>Export and import configs to share</em>
|
|
197
55
|
</p>
|
|
198
56
|
|
|
199
|
-
|
|
57
|
+
## Features
|
|
200
58
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
59
|
+
- **PS-style Color Wheel** — Pick hue on the ring, adjust saturation & lightness in the inscribed square. Generates 30+ CSS design tokens in real time.
|
|
60
|
+
- **Precise HSL / RGB Input** — Enter exact color values numerically with instant bidirectional sync to the wheel.
|
|
61
|
+
- **Smart Color Extraction** — One click derives a theme color from your wallpaper by sampling the visible region, quantizing, and filtering out gray / near-black / near-white pixels. Video wallpapers contribute via an auto-captured frame. Fully client-side.
|
|
62
|
+
- **Eyedropper** — Hover the wallpaper to preview a color and click to pick it as the theme color.
|
|
63
|
+
- **Background Wallpaper** — Upload any image as your wallpaper. Drag to pan and scroll to zoom inside a viewport-proportional editor.
|
|
64
|
+
- **Video Wallpaper** — Use a video as a live wallpaper: muted looping playback that survives refreshes (file persistence + HTTP streaming with Range seek), with an auto-captured frame powering the preview, theme-color extraction, and the position editor.
|
|
65
|
+
- **Position Editor** — One shared editor for images and videos: drag to pan, scroll to zoom, one-click reset. Image and video placements are stored separately and never overwrite each other.
|
|
66
|
+
- **Layout Modes** — Fit / Fill / Stretch / Tile / Center for both images and videos; in Fit mode the editor-committed framing stays consistent across window resizes and cross-monitor moves.
|
|
67
|
+
- **Generated Dynamic Backgrounds** — Choose mesh gradient, Shader, or geometric patterns with adjustable spread, intensity, and seed locking.
|
|
68
|
+
- **Per-part Interface Opacity** — Independent sliders for main background, sidebar, cards & panels, plus the settings panel and wallpaper.
|
|
69
|
+
- **Per-part Interface Blur** — Frosted-glass `backdrop-filter` blur (0–60 px) for each interface part.
|
|
70
|
+
- **Conversation View Cards** — The message list is wrapped in a translucent card automatically, and the trajectory page gets whole-page opacity & blur controls, letting the wallpaper shine through the content.
|
|
71
|
+
- **Theme Export / Import** — One-click export to a self-contained `dsh-any-theme.json` (config + wallpaper, video embedded as a data URL) and import to restore it anywhere.
|
|
72
|
+
- **File-based Persistence** — All settings are stored on the filesystem under `~/.dsh/.dsh-any-background-data/`, not `localStorage`.
|
|
73
|
+
- **Bilingual** — Full Chinese / English UI with automatic locale detection.
|
|
74
|
+
- **Theme Watchdog** — Re-asserts the custom theme if the host resets it.
|
|
207
75
|
|
|
208
|
-
|
|
76
|
+
## Recent Optimizations
|
|
209
77
|
|
|
210
|
-
- **
|
|
211
|
-
- **
|
|
78
|
+
- **Video wallpaper end-to-end** — Videos are stored under MIME-derived names (`wallpaper.mp4/webm/...`) and streamed over the plugin's own HTTP route; they restore automatically after refresh or restart and travel inside exported configs.
|
|
79
|
+
- **Binary upload for large videos** — Uploads stream raw bytes over an HTTP POST straight to disk instead of a base64 detour through RPC (no channel body limit, any size works); aborted transfers clean up after themselves.
|
|
80
|
+
- **Video position editing** — The placement editor works on a captured frame reference with zoom/pan, adapted to all five layout modes; image and video framings persist independently.
|
|
81
|
+
- **Conversation view cards** — The message column gains an automatic card (border/radius/padding) and the trajectory page gets whole-page opacity & blur; switching views restores the previous host.
|
|
82
|
+
- **Boot flicker eliminated** — Theme tokens are injected through a dedicated `!important` stylesheet instead of inline `body` styles, surviving host theme service resets.
|
|
83
|
+
- **Color wheel overlap fixed** — The hue ring is drawn on top of the saturation/lightness square so the square corners no longer cover the ring.
|
|
84
|
+
- **Inspiration palette selection cleared** — Picking a theme color from the wheel deselects any previously selected inspiration swatch.
|
|
85
|
+
- **Debug telemetry removed** — Temporary boot-time logging and `MutationObserver` instrumentation have been cleaned out.
|
|
86
|
+
- **Per-part blur isolated** — Blur is applied on `::before` underlays so it never traps the host's fixed-position settings dialog.
|
|
212
87
|
|
|
213
88
|
## Installation
|
|
214
89
|
|
|
215
90
|
### Method 1: npm install (Recommended)
|
|
216
91
|
|
|
217
|
-
Install the plugin directly from GitHub into your Web profile:
|
|
218
|
-
|
|
219
92
|
```sh
|
|
220
93
|
dsh plugin --profile web add github:Tkingxiao/dsh-any-background
|
|
221
|
-
# or, if
|
|
94
|
+
# or, if published to the registry:
|
|
222
95
|
dsh plugin --profile web add dsh-any-background
|
|
223
96
|
```
|
|
224
97
|
|
|
225
|
-
Then launch
|
|
98
|
+
Then launch:
|
|
226
99
|
|
|
227
100
|
```sh
|
|
228
101
|
dsh web
|
|
229
102
|
```
|
|
230
103
|
|
|
231
|
-
The plugin
|
|
104
|
+
The plugin appears as a **"Theme"** section in Settings.
|
|
232
105
|
|
|
233
106
|
### Method 2: npx (No Global Install)
|
|
234
107
|
|
|
235
|
-
If you don't have `dsh` installed globally, use `npx`:
|
|
236
|
-
|
|
237
108
|
```sh
|
|
238
109
|
npx @deepseek-ai/dsh plugin --profile web add github:Tkingxiao/dsh-any-background
|
|
239
|
-
# or:
|
|
240
|
-
npx @deepseek-ai/dsh plugin --profile web add dsh-any-background
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
Then launch:
|
|
244
|
-
|
|
245
|
-
```sh
|
|
246
110
|
npx @deepseek-ai/dsh web
|
|
247
111
|
```
|
|
248
112
|
|
|
249
113
|
### Method 3: Local Build (Development)
|
|
250
114
|
|
|
251
|
-
The `lib/` directory is committed, so installs need no build step. To rebuild after
|
|
252
|
-
editing `src/`, run the bundle script (needs Node + pnpm):
|
|
115
|
+
The `lib/` directory is committed, so installs need no build step. To rebuild after editing `src/`:
|
|
253
116
|
|
|
254
117
|
```sh
|
|
255
|
-
# 1. Clone this repo
|
|
256
118
|
git clone https://github.com/Tkingxiao/dsh-any-background.git
|
|
257
119
|
cd dsh-any-background
|
|
258
|
-
|
|
259
|
-
# 2. Install the build tool (also pulls the @deepseek-ai/dsh-home-paths runtime dep)
|
|
260
120
|
pnpm install
|
|
261
|
-
|
|
262
|
-
# 3. Rebuild lib/
|
|
263
121
|
pnpm run bundle
|
|
264
|
-
|
|
265
|
-
# 4. Install the plugin into the web profile from the local checkout
|
|
266
|
-
# (`dsh plugin add` wraps `pnpm add <dir>`, so point it at this directory)
|
|
267
122
|
pnpm dsh plugin --profile web add "dsh-any-background"
|
|
268
|
-
|
|
269
|
-
# 5. Launch
|
|
270
123
|
pnpm dsh web
|
|
271
124
|
```
|
|
272
125
|
|
|
273
126
|
## Compatibility
|
|
274
127
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
- **[`dsh web`](https://github.com/deepseek-ai/deepseek-harness)** — Web profile, full support.
|
|
278
|
-
- **[deepseek-harness-desktop](https://github.com/anywhere-labs/deepseek-harness-desktop)** — supported, but there is a known Electron packaging issue: the **left sidebar and the center area opacity are inverted** (the sidebar looks more transparent than the center and vice versa). This is a client-side packaging bug, not a plugin bug — we are waiting for the desktop client to be updated to fix it.
|
|
279
|
-
|
|
280
|
-
## Dependencies
|
|
281
|
-
|
|
282
|
-
| Package | Purpose |
|
|
283
|
-
|---------|---------|
|
|
284
|
-
| `@deepseek-ai/cordis` | Plugin framework (Cordis) |
|
|
285
|
-
| `@deepseek-ai/dsh-home-paths` | Resolve the DSH data home for the persistence store |
|
|
286
|
-
| `@deepseek-ai/dsh-client-runtime` | Client runtime + `defineStore` |
|
|
287
|
-
| `@deepseek-ai/dsh-client-locale` | i18n (Chinese/English) |
|
|
288
|
-
| `@deepseek-ai/dsh-client-ui-theme` | Theme service (register/setTheme/overrideTokens) |
|
|
289
|
-
| `@deepseek-ai/dsh-invariants` | Package invariant companion |
|
|
290
|
-
| `react` ^18.2.0 | UI rendering |
|
|
128
|
+
- **[`dsh web`](https://github.com/deepseek-ai/deepseek-harness)** — Full support.
|
|
129
|
+
- **[deepseek-harness-desktop](https://github.com/anywhere-labs/deepseek-harness-desktop)** — Supported; a known Electron packaging issue makes the left sidebar and center area opacity appear inverted — awaiting a desktop-client update to fix it.
|
|
291
130
|
|
|
292
131
|
## Star History
|
|
293
132
|
|