返回 DeepSeek-Reasonix
submission-native-electron.cjs
根目录 / desktop / frontend / bench / submission-native-electron.cjs
1 const { app, BrowserWindow } = require("electron");
2 const path = require("node:path");
3
4 if (process.platform !== "linux" || !process.env.DISPLAY) throw new Error("Requires isolated Linux/Xvfb");
5 app.setPath("userData", path.join(__dirname, "electron-profile"));
6 app.whenReady().then(async () => {
7 const window = new BrowserWindow({
8 show: true, frame: false, x: 0, y: 0, width: 1280, height: 900, useContentSize: true,
9 title: "Reasonix Handoff Native",
10 webPreferences: { sandbox: true, contextIsolation: true, nodeIntegration: false, backgroundThrottling: false },
11 });
12 window.on("page-title-updated", event => event.preventDefault());
13 await window.loadURL(process.env.REASONIX_LAYOUT_URL);
14 });
15 app.on("window-all-closed", () => app.quit());
16
16 lines Plain Text