first commit
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// Secure bridge between the sandboxed renderer and the main process.
|
||||
const { contextBridge, ipcRenderer } = require('electron');
|
||||
|
||||
contextBridge.exposeInMainWorld('agent', {
|
||||
onConfig: (cb) => ipcRenderer.on('config', (_e, cfg) => cb(cfg)),
|
||||
injectInput: (evt) => ipcRenderer.send('inject-input', evt),
|
||||
sessionEnded: () => ipcRenderer.send('session-ended'),
|
||||
getPrimarySize: () => ipcRenderer.invoke('get-primary-size'),
|
||||
});
|
||||
Reference in New Issue
Block a user