Skip to content

Agents - disable git commands in the editor title#311645

Merged
lszomoru merged 1 commit intomainfrom
lszomoru/literary-turkey
Apr 21, 2026
Merged

Agents - disable git commands in the editor title#311645
lszomoru merged 1 commit intomainfrom
lszomoru/literary-turkey

Conversation

@lszomoru
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 21, 2026 10:12
@lszomoru lszomoru enabled auto-merge (squash) April 21, 2026 10:12
@lszomoru lszomoru self-assigned this Apr 21, 2026
@lszomoru lszomoru added this to the 1.118.0 milestone Apr 21, 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

This PR updates the built-in Git extension’s editor/title menu contributions to hide several Git actions when running in the Agents “Sessions” window (isSessionsWindow), reducing editor title actions that aren’t intended to be available there.

Changes:

  • Add !isSessionsWindow to the when clauses for git.openChange in the editor title.
  • Add !isSessionsWindow to the when clauses for several stage/unstage/revert range commands shown in the editor title (including diff-editor variants).
Show a summary per file
File Description
extensions/git/package.json Adds !isSessionsWindow guards to multiple Git editor/title menu items so they don’t show in Sessions windows.

Copilot's findings

Comments suppressed due to low confidence (1)

extensions/git/package.json:2779

  • The PR title suggests disabling git commands in the editor title for Sessions windows, but this change only adds !isSessionsWindow to a subset of the editor/title menu items (openChange/stage/unstage/etc). Other editor/title items in this same block (e.g. git.openFile, git.stashApplyEditor/git.stashDropEditor) still lack the Sessions-window guard, so they may continue to appear in Sessions windows. Consider either adding && !isSessionsWindow consistently to all editor/title git menu contributions, or adjusting the scope/title to reflect that only some commands are being hidden.
        {
          "command": "git.openChange",
          "group": "navigation@2",
          "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && scmActiveResourceHasChanges && !isSessionsWindow"
        },
        {
          "command": "git.stashApplyEditor",
          "alt": "git.stashPopEditor",
          "group": "navigation@1",
          "when": "config.git.enabled && !git.missing && resourceScheme == git-stash"
  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@lszomoru lszomoru merged commit 16e7e39 into main Apr 21, 2026
30 checks passed
@lszomoru lszomoru deleted the lszomoru/literary-turkey branch April 21, 2026 10:32
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