in packages/core/src/amazonqGumby/chat/controller/controller.ts [355:429]
private async formActionClicked(message: any) {
const typedAction = MessengerUtils.stringToEnumValue(ButtonActions, message.action as any)
switch (typedAction) {
case ButtonActions.CONFIRM_LANGUAGE_UPGRADE_TRANSFORMATION_FORM:
await this.handleUserLanguageUpgradeProjectChoice(message)
break
case ButtonActions.CANCEL_TRANSFORMATION_FORM:
telemetry.codeTransform_submitSelection.run(() => {
telemetry.record({
codeTransformSessionId: CodeTransformTelemetryState.instance.getSessionId(),
userChoice: 'Cancel',
})
this.transformationFinished({
message: CodeWhispererConstants.jobCancelledChatMessage,
tabID: message.tabID,
includeStartNewTransformationButton: true,
})
})
break
case ButtonActions.CONFIRM_SKIP_TESTS_FORM:
await this.handleSkipTestsSelection(message)
break
case ButtonActions.CONFIRM_SELECTIVE_TRANSFORMATION_FORM:
await this.handleOneOrMultipleDiffs(message)
break
case ButtonActions.CONFIRM_SQL_CONVERSION_TRANSFORMATION_FORM:
await this.handleUserSQLConversionProjectSelection(message)
break
case ButtonActions.SELECT_SQL_CONVERSION_METADATA_FILE:
await this.processMetadataFile(message)
break
case ButtonActions.SELECT_CUSTOM_DEPENDENCY_VERSION_FILE:
await this.processCustomDependencyVersionFile(message)
break
case ButtonActions.CONTINUE_TRANSFORMATION_FORM:
this.messenger.sendMessage(
CodeWhispererConstants.continueWithoutYamlMessage,
message.tabID,
'ai-prompt'
)
transformByQState.setCustomDependencyVersionFilePath('')
this.promptJavaHome('source', message.tabID)
break
case ButtonActions.VIEW_TRANSFORMATION_HUB:
await vscode.commands.executeCommand(GumbyCommands.FOCUS_TRANSFORMATION_HUB, CancelActionPositions.Chat)
break
case ButtonActions.VIEW_SUMMARY:
await vscode.commands.executeCommand('aws.amazonq.transformationHub.summary.reveal')
break
case ButtonActions.STOP_TRANSFORMATION_JOB:
await stopTransformByQ(transformByQState.getJobId())
await postTransformationJob()
await cleanupTransformationJob()
break
case ButtonActions.CONFIRM_START_TRANSFORMATION_FLOW:
this.resetTransformationChatFlow()
this.messenger.sendCommandMessage({ ...message, command: GumbyCommands.CLEAR_CHAT })
await this.transformInitiated(message)
break
case ButtonActions.CONFIRM_DEPENDENCY_FORM:
await this.continueJobWithSelectedDependency(message)
break
case ButtonActions.CANCEL_DEPENDENCY_FORM:
this.messenger.sendMessage('Cancel', message.tabID, 'prompt')
await this.continueTransformationWithoutHIL(message)
break
case ButtonActions.OPEN_FILE:
await openHilPomFile()
break
case ButtonActions.OPEN_BUILD_LOG:
await openBuildLogFile()
this.messenger.sendViewBuildLog(message.tabID)
break
}
}