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,12 @@
const sessions = new WeakMap();
export async function nativeRequest(page, command, args = {}) {
const invoke = (name, value) => page.evaluate(({ name, value }) => window.__TAURI_INTERNALS__.invoke(name, value), { name, value });
if (command === 'browser_request') {
let session = sessions.get(page);
if (!session) { session = await invoke('browser_connect', {}); sessions.set(page, session); }
return invoke(command, { ...args, session });
}
if (command === 'browser_stop') sessions.delete(page);
return invoke(command, args);
}