clear diagnostics on delete, no diagnostics for IW cells (#208794)

This commit is contained in:
Aaron Munger 2024-03-26 08:43:28 -07:00 committed by GitHub
parent 62d83b2a75
commit 86c791ebb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,14 +38,16 @@ export class CellDiagnostics extends Disposable {
) {
super();
this.updateEnabled();
if (cell.viewType !== 'interactive') {
this.updateEnabled();
this._register(inlineChatService.onDidChangeProviders(() => this.updateEnabled()));
this._register(configurationService.onDidChangeConfiguration((e) => {
if (e.affectsConfiguration(NotebookSetting.cellFailureDiagnostics)) {
this.updateEnabled();
}
}));
this._register(inlineChatService.onDidChangeProviders(() => this.updateEnabled()));
this._register(configurationService.onDidChangeConfiguration((e) => {
if (e.affectsConfiguration(NotebookSetting.cellFailureDiagnostics)) {
this.updateEnabled();
}
}));
}
}
private updateEnabled() {
@ -103,4 +105,9 @@ export class CellDiagnostics extends Disposable {
};
}
override dispose() {
super.dispose();
this.clear();
}
}