-
Notifications
You must be signed in to change notification settings - Fork 37.5k
Support multi window scenarios in vscode mcp server #289250
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
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 adds multi-window support to the VS Code MCP (Model Context Protocol) server by introducing window management tools and enhancing the PlaywrightDriver to handle multiple windows/pages.
Changes:
- Added window management tools for listing, switching between, and interacting with multiple VS Code windows
- Modified PlaywrightDriver to support dynamic window switching by making the current page mutable
- Enhanced automation capabilities with window-specific operations (screenshots, accessibility snapshots, clicks, typing, etc.)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/mcp/src/automationTools/windows.ts | New file introducing 10 window management tools including list, switch, screenshot, snapshot, click, type, evaluate, locator info, and wait operations |
| test/mcp/src/automationTools/index.ts | Integrates and exports the new window management tools |
| test/automation/src/playwrightDriver.ts | Refactors page field to support window switching; adds 8 new methods for multi-window operations including getAllWindows, switchToWindow, getWindowsInfo, screenshotBuffer, and element interaction helpers |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
…89261) * Initial plan * Address code review feedback: improve URL matching and CDP session handling - Improve URL matching in switchToWindow to prefer exact matches before substring matches - Clear CDP session when switching windows to prevent using stale sessions - Add comprehensive documentation explaining the matching strategy and CDP session behavior Co-authored-by: rebornix <876920+rebornix@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rebornix <876920+rebornix@users.noreply.github.com>
No description provided.