feat: 推荐插件目录收录 dsh-sentinel(Tab 注册)

- plugins-tabs.ts 收录 dsh-sentinel(条件驱动的 agent 唤醒系统,注册 dsh-sentinel:watches Tab)
- install 拼接官方一键命令:cd ~/.dsh && dsh plugin --profile web add "github:fuhefei/dsh-sentinel#v0.7.0"
- 新增 pluginSentinelDesc 文案(zh/en);测试同步(tab 目录不再为空态)
This commit is contained in:
Menghuan1918
2026-08-14 23:04:25 +08:00
parent c0aeefc936
commit 7d524724ae
5 changed files with 29 additions and 13 deletions
+4 -3
View File
@@ -48,11 +48,12 @@ describe('PluginListBody (render)', () => {
expect(html).toContain('Copy')
})
it('tab kind renders its own empty state (no office entry)', () => {
it('tab kind renders the sentinel entry (its own catalog, no office entry)', () => {
const store = createSidebarStore()
const service = createBetterSidebarService(store)
const html = renderToString(createElement(PluginListBody, { service, kind: 'tab' }))
expect(html).toContain('No plugins curated yet')
expect(html).toContain('dsh-sentinel 唤醒系统')
expect(html).toContain('github:fuhefei/dsh-sentinel')
expect(html).not.toContain(officeEntry.name)
})
})
@@ -75,7 +76,7 @@ describe('AddPluginModal wiring', () => {
if (kind === 'viewer') {
expect(html).toContain(officeEntry.name)
} else {
expect(html).toContain('No plugins curated yet')
expect(html).toContain('dsh-sentinel 唤醒系统')
}
act(() => { root.unmount() })
container.remove()
+2 -1
View File
@@ -24,9 +24,10 @@ const catalogs: Array<[string, readonly PluginEntry[]]> = [
]
describe('builtin plugin catalogs', () => {
it('the viewer catalog has the seeded office plugin, the tab catalog does not', () => {
it('the viewer catalog has the office plugin, the tab catalog has the sentinel plugin', () => {
const ids = (list: readonly PluginEntry[]): string[] => list.map(p => p.id)
expect(ids(builtinViewerPlugins)).toContain('@huanlin/dsh-plugin-better-sidebar-plugin-office')
expect(ids(builtinTabPlugins)).toContain('@dsh-external/dsh-sentinel')
expect(ids(builtinTabPlugins)).not.toContain('@huanlin/dsh-plugin-better-sidebar-plugin-office')
})