minor update

This commit is contained in:
Wendong-Fan 2025-11-21 18:29:23 +08:00
parent 64428ac77d
commit cbe9aa336d
2 changed files with 1 additions and 2 deletions

View file

@ -44,11 +44,9 @@ contextBridge.exposeInMainWorld('electronAPI', {
const channel = 'webview-navigated'
const listener = (event: any, id: string, url: string) => callback(id, url);
ipcRenderer.on(channel, listener);
console.log(`[preload] add ${channel}; count=${ipcRenderer.listenerCount(channel)}`)
// Return cleanup function to remove listener
return () => {
ipcRenderer.off(channel, listener);
console.log(`[preload] remove ${channel}; count=${ipcRenderer.listenerCount(channel)}`)
};
},
showWebview: (id: string) => ipcRenderer.invoke('show-webview', id),

View file

@ -209,6 +209,7 @@ export function WorkSpaceMenu() {
}, [
chatStore.activeTaskId,
chatStore.tasks[chatStore.activeTaskId as string]?.webViewUrls,
chatStore.tasks[chatStore.activeTaskId as string]?.taskAssigning,
]);
const agentMap = {