diff --git a/packages/client/ui-plugin-manager/README.i18n.yaml b/packages/client/ui-plugin-manager/README.i18n.yaml index 9949b77e5e..4760c77907 100644 --- a/packages/client/ui-plugin-manager/README.i18n.yaml +++ b/packages/client/ui-plugin-manager/README.i18n.yaml @@ -18,8 +18,8 @@ en: 3717372a7e5833ba zh: d6acff6684413a82 /deepseek-ai-dsh-client-ui-plugin-manager/use-this-package/installing-a-bundle: - en: f1588196b3ebea79 - zh: 24bca27a002bb89c + en: 45f62bdddae3f8c0 + zh: 4be303f322a5553a /deepseek-ai-dsh-client-ui-plugin-manager/use-this-package/updating-a-registry-bundle: en: 9312d8b1b381378f zh: 8d0ae7ad26ada2ac @@ -60,8 +60,8 @@ en: ca75c51c89c2c9b0 zh: 2064958b0754647e /deepseek-ai-dsh-client-ui-plugin-manager/known-limitations-and-deferred-work: - en: 149c0d23a56a4944 - zh: e2feaadc871581ae + en: 59bdd1e0bab0001a + zh: e3c96402be2e0687 /deepseek-ai-dsh-client-ui-plugin-manager/known-limitations-and-deferred-work/dev-note: en: e67f633dc6fe7773 zh: 3bb0c20c93f16f98 diff --git a/packages/client/ui-plugin-manager/README.md b/packages/client/ui-plugin-manager/README.md index 06c04c08b5..eed188e751 100644 --- a/packages/client/ui-plugin-manager/README.md +++ b/packages/client/ui-plugin-manager/README.md @@ -60,7 +60,7 @@ On first use, when pnpm uses the unconfigured official npm registry and npmmirro The Host sends GET requests to `https://registry.npmjs.org/-/ping` and `https://registry.npmmirror.com/-/ping` through its normal fetch proxy. A 2xx response wins; redirects and failures do not. The remaining request is cancelled, both response bodies are discarded, and cleanup completes before the result returns. The default deadline is 1500 ms and results, including unavailable results, are cached for five minutes. Configure `registryProbeTimeoutMs` and `registryProbeCacheTtlMs` on `ui-plugin-manager`; `registryProbeEnabled: false` disables probing. If both requests fail or time out, the existing default remains selected. No IP-location service or Session content is involved. -**Add plugin** takes a package name with an optional version, a Git address, a tarball, or an absolute local path; the dialog says a package name is what follows `dsh plugin add` in a README. Enter in the package or custom-registry field submits the install request, but Enter used to confirm an input-method candidate does not. **Install guide and examples** under the field opens a guide that shows the package-name example; **Use example** drops it into the field. Typing or pasting the Git or local-path template verbatim still raises the reminder asking for the actual value. A trust box above **Install** stays visible including when the guide is collapsed, and explains that on-demand Official entries offer explicit Update, while other plugins are upgraded by uninstalling and reinstalling. **Registry** beside it names the registry the install asks first and unfolds the choice: pnpm's own registry, named by the registry it actually names — the official npm registry, the mainland China mirror, or its host — which keeps the neutral default name until the Host reads it, is listed once, and carries its host unless that host is already its name; each mirror the Host configured (`pluginManager.registries`), npmmirror as the mainland China mirror; and a typed http(s) address. The options use an opaque selector panel, fill rows only on hover, and show hosts in tertiary text without parentheses. The custom-address area highlights on hover; clicking anywhere in it selects the custom registry and focuses its input, whose focus style matches the package field. Keyboard focus alone preserves the selected registry; activating the custom radio or editing the address selects the custom registry. Tab moves from the selected radio to the address, and Shift+Tab moves back; leaving either end closes the selector and returns focus to **Registry**. Switching to an offered registry retains the custom URL draft for switching back. Submitting an invalid custom address blocks installation, opens the registry selector, and focuses the address. Invalid package and custom-address fields keep a red error border and add the shared blue inset focus ring on focus. The options float over the dialog from the control, so unfolding them never lengthens the card, and the card's content scrolls when the guide makes it taller than the viewport. The initial choice follows the response comparison above; the choice is then remembered in this browser (`localStorage`) and starts the next dialog, and a remembered address the Host no longer offers stays as a typed one and remains the requested address when installation starts before the registry list returns. **Install** first asks the Host to read what the spec names (`pluginManager.inspect`) at the chosen registry: a name the list already shows, a name no registry has, a path without a package, a package without a bundle patch, or a spec pnpm would refuse comes back under the field as one sentence, with the spec kept for editing; when no registry could be reached, the sentence names every one asked. The install then starts at the registry that answered. An accepted spec opens the installing screen, which shows the package's name, one-liner, and version as the Host read them and folds pnpm's command and output behind **Show install details**. Each command line stays on one line and scrolls horizontally; selecting its text includes offscreen arguments. A finished install shows the version pnpm installed; when a run that asked one registry installed another version than the one read, it names both versions, attributes the difference to pnpm's supply-chain security policy (`minimumReleaseAge`), states the risk of a newly published version, and gives the exact `name@version` to install after uninstalling. A finished install offers **Enable now**, which switches the new bundle on, closes the dialog, and scrolls to its card if it is on the current page; closing instead leaves it installed and off. While the Host moves on to another registry, the installing screen says which registry could not serve the package and which is asked now, and each pnpm run behind the details carries a badge naming its registry. A failed install says what went wrong in one line, as the Host attributed it — no registry could be reached, naming every one asked; the host a GitHub address or a tarball link is fetched from could not be reached, which no registry helps; the package was not found, the disk is full, the profile is not writable, pnpm blocked a build script — and says when the installation itself finished and activating the added bundle is what failed. Its details hold pnpm's output and the path of the run's complete Host log, or a note that the dialog received no terminal output; **Retry** is at hand, and **Change registry** beside it when the Host laid the failure at the registry it asked, which returns to the spec with the registry options open; the Host has already put the profile files back. When pnpm blocked a dependency's install scripts, the failed screen lists the packages whose scripts wait for permission and offers **Allow these scripts and retry** in place of **Retry**; the Host saves the permission in the profile's `pnpm-workspace.yaml`, which a failed run leaves as pnpm wrote it, then runs pnpm again, and the installed screen names what was allowed. A successful installation does not certify that a module can activate. +**Add plugin** takes a package name with an optional version, a Git address, a tarball, or an absolute local path; the dialog says a package name is what follows `dsh plugin add` in a README. Enter in the package or custom-registry field submits the install request, but Enter used to confirm an input-method candidate does not. **Install guide and examples** under the field opens a guide that shows the package-name example; **Use example** drops it into the field. Typing or pasting the Git or local-path template verbatim still raises the reminder asking for the actual value. A trust box above **Install** stays visible including when the guide is collapsed, and explains that on-demand Official entries offer explicit Update, while other plugins are upgraded by uninstalling and reinstalling. **Registry** beside it names the registry the install asks first and unfolds the choice: pnpm's own registry, named by the registry it actually names — the official npm registry, the mainland China mirror, or its host — which keeps the neutral default name until the Host reads it, is listed once, and carries its host unless that host is already its name; each mirror the Host configured (`pluginManager.registries`), npmmirror as the mainland China mirror; and a typed http(s) address. The options use an opaque selector panel, fill rows only on hover, and show hosts in tertiary text without parentheses. The custom-address area highlights on hover; clicking anywhere in it selects the custom registry and focuses its input, whose focus style matches the package field. Keyboard focus alone preserves the selected registry; activating the custom radio or editing the address selects the custom registry. Tab moves from the selected radio to the address, and Shift+Tab moves back; leaving either end closes the selector and returns focus to **Registry**. Switching to an offered registry retains the custom URL draft for switching back. Submitting an invalid custom address blocks installation, opens the registry selector, and focuses the address. Invalid package and custom-address fields keep a red error border and add the shared blue inset focus ring on focus. The options float over the dialog from the control, so unfolding them never lengthens the card, and the card's content scrolls when the guide makes it taller than the viewport. The initial choice follows the response comparison above; the choice is then remembered in this browser (`localStorage`) and starts the next dialog, and a remembered address the Host no longer offers stays as a typed one and remains the requested address when installation starts before the registry list returns. **Install** first asks the Host to read what the spec names (`pluginManager.inspect`) at the chosen registry: a name the list already shows, a name no registry has, a path without a package, a package without a bundle patch, or a spec pnpm would refuse comes back under the field as one sentence, with the spec kept for editing; when no registry could be reached, the sentence names every one asked. The install then starts at the registry that answered. An accepted spec opens the installing screen, which shows the package's name, one-liner, and version as the Host read them and folds pnpm's command and output behind **Show install details**. Each command line stays on one line and scrolls horizontally; selecting its text includes offscreen arguments. A finished install shows the version pnpm installed; when a run that asked one registry installed another version than the one read, it names both versions, attributes the difference to pnpm's supply-chain security policy (`minimumReleaseAge`), states the risk of a newly published version, and gives the exact `name@version` to install after uninstalling. A finished install offers **Enable now**, which switches the new bundle on, closes the dialog, and scrolls to its card if it is on the current page; closing instead leaves it installed and off. While the Host moves on to another registry, the installing screen says which registry could not serve the package and which is asked now, and each pnpm run behind the details carries a badge naming its registry. A failed install says what went wrong in one line, as the Host attributed it — no registry could be reached, naming every one asked; the host a GitHub address or a tarball link is fetched from could not be reached, which no registry helps; the package was not found, the disk is full, the profile is not writable, pnpm blocked a build script — and, when the install asked to enable the added bundle, says when it finished and enabling that bundle is what failed. Its details hold pnpm's output and the path of the settled run's complete Host log, or a note that the dialog received no terminal output; **Retry** is at hand, and **Change registry** beside it when the Host laid the failure at the registry it asked, which returns to the spec with the registry options open; the Host has already put the profile files back. When pnpm blocked a dependency's install scripts, the failed screen lists the packages whose scripts wait for permission and offers **Allow these scripts and retry** in place of **Retry**; the Host saves the permission in the profile's `pnpm-workspace.yaml`, which a failed run leaves as pnpm wrote it, then runs pnpm again, and the installed screen names what was allowed. A successful installation does not certify that a module can activate. During preparation and download, **Cancel install** asks the Host to stop the run and waits for confirmation. Loading the bundle cannot be cancelled. Closing with ×, Escape, or the backdrop hides the dialog immediately and requests cancellation when possible. **View installation** reopens the same task with its output; another installation cannot start while its outcome is pending or unconfirmed. Confirmed cancellation returns to the spec and shows a toast; the manifest and lockfile are restored, while downloaded files can remain. A lost installation response triggers a request to recover the result; **Check installation status** and reconnect retry that request. If the Host has no active request, **Installation result unavailable** allows returning to editing after checking the plugin list. A cancellation sent before acceptance waits and retries automatically; a failed cancellation can be retried manually. Hidden tasks report their outcome through toasts without reopening the dialog. @@ -184,6 +184,7 @@ None; this package neither assembles nor sends a provider request. These limits define the reach of the management view; they are current package constraints. +- **Log path for the settled run only** — the details name the complete Host log of the run that settled the dialog, on the Host's filesystem; earlier registry attempts have no link, and a browser connected to a remote Host may not be able to open that path. - **Page lifetime** — refreshing the browser loses the tracked request and output. Reconnecting within the same page can recover an active request; completed results are not retained by the Host. Profile file locking serializes installation writes. - **Only bundles are managed** — a dependency without a bundle patch is refused before it installs; one the profile already holds is left off the page unless the profile selects it, and loading plain plugin modules stays a file operation. - **Rows show a phase, not a reason** — a failed row reads as failed without the Host's error text; the Host log has it. diff --git a/packages/client/ui-plugin-manager/README.zh.md b/packages/client/ui-plugin-manager/README.zh.md index b8bbe5fde4..d792af6d13 100644 --- a/packages/client/ui-plugin-manager/README.zh.md +++ b/packages/client/ui-plugin-manager/README.zh.md @@ -60,7 +60,7 @@ kind: "package-reference" Host 通过普通 fetch 代理向 `https://registry.npmjs.org/-/ping` 和 `https://registry.npmmirror.com/-/ping` 发送 GET 请求,以最先返回 2xx 的源为结果;重定向和失败不参与选择。随后取消另一条请求、丢弃两个响应体,并在清理完成后返回。默认时限为 1500 毫秒,包括不可用结果在内的探测结果均缓存五分钟。在 `ui-plugin-manager` 上配置 `registryProbeTimeoutMs` 和 `registryProbeCacheTtlMs`;`registryProbeEnabled: false` 关闭探测。两条请求都失败或超时时保留现有默认源。不使用 IP 地区服务,也不发送 Session 内容。 -**添加插件**接受包名(可带版本)、Git 地址、压缩包或本地绝对路径;对话框说明包名就是 README 里 `dsh plugin add` 后面的那一段。在包名或自定义安装源输入框中按 Enter 会提交安装请求,但用于确认输入法候选词的 Enter 不会触发安装。输入框下方的**插件安装引导和示例**展开一段引导,给出包名示例;**填入示例**把它填进输入框。输入框中若原样保留 Git 地址或本地路径的模板文本,仍会显示要求替换为实际值的提醒。**安装**按钮上方的提示框在引导收起后也可见,并说明官方按需插件提供显式更新;其他插件通过卸载后重新安装升级。旁边的**安装源**写着安装首先询问的注册表,展开后可选:pnpm 自身的注册表,按它实际指向的源命名——npm 官方源、中国大陆镜像源,其余以主机名显示——Host 读不到时保留中性的默认名称,只列一次,选项标题带上主机名(主机名即名称时不重复显示);Host 配置的每个镜像(`pluginManager.registries`),npmmirror 显示为中国大陆镜像源;以及手动输入的 http(s) 地址。选项使用不透明选择面板,仅悬停行使用底色,主机名不加括号并使用三级文字色。自定义地址区域在悬停时高亮;点击其中任意位置会选中自定义源并聚焦输入框,焦点样式与包名输入框一致。仅通过键盘聚焦不会改变已选安装源;激活自定义单选项或编辑地址才会选中自定义源。Tab 从已选单选项移到地址框,Shift+Tab 反向返回;从任一端移出时关闭选择器,并将焦点交还**安装源**按钮。切到预设源时保留自定义地址草稿,切回后继续使用。提交无效的自定义地址时会阻止安装,展开安装源选择器并聚焦地址框。包名和自定义地址输入框无效时保留红色错误边框,聚焦时加上共享的蓝色内嵌焦点环。选项从控件上浮在对话框之上,展开不会拉长卡片;引导使卡片高过视口时,卡片内容可以滚动。初始选择遵循上文的响应比较规则;之后选择记在本浏览器(`localStorage`)里,下次打开对话框从它开始,Host 不再提供的已记住地址保留为手动输入的地址;在安装源列表返回前开始安装,也仍请求该地址。**安装**先让 Host 在所选注册表读出 spec 指向什么(`pluginManager.inspect`):列表中已有的名字、所有注册表都没有的名字、没有包的路径、没有组合包 patch 的包,或 pnpm 会拒绝的 spec,都以一句话回到输入框下方,spec 保留可继续编辑;所有注册表都连不上时,这句话列出问过的每一个。随后安装从作答的那个注册表开始。通过检查的 spec 打开安装中界面,展示 Host 读到的包名、一句话简介和版本,pnpm 的命令与输出折叠在**查看安装详情**之后。每条命令行保持单行并可横向滚动;选择文本时可包含屏幕外的参数。安装完成的画面显示 pnpm 实际安装的版本;只问过一个注册表的运行装入的版本与检查读到的不同时,会写明两个版本,说明差异来自 pnpm 供应链安全策略(`minimumReleaseAge`),提示新发布版本的风险,并给出卸载后应安装的精确 `name@version`。安装完成后提供**立即启用**:启用新组合包、关闭对话框,并在当前页面有对应卡片时滚动定位;直接关闭则让它保持已安装但关闭。Host 改问另一个注册表时,安装中界面会说明哪个源没能提供这个包、现在改问哪个,详情里每次 pnpm 运行都带一个写明所用源的标记。安装失败时按 Host 的归因用一行话说明原因——所有安装源都连不上,并列出问过的每一个;GitHub 地址或压缩包链接自身的主机连不上,换源无济于事;包不存在、磁盘已满、profile 不可写、pnpm 拦下了构建脚本——安装本身已完成、失败发生在启用插件时也会注明。详情里有 pnpm 输出和本次运行完整 Host 日志的路径,本次安装没有终端输出时详情会直接说明;**重试**就在手边,Host 把失败归于所问注册表时还在旁边提供**更换安装源**,回到 spec 输入界面并展开安装源选项;Host 已经把 profile 文件放回原样。pnpm 拦下依赖的安装脚本时,失败界面列出等待允许的包,并以**允许这些脚本并重试**取代**重试**;Host 把授权写进 profile 的 `pnpm-workspace.yaml`(失败的运行保留 pnpm 写入的这个文件)再运行 pnpm,安装完成界面会说明允许了哪些脚本。安装成功不代表模块一定能够激活。 +**添加插件**接受包名(可带版本)、Git 地址、压缩包或本地绝对路径;对话框说明包名就是 README 里 `dsh plugin add` 后面的那一段。在包名或自定义安装源输入框中按 Enter 会提交安装请求,但用于确认输入法候选词的 Enter 不会触发安装。输入框下方的**插件安装引导和示例**展开一段引导,给出包名示例;**填入示例**把它填进输入框。输入框中若原样保留 Git 地址或本地路径的模板文本,仍会显示要求替换为实际值的提醒。**安装**按钮上方的提示框在引导收起后也可见,并说明官方按需插件提供显式更新;其他插件通过卸载后重新安装升级。旁边的**安装源**写着安装首先询问的注册表,展开后可选:pnpm 自身的注册表,按它实际指向的源命名——npm 官方源、中国大陆镜像源,其余以主机名显示——Host 读不到时保留中性的默认名称,只列一次,选项标题带上主机名(主机名即名称时不重复显示);Host 配置的每个镜像(`pluginManager.registries`),npmmirror 显示为中国大陆镜像源;以及手动输入的 http(s) 地址。选项使用不透明选择面板,仅悬停行使用底色,主机名不加括号并使用三级文字色。自定义地址区域在悬停时高亮;点击其中任意位置会选中自定义源并聚焦输入框,焦点样式与包名输入框一致。仅通过键盘聚焦不会改变已选安装源;激活自定义单选项或编辑地址才会选中自定义源。Tab 从已选单选项移到地址框,Shift+Tab 反向返回;从任一端移出时关闭选择器,并将焦点交还**安装源**按钮。切到预设源时保留自定义地址草稿,切回后继续使用。提交无效的自定义地址时会阻止安装,展开安装源选择器并聚焦地址框。包名和自定义地址输入框无效时保留红色错误边框,聚焦时加上共享的蓝色内嵌焦点环。选项从控件上浮在对话框之上,展开不会拉长卡片;引导使卡片高过视口时,卡片内容可以滚动。初始选择遵循上文的响应比较规则;之后选择记在本浏览器(`localStorage`)里,下次打开对话框从它开始,Host 不再提供的已记住地址保留为手动输入的地址;在安装源列表返回前开始安装,也仍请求该地址。**安装**先让 Host 在所选注册表读出 spec 指向什么(`pluginManager.inspect`):列表中已有的名字、所有注册表都没有的名字、没有包的路径、没有组合包 patch 的包,或 pnpm 会拒绝的 spec,都以一句话回到输入框下方,spec 保留可继续编辑;所有注册表都连不上时,这句话列出问过的每一个。随后安装从作答的那个注册表开始。通过检查的 spec 打开安装中界面,展示 Host 读到的包名、一句话简介和版本,pnpm 的命令与输出折叠在**查看安装详情**之后。每条命令行保持单行并可横向滚动;选择文本时可包含屏幕外的参数。安装完成的画面显示 pnpm 实际安装的版本;只问过一个注册表的运行装入的版本与检查读到的不同时,会写明两个版本,说明差异来自 pnpm 供应链安全策略(`minimumReleaseAge`),提示新发布版本的风险,并给出卸载后应安装的精确 `name@version`。安装完成后提供**立即启用**:启用新组合包、关闭对话框,并在当前页面有对应卡片时滚动定位;直接关闭则让它保持已安装但关闭。Host 改问另一个注册表时,安装中界面会说明哪个源没能提供这个包、现在改问哪个,详情里每次 pnpm 运行都带一个写明所用源的标记。安装失败时按 Host 的归因用一行话说明原因——所有安装源都连不上,并列出问过的每一个;GitHub 地址或压缩包链接自身的主机连不上,换源无济于事;包不存在、磁盘已满、profile 不可写、pnpm 拦下了构建脚本——当这次安装要求启用新增的组合包时,还会注明安装本身已完成、失败发生在启用时。详情里有 pnpm 输出和结束这次对话框的那次运行的完整 Host 日志路径,安装详情没有收到终端输出时也会直接说明;**重试**就在手边,Host 把失败归于所问注册表时还在旁边提供**更换安装源**,回到 spec 输入界面并展开安装源选项;Host 已经把 profile 文件放回原样。pnpm 拦下依赖的安装脚本时,失败界面列出等待允许的包,并以**允许这些脚本并重试**取代**重试**;Host 把授权写进 profile 的 `pnpm-workspace.yaml`(失败的运行保留 pnpm 写入的这个文件)再运行 pnpm,安装完成界面会说明允许了哪些脚本。安装成功不代表模块一定能够激活。 准备和下载期间,**取消安装**会请求 Host 停止运行并等待确认。加载组合包的阶段不可取消。点击 ×、按 Escape 或点击遮罩会立即隐藏对话框,并在可以取消时请求取消。**查看安装任务**会重新打开同一任务并保留输出;结果待定或尚未确认时不能发起另一项安装。确认取消后回到 spec 输入界面并显示 toast;manifest 与 lockfile 已恢复,已下载文件可能保留。安装响应丢失后会请求恢复结果;**核对安装状态**和重连会重试该请求。Host 已无活动请求时,**未能获取安装结果**允许检查插件列表后返回编辑。早于接收确认的取消请求会等待并自动重试;取消失败可手动重试。隐藏的任务通过 toast 通知结果,不会重新弹出对话框。 @@ -184,6 +184,7 @@ Host 入口通过生成的 Remote 接口暴露 `pluginRegistryProbe.fastest()` 这些限制界定了管理视图的范围;它们是当前包的约束。 +- **只给出结束对话框那次运行的日志路径**——详情给出的是该运行的完整 Host 日志,位于 Host 文件系统;更早的换源尝试没有入口,连接远端 Host 的浏览器也可能打不开该路径。 - **页面生命周期**——刷新浏览器会丢失跟踪的请求与输出。同一页面内重连可以恢复活动请求;Host 不保留已完成的结果。profile 文件锁串行化安装写入。 - **只管理组合包**——没有组合包 patch 的依赖在安装前就被拒绝;profile 里已有的这类依赖不上页面,除非 profile 选中了它;加载普通插件模块仍是文件操作。 - **行只显示阶段,不显示原因**——失败的行只显示为失败,没有 Host 的错误文本;Host 日志里有。 diff --git a/packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx b/packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx index a3c3395281..19bd838984 100644 --- a/packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx +++ b/packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx @@ -944,7 +944,9 @@ function failureText(failure: InstallState['failure'], t: Translate, install?: P } if (failure.kind !== undefined) return t(FAILURE_KIND_KEYS[failure.kind]) if (failure.code !== undefined) return managementText({ code: failure.code, diagnostic: failure.reason }, t) - return failure.reason === '' ? t('installFailureGeneric') : failure.reason + if (failure.reason !== '') return failure.reason + // An enabled install that failed applying the bundle names that step, never the install command it already finished. + return failure.stage === 'enable' && failure.enabled === true ? t('installFailedEnabling') : t('installFailureGeneric') } interface SubjectLines { @@ -1329,6 +1331,8 @@ function InstallDialog({ } const heading = t(phase === 'done' && install.subject?.bundled ? 'installBundledTitle' : SCREEN_TITLE_KEYS[phase]) const pending = isInstallPending(phase) + // A settled screen whose install never reported a run can say the details received no terminal output. + const settledDetails = phase === 'failed' || phase === 'done' || phase === 'unknown' const cancellable = phase === 'starting' || phase === 'running' || phase === 'unconfirmed' const stoppable = cancellable || phase === 'failed' || phase === 'unknown' const failure = install.failure @@ -1389,7 +1393,8 @@ function InstallDialog({
{t('installBundledDescription')}
: null} {phase === 'failed' ?{failureText(install.failure, t, install)}
: null} - {phase === 'failed' && failure?.stage === 'enable' + {phase === 'failed' && failure?.stage === 'enable' && failure.enabled === true + && (failure.code !== undefined || failure.reason !== '') ?{t('installFailedEnabling')}
: null} {attemptLine === null ? null :{attemptLine}
} @@ -1463,7 +1468,11 @@ function InstallDialog({ {install.detailsOpen ? ({firstRun === undefined ? t('installDetailsNoOutput') : t('installLocation', { dir: firstRun.cwd })}
+ {firstRun !== undefined + ?{t('installLocation', { dir: firstRun.cwd })}
+ : settledDetails + ?{t('installDetailsNoOutput')}
+ : null} {install.runs.map((run, index) => { const registry = asked?.registries[index] return ( diff --git a/packages/client/ui-plugin-manager/src/client/locales.ts b/packages/client/ui-plugin-manager/src/client/locales.ts index e4e64f6115..6b31b7ffa8 100644 --- a/packages/client/ui-plugin-manager/src/client/locales.ts +++ b/packages/client/ui-plugin-manager/src/client/locales.ts @@ -215,7 +215,7 @@ export const zh = { installEnableNow: '立即启用', installDetailsShow: '查看安装详情', installDetailsHide: '收起安装详情', - installDetailsNoOutput: '本次安装没有终端输出', + installDetailsNoOutput: '本次安装详情没有收到终端输出', installVersion: '版本 {version}', installSubjectPath: '本地目录', installSubjectGit: 'Git 仓库', @@ -513,7 +513,7 @@ export const en = { installEnableNow: 'Enable now', installDetailsShow: 'Show install details', installDetailsHide: 'Hide install details', - installDetailsNoOutput: 'This install produced no terminal output', + installDetailsNoOutput: 'No terminal output from this install reached the details', installVersion: 'Version {version}', installSubjectPath: 'Local directory', installSubjectGit: 'Git repository', @@ -809,7 +809,7 @@ export const ja = { 'installEnableNow': '今すぐ有効化', 'installDetailsShow': 'インストール詳細を表示', 'installDetailsHide': 'インストール詳細を隠す', - 'installDetailsNoOutput': 'このインストールではターミナル出力がありませんでした', + 'installDetailsNoOutput': 'このインストールのターミナル出力は詳細に届きませんでした', 'installVersion': 'バージョン {version}', 'installSubjectPath': 'ローカルディレクトリ', 'installSubjectGit': 'Gitリポジトリ', @@ -1104,7 +1104,7 @@ export const es = { installEnableNow: 'Habilitar ahora', installDetailsShow: 'Mostrar detalles de instalación', installDetailsHide: 'Ocultar detalles de instalación', - installDetailsNoOutput: 'Esta instalación no produjo salida de terminal', + installDetailsNoOutput: 'La salida de terminal de esta instalación no llegó a los detalles', installVersion: 'Versión {version}', installSubjectPath: 'directorio local', installSubjectGit: 'repositorio git', @@ -1399,7 +1399,7 @@ export const fr = { installEnableNow: 'Activer maintenant', installDetailsShow: "Afficher les détails de l'installation", installDetailsHide: "Masquer les détails de l'installation", - installDetailsNoOutput: "Cette installation n'a produit aucune sortie de terminal", + installDetailsNoOutput: "Aucune sortie de terminal de cette installation n'est parvenue aux détails", installVersion: 'Version {version}', installSubjectPath: 'Annuaire local', installSubjectGit: 'Dépôt Git', @@ -1694,7 +1694,7 @@ export const de = { installEnableNow: 'Jetzt aktivieren', installDetailsShow: 'Installationsdetails anzeigen', installDetailsHide: 'Installationsdetails ausblenden', - installDetailsNoOutput: 'Diese Installation hat keine Terminalausgabe erzeugt', + installDetailsNoOutput: 'Die Terminalausgabe dieser Installation hat die Details nicht erreicht', installVersion: 'Version {version}', installSubjectPath: 'Lokales Verzeichnis', installSubjectGit: 'Git-Repository', @@ -1989,7 +1989,7 @@ export const ru = { installEnableNow: 'Включить сейчас', installDetailsShow: 'Показать детали установки', installDetailsHide: 'Скрыть сведения об установке', - installDetailsNoOutput: 'При этой установке в терминал ничего не выводилось', + installDetailsNoOutput: 'Вывод терминала этой установки не дошёл до подробностей', installVersion: 'Версия {version}', installSubjectPath: 'Локальный каталог', installSubjectGit: 'Git-репозиторий', @@ -2284,7 +2284,7 @@ export const pt = { installEnableNow: 'Ativar agora', installDetailsShow: 'Mostrar detalhes da instalação', installDetailsHide: 'Ocultar detalhes de instalação', - installDetailsNoOutput: 'Esta instalação não produziu saída de terminal', + installDetailsNoOutput: 'A saída de terminal desta instalação não chegou aos detalhes', installVersion: 'Versão {version}', installSubjectPath: 'Diretório local', installSubjectGit: 'Repositório Git', diff --git a/packages/client/ui-plugin-manager/src/client/manager-store.ts b/packages/client/ui-plugin-manager/src/client/manager-store.ts index 9211309839..77fbbeddcf 100644 --- a/packages/client/ui-plugin-manager/src/client/manager-store.ts +++ b/packages/client/ui-plugin-manager/src/client/manager-store.ts @@ -280,8 +280,10 @@ export interface InstallState { /** The packages an `incompatible-version` refusal names. */ readonly incompatible?: readonly IncompatiblePlugin[] readonly kind?: PluginInstallFailureKind - /** The step the failed change reached; `enable` means the installation finished and activating the bundle failed. */ + /** The step the failed change reached; `enable` means the installation finished and applying the bundle failed. */ readonly stage?: ChangeResult['stage'] + /** Whether the failed change also asked to enable the installed bundle; an enable-stage sentence needs both. */ + readonly enabled?: boolean /** What the last failed run could not reach, as the Host attributed it: the registry, or the spec's own host. */ readonly failedAt?: 'registry' | 'spec-host' readonly pendingBuilds?: readonly string[] @@ -506,7 +508,7 @@ class RemoteAnswerError extends Error { /** The dialog's reading of a failed change: the Host's code and diagnostic, the step it reached, and the run's classified failure. */ function failureOf( error: ManagementError | undefined, kind: PluginInstallFailureKind | undefined, pendingBuilds: readonly string[] | undefined, - failedAt: ChangeResult['failedAt'], stage: ChangeResult['stage'], + failedAt: ChangeResult['failedAt'], stage: ChangeResult['stage'], enabled: ChangeResult['enabled'], ): NonNullable