-
Notifications
You must be signed in to change notification settings - Fork 340
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
feat: browser_resize #92
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR introduces a new "browser_resize" tool to resize the browser window in both desktop and mobile formats, addressing issue #5.
- Added a new test for "browser_resize" in tests/basic.spec.ts
- Implemented the "browser_resize" tool logic in src/tools/common.ts
- Integrated the new tool into the main tool arrays in src/index.ts
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
tests/basic.spec.ts | Adds tests to validate the browser_resize functionality in both desktop and mobile formats. |
src/tools/common.ts | Implements the resize tool with input validation and processing logic. |
src/index.ts | Updates the tool arrays to include the browser_resize tool. |
@@ -174,3 +174,28 @@ export const chooseFile: ToolFactory = snapshot => ({ | |||
}, snapshot); | |||
}, | |||
}); | |||
|
|||
const resizeSchema = z.object({ |
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.
Let them specify pixels? We should be careful about exposing it as it is niche and unclear how it is going to be used. Original request wanted it for responsive design where 800 vs 1024 vs 1280 could result in different media query matches...
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.
done in 5699c17. was originally concerned that the LLM wouldn't use good values, but it worked well in some tests.
Sorry you need a rebase |
Co-authored-by: Copilot <[email protected]>
Done! |
Closes #5