Add function to alert user if their API key isnt set and open a popup for user to enter their key

This commit is contained in:
2024-03-09 02:42:30 -05:00
parent 61cf0bd49e
commit 97402a8b1f
5 changed files with 76 additions and 6 deletions

View File

@@ -3,3 +3,7 @@ const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('electronAPI', {
sendPrompt: (prompt) => ipcRenderer.invoke('send-prompt', prompt),
});
contextBridge.exposeInMainWorld('api', {
submitApiKey: (apiKey) => ipcRenderer.send('submit-api-key', apiKey)
});