Skip to content

Commit 41d6ad4

Browse files
committed
Added validation per coderabbit recommendation
1 parent f815c14 commit 41d6ad4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

apps/web/client/src/server/api/routers/code.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const utilsRouter = createTRPCRouter({
4747
onlyMainContent: z.boolean().default(true),
4848
includeTags: z.array(z.string()).optional(),
4949
excludeTags: z.array(z.string()).optional(),
50-
waitFor: z.number().optional(),
50+
waitFor: z.number().min(0).optional(),
5151
}))
5252
.mutation(async ({ input }): Promise<{ result: string | null, error: string | null }> => {
5353
try {

packages/ai/src/tools/classes/scrape-url.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export class ScrapeUrlTool extends ClientTool {
2828
.describe('Array of HTML tags to exclude from the scraped content.'),
2929
waitFor: z
3030
.number()
31+
.min(0)
3132
.optional()
3233
.describe('Time in milliseconds to wait for the page to load before scraping.'),
3334
});

0 commit comments

Comments
 (0)