Skip to content

Commit 9a91d33

Browse files
authored
Cancelling application of edits results in a dialog notification (microsoft#229805)
1 parent 67a93b0 commit 9a91d33

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { AsyncIterableObject } from '../../../../../base/common/async.js';
77
import { VSBuffer } from '../../../../../base/common/buffer.js';
88
import { CancellationTokenSource } from '../../../../../base/common/cancellation.js';
99
import { CharCode } from '../../../../../base/common/charCode.js';
10+
import { isCancellationError } from '../../../../../base/common/errors.js';
1011
import { ResourceMap } from '../../../../../base/common/map.js';
1112
import { isEqual } from '../../../../../base/common/resources.js';
1213
import * as strings from '../../../../../base/common/strings.js';
@@ -241,7 +242,9 @@ export class ApplyCodeBlockOperation {
241242
return result;
242243
}
243244
} catch (e) {
244-
this.notify(localize('applyCodeBlock.error', "Failed to apply code block: {0}", e.message));
245+
if (!isCancellationError(e)) {
246+
this.notify(localize('applyCodeBlock.error', "Failed to apply code block: {0}", e.message));
247+
}
245248
} finally {
246249
cancellationTokenSource.dispose();
247250
}

0 commit comments

Comments
 (0)