agentHost: add draft PR Agent Merge operation - #333964
Open
Benjamin Christopher Simmonds (benibenj) wants to merge 8 commits into
Open
agentHost: add draft PR Agent Merge operation#333964Benjamin Christopher Simmonds (benibenj) wants to merge 8 commits into
Benjamin Christopher Simmonds (benibenj) wants to merge 8 commits into
Conversation
Add a combined operation that creates a draft pull request and enables Agent Merge while keeping draft PRs ineligible for automatic merging. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Benjamin Christopher Simmonds (benibenj)
September 2, 2026 10:09
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation is consistent with existing flows and has focused coverage for the new draft behavior.
Review tier: Balanced
Findings: None
What changed in this PR
Adds a draft PR creation option that enables Agent Merge while preventing automatic draft merging.
Changes:
- Registers and advertises the new draft Agent Merge operation.
- Preserves Agent Merge configuration and reports draft creation accurately.
- Tests draft repair behavior, creation, labels, and operation ordering.
| File | Description |
|---|---|
src/vs/platform/agentHost/node/agentHostPullRequestOperationHandler.ts |
Defines and reports the draft Agent Merge operation. |
src/vs/platform/agentHost/node/agentHostPullRequestOperationProvider.ts |
Registers and exposes the new operation. |
src/vs/platform/agentHost/test/common/agentMerge.test.ts |
Verifies drafts are repaired but not merged. |
src/vs/platform/agentHost/test/node/agentHostPullRequestOperationHandler.test.ts |
Tests draft creation and Agent Merge enablement. |
src/vs/platform/agentHost/test/node/agentHostPullRequestOperationProvider.test.ts |
Tests labels and advertised operation order. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Ulugbek Abdullaev (ulugbekna)
previously approved these changes
Sep 2, 2026
Keep the running Agent Merge action primary while draft pull request CI or review comments remain unsettled, then restore Mark Ready once both are clear. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Advertise a separate Mark Ready operation while Agent Merge owns the primary button, and switch to the normal Mark Ready operation only after required checks and actionable review feedback are clear. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use branch-matched session GitHub metadata when Agent Merge first captures its target so the enablement notice immediately reflects an existing pull request without delaying the feedback watermark. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Post a host-owned, user-only system notification with the pull request link after Agent Merge successfully merges it, using a dedicated Agent Merge completion kind and icon. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Screenshot ChangesBase: Changed (12)2 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details. Added (6)Removed (2) |
Hide response footer actions for Agent Merge system notifications and render their completion time inline on hover or keyboard focus. Add full-chat fixtures for the enablement, repair, response, and merged-notice flow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align inline Agent Merge timestamps to the notification's last text baseline and place them at the chat row's right edge, matching response footer timing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace on, off, and turned-off terminology in Agent Merge transcript notices with enabled and disabled wording, including automatic merge demotion guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Benjamin Christopher Simmonds (benibenj)
marked this pull request as draft
September 2, 2026 14:45
Benjamin Christopher Simmonds (benibenj)
marked this pull request as ready for review
September 2, 2026 14:52
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.
Summary
pr-mark-ready-with-agent-mergeoperation, also labeled Mark Ready, while Agent Merge owns the running primary buttonTesting
npm run transpile-clientnpm run typecheck-clientnpm run eslint -- <changed TypeScript files>npm run stylelint -- src\vs\workbench\contrib\chat\browser\widget\media\chat.css src\vs\workbench\contrib\chat\browser\widget\chatContentParts\media\chatSystemNotificationContentPart.cssscripts\test.bat src\vs\platform\agentHost\test\common\agentMerge.test.ts src\vs\platform\agentHost\test\node\agentHostPullRequestOperationHandler.test.ts src\vs\platform\agentHost\test\node\agentHostPullRequestOperationProvider.test.ts(42 passing)scripts\test.bat src\vs\platform\agentHost\test\common\agentMerge.test.ts src\vs\platform\agentHost\test\node\agentHostPullRequestStatusService.test.ts src\vs\platform\agentHost\test\node\agentHostPullRequestOperationProvider.test.ts src\vs\platform\agentHost\test\node\agentHostPullRequestLifecycleOperationHandler.test.ts src\vs\sessions\contrib\providers\agentHost\test\browser\agentMergeActions.test.ts(50 passing)scripts\test.bat src\vs\platform\agentHost\test\node\agentMergeController.test.ts(16 passing)scripts\test.bat src\vs\platform\agentHost\test\common\agentMerge.test.ts src\vs\platform\agentHost\test\node\agentMergeController.test.ts src\vs\workbench\contrib\chat\test\browser\agentSessions\stateToProgressAdapter.test.ts(182 passing)scripts\test.bat src\vs\workbench\contrib\chat\test\browser\agentSessions\stateToProgressAdapter.test.ts src\vs\workbench\contrib\chat\test\browser\widget\chatContentParts\chatSystemNotificationContentPart.test.ts src\vs\workbench\contrib\chat\test\browser\widget\chatListRenderer.test.ts(194 passing, 1 pending)