feat: 实现 OpenCode 页面生命周期管理 XCOpenCodeWeb.exe

- 新增 electron/services/xcOpenCodeWebService.ts 服务管理模块
- 标签页打开时启动 XCOpenCodeWeb.exe,关闭时停止
- 使用 iframe 在 OpenCode 页面显示 Web 服务 (端口 3002)
- 添加 bin 目录打包配置
- 添加 TypeScript 类型定义
This commit is contained in:
2026-03-13 20:55:34 +08:00
parent 53c1045406
commit 72d79ae214
7 changed files with 236 additions and 6 deletions

View File

@@ -41,4 +41,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
ipcRenderer.invoke('remote-download-file', id, serverHost, port, fileName, remotePath, localPath, password),
opencodeStartServer: () => ipcRenderer.invoke('opencode-start-server'),
opencodeStopServer: () => ipcRenderer.invoke('opencode-stop-server'),
xcOpenCodeWebStart: () => ipcRenderer.invoke('xc-opencode-web-start'),
xcOpenCodeWebStop: () => ipcRenderer.invoke('xc-opencode-web-stop'),
xcOpenCodeWebGetStatus: () => ipcRenderer.invoke('xc-opencode-web-get-status'),
})