mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Git - accept working set changes when a resource is staged/committed (#262885)
This commit is contained in:
@@ -1223,6 +1223,9 @@ export class Repository implements Disposable {
|
||||
async () => {
|
||||
await this.repository.add(resources.map(r => r.fsPath), opts);
|
||||
this.closeDiffEditors([], [...resources.map(r => r.fsPath)]);
|
||||
|
||||
// Accept working set changes across all chat sessions
|
||||
commands.executeCommand('_chat.editSessions.accept', resources);
|
||||
},
|
||||
() => {
|
||||
const resourcePaths = resources.map(r => r.fsPath);
|
||||
@@ -1373,6 +1376,12 @@ export class Repository implements Disposable {
|
||||
this.inputBox.value = await this.getInputTemplate();
|
||||
}
|
||||
this.closeDiffEditors(indexResources, workingGroupResources);
|
||||
|
||||
// Accept working set changes across all chat sessions
|
||||
const resources = indexResources.length !== 0
|
||||
? indexResources.map(r => Uri.file(r))
|
||||
: workingGroupResources.map(r => Uri.file(r));
|
||||
commands.executeCommand('_chat.editSessions.accept', resources);
|
||||
}
|
||||
|
||||
private commitOperationGetOptimisticResourceGroups(opts: CommitOptions): GitResourceGroups {
|
||||
|
||||
Reference in New Issue
Block a user