diff --git a/src/vs/workbench/contrib/chat/browser/chatEditorController.ts b/src/vs/workbench/contrib/chat/browser/chatEditorController.ts index 937938a1c71..73394e6ebb4 100644 --- a/src/vs/workbench/contrib/chat/browser/chatEditorController.ts +++ b/src/vs/workbench/contrib/chat/browser/chatEditorController.ts @@ -43,20 +43,24 @@ export class ChatEditorController extends Disposable implements IEditorContribut return; } const model = this._editor.getModel(); + if (this._editor.getOption(EditorOption.inDiffEditor)) { + this._clearRendering(); + return; + } this._sessionStore.add(model.onDidChangeContent(() => this._updateSessionDecorations())); this._updateSessionDecorations(); } private _updateSessionDecorations(): void { if (!this._editor.hasModel()) { - this._decorations.clear(); + this._clearRendering(); return; } const model = this._editor.getModel(); const editingSession = this._chatEditingService.getEditingSession(model.uri); const entry = this._getEntry(editingSession, model); if (!entry) { - this._decorations.clear(); + this._clearRendering(); return; }