diff --git a/packages/client/ui-agent-preset/README.i18n.yaml b/packages/client/ui-agent-preset/README.i18n.yaml
index f09a1004d7..8f5a751c08 100644
--- a/packages/client/ui-agent-preset/README.i18n.yaml
+++ b/packages/client/ui-agent-preset/README.i18n.yaml
@@ -15,11 +15,11 @@
en: d152484eb41ac6b4
zh: b3ad7867f23dad1c
/deepseek-ai-dsh-client-ui-agent-preset/use-this-package:
- en: 9c4e171297aa28b8
- zh: 022608367443e61f
+ en: 8a8fe2f568b3a810
+ zh: 12543568e922e2bf
/deepseek-ai-dsh-client-ui-agent-preset/understand-the-implementation:
- en: 7813f0063c15e241
- zh: 6eabc242edfc45ec
+ en: 4c88c83529317389
+ zh: 5125122bdacfa3da
/deepseek-ai-dsh-client-ui-agent-preset/further-exploration:
en: bbae8d79844bc481
zh: 4302107fd1f460e6
diff --git a/packages/client/ui-agent-preset/README.md b/packages/client/ui-agent-preset/README.md
index 379bdb2368..9dd637fa05 100644
--- a/packages/client/ui-agent-preset/README.md
+++ b/packages/client/ui-agent-preset/README.md
@@ -33,7 +33,9 @@ Once the off value is accepted, built-in PTC or Minimal choices reset to Standar
Known shipped presets offer mode details and usage examples in a read-only dialog. Its tabs preserve each page's scroll position; closing returns focus to the opening action. Help does not change the new-task default. The default badge replaces the card's group badge, and the preset id appears beside the title. Guide copy and examples belong to this package.
-“Let the agent create a plugin” in the Plugins page's **Add plugin** menu starts the same Creator task as Settings. Both entries show the reason if the preset switch is refused. It submits no message and preserves existing drafts and global preferences. While the roster loads or Creator is unavailable, the entry is disabled with an explanation.
+**Let the agent create a plugin** in the Plugins page's **Add plugin** arrow menu enters the same Creator flow as Settings. It submits no message and preserves unsent drafts. While the roster loads or Creator is unavailable, the menu item is disabled with an explanation. Both entries show a Toast with the reason if the Host refuses the preset switch.
+
+Entering Creator selects `cordis` for the receiving blank Session without changing the new-task default or Coding Tools setting. If no workspace or blank Session is bound yet, the choice waits for that binding. After the choice is applied, the Creator Session keeps its preset; a later newly created Session uses the configured default, such as Standard.
## Understand the implementation
@@ -43,6 +45,8 @@ Known shipped presets offer mode details and usage examples in a read-only dialo
`agentPresets/list` supplies the roster and marks the current default, and `agentPresets/read` one declaration's YAML for the viewer; default changes write the `agent-preset-registry` settings namespace. The picker, blank-session synchronization and read-only session label use recorded preset identities. Connection resets and settings updates refresh the roster.
+`CreatePluginMenuItem` contributes to `plugins.add.actions` using the shared roster store. Its selection calls the owner's `onDismiss()` before the same `startCreatorDraft` callback exposed to Settings as `creatorDraft`. That callback stages `cordis` through `AgentPresetSeatController` and opens the task through `uiWorkspace.startSession`; it can reuse a blank Session and applies the staged choice when a Session binding becomes available. The choice is consumed once applied. Both Coding Tools states use the same picker and selection store, and `AgentPresetSeat` renders refusals through the shared `Toast` component.
+
diff --git a/packages/client/ui-agent-preset/README.zh.md b/packages/client/ui-agent-preset/README.zh.md
index 58a1cef4f3..b4de69ae15 100644
--- a/packages/client/ui-agent-preset/README.zh.md
+++ b/packages/client/ui-agent-preset/README.zh.md
@@ -33,7 +33,9 @@ kind: "package-reference"
已知的内置预设提供只读的模式说明与使用示例对话框。各页签保留各自的滚动位置;关闭后焦点回到打开它的操作。帮助不会改变新任务默认值。默认徽标取代卡片的分组徽标,预设 id 显示在标题旁。指南文案与示例归本包所有。
-插件页**添加插件**菜单中的「让 Agent 创建插件」复用设置页的创造任务入口,不发送消息、不改动已有草稿或全局偏好。两处入口在预设切换被拒时均显示原因。读取预设列表或创造模式不可用时,菜单项禁用并说明原因。
+插件页**添加插件**箭头菜单中的**让 Agent 创建插件**进入与设置页相同的创造流程,不发送消息,并保留未发送的草稿。读取预设列表或创造模式不可用时,菜单项禁用并说明原因。Host 拒绝切换预设时,两处入口均通过 Toast 显示原因。
+
+进入创造模式会为接收该选择的空白 Session 选择 `cordis`,不改变新任务默认值或代码工作工具设置。尚未绑定工作区或空白 Session 时,选择等待绑定完成后应用。应用后,创造 Session 保留该预设;之后真正创建的新 Session 使用配置的默认值,例如标准模式。
## 理解实现
@@ -43,6 +45,8 @@ kind: "package-reference"
`agentPresets/list` 提供列表并标记当前默认值,`agentPresets/read` 为查看器提供一条声明的 YAML;默认值的修改写入 `agent-preset-registry` settings 命名空间。选择器、空白会话同步和只读会话标签使用记录的 preset 标识。连接重置和设置更新会刷新列表。
+`CreatePluginMenuItem` 使用共享的预设列表 store,向 `plugins.add.actions` 贡献菜单项。选择时先调用页面传入的 `onDismiss()`,再调用与设置页 `creatorDraft` 相同的 `startCreatorDraft` 回调。该回调通过 `AgentPresetSeatController` 暂存 `cordis`,再通过 `uiWorkspace.startSession` 打开任务;它可以复用空白 Session,并在 Session 绑定可用时应用暂存选择。暂存选择应用后即清除。代码工作工具开启或关闭时均使用同一个选择器和选择 store,`AgentPresetSeat` 通过共享的 `Toast` 组件显示拒绝原因。
+
diff --git a/packages/client/ui-plugin-manager/README.i18n.yaml b/packages/client/ui-plugin-manager/README.i18n.yaml
index ff23543a2e..bb688fb17f 100644
--- a/packages/client/ui-plugin-manager/README.i18n.yaml
+++ b/packages/client/ui-plugin-manager/README.i18n.yaml
@@ -18,8 +18,8 @@
en: b7d2396da72ecac4
zh: 4ec8336478dd39c7
/deepseek-ai-dsh-client-ui-plugin-manager/use-this-package/installing-a-bundle:
- en: aa90cbad07ea99b0
- zh: 8e1060e5ec331abb
+ en: e3b3f763cf769475
+ zh: fca6204c9dfdcdcf
/deepseek-ai-dsh-client-ui-plugin-manager/use-this-package/switching-a-bundle:
en: abc90531efa889d5
zh: 0562570f85e69c35
@@ -36,8 +36,8 @@
en: 8ca48e1365f18adf
zh: 91eadd683d2d8b5b
/deepseek-ai-dsh-client-ui-plugin-manager/understand-the-implementation/registration:
- en: c5a1f14d37433d07
- zh: 75014f10a155fadb
+ en: 3d70281f082988a5
+ zh: 17c6f595e3b57260
/deepseek-ai-dsh-client-ui-plugin-manager/understand-the-implementation/the-store:
en: 21a0bbe8eb92229c
zh: 096ff63db61992bb
diff --git a/packages/client/ui-plugin-manager/README.md b/packages/client/ui-plugin-manager/README.md
index f5f1d3b31a..665ac8a446 100644
--- a/packages/client/ui-plugin-manager/README.md
+++ b/packages/client/ui-plugin-manager/README.md
@@ -37,9 +37,14 @@ The **Refresh** button shows its tooltip after 500 ms of hovering or keyboard fo
### Installing a bundle
-**Add plugin** and the arrow menu's **Install a third-party plugin** open the installation dialog with focus in its package field. The menu also offers plugin-contributed actions.
+The **Add plugin** control has a main button and a separate arrow for choosing how to add a plugin.
-`plugins.add.actions` accepts root-scoped `MenuItemButton` contributions after the install action. Contributions call the supplied `onDismiss()` before starting their action.
+| Button or menu item | Result |
+| --- | --- |
+| **Add plugin** | Opens the installation dialog with focus in its package field. |
+| Arrow: **Choose how to add a plugin** | Opens the menu of installation and plugin-contributed actions. |
+| **Install a third-party plugin** | Closes the menu and opens the same dialog for a package name, Git repository, or local directory. |
+| **Let the agent create a plugin** | When [ui-agent-preset](../ui-agent-preset/README.md#use-this-package) contributes this item, closes the menu and opens Creator to author a DSH plugin. |
On first use, when pnpm uses the unconfigured official npm registry and npmmirror is offered, the Host probes both registries in parallel. The first successful HTTPS ping response selects the initial source. The dialog preserves remembered choices, manual selections, explicit manager configuration, and custom or unknown pnpm registries. An install clicked during initial probing waits for that bounded operation; a late result cannot overwrite a manual choice or reopen a closed dialog.
@@ -103,6 +108,8 @@ The Host entry exposes `pluginRegistryProbe.fastest()` through the generated Rem
The browser plugin registers the `plugins` sidebar entry and its `main` panel through `ctx.slots.inject()`, so both follow late slot declaration, locale changes and teardown. The page is global and belongs to no Session. Display text comes from package metadata and the page's dictionary.
+The add control reuses `Button`, `Menu`, and `MenuItemButton`. Both installation actions call the same `openInstall` callback and use `InstallDialog` and `PluginManagerController`. The root-scoped list slot `plugins.add.actions` accepts contributed `MenuItemButton` rows after the install action; each contribution receives an `onDismiss()` callback to close the menu before starting its action.
+
### The store
`PluginManagerController` owns the bundle views, busy keys, notices, install progress and the uninstall confirmation. Each read asks the inventory whether the Host manages a profile, then joins `listBundles` with `listPlugins` into one view per bundle, whose rows carry the live entry's enablement and fiber phase. It coalesces overlapping reads, refreshes after operations, on `plugin-manager/changed`, and on reconnect, and ignores late results after disposal. Install output is grouped by job id. The install dialog moves `idle → checking → starting → running → done | failed`, with `cancelling` and `applying` as the Host reports them and `unconfirmed` when an installation or cancellation response is lost; confirmed `applying` progress never regresses. Recovery uses `waitForInstall`, settling to `unknown` if no active request remains; checking and every active phase use ongoing, while the final screens use done or error. The check runs under an `AbortController` that going back or closing aborts, and its settlement is dropped; a run is stopped only through `pluginManager.cancelInstall`. Closing hides a run without discarding its state. A cancellation that overtakes installation is retried when progress or output acknowledges the request. A change the Host could not apply, a restart it waits for, and an override by a higher layer become toasts that retire on their own.
diff --git a/packages/client/ui-plugin-manager/README.zh.md b/packages/client/ui-plugin-manager/README.zh.md
index 24b01e57e2..00fca707d0 100644
--- a/packages/client/ui-plugin-manager/README.zh.md
+++ b/packages/client/ui-plugin-manager/README.zh.md
@@ -37,9 +37,14 @@ kind: "package-reference"
### 安装一个组合包
-**添加插件**主按钮和箭头菜单中的**安装第三方插件**均打开安装对话框并聚焦包名输入框。菜单还提供插件贡献的动作。
+**添加插件**控件包含主按钮和独立箭头,箭头用于选择添加方式。
-`plugins.add.actions` 接受 root 作用域的 `MenuItemButton` 贡献,放在安装项之后。贡献者在开始动作前调用传入的 `onDismiss()` 关闭菜单。
+| 按钮或菜单项 | 结果 |
+| --- | --- |
+| **添加插件** | 打开安装对话框并聚焦包名输入框。 |
+| 箭头:**选择添加插件方式** | 打开包含安装及插件贡献动作的菜单。 |
+| **安装第三方插件** | 关闭菜单,打开同一对话框,从包名、Git 仓库或本地目录安装。 |
+| **让 Agent 创建插件** | 由 [ui-agent-preset](../ui-agent-preset/README.zh.md#use-this-package) 提供此项时,关闭菜单并进入创造模式,制作 DSH 插件。 |
首次使用时,如果未显式配置安装源、pnpm 使用官方 npm 源,且列表提供 npmmirror,Host 会并发探测这两个源,选择最先成功响应 HTTPS ping 的源。已记住的选择、用户手选、管理器显式配置,以及自定义或未知的 pnpm 源均保留。在初次探测期间点击安装会等待这次有时限的操作;迟到结果不会覆盖手选或重新打开已关闭的对话框。
@@ -103,6 +108,8 @@ Host 入口通过生成的 Remote 接口暴露 `pluginRegistryProbe.fastest()`
浏览器插件通过 `ctx.slots.inject()` 注册 `plugins` 侧栏入口与它的 `main` 面板,使两者跟随 slot 延迟声明、本地化变化与销毁。页面为全局页面,不属于任何 Session。显示文本来自包元信息与页面字典。
+添加控件复用 `Button`、`Menu` 和 `MenuItemButton`。两个安装入口调用同一个 `openInstall` 回调,使用 `InstallDialog` 与 `PluginManagerController`。root 作用域的 list slot `plugins.add.actions` 接受贡献的 `MenuItemButton` 行,放在安装项之后;每个贡献者接收 `onDismiss()` 回调,在开始动作前关闭菜单。
+
### store
`PluginManagerController` 拥有组合包视图、忙碌键、提示、安装进度和卸载确认。每次读取先问清单 Host 是否管理着 profile,再把 `listBundles` 与 `listPlugins` 合成每个组合包一份视图,其行携带存活条目的启停状态与 fiber 阶段。它合并重叠读取,在操作后、收到 `plugin-manager/changed` 时以及重连后刷新,并在销毁后忽略晚到结果。安装输出按 job id 分组。安装对话框沿 `idle → checking → starting → running → done | failed` 推进,`cancelling` 与 `applying` 按 Host 的报告呈现,安装或取消响应丢失时进入 `unconfirmed`;已确认的 `applying` 阶段不会倒退。通过 `waitForInstall` 恢复结果,无活动请求时结束为 `unknown`;checking 与所有活动阶段使用 ongoing,最终页面使用 done 或 error。检查在一个 `AbortController` 下运行,返回编辑或关闭会中止它并丢弃其结果;运行只能通过 `pluginManager.cancelInstall` 停止。关闭会隐藏任务而保留其状态。如果取消请求先于安装到达,在进度或输出确认该请求后会再次请求取消。Host 无法应用的变更、要等重启的变更、被更高层覆盖的变更,都是会自行消失的 toast。