File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { CodeCellViewModel } from '../../viewModel/codeCellViewModel.js';
1515import { Event } from '../../../../../../base/common/event.js' ;
1616import { IChatAgentService } from '../../../../chat/common/chatAgents.js' ;
1717import { ChatAgentLocation } from '../../../../chat/common/constants.js' ;
18+ import { autorun } from '../../../../../../base/common/observable.js' ;
1819
1920export class CellDiagnostics extends Disposable implements INotebookEditorContribution {
2021
@@ -121,6 +122,11 @@ export class CellDiagnostics extends Disposable implements INotebookEditorContri
121122 disposables . push ( toDisposable ( ( ) => this . markerService . changeOne ( CellDiagnostics . ID , cell . uri , [ ] ) ) ) ;
122123 cell . executionErrorDiagnostic . set ( metadata . error , undefined ) ;
123124 disposables . push ( toDisposable ( ( ) => cell . executionErrorDiagnostic . set ( undefined , undefined ) ) ) ;
125+ disposables . push ( autorun ( ( r ) => {
126+ if ( ! cell . executionErrorDiagnostic . read ( r ) ) {
127+ this . clear ( cellHandle ) ;
128+ }
129+ } ) ) ;
124130 disposables . push ( cell . model . onDidChangeOutputs ( ( ) => {
125131 if ( cell . model . outputs . length === 0 ) {
126132 this . clear ( cellHandle ) ;
You can’t perform that action at this time.
0 commit comments