-
Notifications
You must be signed in to change notification settings - Fork 5k
chore(agent): expectURL #38812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(agent): expectURL #38812
Conversation
| if (!action.regex && !action.value) | ||
| throw new Error('Either url or regex must be provided'); | ||
| if (action.regex && action.value) | ||
| throw new Error('Only one of url or regex can be provided'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be expressed in zod schema somehow? union({ value }, { regex }) perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, but then it becomes incompatible with zod.discriminatedUnion. We'd have to use zod.union instead, which is more expensive to validate.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"24 failed 3 flaky34570 passed, 691 skipped Merge workflow run. |
Test results for "MCP"3 failed 2827 passed, 121 skipped Merge workflow run. |
No description provided.