feat: 新增本地UI模型AI拾取与识别实验台
This commit is contained in:
1 parent
ee60435e2b
commit
e956ec9055
27 files changed
+1848
-525
No files matched your search
+7
-1
@@ -9,7 +9,9 @@ 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 { closeLocalVisionWorkers, defaultUiModelPath } from "./local-vision/ui-detect-service";
|
||||
import { pickDesktopElement, listVisibleWindows, pickScreenRegion } from "./desktop-pick";
|
||||
import { detectVisionLabTarget, listVisionLabSources } from "./vision-lab";
|
||||
import { logMain } from "./logger";
|
||||
|
||||
let mainWindow: BrowserWindow | null = null;
|
||||
@@ -113,9 +115,12 @@ function registerIpc(): void {
|
||||
}
|
||||
return session.pickElement();
|
||||
});
|
||||
ipcMain.handle("desktop:pick-element", (_event, options?: { ai?: boolean }) => pickDesktopElement(options));
|
||||
ipcMain.handle("desktop:pick-element", () => pickDesktopElement());
|
||||
ipcMain.handle("desktop:pick-window-list", () => listVisibleWindows());
|
||||
ipcMain.handle("desktop:pick-region", () => pickScreenRegion());
|
||||
ipcMain.handle("vision-lab:sources", () => listVisionLabSources());
|
||||
ipcMain.handle("vision-lab:detect", (_event, request: Parameters<typeof detectVisionLabTarget>[0]) => detectVisionLabTarget(request));
|
||||
ipcMain.handle("vision-lab:default-model", () => defaultUiModelPath());
|
||||
ipcMain.handle("flows:list", () => listFlows());
|
||||
ipcMain.handle("flows:create", (_event, name?: string) => {
|
||||
const flow = createFlow(name);
|
||||
@@ -212,6 +217,7 @@ if (!gotLock) {
|
||||
app.on("before-quit", () => {
|
||||
void closeBrowserSession();
|
||||
void stopFixtureServer();
|
||||
closeLocalVisionWorkers();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user