// main/ipc/system.js const { ipcMain, dialog } = require('electron') function registerSystemIpc() { ipcMain.removeHandler('manual-gc') ipcMain.handle('manual-gc', () => { if (global.gc) { global.gc() console.log('🧹 手动触发 GC 成功') } else { console.warn('⚠️ global.gc 不存在,请确认 --expose-gc') } }) // 你也可以把 select-file 放这里(如果不想放 window.js) } module.exports = { registerSystemIpc }