@@ -48,7 +48,7 @@ class Channel implements Channel {
4848 // console.log(`ACTION: ${actionType}`)
4949
5050 switch ( actionType ) {
51- case 'EDITOR_ENV_GET ' :
51+ case 'EDITOR_STARTUP ' :
5252 // check if a workspace is open, otherwise nothing works
5353 const noActiveWorksapce = ! environment . WORKSPACE_ROOT . length
5454 if ( noActiveWorksapce ) {
@@ -65,23 +65,18 @@ class Channel implements Channel {
6565 this . send ( { type : 'NO_WORKSPACE' , payload : { error } } )
6666 return
6767 }
68- this . send ( {
69- type : 'ENV_LOAD' ,
70- payload : {
71- env : {
72- machineId : vscode . env . machineId ,
73- sessionId : vscode . env . sessionId ,
74- } ,
75- } ,
76- } )
77- return
78- // continue from tutorial from local storage
79- case 'EDITOR_TUTORIAL_LOAD' :
68+
69+ const env = {
70+ machineId : vscode . env . machineId ,
71+ sessionId : vscode . env . sessionId ,
72+ }
73+
74+ // continue from tutorial from local storage
8075 const tutorial : TT . Tutorial | null = this . context . tutorial . get ( )
8176
8277 // new tutorial
8378 if ( ! tutorial || ! tutorial . id ) {
84- this . send ( { type : 'START_NEW_TUTORIAL' } )
79+ this . send ( { type : 'START_NEW_TUTORIAL' , payload : { env } } )
8580 return
8681 }
8782
@@ -90,13 +85,14 @@ class Channel implements Channel {
9085
9186 if ( progress . complete ) {
9287 // tutorial is already complete
93- this . send ( { type : 'START_NEW_TUTORIAL' } )
88+ this . send ( { type : 'TUTORIAL_ALREADY_COMPLETE' , payload : { env } } )
9489 return
9590 }
9691 // communicate to client the tutorial & stepProgress state
97- this . send ( { type : 'LOAD_STORED_TUTORIAL' , payload : { tutorial, progress, position } } )
92+ this . send ( { type : 'LOAD_STORED_TUTORIAL' , payload : { env , tutorial, progress, position } } )
9893
9994 return
95+
10096 // clear tutorial local storage
10197 case 'TUTORIAL_CLEAR' :
10298 // clear current progress/position/tutorial
0 commit comments