Update the browser, editor, settings, and installer

This commit is contained in:
Knotty Wyvern
2026-10-12 14:46:21 -07:00
parent 909894b9c8
commit f6eaa52949
163 changed files with 146260 additions and 534 deletions
@@ -0,0 +1,24 @@
// This IPC adapter exists only for the browser UI smoke test.
import { app } from 'electron';
import { createEngine } from '../src/engine.mjs';
app.enableSandbox();
app.setPath('userData', process.env.RS_INTERACTION_ROOT);
app.on('window-all-closed', () => {});
app.whenReady().then(async () => {
let framePending = false;
const engine = await createEngine({ directory: process.env.RS_INTERACTION_ROOT, canEmitFrame: () => !framePending, emit: value => {
if (value.event === 'frame') framePending = true;
process.send?.({ event: value }, () => { if (value.event === 'frame') framePending = false; });
} });
process.on('message', async ({ id, command, args }) => {
try {
let result;
if (command === 'testEvaluate') result = await engine.tabs.get(args.tabId).view.webContents.executeJavaScript(args.code);
else if (command === 'shutdown') { await engine.shutdown(); process.send?.({ id, result: null }); app.exit(0); return; }
else result = await engine.command(command, args);
process.send?.({ id, result });
} catch (error) { process.send?.({ id, error: String(error) }); }
});
process.on('disconnect', () => { void engine.shutdown().finally(() => app.exit(0)); });
process.send?.({ ready: true });
});