Skip to content

Sessions - expose session base branch information#300415

Merged
lszomoru merged 2 commits intomainfrom
lszomoru/obedient-quelea
Mar 10, 2026
Merged

Sessions - expose session base branch information#300415
lszomoru merged 2 commits intomainfrom
lszomoru/obedient-quelea

Conversation

@lszomoru
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 10, 2026 10:53
@lszomoru lszomoru enabled auto-merge (squash) March 10, 2026 10:53
@lszomoru lszomoru self-assigned this Mar 10, 2026
@lszomoru lszomoru added this to the 1.112.0 milestone Mar 10, 2026
Copy link
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

This PR extends the Git repository state plumbing (git extension API → ext host → main thread → sessions UI) to surface “base branch” information (merge-base branch name + protection status) for agent sessions.

Changes:

  • Adds base metadata to GitBranch / GitBranchDto and introduces GitBaseRef / GitBaseRefDto.
  • Updates the ext host Git bridge to resolve the current branch’s merge-base branch and compute whether it’s protected.
  • Updates the Sessions Changes view to use sessions-scoped context keys and to derive a new “merge base branch protected” context value.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/vs/workbench/contrib/git/common/gitService.ts Extends GitBranch with optional base metadata (GitBaseRef).
src/vs/workbench/api/common/extHostGitExtensionService.ts Resolves merge-base branch + protection and includes it in the repo state DTO.
src/vs/workbench/api/common/extHost.protocol.ts Extends the RPC DTOs to carry GitBranchDto.base and defines GitBaseRefDto.
src/vs/sessions/contrib/changes/browser/changesView.ts Renames context keys to sessions.* and binds a new merge-base protection context key.
extensions/git/src/api/git.d.ts Exposes isBranchProtected on the git extension API Repository.
extensions/git/src/api/api1.ts Wires isBranchProtected through the API wrapper implementation.

@lszomoru lszomoru merged commit 35e0427 into main Mar 10, 2026
19 checks passed
@lszomoru lszomoru deleted the lszomoru/obedient-quelea branch March 10, 2026 11:18
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.

3 participants