fix a potential stale inline chat window cause (#269999)

re https://github.com/microsoft/vscode/issues/265579
This commit is contained in:
Johannes Rieken
2025-10-06 15:03:07 +02:00
committed by GitHub
parent 53bbb5267e
commit 49de261c1a
2 changed files with 38 additions and 1 deletions

View File

@@ -1042,7 +1042,7 @@ export class InlineChatController1 implements IEditorContribution {
assertType(this._session);
assertType(this._strategy);
const moreMinimalEdits = await this._editorWorkerService.computeMoreMinimalEdits(this._session.textModelN.uri, edits);
const moreMinimalEdits = await raceCancellation(this._editorWorkerService.computeMoreMinimalEdits(this._session.textModelN.uri, edits), opts?.token || CancellationToken.None);
this._log('edits from PROVIDER and after making them MORE MINIMAL', this._session.agent.extensionId, edits, moreMinimalEdits);
if (moreMinimalEdits?.length === 0) {