Restructure GUI folder & modify styles.css

This commit is contained in:
2024-03-09 16:19:47 -05:00
parent bdf5715868
commit ee6f775b5b
8 changed files with 32 additions and 11 deletions

7
gui/js/preload.js Normal file
View File

@@ -0,0 +1,7 @@
const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('electronAPI', {
sendPrompt: (prompt, model) => ipcRenderer.invoke('send-prompt', { prompt, model }),
onApiKeySaved: (callback) => ipcRenderer.on('api-key-saved', callback),
abortPrompt: () => ipcRenderer.send('abort-prompt')
});