@@ -54,8 +54,8 @@ export const createCommands = ({ context, machine, storage, git }: CreateCommand
54
54
initialProgress = progress
55
55
const canContinue = ! ! ( tutorial && progress && hasGit && hasGitRemote )
56
56
console . log ( 'canContinue' , canContinue )
57
- // if a tutorial exists," CONTINUE"
58
- // otherwise start from" NEW"
57
+ // if a tutorial exists,' CONTINUE'
58
+ // otherwise start from' NEW'
59
59
machine . send ( canContinue ?'CONTINUE' :'NEW' )
60
60
} ,
61
61
// open React webview
@@ -78,15 +78,13 @@ export const createCommands = ({ context, machine, storage, git }: CreateCommand
78
78
}
79
79
} ,
80
80
// send messages to webview
81
- [ COMMANDS . SEND_STATE ] :( action :CR . Action ) => {
82
- console . log ( `SEND${ JSON . stringify ( action ) } ` )
83
- console . log ( 'webview' )
84
- console . log ( webview )
81
+ [ COMMANDS . SEND_STATE ] :( payload :any ) => {
82
+ console . log ( `SEND${ JSON . stringify ( payload ) } ` )
85
83
// console.log(webview.currentPanel)
86
84
// if (!webview || !webview.currentPanel) {
87
85
// throw new Error('No valid panel available')
88
86
// }
89
- webview . postMessage ( action )
87
+ webview . postMessage ( { type : 'SET_STATE' , payload } )
90
88
91
89
}
92
90
} )