Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: open in vscode action for agents app#312215

Open
deepak1556 wants to merge 1 commit intomainfrom
robo/fix_host_app_workspace_info
Open

fix: open in vscode action for agents app#312215
deepak1556 wants to merge 1 commit intomainfrom
robo/fix_host_app_workspace_info

Conversation

@deepak1556
Copy link
Copy Markdown
Collaborator

--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> that flows through the normal window opening pipeline. After the folder is opened, windowsMainService forwards the session via IPC.

--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.
@deepak1556 deepak1556 added this to the 1.118.0 milestone Apr 23, 2026
@deepak1556 deepak1556 self-assigned this Apr 23, 2026
Copilot AI review requested due to automatic review settings April 23, 2026 20:32
@deepak1556 deepak1556 changed the title fix: open in vscode actioon for agents app fix: open in vscode action for agents app Apr 23, 2026
Copy link
Copy Markdown
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

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-url usage with --open-chat-session <uri> when launching the sibling VS Code app.
  • Add --open-chat-session to native CLI argument parsing/types.
  • Forward --open-chat-session to the opened window in WindowsMainService via vscode:openChatSession IPC.

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.

Comment thread src/vs/platform/windows/electron-main/windowsMainService.ts
Comment thread src/vs/platform/windows/electron-main/windowsMainService.ts
@deepak1556 deepak1556 requested a review from bpasero April 23, 2026 21:30
@deepak1556 deepak1556 marked this pull request as ready for review April 23, 2026 21:30
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