From 4f6ed8761a8c7181012073149dff463a8508894d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 11:28:23 +0000 Subject: [PATCH 1/3] Initial plan From 27aed2f87b373fdb6cf8874f6af348aa4b8e7f16 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 11:32:23 +0000 Subject: [PATCH 2/3] Initial plan for adding comment and resolve button 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 f4d25182389c7128f90dc5c658e05424b5354009 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 11:37:25 +0000 Subject: [PATCH 3/3] Add comment and resolve commands implementation Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- package.json | 30 ++++++++++++++++++++++++++++++ package.nls.json | 2 ++ src/commands.ts | 30 ++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/package.json b/package.json index 121adffe67..dac8fced79 100644 --- a/package.json +++ b/package.json @@ -1181,6 +1181,18 @@ "category": "%command.pull.request.category%", "enablement": "!commentIsEmpty" }, + { + "command": "pr.createCommentAndResolve", + "title": "%command.pr.createCommentAndResolve.title%", + "category": "%command.pull.request.category%", + "enablement": "!commentIsEmpty" + }, + { + "command": "pr.createSingleCommentAndResolve", + "title": "%command.pr.createSingleCommentAndResolve.title%", + "category": "%command.pull.request.category%", + "enablement": "!commentIsEmpty" + }, { "command": "pr.makeSuggestion", "title": "%command.pr.makeSuggestion.title%", @@ -2290,6 +2302,14 @@ "command": "pr.createSingleComment", "when": "false" }, + { + "command": "pr.createCommentAndResolve", + "when": "false" + }, + { + "command": "pr.createSingleCommentAndResolve", + "when": "false" + }, { "command": "pr.makeSuggestion", "when": "false" @@ -3221,6 +3241,16 @@ "command": "pr.createSingleComment", "group": "inline@2", "when": "config.githubPullRequests.defaultCommentType == review && ((commentController =~ /^github-browse/ && !prInDraft) || commentController =~ /^github-review/ && !reviewInDraftMode)" + }, + { + "command": "pr.createCommentAndResolve", + "group": "inline@3", + "when": "commentThread =~ /canResolve/ && ((commentController =~ /^github-browse/ && prInDraft) || (commentController =~ /^github-review/ && reviewInDraftMode))" + }, + { + "command": "pr.createSingleCommentAndResolve", + "group": "inline@3", + "when": "commentThread =~ /canResolve/ && config.githubPullRequests.defaultCommentType != review && ((commentController =~ /^github-browse/ && !prInDraft) || (commentController =~ /^github-review/ && !reviewInDraftMode))" } ], "comments/comment/editorActions": [ diff --git a/package.nls.json b/package.nls.json index 73c02b7684..4bd45d8266 100644 --- a/package.nls.json +++ b/package.nls.json @@ -234,6 +234,8 @@ "command.pr.deleteLocalBranchesNRemotes.title": "Delete local branches and remotes", "command.pr.createComment.title": "Add Review Comment", "command.pr.createSingleComment.title": "Add Comment", + "command.pr.createCommentAndResolve.title": "Add Review Comment and Resolve", + "command.pr.createSingleCommentAndResolve.title": "Add Comment and Resolve", "command.pr.makeSuggestion.title": "Make Code Suggestion", "command.pr.startReview.title": "Start Review", "command.pr.editComment.title": "Edit Comment", diff --git a/src/commands.ts b/src/commands.ts index ddb34e8736..88dce4824c 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -1209,6 +1209,36 @@ export function registerCommands( }), ); + context.subscriptions.push( + vscode.commands.registerCommand('pr.createCommentAndResolve', async (reply: CommentReply) => { + /* __GDPR__ + "pr.createCommentAndResolve" : {} + */ + telemetry.sendTelemetryEvent('pr.createCommentAndResolve'); + const handler = resolveCommentHandler(reply.thread); + + if (handler) { + await handler.createOrReplyComment(reply.thread, reply.text, false); + await handler.resolveReviewThread(reply.thread); + } + }), + ); + + context.subscriptions.push( + vscode.commands.registerCommand('pr.createSingleCommentAndResolve', async (reply: CommentReply) => { + /* __GDPR__ + "pr.createSingleCommentAndResolve" : {} + */ + telemetry.sendTelemetryEvent('pr.createSingleCommentAndResolve'); + const handler = resolveCommentHandler(reply.thread); + + if (handler) { + await handler.createOrReplyComment(reply.thread, reply.text, true); + await handler.resolveReviewThread(reply.thread); + } + }), + ); + context.subscriptions.push( vscode.commands.registerCommand('pr.makeSuggestion', async (reply: CommentReply | GHPRComment | undefined) => { let potentialThread: GHPRCommentThread | undefined;