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); } 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. */ 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 => {