Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fixes scroll action

rafaelmmillereac3714c12ed
diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts
index 82b24c222..9b112a58c 100644
--- a/apps/api/src/controllers/v1/types.ts
+++ b/apps/api/src/controllers/v1/types.ts
@@ -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"),
diff --git a/apps/api/src/lib/entities.ts b/apps/api/src/lib/entities.ts
index 9b68f4256..435cf2b8c 100644
--- a/apps/api/src/lib/entities.ts
+++ b/apps/api/src/lib/entities.ts
@@ -30,7 +30,8 @@ export type Action = {
key: string,
} | {
type: "scroll",
- direction: "up" | "down"
+ direction?: "up" | "down",
+ selector?: string,
} | {
type: "scrape",
}