Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): 恢复侧栏插件停用桥

DavidShen8753e134a951
diff --git a/apps/desktop/src/main/right-sidebar-window/__tests__/preload-contract.test.ts b/apps/desktop/src/main/right-sidebar-window/__tests__/preload-contract.test.ts
index 4cc55354b2..23ea747454 100644
--- a/apps/desktop/src/main/right-sidebar-window/__tests__/preload-contract.test.ts
+++ b/apps/desktop/src/main/right-sidebar-window/__tests__/preload-contract.test.ts
@@ -203,11 +203,10 @@ describe('sidebarWindowPreload 椤跺眰濂戠害', () => {
'claim', 'setBounds', 'command', 'close', 'onEvent',
]));
expect(ghostKeys).toEqual(expect.arrayContaining([
- 'listSync', 'reload', 'resolvePanelMedia', 'runtimeStates',
+ 'listSync', 'reload', 'setEnabled', 'resolvePanelMedia', 'runtimeStates',
'onChanged', 'onRuntimeChanged', 'onPreviewMedia',
'unreadSync', 'clearUnread', 'onBadge', 'onUnreadSnapshot',
]));
- expect(ghostKeys).not.toEqual(expect.arrayContaining(['setEnabled']));
});
it('涓嶆毚闇?maker / agent / voice / login 鑷不鑳藉姏', () => {
diff --git a/apps/desktop/src/preload/sidebarWindowPreload.ts b/apps/desktop/src/preload/sidebarWindowPreload.ts
index 70795e6ae5..3dbbc0cabe 100644
--- a/apps/desktop/src/preload/sidebarWindowPreload.ts
+++ b/apps/desktop/src/preload/sidebarWindowPreload.ts
@@ -257,6 +257,8 @@ contextBridge.exposeInMainWorld('electronAPI', {
ghosts: {
listSync: (): { ghosts: unknown[] } => ipcRenderer.sendSync('ghosts:list'),
reload: (id: string): Promise<{ state: string }> => ipcRenderer.invoke('ghosts:reload', id),
+ setEnabled: (id: string, enabled: boolean): Promise<{ ok: true }> =>
+ ipcRenderer.invoke('ghosts:set-enabled', id, enabled),
resolvePanelMedia: (
uri: string,
purpose?: 'attach' | 'menu',