@@ -76,30 +76,31 @@ class Channel implements Channel {
7676const 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 ) {
9797const error = {
9898type :'UnknownError' ,
9999message :`Location: Editor startup\n\n${ e . message } ` ,
100100}
101101this . send ( { type :'EDITOR_STARTUP_FAILED' , payload :{ error} } )
102102}
103+ return
103104
104105// clear tutorial local storage
105106case 'TUTORIAL_CLEAR' :
@@ -203,14 +204,14 @@ class Channel implements Channel {
203204
204205// report back to the webview that setup is complete
205206this . send ( { type :'TUTORIAL_CONFIGURED' } )
206- return
207207} catch ( e ) {
208208const error = {
209209type :'UnknownError' ,
210210message :`Location: EditorTutorialConfig.\n\n${ e . message } ` ,
211211}
212212this . send ( { type :'TUTORIAL_CONFIGURE_FAIL' , payload :{ error} } )
213213}
214+ return
214215case 'EDITOR_TUTORIAL_CONTINUE_CONFIG' :
215216try {
216217const tutorialContinue :TT . Tutorial | null = this . context . tutorial . get ( )
@@ -224,14 +225,14 @@ class Channel implements Channel {
224225} )
225226// update the current stepId on startup
226227vscode . commands . executeCommand ( COMMANDS . SET_CURRENT_STEP , action . payload )
227- return
228228} catch ( e ) {
229229const error = {
230230type :'UnknownError' ,
231231message :`Location: Editor tutorial continue config.\n\n${ e . message } ` ,
232232}
233233this . send ( { type :'CONTINUE_FAILED' , payload :{ error} } )
234234}
235+ return
235236case 'EDITOR_VALIDATE_SETUP' :
236237try {
237238// check workspace is selected
@@ -272,14 +273,14 @@ class Channel implements Channel {
272273return
273274}
274275this . send ( { type :'SETUP_VALIDATED' } )
275- return
276276} catch ( e ) {
277277const error = {
278278type :'UknownError' ,
279279message :e . message ,
280280}
281281this . send ( { type :'VALIDATE_SETUP_FAILED' , payload :{ error} } )
282282}
283+ return
283284case 'EDITOR_REQUEST_WORKSPACE' :
284285openWorkspace ( )
285286return
@@ -329,7 +330,7 @@ class Channel implements Channel {
329330case 'TEST_PASS' :
330331const tutorial = this . context . tutorial . get ( )
331332if ( ! 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
335336const progress = this . context . progress . setStepComplete ( tutorial , action . payload . stepId )