fix(cli): allow null path in screenshot command validation (#101)
The Rust CLI sends `null` for the `path` argument when it is not provided, but the Zod schema only accepted `undefined`. This change updates the `screenshotSchema` to allow `null` values for `path`, enabling the `screenshot` command to work without a file path argument (outputting to stdout). Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
parent
7aad47d3bd
commit
e7c4936bc7
+1
-1
@@ -670,7 +670,7 @@ const pressSchema = baseCommandSchema.extend({
|
||||
|
||||
const screenshotSchema = baseCommandSchema.extend({
|
||||
action: z.literal('screenshot'),
|
||||
path: z.string().optional(),
|
||||
path: z.string().nullable().optional(),
|
||||
fullPage: z.boolean().optional(),
|
||||
selector: z.string().min(1).optional(),
|
||||
format: z.enum(['png', 'jpeg']).optional(),
|
||||
|
||||
Reference in New Issue
Block a user