From 79c48eaf5feae38ba5a5e7cd974d2be32fa96d5b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 29 Aug 2024 16:16:26 +0200 Subject: [PATCH] emit height change event when discard/accept edits (#227079) fixes https://github.com/microsoft/vscode-copilot/issues/6938 --- src/vs/workbench/contrib/chat/browser/codeBlockPart.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/codeBlockPart.ts b/src/vs/workbench/contrib/chat/browser/codeBlockPart.ts index 1b53c429a94..5db94d519a7 100644 --- a/src/vs/workbench/contrib/chat/browser/codeBlockPart.ts +++ b/src/vs/workbench/contrib/chat/browser/codeBlockPart.ts @@ -770,15 +770,11 @@ export class CodeCompareBlockPart extends Disposable { }); dom.reset(this.messageElement, message); - } const diffData = await data.diffData; - if (!diffData) { - return; - } - if (!isEditApplied) { + if (!isEditApplied && diffData) { const viewModel = this.diffEditor.createViewModel({ original: diffData.original, modified: diffData.modified @@ -801,6 +797,7 @@ export class CodeCompareBlockPart extends Disposable { } else { this.diffEditor.setModel(null); this._lastDiffEditorViewModel.value = undefined; + this._onDidChangeContentHeight.fire(); } this.toolbar.context = {