File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/vs/workbench/contrib/chat/browser Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ export class CodeBlockPart extends Disposable {
144
144
private currentScrollWidth = 0 ;
145
145
146
146
private readonly disposableStore = this . _register ( new DisposableStore ( ) ) ;
147
+ private isDisposed = false ;
147
148
148
149
constructor (
149
150
private readonly options : ChatEditorOptions ,
@@ -264,6 +265,11 @@ export class CodeBlockPart extends Disposable {
264
265
}
265
266
}
266
267
268
+ override dispose ( ) {
269
+ this . isDisposed = true ;
270
+ super . dispose ( ) ;
271
+ }
272
+
267
273
get uri ( ) : URI | undefined {
268
274
return this . editor . getModel ( ) ?. uri ;
269
275
}
@@ -356,6 +362,9 @@ export class CodeBlockPart extends Disposable {
356
362
}
357
363
358
364
await this . updateEditor ( data ) ;
365
+ if ( this . isDisposed ) {
366
+ return ;
367
+ }
359
368
360
369
this . layout ( width ) ;
361
370
if ( editable ) {
You can’t perform that action at this time.
0 commit comments