Chat - auto-accept external edits (#288933)

* Chat - auto-accept external edits

* Trying to track down the test failures
This commit is contained in:
Ladislau Szomoru
2026-01-20 16:05:12 +01:00
committed by GitHub
parent 9d2710f482
commit ebaa450e15
2 changed files with 13 additions and 0 deletions

View File

@@ -1127,6 +1127,11 @@ export class Repository implements Disposable {
return undefined;
}
// Since we are inspecting the resource groups
// we have to ensure that the repository state
// is up to date
// await this.status();
// Ignore path that is inside a merge group
if (this.mergeGroup.resourceStates.some(r => pathEquals(r.resourceUri.fsPath, uri.fsPath))) {
this.logger.trace(`[Repository][provideOriginalResource] Resource is part of a merge group: ${uri.toString()}`);
@@ -3295,6 +3300,11 @@ export class StagedResourceQuickDiffProvider implements QuickDiffProvider {
return undefined;
}
// Since we are inspecting the resource groups
// we have to ensure that the repository state
// is up to date
// await this._repository.status();
// Ignore resources that are not in the index group
if (!this._repository.indexGroup.resourceStates.some(r => pathEquals(r.resourceUri.fsPath, uri.fsPath))) {
this.logger.trace(`[StagedResourceQuickDiffProvider][provideOriginalResource] Resource is not part of a index group: ${uri.toString()}`);