Skip to content

Commit 79c48ea

Browse files
authored
emit height change event when discard/accept edits (microsoft#227079)
fixes microsoft/vscode-copilot#6938
1 parent be0639a commit 79c48ea

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/vs/workbench/contrib/chat/browser/codeBlockPart.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -770,15 +770,11 @@ export class CodeCompareBlockPart extends Disposable {
770770
});
771771

772772
dom.reset(this.messageElement, message);
773-
774773
}
775774

776775
const diffData = await data.diffData;
777-
if (!diffData) {
778-
return;
779-
}
780776

781-
if (!isEditApplied) {
777+
if (!isEditApplied && diffData) {
782778
const viewModel = this.diffEditor.createViewModel({
783779
original: diffData.original,
784780
modified: diffData.modified
@@ -801,6 +797,7 @@ export class CodeCompareBlockPart extends Disposable {
801797
} else {
802798
this.diffEditor.setModel(null);
803799
this._lastDiffEditorViewModel.value = undefined;
800+
this._onDidChangeContentHeight.fire();
804801
}
805802

806803
this.toolbar.context = {

0 commit comments

Comments
 (0)