Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Sessions window “apply” workflow by replacing per-file copy/delete with a git-merge based “apply changes to parent repo” action, and reorganizing related toolbar actions into a dedicated apply submenu.
Changes:
- Adds a new
ChatEditingSessionApplySubmenumenu and wires GitHub PR actions into it. - Replaces
Apply to Parent RepowithApply Changes to Parent Repothat merges the session worktree branch into the parent repository. - Extends the Git extension with internal commands used by the sessions window (
_git.revParseAbbrevRef,_git.mergeBranch,_git.applyPatch) and tweaks error hint extraction.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/services/actions/common/menusExtensionPoint.ts | Registers a new chat/input/editing/sessionApplyActions menu key for the apply-actions submenu. |
| src/vs/workbench/contrib/chat/browser/chatRepoInfo.ts | Exports generateUnifiedDiff (now part of module exports). |
| src/vs/sessions/sessions.desktop.main.ts | Switches sessions startup wiring to load the new apply-to-parent-repo implementation. |
| src/vs/sessions/contrib/changesView/browser/media/changesView.css | Adjusts toolbar button/dropdown flex styling for the new submenu UI. |
| src/vs/sessions/contrib/changesView/browser/changesView.ts | Updates toolbar button config now that apply/PR actions are reorganized. |
| src/vs/sessions/contrib/applyToParentRepo/browser/applyToParentRepo.contribution.ts | Removes the previous per-file apply implementation (copy/delete). |
| src/vs/sessions/contrib/applyCommitsToParentRepo/browser/applyChangesToParentRepo.ts | Adds new contribution/action that merges the session worktree branch into the parent repo and registers the apply submenu entry. |
| src/vs/platform/actions/common/actions.ts | Introduces MenuId.ChatEditingSessionApplySubmenu. |
| extensions/github/package.json | Moves GitHub PR actions from the old session toolbar menu to the new apply-actions submenu. |
| extensions/git/src/commands.ts | Adds internal git commands for merge/apply operations and adjusts default error hint parsing. |
Comments suppressed due to low confidence (2)
src/vs/sessions/contrib/applyCommitsToParentRepo/browser/applyChangesToParentRepo.ts:95
- The action precondition only checks
agentSessionHasWorktreeAndRepository. Since the implementation performs a git merge of the worktree branch, consider also gating onagentSessionHasAheadCommitsso the action isn’t offered when there are no commits to merge.
precondition: ContextKeyExpr.and(
IsSessionsWindowContext,
hasWorktreeAndRepositoryContextKey,
),
menu: [
src/vs/workbench/contrib/chat/browser/chatRepoInfo.ts:116
generateUnifiedDiffis now exported, but there are no imports/usages outside this module. If this isn’t intended for cross-module reuse, keep it non-exported to avoid expanding the module surface area; if it is intended, consider moving it to a shared utility location (e.g. acommon/module) rather than exporting from abrowser/file.
export async function generateUnifiedDiff(
fileService: IFileService,
relPath: string,
originalUri: URI | undefined,
modifiedUri: URI,
src/vs/sessions/contrib/applyCommitsToParentRepo/browser/applyChangesToParentRepo.ts
Outdated
Show resolved
Hide resolved
src/vs/sessions/contrib/applyCommitsToParentRepo/browser/applyChangesToParentRepo.ts
Outdated
Show resolved
Hide resolved
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @lszomoruMatched files:
|
rebornix
approved these changes
Mar 4, 2026
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.
No description provided.