Improve IK-style artifact scanner pipeline
This commit is contained in:
@@ -22,6 +22,7 @@ import type {
|
||||
RuntimeInfo,
|
||||
SaveResultWithPath,
|
||||
ScrollResult,
|
||||
KeyPressResult,
|
||||
AutomationGuard,
|
||||
ClickResult,
|
||||
ReviewSampleListResult,
|
||||
@@ -111,6 +112,10 @@ function emptyScrollResult(): ScrollResult {
|
||||
return { ok: false, notchesSent: 0, inputBlocked: false };
|
||||
}
|
||||
|
||||
function emptyKeyPressResult(key = ""): KeyPressResult {
|
||||
return { ok: false, key, inputBlocked: false, eventsSent: 0 };
|
||||
}
|
||||
|
||||
function emptyBooleanResult(): BooleanResult {
|
||||
return { ok: false };
|
||||
}
|
||||
@@ -203,6 +208,7 @@ export function createRendererRepositories(): RendererRepositories | null {
|
||||
clickScreen: (x, y) => createBridgeSafeCall(() => bridge.clickScreen(x, y), emptyClickResult()),
|
||||
scrollScreen: (notches, anchorX, anchorY) =>
|
||||
createBridgeSafeCall(() => bridge.scrollScreen(notches, anchorX, anchorY), emptyScrollResult()),
|
||||
keyPress: (key) => createBridgeSafeCall(() => bridge.keyPress(key), emptyKeyPressResult(key)),
|
||||
onCommand: bridge.onScannerCommand,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user