Skip to content

Commit 49e3a8d

Browse files
authored
Add review action back on Change / Staged Changes (#294)
1 parent 5cea7d6 commit 49e3a8d

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3322,6 +3322,18 @@
33223322
"when": "github.copilot.chat.reviewDiff.enabled && github.copilot.chat.review.sourceControlProgress && scmProvider == git && scmProviderRootUri in github.copilot.chat.reviewDiff.enabledRootUris"
33233323
}
33243324
],
3325+
"scm/resourceGroup/context": [
3326+
{
3327+
"command": "github.copilot.chat.review.stagedChanges",
3328+
"when": "github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmResourceGroup == index",
3329+
"group": "inline@-3"
3330+
},
3331+
{
3332+
"command": "github.copilot.chat.review.unstagedChanges",
3333+
"when": "github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmResourceGroup == workingTree",
3334+
"group": "inline@-3"
3335+
}
3336+
],
33253337
"scm/inputBox": [
33263338
{
33273339
"command": "github.copilot.git.generateCommitMessage",

package.nls.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"github.copilot.command.discardReviewSuggestion": "Discard",
1212
"github.copilot.command.discardReviewSuggestionAndNext": "Discard and Go to Next",
1313
"github.copilot.command.discardAllReviewSuggestion": "Discard All",
14-
"github.copilot.command.reviewStagedChanges": "Code review - Staged changes",
15-
"github.copilot.command.reviewUnstagedChanges": "Code review - Unstaged changes",
16-
"github.copilot.command.reviewChanges": "Code review - Uncommitted changes",
17-
"github.copilot.command.reviewChanges.cancel": "Code review - Cancel",
14+
"github.copilot.command.reviewStagedChanges": "Code Review - Staged Changes",
15+
"github.copilot.command.reviewUnstagedChanges": "Code Review - Unstaged Changes",
16+
"github.copilot.command.reviewChanges": "Code Review - Uncommitted Changes",
17+
"github.copilot.command.reviewChanges.cancel": "Code Review - Cancel",
1818
"github.copilot.command.gotoPreviousReviewSuggestion": "Previous Suggestion",
1919
"github.copilot.command.gotoNextReviewSuggestion": "Next Suggestion",
2020
"github.copilot.command.continueReviewInInlineChat": "Discard and Copy to Inline Chat",

src/extension/inlineChat/vscode-node/inlineChatCommands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ ${message}`,
314314
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.stagedChanges', () => doReview(...instaService.invokeFunction(getServicesForReview), 'index', vscode.ProgressLocation.SourceControl)));
315315
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.unstagedChanges', () => doReview(...instaService.invokeFunction(getServicesForReview), 'workingTree', vscode.ProgressLocation.SourceControl)));
316316
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.changes', () => doReview(...instaService.invokeFunction(getServicesForReview), 'all', vscode.ProgressLocation.SourceControl)));
317-
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.changes.cancel', () => cancelReview(vscode.ProgressLocation.SourceControl, accessor.get(IRunCommandExecutionService))));
317+
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.changes.cancel', () => cancelReview(vscode.ProgressLocation.SourceControl, instaService.invokeFunction(accessor => accessor.get(IRunCommandExecutionService)))));
318318
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.apply', doApplyReview));
319319
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.applyAndNext', (commentThread: vscode.CommentThread) => doApplyReview(commentThread, true)));
320320
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.applyShort', (commentThread: vscode.CommentThread) => doApplyReview(commentThread, true)));

0 commit comments

Comments
 (0)