refactor(home): 将首页改造成opencode服务入口页面

- 移除ChatGPT风格对话界面相关代码
- 添加在首页自动启动/停止opencode serve的IPC调用
- 首页使用webview加载opencode服务器界面
This commit is contained in:
2026-03-10 16:20:32 +08:00
parent de4c101b36
commit 2503d8be64
9 changed files with 123 additions and 286 deletions

View File

@@ -39,4 +39,6 @@ contextBridge.exposeInMainWorld('electronAPI', {
ipcRenderer.invoke('remote-upload-file', id, serverHost, port, filePath, remotePath, password),
remoteDownloadFile: (id: string, serverHost: string, port: number, fileName: string, remotePath: string, localPath: string, password?: string) =>
ipcRenderer.invoke('remote-download-file', id, serverHost, port, fileName, remotePath, localPath, password),
opencodeStartServer: () => ipcRenderer.invoke('opencode-start-server'),
opencodeStopServer: () => ipcRenderer.invoke('opencode-stop-server'),
})