Don't render the inline edits in diff editors (#230710)

This commit is contained in:
Alexandru Dima
2024-10-07 16:20:51 +02:00
committed by GitHub
parent 497164139f
commit cd1f8db59e

View File

@@ -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;
}