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 = {