@@ -76,30 +76,31 @@ class Channel implements Channel {
7676 const tutorial : TT . Tutorial | null = this . context . tutorial . get ( )
7777
7878 // new tutorial
79- if ( ! tutorial || ! tutorial . id ) {
80- this . send ( { type : 'START_NEW_TUTORIAL' , payload : { env } } )
81- return
82- }
79+ this . send ( { type : 'START_NEW_TUTORIAL' , payload : { env } } )
80+ return
8381
84- // set tutorial
85- const { position, progress } = await this . context . setTutorial ( this . workspaceState , tutorial )
82+ // disable continue until fixed
8683
87- if ( progress . complete ) {
88- // tutorial is already complete
89- this . send ( { type : 'TUTORIAL_ALREADY_COMPLETE' , payload : { env } } )
90- return
91- }
92- // communicate to client the tutorial & stepProgress state
93- this . send ( { type : 'LOAD_STORED_TUTORIAL' , payload : { env, tutorial, progress, position } } )
84+ // // set tutorial
85+ // const { position, progress } = await this.context.setTutorial(this.workspaceState, tutorial)
9486
95- return
87+ // if (progress.complete) {
88+ // // tutorial is already complete
89+ // this.send({ type: 'TUTORIAL_ALREADY_COMPLETE', payload: { env } })
90+ // return
91+ // }
92+ // // communicate to client the tutorial & stepProgress state
93+ // this.send({ type: 'LOAD_STORED_TUTORIAL', payload: { env, tutorial, progress, position } })
94+
95+ // return
9696 } catch ( e ) {
9797 const error = {
9898 type : 'UnknownError' ,
9999 message : `Location: Editor startup\n\n${ e . message } ` ,
100100 }
101101 this . send ( { type : 'EDITOR_STARTUP_FAILED' , payload : { error } } )
102102 }
103+ return
103104
104105 // clear tutorial local storage
105106 case 'TUTORIAL_CLEAR' :
@@ -203,14 +204,14 @@ class Channel implements Channel {
203204
204205 // report back to the webview that setup is complete
205206 this . send ( { type : 'TUTORIAL_CONFIGURED' } )
206- return
207207 } catch ( e ) {
208208 const error = {
209209 type : 'UnknownError' ,
210210 message : `Location: EditorTutorialConfig.\n\n ${ e . message } ` ,
211211 }
212212 this . send ( { type : 'TUTORIAL_CONFIGURE_FAIL' , payload : { error } } )
213213 }
214+ return
214215 case 'EDITOR_TUTORIAL_CONTINUE_CONFIG' :
215216 try {
216217 const tutorialContinue : TT . Tutorial | null = this . context . tutorial . get ( )
@@ -224,14 +225,14 @@ class Channel implements Channel {
224225 } )
225226 // update the current stepId on startup
226227 vscode . commands . executeCommand ( COMMANDS . SET_CURRENT_STEP , action . payload )
227- return
228228 } catch ( e ) {
229229 const error = {
230230 type : 'UnknownError' ,
231231 message : `Location: Editor tutorial continue config.\n\n ${ e . message } ` ,
232232 }
233233 this . send ( { type : 'CONTINUE_FAILED' , payload : { error } } )
234234 }
235+ return
235236 case 'EDITOR_VALIDATE_SETUP' :
236237 try {
237238 // check workspace is selected
@@ -272,14 +273,14 @@ class Channel implements Channel {
272273 return
273274 }
274275 this . send ( { type : 'SETUP_VALIDATED' } )
275- return
276276 } catch ( e ) {
277277 const error = {
278278 type : 'UknownError' ,
279279 message : e . message ,
280280 }
281281 this . send ( { type : 'VALIDATE_SETUP_FAILED' , payload : { error } } )
282282 }
283+ return
283284 case 'EDITOR_REQUEST_WORKSPACE' :
284285 openWorkspace ( )
285286 return
@@ -329,7 +330,7 @@ class Channel implements Channel {
329330 case 'TEST_PASS' :
330331 const tutorial = this . context . tutorial . get ( )
331332 if ( ! tutorial ) {
332- throw new Error ( 'Error with current tutorial' )
333+ throw new Error ( 'Error with current tutorial. Tutorial may be missing an id. ' )
333334 }
334335 // update local storage stepProgress
335336 const progress = this . context . progress . setStepComplete ( tutorial , action . payload . stepId )
0 commit comments