@@ -54,8 +54,8 @@ export const createCommands = ({ context, machine, storage, git }: CreateCommand
5454initialProgress = progress
5555const canContinue = ! ! ( tutorial && progress && hasGit && hasGitRemote )
5656console . 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'
5959machine . send ( canContinue ?'CONTINUE' :'NEW' )
6060} ,
6161// open React webview
@@ -78,15 +78,13 @@ export const createCommands = ({ context, machine, storage, git }: CreateCommand
7878}
7979} ,
8080// 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 ) } ` )
8583// console.log(webview.currentPanel)
8684// if (!webview || !webview.currentPanel) {
8785// throw new Error('No valid panel available')
8886// }
89- webview . postMessage ( action )
87+ webview . postMessage ( { type : 'SET_STATE' , payload } )
9088
9189}
9290} )