2024-03-09 02:15:01 -05:00
|
|
|
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
|
|
|
|
contextBridge.exposeInMainWorld('electronAPI', {
|
2024-03-09 05:43:40 -05:00
|
|
|
sendPrompt: (prompt, model) => ipcRenderer.invoke('send-prompt', { prompt, model }),
|
2024-03-09 02:52:10 -05:00
|
|
|
onApiKeySaved: (callback) => ipcRenderer.on('api-key-saved', callback),
|
2024-03-09 05:43:40 -05:00
|
|
|
});
|