Skip to content

Commit 86c791e

Browse files
authored
clear diagnostics on delete, no diagnostics for IW cells (microsoft#208794)
1 parent 62d83b2 commit 86c791e

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnostics.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ export class CellDiagnostics extends Disposable {
3838
) {
3939
super();
4040

41-
this.updateEnabled();
41+
if (cell.viewType !== 'interactive') {
42+
this.updateEnabled();
4243

43-
this._register(inlineChatService.onDidChangeProviders(() => this.updateEnabled()));
44-
this._register(configurationService.onDidChangeConfiguration((e) => {
45-
if (e.affectsConfiguration(NotebookSetting.cellFailureDiagnostics)) {
46-
this.updateEnabled();
47-
}
48-
}));
44+
this._register(inlineChatService.onDidChangeProviders(() => this.updateEnabled()));
45+
this._register(configurationService.onDidChangeConfiguration((e) => {
46+
if (e.affectsConfiguration(NotebookSetting.cellFailureDiagnostics)) {
47+
this.updateEnabled();
48+
}
49+
}));
50+
}
4951
}
5052

5153
private updateEnabled() {
@@ -103,4 +105,9 @@ export class CellDiagnostics extends Disposable {
103105
};
104106
}
105107

108+
override dispose() {
109+
super.dispose();
110+
this.clear();
111+
}
112+
106113
}

0 commit comments

Comments
 (0)