@@ -4,19 +4,21 @@ import * as TT from 'typings/tutorial'
4
4
import Context from '../services/context/context'
5
5
import tutorialConfig from './utils/tutorialConfig'
6
6
import { COMMANDS , send } from '../commands'
7
+ import logger from '../services/logger'
7
8
8
9
const onTutorialConfigContinue = async ( action :T . Action , context :Context ) :Promise < void > => {
10
+ logger ( 'onTutorialConfigContinue' , action )
9
11
try {
10
- const tutorialContinue :TT . Tutorial | null = context . tutorial . get ( )
11
- if ( ! tutorialContinue ) {
12
+ const tutorialToContinue :TT . Tutorial | null = context . tutorial . get ( )
13
+ if ( ! tutorialToContinue ) {
12
14
throw new Error ( 'Invalid tutorial to continue' )
13
15
}
16
+ // update the current stepId on startup
17
+ vscode . commands . executeCommand ( COMMANDS . SET_CURRENT_POSITION , action . payload . position )
14
18
await tutorialConfig ( {
15
- data :tutorialContinue ,
19
+ data :tutorialToContinue ,
16
20
alreadyConfigured :true ,
17
21
} )
18
- // update the current stepId on startup
19
- vscode . commands . executeCommand ( COMMANDS . SET_CURRENT_POSITION , action . payload . position )
20
22
} catch ( e ) {
21
23
const error = {
22
24
type :'UnknownError' ,