fixes scroll action

This commit is contained in:
rafaelmmiller 2024-11-08 17:40:45 -03:00
parent 085ac3e71c
commit eac3714c12
2 changed files with 4 additions and 2 deletions

View File

@ -88,7 +88,8 @@ export const actionsSchema = z.array(z.union([
}),
z.object({
type: z.literal("scroll"),
direction: z.enum(["up", "down"]),
direction: z.enum(["up", "down"]).optional().default("down"),
selector: z.string().optional(),
}),
z.object({
type: z.literal("scrape"),

View File

@ -30,7 +30,8 @@ export type Action = {
key: string,
} | {
type: "scroll",
direction: "up" | "down"
direction?: "up" | "down",
selector?: string,
} | {
type: "scrape",
}