Open a single chat editor for the right contribution#279449
Merged
DonJayamanne merged 1 commit intomainfrom Nov 25, 2025
Merged
Open a single chat editor for the right contribution#279449DonJayamanne merged 1 commit intomainfrom
DonJayamanne merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #279446 by refactoring how remote agent jobs are created from the editor. Instead of manually creating a chat session and sending a request, the code now leverages the existing command infrastructure to open a new chat session editor for the appropriate contribution type, with the prompt and attached context passed as parameters.
Key Changes
- Modified the
OpenNewChatSessionEditorActionto accept optionalchatOptionsparameter containing a prompt and attached context - Refactored
CreateRemoteAgentJobFromEditorActionto usecommandService.executeCommandinstead of manually orchestrating session creation and request sending - This change ensures a single chat editor is opened for the right contribution type with the proper context
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/chatSessions.contribution.ts | Extended the OpenNewChatSessionEditorAction.run method to accept optional chat options (prompt and attachedContext) and send a request if provided |
| src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.ts | Refactored CreateRemoteAgentJobFromEditorAction to use command service instead of manually creating sessions, eliminating duplicate code and unused variables |
dmitrivMS
approved these changes
Nov 25, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #279446
@joshspicer /cc