feat: 退出应用时自动释放模型显存

This commit is contained in:
thzxx
2026-04-07 10:50:35 +08:00
parent 5cde0fab6e
commit 4e11bd549c
4 changed files with 15 additions and 0 deletions
+3
View File
@@ -33,6 +33,9 @@ contextBridge.exposeInMainWorld('metonaDesktop', {
onTrayAction: (callback: (action: string) => void) => {
ipcRenderer.on('tray-action', (_: unknown, action: string) => callback(action));
},
onAppQuit: (callback: () => void) => {
ipcRenderer.on('app-quit', () => callback());
},
removeAllListeners: (channel: string) => {
ipcRenderer.removeAllListeners(channel);
}