feat(extension): add bsk hover and adjust vom to support

This commit is contained in:
Ljy-0827
2026-08-06 12:19:45 +08:00
parent 0f264c5df1
commit 91225e5fdb
31 changed files with 1051 additions and 47 deletions
+25
View File
@@ -410,6 +410,25 @@ export interface ClickResult {
dialogs?: JavaScriptDialogInfo[];
}
export interface HoverParams {
session_id: string;
ref?: string;
selector?: string;
tab_id?: number;
modifiers?: KeyModifier[];
settle_ms?: number;
timeout_ms?: number;
}
export interface HoverResult {
tab_id: number;
used_ref?: string;
used_selector?: string;
x: number;
y: number;
dialogs?: JavaScriptDialogInfo[];
}
export interface FillParams {
session_id: string;
value: string;
@@ -668,6 +687,11 @@ export type DraftTraceStep =
navigated_to?: string;
page_url?: string;
}
| {
op: "hover";
target: TargetDescriptor;
page_url?: string;
}
| {
op: "fill";
target: TargetDescriptor;
@@ -701,6 +725,7 @@ export type DraftTraceStep =
export type Step =
| ({ op: "navigate" } & StepCommon & { to: string })
| ({ op: "click" } & StepCommon & { target: TargetDescriptor })
| ({ op: "hover" } & StepCommon & { target: TargetDescriptor })
| ({ op: "fill" } & StepCommon & {
target: TargetDescriptor;
value: string;