MaimoryLab/dib--plugins-dsh-desktop ↗★ 3
@maimorylab/dsh-desktop
DeepSeek Harness 桌面端 UI 扩展插件,为客户端插件提供菜单注册、系统通知和文件选择等桌面能力。
AI 分析
核心用途为桌面端底层能力扩展。适合开发 DSH 客户端插件并需要调用系统通知、菜单注册和文件选择接口的开发者。
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh desktop capabilities
The plugin provides ctx.desktop to client plugins. Register a stable menu
item id and keep the disposer with the registering plugin:
Declare @maimorylab/dsh-desktop in dsh.client.inject and export
const inject = ['desktop'] from the consuming client plugin.
const dispose = ctx.desktop.menu.register({
id: 'my-plugin.settings',
label: 'Settings',
parent: 'help',
order: 10,
onSelect: () => openSettings(),
})
Other host capabilities use the same service:
await ctx.desktop.notify({ title: 'Done', body: 'The task finished.' })
const files = await ctx.desktop.files.choose({ multiple: true })
const offDrop = ctx.desktop.files.onDrop(paths => console.log(paths))
await ctx.desktop.openExternal('https://example.com')
await ctx.desktop.tray.set({ tooltip: 'DeepSeek Harness' })
The tray is one process-global icon; plugins should coordinate ownership of
set/clear calls.
Use ctx.desktop.supported(name) before optional work. The current capability
names are menu, files.drop, files.choose, external.open, notification,
and tray; ctx.desktop.capabilities exposes the same list for discovery.
The service does not emulate absent capabilities; calls to missing bridges
reject instead of silently doing nothing. Linux exposes menu and drag-and-drop;
external.open is added when xdg-open exists, and notification when
notify-send exists.
File selection and tray are intentionally omitted because GTK4 has no portable
implementation here.
The Windows and macOS launchers render native menus. The Linux launcher renders the same contributions in a GTK/WebKit menu bar because Linux desktop shells choose different locations for application menus.