mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
reveal next file when keep/undoing last hunk (#250821)
This commit is contained in:
@@ -251,12 +251,20 @@ abstract class AcceptRejectHunkAction extends ChatEditingEditorAction {
|
||||
);
|
||||
}
|
||||
|
||||
override async runChatEditingCommand(_accessor: ServicesAccessor, _session: IChatEditingSession, _entry: IModifiedFileEntry, ctrl: IModifiedFileEntryEditorIntegration, ...args: any[]): Promise<void> {
|
||||
override async runChatEditingCommand(accessor: ServicesAccessor, session: IChatEditingSession, entry: IModifiedFileEntry, ctrl: IModifiedFileEntryEditorIntegration, ...args: any[]): Promise<void> {
|
||||
|
||||
const instaService = accessor.get(IInstantiationService);
|
||||
|
||||
if (this._accept) {
|
||||
await ctrl.acceptNearestChange(args[0]);
|
||||
} else {
|
||||
await ctrl.rejectNearestChange(args[0]);
|
||||
}
|
||||
|
||||
if (entry.changesCount.get() === 0) {
|
||||
// no more changes, move to next file
|
||||
await instaService.invokeFunction(openNextOrPreviousChange, session, entry, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user