Skip to content

Conversation

@rebornix
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings January 20, 2026 23:26
@rebornix rebornix self-assigned this Jan 20, 2026
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 20, 2026
Copy link
Contributor

Copilot AI left a 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>
@rebornix
Copy link
Member Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Jan 20, 2026

@rebornix I've opened a new pull request, #289261, to work on those changes. Once the pull request is ready, I'll request review from you.

@TylerLeonhardt TylerLeonhardt self-requested a review January 21, 2026 00:12
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants