perf: optimize app startup and background lifecycles

This commit is contained in:
inman
2026-08-19 00:56:15 +08:00
parent 31332f6d76
commit 927e13349b
121 changed files with 4359 additions and 1400 deletions

View File

@@ -4,13 +4,14 @@
* for non-Electron test environments.
*/
import { net } from 'electron';
export async function proxyAwareFetch(
input: string | URL,
init?: RequestInit
): Promise<Response> {
if (process.versions.electron) {
try {
const { net } = await import('electron');
return await net.fetch(input, init);
} catch {
// Fall through to the global fetch.