Improve check error performance by off-loading to worker thread w/ incremental compilation (#575)

This commit is contained in:
Will Chen
2025-07-07 12:47:33 -07:00
committed by GitHub
parent 97b5c29f11
commit bc38f9b2d7
22 changed files with 695 additions and 396 deletions

View File

@@ -1,4 +1,6 @@
import { ipcMain, session } from "electron";
import fs from "node:fs/promises";
import { getTypeScriptCachePath } from "@/paths/paths";
export const registerSessionHandlers = () => {
ipcMain.handle("clear-session-data", async (_event) => {
@@ -8,5 +10,12 @@ export const registerSessionHandlers = () => {
storages: ["cookies", "localstorage"],
});
console.info(`[IPC] All session data cleared for default session`);
// Clear custom cache data (like tsbuildinfo)
try {
await fs.rm(getTypeScriptCachePath(), { recursive: true, force: true });
} catch {
// Directory might not exist
}
});
};