@dsh-workbench/core 1.1.11 → 1.1.13
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 +1 -0
- package/client.js +181 -76
- package/dist/client/client.body.js +181 -76
- package/dist/client/index.js +174 -69
- package/dist/host/index.js +45 -15
- package/dist/types/app/layouts/env-gate/gate-text.d.ts +5 -0
- package/dist/types/app/layouts/market/use-market-reload.d.ts +10 -4
- package/dist/types/app/layouts/market/use-module-versions.d.ts +9 -8
- package/dist/types/app/layouts/rightbar/MarketView.d.ts +2 -3
- package/dist/types/app/layouts/rightbar/market-act.d.ts +2 -3
- package/dist/types/modules/panels/model/plugin-section.d.ts +1 -0
- package/dist/types/shared/hooks/bundle-queries.d.ts +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -166,6 +166,7 @@ dsh-workbench migrate --force # 已经迁过一次、想再补并一次
|
|
|
166
166
|
| 自检说「连接浏览器 · 还没连上」/ 面板取不到数据 | 扩展没装或没启用:从 [Chrome 应用商店](https://chromewebstore.google.com/detail/opencli/ildkmabpimmkaediidaifkhjpohdnifk)装 OpenCLI,在扩展页确认启用,保持浏览器开着,回「准备工作台」那一屏点「重试」。多个浏览器账号会要求先选默认的那个:按页面上给的那条命令做 |
|
|
167
167
|
| 体检说「连接浏览器 · 还没连上」,可面板照样能用 | 本机全局 opencli 与隔离运行时版本不一致,daemon 被顶成对方那版;下一条浏览器命令会自动把它重启回来,复检后改回「已连接」 |
|
|
168
168
|
| Desktop 里体检一直「没连上」 | 浏览器没开。「准备工作台」那一屏有「打开浏览器」,点了才开上次承载扩展的那个(没记住就用 Chrome),开完自动复检;点了会切到 Chrome 前台(冷启动抢焦点,静默做不到)。仍连不上多半是扩展没装或被禁用 |
|
|
169
|
+
| 准备页停住、说「命令行没有返回」 | 命令发出去了、结果没回来(宿主那边的子进程没起来,常见于 Windows 沙箱的残留锁文件)。完全退出工作台(托盘图标也要退),清掉系统临时目录里 `dsh-` 开头的残留,再打开;反复出现就升级 dsh 客户端。重装 Node / npm / pnpm 没用 —— 工具本身是好的 |
|
|
169
170
|
| 模型列表里只有出厂的几个、没有自己配的供应商 | 新 profile 不带设置。设置 → 工作台设置 → 配置同步 → 勾 `llm-` 那几行 → 同步 |
|
|
170
171
|
| 配置同步里某行说 `@x 还没装` | 那一行点名的包不在这个 profile 的 `node_modules` 里:`dsh plugin --profile workbench add @x`(或在模块市场装),装完 dsh 会自行重组,它报 `restartReason` 时才重启 |
|
|
171
172
|
| 启动被拒,说 dsh 太旧 | `npm i -g @deepseek-ai/dsh@latest`,装完重启工作台 |
|
package/client.js
CHANGED
|
@@ -802,7 +802,7 @@ window.__ModuleLoader__.load({
|
|
|
802
802
|
react$1.useLayoutEffect;
|
|
803
803
|
var useMemo$10 = react$1.useMemo;
|
|
804
804
|
react$1.useCallback;
|
|
805
|
-
var useRef$
|
|
805
|
+
var useRef$23 = react$1.useRef;
|
|
806
806
|
react$1.useSyncExternalStore;
|
|
807
807
|
//#endregion
|
|
808
808
|
//#region ../shared/dist/components/Activity.js
|
|
@@ -1587,7 +1587,7 @@ window.__ModuleLoader__.load({
|
|
|
1587
1587
|
const { fields, onSubmit, submit, cancel, extra, busy = false, disabled = false, problem } = props;
|
|
1588
1588
|
const [done, setDone] = useState$43(false);
|
|
1589
1589
|
const [reveal, setReveal] = useState$43(0);
|
|
1590
|
-
const rootRef = useRef$
|
|
1590
|
+
const rootRef = useRef$23(null);
|
|
1591
1591
|
const shown = visibleFieldsOf(fields);
|
|
1592
1592
|
const problems = formProblemsOf(shown, done);
|
|
1593
1593
|
reportDuplicateKeys(shown);
|
|
@@ -2103,11 +2103,11 @@ window.__ModuleLoader__.load({
|
|
|
2103
2103
|
const [openState, setOpenState] = useState$43(false);
|
|
2104
2104
|
const [query, setQuery] = useState$43("");
|
|
2105
2105
|
const [cursor, setCursor] = useState$43(null);
|
|
2106
|
-
const boxRef = useRef$
|
|
2107
|
-
const triggerRef = useRef$
|
|
2108
|
-
const wasOpenRef = useRef$
|
|
2109
|
-
const pickedRef = useRef$
|
|
2110
|
-
const closedByUsRef = useRef$
|
|
2106
|
+
const boxRef = useRef$23(null);
|
|
2107
|
+
const triggerRef = useRef$23(null);
|
|
2108
|
+
const wasOpenRef = useRef$23(false);
|
|
2109
|
+
const pickedRef = useRef$23(false);
|
|
2110
|
+
const closedByUsRef = useRef$23(false);
|
|
2111
2111
|
const open = openProp ?? openState;
|
|
2112
2112
|
const setOpen = (next) => {
|
|
2113
2113
|
if (openProp === void 0) setOpenState(next);
|
|
@@ -3581,6 +3581,7 @@ window.__ModuleLoader__.load({
|
|
|
3581
3581
|
"env.stepFailed.install": "install failed",
|
|
3582
3582
|
"env.stepFailed.path": "installed but not found",
|
|
3583
3583
|
"env.stepFailed.shell": "cannot reach the command line",
|
|
3584
|
+
"env.stepFailed.host": "the command never returned",
|
|
3584
3585
|
"env.toolchain.ok": "Looks good",
|
|
3585
3586
|
"env.toolchain.warn": "Almost ready",
|
|
3586
3587
|
"env.runtime.ok": "Ready",
|
|
@@ -3593,9 +3594,11 @@ window.__ModuleLoader__.load({
|
|
|
3593
3594
|
"env.fix.why": "The workbench uses its own background tool (installed separately from the one in your terminal), and it is not set up on this machine yet.",
|
|
3594
3595
|
"env.fix.whyPath": "The background tool is installed, but this environment cannot find it — usually a PATH or shell-session issue.",
|
|
3595
3596
|
"env.fix.whyShell": "The workbench cannot reach the command line on this machine, so it cannot fetch data — you cannot install this from here; someone needs to fix the background environment.",
|
|
3597
|
+
"env.fix.whyHost": "The workbench runs a few checks on the command line and collects what they return; this time the command went out and nothing came back. The tools themselves are most likely fine — reinstalling Node / npm / pnpm will not help.",
|
|
3596
3598
|
"env.fix.step": "Run this in a terminal, then hit Retry:",
|
|
3597
3599
|
"env.fix.stepPath": "Open a new terminal window (or make sure npm’s global bin directory is on PATH), then hit Retry.",
|
|
3598
3600
|
"env.fix.stepShell": "Restart the workbench (or dsh); if it keeps happening, the workbench still cannot reach the command line.",
|
|
3601
|
+
"env.fix.stepHost": "Quit the workbench completely (including the tray icon), clear the dsh-* leftovers in the system temp folder, then open it again. If it keeps happening, update dsh.",
|
|
3599
3602
|
"env.fix.permission": "Permission denied: rerun with sudo, or point npm’s global directory at your home.",
|
|
3600
3603
|
"env.fix.network": "Network unreachable: check your network or proxy, then retry.",
|
|
3601
3604
|
"env.fix.details": "Details (for troubleshooting)",
|
|
@@ -4347,6 +4350,7 @@ window.__ModuleLoader__.load({
|
|
|
4347
4350
|
"env.stepFailed.install": "装不上",
|
|
4348
4351
|
"env.stepFailed.path": "装了但还找不到",
|
|
4349
4352
|
"env.stepFailed.shell": "连不上命令行",
|
|
4353
|
+
"env.stepFailed.host": "命令行没有返回",
|
|
4350
4354
|
"env.toolchain.ok": "正常",
|
|
4351
4355
|
"env.toolchain.warn": "还没完全准备好",
|
|
4352
4356
|
"env.runtime.ok": "已就绪",
|
|
@@ -4359,9 +4363,11 @@ window.__ModuleLoader__.load({
|
|
|
4359
4363
|
"env.fix.why": "工作台用它自己那份后台工具(与你在终端里那套分开装,互不影响),这台机器上还没装好它。",
|
|
4360
4364
|
"env.fix.whyPath": "后台工具装上了,但当前环境还找不到它 —— 通常是 PATH 或终端会话的问题。",
|
|
4361
4365
|
"env.fix.whyShell": "工作台拿不到这台机器的命令行,所以取不了数据 —— 这一步你装不了,需要有人处理后台环境。",
|
|
4366
|
+
"env.fix.whyHost": "工作台要靠命令行跑几条检查,再把结果收回来;这次命令发出去了,结果一直没回来。工具本身多半是好的 —— 重装 Node / npm / pnpm 不会有帮助。",
|
|
4362
4367
|
"env.fix.step": "在终端里运行下面这条命令,装好之后点「重试」:",
|
|
4363
4368
|
"env.fix.stepPath": "新开一个终端窗口(或确认 npm 的全局 bin 目录在 PATH 里),然后点「重试」。",
|
|
4364
4369
|
"env.fix.stepShell": "重启一次工作台(或 dsh);如果反复出现,说明工作台还是拿不到命令行。",
|
|
4370
|
+
"env.fix.stepHost": "完全退出工作台(托盘图标也要退),清掉系统临时目录里 dsh- 开头的残留,再重新打开;反复出现就升级 dsh。",
|
|
4365
4371
|
"env.fix.permission": "权限不够:在命令前加 sudo 重跑,或先把 npm 的全局目录配到你的用户目录。",
|
|
4366
4372
|
"env.fix.network": "网络不通:检查网络或代理设置后重试。",
|
|
4367
4373
|
"env.fix.details": "详细输出(排障用)",
|
|
@@ -10390,11 +10396,17 @@ window.__ModuleLoader__.load({
|
|
|
10390
10396
|
...registry === void 0 || registry === "" ? {} : { registry }
|
|
10391
10397
|
});
|
|
10392
10398
|
}
|
|
10393
|
-
function readModuleVersions(force = false) {
|
|
10394
|
-
return apiGet(MODULE_VERSIONS_ROUTE,
|
|
10399
|
+
function readModuleVersions(force = false, check = true) {
|
|
10400
|
+
return apiGet(MODULE_VERSIONS_ROUTE, {
|
|
10401
|
+
...force ? { force: "1" } : {},
|
|
10402
|
+
...check ? {} : { check: "0" }
|
|
10403
|
+
});
|
|
10395
10404
|
}
|
|
10396
|
-
function readInstalledPlugins(force = false) {
|
|
10397
|
-
return apiGet(INSTALLED_PLUGINS_ROUTE,
|
|
10405
|
+
function readInstalledPlugins(force = false, check = true) {
|
|
10406
|
+
return apiGet(INSTALLED_PLUGINS_ROUTE, {
|
|
10407
|
+
...force ? { force: "1" } : {},
|
|
10408
|
+
...check ? {} : { check: "0" }
|
|
10409
|
+
});
|
|
10398
10410
|
}
|
|
10399
10411
|
//#endregion
|
|
10400
10412
|
//#region src/app/layouts/market/use-module-versions.ts
|
|
@@ -10423,6 +10435,10 @@ window.__ModuleLoader__.load({
|
|
|
10423
10435
|
modules: -1,
|
|
10424
10436
|
plugins: -1
|
|
10425
10437
|
};
|
|
10438
|
+
var newestDataSeq = {
|
|
10439
|
+
modules: -1,
|
|
10440
|
+
plugins: -1
|
|
10441
|
+
};
|
|
10426
10442
|
var epoch = 0;
|
|
10427
10443
|
var allSeq = 0;
|
|
10428
10444
|
function bumpModuleVersionsEpoch() {
|
|
@@ -10449,9 +10465,39 @@ window.__ModuleLoader__.load({
|
|
|
10449
10465
|
};
|
|
10450
10466
|
});
|
|
10451
10467
|
}
|
|
10452
|
-
function
|
|
10453
|
-
|
|
10454
|
-
|
|
10468
|
+
function withPreviousLatest(modules, previous) {
|
|
10469
|
+
if (previous.length === 0) return modules;
|
|
10470
|
+
const byPkg = new Map(previous.map((module) => [module.pkg, module]));
|
|
10471
|
+
return modules.map((module) => {
|
|
10472
|
+
const old = byPkg.get(module.pkg);
|
|
10473
|
+
if (old === void 0) return module;
|
|
10474
|
+
return {
|
|
10475
|
+
...module,
|
|
10476
|
+
...module.latest === void 0 && old.latest !== void 0 ? { latest: old.latest } : {},
|
|
10477
|
+
...module.latestBlocked === void 0 && old.latestBlocked !== void 0 ? { latestBlocked: old.latestBlocked } : {},
|
|
10478
|
+
...module.latestUnavailable === void 0 && old.latestUnavailable !== void 0 ? { latestUnavailable: old.latestUnavailable } : {}
|
|
10479
|
+
};
|
|
10480
|
+
});
|
|
10481
|
+
}
|
|
10482
|
+
function withPreviousPluginLatest(plugins, previous) {
|
|
10483
|
+
if (previous.length === 0) return plugins;
|
|
10484
|
+
const byPkg = new Map(previous.map((plugin) => [plugin.pkg, plugin]));
|
|
10485
|
+
return plugins.map((plugin) => {
|
|
10486
|
+
const old = byPkg.get(plugin.pkg);
|
|
10487
|
+
if (old === void 0 || plugin.latest !== void 0 || old.latest === void 0) return plugin;
|
|
10488
|
+
return {
|
|
10489
|
+
...plugin,
|
|
10490
|
+
latest: old.latest
|
|
10491
|
+
};
|
|
10492
|
+
});
|
|
10493
|
+
}
|
|
10494
|
+
function withPreviousWorkbenchLatest(next, previous) {
|
|
10495
|
+
if (next === null || previous === null) return next;
|
|
10496
|
+
if (next.latest !== void 0 || previous.latest === void 0 || next.pkg !== previous.pkg) return next;
|
|
10497
|
+
return {
|
|
10498
|
+
...next,
|
|
10499
|
+
latest: previous.latest
|
|
10500
|
+
};
|
|
10455
10501
|
}
|
|
10456
10502
|
function moduleVersionsChecking(value) {
|
|
10457
10503
|
return value.allChecking || value.modulesCheck.checking || value.pluginsCheck.checking;
|
|
@@ -10482,72 +10528,104 @@ window.__ModuleLoader__.load({
|
|
|
10482
10528
|
checkedAt: ok ? at : seat.checkedAt
|
|
10483
10529
|
};
|
|
10484
10530
|
}
|
|
10485
|
-
function readModulesOnce(force) {
|
|
10486
|
-
return Promise.all([readModuleVersions(force), readMarketInstalled()]).catch(() => null);
|
|
10531
|
+
function readModulesOnce(force, check) {
|
|
10532
|
+
return Promise.all([readModuleVersions(force, check), readMarketInstalled()]).catch(() => null);
|
|
10487
10533
|
}
|
|
10488
|
-
function readPluginsOnce(force) {
|
|
10489
|
-
return readInstalledPlugins(force).catch(() => null);
|
|
10534
|
+
function readPluginsOnce(force, check) {
|
|
10535
|
+
return readInstalledPlugins(force, check).catch(() => null);
|
|
10490
10536
|
}
|
|
10491
|
-
function
|
|
10537
|
+
function readKey(run) {
|
|
10538
|
+
return `${run.kind}:${run.scope}:${run.force ? "force" : "cached"}`;
|
|
10539
|
+
}
|
|
10540
|
+
function superseded(run, part, ticket) {
|
|
10541
|
+
if (run.kind === "data") return ticket < newestDataSeq[part];
|
|
10542
|
+
return !run.force && ticket < newestForceSeq[part];
|
|
10543
|
+
}
|
|
10544
|
+
function runRead(run) {
|
|
10492
10545
|
const at = epoch;
|
|
10493
|
-
const
|
|
10494
|
-
|
|
10495
|
-
|
|
10546
|
+
const key = readKey(run);
|
|
10547
|
+
const running = inFlight.get(key);
|
|
10548
|
+
if (!run.fresh && running !== void 0 && running.epoch === at) return running.promise;
|
|
10549
|
+
const check = run.kind === "check";
|
|
10550
|
+
const allTicket = run.scope === "all" ? allSeq += 1 : allSeq;
|
|
10496
10551
|
const tickets = /* @__PURE__ */ new Map();
|
|
10497
|
-
for (const part of partsOf(scope)) {
|
|
10552
|
+
for (const part of partsOf(run.scope)) {
|
|
10498
10553
|
const ticket = seq$1[part] += 1;
|
|
10499
10554
|
tickets.set(part, ticket);
|
|
10500
|
-
if (force) newestForceSeq[part] = ticket;
|
|
10555
|
+
if (run.force) newestForceSeq[part] = ticket;
|
|
10556
|
+
if (!check) newestDataSeq[part] = ticket;
|
|
10501
10557
|
}
|
|
10502
|
-
publish$1(checking(scope));
|
|
10503
|
-
const
|
|
10504
|
-
const
|
|
10505
|
-
const
|
|
10506
|
-
if (at !== epoch) return;
|
|
10507
|
-
const
|
|
10508
|
-
const
|
|
10509
|
-
const
|
|
10510
|
-
const
|
|
10511
|
-
const pluginsLanded = pluginsTicket !== void 0 && (force || pluginsTicket >= newestForceSeq.plugins);
|
|
10512
|
-
const modulesOk = modulesLanded && modules !== null && modules[0].ok === true;
|
|
10513
|
-
const pluginsOk = pluginsLanded && plugins !== null && plugins.ok === true;
|
|
10558
|
+
if (check) publish$1(checking(run.scope));
|
|
10559
|
+
const modulesTicket = tickets.get("modules");
|
|
10560
|
+
const pluginsTicket = tickets.get("plugins");
|
|
10561
|
+
const modulesRead = modulesTicket === void 0 ? null : readModulesOnce(run.force, check).then((response) => {
|
|
10562
|
+
if (at !== epoch || response === null || superseded(run, "modules", modulesTicket)) return;
|
|
10563
|
+
const [modules, market] = response;
|
|
10564
|
+
const payload = modules.ok === true ? modules : null;
|
|
10565
|
+
const listed = payload === null ? null : withMarketUpdates(payload.modules, market.ok === true ? market.modules : []);
|
|
10566
|
+
const shown = listed === null ? null : check ? listed : withPreviousLatest(listed, state.modules ?? []);
|
|
10514
10567
|
publish$1({
|
|
10515
10568
|
...state,
|
|
10516
|
-
modules:
|
|
10517
|
-
workbench:
|
|
10518
|
-
selfUpdate:
|
|
10519
|
-
plugins: pluginsOk ? plugins.plugins : state.plugins,
|
|
10569
|
+
modules: shown ?? state.modules,
|
|
10570
|
+
workbench: payload === null ? state.workbench : check ? payload.workbench ?? null : withPreviousWorkbenchLatest(payload.workbench ?? null, state.workbench),
|
|
10571
|
+
selfUpdate: payload === null ? state.selfUpdate : payload.selfUpdate ?? null,
|
|
10520
10572
|
read: true,
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10573
|
+
...check ? { modulesCheck: landed(state.modulesCheck, modulesTicket, seq$1.modules, payload !== null, Date.now()) } : {}
|
|
10574
|
+
});
|
|
10575
|
+
});
|
|
10576
|
+
const pluginsRead = pluginsTicket === void 0 ? null : readPluginsOnce(run.force, check).then((response) => {
|
|
10577
|
+
if (at !== epoch || response === null || superseded(run, "plugins", pluginsTicket)) return;
|
|
10578
|
+
const ok = response.ok === true;
|
|
10579
|
+
publish$1({
|
|
10580
|
+
...state,
|
|
10581
|
+
plugins: ok ? check ? response.plugins : withPreviousPluginLatest(response.plugins, state.plugins ?? []) : state.plugins,
|
|
10582
|
+
...check ? { pluginsCheck: landed(state.pluginsCheck, pluginsTicket, seq$1.plugins, ok, Date.now()) } : {}
|
|
10583
|
+
});
|
|
10584
|
+
});
|
|
10585
|
+
const promise = Promise.all([modulesRead, pluginsRead]).then(() => {
|
|
10586
|
+
if (at !== epoch || !check || run.scope !== "all" || allTicket !== allSeq) return;
|
|
10587
|
+
if (!state.allChecking) return;
|
|
10588
|
+
publish$1({
|
|
10589
|
+
...state,
|
|
10590
|
+
allChecking: false
|
|
10524
10591
|
});
|
|
10525
10592
|
}).finally(() => {
|
|
10526
|
-
if (inFlight.get(
|
|
10593
|
+
if (inFlight.get(key)?.promise === promise) inFlight.delete(key);
|
|
10527
10594
|
});
|
|
10528
|
-
inFlight.set(
|
|
10529
|
-
force,
|
|
10595
|
+
inFlight.set(key, {
|
|
10530
10596
|
epoch: at,
|
|
10531
10597
|
promise
|
|
10532
10598
|
});
|
|
10533
10599
|
return promise;
|
|
10534
10600
|
}
|
|
10601
|
+
function runModuleVersionsRead(force = false, fresh = false, scope = "all") {
|
|
10602
|
+
return runRead({
|
|
10603
|
+
kind: "check",
|
|
10604
|
+
force,
|
|
10605
|
+
fresh,
|
|
10606
|
+
scope
|
|
10607
|
+
});
|
|
10608
|
+
}
|
|
10609
|
+
function runInstalledRead(options = {}) {
|
|
10610
|
+
return runRead({
|
|
10611
|
+
kind: "data",
|
|
10612
|
+
force: false,
|
|
10613
|
+
fresh: options.fresh === true,
|
|
10614
|
+
scope: "all"
|
|
10615
|
+
});
|
|
10616
|
+
}
|
|
10535
10617
|
function useModuleVersions() {
|
|
10536
10618
|
const value = (0, react.useSyncExternalStore)(subscribeModuleVersions, moduleVersionsValue);
|
|
10537
10619
|
const factRev = useFactRevision(CAPABILITY_FACT);
|
|
10538
|
-
const mountedRef = (0, react.useRef)(false);
|
|
10539
10620
|
(0, react.useEffect)(() => {
|
|
10540
|
-
|
|
10541
|
-
mountedRef.current = true;
|
|
10542
|
-
if (first && !shouldProbeOnEnter({
|
|
10543
|
-
checkedAt: moduleVersionsCheckedAt(state),
|
|
10544
|
-
now: Date.now(),
|
|
10545
|
-
staleMs: MARKET_STALE_MS
|
|
10546
|
-
})) return;
|
|
10547
|
-
runModuleVersionsRead(false);
|
|
10621
|
+
runInstalledRead();
|
|
10548
10622
|
}, [factRev]);
|
|
10549
10623
|
const reload = (0, react.useCallback)((options) => {
|
|
10550
|
-
|
|
10624
|
+
if (options?.check === true) {
|
|
10625
|
+
runModuleVersionsRead(options.force === true, options.fresh === true, options.scope ?? "all");
|
|
10626
|
+
return;
|
|
10627
|
+
}
|
|
10628
|
+
runInstalledRead({ fresh: options?.fresh === true });
|
|
10551
10629
|
}, []);
|
|
10552
10630
|
return {
|
|
10553
10631
|
...value,
|
|
@@ -10564,29 +10642,36 @@ window.__ModuleLoader__.load({
|
|
|
10564
10642
|
bumpModuleVersionsEpoch();
|
|
10565
10643
|
bumpCapabilityEpoch();
|
|
10566
10644
|
forceProbe();
|
|
10567
|
-
|
|
10568
|
-
force: true,
|
|
10569
|
-
fresh: true
|
|
10570
|
-
});
|
|
10571
|
-
return;
|
|
10572
|
-
}
|
|
10573
|
-
reloadCapability();
|
|
10645
|
+
} else reloadCapability();
|
|
10574
10646
|
reloadVersions();
|
|
10575
10647
|
}, [
|
|
10576
10648
|
reloadCapability,
|
|
10577
10649
|
reloadVersions,
|
|
10578
10650
|
forceProbe
|
|
10579
10651
|
]);
|
|
10580
|
-
const
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10652
|
+
const check = (0, react.useCallback)((options) => {
|
|
10653
|
+
reloadVersions({
|
|
10654
|
+
check: true,
|
|
10655
|
+
force: options?.force === true,
|
|
10656
|
+
fresh: true,
|
|
10657
|
+
...options?.scope === void 0 ? {} : { scope: options.scope }
|
|
10658
|
+
});
|
|
10659
|
+
}, [reloadVersions]);
|
|
10660
|
+
const recheck = (0, react.useCallback)(() => {
|
|
10661
|
+
bumpCapabilityEpoch();
|
|
10662
|
+
forceProbe();
|
|
10663
|
+
check({ force: true });
|
|
10664
|
+
}, [check, forceProbe]);
|
|
10665
|
+
const checkPart = (0, react.useCallback)((part) => {
|
|
10666
|
+
check({
|
|
10667
|
+
force: true,
|
|
10668
|
+
scope: part
|
|
10669
|
+
});
|
|
10670
|
+
}, [check]);
|
|
10585
10671
|
const enteredRef = (0, react.useRef)(false);
|
|
10586
10672
|
(0, react.useEffect)(() => {
|
|
10587
10673
|
if (enteredRef.current) return;
|
|
10588
10674
|
enteredRef.current = true;
|
|
10589
|
-
reloadVersions();
|
|
10590
10675
|
if (!shouldProbeOnEnter({
|
|
10591
10676
|
checkedAt,
|
|
10592
10677
|
now: Date.now(),
|
|
@@ -10594,13 +10679,15 @@ window.__ModuleLoader__.load({
|
|
|
10594
10679
|
})) return;
|
|
10595
10680
|
markNextProbeSilent();
|
|
10596
10681
|
forceProbe();
|
|
10682
|
+
check();
|
|
10597
10683
|
}, [
|
|
10598
10684
|
checkedAt,
|
|
10599
10685
|
forceProbe,
|
|
10600
|
-
|
|
10686
|
+
check
|
|
10601
10687
|
]);
|
|
10602
10688
|
return {
|
|
10603
10689
|
reload,
|
|
10690
|
+
recheck,
|
|
10604
10691
|
checkPart
|
|
10605
10692
|
};
|
|
10606
10693
|
}
|
|
@@ -11297,7 +11384,7 @@ window.__ModuleLoader__.load({
|
|
|
11297
11384
|
const openAddModule = (0, react.useCallback)(() => setAdding(true), []);
|
|
11298
11385
|
const updates = (0, react.useMemo)(() => marketUpdatesOf(modules), [modules]);
|
|
11299
11386
|
const installed = modules === null ? void 0 : withClientRefusals(modules, units.refusals());
|
|
11300
|
-
const { reload, checkPart } = useMarketReload({
|
|
11387
|
+
const { reload, recheck, checkPart } = useMarketReload({
|
|
11301
11388
|
checkedAt,
|
|
11302
11389
|
forceProbe,
|
|
11303
11390
|
reloadCapability,
|
|
@@ -11328,7 +11415,7 @@ window.__ModuleLoader__.load({
|
|
|
11328
11415
|
busy,
|
|
11329
11416
|
checking: checking || versionsAllChecking,
|
|
11330
11417
|
onTab: setTab,
|
|
11331
|
-
onReload:
|
|
11418
|
+
onReload: recheck,
|
|
11332
11419
|
onAdd: openAddModule
|
|
11333
11420
|
}), devMarket.strip, /* @__PURE__ */ (0, react.createElement)("div", {
|
|
11334
11421
|
id: `${MARKET_PANEL_ID}-panel-installed`,
|
|
@@ -12958,8 +13045,27 @@ window.__ModuleLoader__.load({
|
|
|
12958
13045
|
function failedStepText(guidance, t) {
|
|
12959
13046
|
if (guidance === "path") return t("env.stepFailed.path");
|
|
12960
13047
|
if (guidance === "shell") return t("env.stepFailed.shell");
|
|
13048
|
+
if (guidance === "host") return t("env.stepFailed.host");
|
|
12961
13049
|
return t("env.stepFailed.install");
|
|
12962
13050
|
}
|
|
13051
|
+
function guidanceTextOf(guidance, t) {
|
|
13052
|
+
if (guidance === "path") return {
|
|
13053
|
+
why: t("env.fix.whyPath"),
|
|
13054
|
+
step: t("env.fix.stepPath")
|
|
13055
|
+
};
|
|
13056
|
+
if (guidance === "shell") return {
|
|
13057
|
+
why: t("env.fix.whyShell"),
|
|
13058
|
+
step: t("env.fix.stepShell")
|
|
13059
|
+
};
|
|
13060
|
+
if (guidance === "host") return {
|
|
13061
|
+
why: t("env.fix.whyHost"),
|
|
13062
|
+
step: t("env.fix.stepHost")
|
|
13063
|
+
};
|
|
13064
|
+
return {
|
|
13065
|
+
why: t("env.fix.why"),
|
|
13066
|
+
step: t("env.fix.step")
|
|
13067
|
+
};
|
|
13068
|
+
}
|
|
12963
13069
|
function stepDetailText(step, snapshot, t) {
|
|
12964
13070
|
if (step.status === "failed") return failedStepText(snapshot.guidance, t);
|
|
12965
13071
|
if (step.status === "pending" || step.status === "running") return "";
|
|
@@ -13303,10 +13409,9 @@ window.__ModuleLoader__.load({
|
|
|
13303
13409
|
errorBox.hidden = snapshot.error === void 0;
|
|
13304
13410
|
const commandText = snapshot.steps.find((step) => step.status === "failed" && step.command !== void 0)?.command;
|
|
13305
13411
|
const guidance = snapshot.guidance ?? "install";
|
|
13306
|
-
const
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
fixStep.textContent = step;
|
|
13412
|
+
const advice = guidanceTextOf(guidance, t);
|
|
13413
|
+
fixWhy.textContent = advice.why;
|
|
13414
|
+
fixStep.textContent = advice.step;
|
|
13310
13415
|
const showCommand = guidance === "install" && commandText !== void 0;
|
|
13311
13416
|
fixCommand.set(showCommand ? commandText : void 0);
|
|
13312
13417
|
fixAdvice.textContent = !showCommand ? "" : snapshot.failure === "permission" ? t("env.fix.permission") : snapshot.failure === "network" ? t("env.fix.network") : "";
|