Open script service URLs in-app or external

Adds a Service URLs setting (ask / in-Paseo / external browser) that
controls where URLs from running scripts open on desktop. First click
prompts with a "don't ask again" checkbox; in-Paseo opens a workspace
browser tab. Closing a browser tab now clears its session partition.
This commit is contained in:
Mohamed Boudra
2026-05-03 15:14:28 +07:00
parent 02adadbbc8
commit f58cfe9008
12 changed files with 257 additions and 18 deletions
+9 -1
View File
@@ -9,7 +9,7 @@ import path from "node:path";
import { pathToFileURL } from "node:url";
import { existsSync } from "node:fs";
import { execFileSync } from "node:child_process";
import { app, BrowserWindow, ipcMain, nativeImage, net, protocol } from "electron";
import { app, BrowserWindow, ipcMain, nativeImage, net, protocol, session } from "electron";
import { createDaemonCommandHandlers, registerDaemonManager } from "./daemon/daemon-manager.js";
import {
parseCliPassthroughArgsFromArgv,
@@ -219,6 +219,14 @@ ipcMain.handle("paseo:browser:set-active-pane", (_event, browserId: unknown) =>
setActivePaseoBrowserPaneId(typeof browserId === "string" ? browserId : null);
});
ipcMain.handle("paseo:browser:clear-partition", async (_event, browserId: unknown) => {
if (typeof browserId !== "string" || browserId.trim().length === 0) {
return;
}
const partition = `persist:paseo-browser-${browserId}`;
await session.fromPartition(partition).clearStorageData();
});
protocol.registerSchemesAsPrivileged([
{ scheme: APP_SCHEME, privileges: { standard: true, secure: true, supportFetchAPI: true } },
]);