feat: scaffold electron orchestrator foundation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot CLI
2026-03-21 09:27:28 +01:00
co-authored by Copilot
parent 1ed3d3f652
commit 9e509593d6
46 changed files with 3870 additions and 13 deletions
+33
View File
@@ -0,0 +1,33 @@
import { BrowserWindow, shell } from 'electron';
import { join } from 'node:path';
export function createMainWindow(): BrowserWindow {
const window = new BrowserWindow({
width: 1440,
height: 960,
minWidth: 1120,
minHeight: 720,
title: 'kopaya',
backgroundColor: '#0f172a',
webPreferences: {
preload: join(__dirname, '../preload/index.js'),
contextIsolation: true,
nodeIntegration: false,
},
});
const rendererUrl = process.env.ELECTRON_RENDERER_URL;
if (rendererUrl) {
void window.loadURL(rendererUrl);
} else {
void window.loadFile(join(__dirname, '../../dist/renderer/index.html'));
}
window.webContents.setWindowOpenHandler(({ url }) => {
void shell.openExternal(url);
return { action: 'deny' };
});
return window;
}