dsh-concierge 0.19.0 → 0.20.4
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/CHANGELOG.md +1473 -1372
- package/client.js +5580 -5602
- package/cordis.patch.yml +4 -4
- package/docs/DETAIL.md +129 -129
- package/docs/DETAIL.zh.md +135 -135
- package/docs/GLASS-SURFACES.md +3 -3
- package/docs/RESIZE-BAND.md +101 -101
- package/index.js +2700 -2700
- package/package.json +1 -1
package/cordis.patch.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# dsh-concierge: settings page that checks app and plugin updates.
|
|
2
|
-
- insert:
|
|
3
|
-
- id: dsh-concierge
|
|
4
|
-
name: 'dsh-concierge'
|
|
1
|
+
# dsh-concierge: settings page that checks app and plugin updates.
|
|
2
|
+
- insert:
|
|
3
|
+
- id: dsh-concierge
|
|
4
|
+
name: 'dsh-concierge'
|
package/docs/DETAIL.md
CHANGED
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
# Maintenance center
|
|
2
|
-
|
|
3
|
-
Settings → Maintenance center is split into five tabs: **Update** (app version, updates and the auto-update switch), **Plugins** (installed list, search, update / rollback / enable / uninstall), **Tools** (the safety switch at the top, then GitHub sources, install from npm, the GitHub token and the folder shortcuts — every input and the open-plugins / open-config / open-safe-mode buttons live here), **Performance** (FPS, long tasks and the degrade switches), **Typewriter** (gradual reveal, stream throttle and speed) and **About** (intro, version and a collapsible changelog).
|
|
4
|
-
|
|
5
|
-
Versioning: every release bumps the last digit (`0.1.1` → `0.1.2` → …). The changelog lives in `CHANGELOG.md` at the repo root; the About page reads it and `package.json` from the Host, so no code changes are needed for a release note.
|
|
6
|
-
|
|
7
|
-
## What it checks
|
|
8
|
-
|
|
9
|
-
- **App**: reads `app-update.yml` from the installed desktop app's `resources` directory, follows the generic update feed it names (for example `https://download.deepseek.com/dsh-desk/feeds/win-x64/nightly.yml`) and compares the feed's `version` with the installed app version. When a new version exists, the desktop card shows **Check again / Update / Cancel**: Update calls the shell's own updater (`window.dshDesktop.updates.open()`), and the panel itself never opens a window; Cancel only hides the card until the next check. The Web surface has no native updater and falls back to the download page. The card also links to the GitHub releases page for a manual download.
|
|
10
|
-
- **npm plugins**: asks the plugin manager's `listVersions` for the installed registry copy, using the same registry and compatibility checks the plugin manager uses.
|
|
11
|
-
- **GitHub plugins**: for a plugin installed from a Git repository, asks GitHub for the latest release tag (falling back to tags), resolves the tag to a full commit, and compares that version with the installed one.
|
|
12
|
-
|
|
13
|
-
## Updating
|
|
14
|
-
|
|
15
|
-
The **Update** button calls the plugin manager's `updateBundle`, so pnpm, the compatibility check, rollback of a failed installation and the restart outcome are owned by the plugin manager. A registry plugin updates to the exact newer version. A GitHub plugin updates to the Git spec that pins the resolved commit. The page reports when a restart is required.
|
|
16
|
-
|
|
17
|
-
**Update all** runs the same operation for every plugin that reports an update, one at a time.
|
|
18
|
-
|
|
19
|
-
**Auto-update** applies the same operation automatically after a check that finds updates. The switch is stored in the browser, and is on by default.
|
|
20
|
-
|
|
21
|
-
When a batch update finishes (auto-update or **Update all**), a result banner appears at the top of the page: one row per plugin with its version change and **Updated / Failed**, plus a hint to restart DSH. **Got it** dismisses it. The banner lives in the frame-wide overlay, so it survives closing the settings page until dismissed.
|
|
22
|
-
|
|
23
|
-
A single update uses the same top popup: with a restart it reads "Update finished — restart required" with a **Restart app** button; without one it reads "Update finished" with a **Reload UI** button. The detail names the plugin and its new version, and **Got it** dismisses it.
|
|
24
|
-
|
|
25
|
-
A detected update is announced as the same top banner, never as a popup: **Update available** with the version change and **Update / Got it**; only pressing Update enters the desktop shell's own update flow.
|
|
26
|
-
|
|
27
|
-
The app itself is only shown as updatable when the desktop shell reports an update (a newer feed/mirror version alone does not count), and only then does the Update button call the shell's updater.
|
|
28
|
-
|
|
29
|
-
Once the app update starts downloading, the top banner switches to a progress state: **Downloading update** with the version and percentage, and a 3px progress bar along the banner's bottom edge (light track, brand fill). Installing/starting shows a looping animation instead of a percentage, and the banner disappears when the phase ends.
|
|
30
|
-
|
|
31
|
-
Each npm-installed plugin row also has a **Rollback** button that lists every published version on the mirror (up to 50, current version marked); **Install** switches to that version. Rollback removes and reinstalls the package (the manager's update API only accepts newer versions) and restores the previous version if the install fails. GitHub and local installs are not supported yet.
|
|
32
|
-
|
|
33
|
-
When an update needs a restart (host-module plugins), the notice and the batch result banner offer **Restart app**. The sidebar foot also carries a **Reload & restart** dropdown with **Reload UI** and **Restart app** inside it.
|
|
34
|
-
|
|
35
|
-
- **Reload UI** only reloads the page and client plugins (`location.reload()`).
|
|
36
|
-
- **Restart app** calls the update center's own `POST /dsh-concierge/restart`: the Host creates a PowerShell helper through WMI (outside the app's process tree), which kills the Electron main process and relaunches the app, retrying up to 3 times and logging to `~/.dsh/update-center/restart.log`. It no longer depends on dsh-desktop-restart.
|
|
37
|
-
|
|
38
|
-
## GitHub sources (multiple)
|
|
39
|
-
|
|
40
|
-
The plugins tab starts with a **GitHub sources** card: enter `owner/repo` or a full GitHub URL and press **Add**; any number of repos can be watched. Each source is checked against its latest release (falling back to tags):
|
|
41
|
-
|
|
42
|
-
- not installed → "latest x.y.z · not installed" with an **Install** button;
|
|
43
|
-
- installed → "latest · installed version", marked **update** when newer, with a **Reinstall** button;
|
|
44
|
-
- **Remove** only drops the watch entry, it never uninstalls the plugin.
|
|
45
|
-
|
|
46
|
-
The list lives in `~/.dsh/update-center/github-sources.json`.
|
|
47
|
-
|
|
48
|
-
Some plugins install in several steps (install, restart, configure in settings, restart again — `XRH66/dsh-memory-starter` is one). Each source row has a **Steps** button: it reads the numbered items of the repository README's quick-start / install section and shows them as a checklist with **Restart app** and **Open repo** buttons; the checklist opens automatically after installing from that row.
|
|
49
|
-
|
|
50
|
-
## Install from Git
|
|
51
|
-
|
|
52
|
-
The plugins tab has an input: paste a GitHub URL (`https://github.com/owner/repo` or `github:owner/repo`) and it installs. The install resolves the repository HEAD to a full commit first, so the plugin lands as a pinned Git install that later checks and rollbacks can recognise.
|
|
53
|
-
|
|
54
|
-
Git plugins follow "GitHub releases (falling back to tags) → download → install": updates call `updateBundle` with the pinned spec, and fall back to "remove + reinstall from the target spec" when the manager refuses the spec form. Rollback lists up to 100 tags, newest first.
|
|
55
|
-
|
|
56
|
-
## Local plugins
|
|
57
|
-
|
|
58
|
-
Local installs (`link:` / `file:`) have no registry and no release feed, so the source itself is inspected:
|
|
59
|
-
|
|
60
|
-
- a source directory's `package.json` version is compared with the installed one;
|
|
61
|
-
- a Git checkout records its current commit, and a changed commit or version offers a reinstall;
|
|
62
|
-
- `link:` installs are already live, so they only report that;
|
|
63
|
-
- a `.tgz` source has its inner `package.json` version read and its size+mtime remembered; a replaced tarball reports "source tarball updated" and can be reinstalled in one click (remove + install from the original spec).
|
|
64
|
-
|
|
65
|
-
## Install and uninstall
|
|
66
|
-
|
|
67
|
-
- **Install from npm**: a card on the plugins tab takes a package name (`dsh-pet`) or name plus version (`dsh-pet@0.4.9`).
|
|
68
|
-
- **Uninstall**: every row ends with **Uninstall**; the first click becomes **Confirm uninstall?** and only the second one removes the plugin. The maintenance center itself has no uninstall button.
|
|
69
|
-
- **Ignore this version**: skip an update without disabling the plugin; the row then shows "Ignored x.y.z" with an **Unignore** button. The list is stored in the browser.
|
|
70
|
-
- **What's new**: GitHub-installed plugins with release notes get a **What's new** toggle that expands the release body.
|
|
71
|
-
- **Diagnosis**: common plugin-manager codes (`invalid-spec`, `incompatible-version`, `pendingBuilds`, `not-removable`, `bundle-in-use`, …) are translated into a plain-language hint and next step.
|
|
72
|
-
|
|
73
|
-
## Safe mode
|
|
74
|
-
|
|
75
|
-
When a broken plugin keeps the app from starting, the plugin itself never gets to run — so on startup it writes scripts to `~/.dsh/update-center/`:
|
|
76
|
-
|
|
77
|
-
- **`safe-mode.cmd`** backs up the profile's `package.json` and `cordis.patch.yml` into `safe-backup/`, filters `dsh.profile.bundles` down to official bundles (`@deepseek-ai/*`), then launches the app;
|
|
78
|
-
- **`restore-mode.cmd`** restores the backup and restarts;
|
|
79
|
-
- **`safe-launch.cmd`** is the automatic version: it starts the app, watches it for 30 seconds, and if the process did not survive it backs up, switches to safe mode and starts again.
|
|
80
|
-
|
|
81
|
-
Point the desktop shortcut at `safe-launch.cmd` and a failed start lands in safe mode on its own.
|
|
82
|
-
|
|
83
|
-
The **Automatic safe mode** switch in the Tools tab's Safety card (stored as `safeModeAuto` in `~/.dsh/update-center/settings.json`, on by default) controls that behaviour: on, `safe-launch.cmd` watches the first 30 seconds and falls back; off, it only starts the app. Flipping it rewrites the scripts immediately.
|
|
84
|
-
|
|
85
|
-
All scripts need the app closed and no administrator rights; the `.ps1` files carry a UTF-8 BOM so Windows PowerShell 5.1 reads the Chinese text correctly.
|
|
86
|
-
|
|
87
|
-
## GitHub token
|
|
88
|
-
|
|
89
|
-
The update tab takes a GitHub token (`ghp_…` / `github_pat_…`), stored in `~/.dsh/update-center/settings.json`:
|
|
90
|
-
|
|
91
|
-
- without one the GitHub API allows 60 requests/hour per IP, which a few sources exhaust;
|
|
92
|
-
- with one it is 5,000 requests/hour per account.
|
|
93
|
-
|
|
94
|
-
A public-repo read-only token is enough. The `GITHUB_TOKEN` / `GH_TOKEN` environment variables take precedence. Saving applies immediately, no restart.
|
|
95
|
-
|
|
96
|
-
## Background check
|
|
97
|
-
|
|
98
|
-
The client plugin stays loaded and checks for updates every 10 minutes; when plugins can be updated it shows a top banner ("N plugin update(s) available"), at most once an hour, dismissible with **Got it**.
|
|
99
|
-
|
|
100
|
-
## Enable, disable and roll back
|
|
101
|
-
|
|
102
|
-
Every plugin row also carries **Enable / Disable**, which goes through the plugin manager's `setPluginEnabled` and applies immediately (a few plugins need a restart). Registry plugins can roll back to any published version (up to 100); GitHub plugins roll back to any tag in the repository; local directory or tarball installs have no version list to roll back to.
|
|
103
|
-
|
|
104
|
-
If a plugin failed to load after the last update, the Host disables it on the next start and the page shows a banner ("N plugins failed to load and were disabled") with **Enable all**.
|
|
105
|
-
|
|
106
|
-
The plugins tab header has **Open plugins folder** and **Open config**, which open the profile's `node_modules` and `cordis.patch.yml`.
|
|
107
|
-
|
|
108
|
-
## Chat performance
|
|
109
|
-
|
|
110
|
-
Four numbers: FPS (5-second average, shown as "current / screen refresh" — the ceiling follows the display refresh rate, detected among 60/75/90/100/120/144/165/240 or set by hand in the **Refresh rate** row), rendered chat rows, long-task count and total blocking time over the last 10 seconds, plus an 80-second bar history of long tasks and its peak. Four switches:
|
|
111
|
-
|
|
112
|
-
- **Auto degrade**: below 75% of the refresh rate for two seconds, `<html>` gets `data-dsh-perf="low"`, which drops animations, transitions, `backdrop-filter` and shadows inside the conversation; three seconds above 90% restore it.
|
|
113
|
-
- **Long-chat lite**: above 60 rows, `data-dsh-perf="long"` drops animations and transitions in the chat flow.
|
|
114
|
-
- **Force lite**: always stay in lite mode.
|
|
115
|
-
- **Skip offscreen rows**: enabled only above 40 rendered rows; each row gets `content-visibility: auto` with its **measured height** in `contain-intrinsic-size: auto <height>px` (not a fixed placeholder), applied from idle time in small slices so the scan itself does not jank; turn it off if scrolling ever misbehaves.
|
|
116
|
-
|
|
117
|
-
The conversation area no longer uses `backdrop-filter` at all: it sits on a static pre-blurred copy of the wallpaper (`#dsh-concierge-frost`), which is rasterised once and then only composited. Streaming therefore costs no extra blur work, and there is no runtime toggle to drop.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
## Typewriter
|
|
121
|
-
|
|
122
|
-
The page ends with a **Typewriter** card: a reveal switch and a speed slider (10–240 characters per second). It wraps the built-in `assistant-step` renderer and only paces the streaming text block; reasoning, tool rows and images stay native. The inner render commits at most every 50ms, and it stands down on low frame rates.
|
|
123
|
-
|
|
124
|
-
## Limits
|
|
125
|
-
|
|
126
|
-
- The app itself is never replaced from this page.
|
|
127
|
-
- GitHub requests are unauthenticated unless `GITHUB_TOKEN` or `GH_TOKEN` is set in the Host environment, so they share GitHub's anonymous rate limit.
|
|
128
|
-
- Plugins installed from a local directory or tarball are listed but not checked.
|
|
129
|
-
- Results are cached for five minutes; **Check for updates** bypasses the cache.
|
|
1
|
+
# Maintenance center
|
|
2
|
+
|
|
3
|
+
Settings → Maintenance center is split into five tabs: **Update** (app version, updates and the auto-update switch), **Plugins** (installed list, search, update / rollback / enable / uninstall), **Tools** (the safety switch at the top, then GitHub sources, install from npm, the GitHub token and the folder shortcuts — every input and the open-plugins / open-config / open-safe-mode buttons live here), **Performance** (FPS, long tasks and the degrade switches), **Typewriter** (gradual reveal, stream throttle and speed) and **About** (intro, version and a collapsible changelog).
|
|
4
|
+
|
|
5
|
+
Versioning: every release bumps the last digit (`0.1.1` → `0.1.2` → …). The changelog lives in `CHANGELOG.md` at the repo root; the About page reads it and `package.json` from the Host, so no code changes are needed for a release note.
|
|
6
|
+
|
|
7
|
+
## What it checks
|
|
8
|
+
|
|
9
|
+
- **App**: reads `app-update.yml` from the installed desktop app's `resources` directory, follows the generic update feed it names (for example `https://download.deepseek.com/dsh-desk/feeds/win-x64/nightly.yml`) and compares the feed's `version` with the installed app version. When a new version exists, the desktop card shows **Check again / Update / Cancel**: Update calls the shell's own updater (`window.dshDesktop.updates.open()`), and the panel itself never opens a window; Cancel only hides the card until the next check. The Web surface has no native updater and falls back to the download page. The card also links to the GitHub releases page for a manual download.
|
|
10
|
+
- **npm plugins**: asks the plugin manager's `listVersions` for the installed registry copy, using the same registry and compatibility checks the plugin manager uses.
|
|
11
|
+
- **GitHub plugins**: for a plugin installed from a Git repository, asks GitHub for the latest release tag (falling back to tags), resolves the tag to a full commit, and compares that version with the installed one.
|
|
12
|
+
|
|
13
|
+
## Updating
|
|
14
|
+
|
|
15
|
+
The **Update** button calls the plugin manager's `updateBundle`, so pnpm, the compatibility check, rollback of a failed installation and the restart outcome are owned by the plugin manager. A registry plugin updates to the exact newer version. A GitHub plugin updates to the Git spec that pins the resolved commit. The page reports when a restart is required.
|
|
16
|
+
|
|
17
|
+
**Update all** runs the same operation for every plugin that reports an update, one at a time.
|
|
18
|
+
|
|
19
|
+
**Auto-update** applies the same operation automatically after a check that finds updates. The switch is stored in the browser, and is on by default.
|
|
20
|
+
|
|
21
|
+
When a batch update finishes (auto-update or **Update all**), a result banner appears at the top of the page: one row per plugin with its version change and **Updated / Failed**, plus a hint to restart DSH. **Got it** dismisses it. The banner lives in the frame-wide overlay, so it survives closing the settings page until dismissed.
|
|
22
|
+
|
|
23
|
+
A single update uses the same top popup: with a restart it reads "Update finished — restart required" with a **Restart app** button; without one it reads "Update finished" with a **Reload UI** button. The detail names the plugin and its new version, and **Got it** dismisses it.
|
|
24
|
+
|
|
25
|
+
A detected update is announced as the same top banner, never as a popup: **Update available** with the version change and **Update / Got it**; only pressing Update enters the desktop shell's own update flow.
|
|
26
|
+
|
|
27
|
+
The app itself is only shown as updatable when the desktop shell reports an update (a newer feed/mirror version alone does not count), and only then does the Update button call the shell's updater.
|
|
28
|
+
|
|
29
|
+
Once the app update starts downloading, the top banner switches to a progress state: **Downloading update** with the version and percentage, and a 3px progress bar along the banner's bottom edge (light track, brand fill). Installing/starting shows a looping animation instead of a percentage, and the banner disappears when the phase ends.
|
|
30
|
+
|
|
31
|
+
Each npm-installed plugin row also has a **Rollback** button that lists every published version on the mirror (up to 50, current version marked); **Install** switches to that version. Rollback removes and reinstalls the package (the manager's update API only accepts newer versions) and restores the previous version if the install fails. GitHub and local installs are not supported yet.
|
|
32
|
+
|
|
33
|
+
When an update needs a restart (host-module plugins), the notice and the batch result banner offer **Restart app**. The sidebar foot also carries a **Reload & restart** dropdown with **Reload UI** and **Restart app** inside it.
|
|
34
|
+
|
|
35
|
+
- **Reload UI** only reloads the page and client plugins (`location.reload()`).
|
|
36
|
+
- **Restart app** calls the update center's own `POST /dsh-concierge/restart`: the Host creates a PowerShell helper through WMI (outside the app's process tree), which kills the Electron main process and relaunches the app, retrying up to 3 times and logging to `~/.dsh/update-center/restart.log`. It no longer depends on dsh-desktop-restart.
|
|
37
|
+
|
|
38
|
+
## GitHub sources (multiple)
|
|
39
|
+
|
|
40
|
+
The plugins tab starts with a **GitHub sources** card: enter `owner/repo` or a full GitHub URL and press **Add**; any number of repos can be watched. Each source is checked against its latest release (falling back to tags):
|
|
41
|
+
|
|
42
|
+
- not installed → "latest x.y.z · not installed" with an **Install** button;
|
|
43
|
+
- installed → "latest · installed version", marked **update** when newer, with a **Reinstall** button;
|
|
44
|
+
- **Remove** only drops the watch entry, it never uninstalls the plugin.
|
|
45
|
+
|
|
46
|
+
The list lives in `~/.dsh/update-center/github-sources.json`.
|
|
47
|
+
|
|
48
|
+
Some plugins install in several steps (install, restart, configure in settings, restart again — `XRH66/dsh-memory-starter` is one). Each source row has a **Steps** button: it reads the numbered items of the repository README's quick-start / install section and shows them as a checklist with **Restart app** and **Open repo** buttons; the checklist opens automatically after installing from that row.
|
|
49
|
+
|
|
50
|
+
## Install from Git
|
|
51
|
+
|
|
52
|
+
The plugins tab has an input: paste a GitHub URL (`https://github.com/owner/repo` or `github:owner/repo`) and it installs. The install resolves the repository HEAD to a full commit first, so the plugin lands as a pinned Git install that later checks and rollbacks can recognise.
|
|
53
|
+
|
|
54
|
+
Git plugins follow "GitHub releases (falling back to tags) → download → install": updates call `updateBundle` with the pinned spec, and fall back to "remove + reinstall from the target spec" when the manager refuses the spec form. Rollback lists up to 100 tags, newest first.
|
|
55
|
+
|
|
56
|
+
## Local plugins
|
|
57
|
+
|
|
58
|
+
Local installs (`link:` / `file:`) have no registry and no release feed, so the source itself is inspected:
|
|
59
|
+
|
|
60
|
+
- a source directory's `package.json` version is compared with the installed one;
|
|
61
|
+
- a Git checkout records its current commit, and a changed commit or version offers a reinstall;
|
|
62
|
+
- `link:` installs are already live, so they only report that;
|
|
63
|
+
- a `.tgz` source has its inner `package.json` version read and its size+mtime remembered; a replaced tarball reports "source tarball updated" and can be reinstalled in one click (remove + install from the original spec).
|
|
64
|
+
|
|
65
|
+
## Install and uninstall
|
|
66
|
+
|
|
67
|
+
- **Install from npm**: a card on the plugins tab takes a package name (`dsh-pet`) or name plus version (`dsh-pet@0.4.9`).
|
|
68
|
+
- **Uninstall**: every row ends with **Uninstall**; the first click becomes **Confirm uninstall?** and only the second one removes the plugin. The maintenance center itself has no uninstall button.
|
|
69
|
+
- **Ignore this version**: skip an update without disabling the plugin; the row then shows "Ignored x.y.z" with an **Unignore** button. The list is stored in the browser.
|
|
70
|
+
- **What's new**: GitHub-installed plugins with release notes get a **What's new** toggle that expands the release body.
|
|
71
|
+
- **Diagnosis**: common plugin-manager codes (`invalid-spec`, `incompatible-version`, `pendingBuilds`, `not-removable`, `bundle-in-use`, …) are translated into a plain-language hint and next step.
|
|
72
|
+
|
|
73
|
+
## Safe mode
|
|
74
|
+
|
|
75
|
+
When a broken plugin keeps the app from starting, the plugin itself never gets to run — so on startup it writes scripts to `~/.dsh/update-center/`:
|
|
76
|
+
|
|
77
|
+
- **`safe-mode.cmd`** backs up the profile's `package.json` and `cordis.patch.yml` into `safe-backup/`, filters `dsh.profile.bundles` down to official bundles (`@deepseek-ai/*`), then launches the app;
|
|
78
|
+
- **`restore-mode.cmd`** restores the backup and restarts;
|
|
79
|
+
- **`safe-launch.cmd`** is the automatic version: it starts the app, watches it for 30 seconds, and if the process did not survive it backs up, switches to safe mode and starts again.
|
|
80
|
+
|
|
81
|
+
Point the desktop shortcut at `safe-launch.cmd` and a failed start lands in safe mode on its own.
|
|
82
|
+
|
|
83
|
+
The **Automatic safe mode** switch in the Tools tab's Safety card (stored as `safeModeAuto` in `~/.dsh/update-center/settings.json`, on by default) controls that behaviour: on, `safe-launch.cmd` watches the first 30 seconds and falls back; off, it only starts the app. Flipping it rewrites the scripts immediately.
|
|
84
|
+
|
|
85
|
+
All scripts need the app closed and no administrator rights; the `.ps1` files carry a UTF-8 BOM so Windows PowerShell 5.1 reads the Chinese text correctly.
|
|
86
|
+
|
|
87
|
+
## GitHub token
|
|
88
|
+
|
|
89
|
+
The update tab takes a GitHub token (`ghp_…` / `github_pat_…`), stored in `~/.dsh/update-center/settings.json`:
|
|
90
|
+
|
|
91
|
+
- without one the GitHub API allows 60 requests/hour per IP, which a few sources exhaust;
|
|
92
|
+
- with one it is 5,000 requests/hour per account.
|
|
93
|
+
|
|
94
|
+
A public-repo read-only token is enough. The `GITHUB_TOKEN` / `GH_TOKEN` environment variables take precedence. Saving applies immediately, no restart.
|
|
95
|
+
|
|
96
|
+
## Background check
|
|
97
|
+
|
|
98
|
+
The client plugin stays loaded and checks for updates every 10 minutes; when plugins can be updated it shows a top banner ("N plugin update(s) available"), at most once an hour, dismissible with **Got it**.
|
|
99
|
+
|
|
100
|
+
## Enable, disable and roll back
|
|
101
|
+
|
|
102
|
+
Every plugin row also carries **Enable / Disable**, which goes through the plugin manager's `setPluginEnabled` and applies immediately (a few plugins need a restart). Registry plugins can roll back to any published version (up to 100); GitHub plugins roll back to any tag in the repository; local directory or tarball installs have no version list to roll back to.
|
|
103
|
+
|
|
104
|
+
If a plugin failed to load after the last update, the Host disables it on the next start and the page shows a banner ("N plugins failed to load and were disabled") with **Enable all**.
|
|
105
|
+
|
|
106
|
+
The plugins tab header has **Open plugins folder** and **Open config**, which open the profile's `node_modules` and `cordis.patch.yml`.
|
|
107
|
+
|
|
108
|
+
## Chat performance
|
|
109
|
+
|
|
110
|
+
Four numbers: FPS (5-second average, shown as "current / screen refresh" — the ceiling follows the display refresh rate, detected among 60/75/90/100/120/144/165/240 or set by hand in the **Refresh rate** row), rendered chat rows, long-task count and total blocking time over the last 10 seconds, plus an 80-second bar history of long tasks and its peak. Four switches:
|
|
111
|
+
|
|
112
|
+
- **Auto degrade**: below 75% of the refresh rate for two seconds, `<html>` gets `data-dsh-perf="low"`, which drops animations, transitions, `backdrop-filter` and shadows inside the conversation; three seconds above 90% restore it.
|
|
113
|
+
- **Long-chat lite**: above 60 rows, `data-dsh-perf="long"` drops animations and transitions in the chat flow.
|
|
114
|
+
- **Force lite**: always stay in lite mode.
|
|
115
|
+
- **Skip offscreen rows**: enabled only above 40 rendered rows; each row gets `content-visibility: auto` with its **measured height** in `contain-intrinsic-size: auto <height>px` (not a fixed placeholder), applied from idle time in small slices so the scan itself does not jank; turn it off if scrolling ever misbehaves.
|
|
116
|
+
|
|
117
|
+
The conversation area no longer uses `backdrop-filter` at all: it sits on a static pre-blurred copy of the wallpaper (`#dsh-concierge-frost`), which is rasterised once and then only composited. Streaming therefore costs no extra blur work, and there is no runtime toggle to drop.
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## Typewriter
|
|
121
|
+
|
|
122
|
+
The page ends with a **Typewriter** card: a reveal switch and a speed slider (10–240 characters per second). It wraps the built-in `assistant-step` renderer and only paces the streaming text block; reasoning, tool rows and images stay native. The inner render commits at most every 50ms, and it stands down on low frame rates.
|
|
123
|
+
|
|
124
|
+
## Limits
|
|
125
|
+
|
|
126
|
+
- The app itself is never replaced from this page.
|
|
127
|
+
- GitHub requests are unauthenticated unless `GITHUB_TOKEN` or `GH_TOKEN` is set in the Host environment, so they share GitHub's anonymous rate limit.
|
|
128
|
+
- Plugins installed from a local directory or tarball are listed but not checked.
|
|
129
|
+
- Results are cached for five minutes; **Check for updates** bypasses the cache.
|
package/docs/DETAIL.zh.md
CHANGED
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
# 维护中心
|
|
2
|
-
|
|
3
|
-
设置 → 维护中心 分成五个标签页:**更新**(应用本体版本与更新、自动更新开关)、**插件**(已装插件列表、搜索、更新 / 回退 / 启停 / 卸载)、**工具**(安全开关在最上面,下面依次是 GitHub 来源、从 npm 安装、GitHub Token、目录与配置——所有输入框和「打开插件目录 / 打开配置 / 打开安全模式目录」都集中在这里)、**性能**(帧率、长任务与降级开关)、**打字机**(逐字显示、流式节流与速度)、**关于**(介绍、版本号、可折叠的更新日志)。
|
|
4
|
-
|
|
5
|
-
版本号规则:每次发版最后一位 +1(`0.1.1` → `0.1.2` → …),更新日志写在仓库根的 `CHANGELOG.md`,「关于」页直接从宿主读它和 `package.json`,不用改代码。
|
|
6
|
-
|
|
7
|
-
## 检查什么
|
|
8
|
-
|
|
9
|
-
- **应用本体**:读取桌面版安装目录 `resources` 下的 `app-update.yml`,按它声明的通用更新源(例如 `https://download.deepseek.com/dsh-desk/feeds/win-x64/nightly.yml`)取最新 `version`,与已安装版本比较。发现新版本时,桌面端卡片显示「重新检测 / 更新 / 取消」:更新调用桌面壳自己的更新流程(`window.dshDesktop.updates.open()`),面板自身不会弹出任何窗口;取消只是收起这张卡片,下次检查再出现。Web 端没有原生更新器,退化为打开下载页。卡片上另有一个 GitHub 发布页链接,方便手动下载。
|
|
10
|
-
- **npm 插件**:调用插件管理器的 `listVersions`,用与插件管理器相同的源和兼容性检查读取新版本。
|
|
11
|
-
- **GitHub 插件**:对从 Git 仓库安装的插件,向 GitHub 查询最新发布标签(没有发布时退回标签列表),把标签解析成完整 commit,再与已安装版本比较。
|
|
12
|
-
|
|
13
|
-
## 更新
|
|
14
|
-
|
|
15
|
-
「更新」按钮调用插件管理器的 `updateBundle`,pnpm、兼容性检查、失败回滚和重启结论都由插件管理器负责。npm 插件更新到指定的新版本;GitHub 插件更新到固定了目标 commit 的 Git spec。需要重启时页面会说明。
|
|
16
|
-
|
|
17
|
-
「全部更新」会对每个有更新的插件依次执行同样的操作。
|
|
18
|
-
|
|
19
|
-
「自动更新」开关打开后,每次检查发现有可更新项就自动执行全部更新;开关状态保存在浏览器本地,默认开启。
|
|
20
|
-
|
|
21
|
-
应用本体只在桌面端自己报告有更新时才显示新版本(镜像或官方 feed 上出现新版本、但桌面端没有更新时不算),也只有这时才提供「更新」按钮去调用桌面壳的更新入口。自动更新关闭时发现插件可更新,同样会在页面顶部以横幅提示。
|
|
22
|
-
|
|
23
|
-
顶部横幅显示「发现新版本」和版本变化,带「更新」「知道了」两个按钮;不弹窗,点「更新」才进入桌面壳自己的更新流程。
|
|
24
|
-
|
|
25
|
-
应用更新开始下载后,顶部横幅会切换成进度样式:标题「正在下载更新」,下一行是版本号和百分比,卡片底边嵌一条 3px 进度条(浅色轨道 + 品牌色填充)。安装 / 启动阶段没有百分比,底边改成来回滚动的动画;结束或失败后横幅消失。
|
|
26
|
-
|
|
27
|
-
npm 安装的插件行尾还有一个「回退」按钮,展开后列出该插件在镜像上的全部已发布版本(最多 50 个,当前版本会标出来),点「安装」就能切到任意旧版本。回退走「先移除再安装」的路径(pluginManager 的更新接口只接受更新的版本),安装失败时会自动装回原来的版本;GitHub 和本地安装的插件暂不支持回退。
|
|
28
|
-
|
|
29
|
-
更新需要重启时(host 模块类插件),通知条和批量更新的结果横幅上会出现「重启应用」按钮;侧边栏底部有一个「刷新与重启」下拉,里面是「刷新界面」和「重启应用」。
|
|
30
|
-
|
|
31
|
-
- **刷新界面**:只重载页面和客户端插件(`location.reload()`),不碰 Host;
|
|
32
|
-
- **重启应用**:调用更新中心自己的 `POST /dsh-concierge/restart`,由 Host 用 WMI 创建一个脱离应用进程树的 PowerShell 助手,先杀掉 Electron 主进程、再拉起应用;拉起失败会自动重试 3 次,过程写到 `~/.dsh/update-center/restart.log`。不再依赖 dsh-desktop-restart。
|
|
33
|
-
|
|
34
|
-
批量更新(自动更新或「全部更新」)完成后,页面顶部会弹出一条结果横幅:逐行列出插件的版本变化和「已更新 / 失败」,并提示重启 DSH 后生效;点「知道了」关闭。横幅挂在 frame 级浮层上,关掉设置页后仍然保留,直到手动关闭。
|
|
35
|
-
|
|
36
|
-
单个插件更新后同样走顶部弹窗:需要重启时标题是「更新完成,需要重启」,右侧「重启应用」;只需要刷新时标题是「更新完成」,右侧「刷新界面」。副行都是插件名和版本变化,不想现在动就点「知道了」。
|
|
37
|
-
|
|
38
|
-
## GitHub 来源(可添加多个)
|
|
39
|
-
|
|
40
|
-
插件页顶部有一张「GitHub 来源」卡片:输入 `owner/repo` 或完整 GitHub 地址点「添加」,可以加多个。每个来源会持续检测 GitHub 上的最新 release(没有 release 时退回 tags):
|
|
41
|
-
|
|
42
|
-
- 未安装的显示「最新 x.y.z · 未安装」,可以点「安装」;
|
|
43
|
-
- 已安装的显示「最新 · 已装版本」,有新版本时标「有更新」,可以点「重新安装」;
|
|
44
|
-
- 每行都有「移除」,只移除监控项,不会卸载插件。
|
|
45
|
-
|
|
46
|
-
来源列表存在 `~/.dsh/update-center/github-sources.json`。
|
|
47
|
-
|
|
48
|
-
有些插件是分步骤安装的(装完还要重启、去设置里配置、再重启验证,比如 `XRH66/dsh-memory-starter`)。每个来源行有一个「步骤」按钮:读仓库 README 里「快速开始 / 安装」章节的编号步骤,展开成清单,并附「重启应用」和「打开仓库」两个按钮;从来源行安装成功后会自动展开。
|
|
49
|
-
|
|
50
|
-
## 从 Git 安装
|
|
51
|
-
|
|
52
|
-
插件页顶部有一个输入框:填 GitHub 仓库地址(`https://github.com/owner/repo` 或 `github:owner/repo`)就能装。安装时会把仓库 HEAD 解析成完整 commit 再交给插件管理器,这样装出来的插件是「固定 commit 的 Git 安装」,之后能被更新检测和回退识别。装完自动出现在插件列表里,参与后续的检测与更新。
|
|
53
|
-
|
|
54
|
-
Git 插件走「GitHub releases(没有 release 时退回 tags)→ 下载 → 安装」的流程:更新调用 `updateBundle` 并带上固定 commit 的 spec;如果管理器因为 spec 形式不一致拒绝,会自动退回「移除 + 按目标 spec 重装」。回退时会列出仓库里最多 100 个 tag,按版本号排序。
|
|
55
|
-
|
|
56
|
-
## 本地插件
|
|
57
|
-
|
|
58
|
-
本地安装(`link:` / `file:`)的插件没有 registry,也没有 release feed,所以直接看源:
|
|
59
|
-
|
|
60
|
-
- 源是目录时,读它的 `package.json` 版本,比已装版本新就提示重装;
|
|
61
|
-
- 源是 Git 仓库时,记录当前提交;提交或版本变化时提示重装;
|
|
62
|
-
- `link:` 安装的代码本来就实时生效,只做提示,不提示重装;
|
|
63
|
-
- 源是压缩包(`.tgz`)时,读取包内 `package.json` 的版本;同时记录文件大小和修改时间,压缩包被替换时提示「源压缩包已更新」,可以一键重装(重装走「移除 + 按原 spec 安装」)。
|
|
64
|
-
|
|
65
|
-
## 安装与卸载
|
|
66
|
-
|
|
67
|
-
- **从 npm 安装**:插件页有一张卡片,填包名(`dsh-pet`)或包名加版本(`dsh-pet@0.4.9`)就能装。
|
|
68
|
-
- **卸载**:每个插件行尾有「卸载」,点一次变成「确认卸载?」再点才真的卸;维护中心自己那行没有卸载按钮。
|
|
69
|
-
- **忽略此版本**:不想升某个版本时点「忽略此版本」,之后显示「已忽略 x.y.z」,可以随时「取消忽略」;忽略记录存在浏览器本地。
|
|
70
|
-
- **更新内容**:GitHub 安装的插件如果有 release 说明,行上会多一个「更新内容」按钮,展开就是这段说明。
|
|
71
|
-
- **错误诊断**:安装/卸载失败时,常见的插件管理器错误码(`invalid-spec`、`incompatible-version`、`pendingBuilds`、`not-removable`、`bundle-in-use` 等)会直接翻成中文提示和下一步动作。
|
|
72
|
-
|
|
73
|
-
## 安全模式
|
|
74
|
-
|
|
75
|
-
如果某个插件损坏、应用起不来,插件本身也没机会运行——所以本插件在启动时会把几个脚本写到 `~/.dsh/update-center/`:
|
|
76
|
-
|
|
77
|
-
- **`safe-mode.cmd`**:双击后先把 profile 的 `package.json` 和 `cordis.patch.yml` 备份到 `safe-backup/`,再把 `dsh.profile.bundles` 过滤成只留官方插件(`@deepseek-ai/*`),然后启动应用;
|
|
78
|
-
- **`restore-mode.cmd`**:应用退出后双击,恢复备份并重启;
|
|
79
|
-
- **`safe-launch.cmd`**:**自动版**——启动应用后观察 30 秒,如果进程没活下来就判定启动失败,自动备份、切到安全模式再重启一次;启动正常则什么都不做。
|
|
80
|
-
|
|
81
|
-
把桌面快捷方式指向 `safe-launch.cmd`,以后应用起不来会自动落到安全模式,不用手动判断。
|
|
82
|
-
|
|
83
|
-
`safe-launch` 同时负责**自动恢复**:连续两次观察到启动正常后,自动把备份的插件配置放回去并重启一次(连续两次恢复失败后停止自动尝试;手动 `restore-mode` 会清零计数)。
|
|
84
|
-
|
|
85
|
-
「工具」页最上面的「安全」卡片里有一个 **自动安全模式** 开关(存在 `~/.dsh/update-center/settings.json` 的 `safeModeAuto`,默认开):开着时 `safe-launch.cmd` 会观察 30 秒并在失败时自动切安全模式;关掉后它只负责启动应用,不再自动切。开关一变,脚本会立刻重写,不需要重启。
|
|
86
|
-
|
|
87
|
-
所有脚本都要求应用已完全退出,不需要管理员权限;`.ps1` 带 UTF-8 BOM,Windows PowerShell 5.1 读中文不会乱码。
|
|
88
|
-
|
|
89
|
-
## GitHub Token
|
|
90
|
-
|
|
91
|
-
更新页可以填一个 GitHub token(`ghp_…` / `github_pat_…`),存在 `~/.dsh/update-center/settings.json`:
|
|
92
|
-
|
|
93
|
-
- 不带 token:GitHub API 每小时 60 次(按 IP),几条 GitHub 来源就够用完;
|
|
94
|
-
- 带 token:每小时 5000 次(按账号)。
|
|
95
|
-
|
|
96
|
-
只读公开仓库的 token 就够(classic 全不勾权限,或 fine-grained 只给 public repo 读)。环境变量 `GITHUB_TOKEN` / `GH_TOKEN` 优先级更高,设了环境变量时页面里的输入会被覆盖。保存后立即生效,不用重启。
|
|
97
|
-
|
|
98
|
-
## 后台检查
|
|
99
|
-
|
|
100
|
-
客户端插件常驻,每 10 分钟检查一次更新;发现可更新插件时在顶部弹一条「发现 N 个插件更新」,一小时内最多提示一次,点「知道了」收起。
|
|
101
|
-
|
|
102
|
-
## 插件启停与回退
|
|
103
|
-
|
|
104
|
-
每个插件行尾除了「更新 / 回退」,还有「启用 / 禁用」:禁用走 pluginManager 的 `setPluginEnabled`,立即生效(个别插件需要重启)。npm 插件可以回退到镜像上的任意历史版本(最多 100 个);GitHub 安装的插件可以回退到仓库里的任意 tag;本地目录或压缩包装的插件没有可回退的版本。
|
|
105
|
-
|
|
106
|
-
如果上次更新后某个插件加载失败,Host 会在下次启动时把它禁用;页面顶部会提示「有 N 个插件加载失败被禁用」并给出「全部启用」。
|
|
107
|
-
|
|
108
|
-
插件页右上角有「打开插件目录」和「打开配置」,直接打开 profile 的 `node_modules` 和 `cordis.patch.yml`。
|
|
109
|
-
|
|
110
|
-
## 聊天性能
|
|
111
|
-
|
|
112
|
-
统计四项:帧率(5 秒平均,显示为「当前 / 屏幕刷新率」——上限由屏幕刷新率决定,自动识别 60/75/90/100/120/144/165/240,也可以在「刷新率」一行手动指定)、消息行数、最近 10 秒的长任务次数与累计阻塞毫秒,外加最近 80 秒的长任务条形历史和峰值。四个开关:
|
|
113
|
-
|
|
114
|
-
- **自动降级**:平均帧率连续 2 秒低于刷新率的 75% 时,给 `<html>` 加 `data-dsh-perf="low"`,关掉聊天区的动画、过渡、`backdrop-filter` 和阴影;连续 3 秒高于 90% 恢复。
|
|
115
|
-
- **长对话精简**:消息行超过 60 条时加 `data-dsh-perf="long"`,关掉聊天流里的动画和过渡。
|
|
116
|
-
- **强制精简**:不看帧率,始终按精简模式走。
|
|
117
|
-
- **启动加速**:把应用目录、`~/.dsh`、插件目录加进 Windows Defender 排除项。宿主没有管理员权限,所以打开开关时它会写一个脚本并请求 UAC 提权执行,结果回写到 `~/.dsh/update-center/startup-boost.json`,页面轮询这个文件显示状态。
|
|
118
|
-
- **屏幕外行跳过**:默认关。只在消息行超过 40 条时启用;按每行的**真实高度**写 `contain-intrinsic-size: auto <height>px`(不是固定占位),只处理真正在屏幕外的行,并在空闲时间分片扫描。Chromium 上 `content-visibility` 有已知的重绘和滚动抖动问题,聊天本身已经虚拟化了行,所以默认不开,长对话明显卡顿时再打开。
|
|
119
|
-
|
|
120
|
-
会话区已经不再挂 `backdrop-filter`:它下面是一份壁纸的静态预模糊副本(`#dsh-concierge-frost`),只栅格化一次、之后只做合成。所以流式输出不会带来额外的模糊开销,也没有「流式时临时关模糊」这个开关。
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
## 打字机
|
|
124
|
-
|
|
125
|
-
页面底部还有一张「打字机」卡片:「逐字显示」开关、**流式节流**开关和速度滑杆(10–240 字/秒)。
|
|
126
|
-
|
|
127
|
-
- **逐字显示**:默认关。它包装内置的 `assistant-step` 渲染器,只把流式中的那段文字按字符预算逐字显示,思考、工具调用、图片保持原样;内层渲染最多每 50ms 提交一次,低帧率时自动让位。
|
|
128
|
-
- **流式节流**:默认开。流式输出时,把应用「每个 token 一次」的渲染合并成每 80ms 一次提交。Markdown 每 token 重新解析一遍是流式聊天闪烁的主因,节流能把重绘次数降到十分之一左右,肉眼几乎看不出延迟。
|
|
129
|
-
|
|
130
|
-
## 限制
|
|
131
|
-
|
|
132
|
-
- 不会从本页替换应用本体。
|
|
133
|
-
- 未在 Host 环境设置 `GITHUB_TOKEN` 或 `GH_TOKEN` 时,GitHub 请求是匿名的,受 GitHub 匿名速率限制。
|
|
134
|
-
- 从本地目录或压缩包安装的插件只列出,不检查更新。
|
|
135
|
-
- 结果缓存 5 分钟;「检查更新」会跳过缓存。
|
|
1
|
+
# 维护中心
|
|
2
|
+
|
|
3
|
+
设置 → 维护中心 分成五个标签页:**更新**(应用本体版本与更新、自动更新开关)、**插件**(已装插件列表、搜索、更新 / 回退 / 启停 / 卸载)、**工具**(安全开关在最上面,下面依次是 GitHub 来源、从 npm 安装、GitHub Token、目录与配置——所有输入框和「打开插件目录 / 打开配置 / 打开安全模式目录」都集中在这里)、**性能**(帧率、长任务与降级开关)、**打字机**(逐字显示、流式节流与速度)、**关于**(介绍、版本号、可折叠的更新日志)。
|
|
4
|
+
|
|
5
|
+
版本号规则:每次发版最后一位 +1(`0.1.1` → `0.1.2` → …),更新日志写在仓库根的 `CHANGELOG.md`,「关于」页直接从宿主读它和 `package.json`,不用改代码。
|
|
6
|
+
|
|
7
|
+
## 检查什么
|
|
8
|
+
|
|
9
|
+
- **应用本体**:读取桌面版安装目录 `resources` 下的 `app-update.yml`,按它声明的通用更新源(例如 `https://download.deepseek.com/dsh-desk/feeds/win-x64/nightly.yml`)取最新 `version`,与已安装版本比较。发现新版本时,桌面端卡片显示「重新检测 / 更新 / 取消」:更新调用桌面壳自己的更新流程(`window.dshDesktop.updates.open()`),面板自身不会弹出任何窗口;取消只是收起这张卡片,下次检查再出现。Web 端没有原生更新器,退化为打开下载页。卡片上另有一个 GitHub 发布页链接,方便手动下载。
|
|
10
|
+
- **npm 插件**:调用插件管理器的 `listVersions`,用与插件管理器相同的源和兼容性检查读取新版本。
|
|
11
|
+
- **GitHub 插件**:对从 Git 仓库安装的插件,向 GitHub 查询最新发布标签(没有发布时退回标签列表),把标签解析成完整 commit,再与已安装版本比较。
|
|
12
|
+
|
|
13
|
+
## 更新
|
|
14
|
+
|
|
15
|
+
「更新」按钮调用插件管理器的 `updateBundle`,pnpm、兼容性检查、失败回滚和重启结论都由插件管理器负责。npm 插件更新到指定的新版本;GitHub 插件更新到固定了目标 commit 的 Git spec。需要重启时页面会说明。
|
|
16
|
+
|
|
17
|
+
「全部更新」会对每个有更新的插件依次执行同样的操作。
|
|
18
|
+
|
|
19
|
+
「自动更新」开关打开后,每次检查发现有可更新项就自动执行全部更新;开关状态保存在浏览器本地,默认开启。
|
|
20
|
+
|
|
21
|
+
应用本体只在桌面端自己报告有更新时才显示新版本(镜像或官方 feed 上出现新版本、但桌面端没有更新时不算),也只有这时才提供「更新」按钮去调用桌面壳的更新入口。自动更新关闭时发现插件可更新,同样会在页面顶部以横幅提示。
|
|
22
|
+
|
|
23
|
+
顶部横幅显示「发现新版本」和版本变化,带「更新」「知道了」两个按钮;不弹窗,点「更新」才进入桌面壳自己的更新流程。
|
|
24
|
+
|
|
25
|
+
应用更新开始下载后,顶部横幅会切换成进度样式:标题「正在下载更新」,下一行是版本号和百分比,卡片底边嵌一条 3px 进度条(浅色轨道 + 品牌色填充)。安装 / 启动阶段没有百分比,底边改成来回滚动的动画;结束或失败后横幅消失。
|
|
26
|
+
|
|
27
|
+
npm 安装的插件行尾还有一个「回退」按钮,展开后列出该插件在镜像上的全部已发布版本(最多 50 个,当前版本会标出来),点「安装」就能切到任意旧版本。回退走「先移除再安装」的路径(pluginManager 的更新接口只接受更新的版本),安装失败时会自动装回原来的版本;GitHub 和本地安装的插件暂不支持回退。
|
|
28
|
+
|
|
29
|
+
更新需要重启时(host 模块类插件),通知条和批量更新的结果横幅上会出现「重启应用」按钮;侧边栏底部有一个「刷新与重启」下拉,里面是「刷新界面」和「重启应用」。
|
|
30
|
+
|
|
31
|
+
- **刷新界面**:只重载页面和客户端插件(`location.reload()`),不碰 Host;
|
|
32
|
+
- **重启应用**:调用更新中心自己的 `POST /dsh-concierge/restart`,由 Host 用 WMI 创建一个脱离应用进程树的 PowerShell 助手,先杀掉 Electron 主进程、再拉起应用;拉起失败会自动重试 3 次,过程写到 `~/.dsh/update-center/restart.log`。不再依赖 dsh-desktop-restart。
|
|
33
|
+
|
|
34
|
+
批量更新(自动更新或「全部更新」)完成后,页面顶部会弹出一条结果横幅:逐行列出插件的版本变化和「已更新 / 失败」,并提示重启 DSH 后生效;点「知道了」关闭。横幅挂在 frame 级浮层上,关掉设置页后仍然保留,直到手动关闭。
|
|
35
|
+
|
|
36
|
+
单个插件更新后同样走顶部弹窗:需要重启时标题是「更新完成,需要重启」,右侧「重启应用」;只需要刷新时标题是「更新完成」,右侧「刷新界面」。副行都是插件名和版本变化,不想现在动就点「知道了」。
|
|
37
|
+
|
|
38
|
+
## GitHub 来源(可添加多个)
|
|
39
|
+
|
|
40
|
+
插件页顶部有一张「GitHub 来源」卡片:输入 `owner/repo` 或完整 GitHub 地址点「添加」,可以加多个。每个来源会持续检测 GitHub 上的最新 release(没有 release 时退回 tags):
|
|
41
|
+
|
|
42
|
+
- 未安装的显示「最新 x.y.z · 未安装」,可以点「安装」;
|
|
43
|
+
- 已安装的显示「最新 · 已装版本」,有新版本时标「有更新」,可以点「重新安装」;
|
|
44
|
+
- 每行都有「移除」,只移除监控项,不会卸载插件。
|
|
45
|
+
|
|
46
|
+
来源列表存在 `~/.dsh/update-center/github-sources.json`。
|
|
47
|
+
|
|
48
|
+
有些插件是分步骤安装的(装完还要重启、去设置里配置、再重启验证,比如 `XRH66/dsh-memory-starter`)。每个来源行有一个「步骤」按钮:读仓库 README 里「快速开始 / 安装」章节的编号步骤,展开成清单,并附「重启应用」和「打开仓库」两个按钮;从来源行安装成功后会自动展开。
|
|
49
|
+
|
|
50
|
+
## 从 Git 安装
|
|
51
|
+
|
|
52
|
+
插件页顶部有一个输入框:填 GitHub 仓库地址(`https://github.com/owner/repo` 或 `github:owner/repo`)就能装。安装时会把仓库 HEAD 解析成完整 commit 再交给插件管理器,这样装出来的插件是「固定 commit 的 Git 安装」,之后能被更新检测和回退识别。装完自动出现在插件列表里,参与后续的检测与更新。
|
|
53
|
+
|
|
54
|
+
Git 插件走「GitHub releases(没有 release 时退回 tags)→ 下载 → 安装」的流程:更新调用 `updateBundle` 并带上固定 commit 的 spec;如果管理器因为 spec 形式不一致拒绝,会自动退回「移除 + 按目标 spec 重装」。回退时会列出仓库里最多 100 个 tag,按版本号排序。
|
|
55
|
+
|
|
56
|
+
## 本地插件
|
|
57
|
+
|
|
58
|
+
本地安装(`link:` / `file:`)的插件没有 registry,也没有 release feed,所以直接看源:
|
|
59
|
+
|
|
60
|
+
- 源是目录时,读它的 `package.json` 版本,比已装版本新就提示重装;
|
|
61
|
+
- 源是 Git 仓库时,记录当前提交;提交或版本变化时提示重装;
|
|
62
|
+
- `link:` 安装的代码本来就实时生效,只做提示,不提示重装;
|
|
63
|
+
- 源是压缩包(`.tgz`)时,读取包内 `package.json` 的版本;同时记录文件大小和修改时间,压缩包被替换时提示「源压缩包已更新」,可以一键重装(重装走「移除 + 按原 spec 安装」)。
|
|
64
|
+
|
|
65
|
+
## 安装与卸载
|
|
66
|
+
|
|
67
|
+
- **从 npm 安装**:插件页有一张卡片,填包名(`dsh-pet`)或包名加版本(`dsh-pet@0.4.9`)就能装。
|
|
68
|
+
- **卸载**:每个插件行尾有「卸载」,点一次变成「确认卸载?」再点才真的卸;维护中心自己那行没有卸载按钮。
|
|
69
|
+
- **忽略此版本**:不想升某个版本时点「忽略此版本」,之后显示「已忽略 x.y.z」,可以随时「取消忽略」;忽略记录存在浏览器本地。
|
|
70
|
+
- **更新内容**:GitHub 安装的插件如果有 release 说明,行上会多一个「更新内容」按钮,展开就是这段说明。
|
|
71
|
+
- **错误诊断**:安装/卸载失败时,常见的插件管理器错误码(`invalid-spec`、`incompatible-version`、`pendingBuilds`、`not-removable`、`bundle-in-use` 等)会直接翻成中文提示和下一步动作。
|
|
72
|
+
|
|
73
|
+
## 安全模式
|
|
74
|
+
|
|
75
|
+
如果某个插件损坏、应用起不来,插件本身也没机会运行——所以本插件在启动时会把几个脚本写到 `~/.dsh/update-center/`:
|
|
76
|
+
|
|
77
|
+
- **`safe-mode.cmd`**:双击后先把 profile 的 `package.json` 和 `cordis.patch.yml` 备份到 `safe-backup/`,再把 `dsh.profile.bundles` 过滤成只留官方插件(`@deepseek-ai/*`),然后启动应用;
|
|
78
|
+
- **`restore-mode.cmd`**:应用退出后双击,恢复备份并重启;
|
|
79
|
+
- **`safe-launch.cmd`**:**自动版**——启动应用后观察 30 秒,如果进程没活下来就判定启动失败,自动备份、切到安全模式再重启一次;启动正常则什么都不做。
|
|
80
|
+
|
|
81
|
+
把桌面快捷方式指向 `safe-launch.cmd`,以后应用起不来会自动落到安全模式,不用手动判断。
|
|
82
|
+
|
|
83
|
+
`safe-launch` 同时负责**自动恢复**:连续两次观察到启动正常后,自动把备份的插件配置放回去并重启一次(连续两次恢复失败后停止自动尝试;手动 `restore-mode` 会清零计数)。
|
|
84
|
+
|
|
85
|
+
「工具」页最上面的「安全」卡片里有一个 **自动安全模式** 开关(存在 `~/.dsh/update-center/settings.json` 的 `safeModeAuto`,默认开):开着时 `safe-launch.cmd` 会观察 30 秒并在失败时自动切安全模式;关掉后它只负责启动应用,不再自动切。开关一变,脚本会立刻重写,不需要重启。
|
|
86
|
+
|
|
87
|
+
所有脚本都要求应用已完全退出,不需要管理员权限;`.ps1` 带 UTF-8 BOM,Windows PowerShell 5.1 读中文不会乱码。
|
|
88
|
+
|
|
89
|
+
## GitHub Token
|
|
90
|
+
|
|
91
|
+
更新页可以填一个 GitHub token(`ghp_…` / `github_pat_…`),存在 `~/.dsh/update-center/settings.json`:
|
|
92
|
+
|
|
93
|
+
- 不带 token:GitHub API 每小时 60 次(按 IP),几条 GitHub 来源就够用完;
|
|
94
|
+
- 带 token:每小时 5000 次(按账号)。
|
|
95
|
+
|
|
96
|
+
只读公开仓库的 token 就够(classic 全不勾权限,或 fine-grained 只给 public repo 读)。环境变量 `GITHUB_TOKEN` / `GH_TOKEN` 优先级更高,设了环境变量时页面里的输入会被覆盖。保存后立即生效,不用重启。
|
|
97
|
+
|
|
98
|
+
## 后台检查
|
|
99
|
+
|
|
100
|
+
客户端插件常驻,每 10 分钟检查一次更新;发现可更新插件时在顶部弹一条「发现 N 个插件更新」,一小时内最多提示一次,点「知道了」收起。
|
|
101
|
+
|
|
102
|
+
## 插件启停与回退
|
|
103
|
+
|
|
104
|
+
每个插件行尾除了「更新 / 回退」,还有「启用 / 禁用」:禁用走 pluginManager 的 `setPluginEnabled`,立即生效(个别插件需要重启)。npm 插件可以回退到镜像上的任意历史版本(最多 100 个);GitHub 安装的插件可以回退到仓库里的任意 tag;本地目录或压缩包装的插件没有可回退的版本。
|
|
105
|
+
|
|
106
|
+
如果上次更新后某个插件加载失败,Host 会在下次启动时把它禁用;页面顶部会提示「有 N 个插件加载失败被禁用」并给出「全部启用」。
|
|
107
|
+
|
|
108
|
+
插件页右上角有「打开插件目录」和「打开配置」,直接打开 profile 的 `node_modules` 和 `cordis.patch.yml`。
|
|
109
|
+
|
|
110
|
+
## 聊天性能
|
|
111
|
+
|
|
112
|
+
统计四项:帧率(5 秒平均,显示为「当前 / 屏幕刷新率」——上限由屏幕刷新率决定,自动识别 60/75/90/100/120/144/165/240,也可以在「刷新率」一行手动指定)、消息行数、最近 10 秒的长任务次数与累计阻塞毫秒,外加最近 80 秒的长任务条形历史和峰值。四个开关:
|
|
113
|
+
|
|
114
|
+
- **自动降级**:平均帧率连续 2 秒低于刷新率的 75% 时,给 `<html>` 加 `data-dsh-perf="low"`,关掉聊天区的动画、过渡、`backdrop-filter` 和阴影;连续 3 秒高于 90% 恢复。
|
|
115
|
+
- **长对话精简**:消息行超过 60 条时加 `data-dsh-perf="long"`,关掉聊天流里的动画和过渡。
|
|
116
|
+
- **强制精简**:不看帧率,始终按精简模式走。
|
|
117
|
+
- **启动加速**:把应用目录、`~/.dsh`、插件目录加进 Windows Defender 排除项。宿主没有管理员权限,所以打开开关时它会写一个脚本并请求 UAC 提权执行,结果回写到 `~/.dsh/update-center/startup-boost.json`,页面轮询这个文件显示状态。
|
|
118
|
+
- **屏幕外行跳过**:默认关。只在消息行超过 40 条时启用;按每行的**真实高度**写 `contain-intrinsic-size: auto <height>px`(不是固定占位),只处理真正在屏幕外的行,并在空闲时间分片扫描。Chromium 上 `content-visibility` 有已知的重绘和滚动抖动问题,聊天本身已经虚拟化了行,所以默认不开,长对话明显卡顿时再打开。
|
|
119
|
+
|
|
120
|
+
会话区已经不再挂 `backdrop-filter`:它下面是一份壁纸的静态预模糊副本(`#dsh-concierge-frost`),只栅格化一次、之后只做合成。所以流式输出不会带来额外的模糊开销,也没有「流式时临时关模糊」这个开关。
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
## 打字机
|
|
124
|
+
|
|
125
|
+
页面底部还有一张「打字机」卡片:「逐字显示」开关、**流式节流**开关和速度滑杆(10–240 字/秒)。
|
|
126
|
+
|
|
127
|
+
- **逐字显示**:默认关。它包装内置的 `assistant-step` 渲染器,只把流式中的那段文字按字符预算逐字显示,思考、工具调用、图片保持原样;内层渲染最多每 50ms 提交一次,低帧率时自动让位。
|
|
128
|
+
- **流式节流**:默认开。流式输出时,把应用「每个 token 一次」的渲染合并成每 80ms 一次提交。Markdown 每 token 重新解析一遍是流式聊天闪烁的主因,节流能把重绘次数降到十分之一左右,肉眼几乎看不出延迟。
|
|
129
|
+
|
|
130
|
+
## 限制
|
|
131
|
+
|
|
132
|
+
- 不会从本页替换应用本体。
|
|
133
|
+
- 未在 Host 环境设置 `GITHUB_TOKEN` 或 `GH_TOKEN` 时,GitHub 请求是匿名的,受 GitHub 匿名速率限制。
|
|
134
|
+
- 从本地目录或压缩包安装的插件只列出,不检查更新。
|
|
135
|
+
- 结果缓存 5 分钟;「检查更新」会跳过缓存。
|
package/docs/GLASS-SURFACES.md
CHANGED
|
@@ -121,8 +121,8 @@ body { background-color: #fff }
|
|
|
121
121
|
html[data-dsh-glass="1"],
|
|
122
122
|
html[data-dsh-glass="1"] body,
|
|
123
123
|
html[data-dsh-glass="1"] #root { background: transparent !important; }
|
|
124
|
-
```
|
|
125
|
-
|
|
124
|
+
```
|
|
125
|
+
|
|
126
126
|
## 九、先看报错,再谈样式(今天最贵的一条)
|
|
127
127
|
|
|
128
128
|
**症状**:设置页「界面没了」——面板区域一片空,只剩遮罩盖着聊天,后面的文字隐约可见。
|
|
@@ -144,4 +144,4 @@ const [autoUpdate, setAutoUpdate] = React.useState(…) // 后声明
|
|
|
144
144
|
1. 改完先看浏览器控制台有没有红字。有报错就别动样式——样式救不了崩溃的组件;
|
|
145
145
|
2. 「界面变透 / 变空 / 少一块」优先怀疑**渲染失败**,而不是颜色;
|
|
146
146
|
3. 只改过一处却出问题,先查自己改的那一处,别去翻无关的 token;
|
|
147
|
-
4. 同一个症状连试三次没解决,就换方法——今天的三层补丁加起来不如一行挪位置。
|
|
147
|
+
4. 同一个症状连试三次没解决,就换方法——今天的三层补丁加起来不如一行挪位置。
|