Add the debug packet window to the Electron main process.

This commit is contained in:
2026-11-01 09:01:45 +11:00
parent 54c4cf4386
commit 121244e97b
3 changed files with 179 additions and 0 deletions
+11
View File
@@ -185,6 +185,17 @@ contextBridge.exposeInMainWorld('electron', {
}
},
// Debug packet recorder
debug: {
openWindow: () => ipcRenderer.invoke('debug:open-window'),
send: (packet) => ipcRenderer.send('debug:packet', packet),
onPacket: (callback) => {
const handler = (_, data) => callback(data);
ipcRenderer.on('debug:packet', handler);
return () => ipcRenderer.removeListener('debug:packet', handler);
}
},
// Plugin management
plugins: {
getPath: () => ipcRenderer.invoke('plugin:get-path'),