fix: 补齐 desktop 拾取 IPC 注册与 import

This commit is contained in:
yu 2026-10-29 16:45:06 +08:00
parent c2b09f39e6
commit f353254a86

View File

@ -9,6 +9,7 @@ import { capabilityCount, capabilityIds } from "./engine/registry";
import { closeBrowserSession, startRun, stopRun } from "./run/manager";
import { fixtureUrl, startFixtureServer, stopFixtureServer } from "./fixture/server";
import { loadSettings, updateSettings } from "./settings";
import { pickDesktopElement, listVisibleWindows, pickScreenRegion } from "./desktop-pick";
import { logMain } from "./logger";
let mainWindow: BrowserWindow | null = null;
@ -112,6 +113,9 @@ function registerIpc(): void {
}
return session.pickElement();
});
ipcMain.handle("desktop:pick-element", () => pickDesktopElement());
ipcMain.handle("desktop:pick-window-list", () => listVisibleWindows());
ipcMain.handle("desktop:pick-region", () => pickScreenRegion());
ipcMain.handle("flows:list", () => listFlows());
ipcMain.handle("flows:create", (_event, name?: string) => {
const flow = createFlow(name);