From 738e2a141cdbc20f3693c89ae03a2c93bd5758b5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 16:25:11 +0000 Subject: [PATCH 1/8] Initial plan From e21b87856547a4ee7edca86d70cb5f30c7479d66 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 16:29:22 +0000 Subject: [PATCH 2/8] Initial plan: Add notification for branch auto-deletion after merge Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- .../vscode.proposed.chatSessionsProvider.d.ts | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/@types/vscode.proposed.chatSessionsProvider.d.ts b/src/@types/vscode.proposed.chatSessionsProvider.d.ts index 772fc387b9..2ec68c1731 100644 --- a/src/@types/vscode.proposed.chatSessionsProvider.d.ts +++ b/src/@types/vscode.proposed.chatSessionsProvider.d.ts @@ -49,26 +49,6 @@ declare module 'vscode' { */ readonly onDidCommitChatSessionItem: Event<{ original: ChatSessionItem /** untitled */; modified: ChatSessionItem /** newly created */ }>; - /** - * DEPRECATED: Will be removed! - * Creates a new chat session. - * - * @param options Options for the new session including an optional initial prompt and history - * @param token A cancellation token - * @returns Metadata for the chat session - */ - provideNewChatSessionItem?(options: { - /** - * The chat request that initiated the session creation - */ - readonly request: ChatRequest; - - /** - * Additional metadata to use for session creation - */ - metadata?: any; - }, token: CancellationToken): ProviderResult; - // #endregion } @@ -241,6 +221,14 @@ declare module 'vscode' { */ readonly onDidChangeChatSessionOptions?: Event; + /** + * Event that the provider can fire to signal that the available provider options have changed. + * + * When fired, the editor will re-query {@link ChatSessionContentProvider.provideChatSessionProviderOptions} + * and update the UI to reflect the new option groups. + */ + readonly onDidChangeChatSessionProviderOptions?: Event; + /** * Provides the chat session content for a given uri. * From aa012da2ff8208307be835d2cd8629655966bd55 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 16:32:28 +0000 Subject: [PATCH 3/8] Add notification when branch is auto-deleted after merge Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/github/pullRequestReviewCommon.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/github/pullRequestReviewCommon.ts b/src/github/pullRequestReviewCommon.ts index 36e46e3c01..9c88e111d3 100644 --- a/src/github/pullRequestReviewCommon.ts +++ b/src/github/pullRequestReviewCommon.ts @@ -462,6 +462,22 @@ export namespace PullRequestReviewCommon { } // Execute all deletions in parallel - await performBranchDeletion(folderRepositoryManager, item, defaultBranch, branchInfo!, selectedActions); + const deletedBranchTypes = await performBranchDeletion(folderRepositoryManager, item, defaultBranch, branchInfo!, selectedActions); + + // Show notification to the user about what was deleted + if (deletedBranchTypes.length > 0) { + const wasLocalDeleted = deletedBranchTypes.includes('local'); + const branchName = branchInfo?.branch || item.head?.ref || vscode.l10n.t('branch'); + + if (wasLocalDeleted) { + vscode.window.showInformationMessage( + vscode.l10n.t('Deleted local branch {0} and switched to {1}.', branchName, defaultBranch) + ); + } else { + vscode.window.showInformationMessage( + vscode.l10n.t('Deleted remote branch {0}.', branchName) + ); + } + } } } From 2a16d892644af7bd0f003e7c33e43c1de5401bb0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 16:35:43 +0000 Subject: [PATCH 4/8] Improve notification to handle both local and remote branch deletion Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/github/pullRequestReviewCommon.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/github/pullRequestReviewCommon.ts b/src/github/pullRequestReviewCommon.ts index 9c88e111d3..c3ddc60ca4 100644 --- a/src/github/pullRequestReviewCommon.ts +++ b/src/github/pullRequestReviewCommon.ts @@ -467,9 +467,14 @@ export namespace PullRequestReviewCommon { // Show notification to the user about what was deleted if (deletedBranchTypes.length > 0) { const wasLocalDeleted = deletedBranchTypes.includes('local'); + const wasRemoteDeleted = deletedBranchTypes.includes('remoteHead') || deletedBranchTypes.includes('remote'); const branchName = branchInfo?.branch || item.head?.ref || vscode.l10n.t('branch'); - if (wasLocalDeleted) { + if (wasLocalDeleted && wasRemoteDeleted) { + vscode.window.showInformationMessage( + vscode.l10n.t('Deleted local and remote branches for {0} and switched to {1}.', branchName, defaultBranch) + ); + } else if (wasLocalDeleted) { vscode.window.showInformationMessage( vscode.l10n.t('Deleted local branch {0} and switched to {1}.', branchName, defaultBranch) ); From 5b20d72f8f8138b23ee6dafc28798443fb9c021e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 16:38:32 +0000 Subject: [PATCH 5/8] Fix notification to only mention branch switch when branch was active Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/github/pullRequestReviewCommon.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/github/pullRequestReviewCommon.ts b/src/github/pullRequestReviewCommon.ts index c3ddc60ca4..cd4e034c26 100644 --- a/src/github/pullRequestReviewCommon.ts +++ b/src/github/pullRequestReviewCommon.ts @@ -432,6 +432,9 @@ export namespace PullRequestReviewCommon { const branchInfo = await folderRepositoryManager.getBranchNameForPullRequest(item); const defaultBranch = await folderRepositoryManager.getPullRequestRepositoryDefaultBranch(item); + // Check if the branch is currently active before deletion + const isBranchActive = item.equals(folderRepositoryManager.activePullRequest) || (folderRepositoryManager.repository.state.HEAD?.name && folderRepositoryManager.repository.state.HEAD.name === branchInfo?.branch); + // Get user preferences for automatic deletion const deleteLocalBranch = vscode.workspace .getConfiguration(PR_SETTINGS_NAMESPACE) @@ -470,14 +473,18 @@ export namespace PullRequestReviewCommon { const wasRemoteDeleted = deletedBranchTypes.includes('remoteHead') || deletedBranchTypes.includes('remote'); const branchName = branchInfo?.branch || item.head?.ref || vscode.l10n.t('branch'); - if (wasLocalDeleted && wasRemoteDeleted) { + if (wasLocalDeleted && isBranchActive && wasRemoteDeleted) { vscode.window.showInformationMessage( vscode.l10n.t('Deleted local and remote branches for {0} and switched to {1}.', branchName, defaultBranch) ); - } else if (wasLocalDeleted) { + } else if (wasLocalDeleted && isBranchActive) { vscode.window.showInformationMessage( vscode.l10n.t('Deleted local branch {0} and switched to {1}.', branchName, defaultBranch) ); + } else if (wasLocalDeleted) { + vscode.window.showInformationMessage( + vscode.l10n.t('Deleted local branch {0}.', branchName) + ); } else { vscode.window.showInformationMessage( vscode.l10n.t('Deleted remote branch {0}.', branchName) From 58e596d3f477ece84edd262dbb7266c4b7032f34 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 16:40:45 +0000 Subject: [PATCH 6/8] Remove localized fallback for branch name in notification Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/github/pullRequestReviewCommon.ts | 39 ++++++++++++++------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/github/pullRequestReviewCommon.ts b/src/github/pullRequestReviewCommon.ts index cd4e034c26..29509cefe5 100644 --- a/src/github/pullRequestReviewCommon.ts +++ b/src/github/pullRequestReviewCommon.ts @@ -471,24 +471,27 @@ export namespace PullRequestReviewCommon { if (deletedBranchTypes.length > 0) { const wasLocalDeleted = deletedBranchTypes.includes('local'); const wasRemoteDeleted = deletedBranchTypes.includes('remoteHead') || deletedBranchTypes.includes('remote'); - const branchName = branchInfo?.branch || item.head?.ref || vscode.l10n.t('branch'); - - if (wasLocalDeleted && isBranchActive && wasRemoteDeleted) { - vscode.window.showInformationMessage( - vscode.l10n.t('Deleted local and remote branches for {0} and switched to {1}.', branchName, defaultBranch) - ); - } else if (wasLocalDeleted && isBranchActive) { - vscode.window.showInformationMessage( - vscode.l10n.t('Deleted local branch {0} and switched to {1}.', branchName, defaultBranch) - ); - } else if (wasLocalDeleted) { - vscode.window.showInformationMessage( - vscode.l10n.t('Deleted local branch {0}.', branchName) - ); - } else { - vscode.window.showInformationMessage( - vscode.l10n.t('Deleted remote branch {0}.', branchName) - ); + const branchName = branchInfo?.branch || item.head?.ref; + + // Only show notification if we have a branch name + if (branchName) { + if (wasLocalDeleted && isBranchActive && wasRemoteDeleted) { + vscode.window.showInformationMessage( + vscode.l10n.t('Deleted local and remote branches for {0} and switched to {1}.', branchName, defaultBranch) + ); + } else if (wasLocalDeleted && isBranchActive) { + vscode.window.showInformationMessage( + vscode.l10n.t('Deleted local branch {0} and switched to {1}.', branchName, defaultBranch) + ); + } else if (wasLocalDeleted) { + vscode.window.showInformationMessage( + vscode.l10n.t('Deleted local branch {0}.', branchName) + ); + } else { + vscode.window.showInformationMessage( + vscode.l10n.t('Deleted remote branch {0}.', branchName) + ); + } } } } From ec41eb4b0d7f62396c714ce3f0280251f05c122a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 09:07:59 +0000 Subject: [PATCH 7/8] Simplify notification logic by removing isBranchActive check Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/github/pullRequestReviewCommon.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/github/pullRequestReviewCommon.ts b/src/github/pullRequestReviewCommon.ts index 29509cefe5..5cfe5faac5 100644 --- a/src/github/pullRequestReviewCommon.ts +++ b/src/github/pullRequestReviewCommon.ts @@ -432,9 +432,6 @@ export namespace PullRequestReviewCommon { const branchInfo = await folderRepositoryManager.getBranchNameForPullRequest(item); const defaultBranch = await folderRepositoryManager.getPullRequestRepositoryDefaultBranch(item); - // Check if the branch is currently active before deletion - const isBranchActive = item.equals(folderRepositoryManager.activePullRequest) || (folderRepositoryManager.repository.state.HEAD?.name && folderRepositoryManager.repository.state.HEAD.name === branchInfo?.branch); - // Get user preferences for automatic deletion const deleteLocalBranch = vscode.workspace .getConfiguration(PR_SETTINGS_NAMESPACE) @@ -475,17 +472,13 @@ export namespace PullRequestReviewCommon { // Only show notification if we have a branch name if (branchName) { - if (wasLocalDeleted && isBranchActive && wasRemoteDeleted) { + if (wasLocalDeleted && wasRemoteDeleted) { vscode.window.showInformationMessage( vscode.l10n.t('Deleted local and remote branches for {0} and switched to {1}.', branchName, defaultBranch) ); - } else if (wasLocalDeleted && isBranchActive) { - vscode.window.showInformationMessage( - vscode.l10n.t('Deleted local branch {0} and switched to {1}.', branchName, defaultBranch) - ); } else if (wasLocalDeleted) { vscode.window.showInformationMessage( - vscode.l10n.t('Deleted local branch {0}.', branchName) + vscode.l10n.t('Deleted local branch {0} and switched to {1}.', branchName, defaultBranch) ); } else { vscode.window.showInformationMessage( From 351e9263735bde5798e15f45364aa710d23cf2ad Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Fri, 9 Jan 2026 15:53:58 +0100 Subject: [PATCH 8/8] Copilot PR feedback --- src/github/pullRequestReviewCommon.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github/pullRequestReviewCommon.ts b/src/github/pullRequestReviewCommon.ts index 5cfe5faac5..1545a9d4c0 100644 --- a/src/github/pullRequestReviewCommon.ts +++ b/src/github/pullRequestReviewCommon.ts @@ -474,11 +474,11 @@ export namespace PullRequestReviewCommon { if (branchName) { if (wasLocalDeleted && wasRemoteDeleted) { vscode.window.showInformationMessage( - vscode.l10n.t('Deleted local and remote branches for {0} and switched to {1}.', branchName, defaultBranch) + vscode.l10n.t('Deleted local and remote branches for {0}.', branchName) ); } else if (wasLocalDeleted) { vscode.window.showInformationMessage( - vscode.l10n.t('Deleted local branch {0} and switched to {1}.', branchName, defaultBranch) + vscode.l10n.t('Deleted local branch {0}.', branchName) ); } else { vscode.window.showInformationMessage(