refactor(connectors): drop the inline switch, card filter, and master switch from the Connectors tab

The tab lists the official connectors that master ships and uses the Plugins page's existing `install` and `openPackage` callbacks: a missing connector shows Install, and an installed one shows its state and opens its page. Installed connectors keep their cards on Installed and run whether or not the bundle is enabled.

`ui-plugin-manager`, the `official-bundles` README and index, the capability-seam and boot docs, and the Cordis catalog generators return to their master content. `CONNECTOR_BUNDLES`, the `connectors` Host Service, and the `plugins.bundle.switch` slot are removed. The Web e2e installs a missing connector through the page's dialog with Node standing in for pnpm, and the bundle preview shows the new rows.
This commit is contained in:
gengruilin committed 2026-11-19 13:44:09 +08:00
1 parent d996ea1d1b
commit aedea2d846
56 files changed
+303 -704

No files matched your search

@@ -6,14 +6,14 @@
en: 249475914d616170
zh: b08da05d8f12f78f
/agent-note-connectors-tab-for-the-official-connectors/problem:
en: f92c437ab1d84819
zh: 67f69f53b553d370
en: baadfd42b61cb847
zh: da6301aa0c4d9273
/agent-note-connectors-tab-for-the-official-connectors/decision:
en: ead8d1f4d6de50f0
zh: 89cc4283d74fa2d2
en: 4e6695b4afa88b80
zh: 0d791aa694937139
/agent-note-connectors-tab-for-the-official-connectors/alternatives-considered:
en: c61eea1df9db04cb
zh: 69c67507261525a4
en: b3b2ae80fd5e24bb
zh: cd13eb1ebc39a15c
/agent-note-connectors-tab-for-the-official-connectors/consequences:
en: 980db12716fec818
zh: fd324814740b6623
en: 6e3c94788a226f56
zh: 73e764045a382b8f
@@ -6,30 +6,28 @@ English | [中文](2026-11-01-connectors-tab.zh.md)
## Problem
The official connector bundles (Feishu, WeCom, DingTalk, Tencent Meeting, Notion, Tencent Docs, and Linear) are separately installed packages. Before installation the Plugins page shows nothing about a connector, and afterwards it lists the connector among all other installed bundles. Users need one place that offers every official connector, installs a missing one, and leads to the connector's own page, where its account section lives. Switching that place off switches every connector off.
The official connector bundles, such as Feishu, WeCom, Notion, Tencent Docs, and Linear, are separately installed packages. Before installation the Plugins page shows nothing about a connector. Users need one place that offers every official connector, installs a missing one, and leads to the connector's own page, where its account section lives.
## Decision
The experimental optional [Connectors bundle](../../../../packages/experimental/connectors-bundle/README.md), off by default and declaring `dsh.bundle.listedByDefault: false` so that the Plugins page lists it only once enabled, mounts the [Connectors tab](../../../../packages/experimental/client-ui-connectors/README.md) through `plugins.tab`. The entry is a tab rather than a bundle detail page because only a tab's owner props carry `install` and an `openPackage` whose page returns to the tab; the plugin manager keeps no navigation stack for a page opened from another bundle's page.
`CONNECTOR_BUNDLES` in [`dsh-official-bundles`](../../../../packages/util/official-bundles/README.md) names the connectors in the tab's order. The tab carries each connector's title and description in every shipped language and its brand icon, and shows the switch the connector's card would show, which the tab renders through the page's `plugins.bundle.switch` Factory; turning a missing connector on installs `<package>@<DSH_CLIENT_VERSION>` through the page's install dialog and switches it on. The connector packages stay separately installed and do not join `ON_DEMAND_BUNDLES`, so removing the experiment leaves every connector installable with `dsh plugin add`.
The tab uses the Plugins page as the Discover tab does and changes neither the page nor the shared bundle lists. It carries the connector list, each connector's title and description in every shipped language, and its brand icon. A connector the profile does not hold shows **Install**, which passes `<package>@<DSH_CLIENT_VERSION>` to the page's install dialog; an installed connector shows whether it is switched on, and its row opens its page. The connector packages stay separately installed and do not join `ON_DEMAND_BUNDLES`, so removing the experiment leaves every connector installable with `dsh plugin add`.
The Installed tab's card lists always leave the connectors out, and their detail pages open from the tab. The bundle's Host entry provides the `connectors` service, and each official connector's row declares `inject: [connectors]`, so the Loader keeps the connectors pending while the bundle is off. Switching Connectors off from the Plugins page, Settings, or the CLI stops every connector without changing the connector's own enabled state, and switching it on resumes them. Custom MCP servers stay in the MCP manager's settings and do not follow this switch.
Installed connectors keep their cards and switches on the Installed tab and run whether or not the Connectors bundle is enabled; the bundle adds only the tab.
## Alternatives considered
**A tab claim released with the tab.** `pluginNavigation.claim` took the connectors off the card lists only while the tab existed. Switching Connectors off then returned switched-on connectors to Installed and left them running, so the switch did not stop them.
**Leaving the connectors off the Installed lists.** With the tab as the connectors' only entry, each connector appears once. It needs a connector list shared with the Plugins page and a filter in that page's card lists, so an experimental tab changes what the page shows. The existing lists do not fit either: `HIDDEN_BUNDLES` also removes the detail pages that carry the account sections, `listedByDefault: false` still lists installed bundles, and `MORE_BUNDLES` applies only to official bundles.
**Switching the connectors off with the bundle.** The Plugins page could also disable the connectors when it disables the bundle. That covers only the page's own switch, reloads the Host once per connector, and overwrites each connector's enabled state. The bundle cannot do it itself, because its code unloads at that moment as it does on a restart.
**One switch that stops every connector.** A Host service that every connector row injects lets the bundle's switch stop and resume the connectors. Every connector then runs only while an experimental bundle is enabled, in every profile, including those without a Plugins page. A row condition (`disabled: !!js`) cannot follow the switch, because the Loader evaluates it only when it mounts the row, and disabling the connectors from the Plugins page covers only that page's switch and overwrites each connector's own enabled state.
**A row condition on the bundle selection.** `disabled: !!js` is evaluated only when the Loader decides whether to mount a row, and `profileContext.startedBundles` holds the selection at launch, so a row cannot follow a later switch.
**The Installed list's switch in each row.** A switch that installs a missing connector and then switches it on needs a new Factory slot and an install-then-enable path in the Plugins page. The install dialog's **Enable now** and the connector's page already switch a connector on.
**Official on-demand catalog entries for the connectors.** The catalog supplies offline metadata, detail pages before installation, and development `link:` installs. It also makes every connector an official catalog member that requires an icon, and lists uninstalled connectors in the Plugins page's own groups unless they are hidden as well.
**A detail page on the Connectors bundle card.** A `plugins.bundle.config` page cannot install a missing connector, a connector page opened from it returns to the main list, and the bundle's own rows and source sections stay below the content.
**Hiding connectors through the existing lists.** `HIDDEN_BUNDLES` also removes the detail pages that carry the account sections, `listedByDefault: false` still lists installed bundles, and `MORE_BUNDLES` applies only to official bundles.
## Consequences
Installing from the tab needs the connector package published at the running DSH version; development builds install connectors with `dsh plugin add`. A connector runs only while the experimental Connectors bundle is enabled, in every profile. A new official connector adds its package name to `CONNECTOR_BUNDLES`, its title, description, and icon to the tab, and `inject: [connectors]` to its row. The tab shows no account connection state; the connector's page does.
Installing from the tab needs the connector package published at the running DSH version; development builds install connectors with `dsh plugin add`. An installed connector appears on both the Installed tab and the Connectors tab, and the guidance it offers after **Enable now** appears on the Installed tab. A new official connector adds its package name, title, description, and icon to the tab; no check compares that copy with the connector's own. The tab shows no account connection state; the connector's page does.
@@ -6,30 +6,28 @@ Status: implemented
## 问题
官方连接器 bundle(飞书、企业微信、钉钉、腾讯会议、Notion、腾讯文档和 Linear)都是单独安装的包。安装前,插件页上看不到任何连接器信息;安装后,连接器和其他已安装的 bundle 混在一起。用户需要一个入口:列出所有官方连接器,能安装未安装的连接器,并能进入连接器自己的详情页,在那里连接账号。关闭这个入口,就关闭所有连接器。
飞书、企业微信、Notion、腾讯文档和 Linear 等官方连接器 bundle 都是单独安装的包。安装前,插件页上看不到任何连接器信息。用户需要一个入口:列出所有官方连接器,能安装未安装的连接器,并能进入连接器自己的详情页,在那里连接账号。
## 决策
实验性可选的 [“连接器”bundle](../../../../packages/experimental/connectors-bundle/README.zh.md) 默认关闭,并声明 `dsh.bundle.listedByDefault: false`,插件页只在它开启后才列出它;它通过 `plugins.tab` 挂载 [“连接器”标签页](../../../../packages/experimental/client-ui-connectors/README.zh.md)。入口做成标签页而不是 bundle 详情页,是因为只有标签页的 owner props 带有 `install`,以及打开后能返回该标签页的 `openPackage`;从另一个 bundle 的详情页打开的页面,插件管理器不保留导航栈。
[`dsh-official-bundles`](../../../../packages/util/official-bundles/README.zh.md) 的 `CONNECTOR_BUNDLES` 按标签页的顺序列出连接器。标签页自带每个连接器在所有随附语言中的名称和简介以及品牌图标,并显示连接器卡片上的那个开关:标签页通过插件页的组件工厂 `plugins.bundle.switch` 渲染它;打开未安装连接器的开关,会通过插件页的安装对话框安装 `<包名>@<DSH_CLIENT_VERSION>` 并开启它。连接器包保持单独安装,不加入 `ON_DEMAND_BUNDLES`;撤掉实验后,所有连接器仍可用 `dsh plugin add` 安装。
标签页和“发现”标签页一样使用插件页现有的能力,不改动插件页,也不改动共享的 bundle 名单。它自带连接器名单、每个连接器在所有随附语言中的名称和简介,以及品牌图标。profile 未持有的连接器显示**安装**,点击后把 `<包名>@<DSH_CLIENT_VERSION>` 交给插件页的安装对话框;已安装的连接器显示是否已开启,点这一行会打开它的详情页。连接器包保持单独安装,不加入 `ON_DEMAND_BUNDLES`;撤掉实验后,所有连接器仍可用 `dsh plugin add` 安装。
“已安装”标签页的卡片列表始终不显示连接器,它们的详情页从标签页打开。bundle 的 Host 入口提供 `connectors` 服务,每个官方连接器的条目都声明 `inject: [connectors]`,所以 bundle 关闭期间,Loader 让连接器保持等待。无论从插件页、设置还是 CLI 关闭“连接器”,所有连接器都会停止,各自的开关状态保持不变;重新开启后,它们恢复运行。自定义 MCP 服务器仍保存在 MCP 管理器的设置中,不受这个开关影响。
已安装的连接器在“已安装”标签页中保留自己的卡片和开关,无论“连接器”bundle 是否开启都会运行;这个 bundle 只增加标签页。
## 考虑过的替代方案
**随标签页撤销的认领。** `pluginNavigation.claim` 只在标签页存在期间把连接器移出卡片列表。关闭“连接器”后,已开启的连接器回到“已安装”并继续运行,这个开关没有让它们停下。
**不在“已安装”列表中显示连接器。** 标签页成为连接器的唯一入口,每个连接器只出现一次。但这需要一份与插件页共享的连接器名单,还要在插件页的卡片列表中加过滤,一个实验性标签页就此改变了插件页显示的内容。现有名单也不适用:`HIDDEN_BUNDLES` 会连同承载账号区块的详情页一起移除,`listedByDefault: false` 仍会列出已安装的 bundle,`MORE_BUNDLES` 只适用于官方 bundle。
**随 bundle 一起关闭连接器。** 插件页可以在关闭这个 bundle 时一并关闭连接器。但这只覆盖插件页自己的开关,每关一个连接器 Host 都要重新加载一次,还会覆盖每个连接器自己的开关状态。bundle 自己也做不到:那一刻它的代码正在卸载,和重启时一样。
**用一个开关停止所有连接器。** 让每个连接器条目都注入同一个 Host 服务,这个 bundle 的开关就能停止和恢复所有连接器。这样一来,在任何 profile 中(包括没有插件页的 profile),连接器都只在一个实验性 bundle 开启时运行。条目上的条件(`disabled: !!js`)无法跟随这个开关,因为 Loader 只在挂载条目时求值;由插件页一并关闭连接器,则只覆盖插件页自己的开关,还会覆盖每个连接器自己的开关状态。
**按 bundle 的选择给条目加条件。** `disabled: !!js` 只在 Loader 决定是否挂载条目时求值,`profileContext.startedBundles` 保存的是启动时的选择,所以条目无法跟随之后的开关。
**在每一行显示“已安装”列表的开关。** 开关要先安装未安装的连接器再开启它,这需要在插件页新增一个组件工厂插槽和一条“安装后开启”的路径。安装对话框的**立即启用**和连接器的详情页已经可以开启连接器。
**把连接器加入官方按需目录。** 目录能离线提供元数据、安装前的详情页和开发环境的 `link:` 安装;但它会让每个连接器都成为必须带图标的官方目录成员,而且除非再额外隐藏,未安装的连接器会出现在插件页自己的分组里。
**在“连接器”bundle 卡片的详情页上展示。** `plugins.bundle.config` 页面无法安装未安装的连接器,从它打开的连接器详情页会返回主列表,而且 bundle 自己的子行和来源区块始终显示在内容下方。
**用现有名单隐藏连接器。** `HIDDEN_BUNDLES` 会连同承载账号区块的详情页一起移除,`listedByDefault: false` 仍会列出已安装的 bundle,`MORE_BUNDLES` 只适用于官方 bundle。
## 后果
从标签页安装要求连接器包已按当前 DSH 版本发布;开发构建改用 `dsh plugin add` 安装连接器。在任何 profile 中,连接器都只在实验性的“连接器”bundle 开启时运行。新增官方连接器时,要把包名加入 `CONNECTOR_BUNDLES`,把名称、简介和图标加入标签页,并在它的条目上声明 `inject: [connectors]`。标签页不显示账号连接状态,连接状态在连接器的详情页查看。
从标签页安装要求连接器包已按当前 DSH 版本发布;开发构建改用 `dsh plugin add` 安装连接器。已安装的连接器同时出现在“已安装”标签页和“连接器”标签页中;选择**立即启用**后,连接器提供的引导显示在“已安装”标签页中。新增官方连接器时,要把包名、名称、简介和图标加入标签页;没有检查比对这些文案和连接器自身的文案。标签页不显示账号连接状态,连接状态在连接器的详情页查看。
+50 -16
View File
@@ -1,5 +1,5 @@
/** An installed connector stays off Installed, switches and opens from the Connectors tab, and stays off after that tab leaves. */
import { mkdtemp, rm, writeFile } from 'node:fs/promises'
/** The Connectors tab lists the official connectors, opens an installed one's page, and installs a missing one in the page's dialog. */
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { fileURLToPath } from 'node:url'
@@ -10,9 +10,13 @@ import { connectFreshWorkspaceZh, ZH_BROWSER_LOCALE } from './support.ts'
const BUNDLE = '@deepseek-ai/dsh-experimental-connectors-bundle'
const FEISHU = '@deepseek-ai/dsh-feishu'
const WECOM = '@deepseek-ai/dsh-wecom'
const EXPECTED = fileURLToPath(new URL('./expected/connectors-tab/connectors-tab.expected.md', import.meta.url))
it('lists the official connectors, switches an installed one from the tab, and keeps it off Installed when switched off', async () => {
const bundleManifest = (name: string, version: string): string =>
JSON.stringify({ name, version, dsh: { bundle: { patch: './cordis.patch.yml' } } })
it('lists the official connectors, opens an installed one\'s page, and installs a missing one at the running DSH version', async () => {
const root = await mkdtemp(join(tmpdir(), 'connectors-tab-web-'))
const owned: { scaffold?: WebScaffold; browser?: Browser } = {}
onTestFinished(async () => {
@@ -20,9 +24,31 @@ it('lists the official connectors, switches an installed one from the tab, and k
try { await owned.scaffold?.close() } finally { await rm(root, { recursive: true, force: true }) }
}
})
await writeFile(join(root, 'package.json'), JSON.stringify({ name: FEISHU, version: '1.0.0', dsh: { bundle: { patch: './cordis.patch.yml' } } }))
await writeFile(join(root, 'cordis.patch.yml'), '[]\n')
const scaffold = owned.scaffold = await launchWebScaffold({ profile: { packages: [{ dir: root, enabled: true }], bundles: [BUNDLE] } })
const { version } = JSON.parse(await readFile(new URL('../../../package.json', import.meta.url), 'utf8')) as { version: string }
const feishuDir = join(root, 'feishu')
await mkdir(feishuDir)
await writeFile(join(feishuDir, 'package.json'), bundleManifest(FEISHU, '1.0.0'))
await writeFile(join(feishuDir, 'cordis.patch.yml'), '[]\n')
const overlay = join(root, 'cordis.patch.yml')
await writeFile(overlay, `- id: plugin-manager\n config: ${JSON.stringify({ pnpmCommand: process.execPath })}\n`)
const scaffold = owned.scaffold = await launchWebScaffold({
profile: { packages: [{ dir: feishuDir, enabled: true }], bundles: [BUNDLE] }, extraOverlayPath: overlay,
})
// Node stands in for pnpm and runs the profile directory's file named after the subcommand: `config` names the
// registry, `view` answers with the WeCom bundle at the asked version, and `add` records its arguments and installs it.
const profile = join(scaffold.harnessHome, 'profiles', 'scaffold')
const wecom = bundleManifest(WECOM, version)
await writeFile(join(profile, 'config'), 'console.log("https://registry.npmjs.org/")\n')
await writeFile(join(profile, 'view'), `console.log(${JSON.stringify(wecom)})\n`)
await writeFile(join(profile, 'add'), `
const fs = require('node:fs')
fs.writeFileSync('.added', JSON.stringify(process.argv.slice(2)))
fs.mkdirSync('node_modules/${WECOM}', { recursive: true })
fs.writeFileSync('node_modules/${WECOM}/package.json', ${JSON.stringify(wecom)})
fs.writeFileSync('node_modules/${WECOM}/cordis.patch.yml', '[]\\n')
const manifest = JSON.parse(fs.readFileSync('package.json', 'utf8'))
fs.writeFileSync('package.json', JSON.stringify({ ...manifest, dependencies: { ...manifest.dependencies, '${WECOM}': '${version}' } }))
`)
const browser = owned.browser = await chromium.launch()
const page = await browser.newPage({ viewport: { width: 1440, height: 900 }, locale: ZH_BROWSER_LOCALE, reducedMotion: 'reduce' })
await page.goto(scaffold.authenticatedUrl)
@@ -31,20 +57,14 @@ it('lists the official connectors, switches an installed one from the tab, and k
const panel = page.locator('[data-plugin-panel]')
const tab = panel.getByRole('tab', { name: '连接器', exact: true })
await tab.waitFor()
await panel.locator(`[data-plugin-package="${BUNDLE}"]`).waitFor()
expect(await panel.locator(`[data-plugin-package="${FEISHU}"]`).count()).toBe(0)
// An installed connector keeps its card on Installed.
await panel.locator(`[data-plugin-package="${FEISHU}"]`).waitFor()
await tab.click()
const feishu = panel.locator('[data-connector="feishu"]')
await feishu.getByRole('button', { name: '打开 飞书插件', exact: true }).waitFor()
const toggle = feishu.getByRole('switch')
await expect.poll(() => toggle.getAttribute('aria-checked')).toBe('true')
await feishu.getByText('已开启', { exact: true }).waitFor()
await compareOrRefreshGolden(EXPECTED, await captureStableAria(page, '[data-connectors]', scaffold.workspaceCwd), webSnapshotMode())
// The tab's switch is the Installed list's own: it applies through the Host and reads back the new state.
await toggle.click()
await expect.poll(() => toggle.getAttribute('aria-checked')).toBe('false')
await toggle.click()
await expect.poll(() => toggle.getAttribute('aria-checked')).toBe('true')
// The row opens the page as an Installed card does: a click on its description reaches the name button.
const description = (await feishu.getByText('在对话中使用飞书文档、消息及其他已授权的功能。').boundingBox())!
const rowBox = (await feishu.boundingBox())!
@@ -54,8 +74,22 @@ it('lists the official connectors, switches an installed one from the tab, and k
await panel.getByRole('button', { name: '返回插件', exact: true }).click()
await feishu.waitFor()
// Install hands the page's dialog the connector at the running DSH version; the dialog names it by the tab's title.
const wecomRow = panel.locator('[data-connector="wecom"]')
await wecomRow.getByRole('button', { name: '安装 企业微信插件', exact: true }).click()
const dialog = page.getByRole('dialog')
const enableNow = dialog.getByRole('button', { name: '立即启用', exact: true })
await enableNow.waitFor({ timeout: 20_000 })
await dialog.getByText('企业微信插件', { exact: true }).waitFor()
expect(JSON.parse(await readFile(join(profile, '.added'), 'utf8'))).toContain(`${WECOM}@${version}`)
await enableNow.click()
await wecomRow.getByRole('button', { name: '打开 企业微信插件', exact: true }).waitFor()
await wecomRow.getByText('已开启', { exact: true }).waitFor()
// Switching the bundle off removes only the tab: the connectors stay installed and listed.
await panel.getByRole('tab', { name: '已安装', exact: true }).click()
await panel.locator(`[data-plugin-package="${BUNDLE}"]`).getByRole('switch').click()
await tab.waitFor({ state: 'detached' })
expect(await panel.locator(`[data-plugin-package="${FEISHU}"]`).count()).toBe(0)
expect(await panel.locator(`[data-plugin-package="${FEISHU}"]`).count()).toBe(1)
expect(await panel.locator(`[data-plugin-package="${WECOM}"]`).count()).toBe(1)
})
@@ -2,30 +2,16 @@
- list:
- listitem:
- button "打开 飞书插件": 飞书插件
- text: 在对话中使用飞书文档、消息及其他已授权的功能。
- status
- switch "启用 @deepseek-ai/dsh-feishu" [checked]
- text: 在对话中使用飞书文档、消息及其他已授权的功能。 已开启
- listitem:
- text: 企业微信插件 在对话中使用企业微信的文档、日程、会议、待办和消息。
- status
- switch "启用 企业微信插件"
- listitem:
- text: 钉钉插件 在对话中使用钉钉的日程、待办、文档、AI 表格、群聊和通讯录。
- status
- switch "启用 钉钉插件"
- listitem:
- text: 腾讯会议插件 在对话中使用腾讯会议的会议、录制、纪要和会议报告。
- status
- switch "启用 腾讯会议插件"
- button "安装 企业微信插件": 安装
- listitem:
- text: Notion 插件 在对话中使用 Notion 页面、数据库及其他已授权的内容。
- status
- switch "启用 Notion 插件"
- button "安装 Notion 插件": 安装
- listitem:
- text: 腾讯文档插件 在对话中使用你有权限的腾讯文档内容。
- status
- switch "启用 腾讯文档插件"
- button "安装 腾讯文档插件": 安装
- listitem:
- text: Linear 插件 在对话中使用 Linear 的议题、项目与评论。
- status
- switch "启用 Linear 插件"
- button "安装 Linear 插件": 安装
+2 -2
View File
@@ -6,5 +6,5 @@
en: 41d772192075e133
zh: 5ef3da69b4de1d8a
/capability-seams-and-core-services:
en: ddd2ea92286f2ca6
zh: 2ab80cbbb830823a
en: dcaf72b03e9838d2
zh: 75c5389916deacac
-4
View File
@@ -57,8 +57,6 @@ flowchart LR
pkg_experimental_client_ui_forge["experimental-client-ui-forge"]
svc_forgeSession["ctx.forgeSession<br/>Session change request bindings"]
svc_forgePanel["ctx.forgePanel<br/>Forge panel Remote"]
pkg_experimental_client_ui_connectors["experimental-client-ui-connectors"]
svc_connectors["ctx.connectors<br/>Connectors bundle switch"]
pkg_experimental_worktree["experimental-worktree"]
svc_worktrees["ctx.worktrees<br/>Git worktree creation"]
pkg_experimental_tool_worktree["experimental-tool-worktree"]
@@ -404,7 +402,6 @@ flowchart LR
pkg_experimental_browser_use_playwright_mcp --> svc_browserUse
pkg_experimental_browser_use_stagehand_native --> svc_browserUse
pkg_experimental_claude_code_mods --> svc_claudeCodeMods
pkg_experimental_client_ui_connectors --> svc_connectors
pkg_experimental_client_ui_cot_translation --> svc_cotTranslation
pkg_experimental_client_ui_forge --> svc_forgePanel
pkg_experimental_computer_use_cua_driver_mcp --> svc_computerUse
@@ -734,7 +731,6 @@ flowchart LR
| `ctx.forge` | `seam` | [`experimental-forge`](../packages/experimental/forge) | [`experimental-forge-github`](../packages/experimental/forge-github), [`forge-gitlab`](../packages/experimental/forge-gitlab) | [`experimental-forge-session`](../packages/experimental/forge-session), [`experimental-client-ui-forge`](../packages/experimental/client-ui-forge) | - | Providers map remote and change request URLs, look up change requests by head branch, and read status in batches; watchers of one change request share one polling loop. |
| `ctx.forgeSession` | `service` | [`experimental-forge-session`](../packages/experimental/forge-session) | - | [`experimental-client-ui-forge`](../packages/experimental/client-ui-forge) | - | A Session projection derives bindings from shell results and binding records and publishes their URLs without status to clients; push results trigger head-branch discovery, and Session watchers poll bound change requests through the forge registry. |
| `ctx.forgePanel` | `service` | [`experimental-client-ui-forge`](../packages/experimental/client-ui-forge) | - | - | - | Streams one panel state per followed Session: Git inspection using Session permissions, the recognized code host and its sign-in, and the bound change requests with polled status. |
| `ctx.connectors` | `service` | [`experimental-client-ui-connectors`](../packages/experimental/client-ui-connectors) | - | - | - | Present while the Connectors bundle is enabled; each official connector row injects it, so the Loader stops and resumes the connectors with the bundle. |
| `ctx.worktrees` | `seam` | [`experimental-worktree`](../packages/experimental/worktree) | [`experimental-worktree`](../packages/experimental/worktree) | [`experimental-tool-worktree`](../packages/experimental/tool-worktree) | - | Explicit experimental creation from a pinned local commit. Existing write permissions govern checkout and shared Git metadata; the working-directory service owns the resulting Session directory. |
| `ctx.workingDirectory` | `seam` | [`working-directory`](../packages/session/working-directory) | [`working-directory`](../packages/session/working-directory) | [`tool-fs`](../packages/fs/tool-fs), [`tool-bash`](../packages/shell/tool-bash), [`tool-pwsh`](../packages/shell/tool-pwsh), [`subagent`](../packages/subagent/subagent), [`sdk-jsonrpc-server`](../packages/sdk/server), [`sandbox-policy`](../packages/sandbox/sandbox-policy), [`api-workspace-files`](../packages/api/workspace-files), [`api-terminal-controller`](../packages/api/terminal-controller), [`workspace-changes`](../packages/deliverables/workspace-changes), [`file-reference-local`](../packages/context/file-reference-local), [`tool-skill`](../packages/skill/tool-skill), [`agent-instructions`](../packages/context/agent-instructions), [`tool-lsp`](../packages/lsp/tool-lsp) | - | One Session projection owns the effective execution directory, which only Host operations move. The filesystem validates changes and user context reports them; model tools resolve paths from the directory, the sandbox boundary, file views, and discovery follow it, and original metadata stays fixed. |
| `ctx.mcpResources` | `seam` | [`mcp-resources`](../packages/mcp/mcp-resources) | [`mcp-client`](../packages/mcp/mcp-client) | [`mcp-resources`](../packages/mcp/mcp-resources) | - | Connection-owned providers serve shared resource tools in the calling agent scope. |
-4
View File
@@ -59,8 +59,6 @@ flowchart LR
pkg_experimental_client_ui_forge["experimental-client-ui-forge"]
svc_forgeSession["ctx.forgeSession<br/>Session change request bindings"]
svc_forgePanel["ctx.forgePanel<br/>Forge panel Remote"]
pkg_experimental_client_ui_connectors["experimental-client-ui-connectors"]
svc_connectors["ctx.connectors<br/>Connectors bundle switch"]
pkg_experimental_worktree["experimental-worktree"]
svc_worktrees["ctx.worktrees<br/>Git worktree creation"]
pkg_experimental_tool_worktree["experimental-tool-worktree"]
@@ -406,7 +404,6 @@ flowchart LR
pkg_experimental_browser_use_playwright_mcp --> svc_browserUse
pkg_experimental_browser_use_stagehand_native --> svc_browserUse
pkg_experimental_claude_code_mods --> svc_claudeCodeMods
pkg_experimental_client_ui_connectors --> svc_connectors
pkg_experimental_client_ui_cot_translation --> svc_cotTranslation
pkg_experimental_client_ui_forge --> svc_forgePanel
pkg_experimental_computer_use_cua_driver_mcp --> svc_computerUse
@@ -736,7 +733,6 @@ flowchart LR
| `ctx.forge` | `seam` | [`experimental-forge`](../packages/experimental/forge) | [`experimental-forge-github`](../packages/experimental/forge-github), [`forge-gitlab`](../packages/experimental/forge-gitlab) | [`experimental-forge-session`](../packages/experimental/forge-session), [`experimental-client-ui-forge`](../packages/experimental/client-ui-forge) | - | 提供方映射远端与变更请求 URL、按 head 分支查找变更请求并批量读取状态;同一变更请求的监听方共享一个轮询循环。 |
| `ctx.forgeSession` | `service` | [`experimental-forge-session`](../packages/experimental/forge-session) | - | [`experimental-client-ui-forge`](../packages/experimental/client-ui-forge) | - | Session 投影从 shell 结果与绑定记录派生绑定,并把不含状态的 URL 发布给客户端;推送结果触发按 head 分支的发现,Session 监听方通过 forge 注册表轮询已绑定的变更请求。 |
| `ctx.forgePanel` | `service` | [`experimental-client-ui-forge`](../packages/experimental/client-ui-forge) | - | - | - | 为每个被跟随的 Session 推送一份面板状态:使用 Session 权限进行的 Git 检查、识别出的代码托管平台及其登录状态,以及带轮询状态的已绑定变更请求。 |
| `ctx.connectors` | `service` | [`experimental-client-ui-connectors`](../packages/experimental/client-ui-connectors) | - | - | - | “连接器”bundle 开启期间存在;每个官方连接器的条目都注入它,所以 Loader 随 bundle 的开关停止或恢复连接器。 |
| `ctx.worktrees` | `seam` | [`experimental-worktree`](../packages/experimental/worktree) | [`experimental-worktree`](../packages/experimental/worktree) | [`experimental-tool-worktree`](../packages/experimental/tool-worktree) | - | 显式实验组合从固定的本地提交创建工作树。检出目录与共享 Git 元数据受现有写权限约束;工作目录服务拥有创建后的 Session 目录。 |
| `ctx.workingDirectory` | `seam` | [`working-directory`](../packages/session/working-directory) | [`working-directory`](../packages/session/working-directory) | [`tool-fs`](../packages/fs/tool-fs), [`tool-bash`](../packages/shell/tool-bash), [`tool-pwsh`](../packages/shell/tool-pwsh), [`subagent`](../packages/subagent/subagent), [`sdk-jsonrpc-server`](../packages/sdk/server), [`sandbox-policy`](../packages/sandbox/sandbox-policy), [`api-workspace-files`](../packages/api/workspace-files), [`api-terminal-controller`](../packages/api/terminal-controller), [`workspace-changes`](../packages/deliverables/workspace-changes), [`file-reference-local`](../packages/context/file-reference-local), [`tool-skill`](../packages/skill/tool-skill), [`agent-instructions`](../packages/context/agent-instructions), [`tool-lsp`](../packages/lsp/tool-lsp) | - | 一个 Session 投影维护当前执行目录,只有 Host 操作能移动它。文件系统验证变更,用户上下文报告变更。模型工具基于当前目录解析路径,沙箱边界、文件视图和文件发现也随目录更新。原始元数据保持不变。 |
| `ctx.mcpResources` | `seam` | [`mcp-resources`](../packages/mcp/mcp-resources) | [`mcp-client`](../packages/mcp/mcp-client) | [`mcp-resources`](../packages/mcp/mcp-resources) | - | 连接所有者提供的操作在调用 agent 的作用域内服务于共享资源工具。 |
-8
View File
@@ -218,14 +218,6 @@ register<View extends AnyConnectorAccountView>(registration: ConnectorAccountReg
Source: [`packages/client/ui-connector-account/src/index.ts`](../../packages/client/ui-connector-account/src/index.ts)
<a id="ctxconnectors--connectors"></a>
### `ctx.connectors` — `Connectors`
Present while the Connectors bundle is enabled; a connector row that injects it runs only then.
Source: [`packages/experimental/client-ui-connectors/src/index.ts`](../../packages/experimental/client-ui-connectors/src/index.ts)
<a id="ctxheadlessstartup--headlessstartupvalues"></a>
### `ctx.headlessStartup` — `HeadlessStartupValues`
-8
View File
@@ -218,14 +218,6 @@ register<View extends AnyConnectorAccountView>(registration: ConnectorAccountReg
Source: [`packages/client/ui-connector-account/src/index.ts`](../../packages/client/ui-connector-account/src/index.ts)
<a id="ctxconnectors--connectors"></a>
### `ctx.connectors` — `Connectors`
Present while the Connectors bundle is enabled; a connector row that injects it runs only then.
Source: [`packages/experimental/client-ui-connectors/src/index.ts`](../../packages/experimental/client-ui-connectors/src/index.ts)
<a id="ctxheadlessstartup--headlessstartupvalues"></a>
### `ctx.headlessStartup` — `HeadlessStartupValues`
@@ -36,8 +36,8 @@
en: 16dbfb0ab558c951
zh: adf098c0751a7144
/deepseek-ai-dsh-client-ui-plugin-manager/use-this-package/page-tabs:
en: 913db9d005d67eb7
zh: c9df40e25bd8b766
en: 99c06790c2163746
zh: daa87ad1ce9a76ae
/deepseek-ai-dsh-client-ui-plugin-manager/understand-the-implementation:
en: 203168fc87e939bd
zh: 72d0ccd2c54f3f44
@@ -48,8 +48,8 @@
en: ef7ab41b4119c7b9
zh: 3166661bf84415e5
/deepseek-ai-dsh-client-ui-plugin-manager/understand-the-implementation/configuration-slots:
en: 04951d46d19745be
zh: 02461055fc51330f
en: a8efaca9e2f9616b
zh: cb42a9279f723bc2
/deepseek-ai-dsh-client-ui-plugin-manager/further-exploration:
en: f9a42dfed0360d6a
zh: 455a70bcb6c69624
+3 -5
View File
@@ -121,9 +121,7 @@ Component lists and detail pages show current startup diagnostics from the Host
### Page tabs
Another plugin adds a tab after the page's own **Installed** tab by registering into the `plugins.tab` list slot; the entry's `label` names the tab and `order` places it. The tabs appear under the page header once one entry exists and are hidden on a bundle's, row's, or official plugin's page; the selected tab survives leaving **Plugins**, and a tab whose entry leaves falls back to **Installed**. The page renders the selected entry in place of its groups and hides its own refresh and add buttons there. The owner props carry `install({ spec, registry?, title, version })`, `update({ packageName, version, spec })`, and `openPackage(name)`. `install` is for a version the person already confirmed in the tab: the install dialog opens at its check screen, without the spec form, names the plugin with `title` and `version` above the spec, which it shows in smaller monospace text, keeps that name on the progress and result screens, with the installed version once done, asks `registry` first for that install only and never remembers it, and offers **Retry** after a refusal; a hidden installation reopens instead. `openPackage` switches to **Installed** and opens the bundle's page when that tab lists it, and that page's back button returns to the tab that opened it; a bundle the page leaves out, such as a built-in profile bundle, leaves the Installed list open. A confirmed install offers no GitHub mirror recovery, since that recovery reopens the spec form, and its back button cancels a running install. `update` is for a newer Git version of a bundle the Host marks `update: 'git'`, from the repository directory that bundle came from: it opens the **Update** confirmation from the version the list holds, which names the repository and runs the same steps as a registry update with the pinned spec, and does nothing before the list holds the bundle or while another update runs. A tab shows the switch a bundle's card shows by rendering the page's `plugins.bundle.switch` Factory with `{ packageName, install? }`: the switch carries its progress and locks, and the guidance it opens shows on that tab; for a bundle the page does not list, turning the switch on installs `install` through the same dialog and switches the bundle on once installed, and the occurrence renders nothing while the page has not read its bundles or without `install`. The page registers the Factory for its own lifetime. [`ui-plugin-market`](../ui-plugin-market/README.md) contributes the **Discover** tab here.
The Installed tab's card lists leave out the official connector bundles that `CONNECTOR_BUNDLES` in [`dsh-official-bundles`](../../util/official-bundles/README.md) names, and the toolbar's update note does not count them; their pages still open through `openBundle` and a tab's `openPackage`. [Connectors](../../experimental/client-ui-connectors/README.md) lists them in its tab.
Another plugin adds a tab after the page's own **Installed** tab by registering into the `plugins.tab` list slot; the entry's `label` names the tab and `order` places it. The tabs appear under the page header once one entry exists and are hidden on a bundle's, row's, or official plugin's page; the selected tab survives leaving **Plugins**, and a tab whose entry leaves falls back to **Installed**. The page renders the selected entry in place of its groups and hides its own refresh and add buttons there. The owner props carry `install({ spec, registry?, title, version })`, `update({ packageName, version, spec })`, and `openPackage(name)`. `install` is for a version the person already confirmed in the tab: the install dialog opens at its check screen, without the spec form, names the plugin with `title` and `version` above the spec, which it shows in smaller monospace text, keeps that name on the progress and result screens, with the installed version once done, asks `registry` first for that install only and never remembers it, and offers **Retry** after a refusal; a hidden installation reopens instead. `openPackage` switches to **Installed** and opens the bundle's page when that tab lists it, and that page's back button returns to the tab that opened it; a bundle the page leaves out, such as a built-in profile bundle, leaves the Installed list open. A confirmed install offers no GitHub mirror recovery, since that recovery reopens the spec form, and its back button cancels a running install. `update` is for a newer Git version of a bundle the Host marks `update: 'git'`, from the repository directory that bundle came from: it opens the **Update** confirmation from the version the list holds, which names the repository and runs the same steps as a registry update with the pinned spec, and does nothing before the list holds the bundle or while another update runs. [`ui-plugin-market`](../ui-plugin-market/README.md) contributes the **Discover** tab here.
Access: the Plugins entry, page, refresh notice, Host change subscriptions, and `pluginNavigation` exist only while the current Peer may call `pluginManager/listBundles`; each later grant re-reads a list already loaded, and `pluginChanges` receives no updates while access is withdrawn. The owner always has access.
@@ -155,9 +153,9 @@ While the Plugins page has access, other Client plugins can read `pluginNavigati
Custom item pages use the Host entry id as their registration id; row pages use the bundle package and row id. The page owner supplies `form.state` and `form.mutate(operations, expectedRevision)` when the entry exposes editable Config fields. A custom page owns its draft and validation display, and may reuse `ConfigField` from ui-primitives. Bundle-wide pages can contain several entries and have no single form.
The page's `main` registration declares `plugins.item`, `plugins.bundle.config`, and `plugins.row.config` as its children, so the slots exist while the page does and a registrant's `ctx.slots.inject` waits for them. `configLedgerSource` projects the four ledgers into one observable — the official items and the `settings.section` entries in ledger order with their labels resolved in the active locale, each section with its registering module when known, and the bundle and row keys — cached until a ledger or the locale moves; the page binds it as `useConfigLedger` beside the store and never names a configurable plugin itself. The registration-owned navigation store selects the main list, the full experimental plugin list, a bundle, an official plugin, or a bundle row, and holds the bundle a switch turned on with the tab whose switch did; switching away from the Plugins panel resets it to the list without that activation, while React remounts preserve both. A fresh registration starts on the main list. Installation highlighting scrolls to a card only when it is on the current page; it does not change the selected page. Other Client plugins read `pluginNavigation` optionally, through `ctx.get` or `ctx.inject`, and call its `openBundle(packageName)` to open bundle details without changing the current Session; listing it in a plugin's `inject` keeps that plugin pending on a page without access. The target survives the initial inventory load; an absent bundle displays the list. A registration lives with the browser half that made it. `dsh-client-modules` attaches a package's browser half to the Loader row whose specifier is the bare package name, so every page a bundle registers, for itself or for any of its rows, goes away when that row is switched off; a sub-plugin whose page must outlive the other rows ships as its own package. Cards and detail pages show the Experimental marker only for packages in `EXPERIMENTAL_BUNDLES` in [`dsh-official-bundles`](../../util/official-bundles/README.md#plugin-manager-lists); package-name prefixes do not select the marker.
The page's `main` registration declares `plugins.item`, `plugins.bundle.config`, and `plugins.row.config` as its children, so the slots exist while the page does and a registrant's `ctx.slots.inject` waits for them. `configLedgerSource` projects the four ledgers into one observable — the official items and the `settings.section` entries in ledger order with their labels resolved in the active locale, each section with its registering module when known, and the bundle and row keys — cached until a ledger or the locale moves; the page binds it as `useConfigLedger` beside the store and never names a configurable plugin itself. The registration-owned navigation store selects the main list, the full experimental plugin list, a bundle, an official plugin, or a bundle row; switching away from the Plugins panel resets it to the list, while React remounts preserve the selected target. A fresh registration starts on the main list. Installation highlighting scrolls to a card only when it is on the current page; it does not change the selected page. Other Client plugins read `pluginNavigation` optionally, through `ctx.get` or `ctx.inject`, and call its `openBundle(packageName)` to open bundle details without changing the current Session; listing it in a plugin's `inject` keeps that plugin pending on a page without access. The target survives the initial inventory load; an absent bundle displays the list. A registration lives with the browser half that made it. `dsh-client-modules` attaches a package's browser half to the Loader row whose specifier is the bare package name, so every page a bundle registers, for itself or for any of its rows, goes away when that row is switched off; a sub-plugin whose page must outlive the other rows ships as its own package. Cards and detail pages show the Experimental marker only for packages in `EXPERIMENTAL_BUNDLES` in [`dsh-official-bundles`](../../util/official-bundles/README.md#plugin-manager-lists); package-name prefixes do not select the marker.
`plugins.bundle.config` supplies bundle detail configuration, keyed by npm package name. Client plugins can subscribe to the read-only `ctx.pluginChanges.bundle(packageName)` source to pause their queries while a bundle or one of its rows is being changed. Notifications precede the management request and continue when the page closes; subscribers release their observation on disposal. `plugins.bundle.activation` offers bundle-owned guidance after explicit enablement from the list, the detail page, or a contributed tab's switch, on the tab where the switch was turned on, with callbacks to dismiss it or open the bundle details. It does not appear merely because an enabled bundle was listed.
`plugins.bundle.config` supplies bundle detail configuration, keyed by npm package name. Client plugins can subscribe to the read-only `ctx.pluginChanges.bundle(packageName)` source to pause their queries while a bundle or one of its rows is being changed. Notifications precede the management request and continue when the page closes; subscribers release their observation on disposal. `plugins.bundle.activation` offers bundle-owned guidance after explicit enablement from either the list or detail page, with callbacks to dismiss it or open the bundle details. It does not appear merely because an enabled bundle was listed.
</details>
@@ -121,9 +121,7 @@ ctx.slots.inject('plugins.detail.section', () => ctx.slots.register({
### 页面标签页
其他插件向 `plugins.tab` 列表 slot 注册条目,即可在页面自带的**已安装**标签页之后添加一个标签页;条目的 `label` 为标签页命名,`order` 决定其位置。至少存在一个条目时,标签页显示在页头下方;在组合包、行或官方插件的页面上隐藏。离开**插件**后,所选标签页保持不变;所选标签页的条目被移除时,回到**已安装**。页面渲染所选条目以代替自身的分组,并在此时隐藏自身的刷新和添加按钮。owner props 提供 `install({ spec, registry?, title, version })`、`update({ packageName, version, spec })` 和 `openPackage(name)`。`install` 用于用户已在标签页中确认的版本:安装对话框在检查界面打开,不显示 spec 表单,在以较小等宽字显示的 spec 上方用 `title` 和 `version` 标明插件,并在进度和结果界面保持该名称,完成后显示已安装的版本;只在这一次安装中首先使用 `registry`,且从不记住它;被拒绝后提供**重试**;如果有隐藏中的安装任务,则改为重新打开该任务。`openPackage` 切换到**已安装**,并在该标签页列出该组合包时打开其页面,该页面的返回按钮回到打开它的标签页;页面不列出的组合包(例如内置 profile 组合包)只打开「已安装」列表。已确认的安装不提供 GitHub 镜像恢复,因为该恢复会重新打开 spec 表单;其返回按钮用于取消正在进行的安装。`update` 用于 Host 标为 `update: 'git'` 的组合包、来自其来源仓库目录的较新 Git 版本:它以列表中记录的版本为原版本打开**更新**确认框,该确认框显示仓库,并以固定的 spec 执行与注册表更新相同的步骤;列表尚未包含该组合包或另一个更新正在运行时,它不做任何事。标签页渲染插件页的组件工厂 `plugins.bundle.switch`(props 为 `{ packageName, install? }`)即可显示组合包卡片上的那个开关:开关带进度和锁定状态,它打开的引导显示在该标签页上;对于页面未列出的组合包,打开开关会通过同一个对话框安装 `install`,装好后开启该组合包;页面尚未读取组合包列表,或未提供 `install` 时不渲染任何内容。插件页在自身存在期间注册这个组件工厂。[`ui-plugin-market`](../ui-plugin-market/README.zh.md) 在这里贡献**发现**标签页。
“已安装”标签页的卡片列表不显示 [`dsh-official-bundles`](../../util/official-bundles/README.zh.md) 的 `CONNECTOR_BUNDLES` 列出的官方连接器组合包,工具栏的更新提示也不计入它们;它们的页面仍可通过 `openBundle` 和标签页的 `openPackage` 打开。[“连接器”](../../experimental/client-ui-connectors/README.zh.md)在自己的标签页中列出它们。
其他插件向 `plugins.tab` 列表 slot 注册条目,即可在页面自带的**已安装**标签页之后添加一个标签页;条目的 `label` 为标签页命名,`order` 决定其位置。至少存在一个条目时,标签页显示在页头下方;在组合包、行或官方插件的页面上隐藏。离开**插件**后,所选标签页保持不变;所选标签页的条目被移除时,回到**已安装**。页面渲染所选条目以代替自身的分组,并在此时隐藏自身的刷新和添加按钮。owner props 提供 `install({ spec, registry?, title, version })`、`update({ packageName, version, spec })` 和 `openPackage(name)`。`install` 用于用户已在标签页中确认的版本:安装对话框在检查界面打开,不显示 spec 表单,在以较小等宽字显示的 spec 上方用 `title` 和 `version` 标明插件,并在进度和结果界面保持该名称,完成后显示已安装的版本;只在这一次安装中首先使用 `registry`,且从不记住它;被拒绝后提供**重试**;如果有隐藏中的安装任务,则改为重新打开该任务。`openPackage` 切换到**已安装**,并在该标签页列出该组合包时打开其页面,该页面的返回按钮回到打开它的标签页;页面不列出的组合包(例如内置 profile 组合包)只打开「已安装」列表。已确认的安装不提供 GitHub 镜像恢复,因为该恢复会重新打开 spec 表单;其返回按钮用于取消正在进行的安装。`update` 用于 Host 标为 `update: 'git'` 的组合包、来自其来源仓库目录的较新 Git 版本:它以列表中记录的版本为原版本打开**更新**确认框,该确认框显示仓库,并以固定的 spec 执行与注册表更新相同的步骤;列表尚未包含该组合包或另一个更新正在运行时,它不做任何事。[`ui-plugin-market`](../ui-plugin-market/README.zh.md) 在这里贡献**发现**标签页。
访问控制:插件入口、页面、刷新提示、Host 变更订阅与 `pluginNavigation` 只在当前 Peer 可以调用 `pluginManager/listBundles` 时存在;之后每次授权都会重读已加载过的列表,撤权期间 `pluginChanges` 不更新。owner 始终有权限。
@@ -155,9 +153,9 @@ Host 入口通过生成的 Remote 接口暴露 `pluginRegistryProbe.fastest()`
自定义条目页以 Host 条目 id 作为注册 id;行页面使用 bundle 包名和行 id。当条目提供可编辑 Config 字段时,页面宿主传入 `form.state` 和 `form.mutate(operations, expectedRevision)`。自定义页面负责草稿和校验提示,并可复用 ui-primitives 的 `ConfigField`。整个 bundle 的页面可以包含多个条目,因此没有单一表单。
页面的 `main` 注册把 `plugins.item`、`plugins.bundle.config` 与 `plugins.row.config` 声明为子 slot,因此它们与页面同生,注册方的 `ctx.slots.inject` 会等到它们出现。`configLedgerSource` 把四份账本投影成一个可观察对象——按账本顺序排列、标签按当前语言解析的官方条目与 `settings.section` 条目(每个条目在已知时带注册它的模块),以及组合包与行的键——在账本或语言变化前保持缓存;页面把它作为 `useConfigLedger` 绑在 store 旁边,自身从不点名任何可配置插件。注册拥有的导航 store 选择主列表、完整的实验性插件列表、某个组合包、某个官方插件或组合包的某一行,并记录开关打开的组合包及其所在标签页;切换离开插件面板时重置为列表并清除该记录,React 重新挂载则保留两者。新的注册从主列表开始。安装后的高亮仅在当前页面有对应卡片时滚动定位,不改变所选页面。其他 Client 插件经 `ctx.get` 或 `ctx.inject` 以可选方式读取 `pluginNavigation`,调用其 `openBundle(packageName)` 即可打开组合包详情,不改变当前 Session;把它写进插件的 `inject` 会让该插件在无权限的页面上一直等待。首次读取清单期间保留导航目标;组合包不存在时显示列表。注册与做出它的浏览器半侧同生共死。`dsh-client-modules` 只把一个包的浏览器半侧挂在说明符恰为包名的那一行 Loader 行上,所以组合包为自己或任一行注册的页面,都会在那一行被关闭时一起消失;需要在其他行关闭时仍保留页面的子插件,应作为独立的包发布。 卡片和详情页仅为 [`dsh-official-bundles`](../../util/official-bundles/README.zh.md#plugin-manager-lists) 中 `EXPERIMENTAL_BUNDLES` 名单内的包显示实验性标签,包名前缀不决定标签。
页面的 `main` 注册把 `plugins.item`、`plugins.bundle.config` 与 `plugins.row.config` 声明为子 slot,因此它们与页面同生,注册方的 `ctx.slots.inject` 会等到它们出现。`configLedgerSource` 把四份账本投影成一个可观察对象——按账本顺序排列、标签按当前语言解析的官方条目与 `settings.section` 条目(每个条目在已知时带注册它的模块),以及组合包与行的键——在账本或语言变化前保持缓存;页面把它作为 `useConfigLedger` 绑在 store 旁边,自身从不点名任何可配置插件。注册拥有的导航 store 选择主列表、完整的实验性插件列表、某个组合包、某个官方插件或组合包的某一行;切换离开插件面板时重置为列表,React 重新挂载则保留所选目标。新的注册从主列表开始。安装后的高亮仅在当前页面有对应卡片时滚动定位,不改变所选页面。其他 Client 插件经 `ctx.get` 或 `ctx.inject` 以可选方式读取 `pluginNavigation`,调用其 `openBundle(packageName)` 即可打开组合包详情,不改变当前 Session;把它写进插件的 `inject` 会让该插件在无权限的页面上一直等待。首次读取清单期间保留导航目标;组合包不存在时显示列表。注册与做出它的浏览器半侧同生共死。`dsh-client-modules` 只把一个包的浏览器半侧挂在说明符恰为包名的那一行 Loader 行上,所以组合包为自己或任一行注册的页面,都会在那一行被关闭时一起消失;需要在其他行关闭时仍保留页面的子插件,应作为独立的包发布。 卡片和详情页仅为 [`dsh-official-bundles`](../../util/official-bundles/README.zh.md#plugin-manager-lists) 中 `EXPERIMENTAL_BUNDLES` 名单内的包显示实验性标签,包名前缀不决定标签。
`plugins.bundle.config` 以 npm 包名为 key,提供 Bundle 详情配置。Client 插件可订阅只读的 `ctx.pluginChanges.bundle(packageName)`,在组合包或其组件行变更期间暂停查询。通知先于管理请求发出,页面关闭后仍会更新;订阅方在卸载时释放观察。`plugins.bundle.activation` 在用户从列表、详情页或贡献标签页的开关显式启用后,在打开开关的那个标签页上提供 Bundle 自有引导,并传入关闭引导和打开详情的回调。仅列出已启用的 Bundle 不会触发引导。
`plugins.bundle.config` 以 npm 包名为 key,提供 Bundle 详情配置。Client 插件可订阅只读的 `ctx.pluginChanges.bundle(packageName)`,在组合包或其组件行变更期间暂停查询。通知先于管理请求发出,页面关闭后仍会更新;订阅方在卸载时释放观察。`plugins.bundle.activation` 在用户从列表或详情页显式启用后提供 Bundle 自有引导,并传入关闭引导和打开详情的回调。仅列出已启用的 Bundle 不会触发引导。
</details>
@@ -22,8 +22,8 @@ import {
} from '@deepseek-ai/dsh-client-ui-primitives'
import type { ClientEntryState } from '@deepseek-ai/dsh-client-modules/client'
import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'
import type { FactoryComponentPropsOf, InjectFace, PropsLocale, PropsRenderFactories, PropsRenderSlots, PropsRuntime, PropsStore } from '@deepseek-ai/dsh-client-ui-slots'
import { CONNECTOR_BUNDLES, EXTENSION_BUNDLES, HIDDEN_BUNDLES, MORE_BUNDLES } from '@deepseek-ai/dsh-official-bundles'
import type { InjectFace, PropsLocale, PropsRenderFactories, PropsRenderSlots, PropsRuntime, PropsStore } from '@deepseek-ai/dsh-client-ui-slots'
import { EXTENSION_BUNDLES, HIDDEN_BUNDLES, MORE_BUNDLES } from '@deepseek-ai/dsh-official-bundles'
import { localizedValues, TextSearchIndex } from '@deepseek-ai/dsh-util-text-search'
import type { createNavigationStore } from './navigation-store.ts'
import type { PluginHeaderLayoutFace } from './header-scroll.ts'
@@ -125,18 +125,6 @@ function rowsRunning(pkg: PackageView): boolean {
return pkg.rows.some(row => row.enabled)
}
/**
* Whether the page lists a bundle. It omits profile bundles and persistent terminals; other installed or offered
* bundles and unreadable selections remain manageable.
* @param pkg - the bundle as the Host reports it.
* @returns whether the page's lists and switches know the bundle.
*/
function listedOnPage(pkg: PackageView): boolean {
return !HIDDEN_BUNDLES.has(pkg.name)
&& (pkg.listedByDefault !== false || pkg.enabled || pkg.installed || rowsRunning(pkg))
&& (pkg.installed || pkg.official || pkg.error !== undefined)
}
/**
* Whether the main list shows an official optional bundle: any bundle outside `MORE_BUNDLES`, and any held-back one the profile enabled.
* @param pkg - the official bundle as the Host reports it.
@@ -419,11 +407,11 @@ function SourceSection({ pkg, t }: { readonly pkg: PackageView; readonly t: Tran
}
/**
* A bundle's enable switch on its card, its page, and a contributed tab: locked, saying why, for one the Host
* protects; off and locked for one it cannot read; off for one the page does not list yet.
* A bundle's enable switch on its card and its page: locked, saying why, for
* one the Host protects; off and locked for one it cannot read.
*/
function EnableSwitch({ pkg, title, t, busy, onSetEnabled }: {
readonly pkg: PackageView | undefined
readonly pkg: PackageView
readonly title: string
readonly t: Translate
readonly busy: boolean
@@ -436,42 +424,17 @@ function EnableSwitch({ pkg, title, t, busy, onSetEnabled }: {
{busy ? <StateDot state="ongoing" /> : null}
</span>
<Switch
checked={pkg?.enabled ?? false}
checked={pkg.enabled}
label={t('enableToggle', { name: title })}
disabled={busy || (pkg !== undefined && (pkg.readOnlyReason !== undefined || (!pkg.enabled && pkg.error !== undefined
&& (pkg.error.code === 'unsupported-platform' || !(pkg.availability === 'missing' && pkg.installTarget !== undefined)))))}
{...pkg?.readOnlyReason === undefined ? {} : { title: managementText({ code: pkg.readOnlyReason }, t) }}
disabled={busy || pkg.readOnlyReason !== undefined || (!pkg.enabled && pkg.error !== undefined
&& (pkg.error.code === 'unsupported-platform' || !(pkg.availability === 'missing' && pkg.installTarget !== undefined)))}
{...pkg.readOnlyReason === undefined ? {} : { title: managementText({ code: pkg.readOnlyReason }, t) }}
onChange={onSetEnabled}
/>
</span>
)
}
/** Props of one `plugins.bundle.switch` occurrence, as the renderer assembles them. */
export type BundleSwitchProps = FactoryComponentPropsOf<'plugins.bundle.switch'>
/**
* The Installed list's switch for one bundle, rendered by a contributed tab. A listed bundle switches on or off, with
* the activation guidance opening on the tab that rendered the switch; a bundle the page does not list installs
* `install` and switches on once installed.
* @param props - the bundle and its install target, the page's state and actions, and the navigation store.
* @returns the switch; null while the page has not read its bundles, or for an unlisted bundle without `install`.
*/
export function BundleSwitch(props: BundleSwitchProps): ReactNode {
const { packageName, install, t, resolveText } = props
const state = props.usePluginManager(snapshot => snapshot)
const tab = props.useStore(snapshot => snapshot.tab)
const { setActivation } = props.actions
const pkg = state.packages.find(item => item.name === packageName && listedOnPage(item))
if (pkg !== undefined) {
return <EnableSwitch pkg={pkg} title={packageText(pkg, resolveText).title} t={t} busy={bundleBusy(state, pkg.name)}
onSetEnabled={(enabled) => { setActivation(enabled ? { name: pkg.name, tab } : null); props.setEnabled(pkg.name, enabled) }} />
}
if (install === undefined || (state.status !== 'ready' && state.status !== 'error')) return null
return <EnableSwitch pkg={undefined} title={install.title} t={t} busy={bundleBusy(state, packageName)}
onSetEnabled={() => { setActivation({ name: packageName, tab }); props.installFrom(install, true) }} />
}
/** The status one card carries: running, off, not running because the Host skipped a selected bundle's layer, or another problem. */
type PackageStatus = 'running' | 'disabled' | 'not-running' | 'problem'
@@ -1626,8 +1589,6 @@ function ConfirmDialog({ name, t, onConfirm, onCancel }: {
)
}
const CONNECTORS: ReadonlySet<string> = new Set(CONNECTOR_BUNDLES)
/** Render the plugin manager: the official plugins and installed bundles, their pages, the install dialog, and the confirmation. */
export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
const { t, ensure, renderSlot, resolveText } = props
@@ -1649,7 +1610,7 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
const tab = tabs.some(item => item.id === selectedTab) ? selectedTab : INSTALLED_TAB
useEffect(() => { if (tab !== selectedTab) setTab(tab) }, [tab, selectedTab, setTab])
const tabsId = useId()
const activation = props.useStore(state => state.activation), { setActivation } = props.actions
const [activation, setActivation] = useState<string | null>(null)
const [headerRef] = useState(props.createHeaderRef)
useEffect(() => { ensure() }, [ensure])
// Installation highlights visible cards without changing the user's current page.
@@ -1663,11 +1624,11 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
}, [highlight, clearHighlight])
const noticeLine = state.notice === null || state.notice.kind === 'refresh-failed' ? null : noticeText(state.notice, t)
const listed = state.packages.filter(listedOnPage)
// The Connectors tab presents the official connectors; their pages still open from it.
const carded = listed.filter(pkg => !CONNECTORS.has(pkg.name))
const mine = carded.filter(pkg => !pkg.official)
const official = carded.filter(pkg => pkg.official)
const listed = state.packages.filter(pkg => !HIDDEN_BUNDLES.has(pkg.name)
&& (pkg.listedByDefault !== false || pkg.enabled || pkg.installed || rowsRunning(pkg))
&& (pkg.installed || pkg.official || pkg.error !== undefined))
const mine = listed.filter(pkg => !pkg.official)
const official = listed.filter(pkg => pkg.official)
// Both lists read one order over the eligible bundles: the main list holds the always-held ones plus the held-back
// ones the profile enabled, and the More list holds the eligible ones, so enabling a bundle from the More list pins it
// to the main list without moving it among its neighbours there.
@@ -1705,11 +1666,9 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
const installedPanel = tabs.length === 0 || showsMoreList
? {}
: { role: 'tabpanel', id: `${tabsId}-${INSTALLED_TAB}-panel`, 'aria-labelledby': `${tabsId}-${INSTALLED_TAB}` }
const activated = activation?.tab === tab
? listed.find(pkg => pkg.name === activation.name && pkg.enabled && !state.busy.includes(pkg.name))
: undefined
const activated = listed.find(pkg => pkg.name === activation && pkg.enabled && !state.busy.includes(pkg.name))
const setBundleEnabled = (name: string, enabled: boolean): void => {
setActivation(enabled ? { name, tab } : null)
setActivation(enabled ? name : null)
props.setEnabled(name, enabled)
}
const setRowEnabled = (row: PackageRow, enabled: boolean): void => {
@@ -1833,7 +1792,7 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
? (
<div role="tabpanel" id={`${tabsId}-${tab}-panel`} aria-labelledby={`${tabsId}-${tab}`} className={css.tabPanel}>
{renderSlot('plugins.tab', {
install: (target) => { props.installFrom(target, false) },
install: props.installFrom,
update: props.openGitUpdate,
openPackage: (name) => { setTab(INSTALLED_TAB); setView({ kind: 'package', name, returnTab: tab }) },
}, { only: tab })}
@@ -1954,18 +1913,13 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
</div>
)
: null}
{activated !== undefined && !state.install.open
{onInstalled && activated !== undefined && !state.install.open
? renderSlot('plugins.bundle.activation', {
packageName: activated.name,
onDismiss: () => { setActivation(null) },
onOpenDetails: () => {
setActivation(null)
if (onInstalled) {
setView({ kind: 'package', name: activated.name, ...showsMoreList ? { from: 'more' } : {} })
return
}
setTab(INSTALLED_TAB)
setView({ kind: 'package', name: activated.name, returnTab: tab })
setView({ kind: 'package', name: activated.name, ...showsMoreList ? { from: 'more' } : {} })
},
}, { entryKey: activated.name }) : null}
</div>
@@ -1988,12 +1942,7 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
onCancel={props.cancelInstall}
onReconcile={props.reconcileInstall}
onToggleDetails={props.toggleInstallDetails}
onEnableNow={() => {
// Guidance for a bundle the dialog switched on stays beside the Installed list that holds its card.
/* v8 ignore next -- the dialog offers Enable now only once it names the installed bundle */
setActivation(state.install.installed === null ? null : { name: state.install.installed, tab: INSTALLED_TAB })
props.enableInstalled()
}}
onEnableNow={() => { setActivation(state.install.installed); props.enableInstalled() }}
onApproveBuilds={props.approveBuildsAndRetry}
onToggleRegistry={props.toggleRegistryOptions}
onChooseRegistry={props.chooseRegistry}
@@ -25,7 +25,7 @@ import type {} from '@deepseek-ai/dsh-api-remotes/client'
// Type-only: the forwarded events' own declaration (`$on`'s key face resolves
// through the owning package's client-safe types subpath).
import type {} from '@deepseek-ai/dsh-plugin-manager/types'
import { BundleSwitch, PluginManagerPage } from './PluginManagerPage.tsx'
import { PluginManagerPage } from './PluginManagerPage.tsx'
import { createPluginHeaderRef } from './header-scroll.ts'
import { PluginRefreshToast, type PluginRefreshToastFace } from './PluginRefreshToast.tsx'
import { PluginsPanelIcon } from './PluginsPanelIcon.tsx'
@@ -35,7 +35,7 @@ import { tabLedgerSource } from './tab-ledger.ts'
import { PluginManagerController } from './manager-store.ts'
import { en, ja, es, fr, de, ru, pt, zh, type PluginManagerLocaleKey } from './locales.ts'
import { createNavigationStore } from './navigation-store.ts'
import type { PluginBundleSwitchFace } from './slot-contract.ts'
import type {} from './slot-contract.ts'
declare module '@deepseek-ai/cordis' {
interface Context {
@@ -63,14 +63,13 @@ declare module '@deepseek-ai/cordis' {
}
}
export type { BundleSwitchProps, PluginManagerPageProps } from './PluginManagerPage.tsx'
export type { PluginManagerPageProps } from './PluginManagerPage.tsx'
export type { ConfigLedger, OfficialItem, SettingsSectionItem } from './config-ledger.ts'
export type { PluginManagerFace } from './manager-store.ts'
export type { PluginManagerLocaleKey } from './locales.ts'
export type {
ConfigPageForm, PluginActivationOwnerProps, PluginAddActionsProps, PluginBundleSwitchFace, PluginBundleSwitchProps,
PluginTabInstall, PluginTabProps, PluginTabUpdate, PluginConfigViewProps, PluginDetailProps, PluginPackageRef,
PluginRowRef, PluginsSubject,
ConfigPageForm, PluginActivationOwnerProps, PluginAddActionsProps, PluginTabInstall, PluginTabProps, PluginTabUpdate,
PluginConfigViewProps, PluginDetailProps, PluginPackageRef, PluginRowRef, PluginsSubject,
} from './slot-contract.ts'
declare module '@deepseek-ai/dsh-client-ui-slots' {
@@ -156,18 +155,8 @@ export function apply(ctx: ClientContext): void {
'plugins.detail.section': { kind: 'list', scope: 'root' },
},
}, PluginManagerPage)
// The switch a contributed tab shows for a bundle, reading the page's state and the tab the store selects.
yield ctx.slots.registerFactory({
name: 'plugins.bundle.switch', scope: 'root', locale: NS, store,
inject: (): PluginBundleSwitchFace => ({
hooks: { pluginManager: face.hooks.pluginManager },
resolveText: face.resolveText, installFrom: face.installFrom, setEnabled: face.setEnabled,
}),
}, BundleSwitch)
yield ctx.layout.panelInfo.subscribe(() => {
if (ctx.layout.panelInfo.getSnapshot().activePanelId === PANEL_ID) return
instance.actions.setView({ kind: 'list' })
instance.actions.setActivation(null)
if (ctx.layout.panelInfo.getSnapshot().activePanelId !== PANEL_ID) instance.actions.setView({ kind: 'list' })
})
const openList = (): void => {
ctx.layout.selectPanel(PANEL_ID)
@@ -229,9 +229,9 @@ export interface InstallState {
readonly mirrorRecovery?: boolean
/**
* The spec came from a confirmed entry of another tab, with that entry's name and version: the dialog shows no spec
* form, only its check and outcome. With `enable`, the installed bundle is switched on as a catalog switch does.
* form, only its check and outcome.
*/
readonly confirmed?: { readonly title: string; readonly version: string; readonly enable?: true }
readonly confirmed?: { readonly title: string; readonly version: string }
/** The registries the Host configured, read when the dialog opens; null until the Host answered. */
readonly registries: PluginRegistries | null
/** The registry this install asks first: the one last used, else the Host's first. */
@@ -446,9 +446,8 @@ export interface PluginManagerFace {
* checking it; the dialog shows no spec form. A hidden installation reopens instead. The registry is asked first for
* this dialog only and never remembered.
* @param target - the exact spec, optional registry, and the name and version the dialog shows.
* @param enable - switch the bundle on once installed, instead of offering it afterward.
*/
installFrom: (target: PluginTabInstall, enable: boolean) => void
installFrom: (target: PluginTabInstall) => void
/** Hide immediately, abort a check, or request cancellation while retaining the Host-owned installation. */
closeInstall: () => void
editInstallSpec: (text: string) => void
@@ -768,14 +767,11 @@ export class PluginManagerController {
this.ctx.get('productAnalytics')?.track('plugin_add_button_click', {})
this.openDialog()
},
installFrom: ({ spec, registry, title, version }, enable) => {
installFrom: ({ spec, registry, title, version }) => {
// A hidden installation reopens as it is; only one installation runs at a time.
if (!this.openDialog()) return
this.transientRegistry = registry !== undefined
this.patchInstall({
spec, confirmed: { title, version, ...enable ? { enable } : {} },
...registry === undefined ? {} : { registry: { kind: 'custom', url: registry } },
})
this.patchInstall({ spec, confirmed: { title, version }, ...registry === undefined ? {} : { registry: { kind: 'custom', url: registry } } })
void this.runInstall()
},
closeInstall: () => {
@@ -1282,7 +1278,7 @@ export class PluginManagerController {
this.patchInstall({ phase: 'idle', inputError: { problem, reason, ...registries === undefined ? {} : { registries } } })
return
}
await this.startInstall({ spec, ...inspected.value, ...install.confirmed?.enable === true ? { selection: true } : {} })
await this.startInstall({ spec, ...inspected.value })
}
/**
@@ -1,4 +1,4 @@
/** Plugin page selection shared by the page, its bundle switch Factory, and cross-plugin navigation. */
/** Plugin page selection shared by the page and cross-plugin navigation. */
import { defineStore, type EngineStoreHandle } from '@deepseek-ai/dsh-client-store'
/**
@@ -12,15 +12,11 @@ type View =
| { readonly kind: 'item'; readonly id: string }
| { readonly kind: 'row'; readonly name: string; readonly rowId: string; readonly from?: 'more'; readonly returnTab?: string }
/** The bundle a switch turned on, with the tab whose switch did; its guidance shows on that tab. */
export type Activation = { readonly name: string; readonly tab: string }
/** `installed` is the page's own tab; any other value is the id of a `plugins.tab` entry. */
type NavigationState = { view: View; tab: string; activation: Activation | null }
type NavigationState = { view: View; tab: string }
type NavigationActions = {
setView: (draft: NavigationState, view: View) => void
setTab: (draft: NavigationState, tab: string) => void
setActivation: (draft: NavigationState, activation: Activation | null) => void
}
/**
@@ -29,11 +25,10 @@ type NavigationActions = {
*/
export function createNavigationStore(): EngineStoreHandle<NavigationState, NavigationActions> {
return defineStore({
init: (): NavigationState => ({ view: { kind: 'list' }, tab: 'installed', activation: null }),
init: (): NavigationState => ({ view: { kind: 'list' }, tab: 'installed' }),
actions: {
setView: (draft, view: View) => { draft.view = view },
setTab: (draft, tab: string) => { draft.tab = tab },
setActivation: (draft, activation: Activation | null) => { draft.activation = activation },
},
})
}
@@ -9,8 +9,7 @@
* `import type` and registers through `ctx.slots`; it never imports this
* package at runtime.
*
* A contributed tab, such as Discover, installs and updates through the page's own dialogs and shows the page's own
* switch through the `plugins.bundle.switch` Factory.
* A contributed tab, such as Discover, installs and updates through the page's own dialogs.
*
* Entries accept `page` for the form with its own save control and `summary`
* for an official card's one-liner or a row's missing-description fallback.
@@ -22,8 +21,6 @@
import type {} from '@deepseek-ai/dsh-client-ui-slots'
import type { BundleInfo } from '@deepseek-ai/dsh-api-remotes/client'
import type { ConfigForm, ConfigFormSnapshot } from '@deepseek-ai/dsh-client-ui-settings/client'
import type { PluginManagerFace } from './manager-store.ts'
import type { createNavigationStore } from './navigation-store.ts'
/** The view the page asks a configuration entry for. */
export interface PluginConfigViewProps {
@@ -126,25 +123,6 @@ export interface PluginTabProps {
readonly openPackage: (packageName: string) => void
}
/** The bundle one `plugins.bundle.switch` occurrence shows the switch of. */
export interface PluginBundleSwitchProps {
/** npm package name of the bundle. */
readonly packageName: string
/** The exact version to install while the page does not list the bundle. */
readonly install?: PluginTabInstall
}
/** What the page supplies to its bundle switch Factory: the bundle views and the actions a switch runs. */
export interface PluginBundleSwitchFace {
readonly hooks: {
/** The page's state, bound by the renderer as usePluginManager. */
readonly pluginManager: PluginManagerFace['hooks']['pluginManager']
}
readonly resolveText: PluginManagerFace['resolveText']
readonly installFrom: PluginManagerFace['installFrom']
readonly setEnabled: PluginManagerFace['setEnabled']
}
/** Add-plugin menu actions, independent of any selected bundle or Session. */
export interface PluginAddActionsProps {
/** Close the add-plugin menu before starting the contributed action. */
@@ -152,22 +130,6 @@ export interface PluginAddActionsProps {
}
declare module '@deepseek-ai/dsh-client-ui-slots' {
interface SlotFactoryMap {
/**
* The switch the Installed list shows for a bundle, with its progress, locks, and the activation guidance it
* opens on the tab that renders it. For a bundle the page does not list, turning the switch on installs
* `install` and switches the bundle on once installed; the occurrence renders nothing while the page has not read
* its bundles, or for an unlisted bundle without `install`. Registered by the Plugins page for its own lifetime.
*/
'plugins.bundle.switch': {
scope: 'root'
props: PluginBundleSwitchProps
store: ReturnType<typeof createNavigationStore>
inject: PluginBundleSwitchFace
locale: 'pluginManager'
}
}
interface SlotMap {
/** Additional MenuItemButton rows after installation: 72px high, with a title and a description capped at two lines. */
'plugins.add.actions': { kind: 'list'; scope: 'root'; owner: PluginAddActionsProps }
@@ -19,7 +19,6 @@ import type { PluginManagerFace } from '../src/client/manager-store.ts'
import type { createNavigationStore } from '../src/client/navigation-store.ts'
import type { PluginsSettingsLinkInjected } from '../src/client/PluginsSettingsLink.tsx'
import type { ClientSyncFace } from '../src/client/PluginManagerPage.tsx'
import type { PluginBundleSwitchFace } from '../src/client/slot-contract.ts'
usePinnedBrowserLanguages('zh-CN')
beforeEach(() => { localStorage.clear() })
@@ -122,25 +121,22 @@ describe('ui-plugin-manager browser plugin', () => {
const entry = b.slots.entries('main')[0]!
assert(entry.store && 'create' in entry.store)
const navigation = entry.store.create()
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' } })
b.ctx.pluginNavigation.openBundle('dsh-navigation-test')
expect(b.panelInfo.getSnapshot().activePanelId).toBe(PANEL_ID)
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name: 'dsh-navigation-test' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name: 'dsh-navigation-test' } })
b.selectPanel(null)
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' } })
b.selectPanel(PANEL_ID)
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' } })
assert(navigation.actions.setView)
navigation.actions.setView({ kind: 'more' })
// Guidance a switch opened does not outlive the page either.
assert(navigation.actions.setActivation)
navigation.actions.setActivation({ name: 'dsh-navigation-test', tab: 'installed' })
b.selectPanel(null)
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' } })
b.ctx.pluginNavigation.openBundle('dsh-navigation-test')
removeRoot()
b.selectPanel(null)
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name: 'dsh-navigation-test' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name: 'dsh-navigation-test' } })
})
it('opens the Plugins list from another panel and resets bundle details without opening installation', async () => {
@@ -156,15 +152,15 @@ describe('ui-plugin-manager browser plugin', () => {
b.ctx.pluginNavigation.openList()
expect(b.panelInfo.getSnapshot().activePanelId).toBe(PANEL_ID)
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' } })
expect(face.hooks.pluginManager.getSnapshot().install.open).toBe(false)
b.ctx.pluginNavigation.openBundle('dsh-navigation-test')
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name: 'dsh-navigation-test' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name: 'dsh-navigation-test' } })
navigation.actions.setTab('fixture-discover')
b.ctx.pluginNavigation.openList()
expect(b.panelInfo.getSnapshot().activePanelId).toBe(PANEL_ID)
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' } })
expect(face.hooks.pluginManager.getSnapshot().install.open).toBe(false)
expect(b.list).not.toHaveBeenCalled()
})
@@ -189,7 +185,7 @@ describe('ui-plugin-manager browser plugin', () => {
const linkInjected: object = link.inject!()
;(linkInjected as PluginsSettingsLinkInjected).openPlugins()
expect(b.panelInfo.getSnapshot().activePanelId).toBe(PANEL_ID)
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' } })
// The page reads this page's client synchronization from the module system and retries through it.
const pageInjected: object = b.slots.entries('main')[0]!.inject!()
const sync = pageInjected as ClientSyncFace
@@ -229,9 +225,7 @@ describe('ui-plugin-manager browser plugin', () => {
removeRoot()
expect(b.slots.entries('shell.overlay')).toHaveLength(0)
expect(b.slots.entries('main')).toHaveLength(0)
expect(b.slots.snapshot('factory:plugins.bundle.switch')).toEqual([])
declare(b.slots)
expect(b.slots.snapshot('factory:plugins.bundle.switch')).toHaveLength(1)
const remountedInjected: object = b.slots.entries('shell.overlay')[0]!.inject!()
expect((remountedInjected as PluginRefreshToastFace).hooks.pluginManager).toBe(face.hooks.pluginManager)
await fiber.dispose()
@@ -284,7 +278,6 @@ describe('ui-plugin-manager browser plugin', () => {
it('registers the sidebar entry and its page, which reads the Host only once rendered and follows Host changes', async () => {
const b = await bench()
declare(b.slots)
const registerFactory = vi.spyOn(b.slots, 'registerFactory')
const fiber = b.ctx.plugin({ inject: [...inject], apply })
await fiber.await()
@@ -292,7 +285,7 @@ describe('ui-plugin-manager browser plugin', () => {
expect(b.selectPanel).toHaveBeenCalledWith(PANEL_ID)
const entry = b.slots.entries('main')[0]!
assert(entry.store && 'create' in entry.store)
expect(entry.store.create().getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name: 'dsh-navigation-test' }, activation: null })
expect(entry.store.create().getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name: 'dsh-navigation-test' } })
expect(entry.component).toBe(PluginManagerPage)
expect(entry.options).toMatchObject({ key: PANEL_ID })
expect(entry.locale).toBe(NS)
@@ -315,19 +308,8 @@ describe('ui-plugin-manager browser plugin', () => {
for (const name of ['plugins.detail.actions', 'plugins.detail.badge', 'plugins.detail.section'] as const) {
expect(b.slots.spec(name)).toMatchObject({ kind: 'list', scope: 'root' })
}
// The switch a contributed tab shows for a bundle is the page's Factory, sharing the page's navigation store.
expect(b.slots.snapshot('factory:plugins.bundle.switch')).toMatchObject([{ type: 'factory', scope: 'root' }])
const injected: object = entry.inject!()
const face = injected as PluginManagerFace
const [factoryOptions] = registerFactory.mock.calls[0]!
expect(factoryOptions).toMatchObject({ name: 'plugins.bundle.switch', scope: 'root', locale: NS, store: entry.store })
const switchInjected: object = (factoryOptions as { inject: () => object }).inject()
const switchFace = switchInjected as PluginBundleSwitchFace
expect(Object.keys(switchFace).sort()).toEqual(['hooks', 'installFrom', 'resolveText', 'setEnabled'])
expect(switchFace.hooks.pluginManager).toBe(face.hooks.pluginManager)
expect(switchFace.installFrom).toBe(face.installFrom)
expect(switchFace.setEnabled).toBe(face.setEnabled)
expect(switchFace.resolveText).toBe(face.resolveText)
const overlay = b.slots.entries('shell.overlay')[0]!
expect(overlay.component).toBe(PluginRefreshToast)
expect(overlay.options).toMatchObject({ id: 'plugin-manager.refresh-toast' })
@@ -379,7 +361,6 @@ describe('ui-plugin-manager browser plugin', () => {
expect(b.ctx.get('pluginNavigation')).toBeUndefined()
expect(b.ctx.get('pluginChanges')).toBeUndefined()
expect(b.slots.entries('main')).toHaveLength(0)
expect(b.slots.snapshot('factory:plugins.bundle.switch')).toEqual([])
expect(b.slots.entries('shell.overlay')).toHaveLength(0)
expect(b.slots.entries('sidebar.panellist')).toHaveLength(0)
b.remote.emit('plugin-manager/changed', [{ reason: 'install' }])
@@ -15,18 +15,14 @@ import { StrictMode, type ReactNode } from 'react'
import type { LocaleSnapshot } from '@deepseek-ai/dsh-client-locale/client'
import { bundleDetailKey, type BundleDetailsState } from '../src/client/detail-store.ts'
import { createNavigationStore } from '../src/client/navigation-store.ts'
import { BundleSwitch, PluginManagerPage, type BundleSwitchProps } from '../src/client/PluginManagerPage.tsx'
import { PluginManagerPage } from '../src/client/PluginManagerPage.tsx'
import { PluginRefreshToast } from '../src/client/PluginRefreshToast.tsx'
import type { PluginManagerPageProps } from '../src/client/index.ts'
import type { PluginTab } from '../src/client/tab-ledger.ts'
import type { ConfigLedger } from '../src/client/config-ledger.ts'
import { rowKey, type InstallState, type PackageRow, type PackageView, type PluginManagerState, type UpdateState, type VersionCheck } from '../src/client/manager-store.ts'
import { INSTALL_GIT_EXAMPLE, INSTALL_PATH_EXAMPLE, en, zh, type PluginManagerLocaleKey } from '../src/client/locales.ts'
import type { PluginActivationOwnerProps, PluginAddActionsProps, PluginBundleSwitchProps, PluginDetailProps, PluginTabProps, PluginsSubject } from '../src/client/slot-contract.ts'
import type { PropsRenderFactories } from '@deepseek-ai/dsh-client-ui-slots'
/** The props a contributed tab's component receives: the page's owner props and the renderer's Factory renderer. */
type TabOwner = PluginTabProps & PropsRenderFactories
import type { PluginActivationOwnerProps, PluginAddActionsProps, PluginDetailProps, PluginTabProps, PluginsSubject } from '../src/client/slot-contract.ts'
beforeEach(() => { localStorage.clear() })
afterEach(cleanup)
@@ -195,28 +191,16 @@ function renderTab(
stub.publish(forms[id]!.state as ConfigFormSnapshot<T>)
return { ...stub.scope, mutate: forms[id]!.mutate }
},
renderFactorySlot: ((name: string, factoryProps: object) => {
if (name === 'plugins.bundle.switch') {
// The page's own switch Factory, assembled as the renderer would from the page's state and navigation store.
const switchProps = {
...factoryProps as PluginBundleSwitchProps, ...standard, t: currentT, resolveText,
useStore: bindSnapshotSelector(navigation), actions: navigation.actions, usePluginManager: bindSnapshotSelector(store),
installFrom: actions.installFrom, setEnabled: actions.setEnabled,
renderFactorySlot: props.renderFactorySlot, useFactorySlot: unusedStandardHook,
} as BundleSwitchProps
return <BundleSwitch {...switchProps} />
}
renderFactorySlot: ((name: string, factoryProps: SettingsSectionViewProps) => {
if (name !== 'settings.section.view') throw new Error(`Plugin manager fixture renders no Factory ${name}`)
const { id, close } = factoryProps as SettingsSectionViewProps
return bodies[`settings.section:${id}`]?.('page', { close }) ?? null
return bodies[`settings.section:${factoryProps.id}`]?.('page', { close: factoryProps.close }) ?? null
}) as PluginManagerPageProps['renderFactorySlot'],
renderSlot: (name, owner, opts) => {
const body = bodies[`${name}:${opts?.only ?? opts?.entryKey ?? ''}`]
if (body === undefined) return null
if (name === 'plugins.bundle.activation') return body('activation', owner)
if (name === 'plugins.add.actions') return body('add', owner)
// A tab component receives the Factory renderer from the renderer beside its owner props.
if (name === 'plugins.tab') return body('tab', { ...owner, renderFactorySlot: props.renderFactorySlot })
if (name === 'plugins.tab') return body('tab', owner)
if (name.startsWith('plugins.detail.')) return body('detail', owner)
if (!('view' in owner) || (owner.view !== 'summary' && owner.view !== 'page')) {
throw new Error('Plugin configuration fixture requires a summary or page view')
@@ -298,16 +282,16 @@ describe('PluginManagerPage', () => {
expect(document.querySelector('[data-plugin-group="bundles"]')).toBeNull()
expect(screen.queryByRole('button', { name: en.refresh })).toBeNull()
fireEvent.click(screen.getByRole('button', { name: 'Discover install' }))
expect(actions.installFrom).toHaveBeenCalledWith({ spec: 'dsh-a@1.0.0', registry: 'https://r.example/', title: 'Alpha', version: '1.0.0' }, false)
expect(actions.installFrom).toHaveBeenCalledWith({ spec: 'dsh-a@1.0.0', registry: 'https://r.example/', title: 'Alpha', version: '1.0.0' })
fireEvent.click(screen.getByRole('button', { name: 'Discover update' }))
expect(actions.openGitUpdate).toHaveBeenCalledWith({ packageName: 'dsh-a', version: '1.1.0', spec: 'git+https://git.example/o/a.git#bbbbbbb' })
fireEvent.click(screen.getByRole('button', { name: 'Discover open' }))
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name: 'dsh-better-sidebar', returnTab: 'discover' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name: 'dsh-better-sidebar', returnTab: 'discover' } })
expect(document.querySelector('[data-plugin-detail="dsh-better-sidebar"]')).not.toBeNull()
// A detail page hides the tabs; its back button returns to the tab that opened it.
expect(screen.queryByRole('tablist')).toBeNull()
fireEvent.click(screen.getByRole('button', { name: en.backToList }))
expect(navigation.getSnapshot()).toEqual({ tab: 'discover', view: { kind: 'list' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'discover', view: { kind: 'list' } })
expect(screen.getByRole('tab', { name: 'Discover' }).getAttribute('aria-selected')).toBe('true')
// A contributed tab that leaves the ledger falls back to Installed.
act(() => { navigation.actions.setView({ kind: 'list' }); navigation.actions.setTab('discover') })
@@ -367,7 +351,7 @@ describe('PluginManagerPage', () => {
expect(document.querySelector(`[data-plugin-detail="${inspector}"]`)).not.toBeNull()
// An official plugin of the More list opened from Discover returns to Discover, not to the More list.
fireEvent.click(screen.getByRole('button', { name: en.backToList }))
expect(navigation.getSnapshot()).toEqual({ tab: 'discover', view: { kind: 'list' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'discover', view: { kind: 'list' } })
fireEvent.click(screen.getByRole('tab', { name: en.installedTab }))
act(() => { navigation.actions.setView({ kind: 'more' }) })
fireEvent.click(screen.getByRole('button', { name: en.openDetail.replace('{name}', inspector) }))
@@ -389,7 +373,7 @@ describe('PluginManagerPage', () => {
fireEvent.click(screen.getByRole('button', { name: en.backToPackage.replace('{name}', 'dsh-better-sidebar') }))
expect(navigation.getSnapshot().view).toEqual({ kind: 'package', name: 'dsh-better-sidebar', returnTab: 'discover' })
fireEvent.click(screen.getByRole('button', { name: en.backToList }))
expect(navigation.getSnapshot()).toEqual({ tab: 'discover', view: { kind: 'list' }, activation: null })
expect(navigation.getSnapshot()).toEqual({ tab: 'discover', view: { kind: 'list' } })
// A calling tab that left the ledger while the page was open falls back to Installed.
fireEvent.click(screen.getByRole('button', { name: 'Discover open' }))
setTabs([])
@@ -903,17 +887,6 @@ describe('PluginManagerPage', () => {
expect(document.querySelector(`[data-plugin-package="${hidden}"]`)).toBeNull()
})
it('leaves the official connectors off both card lists while their pages still open', () => {
const b = renderTab({
packages: [pkg({ name: '@deepseek-ai/dsh-feishu' }), pkg({ name: '@deepseek-ai/dsh-notion', official: true }), pkg({ name: 'dsh-kept' })],
})
expect(document.querySelector('[data-plugin-package="@deepseek-ai/dsh-feishu"]')).toBeNull()
expect(document.querySelector('[data-plugin-package="@deepseek-ai/dsh-notion"]')).toBeNull()
expect(document.querySelector('[data-plugin-package="dsh-kept"]')).not.toBeNull()
act(() => { b.navigation.actions.setView({ kind: 'package', name: '@deepseek-ai/dsh-feishu' }) })
expect(document.querySelector('[data-plugin-detail="@deepseek-ai/dsh-feishu"]')).not.toBeNull()
})
it('does not open a default-hidden bundle by id while its card is hidden', () => {
const hidden = '@deepseek-ai/dsh-experimental-liveshare'
const b = renderTab({
@@ -1604,7 +1577,7 @@ describe('PluginManagerPage', () => {
it('starts on the main list when the navigation store is recreated', () => {
const first = createNavigationStore().create()
first.actions.setView({ kind: 'more' })
expect(createNavigationStore().create().getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' }, activation: null })
expect(createNavigationStore().create().getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' } })
})
it('counts an official plugin as content: the empty line waits for a page with nothing at all', () => {
@@ -2866,71 +2839,6 @@ it('keeps activation guidance with the Installed list when a contributed tab ena
expect(screen.getByText('Enable guidance')).toBeTruthy()
})
it('gives a contributed tab the Installed list switch, whose guidance opens on that tab and returns to it', () => {
const name = 'dsh-better-sidebar'
const { set, actions, navigation } = renderTab({ packages: [pkg({ enabled: false })] }, { bundles: new Set([name]) }, {
'plugins.tab:connectors': (_view, owner) => <div data-tab-switch>{(owner as TabOwner).renderFactorySlot('plugins.bundle.switch', { packageName: name })}</div>,
[`plugins.bundle.activation:${name}`]: (_view, owner) => <button onClick={(owner as PluginActivationOwnerProps).onOpenDetails}>Go to setup</button>,
[`plugins.bundle.config:${name}`]: () => <div>Bundle setup</div>,
}, {}, [{ id: 'connectors', label: 'Connectors' }])
fireEvent.click(screen.getByRole('tab', { name: 'Connectors' }))
const toggle = within(document.querySelector('[data-tab-switch]') as HTMLElement).getByRole('switch', { name: en.enableToggle.replace('{name}', name) })
expect(toggle.getAttribute('aria-checked')).toBe('false')
fireEvent.click(toggle)
expect(actions.setEnabled).toHaveBeenCalledWith(name, true)
set({ packages: [pkg()], busy: [name] })
expect(screen.queryByText('Go to setup')).toBeNull()
set({ busy: [] })
// The guidance belongs to the tab whose switch turned the bundle on.
fireEvent.click(screen.getByRole('tab', { name: en.installedTab }))
expect(screen.queryByText('Go to setup')).toBeNull()
fireEvent.click(screen.getByRole('tab', { name: 'Connectors' }))
expect(screen.getByText('Go to setup')).toBeTruthy()
// Switching the bundle off from the tab withdraws the guidance; switching it on again brings it back.
const tabSwitch = (): HTMLElement => within(document.querySelector('[data-tab-switch]') as HTMLElement).getByRole('switch')
fireEvent.click(tabSwitch())
expect(actions.setEnabled).toHaveBeenLastCalledWith(name, false)
expect(screen.queryByText('Go to setup')).toBeNull()
set({ packages: [pkg({ enabled: false })] })
fireEvent.click(tabSwitch())
expect(actions.setEnabled).toHaveBeenLastCalledWith(name, true)
set({ packages: [pkg()] })
fireEvent.click(screen.getByText('Go to setup'))
expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'package', name, returnTab: 'connectors' }, activation: null })
expect(screen.getByText('Bundle setup')).toBeTruthy()
})
it('installs and switches on a bundle the page does not list from a contributed tab switch', () => {
const install = { spec: 'dsh-new@1.0.0', title: 'New', version: '1.0.0' }
const { set, actions } = renderTab({ status: 'loading', packages: [] }, {}, {
'plugins.tab:connectors': (_view, owner) => {
const tab = owner as TabOwner
return <>
<div data-new>{tab.renderFactorySlot('plugins.bundle.switch', { packageName: 'dsh-new', install })}</div>
<div data-absent>{tab.renderFactorySlot('plugins.bundle.switch', { packageName: 'dsh-absent' })}</div>
</>
},
'plugins.bundle.activation:dsh-new': () => <div>New guidance</div>,
}, {}, [{ id: 'connectors', label: 'Connectors' }])
fireEvent.click(screen.getByRole('tab', { name: 'Connectors' }))
const slot = (marker: string): HTMLElement => document.querySelector(`[${marker}]`) as HTMLElement
// Until the page has read its bundles it cannot tell a missing bundle from one it lists.
expect(within(slot('data-new')).queryByRole('switch')).toBeNull()
set({ status: 'ready' })
expect(within(slot('data-absent')).queryByRole('switch')).toBeNull()
const toggle = within(document.querySelector('[data-new]') as HTMLElement).getByRole('switch', { name: en.enableToggle.replace('{name}', 'New') })
expect(toggle.getAttribute('aria-checked')).toBe('false')
fireEvent.click(toggle)
expect(actions.installFrom).toHaveBeenCalledWith(install, true)
expect(actions.setEnabled).not.toHaveBeenCalled()
const subject = { spec: install.spec, status: 'accepted', kind: 'registry', name: 'dsh-new', bundle: true, registry: null, selection: true } as const
set({ install: { ...IDLE_INSTALL, open: false, phase: 'running', subject } })
expect(within(document.querySelector('[data-new]') as HTMLElement).getByRole('switch')).toHaveProperty('disabled', true)
set({ install: IDLE_INSTALL, packages: [pkg({ name: 'dsh-new' })] })
expect(within(document.querySelector('[data-new]') as HTMLElement).getByRole('switch').getAttribute('aria-checked')).toBe('true')
expect(screen.getByText('New guidance')).toBeTruthy()
})
it('supplies the accepted entry values and atomic mutation action to a custom plugin page', () => {
const mutate = vi.fn(async () => true)
const form: ConfigPageForm = {
@@ -598,36 +598,24 @@ describe('PluginManagerController', () => {
.mockReturnValueOnce(gate.promise)
const { plugins, face, state, controller, started, track } = bench({ installBundle })
await controller.load()
face.installFrom({ spec: 'dsh-new@1.0.0', registry: 'https://r.example/', title: 'New', version: '1.0.0' }, false)
face.installFrom({ spec: 'dsh-new@1.0.0', registry: 'https://r.example/', title: 'New', version: '1.0.0' })
expect(track).not.toHaveBeenCalledWith('plugin_add_button_click', {})
expect(state().install).toMatchObject({ open: true, spec: 'dsh-new@1.0.0', confirmed: { title: 'New', version: '1.0.0' }, registry: { kind: 'custom', url: 'https://r.example/' } })
await started()
expect(plugins.inspect).toHaveBeenCalledWith('dsh-new@1.0.0', { registry: 'https://r.example/' }, expect.any(AbortSignal))
face.closeInstall()
face.installFrom({ spec: 'dsh-other@2.0.0', title: 'Other', version: '2.0.0' }, false)
face.installFrom({ spec: 'dsh-other@2.0.0', title: 'Other', version: '2.0.0' })
expect(state().install).toMatchObject({ open: true, spec: 'dsh-new@1.0.0' })
gate.resolve(ok({ ...APPLIED, bundle: 'dsh-new' }))
await vi.waitFor(() => { expect(state().install.requestId).toBeUndefined() })
face.closeInstall()
face.installFrom({ spec: 'dsh-other@2.0.0', title: 'Other', version: '2.0.0' }, false)
face.installFrom({ spec: 'dsh-other@2.0.0', title: 'Other', version: '2.0.0' })
expect(state().install).toMatchObject({ open: true, spec: 'dsh-other@2.0.0', registry: { kind: 'offered', registry: null } })
await vi.waitFor(() => { expect(plugins.inspect).toHaveBeenLastCalledWith('dsh-other@2.0.0', { registry: null }, expect.any(AbortSignal)) })
await vi.waitFor(() => { expect(state().install.phase).toBe('done') })
expect(installBundle).toHaveBeenCalledTimes(2)
})
it('switches a tab-confirmed install on once installed, closing with no offer to enable it', async () => {
const installBundle = vi.fn(() => Promise.resolve(ok({ ...APPLIED, bundle: 'dsh-new' })))
const { plugins, face, state, controller } = bench({ installBundle })
await controller.load()
face.installFrom({ spec: 'dsh-new@1.0.0', title: 'New', version: '1.0.0' }, true)
expect(state().install.confirmed).toEqual({ title: 'New', version: '1.0.0', enable: true })
await vi.waitFor(() => { expect(state().install.phase).toBe('done') })
expect(plugins.installBundle).toHaveBeenCalledWith('dsh-new@1.0.0', expect.objectContaining({ enabled: true }))
expect(state().install.subject?.selection).toBe(true)
expect(state().highlight).toBe('dsh-new')
})
it('checks the spec, hands the run to the Host, and folds the chunks that carry its request id', async () => {
const gate = deferred<ReturnType<typeof ok<ChangeResult>>>()
const { plugins, face, state, controller, started } = bench({ installBundle: vi.fn().mockReturnValueOnce(gate.promise) })
+2 -2
View File
@@ -18,8 +18,8 @@
en: 55d9e37b0a8dd4d8
zh: 3acb6415f92698fb
/packages-experimental/packages:
en: 50cb315d1a4deb6f
zh: 530a05844bf796c6
en: 45e174e21e1028eb
zh: 862e77b15f4bc7e7
/packages-experimental/related-documentation:
en: 40797d4849455966
zh: bb91a68dd995887c
+1 -1
View File
@@ -54,7 +54,7 @@ Promotion requires a named product role, documented public behavior and limitati
| [`tool-ralph`](tool-ralph/README.md) | Bounded repeated delegated tasks | — |
| [`skill-badge`](skill-badge/README.md) | The powered-by-dsh badge skill | — |
| [`translator`](translator/README.md) | Anonymous Google and Bing text translation | `ctx.translator` |
| [`client-ui-connectors`](client-ui-connectors/README.md) | Plugins page tab that lists, installs, and opens the official connectors | `ctx.connectors` |
| [`client-ui-connectors`](client-ui-connectors/README.md) | Plugins page tab that lists, installs, and opens the official connectors | — |
| [`client-ui-cot-translation`](client-ui-cot-translation/README.md) | Expanded reasoning translation and original-text controls | `ctx.cotTranslation` |
| [`cot-translation-bundle`](cot-translation-bundle/README.md) | Default-disabled reasoning translation composition | — |
| [`speech-to-text`](speech-to-text/README.md) | Named speech recognition providers | `ctx.speechToText` |
+1 -1
View File
@@ -54,7 +54,7 @@ kind: "package-group"
| [`tool-ralph`](tool-ralph/README.zh.md) | 有界重复委派任务 | — |
| [`skill-badge`](skill-badge/README.zh.md) | powered-by-dsh 徽章技能 | — |
| [`translator`](translator/README.zh.md) | 免登录 Google 与 Bing 文本翻译 | `ctx.translator` |
| [`client-ui-connectors`](client-ui-connectors/README.zh.md) | 插件页中列出、安装和打开官方连接器的标签页 | `ctx.connectors` |
| [`client-ui-connectors`](client-ui-connectors/README.zh.md) | 插件页中列出、安装和打开官方连接器的标签页 | — |
| [`client-ui-cot-translation`](client-ui-cot-translation/README.zh.md) | 展开的思考内容翻译与原文控件 | `ctx.cotTranslation` |
| [`cot-translation-bundle`](cot-translation-bundle/README.zh.md) | 默认禁用的思考内容翻译组合 | — |
| [`speech-to-text`](speech-to-text/README.zh.md) | 具名语音识别 Provider | `ctx.speechToText` |
@@ -9,29 +9,29 @@
en: 20e72c60f264f998
zh: 426e1f811b518fd0
/deepseek-ai-dsh-experimental-client-ui-connectors/summary:
en: 1701fbd68b1ddc8a
zh: 588a0c98952ed39c
en: 92574ba9fbebf5f0
zh: 8430f561f40c08e0
/deepseek-ai-dsh-experimental-client-ui-connectors/table-of-contents:
en: d152484eb41ac6b4
zh: b00dddf4c88f0a45
/deepseek-ai-dsh-experimental-client-ui-connectors/use-this-package:
en: a76a745b43a796ac
zh: f4611ab0235ff15b
en: af6cee2a139e511c
zh: 92d5fd2578af6922
/deepseek-ai-dsh-experimental-client-ui-connectors/understand-the-implementation:
en: 7c812257ad736dcf
zh: b2fe17cdbba6ae50
en: 28f66f155a8fe2b8
zh: 516ee38d2eaa3315
/deepseek-ai-dsh-experimental-client-ui-connectors/further-exploration:
en: fea9d42c53186396
zh: 20405bb08ecc367f
en: 4909b3b0b1523ad0
zh: 585d923a6f73e60a
/deepseek-ai-dsh-experimental-client-ui-connectors/model-experience:
en: ab039240e94e9613
zh: b4609b7bfc71af70
/deepseek-ai-dsh-experimental-client-ui-connectors/model-experience/kv-cache-effect:
en: 988cfdb3d5dbd493
zh: 9916bcae67fdef76
en: e6d0cc87cc3db279
zh: 433828341caab7b4
/deepseek-ai-dsh-experimental-client-ui-connectors/known-limitations-and-deferred-work:
en: 77d40b9232b643a8
zh: a611a7e7ea59139d
en: 46e4092f0051e44d
zh: 33a41caa9cc890b0
/deepseek-ai-dsh-experimental-client-ui-connectors/known-limitations-and-deferred-work/dev-note:
en: e67f633dc6fe7773
zh: 8ec3e73528ddb1a6
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
## Summary
The Connectors tab of the Plugins page lists the official connectors with their brand icons and the Installed list's switch. Turning a missing connector on installs it at the running DSH version and switches it on; an installed connector's row opens its page, as a card on the Installed list does. The Installed tab's card lists leave the connectors to this tab, and switching the Connectors bundle off stops every connector.
The Connectors tab of the Plugins page lists the official connectors with their brand icons. A connector the profile does not hold shows **Install**, which installs it at the running DSH version through the page's install dialog; an installed connector shows its state, and its row opens its page, as a card on the Installed list does.
## Table of Contents
@@ -25,7 +25,7 @@ The Connectors tab of the Plugins page lists the official connectors with their
<a id="use-this-package"></a>
## Use this package
Enable the [Connectors bundle](../connectors-bundle/README.md). This package has no configuration fields. Each row shows the connector's brand icon, title, and description in the interface language, and the switch its card would show on the Installed list. Turning on a connector the profile does not hold opens the install dialog at the running DSH version, switches the connector on once installed, and shows its account guidance on this tab; a build that carries no DSH version shows no switch for it. A connector runs only while the bundle is enabled; switching the bundle off stops every connector and keeps each connector's own switch, and switching it back on resumes them.
Enable the [Connectors bundle](../connectors-bundle/README.md). This package has no configuration fields. Each row shows the connector's brand icon, title, and description in the interface language. A connector the profile does not hold shows **Install**, which opens the Plugins install dialog at its check screen with the connector's package at the running DSH version; the dialog offers **Enable now** once the installation finishes. A build that carries no DSH version shows no Install. An installed connector shows **Installed** or **On**; its row opens its page, and that page's Back button returns to the tab. Installed connectors keep their cards and switches on the Installed tab and run whether or not the bundle is enabled.
-----
@@ -35,7 +35,7 @@ Enable the [Connectors bundle](../connectors-bundle/README.md). This package has
<details>
<summary>Implementation internals — click to expand</summary>
The Host entry provides the `connectors` service while the bundle is enabled. A connector row that declares `inject: [connectors]` stays pending without it, so the Loader stops and resumes the connectors with the bundle's switch wherever it changes. The browser entry registers the tab into `plugins.tab`. `ConnectorsController` reads `pluginManager.listBundles` when the tab first renders and again on `plugin-manager/changed` and `connection/reset`; only the latest read publishes. Each row renders the page's `plugins.bundle.switch` Factory, with the install target `<package>@<DSH_CLIENT_VERSION>` for a missing connector, and an installed connector's name button, stretched over its row, calls `openPackage`. Each connector's brand icon is a copy of the `icon.svg` its bundle declares, under `src/client/assets/`. The connector list is `CONNECTOR_BUNDLES` from [`dsh-official-bundles`](../../util/official-bundles/README.md), which the Plugins page also keeps off its card lists; each connector's title, description, and icon live in this package, so the tab shows connectors the profile does not hold.
The Host entry is an empty plugin, and the browser entry registers the tab into `plugins.tab`. `ConnectorsController` reads `pluginManager.listBundles` when the tab first renders and again on `plugin-manager/changed` and `connection/reset`; only the latest read publishes. **Install** calls the owner's `install` with the spec `<package>@<DSH_CLIENT_VERSION>`, and an installed connector's name button, stretched over its row, calls `openPackage`. Each connector's brand icon is a copy of the `icon.svg` its bundle declares, under `src/client/assets/`. The connector list and each connector's title, description, and icon live in this package, so the tab shows connectors the profile does not hold.
- [Host source](src/index.ts)
- [Browser source](src/client/index.ts)
@@ -49,7 +49,7 @@ The Host entry provides the `connectors` service while the bundle is enabled. A
## Further Exploration
- [Connectors bundle](../connectors-bundle/README.md) — the optional bundle that enables this tab.
- [Plugins page](../../client/ui-plugin-manager/README.md) — page tabs, the install dialog, and the card lists that leave the connectors to this tab.
- [Plugins page](../../client/ui-plugin-manager/README.md) — page tabs and the install dialog.
-----
@@ -60,14 +60,14 @@ Indirectly, through the connector bundles its Install adds; each installed conne
#### KV Cache effect
The tab adds no model context. An installed or switched-on connector changes later requests as that connector documents, and switching the bundle off removes every connector's contributions from later requests until it is switched back on.
The tab adds no model context. An installed or switched-on connector changes later requests as that connector documents.
## Known Limitations and Deferred Work
<a id="known-limitations-and-deferred-work"></a>
- The list names only connectors that DSH releases; a new connector adds its package name to `CONNECTOR_BUNDLES`, its copy and icon here, and `inject: [connectors]` to its row. A row's title and description are this package's copy and must follow the connector's own display title, which names its switch; no check compares the two.
- Rows show no account connection state; the connector's page shows it.
- The list names only connectors that DSH releases; a new connector adds its package name, copy, and icon here. A row's title and description are this package's copy and must follow the connector's own display title; no check compares the two.
- Rows show no account connection state; the connector's page shows it. The account guidance a connector offers after **Enable now** appears on the Installed tab.
- Installing needs the connector package published at the running DSH version.
-----
@@ -9,7 +9,7 @@ kind: "package-reference"
## 概述
插件页的“连接器”标签列出官方连接器,每行带品牌图标和“已安装”列表上的开关。打开未安装连接器的开关,会安装与当前 DSH 版本相同的包并开启它;与“已安装”列表的卡片一样,点已安装连接器的这一行会打开它的详情页。“已安装”标签的卡片列表把连接器留给本标签,关闭“连接器”bundle 会停止所有连接器。
插件页的“连接器”标签列出官方连接器,每行带品牌图标。profile 未持有的连接器显示**安装**,点击后通过插件页的安装对话框安装与当前 DSH 版本相同的包;已安装的连接器显示它的状态,并且与“已安装”列表的卡片一样,点这一行会打开它的详情页。
## 目录
@@ -25,7 +25,7 @@ kind: "package-reference"
<a id="use-this-package"></a>
## 使用本包
启用 [“连接器”bundle](../connectors-bundle/README.zh.md)。本包没有配置项。每一行以界面语言显示连接器的品牌图标、名称和简介,以及它在“已安装”列表的卡片上会显示的开关。打开 profile 未持有的连接器的开关,会以当前 DSH 版本打开安装对话框,装好后开启该连接器,并在本标签上显示它的账号引导;构建中没有 DSH 版本时,这类连接器不显示开关。连接器只在 bundle 开启时运行:关闭 bundle 会停止所有连接器,但保留每个连接器自己的开关;重新开启后,它们恢复运行。
启用 [“连接器”bundle](../connectors-bundle/README.zh.md)。本包没有配置项。每一行以界面语言显示连接器的品牌图标、名称和简介。profile 未持有的连接器显示**安装**,点击后插件页的安装对话框直接进入检查步骤,安装目标是该连接器在当前 DSH 版本的包;安装完成后,对话框提供**立即启用**。构建中没有 DSH 版本时,不显示“安装”。已安装的连接器显示**已安装**或**已开启**;点这一行会打开它的详情页,详情页的返回键会回到本标签。已安装的连接器在“已安装”标签中保留自己的卡片和开关,无论 bundle 是否开启都会运行。
-----
@@ -35,7 +35,7 @@ kind: "package-reference"
<details>
<summary>实现细节 — 点击展开</summary>
Host 入口在 bundle 开启期间提供 `connectors` 服务。声明了 `inject: [connectors]` 的连接器条目在没有这个服务时保持等待,所以无论开关在哪里切换,Loader 都会随之停止或恢复连接器。浏览器入口把标签注册到 `plugins.tab`。`ConnectorsController` 在标签首次渲染时读取 `pluginManager.listBundles`,收到 `plugin-manager/changed` 和 `connection/reset` 时再次读取,只采用最新一次读取的结果。每一行渲染插件页的组件工厂 `plugins.bundle.switch`,未安装的连接器附带安装目标 `<包名>@<DSH_CLIENT_VERSION>`;已安装连接器的名称按钮覆盖整行,点击会调用 `openPackage`。每个连接器的品牌图标是其 bundle 所声明 `icon.svg` 的副本,放在 `src/client/assets/` 下。连接器名单是 [`dsh-official-bundles`](../../util/official-bundles/README.zh.md) 的 `CONNECTOR_BUNDLES`,插件页也据此把它们排除在卡片列表之外;每个连接器的名称、简介和图标放在本包中,所以标签能显示 profile 尚未持有的连接器。
Host 入口是一个空插件,浏览器入口把标签注册到 `plugins.tab`。`ConnectorsController` 在标签首次渲染时读取 `pluginManager.listBundles`,收到 `plugin-manager/changed` 和 `connection/reset` 时再次读取,只采用最新一次读取的结果。**安装**以 `<包名>@<DSH_CLIENT_VERSION>` 调用插件页提供的 `install`;已安装连接器的名称按钮覆盖整行,点击会调用 `openPackage`。每个连接器的品牌图标是其 bundle 所声明 `icon.svg` 的副本,放在 `src/client/assets/` 下。连接器名单以及每个连接器的名称、简介和图标都放在本包中,所以标签能显示 profile 尚未持有的连接器。
- [Host 源码](src/index.ts)
- [浏览器源码](src/client/index.ts)
@@ -49,7 +49,7 @@ Host 入口在 bundle 开启期间提供 `connectors` 服务。声明了 `inject
## 延伸阅读
- [“连接器”bundle](../connectors-bundle/README.zh.md) — 启用本标签的可选 bundle。
- [插件页](../../client/ui-plugin-manager/README.zh.md) — 页面标签、安装对话框,以及把连接器留给本标签的卡片列表。
- [插件页](../../client/ui-plugin-manager/README.zh.md) — 页面标签和安装对话框。
-----
@@ -60,14 +60,14 @@ Host 入口在 bundle 开启期间提供 `connectors` 服务。声明了 `inject
#### KV Cache 效果
标签不增加模型上下文。已安装或已开启的连接器按其说明改变后续请求;关闭 bundle 后,所有连接器的内容都从后续请求中移除,直到重新开启。
标签不增加模型上下文。已安装或已开启的连接器按其说明改变后续请求。
## 已知限制与后续工作
<a id="known-limitations-and-deferred-work"></a>
- 名单只包含 DSH 发布的连接器;新增连接器时,要把包名加入 `CONNECTOR_BUNDLES`,在这里加上它的文案和图标,并在它的条目上声明 `inject: [connectors]`。每一行的名称和简介是本包的文案,须跟随连接器自身的显示名称(开关以后者命名),没有检查比对两者。
- 每一行不显示账号连接状态,连接状态在连接器的详情页查看。
- 名单只包含 DSH 发布的连接器;新增连接器时,要在这里加上它的包名、文案和图标。每一行的名称和简介是本包的文案,须跟随连接器自身的显示名称,没有检查比对两者。
- 每一行不显示账号连接状态,连接状态在连接器的详情页查看。选择**立即启用**后,连接器提供的账号引导显示在“已安装”标签中。
- 安装要求连接器包已按当前 DSH 版本发布。
-----
@@ -54,9 +54,7 @@
},
"devDependencies": {
"@deepseek-ai/cordis": "workspace:~",
"@deepseek-ai/cordis-plugin-timer": "workspace:~",
"@deepseek-ai/dsh-api-remotes": "workspace:*",
"@deepseek-ai/dsh-app-boot": "workspace:*",
"@deepseek-ai/dsh-client-locale": "workspace:*",
"@deepseek-ai/dsh-client-store": "workspace:*",
"@deepseek-ai/dsh-client-test-runtime": "workspace:*",
@@ -64,8 +62,6 @@
"@deepseek-ai/dsh-client-ui-primitives": "workspace:*",
"@deepseek-ai/dsh-client-ui-renderer": "workspace:*",
"@deepseek-ai/dsh-client-ui-slots": "workspace:*",
"@deepseek-ai/dsh-hmr": "workspace:*",
"@deepseek-ai/dsh-official-bundles": "workspace:*",
"@deepseek-ai/dsh-plugin-manager": "workspace:*",
"@testing-library/react": "^16.1.0",
"react": "^18.2.0",
@@ -41,7 +41,7 @@
}
/* An installed connector's row opens its page as an Installed card does: the name button stretches over the row,
and the switch sits above that stretch, so it keeps its own clicks. */
its state text included. */
.link {
position: relative;
}
@@ -121,10 +121,8 @@
}
.end {
position: relative;
z-index: 1;
display: inline-flex;
flex: none;
align-items: center;
gap: 8px;
font-size: 13px;
line-height: 18px;
color: var(--dsw-alias-label-secondary);
}
@@ -1,14 +1,12 @@
/** The Connectors tab: the official connectors with their brand icons and the Installed list's switch each. */
/** The Connectors tab: the official connectors with their brand icons, each with an Install action or its state. */
import { useEffect, type ReactNode } from 'react'
import { Button } from '@deepseek-ai/dsh-client-ui-primitives'
import type { InjectFace, PropsLocale, PropsRenderFactories, PropsRuntime, Translate } from '@deepseek-ai/dsh-client-ui-slots'
import type { InjectFace, PropsLocale, PropsRuntime, Translate } from '@deepseek-ai/dsh-client-ui-slots'
import type { PluginTabProps } from '@deepseek-ai/dsh-client-ui-plugin-manager/client'
import dingtalk from './assets/dingtalk.svg'
import feishu from './assets/feishu.svg'
import linear from './assets/linear.svg'
import notion from './assets/notion.svg'
import tencentDocs from './assets/tencent-docs.svg'
import tencentMeeting from './assets/tencent-meeting.svg'
import wecom from './assets/wecom.svg'
import { CONNECTORS, type Connector, type ConnectorId } from './connectors.ts'
import type { ConnectorsFace, ConnectorStatus } from './connectors-store.ts'
@@ -17,21 +15,20 @@ import css from './ConnectorsTab.module.css'
/** Each connector's brand icon, the same file its bundle declares. */
const ICONS: Readonly<Record<ConnectorId, string>> = {
'feishu': feishu, 'wecom': wecom, 'dingtalk': dingtalk, 'tencent-meeting': tencentMeeting,
'notion': notion, 'tencent-docs': tencentDocs, 'linear': linear,
'feishu': feishu, 'wecom': wecom, 'notion': notion, 'tencent-docs': tencentDocs, 'linear': linear,
}
/** Tab props: the Plugins page's callbacks and switch Factory, the dictionary, and the injected face. */
export type ConnectorsTabProps = PropsRuntime<'plugins.tab'> & PropsRenderFactories & PropsLocale<'connectors'> & InjectFace<ConnectorsFace>
/** Tab props: the Plugins page's install and open callbacks, the dictionary, and the injected face. */
export type ConnectorsTabProps = PropsRuntime<'plugins.tab'> & PropsLocale<'connectors'> & InjectFace<ConnectorsFace>
/**
* List every official connector with the Installed list's switch; a missing one's switch installs it at the running
* release and switches it on, and an installed one's name opens its page.
* @param props - the owner's callbacks and switch Factory, the dictionary, and the connectors' states.
* List every official connector; a missing one installs at the running release through the page's install dialog, and
* an installed one shows its state and opens its page from anywhere on its row.
* @param props - the owner's callbacks, the dictionary, and the connectors' states.
* @returns the tab's content.
*/
export function ConnectorsTab(props: ConnectorsTabProps): ReactNode {
const { t, openPackage, renderFactorySlot, ensure, retry, version } = props
const { t, install, openPackage, ensure, retry, version } = props
const state = props.useConnectors(snapshot => snapshot)
useEffect(() => { ensure() }, [ensure])
return (
@@ -48,25 +45,24 @@ export function ConnectorsTab(props: ConnectorsTabProps): ReactNode {
<ul className={css.list} aria-busy={state.status === 'loading'}>
{CONNECTORS.map(connector => (
<ConnectorRow key={connector.id} connector={connector} status={state.connectors[connector.packageName]}
version={version} t={t} openPackage={openPackage} renderFactorySlot={renderFactorySlot} />
version={version} t={t} install={install} openPackage={openPackage} />
))}
</ul>
</section>
)
}
function ConnectorRow({ connector, status, version, t, openPackage, renderFactorySlot }: {
function ConnectorRow({ connector, status, version, t, install, openPackage }: {
readonly connector: Connector
readonly status: ConnectorStatus | undefined
readonly version: string | undefined
readonly t: Translate<ConnectorsLocaleKey>
readonly install: PluginTabProps['install']
readonly openPackage: PluginTabProps['openPackage']
readonly renderFactorySlot: PropsRenderFactories['renderFactorySlot']
}): ReactNode {
const { id, packageName } = connector
const title = t(`${id}.title`)
const installed = status === 'installed' || status === 'enabled'
const install = status === 'missing' && version !== undefined ? { spec: `${packageName}@${version}`, title, version } : undefined
return (
<li className={installed ? `${css.row} ${css.link}` : css.row} data-connector={id}>
<span className={css.icon} aria-hidden="true"><img src={ICONS[id]} width={36} height={36} alt="" /></span>
@@ -80,7 +76,15 @@ function ConnectorRow({ connector, status, version, t, openPackage, renderFactor
<span className={css.description}>{t(`${id}.description`)}</span>
</div>
<div className={css.end}>
{status === undefined ? null : renderFactorySlot('plugins.bundle.switch', { packageName, ...install === undefined ? {} : { install } })}
{installed ? t(status) : null}
{status === 'missing' && version !== undefined
? (
<Button variant="outline" size="sm" aria-label={t('installTitle', { name: title })}
onClick={() => { install({ spec: `${packageName}@${version}`, title, version }) }}>
{t('install')}
</Button>
)
: null}
</div>
</li>
)
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none"><g transform="translate(9.602419355 5) scale(0.838709677)" fill-rule="evenodd"><mask id="dingtalk-mark-mask" fill="#fff"><path d="M0 0h20.025v31H0z" /></mask><path d="M18.975 14.517C13.963 10.704 8.313 5.654 2.118.24 1.63-.187 1.197-.02.98.548-.416 4.18.936 7.405 3.123 9.265c2.195 1.867 5.459 3.586 7.458 4.498.078.035.01.148-.069.114C6.84 12.283 4.285 11.132.82 8.5c-.373-.284-.75-.174-.796.38-.283 3.472 1.972 6.198 4.489 7.12 1.557.571 3.261.887 4.842 1.075.082.01.064.13-.02.13-2.036.007-4.497-.474-6.626-1.28-.45-.17-.605.183-.535.463.363 1.467 2.205 3.71 5.136 4.18.548.089 1.133.1 1.653.085.124-.003.154.064.114.158 0 0-1.992 3.362-2.079 3.505-.068.112-.026.202.115.202h2.628c.121 0 .196.077.134.179-.062.101-3.509 5.733-3.672 6.002-.142.234.026.413.292.22l11.597-8.365c.144-.104.11-.245-.093-.245h-2.357c-.153 0-.188-.101-.083-.205.105-.103 2.675-2.627 3.587-3.57.952-.986 1.438-2.792-.171-4.016" fill="#007FFF" mask="url(#dingtalk-mark-mask)" /></g></svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

@@ -1,18 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none"><g transform="translate(5.1 10.558) scale(0.652)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.752 14.99L19.7675 22.1112L26.754 15.0198L33.7258 22.0957L38.2962 17.4567C39.6464 16.0859 39.6464 13.864 38.2962 12.4932L33.7699 7.8986L26.754 0.777832L12.752 14.99Z" fill="url(#paint0_linear_31125_2697)" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.73663 7.8986L1.21038 12.4932C-0.139789 13.864 -0.139789 16.0859 1.21038 17.4567L5.76634 22.081L12.7525 14.99V0.777832L5.73663 7.8986Z" fill="url(#paint1_linear_31125_2697)" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.752 14.99L19.753 7.88392L12.752 0.777832V14.99Z" fill="url(#paint2_linear_31125_2697)" />
<defs>
<linearGradient id="paint0_linear_31125_2697" x1="39.3088" y1="4.01437" x2="12.752" y2="4.01437" gradientUnits="userSpaceOnUse">
<stop stop-color="#0499FD" />
<stop offset="1" stop-color="#004DFF" />
</linearGradient>
<linearGradient id="paint1_linear_31125_2697" x1="4.1916" y1="37.3444" x2="19.0058" y2="27.3074" gradientUnits="userSpaceOnUse">
<stop stop-color="#0038FF" />
<stop offset="1" stop-color="#045EFD" />
</linearGradient>
<linearGradient id="paint2_linear_31125_2697" x1="18.1394" y1="14.9897" x2="18.5383" y2="6.83442" gradientUnits="userSpaceOnUse">
<stop stop-color="#0000B8" />
<stop offset="1" stop-color="#043BFD" />
</linearGradient>
</defs>
</g></svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

@@ -1,12 +1,7 @@
/** The official connectors the Connectors tab offers, in the official list's order. */
import { CONNECTOR_BUNDLES } from '@deepseek-ai/dsh-official-bundles'
const SCOPE = '@deepseek-ai/dsh-'
type IdOf<Name> = Name extends `${typeof SCOPE}${infer Id}` ? Id : never
/** The official connectors the Connectors tab offers, in display order. */
/** Dictionary prefix of one connector's title and description: its package name without the scope prefix. */
export type ConnectorId = IdOf<(typeof CONNECTOR_BUNDLES)[number]>
export type ConnectorId = 'feishu' | 'wecom' | 'notion' | 'tencent-docs' | 'linear'
/** One official connector bundle. */
export interface Connector {
@@ -17,8 +12,10 @@ export interface Connector {
}
/** Every official connector, in display order. */
export const CONNECTORS: readonly Connector[] = CONNECTOR_BUNDLES.map(packageName => ({
// Every name in the list starts with the scope prefix, as `ConnectorId` requires.
id: packageName.slice(SCOPE.length) as ConnectorId,
packageName,
}))
export const CONNECTORS: readonly Connector[] = [
{ id: 'feishu', packageName: '@deepseek-ai/dsh-feishu' },
{ id: 'wecom', packageName: '@deepseek-ai/dsh-wecom' },
{ id: 'notion', packageName: '@deepseek-ai/dsh-notion' },
{ id: 'tencent-docs', packageName: '@deepseek-ai/dsh-tencent-docs' },
{ id: 'linear', packageName: '@deepseek-ai/dsh-linear' },
]
@@ -6,15 +6,15 @@ export const zh = {
official: '官方连接器',
loadFailed: '无法读取连接器状态',
retry: '重试',
install: '安装',
installTitle: '安装 {name}',
installed: '已安装',
enabled: '已开启',
openTitle: '打开 {name}',
'feishu.title': '飞书插件',
'feishu.description': '在对话中使用飞书文档、消息及其他已授权的功能。',
'wecom.title': '企业微信插件',
'wecom.description': '在对话中使用企业微信的文档、日程、会议、待办和消息。',
'dingtalk.title': '钉钉插件',
'dingtalk.description': '在对话中使用钉钉的日程、待办、文档、AI 表格、群聊和通讯录。',
'tencent-meeting.title': '腾讯会议插件',
'tencent-meeting.description': '在对话中使用腾讯会议的会议、录制、纪要和会议报告。',
'notion.title': 'Notion 插件',
'notion.description': '在对话中使用 Notion 页面、数据库及其他已授权的内容。',
'tencent-docs.title': '腾讯文档插件',
@@ -32,15 +32,15 @@ export const en: Record<ConnectorsLocaleKey, string> = {
official: 'Official connectors',
loadFailed: 'Couldn’t read connector status.',
retry: 'Retry',
install: 'Install',
installTitle: 'Install {name}',
installed: 'Installed',
enabled: 'On',
openTitle: 'Open {name}',
'feishu.title': 'Feishu plugin',
'feishu.description': 'Use Feishu documents, messages, and other authorized features in conversations.',
'wecom.title': 'WeCom plugin',
'wecom.description': 'Use WeCom docs, calendar, meetings, to-dos, and messages in conversations.',
'dingtalk.title': 'DingTalk plugin',
'dingtalk.description': 'Use DingTalk calendar, to-dos, docs, AI tables, group chats, and contacts in conversations.',
'tencent-meeting.title': 'Tencent Meeting plugin',
'tencent-meeting.description': 'Use Tencent Meeting meetings, recordings, minutes, and meeting reports in conversations.',
'notion.title': 'Notion plugin',
'notion.description': 'Use Notion pages, databases, and other authorized content in conversations.',
'tencent-docs.title': 'Tencent Docs plugin',
@@ -55,15 +55,15 @@ export const ja: Record<ConnectorsLocaleKey, string> = {
official: '公式コネクタ',
loadFailed: 'コネクタの状態を読み込めませんでした。',
retry: '再試行',
install: 'インストール',
installTitle: '{name} をインストール',
installed: 'インストール済み',
enabled: 'オン',
openTitle: '{name} を開く',
'feishu.title': 'Feishu プラグイン',
'feishu.description': '会話の中で Feishu のドキュメント、メッセージ、その他の承認済み機能を使用します。',
'wecom.title': 'WeCom プラグイン',
'wecom.description': '会話の中で WeCom のドキュメント、カレンダー、会議、ToDo、メッセージを使用します。',
'dingtalk.title': 'DingTalk プラグイン',
'dingtalk.description': '会話の中で DingTalk のカレンダー、ToDo、ドキュメント、AI テーブル、グループチャット、連絡先を使用します。',
'tencent-meeting.title': 'Tencent Meeting プラグイン',
'tencent-meeting.description': '会話の中で Tencent Meeting の会議、録画、議事録、会議レポートを使用します。',
'notion.title': 'Notion プラグイン',
'notion.description': '会話の中で Notion のページ、データベース、その他の承認済みコンテンツを使用します。',
'tencent-docs.title': 'Tencent Docs プラグイン',
@@ -78,15 +78,15 @@ export const es: Record<ConnectorsLocaleKey, string> = {
official: 'Conectores oficiales',
loadFailed: 'No se pudo leer el estado de los conectores.',
retry: 'Reintentar',
install: 'Instalar',
installTitle: 'Instalar {name}',
installed: 'Instalado',
enabled: 'Encendido',
openTitle: 'Abrir {name}',
'feishu.title': 'Complemento de Feishu',
'feishu.description': 'Use documentos, mensajes y otras funciones autorizadas de Feishu en las conversaciones.',
'wecom.title': 'Complemento de WeCom',
'wecom.description': 'Use documentos, calendario, reuniones, tareas pendientes y mensajes de WeCom en las conversaciones.',
'dingtalk.title': 'Complemento de DingTalk',
'dingtalk.description': 'Use el calendario, las tareas pendientes, los documentos, las tablas de IA, los chats de grupo y los contactos de DingTalk en las conversaciones.',
'tencent-meeting.title': 'Complemento de Tencent Meeting',
'tencent-meeting.description': 'Use las reuniones, grabaciones, actas e informes de reuniones de Tencent Meeting en las conversaciones.',
'notion.title': 'Complemento de Notion',
'notion.description': 'Use páginas, bases de datos y otro contenido autorizado de Notion en las conversaciones.',
'tencent-docs.title': 'Complemento de Tencent Docs',
@@ -101,15 +101,15 @@ export const fr: Record<ConnectorsLocaleKey, string> = {
official: 'Connecteurs officiels',
loadFailed: 'Impossible de lire l’état des connecteurs.',
retry: 'Réessayer',
install: 'Installer',
installTitle: 'Installer {name}',
installed: 'Installé',
enabled: 'Activé',
openTitle: 'Ouvrir {name}',
'feishu.title': 'Plugin Feishu',
'feishu.description': 'Utilisez les documents, les messages et les autres fonctionnalités autorisées de Feishu dans les conversations.',
'wecom.title': 'Plugin WeCom',
'wecom.description': 'Utilisez les documents, le calendrier, les réunions, les tâches et les messages de WeCom dans les conversations.',
'dingtalk.title': 'Plugin DingTalk',
'dingtalk.description': 'Utilisez le calendrier, les tâches, les documents, les tableaux IA, les discussions de groupe et les contacts de DingTalk dans les conversations.',
'tencent-meeting.title': 'Plugin Tencent Meeting',
'tencent-meeting.description': 'Utilisez les réunions, les enregistrements, les comptes rendus et les rapports de réunion de Tencent Meeting dans les conversations.',
'notion.title': 'Plugin Notion',
'notion.description': 'Utilisez les pages, les bases de données et les autres contenus autorisés de Notion dans les conversations.',
'tencent-docs.title': 'Plugin Tencent Docs',
@@ -124,15 +124,15 @@ export const de: Record<ConnectorsLocaleKey, string> = {
official: 'Offizielle Konnektoren',
loadFailed: 'Der Status der Konnektoren konnte nicht gelesen werden.',
retry: 'Erneut versuchen',
install: 'Installieren',
installTitle: '{name} installieren',
installed: 'Installiert',
enabled: 'An',
openTitle: '{name} öffnen',
'feishu.title': 'Feishu-Plugin',
'feishu.description': 'Verwenden Sie Dokumente, Nachrichten und weitere autorisierte Funktionen von Feishu in Unterhaltungen.',
'wecom.title': 'WeCom-Plugin',
'wecom.description': 'Verwenden Sie Dokumente, Kalender, Besprechungen, Aufgaben und Nachrichten von WeCom in Unterhaltungen.',
'dingtalk.title': 'DingTalk-Plugin',
'dingtalk.description': 'Verwenden Sie Kalender, Aufgaben, Dokumente, KI-Tabellen, Gruppenchats und Kontakte von DingTalk in Unterhaltungen.',
'tencent-meeting.title': 'Tencent Meeting-Plugin',
'tencent-meeting.description': 'Verwenden Sie Besprechungen, Aufzeichnungen, Protokolle und Besprechungsberichte von Tencent Meeting in Unterhaltungen.',
'notion.title': 'Notion-Plugin',
'notion.description': 'Verwenden Sie Seiten, Datenbanken und weitere autorisierte Inhalte von Notion in Unterhaltungen.',
'tencent-docs.title': 'Tencent Docs-Plugin',
@@ -147,15 +147,15 @@ export const ru: Record<ConnectorsLocaleKey, string> = {
official: 'Официальные коннекторы',
loadFailed: 'Не удалось прочитать состояние коннекторов.',
retry: 'Повторить',
install: 'Установить',
installTitle: 'Установить {name}',
installed: 'Установлено',
enabled: 'Вкл.',
openTitle: 'Открыть {name}',
'feishu.title': 'Плагин Feishu',
'feishu.description': 'Используйте документы, сообщения и другие разрешённые функции Feishu в беседах.',
'wecom.title': 'Плагин WeCom',
'wecom.description': 'Используйте документы, календарь, встречи, задачи и сообщения WeCom в беседах.',
'dingtalk.title': 'Плагин DingTalk',
'dingtalk.description': 'Используйте календарь, задачи, документы, ИИ-таблицы, групповые чаты и контакты DingTalk в беседах.',
'tencent-meeting.title': 'Плагин Tencent Meeting',
'tencent-meeting.description': 'Используйте встречи, записи, протоколы и отчёты о встречах Tencent Meeting в беседах.',
'notion.title': 'Плагин Notion',
'notion.description': 'Используйте страницы, базы данных и другой разрешённый контент Notion в беседах.',
'tencent-docs.title': 'Плагин Tencent Docs',
@@ -170,15 +170,15 @@ export const pt: Record<ConnectorsLocaleKey, string> = {
official: 'Conectores oficiais',
loadFailed: 'Não foi possível ler o status dos conectores.',
retry: 'Tentar novamente',
install: 'Instalar',
installTitle: 'Instalar {name}',
installed: 'Instalado',
enabled: 'Ligado',
openTitle: 'Abrir {name}',
'feishu.title': 'Plugin do Feishu',
'feishu.description': 'Use documentos, mensagens e outros recursos autorizados do Feishu nas conversas.',
'wecom.title': 'Plugin do WeCom',
'wecom.description': 'Use documentos, agenda, reuniões, tarefas e mensagens do WeCom nas conversas.',
'dingtalk.title': 'Plugin do DingTalk',
'dingtalk.description': 'Use agenda, tarefas, documentos, tabelas de IA, chats em grupo e contatos do DingTalk nas conversas.',
'tencent-meeting.title': 'Plugin do Tencent Meeting',
'tencent-meeting.description': 'Use reuniões, gravações, atas e relatórios de reunião do Tencent Meeting nas conversas.',
'notion.title': 'Plugin do Notion',
'notion.description': 'Use páginas, bancos de dados e outros conteúdos autorizados do Notion nas conversas.',
'tencent-docs.title': 'Plugin do Tencent Docs',
@@ -1,19 +1,4 @@
/** Host half of Connectors: the `connectors` service, present while the Connectors bundle is enabled. */
import { Service, type Context } from '@deepseek-ai/cordis'
/** Browser registration is discovered through the package client declaration. */
declare module '@deepseek-ai/cordis' {
interface Context {
/** Present while the Connectors bundle is enabled; each official connector bundle's row injects it. */
connectors: Connectors
}
}
/** Present while the Connectors bundle is enabled; a connector row that injects it runs only then. */
export class Connectors extends Service {
/** @param ctx - the Host plugin context. */
constructor(ctx: Context) {
super(ctx, 'connectors')
}
}
export default Connectors
/** Register the browser-only contribution without Host state. */
export function apply(): void {}
@@ -27,8 +27,8 @@ const FAILED: ListAnswer = { ok: false, error: { code: 'plugin-manager/failed',
it('reads each connector as missing, installed, or on, once, and only after the tab first asks', async () => {
const { controller, face, listBundles } = bench(Promise.resolve({ ok: true, value: [
bundle('@deepseek-ai/dsh-feishu', true, true), bundle('@deepseek-ai/dsh-wecom', true, false),
bundle('@deepseek-ai/dsh-dingtalk', false, false), bundle('dsh-unrelated', true, true),
bundle('@deepseek-ai/dsh-notion', true, true), bundle('@deepseek-ai/dsh-tencent-docs', true, false),
bundle('dsh-unrelated', true, true),
] }))
expect(face.version).toBe('1.2.3')
controller.changed()
@@ -39,9 +39,8 @@ it('reads each connector as missing, installed, or on, once, and only after the
await vi.waitFor(() => { expect(face.hooks.connectors.getSnapshot().status).toBe('ready') })
expect(listBundles).toHaveBeenCalledOnce()
expect(face.hooks.connectors.getSnapshot().connectors).toEqual({
'@deepseek-ai/dsh-feishu': 'enabled', '@deepseek-ai/dsh-wecom': 'installed', '@deepseek-ai/dsh-dingtalk': 'missing',
'@deepseek-ai/dsh-tencent-meeting': 'missing', '@deepseek-ai/dsh-notion': 'missing', '@deepseek-ai/dsh-tencent-docs': 'missing',
'@deepseek-ai/dsh-linear': 'missing',
'@deepseek-ai/dsh-feishu': 'missing', '@deepseek-ai/dsh-wecom': 'missing', '@deepseek-ai/dsh-notion': 'enabled',
'@deepseek-ai/dsh-tencent-docs': 'installed', '@deepseek-ai/dsh-linear': 'missing',
})
face.ensure()
expect(listBundles).toHaveBeenCalledOnce()
@@ -3,7 +3,6 @@ import { act, cleanup, fireEvent, render, screen, within } from '@testing-librar
import { afterEach, expect, it, vi } from 'vitest'
import { bindSnapshotSelector } from '@deepseek-ai/dsh-client-test-runtime'
import { createSnapshotStore } from '@deepseek-ai/dsh-client-store'
import type { PluginBundleSwitchProps } from '@deepseek-ai/dsh-client-ui-plugin-manager/client'
import { ConnectorsTab, type ConnectorsTabProps } from '../src/client/ConnectorsTab.tsx'
import type { ConnectorsState } from '../src/client/connectors-store.ts'
import { en, type ConnectorsLocaleKey } from '../src/client/locales.ts'
@@ -17,12 +16,7 @@ function translator(dictionary: Record<ConnectorsLocaleKey, string>): Connectors
function renderTab(state: ConnectorsState, version: string | undefined) {
const store = createSnapshotStore<ConnectorsState>(state)
// The page's switch Factory, reduced to a marker that records what the tab asked it for.
const renderFactorySlot = vi.fn((name: string, factoryProps: object) => {
const { packageName, install } = factoryProps as PluginBundleSwitchProps
return <span data-factory={name} data-switch={packageName} data-install={install === undefined ? '' : JSON.stringify(install)} />
})
const actions = { ensure: vi.fn(), retry: vi.fn(), install: vi.fn(), openPackage: vi.fn(), renderFactorySlot }
const actions = { ensure: vi.fn(), retry: vi.fn(), install: vi.fn(), openPackage: vi.fn() }
const props = {
t: translator(en), version, ...actions, useConnectors: bindSnapshotSelector(store),
} as ConnectorsTabProps
@@ -32,43 +26,39 @@ function renderTab(state: ConnectorsState, version: string | undefined) {
}
const row = (id: string): HTMLElement => document.querySelector(`[data-connector="${id}"]`) as HTMLElement
const switchOf = (id: string): Element | null => row(id).querySelector('[data-switch]')
it('lists every official connector with its brand icon before its state is known, and asks for the state once mounted', () => {
const { actions } = renderTab({ status: 'loading', connectors: {} }, '1.2.3')
expect(actions.ensure).toHaveBeenCalledOnce()
expect(screen.getByRole('heading', { name: en.official })).toBeTruthy()
expect(document.querySelectorAll('[data-connector]')).toHaveLength(7)
expect([...document.querySelectorAll('[data-connector]')].map(item => item.getAttribute('data-connector')))
.toEqual(['feishu', 'wecom', 'notion', 'tencent-docs', 'linear'])
expect(within(row('feishu')).getByText(en['feishu.title'])).toBeTruthy()
expect(within(row('tencent-docs')).getByText(en['tencent-docs.description'])).toBeTruthy()
const icons = [...document.querySelectorAll('[data-connector] img')].map(icon => icon.getAttribute('src'))
expect(icons).toHaveLength(7)
expect(new Set(icons).size).toBe(7)
expect(within(row('feishu')).queryByRole('button')).toBeNull()
expect(actions.renderFactorySlot).not.toHaveBeenCalled()
expect(icons).toHaveLength(5)
expect(new Set(icons).size).toBe(5)
expect(screen.queryByRole('button')).toBeNull()
})
it('renders the page switch Factory for each connector, with the install target only for a missing one, and opens an installed one by its name', () => {
it('installs a missing connector at the running release, and shows an installed one\'s state and opens its page', () => {
const { actions } = renderTab({ status: 'ready', connectors: {
'@deepseek-ai/dsh-feishu': 'missing', '@deepseek-ai/dsh-wecom': 'installed', '@deepseek-ai/dsh-notion': 'enabled',
'@deepseek-ai/dsh-notion': 'enabled', '@deepseek-ai/dsh-tencent-docs': 'installed', '@deepseek-ai/dsh-linear': 'missing',
} }, '1.2.3')
expect(actions.renderFactorySlot).toHaveBeenCalledWith('plugins.bundle.switch', {
packageName: '@deepseek-ai/dsh-feishu', install: { spec: '@deepseek-ai/dsh-feishu@1.2.3', title: 'Feishu plugin', version: '1.2.3' },
})
expect(actions.renderFactorySlot).toHaveBeenCalledWith('plugins.bundle.switch', { packageName: '@deepseek-ai/dsh-wecom' })
expect(switchOf('notion')?.getAttribute('data-install')).toBe('')
expect(switchOf('notion')?.getAttribute('data-factory')).toBe('plugins.bundle.switch')
expect(switchOf('dingtalk')).toBeNull()
expect(within(row('feishu')).queryByRole('button')).toBeNull()
fireEvent.click(within(row('wecom')).getByRole('button', { name: 'Open WeCom plugin' }))
fireEvent.click(within(row('linear')).getByRole('button', { name: 'Install Linear plugin' }))
expect(actions.install).toHaveBeenCalledExactlyOnceWith({ spec: '@deepseek-ai/dsh-linear@1.2.3', title: 'Linear plugin', version: '1.2.3' })
expect(within(row('linear')).getAllByRole('button')).toHaveLength(1)
expect(within(row('notion')).getByText(en.enabled)).toBeTruthy()
expect(within(row('tencent-docs')).getByText(en.installed)).toBeTruthy()
expect(within(row('notion')).getByRole('button', { name: 'Open Notion plugin' }).textContent).toBe(en['notion.title'])
expect(actions.openPackage).toHaveBeenCalledExactlyOnceWith('@deepseek-ai/dsh-wecom')
expect(actions.install).not.toHaveBeenCalled()
fireEvent.click(within(row('tencent-docs')).getByRole('button', { name: 'Open Tencent Docs plugin' }))
expect(actions.openPackage).toHaveBeenCalledExactlyOnceWith('@deepseek-ai/dsh-tencent-docs')
expect(within(row('tencent-docs')).getAllByRole('button')).toHaveLength(1)
})
it('offers no install target when the build carries no version', () => {
const { actions } = renderTab({ status: 'ready', connectors: { '@deepseek-ai/dsh-feishu': 'missing' } }, undefined)
expect(actions.renderFactorySlot).toHaveBeenCalledWith('plugins.bundle.switch', { packageName: '@deepseek-ai/dsh-feishu' })
it('offers no Install when the build carries no version', () => {
renderTab({ status: 'ready', connectors: { '@deepseek-ai/dsh-linear': 'missing' } }, undefined)
expect(within(row('linear')).queryByRole('button')).toBeNull()
})
it('reports a failed read with a retry and clears it once the state arrives', () => {
@@ -1,64 +0,0 @@
/** Profile files, Loader, HMR, and the plugin manager are real; the connector is a fixture bundle with one injecting row. */
import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { expect, it, onTestFinished } from 'vitest'
import type { Context } from '@deepseek-ai/cordis'
import Timer from '@deepseek-ai/cordis-plugin-timer'
import { boot, initProfile, loadProfileDirectory, readProfileManifest, readProfilePatches, type ProfileContext } from '@deepseek-ai/dsh-app-boot'
import Hmr from '@deepseek-ai/dsh-hmr'
import PluginManager from '@deepseek-ai/dsh-plugin-manager'
import Connectors from '../src/index.ts'
// Fixture names, so neither resolves to a workspace package.
const HUB = 'fixture-connectors-bundle'
const CONNECTOR = 'fixture-connector'
async function bundle(dir: string, name: string, rows: readonly object[], files: Readonly<Record<string, string>> = {}): Promise<void> {
const path = join(dir, 'node_modules', name)
await mkdir(path, { recursive: true })
await writeFile(join(path, 'package.json'), JSON.stringify({ name, version: '1.0.0', dsh: { bundle: { patch: './cordis.patch.yml' } } }))
await writeFile(join(path, 'cordis.patch.yml'), JSON.stringify([{ insert: rows }]))
for (const [file, text] of Object.entries(files)) await writeFile(join(path, file), text)
}
it('stops a connector row while the Connectors bundle is off and resumes it when switched back on', async () => {
const home = await mkdtemp(join(tmpdir(), 'dsh-connectors-loader-'))
let owner: Context | undefined
onTestFinished(async () => { await owner?.fiber.dispose(); await rm(home, { recursive: true, force: true }) })
const dir = join(home, 'profiles', 'test')
const anchor = join(home, 'package.json')
await writeFile(anchor, JSON.stringify({ name: 'installation', dependencies: {} }))
initProfile(dir, ['fixture-base', HUB, CONNECTOR])
await bundle(dir, 'fixture-base', [{ id: 'manager', name: 'cordis:manager' }])
await bundle(dir, HUB, [{ id: 'ui-connectors', name: 'cordis:connectors' }])
await bundle(dir, CONNECTOR, [{ id: 'connector', name: './plugin.mjs', inject: ['connectors'] }], {
'plugin.mjs': 'export function apply(ctx) { ctx.provide("connectorProbe", true) }\n',
})
await writeFile(join(dir, 'cordis.yml'), '[]\n')
const profile: ProfileContext = {
name: 'test', dir, home, cwd: home, patchPath: join(dir, 'cordis.patch.yml'), installAnchor: anchor,
startedBundles: loadProfileDirectory('test', dir, anchor).layers.map(layer => layer.packageName),
overlays: [], telemetryDisabledEnv: undefined,
}
const ctx = await boot('test', join(dir, 'cordis.yml'), readProfilePatches('test', profile), (ctx) => {
owner = ctx
ctx.provide('profileContext', profile)
ctx.provide('appReady', { onReady: (listener) => { listener(); return () => {} } })
Object.assign(ctx.loader.builtins, { manager: PluginManager, connectors: Connectors })
})
await ctx.plugin(Timer)
await ctx.plugin(Hmr, { root: [], ignored: [], debounce: 0 })
await ctx.hmr.runExclusive(async () => {})
expect(ctx.get('connectors')).toBeInstanceOf(Connectors)
expect(ctx.get('connectorProbe')).toBe(true)
expect((await ctx.pluginManager.setBundleEnabled(HUB, false)).application).toBe('applied')
expect(ctx.get('connectors')).toBeUndefined()
expect(ctx.get('connectorProbe')).toBeUndefined()
expect(readProfileManifest('test', dir).dsh?.profile?.bundles).toEqual(['fixture-base', CONNECTOR])
expect((await ctx.pluginManager.setBundleEnabled(HUB, true)).application).toBe('applied')
expect(ctx.get('connectors')).toBeInstanceOf(Connectors)
expect(ctx.get('connectorProbe')).toBe(true)
})
@@ -36,9 +36,6 @@
},
{
"path": "../../client/ui-slots"
},
{
"path": "../../util/official-bundles"
}
]
}
@@ -9,14 +9,14 @@
en: f310e0770fe1a799
zh: ff0d24a9fbed7e42
/deepseek-ai-dsh-experimental-connectors-bundle/summary:
en: 509deedb571b6887
zh: 071bcaa2411037b0
en: dd366fe2f343fd79
zh: 0129971734d8538b
/deepseek-ai-dsh-experimental-connectors-bundle/table-of-contents:
en: d152484eb41ac6b4
zh: ce40cab8e7534137
/deepseek-ai-dsh-experimental-connectors-bundle/use-this-package:
en: de926798d39d0f0b
zh: b4f09457c9b72baf
en: e16835c4a4bfade2
zh: 36cc629a34f8ab0b
/deepseek-ai-dsh-experimental-connectors-bundle/understand-the-implementation:
en: 341525733a0dea60
zh: 0c4ab5a584a994a5
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
## Summary
Enable Connectors to add a Connectors tab beside Installed on the Web or Desktop Plugins page. The tab lists the official connectors with their switches, installs a missing one when it is switched on, and opens an installed one's page, where its account is connected. The connectors run only while the bundle is enabled; switching it off stops every connector. Shipped profiles leave the bundle disabled, and the Plugins page does not list it until it is enabled.
Enable Connectors to add a Connectors tab beside Installed on the Web or Desktop Plugins page. The tab lists the official connectors with their brand icons, installs a missing one at the running DSH version, and opens an installed one's page, where its account is connected. Shipped profiles leave the bundle disabled, and the Plugins page does not list it until it is enabled.
## Table of Contents
@@ -25,7 +25,7 @@ Enable Connectors to add a Connectors tab beside Installed on the Web or Desktop
<a id="use-this-package"></a>
## Use this package
In **Plugins → Add plugin**, enter `@deepseek-ai/dsh-experimental-connectors-bundle`, choose **Install**, then **Enable now**. DSH uses the shipped copy without downloading another one. Alternatively, add the name to `dsh.profile.bundles` in the target [profile](../../boot/app-boot/README.md#profiles)'s `package.json`. The Connectors tab then appears beside Installed, and switching the bundle off hides its card again. Each tab row shows the switch the connector's card would show; switching on a missing connector installs it at the running DSH version. An installed connector's row opens its page, and that page's Back button returns to the tab. The connectors never appear on Installed. Switching the bundle off removes the tab and stops every connector; switching it on again resumes them.
In **Plugins → Add plugin**, enter `@deepseek-ai/dsh-experimental-connectors-bundle`, choose **Install**, then **Enable now**. DSH uses the shipped copy without downloading another one. Alternatively, add the name to `dsh.profile.bundles` in the target [profile](../../boot/app-boot/README.md#profiles)'s `package.json`. The Connectors tab then appears beside Installed; switching the bundle off removes the tab and hides the bundle's card again. A connector the profile does not hold shows **Install**, which opens the install dialog at the running DSH version and offers **Enable now** once the connector is installed. An installed connector shows **Installed** or **On**; its row opens its page, and that page's Back button returns to the tab. Installed connectors keep their cards and switches on Installed and run whether or not this bundle is enabled.
-----
@@ -9,7 +9,7 @@ kind: "package-bundle"
## 概述
开启“连接器”后,Web 或 Desktop 插件页的“已安装”旁会多出“连接器”标签。标签列出官方连接器及其开关:开启未安装的连接器时会先安装它,已安装的可以打开它的详情页,在那里连接账号。连接器只在这个 bundle 开启时运行,关闭它会停止所有连接器。随附的 profile 默认不启用这个 bundle,插件页在它开启前也不列出它。
开启“连接器”后,Web 或 Desktop 插件页的“已安装”旁会多出“连接器”标签。标签列出官方连接器及其品牌图标:未安装的可以按当前 DSH 版本安装,已安装的可以打开它的详情页,在那里连接账号。随附的 profile 默认不启用这个 bundle,插件页在它开启前也不列出它。
## 目录
@@ -25,7 +25,7 @@ kind: "package-bundle"
<a id="use-this-package"></a>
## 使用本包
在**插件 → 添加插件**中输入 `@deepseek-ai/dsh-experimental-connectors-bundle`,选择**安装**,再选择**立即启用**。DSH 使用随包提供的版本,无需再次下载。也可在目标 [profile](../../boot/app-boot/README.zh.md#profiles) 的 `package.json` 中,将包名加入 `dsh.profile.bundles`。之后“已安装”旁会出现“连接器”标签;关闭这个 bundle 后,它的卡片会再次隐藏。标签中的每一行显示该连接器卡片上的开关;开启未安装的连接器时,会按当前 DSH 版本安装它。点已安装连接器的这一行会打开它的详情页,详情页的返回键会回到这个标签。连接器不会出现在“已安装”中。关闭这个 bundle 会移除标签并停止所有连接器;重新开启后,它们恢复运行。
在**插件 → 添加插件**中输入 `@deepseek-ai/dsh-experimental-connectors-bundle`,选择**安装**,再选择**立即启用**。DSH 使用随包提供的版本,无需再次下载。也可在目标 [profile](../../boot/app-boot/README.zh.md#profiles) 的 `package.json` 中,将包名加入 `dsh.profile.bundles`。之后“已安装”旁会出现“连接器”标签;关闭这个 bundle 会移除标签,它的卡片也会再次隐藏。profile 未持有的连接器显示**安装**,点击后按当前 DSH 版本打开安装对话框,装好后可选择**立即启用**。已安装的连接器显示**已安装**或**已开启**;点这一行会打开它的详情页,详情页的返回键会回到这个标签。已安装的连接器在“已安装”中保留自己的卡片和开关,无论这个 bundle 是否开启都会运行。
-----
@@ -1 +1 @@
![The Connectors tab in Plugins: official connectors with their switches, and a custom MCP server](preview.svg)
![The Connectors tab in Plugins: official connectors with an Install button or their state, and a custom MCP server](preview.svg)
@@ -1 +1 @@
![「插件」中的「连接器」标签页:带开关的官方连接器和一个自定义 MCP 服务器](preview.zh.svg)
![「插件」中的「连接器」标签页:带「安装」按钮或当前状态的官方连接器,以及一个自定义 MCP 服务器](preview.zh.svg)
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="300" viewBox="0 0 640 300"><rect x="0" y="0" width="640" height="300" fill="#F5F6FC"/><path d="M41.2 62.4 Q39.6 62.4 38.1 61.8 Q36.6 61.1 35.5 60 Q34.3 58.8 33.7 57 Q33 55.3 33 53.2 Q33 51 33.7 49.2 Q34.3 47.5 35.5 46.2 Q36.6 45 38.2 44.3 Q39.8 43.6 41.6 43.6 Q42.9 43.6 44 43.9 Q45.1 44.3 46 44.8 L46.6 44 H47.6 L47.7 50.4 H46.7 Q46.4 49.5 46 48.4 Q45.6 47.3 45.1 46.5 Q44.5 45.6 43.6 45.2 Q42.8 44.7 41.7 44.7 Q40.5 44.7 39.4 45.2 Q38.4 45.8 37.6 46.8 Q36.9 47.9 36.4 49.4 Q36 51 36 53 Q36 54.7 36.5 56.2 Q36.9 57.6 37.7 58.7 Q38.5 59.8 39.6 60.4 Q40.7 61 42.1 61 Q43.1 61 44 60.7 Q44.9 60.3 45.5 59.8 Q46.1 59.2 46.6 58.5 Q47.1 57.8 47.4 57 L48.4 57.4 Q47.3 60.1 45.5 61.3 Q43.7 62.4 41.2 62.4 ZM61.8 55.6 Q61.8 56.9 61.4 58.2 Q61 59.5 60.2 60.4 Q59.3 61.4 58.2 61.9 Q57 62.4 55.6 62.4 Q54.4 62.4 53.3 61.9 Q52.2 61.5 51.4 60.6 Q50.6 59.8 50.1 58.5 Q49.6 57.3 49.6 55.8 Q49.6 52.9 51.3 51 Q53 49.1 55.8 49.1 Q58.4 49.1 60.1 50.9 Q61.8 52.7 61.8 55.6 ZM59.2 55.6 Q59.2 54.7 59 53.6 Q58.8 52.6 58.4 51.8 Q58 51 57.4 50.6 Q56.7 50.1 55.7 50.1 Q54.8 50.1 54.1 50.6 Q53.4 51.1 52.9 51.9 Q52.5 52.7 52.4 53.7 Q52.2 54.6 52.2 55.6 Q52.2 56.8 52.4 57.8 Q52.6 58.9 53 59.7 Q53.5 60.5 54.1 61 Q54.8 61.4 55.7 61.4 Q57.3 61.4 58.3 59.9 Q59.2 58.3 59.2 55.6 ZM77.4 62 H71.3 V61.2 Q71.6 61.1 72 61.1 Q72.3 61.1 72.5 61 Q72.9 60.9 73.1 60.6 Q73.2 60.3 73.2 59.9 V53.4 Q73.2 52.1 72.6 51.4 Q72 50.7 71.1 50.7 Q70.4 50.7 69.8 50.9 Q69.3 51.1 68.9 51.4 Q68.4 51.7 68.2 52 Q67.9 52.3 67.8 52.5 V59.7 Q67.8 60.2 68 60.5 Q68.2 60.7 68.5 60.9 Q68.8 61 69.1 61.1 Q69.4 61.1 69.8 61.2 V62 H63.6 V61.2 Q63.9 61.1 64.2 61.1 Q64.5 61.1 64.8 61 Q65.1 60.9 65.3 60.6 Q65.5 60.3 65.5 59.9 V52.1 Q65.5 51.7 65.3 51.3 Q65.1 51 64.8 50.8 Q64.5 50.6 64.2 50.5 Q63.9 50.5 63.5 50.4 V49.6 L67.6 49.3 L67.8 49.5 V51.3 H67.9 Q68.2 51 68.7 50.5 Q69.1 50.1 69.5 49.9 Q70 49.5 70.6 49.3 Q71.3 49.1 72.1 49.1 Q73.9 49.1 74.8 50.3 Q75.6 51.4 75.6 53.3 V59.8 Q75.6 60.2 75.8 60.5 Q75.9 60.8 76.3 60.9 Q76.6 61 76.8 61.1 Q77.1 61.1 77.4 61.2 ZM92.8 62 H86.7 V61.2 Q87 61.1 87.3 61.1 Q87.7 61.1 87.9 61 Q88.3 60.9 88.4 60.6 Q88.6 60.3 88.6 59.9 V53.4 Q88.6 52.1 88 51.4 Q87.3 50.7 86.4 50.7 Q85.8 50.7 85.2 50.9 Q84.6 51.1 84.2 51.4 Q83.8 51.7 83.5 52 Q83.3 52.3 83.2 52.5 V59.7 Q83.2 60.2 83.4 60.5 Q83.5 60.7 83.9 60.9 Q84.2 61 84.5 61.1 Q84.8 61.1 85.1 61.2 V62 H79 V61.2 Q79.3 61.1 79.6 61.1 Q79.9 61.1 80.1 61 Q80.5 60.9 80.7 60.6 Q80.8 60.3 80.8 59.9 V52.1 Q80.8 51.7 80.6 51.3 Q80.5 51 80.1 50.8 Q79.9 50.6 79.6 50.5 Q79.2 50.5 78.8 50.4 V49.6 L83 49.3 L83.2 49.5 V51.3 H83.3 Q83.6 51 84 50.5 Q84.5 50.1 84.9 49.9 Q85.3 49.5 86 49.3 Q86.6 49.1 87.5 49.1 Q89.3 49.1 90.1 50.3 Q91 51.4 91 53.3 V59.8 Q91 60.2 91.1 60.5 Q91.3 60.8 91.7 60.9 Q92 61 92.2 61.1 Q92.4 61.1 92.8 61.2 ZM105.5 59.1 Q104.7 60.6 103.4 61.4 Q102 62.3 100.3 62.3 Q98.8 62.3 97.7 61.8 Q96.5 61.3 95.8 60.3 Q95.1 59.4 94.7 58.2 Q94.3 57 94.3 55.6 Q94.3 54.4 94.7 53.2 Q95.1 52.1 95.9 51.1 Q96.6 50.2 97.7 49.7 Q98.7 49.1 100.1 49.1 Q101.4 49.1 102.4 49.6 Q103.4 50 104 50.7 Q104.6 51.5 104.9 52.4 Q105.2 53.4 105.2 54.5 V55.3 H96.9 Q96.9 56.6 97.1 57.6 Q97.3 58.6 97.9 59.3 Q98.3 60.1 99.1 60.5 Q99.9 60.9 101 60.9 Q102.2 60.9 103 60.4 Q103.8 59.9 104.6 58.5 ZM102.7 54.3 Q102.7 53.6 102.5 52.8 Q102.4 51.9 102.2 51.4 Q101.9 50.8 101.4 50.4 Q100.8 50.1 100 50.1 Q98.7 50.1 97.8 51.2 Q96.9 52.3 96.9 54.3 ZM112.7 62.3 Q110 62.3 108.5 60.5 Q106.9 58.7 106.9 55.7 Q106.9 54.4 107.3 53.2 Q107.7 52.1 108.5 51.1 Q109.3 50.2 110.4 49.7 Q111.5 49.1 112.9 49.1 Q114.7 49.1 115.9 50 Q117 50.9 117 52.4 Q117 53 116.7 53.5 Q116.4 54 115.7 54 Q115 54 114.6 53.6 Q114.1 53.3 114.1 52.8 Q114.1 52.2 114.3 51.6 Q114.4 51 114.5 50.7 Q114.2 50.3 113.8 50.2 Q113.3 50.1 112.8 50.1 Q112.2 50.1 111.7 50.3 Q111.1 50.6 110.6 51.3 Q110.1 51.9 109.8 53 Q109.5 54.1 109.5 55.6 Q109.5 58 110.6 59.4 Q111.6 60.9 113.3 60.9 Q114.6 60.9 115.4 60.3 Q116.2 59.7 116.9 58.5 L117.7 59.1 Q116.9 60.6 115.5 61.5 Q114.2 62.3 112.7 62.3 ZM126.5 61.5 Q125.6 61.8 124.9 62 Q124.2 62.3 123.1 62.3 Q121.5 62.3 120.9 61.5 Q120.2 60.7 120.2 59.2 V50.8 H118 V49.5 H120.3 V45.6 H122.6 V49.5 H126.2 V50.8 H122.6 V57.7 Q122.6 58.5 122.7 59.1 Q122.7 59.6 122.9 60 Q123.2 60.3 123.6 60.5 Q124 60.7 124.7 60.7 Q125 60.7 125.6 60.7 Q126.2 60.6 126.5 60.5 ZM133 66.1 Q133 65.5 133.4 65.1 Q133.7 64.7 134.2 64.7 Q134.6 64.7 134.9 64.8 Q135.2 65 135.5 65.2 Q135.6 65.4 135.9 65.7 Q136.1 66 136.2 66.3 Q136.8 65.9 137.7 64.5 Q138.6 63 139 61.9 Q137.8 58.9 136.8 56.6 Q135.8 54.2 134.8 51.6 Q134.5 51.1 134 50.7 Q133.4 50.4 132.8 50.3 V49.5 H138.5 V50.4 Q138.1 50.4 137.6 50.5 Q137.1 50.7 137.1 50.9 Q137.1 50.9 137.1 51.1 Q137.2 51.3 137.3 51.5 Q137.8 52.7 138.7 55.1 Q139.7 57.5 140.3 58.9 Q140.8 57.5 141.5 56.1 Q142.1 54.6 142.8 52.7 Q142.9 52.4 143.1 52 Q143.3 51.6 143.3 51.3 Q143.3 50.9 142.7 50.6 Q142.1 50.4 141.6 50.3 V49.5 H146.2 V50.3 Q145.9 50.3 145.2 50.7 Q144.6 51.1 144.3 51.8 Q142.8 55.3 141.6 58.2 Q140.4 61 139.8 62.4 Q139 64.2 138.4 65.2 Q13Line truncated
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="300" viewBox="0 0 640 300"><rect x="0" y="0" width="640" height="300" fill="#F5F6FC"/><path d="M41.2 62.4 Q39.6 62.4 38.1 61.8 Q36.6 61.1 35.5 60 Q34.3 58.8 33.7 57 Q33 55.3 33 53.2 Q33 51 33.7 49.2 Q34.3 47.5 35.5 46.2 Q36.6 45 38.2 44.3 Q39.8 43.6 41.6 43.6 Q42.9 43.6 44 43.9 Q45.1 44.3 46 44.8 L46.6 44 H47.6 L47.7 50.4 H46.7 Q46.4 49.5 46 48.4 Q45.6 47.3 45.1 46.5 Q44.5 45.6 43.6 45.2 Q42.8 44.7 41.7 44.7 Q40.5 44.7 39.4 45.2 Q38.4 45.8 37.6 46.8 Q36.9 47.9 36.4 49.4 Q36 51 36 53 Q36 54.7 36.5 56.2 Q36.9 57.6 37.7 58.7 Q38.5 59.8 39.6 60.4 Q40.7 61 42.1 61 Q43.1 61 44 60.7 Q44.9 60.3 45.5 59.8 Q46.1 59.2 46.6 58.5 Q47.1 57.8 47.4 57 L48.4 57.4 Q47.3 60.1 45.5 61.3 Q43.7 62.4 41.2 62.4 ZM61.8 55.6 Q61.8 56.9 61.4 58.2 Q61 59.5 60.2 60.4 Q59.3 61.4 58.2 61.9 Q57 62.4 55.6 62.4 Q54.4 62.4 53.3 61.9 Q52.2 61.5 51.4 60.6 Q50.6 59.8 50.1 58.5 Q49.6 57.3 49.6 55.8 Q49.6 52.9 51.3 51 Q53 49.1 55.8 49.1 Q58.4 49.1 60.1 50.9 Q61.8 52.7 61.8 55.6 ZM59.2 55.6 Q59.2 54.7 59 53.6 Q58.8 52.6 58.4 51.8 Q58 51 57.4 50.6 Q56.7 50.1 55.7 50.1 Q54.8 50.1 54.1 50.6 Q53.4 51.1 52.9 51.9 Q52.5 52.7 52.4 53.7 Q52.2 54.6 52.2 55.6 Q52.2 56.8 52.4 57.8 Q52.6 58.9 53 59.7 Q53.5 60.5 54.1 61 Q54.8 61.4 55.7 61.4 Q57.3 61.4 58.3 59.9 Q59.2 58.3 59.2 55.6 ZM77.4 62 H71.3 V61.2 Q71.6 61.1 72 61.1 Q72.3 61.1 72.5 61 Q72.9 60.9 73.1 60.6 Q73.2 60.3 73.2 59.9 V53.4 Q73.2 52.1 72.6 51.4 Q72 50.7 71.1 50.7 Q70.4 50.7 69.8 50.9 Q69.3 51.1 68.9 51.4 Q68.4 51.7 68.2 52 Q67.9 52.3 67.8 52.5 V59.7 Q67.8 60.2 68 60.5 Q68.2 60.7 68.5 60.9 Q68.8 61 69.1 61.1 Q69.4 61.1 69.8 61.2 V62 H63.6 V61.2 Q63.9 61.1 64.2 61.1 Q64.5 61.1 64.8 61 Q65.1 60.9 65.3 60.6 Q65.5 60.3 65.5 59.9 V52.1 Q65.5 51.7 65.3 51.3 Q65.1 51 64.8 50.8 Q64.5 50.6 64.2 50.5 Q63.9 50.5 63.5 50.4 V49.6 L67.6 49.3 L67.8 49.5 V51.3 H67.9 Q68.2 51 68.7 50.5 Q69.1 50.1 69.5 49.9 Q70 49.5 70.6 49.3 Q71.3 49.1 72.1 49.1 Q73.9 49.1 74.8 50.3 Q75.6 51.4 75.6 53.3 V59.8 Q75.6 60.2 75.8 60.5 Q75.9 60.8 76.3 60.9 Q76.6 61 76.8 61.1 Q77.1 61.1 77.4 61.2 ZM92.8 62 H86.7 V61.2 Q87 61.1 87.3 61.1 Q87.7 61.1 87.9 61 Q88.3 60.9 88.4 60.6 Q88.6 60.3 88.6 59.9 V53.4 Q88.6 52.1 88 51.4 Q87.3 50.7 86.4 50.7 Q85.8 50.7 85.2 50.9 Q84.6 51.1 84.2 51.4 Q83.8 51.7 83.5 52 Q83.3 52.3 83.2 52.5 V59.7 Q83.2 60.2 83.4 60.5 Q83.5 60.7 83.9 60.9 Q84.2 61 84.5 61.1 Q84.8 61.1 85.1 61.2 V62 H79 V61.2 Q79.3 61.1 79.6 61.1 Q79.9 61.1 80.1 61 Q80.5 60.9 80.7 60.6 Q80.8 60.3 80.8 59.9 V52.1 Q80.8 51.7 80.6 51.3 Q80.5 51 80.1 50.8 Q79.9 50.6 79.6 50.5 Q79.2 50.5 78.8 50.4 V49.6 L83 49.3 L83.2 49.5 V51.3 H83.3 Q83.6 51 84 50.5 Q84.5 50.1 84.9 49.9 Q85.3 49.5 86 49.3 Q86.6 49.1 87.5 49.1 Q89.3 49.1 90.1 50.3 Q91 51.4 91 53.3 V59.8 Q91 60.2 91.1 60.5 Q91.3 60.8 91.7 60.9 Q92 61 92.2 61.1 Q92.4 61.1 92.8 61.2 ZM105.5 59.1 Q104.7 60.6 103.4 61.4 Q102 62.3 100.3 62.3 Q98.8 62.3 97.7 61.8 Q96.5 61.3 95.8 60.3 Q95.1 59.4 94.7 58.2 Q94.3 57 94.3 55.6 Q94.3 54.4 94.7 53.2 Q95.1 52.1 95.9 51.1 Q96.6 50.2 97.7 49.7 Q98.7 49.1 100.1 49.1 Q101.4 49.1 102.4 49.6 Q103.4 50 104 50.7 Q104.6 51.5 104.9 52.4 Q105.2 53.4 105.2 54.5 V55.3 H96.9 Q96.9 56.6 97.1 57.6 Q97.3 58.6 97.9 59.3 Q98.3 60.1 99.1 60.5 Q99.9 60.9 101 60.9 Q102.2 60.9 103 60.4 Q103.8 59.9 104.6 58.5 ZM102.7 54.3 Q102.7 53.6 102.5 52.8 Q102.4 51.9 102.2 51.4 Q101.9 50.8 101.4 50.4 Q100.8 50.1 100 50.1 Q98.7 50.1 97.8 51.2 Q96.9 52.3 96.9 54.3 ZM112.7 62.3 Q110 62.3 108.5 60.5 Q106.9 58.7 106.9 55.7 Q106.9 54.4 107.3 53.2 Q107.7 52.1 108.5 51.1 Q109.3 50.2 110.4 49.7 Q111.5 49.1 112.9 49.1 Q114.7 49.1 115.9 50 Q117 50.9 117 52.4 Q117 53 116.7 53.5 Q116.4 54 115.7 54 Q115 54 114.6 53.6 Q114.1 53.3 114.1 52.8 Q114.1 52.2 114.3 51.6 Q114.4 51 114.5 50.7 Q114.2 50.3 113.8 50.2 Q113.3 50.1 112.8 50.1 Q112.2 50.1 111.7 50.3 Q111.1 50.6 110.6 51.3 Q110.1 51.9 109.8 53 Q109.5 54.1 109.5 55.6 Q109.5 58 110.6 59.4 Q111.6 60.9 113.3 60.9 Q114.6 60.9 115.4 60.3 Q116.2 59.7 116.9 58.5 L117.7 59.1 Q116.9 60.6 115.5 61.5 Q114.2 62.3 112.7 62.3 ZM126.5 61.5 Q125.6 61.8 124.9 62 Q124.2 62.3 123.1 62.3 Q121.5 62.3 120.9 61.5 Q120.2 60.7 120.2 59.2 V50.8 H118 V49.5 H120.3 V45.6 H122.6 V49.5 H126.2 V50.8 H122.6 V57.7 Q122.6 58.5 122.7 59.1 Q122.7 59.6 122.9 60 Q123.2 60.3 123.6 60.5 Q124 60.7 124.7 60.7 Q125 60.7 125.6 60.7 Q126.2 60.6 126.5 60.5 ZM133 66.1 Q133 65.5 133.4 65.1 Q133.7 64.7 134.2 64.7 Q134.6 64.7 134.9 64.8 Q135.2 65 135.5 65.2 Q135.6 65.4 135.9 65.7 Q136.1 66 136.2 66.3 Q136.8 65.9 137.7 64.5 Q138.6 63 139 61.9 Q137.8 58.9 136.8 56.6 Q135.8 54.2 134.8 51.6 Q134.5 51.1 134 50.7 Q133.4 50.4 132.8 50.3 V49.5 H138.5 V50.4 Q138.1 50.4 137.6 50.5 Q137.1 50.7 137.1 50.9 Q137.1 50.9 137.1 51.1 Q137.2 51.3 137.3 51.5 Q137.8 52.7 138.7 55.1 Q139.7 57.5 140.3 58.9 Q140.8 57.5 141.5 56.1 Q142.1 54.6 142.8 52.7 Q142.9 52.4 143.1 52 Q143.3 51.6 143.3 51.3 Q143.3 50.9 142.7 50.6 Q142.1 50.4 141.6 50.3 V49.5 H146.2 V50.3 Q145.9 50.3 145.2 50.7 Q144.6 51.1 144.3 51.8 Q142.8 55.3 141.6 58.2 Q140.4 61 139.8 62.4 Q139 64.2 138.4 65.2 Q13Line truncated

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 140 KiB

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="300" viewBox="0 0 640 300"><rect x="0" y="0" width="640" height="300" fill="#F5F6FC"/><path d="M47.3 47.7 Q49.3 44.8 50.4 42.6 L52.2 44 Q52.5 44.2 52.5 44.4 Q52.5 44.6 52 44.7 Q51.4 44.8 50.8 45.3 Q50.2 45.8 48.1 47.7 H53.9 L54.8 46.3 L56.7 47.9 Q57.1 48.2 57.1 48.4 Q57.1 48.5 56.6 48.6 Q55.2 48.7 52.5 51.2 L52.2 51 L53.8 48.4 H36.6 Q36.6 50.1 36 51 Q35.4 52 34.5 52 Q34.1 52 33.7 51.7 Q33.4 51.4 33.4 51 Q33.4 50.5 34.1 49.9 Q36 48.4 35.9 46.2 H36.4 Q36.5 46.9 36.6 47.7 H43.8 V45.3 Q43.8 44 43.7 42 L46.1 42.9 Q46.3 43 46.3 43.1 Q46.3 43.3 46.1 43.5 L45.6 44.1 V47.7 ZM38 42.9 Q41.6 44.3 41.6 45.3 Q41.6 46 41.3 46.5 Q40.9 46.9 40.6 46.9 Q40 46.9 39.8 46.1 Q39.5 44.8 37.7 43.3 ZM40.9 54.6 V55 Q40.9 55.3 40.7 55.5 Q40.6 55.6 40.1 55.9 Q39.5 56.2 39.3 56.2 Q39.1 56.2 39.1 55.7 L39.2 54.4 Q39.2 53.7 39.2 52.4 V51.3 Q39.2 50.2 39.1 48.8 L41.5 50.3 H48.7 L49.6 49.3 L51.1 50.6 Q51.3 50.7 51.3 50.8 Q51.3 51 51.1 51.1 L50.6 51.4 V52.4 Q50.6 52.8 50.6 53.4 L50.7 54.5 Q50.7 55 50 55.4 Q49.3 55.7 49.1 55.7 Q48.9 55.7 48.9 55.3 V54.6 H45.5 V57.8 H50.8 L51.8 56.3 L53.6 57.7 Q53.9 57.8 53.9 58 Q53.9 58.1 53.6 58.2 L53 58.6 V62 Q53 62.9 52.8 63.3 Q52.6 63.7 51.8 64.2 Q50.9 64.8 50.6 64.8 Q50.4 64.8 50.3 64.4 Q50.1 63.6 49.6 63.2 Q49 62.8 48.1 62.6 V62.2 Q49.5 62.4 50.1 62.4 Q50.8 62.4 51 62.2 Q51.2 62 51.2 61.5 V58.5 H45.5 V62.5 Q45.5 64.2 45.6 65 Q45.7 65.7 45.7 65.7 Q45.7 66.1 44.9 66.4 Q44.1 66.7 43.9 66.7 Q43.7 66.7 43.7 66.2 Q43.7 66.1 43.7 65.2 Q43.8 64.3 43.8 62.4 V58.5 H38.6 V60.7 Q38.6 62.5 38.6 63.2 Q38.7 63.9 38.7 64 Q38.7 64.2 37.9 64.6 Q37.1 64.9 36.9 64.9 Q36.7 64.9 36.7 64.4 V63.1 Q36.7 62.4 36.7 61.5 V58.7 Q36.7 57.7 36.7 56.3 L39.1 57.8 H43.8 V54.6 ZM40.9 51.1 V53.9 H48.9 V51.1 ZM64.8 43.8 H78.2 L79.1 42.4 L81.4 44.2 Q81.6 44.3 81.6 44.4 Q81.6 44.5 81.4 44.7 L80.2 45.6 V62.3 Q80.2 63.5 80 64 Q79.8 64.5 79 65.1 Q78.2 65.8 78 65.8 Q77.8 65.8 77.7 65.4 Q77.4 64.3 76.7 63.9 Q76.1 63.4 74.1 63 L74.3 62.6 Q76.4 62.8 77.2 62.8 Q78 62.8 78.2 62.6 Q78.4 62.4 78.4 62 V56 H72.5 V59.1 Q72.5 61.6 72.6 62.8 Q72.6 63.9 72.6 64 Q72.6 64.5 71.8 64.9 Q70.9 65.4 70.7 65.4 Q70.4 65.4 70.4 64.8 L70.5 61.9 Q70.6 60.1 70.6 58.5 V56 H64.8 Q64.1 63 59.6 65.8 L59.3 65.5 Q61.4 63.4 62.2 60.4 Q63 57.4 63 50.9 V45.5 Q63 44.2 62.9 42.8 ZM70.6 44.5 H64.9 V49.5 H70.6 ZM78.4 49.5 V44.5 H72.5 V49.5 ZM64.9 50.3 V55.3 H70.6 V50.3 ZM78.4 55.3 V50.3 H72.5 V55.3 ZM95.6 41.9 Q97.1 42.4 98 43 Q98.8 43.6 98.8 44.7 Q98.8 45.3 98.4 45.7 Q98.1 46.2 97.6 46.2 Q97.2 46.2 97.1 46 Q97 45.8 96.8 45.1 Q96.7 44.4 96.4 43.8 Q96.1 43.2 95.4 42.3 ZM90.4 46.7 H104.7 L106.4 44.7 L108.1 46.7 Q108.3 47 108.3 47.2 Q108.3 47.4 107.9 47.4 H90.2 V53.1 Q90.2 58.1 89 60.9 Q87.9 63.7 85.2 65.9 L84.9 65.6 Q86.8 63.4 87.6 60.9 Q88.4 58.4 88.4 53.1 V47.8 Q88.4 46.5 88.3 45.1 ZM96.5 48.9 Q99.9 53.2 99.9 55.7 Q99.9 56.4 99.5 57.3 Q99.1 58.2 98.5 58.2 Q98.2 58.2 98 58 Q97.8 57.9 97.8 57.7 Q97.8 57.5 97.8 56.7 Q97.8 54.8 97.4 52.7 Q97 50.7 96.2 49.2 ZM99.8 63.5 H105.2 L106.9 61.5 L108.8 63.7 Q109 63.9 109 64.1 Q109 64.2 108.6 64.2 H90.9 Q90 64.2 89.2 64.5 L88.2 63.4 Q89.2 63.5 90.3 63.5 H99 Q100.5 60.2 101.5 57.5 Q102.5 54.7 104 49.6 L106.1 50.8 Q106.4 51 106.4 51.3 Q106.4 51.5 106.2 51.6 Q105.9 51.7 105.6 52 Q105.3 52.3 105.1 52.7 Q103.4 56.9 102.4 58.8 Q101.4 60.7 99.8 63.5 ZM91.9 51.3 Q93.6 53.2 94.5 54.8 Q95.3 56.3 95.3 57.3 Q95.3 58.2 94.8 59 Q94.4 59.8 93.9 59.8 Q93.5 59.8 93.4 59.5 Q93.3 59.3 93.3 58.7 Q93.2 54.8 91.6 51.7 ZM116.8 43.8 H130.2 L131.1 42.4 L133.4 44.2 Q133.6 44.3 133.6 44.4 Q133.6 44.5 133.4 44.7 L132.2 45.6 V62.3 Q132.2 63.5 132 64 Q131.8 64.5 131 65.1 Q130.2 65.8 130 65.8 Q129.8 65.8 129.7 65.4 Q129.4 64.3 128.7 63.9 Q128.1 63.4 126.1 63 L126.3 62.6 Q128.4 62.8 129.2 62.8 Q130 62.8 130.2 62.6 Q130.4 62.4 130.4 62 V56 H124.5 V59.1 Q124.5 61.6 124.6 62.8 Q124.6 63.9 124.6 64 Q124.6 64.5 123.8 64.9 Q122.9 65.4 122.7 65.4 Q122.4 65.4 122.4 64.8 L122.5 61.9 Q122.6 60.1 122.6 58.5 V56 H116.8 Q116.1 63 111.6 65.8 L111.3 65.5 Q113.4 63.4 114.2 60.4 Q115 57.4 115 50.9 V45.5 Q115 44.2 114.9 42.8 ZM122.6 44.5 H116.9 V49.5 H122.6 ZM130.4 49.5 V44.5 H124.5 V49.5 ZM116.9 50.3 V55.3 H122.6 V50.3 ZM130.4 55.3 V50.3 H124.5 V55.3 ZM140.8 64.7 Q141.6 64.5 142.1 64.1 Q142.6 63.8 142.9 63.4 Q143.2 63.1 143.3 62.7 Q143.4 62.4 143.4 62.2 Q143.4 61.8 143.2 61.6 Q143 61.4 142.7 61.2 Q142.5 61.1 142.1 61.1 Q141.8 61 141.6 60.9 Q141.3 60.8 141.1 60.6 Q140.9 60.4 140.9 60 Q140.9 59.5 141.4 59.2 Q141.8 58.8 142.3 58.8 Q143.3 58.8 143.9 59.5 Q144.5 60.2 144.5 61.1 Q144.5 61.8 144.2 62.5 Q143.9 63.1 143.4 63.6 Q142.9 64.1 142.2 64.5 Q141.6 64.9 140.9 65 ZM185.3 55.1 Q185.5 55.4 185.5 55.5 Q185.5 55.6 185.1 55.6 H169.7 Q169.7 56.3 169.6 56.6 Q169.4 56.9 168.9 57.1 Q168.3 57.4 168 57.4 Q167.8 57.4 167.8 56.9 Q168 55.1 168 53.1 V48.3 Q165.9 50.6 163.5 52.2 L163.2 52 Q166.6 49 170.2 41.9 L171.9 43 Q172.2 43.3 172.2 43.4 Q172.2 43.6 171.9 43.7 Q171.5 43.9 170.8 44.8 Q170.1 45.8 169.9 46 H181.6 L183.1 44.1 L184.9 46.1 Q185.1 46.4 185Line truncated
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="300" viewBox="0 0 640 300"><rect x="0" y="0" width="640" height="300" fill="#F5F6FC"/><path d="M47.3 47.7 Q49.3 44.8 50.4 42.6 L52.2 44 Q52.5 44.2 52.5 44.4 Q52.5 44.6 52 44.7 Q51.4 44.8 50.8 45.3 Q50.2 45.8 48.1 47.7 H53.9 L54.8 46.3 L56.7 47.9 Q57.1 48.2 57.1 48.4 Q57.1 48.5 56.6 48.6 Q55.2 48.7 52.5 51.2 L52.2 51 L53.8 48.4 H36.6 Q36.6 50.1 36 51 Q35.4 52 34.5 52 Q34.1 52 33.7 51.7 Q33.4 51.4 33.4 51 Q33.4 50.5 34.1 49.9 Q36 48.4 35.9 46.2 H36.4 Q36.5 46.9 36.6 47.7 H43.8 V45.3 Q43.8 44 43.7 42 L46.1 42.9 Q46.3 43 46.3 43.1 Q46.3 43.3 46.1 43.5 L45.6 44.1 V47.7 ZM38 42.9 Q41.6 44.3 41.6 45.3 Q41.6 46 41.3 46.5 Q40.9 46.9 40.6 46.9 Q40 46.9 39.8 46.1 Q39.5 44.8 37.7 43.3 ZM40.9 54.6 V55 Q40.9 55.3 40.7 55.5 Q40.6 55.6 40.1 55.9 Q39.5 56.2 39.3 56.2 Q39.1 56.2 39.1 55.7 L39.2 54.4 Q39.2 53.7 39.2 52.4 V51.3 Q39.2 50.2 39.1 48.8 L41.5 50.3 H48.7 L49.6 49.3 L51.1 50.6 Q51.3 50.7 51.3 50.8 Q51.3 51 51.1 51.1 L50.6 51.4 V52.4 Q50.6 52.8 50.6 53.4 L50.7 54.5 Q50.7 55 50 55.4 Q49.3 55.7 49.1 55.7 Q48.9 55.7 48.9 55.3 V54.6 H45.5 V57.8 H50.8 L51.8 56.3 L53.6 57.7 Q53.9 57.8 53.9 58 Q53.9 58.1 53.6 58.2 L53 58.6 V62 Q53 62.9 52.8 63.3 Q52.6 63.7 51.8 64.2 Q50.9 64.8 50.6 64.8 Q50.4 64.8 50.3 64.4 Q50.1 63.6 49.6 63.2 Q49 62.8 48.1 62.6 V62.2 Q49.5 62.4 50.1 62.4 Q50.8 62.4 51 62.2 Q51.2 62 51.2 61.5 V58.5 H45.5 V62.5 Q45.5 64.2 45.6 65 Q45.7 65.7 45.7 65.7 Q45.7 66.1 44.9 66.4 Q44.1 66.7 43.9 66.7 Q43.7 66.7 43.7 66.2 Q43.7 66.1 43.7 65.2 Q43.8 64.3 43.8 62.4 V58.5 H38.6 V60.7 Q38.6 62.5 38.6 63.2 Q38.7 63.9 38.7 64 Q38.7 64.2 37.9 64.6 Q37.1 64.9 36.9 64.9 Q36.7 64.9 36.7 64.4 V63.1 Q36.7 62.4 36.7 61.5 V58.7 Q36.7 57.7 36.7 56.3 L39.1 57.8 H43.8 V54.6 ZM40.9 51.1 V53.9 H48.9 V51.1 ZM64.8 43.8 H78.2 L79.1 42.4 L81.4 44.2 Q81.6 44.3 81.6 44.4 Q81.6 44.5 81.4 44.7 L80.2 45.6 V62.3 Q80.2 63.5 80 64 Q79.8 64.5 79 65.1 Q78.2 65.8 78 65.8 Q77.8 65.8 77.7 65.4 Q77.4 64.3 76.7 63.9 Q76.1 63.4 74.1 63 L74.3 62.6 Q76.4 62.8 77.2 62.8 Q78 62.8 78.2 62.6 Q78.4 62.4 78.4 62 V56 H72.5 V59.1 Q72.5 61.6 72.6 62.8 Q72.6 63.9 72.6 64 Q72.6 64.5 71.8 64.9 Q70.9 65.4 70.7 65.4 Q70.4 65.4 70.4 64.8 L70.5 61.9 Q70.6 60.1 70.6 58.5 V56 H64.8 Q64.1 63 59.6 65.8 L59.3 65.5 Q61.4 63.4 62.2 60.4 Q63 57.4 63 50.9 V45.5 Q63 44.2 62.9 42.8 ZM70.6 44.5 H64.9 V49.5 H70.6 ZM78.4 49.5 V44.5 H72.5 V49.5 ZM64.9 50.3 V55.3 H70.6 V50.3 ZM78.4 55.3 V50.3 H72.5 V55.3 ZM95.6 41.9 Q97.1 42.4 98 43 Q98.8 43.6 98.8 44.7 Q98.8 45.3 98.4 45.7 Q98.1 46.2 97.6 46.2 Q97.2 46.2 97.1 46 Q97 45.8 96.8 45.1 Q96.7 44.4 96.4 43.8 Q96.1 43.2 95.4 42.3 ZM90.4 46.7 H104.7 L106.4 44.7 L108.1 46.7 Q108.3 47 108.3 47.2 Q108.3 47.4 107.9 47.4 H90.2 V53.1 Q90.2 58.1 89 60.9 Q87.9 63.7 85.2 65.9 L84.9 65.6 Q86.8 63.4 87.6 60.9 Q88.4 58.4 88.4 53.1 V47.8 Q88.4 46.5 88.3 45.1 ZM96.5 48.9 Q99.9 53.2 99.9 55.7 Q99.9 56.4 99.5 57.3 Q99.1 58.2 98.5 58.2 Q98.2 58.2 98 58 Q97.8 57.9 97.8 57.7 Q97.8 57.5 97.8 56.7 Q97.8 54.8 97.4 52.7 Q97 50.7 96.2 49.2 ZM99.8 63.5 H105.2 L106.9 61.5 L108.8 63.7 Q109 63.9 109 64.1 Q109 64.2 108.6 64.2 H90.9 Q90 64.2 89.2 64.5 L88.2 63.4 Q89.2 63.5 90.3 63.5 H99 Q100.5 60.2 101.5 57.5 Q102.5 54.7 104 49.6 L106.1 50.8 Q106.4 51 106.4 51.3 Q106.4 51.5 106.2 51.6 Q105.9 51.7 105.6 52 Q105.3 52.3 105.1 52.7 Q103.4 56.9 102.4 58.8 Q101.4 60.7 99.8 63.5 ZM91.9 51.3 Q93.6 53.2 94.5 54.8 Q95.3 56.3 95.3 57.3 Q95.3 58.2 94.8 59 Q94.4 59.8 93.9 59.8 Q93.5 59.8 93.4 59.5 Q93.3 59.3 93.3 58.7 Q93.2 54.8 91.6 51.7 ZM116.8 43.8 H130.2 L131.1 42.4 L133.4 44.2 Q133.6 44.3 133.6 44.4 Q133.6 44.5 133.4 44.7 L132.2 45.6 V62.3 Q132.2 63.5 132 64 Q131.8 64.5 131 65.1 Q130.2 65.8 130 65.8 Q129.8 65.8 129.7 65.4 Q129.4 64.3 128.7 63.9 Q128.1 63.4 126.1 63 L126.3 62.6 Q128.4 62.8 129.2 62.8 Q130 62.8 130.2 62.6 Q130.4 62.4 130.4 62 V56 H124.5 V59.1 Q124.5 61.6 124.6 62.8 Q124.6 63.9 124.6 64 Q124.6 64.5 123.8 64.9 Q122.9 65.4 122.7 65.4 Q122.4 65.4 122.4 64.8 L122.5 61.9 Q122.6 60.1 122.6 58.5 V56 H116.8 Q116.1 63 111.6 65.8 L111.3 65.5 Q113.4 63.4 114.2 60.4 Q115 57.4 115 50.9 V45.5 Q115 44.2 114.9 42.8 ZM122.6 44.5 H116.9 V49.5 H122.6 ZM130.4 49.5 V44.5 H124.5 V49.5 ZM116.9 50.3 V55.3 H122.6 V50.3 ZM130.4 55.3 V50.3 H124.5 V55.3 ZM140.8 64.7 Q141.6 64.5 142.1 64.1 Q142.6 63.8 142.9 63.4 Q143.2 63.1 143.3 62.7 Q143.4 62.4 143.4 62.2 Q143.4 61.8 143.2 61.6 Q143 61.4 142.7 61.2 Q142.5 61.1 142.1 61.1 Q141.8 61 141.6 60.9 Q141.3 60.8 141.1 60.6 Q140.9 60.4 140.9 60 Q140.9 59.5 141.4 59.2 Q141.8 58.8 142.3 58.8 Q143.3 58.8 143.9 59.5 Q144.5 60.2 144.5 61.1 Q144.5 61.8 144.2 62.5 Q143.9 63.1 143.4 63.6 Q142.9 64.1 142.2 64.5 Q141.6 64.9 140.9 65 ZM185.3 55.1 Q185.5 55.4 185.5 55.5 Q185.5 55.6 185.1 55.6 H169.7 Q169.7 56.3 169.6 56.6 Q169.4 56.9 168.9 57.1 Q168.3 57.4 168 57.4 Q167.8 57.4 167.8 56.9 Q168 55.1 168 53.1 V48.3 Q165.9 50.6 163.5 52.2 L163.2 52 Q166.6 49 170.2 41.9 L171.9 43 Q172.2 43.3 172.2 43.4 Q172.2 43.6 171.9 43.7 Q171.5 43.9 170.8 44.8 Q170.1 45.8 169.9 46 H181.6 L183.1 44.1 L184.9 46.1 Q185.1 46.4 185Line truncated

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 115 KiB

@@ -3479,7 +3479,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'plugins.add.actions\', () => ctx.slots.register(\n { name: \'plugins.add.actions\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:173',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:135',
},
{
key: 'plugins.bundle.activation',
@@ -3522,7 +3522,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'shadows-shipped-ui',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'plugins.bundle.activation\', () => ctx.slots.register(\n { name: \'plugins.bundle.activation\', key: \'<one key the owner dispatches>\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:181',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:143',
},
{
key: 'plugins.bundle.config',
@@ -3569,7 +3569,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'shadows-shipped-ui',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'plugins.bundle.config\', () => ctx.slots.register(\n { name: \'plugins.bundle.config\', key: \'<one key the owner dispatches>\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:197',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:159',
},
{
key: 'plugins.detail.actions',
@@ -3622,7 +3622,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
occupants: [],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'plugins.detail.actions\', () => ctx.slots.register(\n { name: \'plugins.detail.actions\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:211',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:173',
},
{
key: 'plugins.detail.badge',
@@ -3677,7 +3677,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'plugins.detail.badge\', () => ctx.slots.register(\n { name: \'plugins.detail.badge\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:216',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:178',
},
{
key: 'plugins.detail.section',
@@ -3730,7 +3730,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
occupants: [],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'plugins.detail.section\', () => ctx.slots.register(\n { name: \'plugins.detail.section\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:223',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:185',
},
{
key: 'plugins.item',
@@ -3788,7 +3788,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'plugins.item\', () => ctx.slots.register(\n { name: \'plugins.item\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:191',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:153',
},
{
key: 'plugins.row.config',
@@ -3832,7 +3832,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'plugins.row.config\', () => ctx.slots.register(\n { name: \'plugins.row.config\', key: \'<one key the owner dispatches>\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:205',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:167',
},
{
key: 'plugins.tab',
@@ -3890,7 +3890,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'plugins.tab\', () => ctx.slots.register(\n { name: \'plugins.tab\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:179',
source: 'packages/client/ui-plugin-manager/src/client/slot-contract.ts:141',
},
{
key: 'rightbar',
@@ -886,12 +886,6 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
},
],
},
{
key: 'connectors',
summary: 'Present while the Connectors bundle is enabled; a connector row that injects it runs only then.',
description: 'Present while the Connectors bundle is enabled; a connector row that injects it runs only then.',
methods: [],
},
{
key: 'cotTranslation',
summary: 'Optional reasoning translation delegates Session-bound storage to the translator.',
@@ -24,8 +24,8 @@
en: 8d94e2b44efb9c1d
zh: c049a19e471d188b
/deepseek-ai-dsh-official-bundles/use-this-package/plugin-manager-lists:
en: bec3196682e0c968
zh: 142e63ea95c4c18d
en: 27c22abdfff69a41
zh: e60d828cdb75c263
/deepseek-ai-dsh-official-bundles/use-this-package/on-demand-bundles:
en: 6ba39ba5bfefec79
zh: 788a71b5b6f75404
@@ -33,8 +33,8 @@
en: 3fb2b58db529d8be
zh: 46064459a23d458d
/deepseek-ai-dsh-official-bundles/understand-the-implementation/source-map:
en: bbe90992582f8f22
zh: a17d8f99b6db368d
en: bbd3b4f82e6349d9
zh: f1e056d14620519d
/deepseek-ai-dsh-official-bundles/further-exploration:
en: 16a331e64c81b2a5
zh: abfe9b1a1294b6b3
+2 -2
View File
@@ -37,7 +37,7 @@ Edit this package when the installation's bundle selection or the plugin manager
<a id="plugin-manager-lists"></a>
### Plugin manager lists
`PROTECTED_PLUGINS` names the plugin packages the [plugin manager](../../boot/plugin-manager/README.md) keeps read-only because management needs them; a bundle that contains one is a management bundle. Removing a name drops only this `management-required` refusal; the manager's own entry, installation-carried bundles, and unaddressable rows stay protected by their own rules. The [Web plugin page](../../client/ui-plugin-manager/README.md) hides the `HIDDEN_BUNDLES`, ranks the `EXTENSION_BUNDLES` first in their order, keeps the `MORE_BUNDLES` off its main list until the profile enables them, marks the `EXPERIMENTAL_BUNDLES` with the Experimental badge, and leaves the `CONNECTOR_BUNDLES` off its card lists for the [Connectors tab](../../experimental/client-ui-connectors/README.md), which lists them in that order.
`PROTECTED_PLUGINS` names the plugin packages the [plugin manager](../../boot/plugin-manager/README.md) keeps read-only because management needs them; a bundle that contains one is a management bundle. Removing a name drops only this `management-required` refusal; the manager's own entry, installation-carried bundles, and unaddressable rows stay protected by their own rules. The [Web plugin page](../../client/ui-plugin-manager/README.md) hides the `HIDDEN_BUNDLES`, ranks the `EXTENSION_BUNDLES` first in their order, keeps the `MORE_BUNDLES` off its main list until the profile enables them, and marks the `EXPERIMENTAL_BUNDLES` with the Experimental badge.
### On-demand bundles
@@ -58,7 +58,7 @@ Repository checks read the lists in `src/bundles.ts` as TypeScript literals with
| File | Role |
|---|---|
| [`src/bundles.ts`](src/bundles.ts) | Profile templates and the default, installation-owned, retired, optional, and on-demand bundle lists |
| [`src/plugin-manager.ts`](src/plugin-manager.ts) | Protected plugin packages and the Web plugin page's hidden, ordered, connector, and experimental bundle lists |
| [`src/plugin-manager.ts`](src/plugin-manager.ts) | Protected plugin packages and the Web plugin page's hidden, ordered, and experimental bundle lists |
| [`src/catalog.generated.ts`](src/catalog.generated.ts) | Generated offline metadata for the on-demand bundles |
| [`src/index.ts`](src/index.ts) | Public exports and the catalog entry type |
+2 -2
View File
@@ -37,7 +37,7 @@ kind: "package-library"
<a id="plugin-manager-lists"></a>
### 插件管理器列表
`PROTECTED_PLUGINS` 列出[插件管理器](../../boot/plugin-manager/README.zh.md)因管理功能依赖而保持只读的插件包;包含其中任一插件的组合包是管理组合包。移除其中一项只解除这一条 `management-required` 拒绝;管理器自身的入口、随安装提供的组合包和不可寻址的行仍由各自的规则保护。[Web 插件页](../../client/ui-plugin-manager/README.zh.md)隐藏 `HIDDEN_BUNDLES`,把 `EXTENSION_BUNDLES` 按顺序排在最前,在 profile 启用 `MORE_BUNDLES` 之前不把它们放上主列表,为 `EXPERIMENTAL_BUNDLES` 显示实验性标记,并把 `CONNECTOR_BUNDLES` 排除在卡片列表之外,留给按这个顺序列出它们的[“连接器”标签](../../experimental/client-ui-connectors/README.zh.md)。
`PROTECTED_PLUGINS` 列出[插件管理器](../../boot/plugin-manager/README.zh.md)因管理功能依赖而保持只读的插件包;包含其中任一插件的组合包是管理组合包。移除其中一项只解除这一条 `management-required` 拒绝;管理器自身的入口、随安装提供的组合包和不可寻址的行仍由各自的规则保护。[Web 插件页](../../client/ui-plugin-manager/README.zh.md)隐藏 `HIDDEN_BUNDLES`,把 `EXTENSION_BUNDLES` 按顺序排在最前,在 profile 启用 `MORE_BUNDLES` 之前不把它们放上主列表,并为 `EXPERIMENTAL_BUNDLES` 显示实验性标记。
### 按需组合包
@@ -58,7 +58,7 @@ kind: "package-library"
| 文件 | 职责 |
|---|---|
| [`src/bundles.ts`](src/bundles.ts) | Profile 模板,以及默认、安装持有、已退役、可选和按需组合包列表 |
| [`src/plugin-manager.ts`](src/plugin-manager.ts) | 受保护的插件包,以及 Web 插件页的隐藏、排序、连接器和实验性组合包列表 |
| [`src/plugin-manager.ts`](src/plugin-manager.ts) | 受保护的插件包,以及 Web 插件页的隐藏、排序和实验性组合包列表 |
| [`src/catalog.generated.ts`](src/catalog.generated.ts) | 按需组合包的生成离线元信息 |
| [`src/index.ts`](src/index.ts) | 公开导出与目录条目类型 |
+1 -1
View File
@@ -9,7 +9,7 @@ export {
DEFAULT_PROFILE_BUNDLES, INSTALLATION_OWNED_PROFILE_TUPLES, ON_DEMAND_BUNDLES, OPTIONAL_BUNDLES, PROFILE_TEMPLATES,
RETIRED_BUNDLES, type ProfileTemplate,
} from './bundles.ts'
export { CONNECTOR_BUNDLES, EXPERIMENTAL_BUNDLES, EXTENSION_BUNDLES, HIDDEN_BUNDLES, MORE_BUNDLES, PROTECTED_PLUGINS } from './plugin-manager.ts'
export { EXPERIMENTAL_BUNDLES, EXTENSION_BUNDLES, HIDDEN_BUNDLES, MORE_BUNDLES, PROTECTED_PLUGINS } from './plugin-manager.ts'
/** Offline discovery metadata; installation state and the requested version belong to the running host. */
export interface OfficialBundleCatalogEntry {
@@ -62,20 +62,6 @@ export const MORE_BUNDLES: readonly string[] = [
'@deepseek-ai/dsh-subagent-claude-code',
]
/**
* Official connector bundles, in the order the Connectors tab lists them. The plugin manager's card lists leave them to
* that tab, and their pages still open from it.
*/
export const CONNECTOR_BUNDLES = [
'@deepseek-ai/dsh-feishu',
'@deepseek-ai/dsh-wecom',
'@deepseek-ai/dsh-dingtalk',
'@deepseek-ai/dsh-tencent-meeting',
'@deepseek-ai/dsh-notion',
'@deepseek-ai/dsh-tencent-docs',
'@deepseek-ai/dsh-linear',
] as const
/** Official bundles the plugin manager marks with the Experimental badge. */
export const EXPERIMENTAL_BUNDLES: ReadonlySet<string> = new Set([
'@deepseek-ai/dsh-cua-bundle',
-12
View File
@@ -10288,15 +10288,9 @@ importers:
'@deepseek-ai/cordis':
specifier: workspace:~
version: link:../../../vendor/cordis
'@deepseek-ai/cordis-plugin-timer':
specifier: workspace:~
version: link:../../../vendor/timer
'@deepseek-ai/dsh-api-remotes':
specifier: workspace:*
version: link:../../api/remotes
'@deepseek-ai/dsh-app-boot':
specifier: workspace:*
version: link:../../boot/app-boot
'@deepseek-ai/dsh-client-locale':
specifier: workspace:*
version: link:../../client/locale
@@ -10318,12 +10312,6 @@ importers:
'@deepseek-ai/dsh-client-ui-slots':
specifier: workspace:*
version: link:../../client/ui-slots
'@deepseek-ai/dsh-hmr':
specifier: workspace:*
version: link:../../boot/hmr
'@deepseek-ai/dsh-official-bundles':
specifier: workspace:*
version: link:../../util/official-bundles
'@deepseek-ai/dsh-plugin-manager':
specifier: workspace:*
version: link:../../boot/plugin-manager
-1
View File
@@ -68,7 +68,6 @@ export const SERVICE_PAGE: Record<string, string> = {
connectorAccounts: 'boot.md',
cliAccounts: 'boot.md',
pluginRegistryProbe: 'boot.md',
connectors: 'boot.md',
configEditor: 'boot.md',
profileContext: 'boot.md',
hmr: 'boot.md',
-7
View File
@@ -263,13 +263,6 @@ const SERVICE_ROLES: ServiceRole[] = [
mode: 'service',
note: 'Streams one panel state per followed Session: Git inspection using Session permissions, the recognized code host and its sign-in, and the bound change requests with polled status.',
},
{
key: 'connectors',
pkg: 'experimental-client-ui-connectors',
title: 'Connectors bundle switch',
mode: 'service',
note: 'Present while the Connectors bundle is enabled; each official connector row injects it, so the Loader stops and resumes the connectors with the bundle.',
},
{
key: 'worktrees',
pkg: 'experimental-worktree',