@@ -395,9 +395,6 @@ export class GumbyController {
395395 transformByQState . setCustomDependencyVersionFilePath ( '' )
396396 this . promptJavaHome ( 'source' , message . tabID )
397397 break
398- case ButtonActions . AGREE_TO_LOCAL_BUILD :
399- await this . prepareLanguageUpgradeProject ( message ) // build project locally right after user agrees to do so
400- break
401398 case ButtonActions . VIEW_TRANSFORMATION_HUB :
402399 await vscode . commands . executeCommand ( GumbyCommands . FOCUS_TRANSFORMATION_HUB , CancelActionPositions . Chat )
403400 break
@@ -552,39 +549,34 @@ export class GumbyController {
552549 } )
553550 }
554551
555- private async prepareLanguageUpgradeProject ( message : any ) {
552+ private async prepareLanguageUpgradeProject ( tabID : string ) {
556553 // build project locally
557554 try {
558555 this . sessionStorage . getSession ( ) . conversationState = ConversationState . COMPILING
559- this . messenger . sendCompilationInProgress ( message . tabID )
556+ this . messenger . sendCompilationInProgress ( tabID )
560557 await compileProject ( )
561558 } catch ( err : any ) {
562- this . messenger . sendUnrecoverableErrorResponse ( 'could-not-compile-project' , message . tabID )
559+ this . messenger . sendUnrecoverableErrorResponse ( 'could-not-compile-project' , tabID )
563560 // reset state to allow "Start a new transformation" button to work
564561 this . sessionStorage . getSession ( ) . conversationState = ConversationState . IDLE
565562 throw err
566563 }
567564
568- this . messenger . sendCompilationFinished ( message . tabID )
565+ this . messenger . sendCompilationFinished ( tabID )
569566
570567 // since compilation can potentially take a long time, double check auth
571568 const authState = await AuthUtil . instance . getChatAuthState ( )
572569 if ( authState . amazonQ !== 'connected' ) {
573- void this . messenger . sendAuthNeededExceptionMessage ( authState , message . tabID )
570+ void this . messenger . sendAuthNeededExceptionMessage ( authState , tabID )
574571 this . sessionStorage . getSession ( ) . isAuthenticating = true
575572 return
576573 }
577574
578575 // give user a non-blocking warning if build file appears to contain absolute paths
579576 await parseBuildFile ( )
580577
581- this . messenger . sendAsyncEventProgress (
582- message . tabID ,
583- true ,
584- undefined ,
585- GumbyNamedMessages . JOB_SUBMISSION_STATUS_MESSAGE
586- )
587- this . messenger . sendJobSubmittedMessage ( message . tabID )
578+ this . messenger . sendAsyncEventProgress ( tabID , true , undefined , GumbyNamedMessages . JOB_SUBMISSION_STATUS_MESSAGE )
579+ this . messenger . sendJobSubmittedMessage ( tabID )
588580 this . sessionStorage . getSession ( ) . conversationState = ConversationState . JOB_SUBMITTED
589581 await startTransformByQ ( )
590582 }
@@ -705,7 +697,7 @@ export class GumbyController {
705697 const pathToJavaHome = extractPath ( data . message )
706698 if ( pathToJavaHome ) {
707699 transformByQState . setTargetJavaHome ( pathToJavaHome )
708- this . messenger . sendPermissionToBuildMessage ( data . tabID )
700+ await this . prepareLanguageUpgradeProject ( data . tabID ) // build right after we get target JDK path
709701 } else {
710702 this . messenger . sendUnrecoverableErrorResponse ( 'invalid-java-home' , data . tabID )
711703 }
0 commit comments