feat: align GUI and CLI with WebUI - move GUI to cmd/gui/, add REPL+mgmt to waiter, enhance GUI features

This commit is contained in:
root
2026-07-16 20:28:56 +08:00
parent 09b79811a0
commit 951d31cca0
9 changed files with 38 additions and 2 deletions

11
cmd/gui/preload.js Normal file
View File

@ -0,0 +1,11 @@
const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('homeagent', {
connections: {
list: () => ipcRenderer.invoke('connections:list'),
add: (conn) => ipcRenderer.invoke('connections:add', conn),
update: (id, updates) => ipcRenderer.invoke('connections:update', { id, updates }),
delete: (id) => ipcRenderer.invoke('connections:delete', id),
setCurrent: (id) => ipcRenderer.invoke('connections:setCurrent', id),
},
});