@restregular/dsh-powerup 0.5.1 → 0.6.0
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/README.md +46 -40
- package/client.js +133 -168
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Small, opt-in upgrades for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).
|
|
4
4
|
The upgrades include a **right-click action menu in the Trajectory view**, an
|
|
5
|
-
optional **stop reason for background jobs**, and an in-place **plugin
|
|
5
|
+
optional **stop reason for background jobs**, and an in-place **plugin installer**.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ Right-click empty space in the ledger:
|
|
|
31
31
|
|
|
32
32
|
The sidebar **Power-Up** page turns the menu on or off and lists the available
|
|
33
33
|
actions. The setting is stored in the browser. It also holds the defaults for
|
|
34
|
-
**one-click
|
|
34
|
+
**one-click install** (auto-enable and auto-restart), which the plugin installer
|
|
35
35
|
uses.
|
|
36
36
|
|
|
37
37
|
### Stop a background job with a reason
|
|
@@ -44,8 +44,7 @@ and is not clipped by any slot's stacking context; its colors come only from
|
|
|
44
44
|
`--dsw-alias-*` tokens, so light and dark themes both work.
|
|
45
45
|
|
|
46
46
|
- The reason field is optional; an empty field keeps the host's default
|
|
47
|
-
`cancelled by the user` reason.
|
|
48
|
-
limit, and `Enter` confirms while `Esc` cancels.
|
|
47
|
+
`cancelled by the user` reason. `Enter` confirms while `Esc` cancels.
|
|
49
48
|
- Confirming stops the job through the Host route, which records
|
|
50
49
|
`cancelled by the user: <reason>`. The completion notice injected into the
|
|
51
50
|
session and the shell tool's result therefore carry the reason.
|
|
@@ -56,30 +55,32 @@ and is not clipped by any slot's stacking context; its colors come only from
|
|
|
56
55
|
|
|
57
56
|
`↑` / `↓` move, `Home` / `End` jump, `Enter` runs, `Esc` closes.
|
|
58
57
|
|
|
59
|
-
##
|
|
58
|
+
## Install a plugin
|
|
60
59
|
|
|
61
60
|
Open the built-in **Plugins** page. Every third-party card under **Installed
|
|
62
|
-
plugins** gains a small
|
|
63
|
-
|
|
61
|
+
plugins** gains a small install icon in its action area. Clicking it opens the
|
|
62
|
+
install dialog:
|
|
64
63
|
|
|
65
64
|
1. The dialog reads the package's published versions from the Host's configured
|
|
66
65
|
registries — the same list the **Add plugin** dialog offers, including the
|
|
67
66
|
npmmirror fallback. Star any registry to make it Power-Up's default for
|
|
68
|
-
later
|
|
67
|
+
later installs; otherwise the list starts from the Add dialog's remembered
|
|
69
68
|
choice.
|
|
70
|
-
2. Type a version or pick one from the floating version list. The
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
2. Type a version or pick one from the floating version list. The version in the
|
|
70
|
+
input is authoritative: both install actions install exactly that version, so
|
|
71
|
+
reinstalling or downgrading works. The installed version is tagged
|
|
72
|
+
**Current**; the newest is tagged **latest**, and a version that is both uses
|
|
73
|
+
one **Current · latest** tag.
|
|
74
|
+
3. **One-click install** installs the version in the input and skips both
|
|
75
|
+
questions: by default the new copy is enabled and DSH restarts automatically.
|
|
76
|
+
The Power-Up page can turn either default off. With auto-enable off, the new
|
|
76
77
|
version is left disabled and nothing restarts. With auto-restart off (or when
|
|
77
78
|
the current runtime cannot restart itself), the completion panel closes
|
|
78
79
|
itself after a few seconds instead of staying on screen. Power-Up's own
|
|
79
|
-
|
|
80
|
-
4. Otherwise, confirming removes the installed copy, checks the
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
install keeps its background handoff and does not offer one-click.
|
|
81
|
+
4. Otherwise, confirming removes the installed copy, checks the spec the way
|
|
82
|
+
**Add plugin** does, and installs the selected version without enabling it.
|
|
83
|
+
Because the old copy is already gone at that point, a refused check or a
|
|
83
84
|
failed install automatically re-installs the removed version with its
|
|
84
85
|
previous enabled state; the dialog reports both the failure and the rollback
|
|
85
86
|
result.
|
|
@@ -93,11 +94,11 @@ update dialog:
|
|
|
93
94
|
plugins** heading. The heading bar is always present — with **No plugins need
|
|
94
95
|
a restart** and the restart button when nothing is pending — and a **Restart
|
|
95
96
|
DSH** button confirms and performs the same restart. The Host also audits
|
|
96
|
-
profile bundle directories written after it started, so
|
|
97
|
-
the built-in **Add plugin** / **
|
|
97
|
+
profile bundle directories written after it started, so installs made through
|
|
98
|
+
the built-in **Add plugin** / **Install** UI, or before this page loaded, are
|
|
98
99
|
marked too.
|
|
99
100
|
|
|
100
|
-
Power-Up
|
|
101
|
+
Power-Up installs itself through the same dialog (the one-click action is hidden
|
|
101
102
|
for itself). Because removing the plugin unloads this panel, the Host answers
|
|
102
103
|
first and then hands `removeBundle` → `inspect` → `installBundle(enabled: true)`
|
|
103
104
|
to the built-in manager service, which keeps running after the Power-Up Host
|
|
@@ -128,23 +129,25 @@ fiber is unloaded. The panel closes; refresh the page when the install finishes.
|
|
|
128
129
|
The typed reason goes to `POST /dsh-powerup/api/job-kill`, which calls the
|
|
129
130
|
registry's `kill(id, session, reason)` — the same admission the built-in
|
|
130
131
|
Remote uses, with the reason settlement merges into the job's `detail` line.
|
|
131
|
-
- **The
|
|
132
|
+
- **The install entry uses the built-in page's contracts.** The Plugins page has
|
|
132
133
|
no per-card slot, so the overlay injects one button into every
|
|
133
134
|
`[data-plugin-group="bundles"] [data-plugin-package]` card and re-asserts it
|
|
134
135
|
after React renders. Version listing is a plain registry `GET`; removal and
|
|
135
136
|
installation use the same `remote.pluginManager` calls as **Add plugin**. The
|
|
136
137
|
Host adds two loopback-only routes: `/dsh-powerup/api/restart` for the
|
|
137
|
-
process restart, and `/dsh-powerup/api/self-update` for the self-
|
|
138
|
+
process restart, and `/dsh-powerup/api/self-update` for the self-install
|
|
138
139
|
handoff.
|
|
139
|
-
- **
|
|
140
|
-
a timer starts `removeBundle` → `inspect` →
|
|
141
|
-
through the built-in manager service. Removing
|
|
142
|
-
own Host fiber, but the manager service and the
|
|
143
|
-
Host process, so the reinstall finishes; failures
|
|
144
|
-
`~/.dsh/powerup/self-update.log`. The Host captures the
|
|
145
|
-
from before removal and re-installs that version if the
|
|
146
|
-
fails, so a failed self-
|
|
147
|
-
|
|
140
|
+
- **Power-Up's own install outlives its unload.** The Host route sends its
|
|
141
|
+
answer, then a timer starts `removeBundle` → `inspect` →
|
|
142
|
+
`installBundle(enabled: true)` through the built-in manager service. Removing
|
|
143
|
+
the bundle unloads Power-Up's own Host fiber, but the manager service and the
|
|
144
|
+
pending promise stay in the Host process, so the reinstall finishes; failures
|
|
145
|
+
are appended to `~/.dsh/powerup/self-update.log`. The Host captures the
|
|
146
|
+
version it was loaded from before removal and re-installs that version if the
|
|
147
|
+
check or install fails, so a failed self-install does not leave Power-Up
|
|
148
|
+
missing.
|
|
149
|
+
- **One-click install is a client-side decision.** Both install actions use the
|
|
150
|
+
version in the dialog input (so reinstall and downgrade are allowed) and both
|
|
148
151
|
defaults live in the shared settings store (`dsh-powerup:settings:v1`), so the
|
|
149
152
|
Power-Up page and an open dialog agree without a reload. A one-click run
|
|
150
153
|
installs disabled — the same shape as **Add plugin** — then enables through
|
|
@@ -152,18 +155,21 @@ fiber is unloaded. The panel closes; refresh the page when the install finishes.
|
|
|
152
155
|
auto-enable off the new copy stays disabled and nothing restarts. When no
|
|
153
156
|
restart happens the completion panel closes on a timer; install, enable, and
|
|
154
157
|
restart failures stay on screen with their reason instead.
|
|
155
|
-
- **The stop dialog is a body portal.** `shell.overlay`
|
|
156
|
-
`z-index: 20`, and the host jobs menu is a
|
|
157
|
-
`z-index: 100`; a high z-index inside the overlay
|
|
158
|
-
The reason popover is rendered through
|
|
159
|
-
`document.body
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
- **The stop dialog is a body portal with host-dialog chrome.** `shell.overlay`
|
|
159
|
+
is an absolute layer at `z-index: 20`, and the host jobs menu is a
|
|
160
|
+
`document.body` portal at `z-index: 100`; a high z-index inside the overlay
|
|
161
|
+
layer therefore still loses. The reason popover is rendered through
|
|
162
|
+
`react-dom`'s `createPortal` into `document.body` and uses `z-index: 1400`.
|
|
163
|
+
Its surface (`--dsw-alias-bg-layer-2`, `--dsw-radius-panel`,
|
|
164
|
+
`--dsw-elevation-prominent`), 34px input, and buttons mirror the host dialog
|
|
165
|
+
and menu primitives; the confirm button reuses the host's armed-stop
|
|
166
|
+
treatment (red border, 12% red fill, red text) instead of inventing a solid
|
|
167
|
+
danger style. Without `react-dom` it falls back to in-place rendering.
|
|
162
168
|
- **Restart status lives in this browser session.** A management result that
|
|
163
169
|
says `restart-required` is written to `sessionStorage`; the card gets a
|
|
164
170
|
**Restart needed** tag and the group heading gets a count plus a restart
|
|
165
171
|
button. The Client also wraps the shared `remote.pluginManager` methods so an
|
|
166
|
-
|
|
172
|
+
install started from the built-in Add plugin/Install dialogs is observed, and
|
|
167
173
|
asks the Host audit route for profile bundles whose files are newer than the
|
|
168
174
|
Host process. A real app restart clears the session, while a page refresh
|
|
169
175
|
keeps the markers.
|
package/client.js
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
const NS = 'dsh-powerup';
|
|
71
71
|
const SETTINGS_KEY = 'dsh-powerup:settings:v1';
|
|
72
|
-
const VERSION = '0.
|
|
72
|
+
const VERSION = '0.6.0';
|
|
73
73
|
const MENU_GAP = 8;
|
|
74
74
|
const MENU_WIDTH = 248;
|
|
75
75
|
/** How long a one-click update's completion panel stays open when nothing restarts. */
|
|
@@ -92,15 +92,15 @@
|
|
|
92
92
|
'page.how1': '打开任意会话,切到顶部的「轨迹」视图。',
|
|
93
93
|
'page.how2': '在记录行上右键;在空白处右键可执行会话级操作。',
|
|
94
94
|
'page.how3': '菜单支持 ↑ / ↓ 选择、Enter 执行、Esc 关闭。',
|
|
95
|
-
'page.updateTitle': '
|
|
96
|
-
'page.updateDesc': '
|
|
97
|
-
'page.updateHow': '
|
|
98
|
-
'page.oneClickTitle': '
|
|
99
|
-
'page.oneClickDesc': '
|
|
95
|
+
'page.updateTitle': '插件安装',
|
|
96
|
+
'page.updateDesc': '在插件页为每个第三方已安装插件提供安装入口:从安装源读取版本,按输入框中的版本卸载旧版并按「添加插件」流程安装,完成后可立即启用并选择是否重启 DSH;也可以一键安装。',
|
|
97
|
+
'page.updateHow': '打开侧边栏的「插件」页,在「已安装插件」分组中点击卡片右侧的安装图标;在面板里输入或选择版本后点「一键安装」即可,并按下面的默认行为处理。',
|
|
98
|
+
'page.oneClickTitle': '一键安装',
|
|
99
|
+
'page.oneClickDesc': '在安装面板里点「一键安装」时,直接安装输入框中的版本,跳过「是否启用」和「是否重启」的询问。',
|
|
100
100
|
'page.oneClickEnable': '自动启用新版本',
|
|
101
|
-
'page.oneClickEnableHint': '
|
|
101
|
+
'page.oneClickEnableHint': '关闭后,一键安装只安装版本,保持停用,也不自动重启。',
|
|
102
102
|
'page.oneClickRestart': '自动重启 DSH',
|
|
103
|
-
'page.oneClickRestartHint': '
|
|
103
|
+
'page.oneClickRestartHint': '关闭后,安装完成的提示会自动关闭。',
|
|
104
104
|
'page.jobStopTitle': '后台任务停止原因',
|
|
105
105
|
'page.jobStopDesc': '在会话顶部的后台任务面板里点停止按钮时,可以顺手填写停止原因;原因会附加在任务结束后注入会话的提示里。',
|
|
106
106
|
'page.jobStopHow': '打开任意会话,点顶部的「后台任务」面板,在运行中的任务右侧点停止,填写原因(可留空)后确认。',
|
|
@@ -151,7 +151,6 @@
|
|
|
151
151
|
'jobStop.title': '停止后台任务',
|
|
152
152
|
'jobStop.subtitle': '停止后无法恢复,正在运行的工作会中断。',
|
|
153
153
|
'jobStop.close': '关闭',
|
|
154
|
-
'jobStop.hint': 'Enter 确认 · Esc 取消',
|
|
155
154
|
'jobStop.reasonLabel': '停止原因(可选)',
|
|
156
155
|
'jobStop.reasonPlaceholder': '例如:已经不需要这个结果了',
|
|
157
156
|
'jobStop.reasonNote': '原因会附加在任务结束后注入会话的提示里。',
|
|
@@ -159,9 +158,9 @@
|
|
|
159
158
|
'jobStop.confirm': '停止任务',
|
|
160
159
|
'jobStop.stopping': '正在停止…',
|
|
161
160
|
'jobStop.failed': '停止失败:{message}',
|
|
162
|
-
'update.button': '
|
|
163
|
-
'update.title': '
|
|
164
|
-
'update.subtitle': '
|
|
161
|
+
'update.button': '安装',
|
|
162
|
+
'update.title': '安装插件',
|
|
163
|
+
'update.subtitle': '按输入框中的版本安装;已安装的副本会先移除。',
|
|
165
164
|
'update.current': '当前版本',
|
|
166
165
|
'update.versionLabel': '版本号',
|
|
167
166
|
'update.versionPlaceholder': '输入版本号,或从列表选择',
|
|
@@ -181,7 +180,7 @@
|
|
|
181
180
|
'update.registryMirror': '中国大陆镜像源',
|
|
182
181
|
'update.registryCustom': '自定义地址',
|
|
183
182
|
'update.registryFrom': '版本列表来自 {registry}',
|
|
184
|
-
'update.start': '
|
|
183
|
+
'update.start': '开始安装',
|
|
185
184
|
'update.cancel': '取消',
|
|
186
185
|
'update.close': '关闭',
|
|
187
186
|
'update.step.checking': '正在校验版本…',
|
|
@@ -202,14 +201,14 @@
|
|
|
202
201
|
'update.restartUnsupported': '当前运行方式无法自动重启:{reason}',
|
|
203
202
|
'update.restarting': 'DSH 正在重启,窗口即将关闭…',
|
|
204
203
|
'update.restartFailed': '重启请求失败:{message}',
|
|
205
|
-
'update.selfUpdateWarning': '
|
|
206
|
-
'update.selfUpdating': 'Power-Up
|
|
204
|
+
'update.selfUpdateWarning': '安装 Power-Up 会在后台卸载并安装所选版本;本面板会关闭,完成后刷新页面。',
|
|
205
|
+
'update.selfUpdating': 'Power-Up 正在后台安装…',
|
|
207
206
|
'update.selfRefresh': '完成后请刷新页面。',
|
|
208
207
|
'update.setDefault': '设为默认',
|
|
209
208
|
'update.defaultTag': '默认',
|
|
210
|
-
'update.defaultHint': '
|
|
209
|
+
'update.defaultHint': '安装列表默认使用此安装源',
|
|
211
210
|
'restart.tag': '需重启',
|
|
212
|
-
'restart.tagHint': '
|
|
211
|
+
'restart.tagHint': '该插件已安装新版本,重启 DSH 后生效',
|
|
213
212
|
'restart.pending': '{count} 个插件待重启',
|
|
214
213
|
'restart.none': '暂无插件需要重启',
|
|
215
214
|
'restart.action': '重启 DSH',
|
|
@@ -217,41 +216,40 @@
|
|
|
217
216
|
'restart.desc': '重启会关闭并重新打开 DSH,正在运行的任务会中断。',
|
|
218
217
|
'restart.cancel': '取消',
|
|
219
218
|
'restart.confirm': '立即重启',
|
|
220
|
-
'update.doneTitle': '
|
|
221
|
-
'update.doneInstalled': '{name}
|
|
219
|
+
'update.doneTitle': '安装完成',
|
|
220
|
+
'update.doneInstalled': '{name} 已安装 {version}。',
|
|
222
221
|
'update.doneDisabled': '{name} 已安装 {version},尚未启用。',
|
|
223
222
|
'update.doneEnabled': '新版本已启用。',
|
|
224
223
|
'update.doneRestart': '部分更改需要重启 DSH 后生效。',
|
|
225
224
|
'update.doneAutoClose': '完成面板将在 {seconds} 秒后自动关闭。',
|
|
226
225
|
'update.doneButton': '完成',
|
|
227
|
-
'update.oneClick': '
|
|
228
|
-
'update.oneClickTitle': '
|
|
229
|
-
'update.oneClickHint': '
|
|
226
|
+
'update.oneClick': '一键安装',
|
|
227
|
+
'update.oneClickTitle': '一键安装',
|
|
228
|
+
'update.oneClickHint': '安装输入框中的版本 {version},跳过「是否启用」和「是否重启」的询问。',
|
|
230
229
|
'update.oneClickDefaults': '自动启用:{enable} · 自动重启:{restart}。可在侧边栏 Power-Up 页面修改。',
|
|
231
230
|
'update.on': '开',
|
|
232
231
|
'update.off': '关',
|
|
233
|
-
'update.
|
|
234
|
-
'update.oneClickUpToDate': '已经是最新版本,无需更新。',
|
|
232
|
+
'update.oneClickNoVersion': '请先输入或选择要安装的版本。',
|
|
235
233
|
'update.oneClickEnableFailed': '新版本已安装,但自动启用失败。请到「插件」页手动启用。',
|
|
236
234
|
'update.oneClickSkippedEnable': '已按设置保持停用;需要时到「插件」页启用。',
|
|
237
|
-
'update.errorTitle': '
|
|
235
|
+
'update.errorTitle': '安装失败',
|
|
238
236
|
'update.rollbackOkTitle': '已恢复旧版本',
|
|
239
|
-
'update.rollbackOkDesc': '
|
|
237
|
+
'update.rollbackOkDesc': '安装失败,{name} 已自动回滚到 {version},仍可继续使用。',
|
|
240
238
|
'update.rollbackFailedTitle': '旧版本恢复失败',
|
|
241
239
|
'update.rollbackFailedDesc': '自动回滚失败:{message}。请到「插件」页用「添加插件」重新安装。',
|
|
242
240
|
'update.rollbackUnavailable': '无法确定旧版本号,未能自动回滚。请到「插件」页重新安装。',
|
|
243
|
-
'update.selfTitle': '
|
|
244
|
-
'update.selfDesc': '
|
|
245
|
-
'update.notRemovable': '该插件受 DSH
|
|
241
|
+
'update.selfTitle': '请用「添加插件」安装 Power-Up 自身',
|
|
242
|
+
'update.selfDesc': '安装 Power-Up 会先卸载本插件,安装流程会随之中断。',
|
|
243
|
+
'update.notRemovable': '该插件受 DSH 管理,不能在这里安装。',
|
|
246
244
|
'update.notBundle': '该包不是 DSH 插件包。',
|
|
247
245
|
'update.alreadyInstalled': '该包已安装,请先卸载旧版本。',
|
|
248
246
|
'update.notFound': '安装源里找不到这个版本。',
|
|
249
|
-
'update.cancelled': '
|
|
247
|
+
'update.cancelled': '安装已取消。',
|
|
250
248
|
'update.installedChip': '未安装',
|
|
251
249
|
'update.unknown': '未知错误',
|
|
252
250
|
'update.invalidVersion': '请输入有效版本号(例如 1.2.3)',
|
|
253
251
|
'update.stopProfile': '当前 profile 不能热卸载该插件,请重启 DSH 后再试。',
|
|
254
|
-
'update.unsupportedTitle': '
|
|
252
|
+
'update.unsupportedTitle': '无法自动安装',
|
|
255
253
|
},
|
|
256
254
|
en: {
|
|
257
255
|
'panel.title': 'Power-Up',
|
|
@@ -266,15 +264,15 @@
|
|
|
266
264
|
'page.how1': 'Open a session and switch to the Trajectory view.',
|
|
267
265
|
'page.how2': 'Right-click a record row; right-click empty space for session actions.',
|
|
268
266
|
'page.how3': 'Use ↑ / ↓ to move, Enter to run, Esc to close.',
|
|
269
|
-
'page.updateTitle': '
|
|
270
|
-
'page.updateDesc': 'Every third-party plugin on the Plugins page gains an
|
|
271
|
-
'page.updateHow': 'Open Plugins in the sidebar and click the
|
|
272
|
-
'page.oneClickTitle': 'One-click
|
|
273
|
-
'page.oneClickDesc': 'One-click
|
|
267
|
+
'page.updateTitle': 'Install plugins',
|
|
268
|
+
'page.updateDesc': 'Every third-party plugin on the Plugins page gains an install entry: read versions from a registry, install the version in the input through the Add plugin path (removing the old copy first), then enable and optionally restart DSH — or use one-click install.',
|
|
269
|
+
'page.updateHow': 'Open Plugins in the sidebar and click the install icon at the right of a card under Installed plugins; in the panel, type or choose a version and press One-click install to use the defaults below.',
|
|
270
|
+
'page.oneClickTitle': 'One-click install',
|
|
271
|
+
'page.oneClickDesc': 'One-click install installs the version in the input and skips both the enable and the restart questions.',
|
|
274
272
|
'page.oneClickEnable': 'Enable the new version automatically',
|
|
275
|
-
'page.oneClickEnableHint': 'When off, one-click
|
|
273
|
+
'page.oneClickEnableHint': 'When off, one-click install only installs the version, leaves it disabled, and does not restart.',
|
|
276
274
|
'page.oneClickRestart': 'Restart DSH automatically',
|
|
277
|
-
'page.oneClickRestartHint': 'When off, the
|
|
275
|
+
'page.oneClickRestartHint': 'When off, the install-complete panel closes itself.',
|
|
278
276
|
'page.jobStopTitle': 'Background job stop reason',
|
|
279
277
|
'page.jobStopDesc': 'When you stop a running job from the background jobs panel in the session header, you can leave a reason; the reason is appended to the notice injected into the session when the job settles.',
|
|
280
278
|
'page.jobStopHow': 'Open a session, expand the background jobs panel, press stop on a running job, type a reason (optional), then confirm.',
|
|
@@ -325,7 +323,6 @@
|
|
|
325
323
|
'jobStop.title': 'Stop background job',
|
|
326
324
|
'jobStop.subtitle': 'This cannot be undone; running work will be interrupted.',
|
|
327
325
|
'jobStop.close': 'Close',
|
|
328
|
-
'jobStop.hint': 'Enter to confirm · Esc to cancel',
|
|
329
326
|
'jobStop.reasonLabel': 'Stop reason (optional)',
|
|
330
327
|
'jobStop.reasonPlaceholder': 'e.g. the result is no longer needed',
|
|
331
328
|
'jobStop.reasonNote': 'The reason is appended to the notice injected into the session when the job settles.',
|
|
@@ -333,9 +330,9 @@
|
|
|
333
330
|
'jobStop.confirm': 'Stop job',
|
|
334
331
|
'jobStop.stopping': 'Stopping…',
|
|
335
332
|
'jobStop.failed': 'Could not stop the job: {message}',
|
|
336
|
-
'update.button': '
|
|
337
|
-
'update.title': '
|
|
338
|
-
'update.subtitle': '
|
|
333
|
+
'update.button': 'Install',
|
|
334
|
+
'update.title': 'Install plugin',
|
|
335
|
+
'update.subtitle': 'Install the version in the input; the installed copy is removed first.',
|
|
339
336
|
'update.current': 'Current version',
|
|
340
337
|
'update.versionLabel': 'Version',
|
|
341
338
|
'update.versionPlaceholder': 'Type a version or pick one from the list',
|
|
@@ -355,7 +352,7 @@
|
|
|
355
352
|
'update.registryMirror': 'Mainland China mirror',
|
|
356
353
|
'update.registryCustom': 'Custom address',
|
|
357
354
|
'update.registryFrom': 'Versions came from {registry}',
|
|
358
|
-
'update.start': '
|
|
355
|
+
'update.start': 'Install',
|
|
359
356
|
'update.cancel': 'Cancel',
|
|
360
357
|
'update.close': 'Close',
|
|
361
358
|
'update.step.checking': 'Checking the version…',
|
|
@@ -376,14 +373,14 @@
|
|
|
376
373
|
'update.restartUnsupported': 'This runtime cannot restart itself: {reason}',
|
|
377
374
|
'update.restarting': 'DSH is restarting; this window will close…',
|
|
378
375
|
'update.restartFailed': 'Restart request failed: {message}',
|
|
379
|
-
'update.selfUpdateWarning': '
|
|
380
|
-
'update.selfUpdating': 'Power-Up is
|
|
376
|
+
'update.selfUpdateWarning': 'Installing Power-Up removes and reinstalls it in the background; this panel closes, then refresh the page.',
|
|
377
|
+
'update.selfUpdating': 'Power-Up is installing in the background…',
|
|
381
378
|
'update.selfRefresh': 'Refresh the page when it finishes.',
|
|
382
379
|
'update.setDefault': 'Set as default',
|
|
383
380
|
'update.defaultTag': 'Default',
|
|
384
|
-
'update.defaultHint': 'The
|
|
381
|
+
'update.defaultHint': 'The install list starts from this registry',
|
|
385
382
|
'restart.tag': 'Restart needed',
|
|
386
|
-
'restart.tagHint': '
|
|
383
|
+
'restart.tagHint': 'Installed; restart DSH to apply',
|
|
387
384
|
'restart.pending': '{count} plugins need a restart',
|
|
388
385
|
'restart.none': 'No plugins need a restart',
|
|
389
386
|
'restart.action': 'Restart DSH',
|
|
@@ -391,41 +388,40 @@
|
|
|
391
388
|
'restart.desc': 'Restarting closes and reopens DSH; running tasks are interrupted.',
|
|
392
389
|
'restart.cancel': 'Cancel',
|
|
393
390
|
'restart.confirm': 'Restart now',
|
|
394
|
-
'update.doneTitle': '
|
|
395
|
-
'update.doneInstalled': '{name}
|
|
391
|
+
'update.doneTitle': 'Install complete',
|
|
392
|
+
'update.doneInstalled': '{name} installed {version}.',
|
|
396
393
|
'update.doneDisabled': '{name} {version} is installed but not enabled.',
|
|
397
394
|
'update.doneEnabled': 'The new version is enabled.',
|
|
398
395
|
'update.doneRestart': 'Some changes apply only after DSH restarts.',
|
|
399
396
|
'update.doneAutoClose': 'This panel closes itself in {seconds} seconds.',
|
|
400
397
|
'update.doneButton': 'Done',
|
|
401
|
-
'update.oneClick': 'One-click
|
|
402
|
-
'update.oneClickTitle': 'One-click
|
|
403
|
-
'update.oneClickHint': 'Installs the
|
|
398
|
+
'update.oneClick': 'One-click install',
|
|
399
|
+
'update.oneClickTitle': 'One-click install',
|
|
400
|
+
'update.oneClickHint': 'Installs the version in the input ({version}) and skips the enable and restart questions.',
|
|
404
401
|
'update.oneClickDefaults': 'Auto-enable: {enable} · Auto-restart: {restart}. Change these on the Power-Up page.',
|
|
405
402
|
'update.on': 'on',
|
|
406
403
|
'update.off': 'off',
|
|
407
|
-
'update.
|
|
408
|
-
'update.
|
|
409
|
-
'update.oneClickEnableFailed': 'The new version is installed but could not be enabled. Enable it on the Plugins page.',
|
|
404
|
+
'update.oneClickNoVersion': 'Type or choose a version to install first.',
|
|
405
|
+
'update.oneClickEnableFailed': 'The version is installed but could not be enabled. Enable it on the Plugins page.',
|
|
410
406
|
'update.oneClickSkippedEnable': 'Left disabled as configured; enable it on the Plugins page when ready.',
|
|
411
|
-
'update.errorTitle': '
|
|
407
|
+
'update.errorTitle': 'Install failed',
|
|
412
408
|
'update.rollbackOkTitle': 'Previous version restored',
|
|
413
|
-
'update.rollbackOkDesc': 'The
|
|
409
|
+
'update.rollbackOkDesc': 'The install failed, so {name} was rolled back to {version} and is ready to use.',
|
|
414
410
|
'update.rollbackFailedTitle': 'Could not restore the previous version',
|
|
415
411
|
'update.rollbackFailedDesc': 'Automatic rollback failed: {message}. Reinstall it from the Plugins page with “Add plugin”.',
|
|
416
412
|
'update.rollbackUnavailable': 'The previous version is unknown, so no automatic rollback was possible. Reinstall it from the Plugins page.',
|
|
417
|
-
'update.selfTitle': '
|
|
418
|
-
'update.selfDesc': '
|
|
419
|
-
'update.notRemovable': 'DSH manages this plugin; it cannot be
|
|
413
|
+
'update.selfTitle': 'Install Power-Up with Add plugin',
|
|
414
|
+
'update.selfDesc': 'Installing Power-Up removes this plugin first, which interrupts this flow.',
|
|
415
|
+
'update.notRemovable': 'DSH manages this plugin; it cannot be installed here.',
|
|
420
416
|
'update.notBundle': 'This package is not a DSH plugin bundle.',
|
|
421
417
|
'update.alreadyInstalled': 'This package is already installed; remove the old version first.',
|
|
422
418
|
'update.notFound': 'That version is not available from the registry.',
|
|
423
|
-
'update.cancelled': 'The
|
|
419
|
+
'update.cancelled': 'The install was cancelled.',
|
|
424
420
|
'update.installedChip': 'Not installed',
|
|
425
421
|
'update.unknown': 'Unknown error',
|
|
426
422
|
'update.invalidVersion': 'Enter a valid version, for example 1.2.3.',
|
|
427
423
|
'update.stopProfile': 'This profile cannot hot-remove the plugin; restart DSH and try again.',
|
|
428
|
-
'update.unsupportedTitle': 'Cannot
|
|
424
|
+
'update.unsupportedTitle': 'Cannot install automatically',
|
|
429
425
|
},
|
|
430
426
|
};
|
|
431
427
|
|
|
@@ -838,36 +834,35 @@
|
|
|
838
834
|
.dsh-powerup-menu-foot-id{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--dsw-font-family-code,ui-monospace,SFMono-Regular,Consolas,monospace)}
|
|
839
835
|
.dsh-powerup-toast{position:fixed;left:50%;bottom:30px;transform:translateX(-50%);z-index:1001;max-width:min(440px,calc(100vw - 32px));padding:7px 12px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-layer-1));color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-lv2,0 8px 24px rgba(15,23,42,.18));font-size:12px;line-height:1.45;pointer-events:none;animation:dsh-powerup-toast-in .14s ease-out}
|
|
840
836
|
@keyframes dsh-powerup-toast-in{from{opacity:0;transform:translate(-50%,5px)}to{opacity:1;transform:translate(-50%,0)}}
|
|
841
|
-
.dsh-powerup-jobstop{position:fixed;z-index:1400;box-sizing:border-box;display:flex;flex-direction:column;
|
|
842
|
-
@keyframes dsh-powerup-jobstop-in{from{opacity:0;transform:translateY(4px)
|
|
843
|
-
.dsh-powerup-jobstop-head{display:flex;align-items:flex-start;gap:
|
|
844
|
-
.dsh-powerup-jobstop-
|
|
845
|
-
.dsh-powerup-jobstop-
|
|
846
|
-
.dsh-powerup-jobstop-
|
|
847
|
-
.dsh-powerup-jobstop-
|
|
848
|
-
.dsh-powerup-jobstop-close{
|
|
849
|
-
.dsh-powerup-jobstop-
|
|
850
|
-
.dsh-powerup-jobstop-
|
|
851
|
-
.dsh-powerup-jobstop-
|
|
852
|
-
.dsh-powerup-jobstop-label-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
837
|
+
.dsh-powerup-jobstop{position:fixed;z-index:1400;box-sizing:border-box;display:flex;flex-direction:column;padding:0 0 16px;border:0;border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-2);box-shadow:var(--dsw-elevation-prominent);--dsw-elevation-stroke-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);font-size:12px;line-height:18px;pointer-events:auto;overflow-y:auto;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);animation:dsh-powerup-jobstop-in .16s ease-out}
|
|
838
|
+
@keyframes dsh-powerup-jobstop-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
|
|
839
|
+
.dsh-powerup-jobstop-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:18px 12px 6px 20px}
|
|
840
|
+
.dsh-powerup-jobstop-heading{display:flex;flex-direction:column;gap:2px;min-width:0}
|
|
841
|
+
.dsh-powerup-jobstop-title{color:var(--dsw-alias-label-primary);font-size:16px;line-height:24px;font-weight:500}
|
|
842
|
+
.dsh-powerup-jobstop-subtitle{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}
|
|
843
|
+
.dsh-powerup-jobstop-close{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:-4px -2px 0 0;padding:0;border:0;border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:18px;line-height:1;cursor:pointer}
|
|
844
|
+
.dsh-powerup-jobstop-close:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
845
|
+
.dsh-powerup-jobstop-label{display:flex;align-items:center;gap:6px;min-width:0;margin:6px 20px 0;font-size:11.5px;line-height:18px}
|
|
846
|
+
.dsh-powerup-jobstop-dot{flex:none;width:6px;height:6px;border-radius:50%;background:var(--dsw-alias-state-success-primary)}
|
|
847
|
+
.dsh-powerup-jobstop-kind{flex:none;padding:0 5px;border-radius:var(--dsw-radius-xs);background:var(--dsw-specific-menu);color:var(--dsw-alias-label-tertiary);font-family:var(--dsw-font-family-code,ui-monospace,SFMono-Regular,Consolas,monospace);font-size:10.5px;line-height:16px}
|
|
848
|
+
.dsh-powerup-jobstop-label-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family-code,ui-monospace,SFMono-Regular,Consolas,monospace);font-size:11.5px;line-height:18px}
|
|
849
|
+
.dsh-powerup-jobstop-body{display:flex;flex-direction:column;gap:12px;margin-top:12px;padding:0 20px}
|
|
853
850
|
.dsh-powerup-jobstop-field{display:flex;flex-direction:column;gap:6px;min-width:0}
|
|
854
|
-
.dsh-powerup-jobstop-field-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
|
|
855
851
|
.dsh-powerup-jobstop-field-label{color:var(--dsw-alias-label-secondary);font-size:11.5px;line-height:17px}
|
|
856
|
-
.dsh-powerup-jobstop-
|
|
857
|
-
.dsh-powerup-jobstop-input{
|
|
858
|
-
.dsh-powerup-jobstop-input
|
|
859
|
-
.dsh-powerup-jobstop-input:
|
|
852
|
+
.dsh-powerup-jobstop-input{box-sizing:border-box;width:100%;height:34px;padding:0 12px;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:1.5;outline:none;transition:border-color .14s ease}
|
|
853
|
+
.dsh-powerup-jobstop-input::placeholder{color:var(--dsw-alias-label-dimmed)}
|
|
854
|
+
.dsh-powerup-jobstop-input:focus-visible{outline:none;border-color:var(--dsw-alias-state-business-primary)}
|
|
855
|
+
.dsh-powerup-jobstop-input:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}
|
|
860
856
|
.dsh-powerup-jobstop-note{margin:0;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}
|
|
861
|
-
.dsh-powerup-jobstop-error{margin:0;
|
|
862
|
-
.dsh-powerup-jobstop-
|
|
863
|
-
.dsh-powerup-jobstop-
|
|
864
|
-
.dsh-powerup-jobstop-
|
|
865
|
-
.dsh-powerup-jobstop-cancel
|
|
866
|
-
.dsh-powerup-jobstop-
|
|
867
|
-
.dsh-powerup-jobstop-confirm
|
|
868
|
-
.dsh-powerup-jobstop-confirm:
|
|
869
|
-
.dsh-powerup-jobstop-
|
|
870
|
-
.dsh-powerup-jobstop-cancel:focus-visible,.dsh-powerup-jobstop-confirm:focus-visible,.dsh-powerup-jobstop-close:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px}
|
|
857
|
+
.dsh-powerup-jobstop-error{margin:0;color:var(--dsw-alias-state-error-primary);font-size:11.5px;line-height:17px;overflow-wrap:anywhere}
|
|
858
|
+
.dsh-powerup-jobstop-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:14px 20px 0}
|
|
859
|
+
.dsh-powerup-jobstop-cancel{height:36px;padding:0 14px;border:0;border-radius:var(--dsw-radius-md);background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:14px;line-height:22px;cursor:pointer}
|
|
860
|
+
.dsh-powerup-jobstop-cancel:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
|
|
861
|
+
.dsh-powerup-jobstop-cancel:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}
|
|
862
|
+
.dsh-powerup-jobstop-confirm{height:36px;padding:0 14px;border:.5px solid color-mix(in srgb,var(--dsw-alias-state-error-primary) 45%,transparent);border-radius:var(--dsw-radius-md);background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 12%,transparent);color:var(--dsw-alias-state-error-primary);font:inherit;font-size:14px;line-height:22px;cursor:pointer;transition:background .14s ease}
|
|
863
|
+
.dsh-powerup-jobstop-confirm:hover:not(:disabled){background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 18%,transparent)}
|
|
864
|
+
.dsh-powerup-jobstop-confirm:disabled,.dsh-powerup-jobstop-cancel:disabled,.dsh-powerup-jobstop-close:disabled{opacity:.4;cursor:not-allowed}
|
|
865
|
+
.dsh-powerup-jobstop-cancel:focus-visible,.dsh-powerup-jobstop-confirm:focus-visible,.dsh-powerup-jobstop-close:focus-visible,.dsh-powerup-jobstop-input:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px}
|
|
871
866
|
@media (prefers-reduced-motion:reduce){.dsh-powerup-jobstop{animation:none}}
|
|
872
867
|
.dsh-powerup-update-button{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;border-radius:var(--dsw-radius-sm,6px);background:transparent;color:var(--dsw-alias-label-caption);cursor:pointer}
|
|
873
868
|
.dsh-powerup-update-button:hover{background:var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary)}
|
|
@@ -1734,30 +1729,14 @@
|
|
|
1734
1729
|
}
|
|
1735
1730
|
|
|
1736
1731
|
/**
|
|
1737
|
-
* The version
|
|
1738
|
-
*
|
|
1739
|
-
*
|
|
1740
|
-
* @
|
|
1732
|
+
* The version both install paths target: whatever is in the dialog's
|
|
1733
|
+
* version input. One-click install reads the same input instead of the
|
|
1734
|
+
* registry's newest version, so it can also reinstall or downgrade.
|
|
1735
|
+
* @param {{ version?: unknown }} view
|
|
1736
|
+
* @returns {string} a concrete version, or '' when the input is invalid.
|
|
1741
1737
|
*/
|
|
1742
|
-
function
|
|
1743
|
-
|
|
1744
|
-
if (declared !== '') return declared;
|
|
1745
|
-
const first = Array.isArray(view?.versions) ? view.versions[0] : null;
|
|
1746
|
-
return normalizeVersionInput(first);
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
/**
|
|
1750
|
-
* Whether a target version is strictly newer than the installed one.
|
|
1751
|
-
* @param {unknown} target
|
|
1752
|
-
* @param {unknown} current
|
|
1753
|
-
* @returns {boolean}
|
|
1754
|
-
*/
|
|
1755
|
-
function isUpdateAvailable(target, current) {
|
|
1756
|
-
const version = normalizeVersionInput(target);
|
|
1757
|
-
if (version === '') return false;
|
|
1758
|
-
const installed = normalizeVersionInput(current);
|
|
1759
|
-
if (installed === '') return true;
|
|
1760
|
-
return compareVersionsDesc(version, installed) < 0;
|
|
1738
|
+
function installVersion(view) {
|
|
1739
|
+
return normalizeVersionInput(view?.version);
|
|
1761
1740
|
}
|
|
1762
1741
|
|
|
1763
1742
|
/** A display title for a bundle, following the page's locale fallback. */
|
|
@@ -2308,7 +2287,7 @@
|
|
|
2308
2287
|
};
|
|
2309
2288
|
|
|
2310
2289
|
if (target === null) return null;
|
|
2311
|
-
const placement = popoverPlacement({ getBoundingClientRect: () => target.rect }, 340,
|
|
2290
|
+
const placement = popoverPlacement({ getBoundingClientRect: () => target.rect }, 340, 300);
|
|
2312
2291
|
// The body portal escapes every slot's stacking context, so the same
|
|
2313
2292
|
// panel is above the host jobs menu (z-index 100) in both themes.
|
|
2314
2293
|
return renderInBody(h('div', {
|
|
@@ -2339,7 +2318,6 @@
|
|
|
2339
2318
|
},
|
|
2340
2319
|
},
|
|
2341
2320
|
h('div', { className: 'dsh-powerup-jobstop-head' },
|
|
2342
|
-
h('div', { className: 'dsh-powerup-jobstop-icon' }, h(StopIcon, { size: 14 })),
|
|
2343
2321
|
h('div', { className: 'dsh-powerup-jobstop-heading' },
|
|
2344
2322
|
h('span', { className: 'dsh-powerup-jobstop-title' }, t('jobStop.title')),
|
|
2345
2323
|
h('span', { className: 'dsh-powerup-jobstop-subtitle' }, t('jobStop.subtitle')),
|
|
@@ -2355,42 +2333,41 @@
|
|
|
2355
2333
|
),
|
|
2356
2334
|
h('div', { className: 'dsh-powerup-jobstop-label', title: target.job.label },
|
|
2357
2335
|
h('span', { className: 'dsh-powerup-jobstop-dot', 'aria-hidden': 'true' }),
|
|
2336
|
+
typeof target.job.kind === 'string' && target.job.kind !== ''
|
|
2337
|
+
? h('span', { className: 'dsh-powerup-jobstop-kind' }, target.job.kind)
|
|
2338
|
+
: null,
|
|
2358
2339
|
h('span', { className: 'dsh-powerup-jobstop-label-text' }, target.job.label),
|
|
2359
2340
|
),
|
|
2360
|
-
h('
|
|
2361
|
-
h('
|
|
2341
|
+
h('div', { className: 'dsh-powerup-jobstop-body' },
|
|
2342
|
+
h('label', { className: 'dsh-powerup-jobstop-field' },
|
|
2362
2343
|
h('span', { className: 'dsh-powerup-jobstop-field-label' }, t('jobStop.reasonLabel')),
|
|
2363
|
-
h('
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
maxLength: JOB_STOP_REASON_MAX,
|
|
2371
|
-
placeholder: t('jobStop.reasonPlaceholder'),
|
|
2372
|
-
disabled: pending,
|
|
2373
|
-
onChange: (event) => setReason(event.target.value),
|
|
2374
|
-
}),
|
|
2375
|
-
),
|
|
2376
|
-
h('p', { className: 'dsh-powerup-jobstop-note' }, t('jobStop.reasonNote')),
|
|
2377
|
-
error === null ? null : h('p', { className: 'dsh-powerup-jobstop-error', role: 'alert' }, error),
|
|
2378
|
-
h('div', { className: 'dsh-powerup-jobstop-foot' },
|
|
2379
|
-
h('span', { className: 'dsh-powerup-jobstop-hint' }, t('jobStop.hint')),
|
|
2380
|
-
h('div', { className: 'dsh-powerup-jobstop-actions' },
|
|
2381
|
-
h('button', {
|
|
2382
|
-
type: 'button',
|
|
2383
|
-
className: 'dsh-powerup-jobstop-cancel',
|
|
2384
|
-
disabled: pending,
|
|
2385
|
-
onClick: close,
|
|
2386
|
-
}, t('jobStop.cancel')),
|
|
2387
|
-
h('button', {
|
|
2388
|
-
type: 'button',
|
|
2389
|
-
className: 'dsh-powerup-jobstop-confirm',
|
|
2344
|
+
h('input', {
|
|
2345
|
+
ref: inputRef,
|
|
2346
|
+
className: 'dsh-powerup-jobstop-input',
|
|
2347
|
+
type: 'text',
|
|
2348
|
+
value: reason,
|
|
2349
|
+
maxLength: JOB_STOP_REASON_MAX,
|
|
2350
|
+
placeholder: t('jobStop.reasonPlaceholder'),
|
|
2390
2351
|
disabled: pending,
|
|
2391
|
-
|
|
2392
|
-
}
|
|
2352
|
+
onChange: (event) => setReason(event.target.value),
|
|
2353
|
+
}),
|
|
2393
2354
|
),
|
|
2355
|
+
h('p', { className: 'dsh-powerup-jobstop-note' }, t('jobStop.reasonNote')),
|
|
2356
|
+
error === null ? null : h('p', { className: 'dsh-powerup-jobstop-error', role: 'alert' }, error),
|
|
2357
|
+
),
|
|
2358
|
+
h('div', { className: 'dsh-powerup-jobstop-actions' },
|
|
2359
|
+
h('button', {
|
|
2360
|
+
type: 'button',
|
|
2361
|
+
className: 'dsh-powerup-jobstop-cancel',
|
|
2362
|
+
disabled: pending,
|
|
2363
|
+
onClick: close,
|
|
2364
|
+
}, t('jobStop.cancel')),
|
|
2365
|
+
h('button', {
|
|
2366
|
+
type: 'button',
|
|
2367
|
+
className: 'dsh-powerup-jobstop-confirm',
|
|
2368
|
+
disabled: pending,
|
|
2369
|
+
onClick: () => { void submit(); },
|
|
2370
|
+
}, pending ? t('jobStop.stopping') : t('jobStop.confirm')),
|
|
2394
2371
|
)));
|
|
2395
2372
|
}
|
|
2396
2373
|
|
|
@@ -2926,20 +2903,16 @@
|
|
|
2926
2903
|
if (token === null || current === null || current.phase !== 'choose') return;
|
|
2927
2904
|
const t = tRef.current;
|
|
2928
2905
|
const oneClick = options?.oneClick === true;
|
|
2929
|
-
//
|
|
2930
|
-
//
|
|
2931
|
-
const version =
|
|
2906
|
+
// Both paths install the version in the input. One-click only skips
|
|
2907
|
+
// the enable/restart questions, so reinstalling or downgrading works.
|
|
2908
|
+
const version = installVersion(current);
|
|
2932
2909
|
if (version === '') {
|
|
2933
2910
|
setView((state) => state === null ? state : {
|
|
2934
2911
|
...state,
|
|
2935
|
-
formError: t(oneClick ? 'update.
|
|
2912
|
+
formError: t(oneClick ? 'update.oneClickNoVersion' : 'update.invalidVersion'),
|
|
2936
2913
|
});
|
|
2937
2914
|
return;
|
|
2938
2915
|
}
|
|
2939
|
-
if (oneClick && isUpdateAvailable(version, current.currentVersion) !== true) {
|
|
2940
|
-
setView((state) => state === null ? state : { ...state, formError: t('update.oneClickUpToDate') });
|
|
2941
|
-
return;
|
|
2942
|
-
}
|
|
2943
2916
|
const choice = current.choices.find((item) => item.key === current.registryKey) ?? current.choices[0];
|
|
2944
2917
|
const registry = registryValue(choice);
|
|
2945
2918
|
const spec = `${current.name}@${version}`;
|
|
@@ -3235,12 +3208,9 @@
|
|
|
3235
3208
|
const canClose = !busy;
|
|
3236
3209
|
const title = view.title === undefined || view.title === '' ? view.name : view.title;
|
|
3237
3210
|
const showVersions = view.phase === 'choose' && view.listOpen === true;
|
|
3238
|
-
//
|
|
3239
|
-
const quickVersion =
|
|
3240
|
-
const quickAvailable = view.self !== true
|
|
3241
|
-
&& view.versionsState === 'ready'
|
|
3242
|
-
&& quickVersion !== ''
|
|
3243
|
-
&& isUpdateAvailable(quickVersion, view.currentVersion);
|
|
3211
|
+
// One-click install uses exactly what the version input holds.
|
|
3212
|
+
const quickVersion = installVersion(view);
|
|
3213
|
+
const quickAvailable = view.self !== true && quickVersion !== '';
|
|
3244
3214
|
|
|
3245
3215
|
const footer = (() => {
|
|
3246
3216
|
if (view.phase === 'choose') {
|
|
@@ -3255,16 +3225,14 @@
|
|
|
3255
3225
|
disabled: !quickAvailable,
|
|
3256
3226
|
title: quickAvailable
|
|
3257
3227
|
? t('update.oneClickHint', { version: quickVersion })
|
|
3258
|
-
:
|
|
3259
|
-
? t('update.oneClickNoLatest')
|
|
3260
|
-
: t('update.oneClickUpToDate'),
|
|
3228
|
+
: t('update.oneClickNoVersion'),
|
|
3261
3229
|
onClick: () => startUpdate({ oneClick: true }),
|
|
3262
3230
|
}, h(QuickIcon, { size: 13 }), t('update.oneClick')),
|
|
3263
3231
|
h('button', {
|
|
3264
3232
|
key: 'start',
|
|
3265
3233
|
type: 'button',
|
|
3266
3234
|
className: 'dsh-powerup-update-primary',
|
|
3267
|
-
disabled:
|
|
3235
|
+
disabled: quickVersion === '',
|
|
3268
3236
|
onClick: () => startUpdate(),
|
|
3269
3237
|
}, t('update.start')),
|
|
3270
3238
|
].filter(Boolean);
|
|
@@ -3438,9 +3406,7 @@
|
|
|
3438
3406
|
),
|
|
3439
3407
|
h('p', { className: 'dsh-powerup-update-note' }, quickAvailable
|
|
3440
3408
|
? t('update.oneClickHint', { version: quickVersion })
|
|
3441
|
-
:
|
|
3442
|
-
? t('update.oneClickNoLatest')
|
|
3443
|
-
: t('update.oneClickUpToDate')),
|
|
3409
|
+
: t('update.oneClickNoVersion')),
|
|
3444
3410
|
quickAvailable
|
|
3445
3411
|
? h('p', { className: 'dsh-powerup-update-note' }, t('update.oneClickDefaults', {
|
|
3446
3412
|
enable: getSettings().oneClickEnable === false ? t('update.off') : t('update.on'),
|
|
@@ -4106,8 +4072,7 @@
|
|
|
4106
4072
|
readRememberedRegistry,
|
|
4107
4073
|
packageDisplayTitle,
|
|
4108
4074
|
normalizeVersionInput,
|
|
4109
|
-
|
|
4110
|
-
isUpdateAvailable,
|
|
4075
|
+
installVersion,
|
|
4111
4076
|
readSettings,
|
|
4112
4077
|
getSettings,
|
|
4113
4078
|
setSettings,
|
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Power-Up",
|
|
4
|
-
"description": "Adds a right-click action menu to the Trajectory ledger: copy a record, copy a Markdown quote, quote it into the composer, open the record inspector, fork the session at that record, export the trajectory snapshot, and copy the session ID. The session header's background jobs panel gains an optional stop reason when a job is stopped by hand; the reason is appended to the completion notice injected into the session. The Plugins page gains an
|
|
4
|
+
"description": "Adds a right-click action menu to the Trajectory ledger: copy a record, copy a Markdown quote, quote it into the composer, open the record inspector, fork the session at that record, export the trajectory snapshot, and copy the session ID. The session header's background jobs panel gains an optional stop reason when a job is stopped by hand; the reason is appended to the completion notice injected into the session. The Plugins page gains an install control on every third-party installed plugin: read versions from the registry, install the version in the input through the Add plugin path (removing the old copy first), then enable and optionally restart DSH. The install panel also offers a one-click install that installs the input version without the enable and restart questions, enabling and restarting automatically by default; both defaults are configurable on the Power-Up page."
|
|
5
5
|
}
|
|
6
6
|
}
|
package/locale/zh.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Power-Up",
|
|
4
|
-
"description": "在轨迹页面为记录增加右键操作菜单:复制内容、复制 Markdown 引用、引用到输入框、查看记录详情、从该记录 Fork 会话、导出轨迹快照、复制会话 ID
|
|
4
|
+
"description": "在轨迹页面为记录增加右键操作菜单:复制内容、复制 Markdown 引用、引用到输入框、查看记录详情、从该记录 Fork 会话、导出轨迹快照、复制会话 ID。在会话顶部的后台任务面板手动停止任务时可以填写停止原因,原因会附加在任务结束后注入会话的提示里。插件页为每个第三方已安装插件增加安装按钮:从安装源读取版本,按输入框中的版本先卸载旧版再按「添加插件」流程安装,完成后可立即启用并选择是否重启 DSH。安装面板还提供「一键安装」:按输入框版本安装并跳过启用与重启的询问,默认自动启用并重启,可在 Power-Up 页面调整默认行为。"
|
|
5
5
|
}
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restregular/dsh-powerup",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Power-Up — small, opt-in upgrades for DeepSeek Harness. Adds a right-click action menu to the Trajectory ledger, an optional stop reason in the session header's background jobs panel (appended to the injected completion notice), and an
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Power-Up — small, opt-in upgrades for DeepSeek Harness. Adds a right-click action menu to the Trajectory ledger, an optional stop reason in the session header's background jobs panel (appended to the injected completion notice), and an install control for third-party plugins from the Plugins page: read versions from the configured registries, install the version in the input through the Add plugin path (removing the old copy first), mark restart-needed installs, hand Power-Up's own install to the background, and optionally restart DSH. One-click install skips the enable and restart questions and can apply those actions automatically with configurable defaults. · 为 DeepSeek Harness 提供小型增强:在轨迹页面右键记录即可复制、引用、查看详情或从该记录 Fork;在会话顶部的后台任务面板手动停止任务时可填写停止原因,原因会附加到任务结束后的会话提示;并在插件页为第三方已安装插件提供安装按钮,从安装源读取版本,按输入框中的版本沿用「添加插件」流程安装(先卸载旧版),支持待重启标记、Power-Up 自身后台安装与可选重启;安装面板提供「一键安装」,按输入框版本安装并跳过启用/重启询问,默认自动启用并重启,可在 Power-Up 页面调整默认行为。",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "index.js",
|