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 {
292292 public async changeSandbox ( sandbox : Sandbox , setFs : ( fs : SandboxFs ) => void ) {
293293 await this . initialized ;
294294
295+ const isFirstLoad = ! ! this . modelsHandler ;
296+
295297 if ( this . modelsHandler ) {
296298 this . modelsHandler . dispose ( ) ;
297299 }
@@ -311,10 +313,14 @@ export class VSCodeEffect {
311313
312314 setFs ( this . sandboxFsSync . create ( sandbox ) ) ;
313315
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+ }
318324 }
319325
320326 public async setModuleCode ( module : Module ) {
You can’t perform that action at this time.
0 commit comments