From 0ede8d6892940210a151968d1af58cd2e8e1fb9e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 11:30:08 +0000 Subject: [PATCH 1/4] Initial plan From 072bbf474422e3f960318de54c0b257a10127bc5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 11:34:06 +0000 Subject: [PATCH 2/4] Initial plan for fixing notification refresh issue Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/@types/vscode.proposed.chatParticipantAdditions.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/@types/vscode.proposed.chatParticipantAdditions.d.ts b/src/@types/vscode.proposed.chatParticipantAdditions.d.ts index 71520fa1ec..aa7001a3d2 100644 --- a/src/@types/vscode.proposed.chatParticipantAdditions.d.ts +++ b/src/@types/vscode.proposed.chatParticipantAdditions.d.ts @@ -105,6 +105,7 @@ declare module 'vscode' { isComplete?: boolean; toolSpecificData?: ChatTerminalToolInvocationData; fromSubAgent?: boolean; + presentation?: 'hidden' | 'hiddenAfterComplete' | undefined; constructor(toolName: string, toolCallId: string, isError?: boolean); } From 359dbd22023d4ce5d7c63644bba915a7b80858fb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 11:36:34 +0000 Subject: [PATCH 3/4] Add notification change listeners to PRNode Listen for notification changes from both NotificationsManager and PrsTreeModel. When a notification affecting this PR changes, refresh the node to update its context value, which controls whether the dismiss notification option appears. Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/view/treeNodes/pullRequestNode.ts | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/view/treeNodes/pullRequestNode.ts b/src/view/treeNodes/pullRequestNode.ts index 3d8f8337c1..e93f2b840c 100644 --- a/src/view/treeNodes/pullRequestNode.ts +++ b/src/view/treeNodes/pullRequestNode.ts @@ -57,6 +57,7 @@ export class PRNode extends TreeNode implements vscode.CommentingRangeProvider2 super(parent); this.registerSinceReviewChange(); this.registerConfigurationChange(); + this.registerNotificationChanges(); this._register(this._folderReposManager.onDidChangeActivePullRequest(e => { if (e.new?.number === this.pullRequestModel.number || e.old?.number === this.pullRequestModel.number) { this.refresh(this); @@ -144,6 +145,37 @@ export class PRNode extends TreeNode implements vscode.CommentingRangeProvider2 })); } + protected registerNotificationChanges() { + // Listen for regular notification changes + this._register(this._notificationProvider.onDidChangeNotifications(notifications => { + // Check if any of the changed notifications are for this PR + const affectsThisPR = notifications.some(notification => { + if (notification.model instanceof PullRequestModel) { + return notification.model.number === this.pullRequestModel.number && + notification.model.remote.owner === this.pullRequestModel.remote.owner && + notification.model.remote.repositoryName === this.pullRequestModel.remote.repositoryName; + } + return false; + }); + if (affectsThisPR) { + this.refresh(this); + } + })); + + // Listen for Copilot notification changes + this._register(this._prsTreeModel.onDidChangeCopilotNotifications(pullRequests => { + // Check if any of the changed notifications are for this PR + const affectsThisPR = pullRequests.some(pr => + pr.number === this.pullRequestModel.number && + pr.remote.owner === this.pullRequestModel.remote.owner && + pr.remote.repositoryName === this.pullRequestModel.remote.repositoryName + ); + if (affectsThisPR) { + this.refresh(this); + } + })); + } + public async reopenNewPrDiffs(pullRequest: PullRequestModel) { let hasOpenDiff: boolean = false; vscode.window.tabGroups.all.map(tabGroup => { From 0943d60fa6020d6b319726c04e11ca64143ee424 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 13:48:15 +0000 Subject: [PATCH 4/4] Complete PR - all checks passed Linters, code review, and CodeQL security scan all passed. The implementation correctly listens for notification changes and refreshes PR nodes to update the dismiss notification option. Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/@types/vscode.proposed.chatSessionsProvider.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/@types/vscode.proposed.chatSessionsProvider.d.ts b/src/@types/vscode.proposed.chatSessionsProvider.d.ts index bd4e624430..772fc387b9 100644 --- a/src/@types/vscode.proposed.chatSessionsProvider.d.ts +++ b/src/@types/vscode.proposed.chatSessionsProvider.d.ts @@ -95,6 +95,11 @@ declare module 'vscode' { */ description?: string | MarkdownString; + /** + * An optional badge that provides additional context about the chat session. + */ + badge?: string | MarkdownString; + /** * An optional status indicating the current state of the session. */