@dsh-workbench/core 1.1.12 → 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 +28 -4
- package/dist/client/client.body.js +28 -4
- package/dist/client/index.js +28 -4
- package/dist/host/index.js +35 -9
- package/dist/types/app/layouts/env-gate/gate-text.d.ts +5 -0
- 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
|
@@ -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": "详细输出(排障用)",
|
|
@@ -13039,8 +13045,27 @@ window.__ModuleLoader__.load({
|
|
|
13039
13045
|
function failedStepText(guidance, t) {
|
|
13040
13046
|
if (guidance === "path") return t("env.stepFailed.path");
|
|
13041
13047
|
if (guidance === "shell") return t("env.stepFailed.shell");
|
|
13048
|
+
if (guidance === "host") return t("env.stepFailed.host");
|
|
13042
13049
|
return t("env.stepFailed.install");
|
|
13043
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
|
+
}
|
|
13044
13069
|
function stepDetailText(step, snapshot, t) {
|
|
13045
13070
|
if (step.status === "failed") return failedStepText(snapshot.guidance, t);
|
|
13046
13071
|
if (step.status === "pending" || step.status === "running") return "";
|
|
@@ -13384,10 +13409,9 @@ window.__ModuleLoader__.load({
|
|
|
13384
13409
|
errorBox.hidden = snapshot.error === void 0;
|
|
13385
13410
|
const commandText = snapshot.steps.find((step) => step.status === "failed" && step.command !== void 0)?.command;
|
|
13386
13411
|
const guidance = snapshot.guidance ?? "install";
|
|
13387
|
-
const
|
|
13388
|
-
|
|
13389
|
-
|
|
13390
|
-
fixStep.textContent = step;
|
|
13412
|
+
const advice = guidanceTextOf(guidance, t);
|
|
13413
|
+
fixWhy.textContent = advice.why;
|
|
13414
|
+
fixStep.textContent = advice.step;
|
|
13391
13415
|
const showCommand = guidance === "install" && commandText !== void 0;
|
|
13392
13416
|
fixCommand.set(showCommand ? commandText : void 0);
|
|
13393
13417
|
fixAdvice.textContent = !showCommand ? "" : snapshot.failure === "permission" ? t("env.fix.permission") : snapshot.failure === "network" ? t("env.fix.network") : "";
|
|
@@ -3574,6 +3574,7 @@ var en = {
|
|
|
3574
3574
|
"env.stepFailed.install": "install failed",
|
|
3575
3575
|
"env.stepFailed.path": "installed but not found",
|
|
3576
3576
|
"env.stepFailed.shell": "cannot reach the command line",
|
|
3577
|
+
"env.stepFailed.host": "the command never returned",
|
|
3577
3578
|
"env.toolchain.ok": "Looks good",
|
|
3578
3579
|
"env.toolchain.warn": "Almost ready",
|
|
3579
3580
|
"env.runtime.ok": "Ready",
|
|
@@ -3586,9 +3587,11 @@ var en = {
|
|
|
3586
3587
|
"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.",
|
|
3587
3588
|
"env.fix.whyPath": "The background tool is installed, but this environment cannot find it — usually a PATH or shell-session issue.",
|
|
3588
3589
|
"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.",
|
|
3590
|
+
"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.",
|
|
3589
3591
|
"env.fix.step": "Run this in a terminal, then hit Retry:",
|
|
3590
3592
|
"env.fix.stepPath": "Open a new terminal window (or make sure npm’s global bin directory is on PATH), then hit Retry.",
|
|
3591
3593
|
"env.fix.stepShell": "Restart the workbench (or dsh); if it keeps happening, the workbench still cannot reach the command line.",
|
|
3594
|
+
"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.",
|
|
3592
3595
|
"env.fix.permission": "Permission denied: rerun with sudo, or point npm’s global directory at your home.",
|
|
3593
3596
|
"env.fix.network": "Network unreachable: check your network or proxy, then retry.",
|
|
3594
3597
|
"env.fix.details": "Details (for troubleshooting)",
|
|
@@ -4340,6 +4343,7 @@ var dictionaries = {
|
|
|
4340
4343
|
"env.stepFailed.install": "装不上",
|
|
4341
4344
|
"env.stepFailed.path": "装了但还找不到",
|
|
4342
4345
|
"env.stepFailed.shell": "连不上命令行",
|
|
4346
|
+
"env.stepFailed.host": "命令行没有返回",
|
|
4343
4347
|
"env.toolchain.ok": "正常",
|
|
4344
4348
|
"env.toolchain.warn": "还没完全准备好",
|
|
4345
4349
|
"env.runtime.ok": "已就绪",
|
|
@@ -4352,9 +4356,11 @@ var dictionaries = {
|
|
|
4352
4356
|
"env.fix.why": "工作台用它自己那份后台工具(与你在终端里那套分开装,互不影响),这台机器上还没装好它。",
|
|
4353
4357
|
"env.fix.whyPath": "后台工具装上了,但当前环境还找不到它 —— 通常是 PATH 或终端会话的问题。",
|
|
4354
4358
|
"env.fix.whyShell": "工作台拿不到这台机器的命令行,所以取不了数据 —— 这一步你装不了,需要有人处理后台环境。",
|
|
4359
|
+
"env.fix.whyHost": "工作台要靠命令行跑几条检查,再把结果收回来;这次命令发出去了,结果一直没回来。工具本身多半是好的 —— 重装 Node / npm / pnpm 不会有帮助。",
|
|
4355
4360
|
"env.fix.step": "在终端里运行下面这条命令,装好之后点「重试」:",
|
|
4356
4361
|
"env.fix.stepPath": "新开一个终端窗口(或确认 npm 的全局 bin 目录在 PATH 里),然后点「重试」。",
|
|
4357
4362
|
"env.fix.stepShell": "重启一次工作台(或 dsh);如果反复出现,说明工作台还是拿不到命令行。",
|
|
4363
|
+
"env.fix.stepHost": "完全退出工作台(托盘图标也要退),清掉系统临时目录里 dsh- 开头的残留,再重新打开;反复出现就升级 dsh。",
|
|
4358
4364
|
"env.fix.permission": "权限不够:在命令前加 sudo 重跑,或先把 npm 的全局目录配到你的用户目录。",
|
|
4359
4365
|
"env.fix.network": "网络不通:检查网络或代理设置后重试。",
|
|
4360
4366
|
"env.fix.details": "详细输出(排障用)",
|
|
@@ -13032,8 +13038,27 @@ var BootGate_module_default = {
|
|
|
13032
13038
|
function failedStepText(guidance, t) {
|
|
13033
13039
|
if (guidance === "path") return t("env.stepFailed.path");
|
|
13034
13040
|
if (guidance === "shell") return t("env.stepFailed.shell");
|
|
13041
|
+
if (guidance === "host") return t("env.stepFailed.host");
|
|
13035
13042
|
return t("env.stepFailed.install");
|
|
13036
13043
|
}
|
|
13044
|
+
function guidanceTextOf(guidance, t) {
|
|
13045
|
+
if (guidance === "path") return {
|
|
13046
|
+
why: t("env.fix.whyPath"),
|
|
13047
|
+
step: t("env.fix.stepPath")
|
|
13048
|
+
};
|
|
13049
|
+
if (guidance === "shell") return {
|
|
13050
|
+
why: t("env.fix.whyShell"),
|
|
13051
|
+
step: t("env.fix.stepShell")
|
|
13052
|
+
};
|
|
13053
|
+
if (guidance === "host") return {
|
|
13054
|
+
why: t("env.fix.whyHost"),
|
|
13055
|
+
step: t("env.fix.stepHost")
|
|
13056
|
+
};
|
|
13057
|
+
return {
|
|
13058
|
+
why: t("env.fix.why"),
|
|
13059
|
+
step: t("env.fix.step")
|
|
13060
|
+
};
|
|
13061
|
+
}
|
|
13037
13062
|
function stepDetailText(step, snapshot, t) {
|
|
13038
13063
|
if (step.status === "failed") return failedStepText(snapshot.guidance, t);
|
|
13039
13064
|
if (step.status === "pending" || step.status === "running") return "";
|
|
@@ -13377,10 +13402,9 @@ function createBootGate(ctx, options = {}) {
|
|
|
13377
13402
|
errorBox.hidden = snapshot.error === void 0;
|
|
13378
13403
|
const commandText = snapshot.steps.find((step) => step.status === "failed" && step.command !== void 0)?.command;
|
|
13379
13404
|
const guidance = snapshot.guidance ?? "install";
|
|
13380
|
-
const
|
|
13381
|
-
|
|
13382
|
-
|
|
13383
|
-
fixStep.textContent = step;
|
|
13405
|
+
const advice = guidanceTextOf(guidance, t);
|
|
13406
|
+
fixWhy.textContent = advice.why;
|
|
13407
|
+
fixStep.textContent = advice.step;
|
|
13384
13408
|
const showCommand = guidance === "install" && commandText !== void 0;
|
|
13385
13409
|
fixCommand.set(showCommand ? commandText : void 0);
|
|
13386
13410
|
fixAdvice.textContent = !showCommand ? "" : snapshot.failure === "permission" ? t("env.fix.permission") : snapshot.failure === "network" ? t("env.fix.network") : "";
|
package/dist/client/index.js
CHANGED
|
@@ -3577,6 +3577,7 @@ var en = {
|
|
|
3577
3577
|
"env.stepFailed.install": "install failed",
|
|
3578
3578
|
"env.stepFailed.path": "installed but not found",
|
|
3579
3579
|
"env.stepFailed.shell": "cannot reach the command line",
|
|
3580
|
+
"env.stepFailed.host": "the command never returned",
|
|
3580
3581
|
"env.toolchain.ok": "Looks good",
|
|
3581
3582
|
"env.toolchain.warn": "Almost ready",
|
|
3582
3583
|
"env.runtime.ok": "Ready",
|
|
@@ -3589,9 +3590,11 @@ var en = {
|
|
|
3589
3590
|
"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.",
|
|
3590
3591
|
"env.fix.whyPath": "The background tool is installed, but this environment cannot find it — usually a PATH or shell-session issue.",
|
|
3591
3592
|
"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.",
|
|
3593
|
+
"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.",
|
|
3592
3594
|
"env.fix.step": "Run this in a terminal, then hit Retry:",
|
|
3593
3595
|
"env.fix.stepPath": "Open a new terminal window (or make sure npm’s global bin directory is on PATH), then hit Retry.",
|
|
3594
3596
|
"env.fix.stepShell": "Restart the workbench (or dsh); if it keeps happening, the workbench still cannot reach the command line.",
|
|
3597
|
+
"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.",
|
|
3595
3598
|
"env.fix.permission": "Permission denied: rerun with sudo, or point npm’s global directory at your home.",
|
|
3596
3599
|
"env.fix.network": "Network unreachable: check your network or proxy, then retry.",
|
|
3597
3600
|
"env.fix.details": "Details (for troubleshooting)",
|
|
@@ -4343,6 +4346,7 @@ var dictionaries = {
|
|
|
4343
4346
|
"env.stepFailed.install": "装不上",
|
|
4344
4347
|
"env.stepFailed.path": "装了但还找不到",
|
|
4345
4348
|
"env.stepFailed.shell": "连不上命令行",
|
|
4349
|
+
"env.stepFailed.host": "命令行没有返回",
|
|
4346
4350
|
"env.toolchain.ok": "正常",
|
|
4347
4351
|
"env.toolchain.warn": "还没完全准备好",
|
|
4348
4352
|
"env.runtime.ok": "已就绪",
|
|
@@ -4355,9 +4359,11 @@ var dictionaries = {
|
|
|
4355
4359
|
"env.fix.why": "工作台用它自己那份后台工具(与你在终端里那套分开装,互不影响),这台机器上还没装好它。",
|
|
4356
4360
|
"env.fix.whyPath": "后台工具装上了,但当前环境还找不到它 —— 通常是 PATH 或终端会话的问题。",
|
|
4357
4361
|
"env.fix.whyShell": "工作台拿不到这台机器的命令行,所以取不了数据 —— 这一步你装不了,需要有人处理后台环境。",
|
|
4362
|
+
"env.fix.whyHost": "工作台要靠命令行跑几条检查,再把结果收回来;这次命令发出去了,结果一直没回来。工具本身多半是好的 —— 重装 Node / npm / pnpm 不会有帮助。",
|
|
4358
4363
|
"env.fix.step": "在终端里运行下面这条命令,装好之后点「重试」:",
|
|
4359
4364
|
"env.fix.stepPath": "新开一个终端窗口(或确认 npm 的全局 bin 目录在 PATH 里),然后点「重试」。",
|
|
4360
4365
|
"env.fix.stepShell": "重启一次工作台(或 dsh);如果反复出现,说明工作台还是拿不到命令行。",
|
|
4366
|
+
"env.fix.stepHost": "完全退出工作台(托盘图标也要退),清掉系统临时目录里 dsh- 开头的残留,再重新打开;反复出现就升级 dsh。",
|
|
4361
4367
|
"env.fix.permission": "权限不够:在命令前加 sudo 重跑,或先把 npm 的全局目录配到你的用户目录。",
|
|
4362
4368
|
"env.fix.network": "网络不通:检查网络或代理设置后重试。",
|
|
4363
4369
|
"env.fix.details": "详细输出(排障用)",
|
|
@@ -13035,8 +13041,27 @@ var BootGate_module_default = {
|
|
|
13035
13041
|
function failedStepText(guidance, t) {
|
|
13036
13042
|
if (guidance === "path") return t("env.stepFailed.path");
|
|
13037
13043
|
if (guidance === "shell") return t("env.stepFailed.shell");
|
|
13044
|
+
if (guidance === "host") return t("env.stepFailed.host");
|
|
13038
13045
|
return t("env.stepFailed.install");
|
|
13039
13046
|
}
|
|
13047
|
+
function guidanceTextOf(guidance, t) {
|
|
13048
|
+
if (guidance === "path") return {
|
|
13049
|
+
why: t("env.fix.whyPath"),
|
|
13050
|
+
step: t("env.fix.stepPath")
|
|
13051
|
+
};
|
|
13052
|
+
if (guidance === "shell") return {
|
|
13053
|
+
why: t("env.fix.whyShell"),
|
|
13054
|
+
step: t("env.fix.stepShell")
|
|
13055
|
+
};
|
|
13056
|
+
if (guidance === "host") return {
|
|
13057
|
+
why: t("env.fix.whyHost"),
|
|
13058
|
+
step: t("env.fix.stepHost")
|
|
13059
|
+
};
|
|
13060
|
+
return {
|
|
13061
|
+
why: t("env.fix.why"),
|
|
13062
|
+
step: t("env.fix.step")
|
|
13063
|
+
};
|
|
13064
|
+
}
|
|
13040
13065
|
function stepDetailText(step, snapshot, t) {
|
|
13041
13066
|
if (step.status === "failed") return failedStepText(snapshot.guidance, t);
|
|
13042
13067
|
if (step.status === "pending" || step.status === "running") return "";
|
|
@@ -13380,10 +13405,9 @@ function createBootGate(ctx, options = {}) {
|
|
|
13380
13405
|
errorBox.hidden = snapshot.error === void 0;
|
|
13381
13406
|
const commandText = snapshot.steps.find((step) => step.status === "failed" && step.command !== void 0)?.command;
|
|
13382
13407
|
const guidance = snapshot.guidance ?? "install";
|
|
13383
|
-
const
|
|
13384
|
-
|
|
13385
|
-
|
|
13386
|
-
fixStep.textContent = step;
|
|
13408
|
+
const advice = guidanceTextOf(guidance, t);
|
|
13409
|
+
fixWhy.textContent = advice.why;
|
|
13410
|
+
fixStep.textContent = advice.step;
|
|
13387
13411
|
const showCommand = guidance === "install" && commandText !== void 0;
|
|
13388
13412
|
fixCommand.set(showCommand ? commandText : void 0);
|
|
13389
13413
|
fixAdvice.textContent = !showCommand ? "" : snapshot.failure === "permission" ? t("env.fix.permission") : snapshot.failure === "network" ? t("env.fix.network") : "";
|
package/dist/host/index.js
CHANGED
|
@@ -843,6 +843,29 @@ function refusalReason() {
|
|
|
843
843
|
//#endregion
|
|
844
844
|
//#region ../shared/dist/host/shell.js
|
|
845
845
|
var DEFAULT_MAX_BYTES$3 = 8388608;
|
|
846
|
+
var GUARD_SLACK_MS = 1e3;
|
|
847
|
+
function stalledResult() {
|
|
848
|
+
return {
|
|
849
|
+
exitCode: null,
|
|
850
|
+
timedOut: true,
|
|
851
|
+
aborted: false,
|
|
852
|
+
stdout: "",
|
|
853
|
+
stderr: "",
|
|
854
|
+
truncated: false,
|
|
855
|
+
stalled: true
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
async function settleWithin(work, limitMs) {
|
|
859
|
+
let timer;
|
|
860
|
+
const guard = new Promise((resolve) => {
|
|
861
|
+
timer = setTimeout(() => resolve(null), limitMs);
|
|
862
|
+
});
|
|
863
|
+
try {
|
|
864
|
+
return await Promise.race([work, guard]);
|
|
865
|
+
} finally {
|
|
866
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
846
869
|
async function runShell(shell, command, options = {}) {
|
|
847
870
|
const { workdir, timeoutMs = GIT_TIMEOUT_MS, signal } = options;
|
|
848
871
|
const spec = shell.resolve({
|
|
@@ -853,15 +876,18 @@ async function runShell(shell, command, options = {}) {
|
|
|
853
876
|
stdoutMaxBytes: DEFAULT_MAX_BYTES$3,
|
|
854
877
|
...signal === void 0 ? {} : { signal }
|
|
855
878
|
});
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
879
|
+
return await settleWithin((async () => {
|
|
880
|
+
const result = await (await shell.execute(spec)).result();
|
|
881
|
+
return {
|
|
882
|
+
exitCode: result.exitCode,
|
|
883
|
+
timedOut: result.timedOut === true,
|
|
884
|
+
aborted: result.aborted === true,
|
|
885
|
+
stdout: result.stdout.text,
|
|
886
|
+
stderr: result.stderr.text,
|
|
887
|
+
truncated: result.stdout.truncated || result.stderr.truncated,
|
|
888
|
+
stalled: false
|
|
889
|
+
};
|
|
890
|
+
})(), timeoutMs + GUARD_SLACK_MS) ?? stalledResult();
|
|
865
891
|
}
|
|
866
892
|
//#endregion
|
|
867
893
|
//#region ../shared/dist/host/shell-text.js
|
|
@@ -2,6 +2,11 @@ import type { Translate } from '@dsh-workbench/shared';
|
|
|
2
2
|
import type { PreflightBridgeIssue, PreflightGuidance, PreflightSnapshot, PreflightStep } from '@dsh-workbench/shared/host';
|
|
3
3
|
import type { RuntimeProfile } from '@dsh-workbench/shared';
|
|
4
4
|
export declare function failedStepText(guidance: PreflightGuidance | undefined, t: Translate): string;
|
|
5
|
+
export interface GuidanceText {
|
|
6
|
+
readonly why: string;
|
|
7
|
+
readonly step: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function guidanceTextOf(guidance: PreflightGuidance | undefined, t: Translate): GuidanceText;
|
|
5
10
|
export declare function stepDetailText(step: PreflightStep, snapshot: PreflightSnapshot, t: Translate): string;
|
|
6
11
|
export declare function gateHintOf(snapshot: PreflightSnapshot, t: Translate): string;
|
|
7
12
|
export declare function showsRawDetails(snapshot: PreflightSnapshot): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-workbench/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "个人工作台:Agent 工作台(左栏 + 常驻对话 + 自研右侧数据面板)。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"icon": "./icon.svg",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"proper-lockfile": "^4.1.2",
|
|
101
101
|
"which": "^7.0.0",
|
|
102
102
|
"write-file-atomic": "^8.0.0",
|
|
103
|
-
"@dsh-workbench/
|
|
104
|
-
"@dsh-workbench/
|
|
103
|
+
"@dsh-workbench/shared": "1.1.13",
|
|
104
|
+
"@dsh-workbench/adapters-default": "1.1.13"
|
|
105
105
|
},
|
|
106
106
|
"license": "MIT",
|
|
107
107
|
"repository": {
|