Skip to content

Commit f066f56

Browse files
committed
Add review action back on Change / Staged Changes
1 parent 205bc92 commit f066f56

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3322,6 +3322,28 @@
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 && !github.copilot.chat.review.sourceControlProgress && scmProvider == git && scmResourceGroup == index",
3329+
"group": "inline@-3"
3330+
},
3331+
{
3332+
"command": "github.copilot.chat.review.changes.cancel",
3333+
"when": "github.copilot.chat.reviewDiff.enabled && github.copilot.chat.review.sourceControlProgress && scmProvider == git && scmResourceGroup == index",
3334+
"group": "inline@-3"
3335+
},
3336+
{
3337+
"command": "github.copilot.chat.review.unstagedChanges",
3338+
"when": "github.copilot.chat.reviewDiff.enabled && !github.copilot.chat.review.sourceControlProgress && scmProvider == git && scmResourceGroup == workingTree",
3339+
"group": "inline@-3"
3340+
},
3341+
{
3342+
"command": "github.copilot.chat.review.changes.cancel",
3343+
"when": "github.copilot.chat.reviewDiff.enabled && github.copilot.chat.review.sourceControlProgress && scmProvider == git && scmResourceGroup == workingTree",
3344+
"group": "inline@-3"
3345+
}
3346+
],
33253347
"scm/inputBox": [
33263348
{
33273349
"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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export function registerInlineChatCommands(accessor: ServicesAccessor): IDisposa
5959
const extensionContext = accessor.get(IVSCodeExtensionContext);
6060
const configurationService = accessor.get(IConfigurationService);
6161
const parserService = accessor.get(IParserService);
62+
const commandExecutionService = accessor.get(IRunCommandExecutionService);
6263

6364
const disposables = new DisposableStore();
6465
const doExplain = async (arg0: any, fromPalette?: true) => {
@@ -314,7 +315,7 @@ ${message}`,
314315
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.stagedChanges', () => doReview(...instaService.invokeFunction(getServicesForReview), 'index', vscode.ProgressLocation.SourceControl)));
315316
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.unstagedChanges', () => doReview(...instaService.invokeFunction(getServicesForReview), 'workingTree', vscode.ProgressLocation.SourceControl)));
316317
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))));
318+
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.changes.cancel', () => cancelReview(vscode.ProgressLocation.SourceControl, commandExecutionService)));
318319
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.apply', doApplyReview));
319320
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.applyAndNext', (commentThread: vscode.CommentThread) => doApplyReview(commentThread, true)));
320321
disposables.add(vscode.commands.registerCommand('github.copilot.chat.review.applyShort', (commentThread: vscode.CommentThread) => doApplyReview(commentThread, true)));

0 commit comments

Comments
 (0)