Open
Conversation
--open-url short-circuits both the first-launch path and the second-instance path, preventing --folder-uri from being processed. This resulted in a blank window with no workspace. Replace --open-url with a new --open-chat-session <uri> CLI arg that flows through the normal window opening pipeline. After the folder is opened, windowsMainService forwards the session via IPC.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the Agents “Open in VS Code” action to avoid --open-url (which bypasses normal window opening and can drop --folder-uri), by introducing a new CLI flag that opens the target folder first and then forwards the chat session to the opened window via IPC.
Changes:
- Replace
--open-urlusage with--open-chat-session <uri>when launching the sibling VS Code app. - Add
--open-chat-sessionto native CLI argument parsing/types. - Forward
--open-chat-sessionto the opened window inWindowsMainServiceviavscode:openChatSessionIPC.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/sessions/contrib/chat/electron-browser/openInVSCode.contribution.ts | Switches Agents “Open in VS Code” to pass --open-chat-session instead of --open-url. |
| src/vs/platform/windows/electron-main/windowsMainService.ts | Adds handling to send the session URI to the opened window via IPC. |
| src/vs/platform/environment/node/argv.ts | Registers new CLI option open-chat-session (string). |
| src/vs/platform/environment/common/argv.ts | Extends NativeParsedArgs with open-chat-session. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--open-urlshort-circuits both the first-launch path and the second-instance path, preventing--folder-urifrom being processed. This resulted in a blank window with no workspace.Replace
--open-urlwith a new--open-chat-session <uri>that flows through the normal window opening pipeline. After the folder is opened, windowsMainService forwards the session via IPC.