File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
packages/app/src/app/overmind/effects/vscode Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -292,6 +292,8 @@ export class VSCodeEffect {
292
292
public async changeSandbox ( sandbox : Sandbox , setFs : ( fs : SandboxFs ) => void ) {
293
293
await this . initialized ;
294
294
295
+ const isFirstLoad = ! ! this . modelsHandler ;
296
+
295
297
if ( this . modelsHandler ) {
296
298
this . modelsHandler . dispose ( ) ;
297
299
}
@@ -311,10 +313,14 @@ export class VSCodeEffect {
311
313
312
314
setFs ( this . sandboxFsSync . create ( sandbox ) ) ;
313
315
314
- this . editorApi . extensionService . stopExtensionHost ( ) ;
315
- this . sandboxFsSync . sync ( ( ) => {
316
- this . editorApi . extensionService . startExtensionHost ( ) ;
317
- } ) ;
316
+ if ( isFirstLoad ) {
317
+ this . editorApi . extensionService . stopExtensionHost ( ) ;
318
+ this . sandboxFsSync . sync ( ( ) => {
319
+ this . editorApi . extensionService . startExtensionHost ( ) ;
320
+ } ) ;
321
+ } else {
322
+ this . sandboxFsSync . sync ( ( ) => { } ) ;
323
+ }
318
324
}
319
325
320
326
public async setModuleCode ( module : Module ) {
You can’t perform that action at this time.
0 commit comments