DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
fix(dsh-tauri-ui): 收紧 dshImClient 探测并恢复原设置页可见性
hairyf1428ca7ce7ba
diff --git a/packages/dsh-tauri-ui/src/client/register/im-panel.tsx b/packages/dsh-tauri-ui/src/client/register/im-panel.tsxindex 7f3ffea3..e31fec74 100644--- a/packages/dsh-tauri-ui/src/client/register/im-panel.tsx+++ b/packages/dsh-tauri-ui/src/client/register/im-panel.tsx@@ -32,10 +32,12 @@ export const registerImPanel = defineRegister<ClientContext>((_controller, ctx)icon: props => <Icon as={Comments} size={props.size} />,render: () => <ImPanel render={() => im.render()} />,})+ // 撤下重复入口前记住原状态:退出时恢复到「我们发现它时」的样子。+ const restoreSettings = im.settingsVisible()im.setSettingsVisible(false)return () => {- im.setSettingsVisible(true)+ im.setSettingsVisible(restoreSettings)panel.dispose()}})diff --git a/packages/dsh-tauri-ui/src/client/service/dsh-im.test.ts b/packages/dsh-tauri-ui/src/client/service/dsh-im.test.tsindex df435844..16cc0c56 100644--- a/packages/dsh-tauri-ui/src/client/service/dsh-im.test.ts+++ b/packages/dsh-tauri-ui/src/client/service/dsh-im.test.ts@@ -31,6 +31,11 @@ describe('readDshImClient', () => {expect(readDshImClient(ctx)).toBeUndefined()})+ it('rejects a partial face missing the visibility switch', () => {+ expect(readDshImClient(contextReflecting(() => ({ ...VALID, setSettingsVisible: undefined })))).toBeUndefined()+ expect(readDshImClient(contextReflecting(() => ({ ...VALID, settingsVisible: undefined })))).toBeUndefined()+ })+it('treats an absent service and a throwing registry as unavailable', () => {expect(readDshImClient(contextReflecting(() => undefined))).toBeUndefined()expect(readDshImClient(contextReflecting(() => {diff --git a/packages/dsh-tauri-ui/src/client/service/dsh-im.ts b/packages/dsh-tauri-ui/src/client/service/dsh-im.tsindex 157e9387..aae3d6fd 100644--- a/packages/dsh-tauri-ui/src/client/service/dsh-im.ts+++ b/packages/dsh-tauri-ui/src/client/service/dsh-im.ts@@ -23,5 +23,9 @@ export function readDshImClient(ctx: ClientContext): DshImClient | undefined {if (service === null || service === undefined)return undefinedconst face = service as DshImClient- return face.version === 1 && typeof face.render === 'function' ? face : undefined+ const usable = face.version === 1+ && typeof face.render === 'function'+ && typeof face.setSettingsVisible === 'function'+ && typeof face.settingsVisible === 'function'+ return usable ? face : undefined}diff --git a/src-tauri/resources/preset-plugins.json b/src-tauri/resources/preset-plugins.jsonindex b47b78fd..2398c986 100644--- a/src-tauri/resources/preset-plugins.json+++ b/src-tauri/resources/preset-plugins.json@@ -28,7 +28,7 @@"id": "@xmanrui/dsh-im","spec": "@xmanrui/dsh-im","name": "DSH-IM",- "description": "Connect eleven IM channels (WeChat, Feishu, DingTalk, WeCom, QQ, Slack, Telegram, Discord, WhatsApp, iMessage) and a public AI Office to a local DeepSeek Harness, with bot management in the desktop sidebar.",+ "description": "Connect IM channels (WeChat, Feishu, DingTalk, WeCom, QQ, Slack, Telegram, Discord, WhatsApp, iMessage and more) plus a public AI Office to a local DeepSeek Harness, with bot management in the desktop sidebar.","repoUrl": "https://github.com/xmanrui/dsh-im","recommended": true}