Skip to content

Commit ca82e1a

Browse files
author
David Hasani
committed
add transformation type check
1 parent 6670f19 commit ca82e1a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/core/src/codewhisperer/service/transformByQ/transformApiHandler.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,8 @@ export async function getTransformationPlan(jobId: string, profile: RegionProfil
617617

618618
const stepZeroProgressUpdates = response.transformationPlan.transformationSteps[0].progressUpdates
619619

620+
console.log('stepZeroProgressUpdates', JSON.stringify(stepZeroProgressUpdates))
621+
620622
if (!stepZeroProgressUpdates || stepZeroProgressUpdates.length === 0) {
621623
// means backend API response wrong and table data is missing
622624
throw new Error('No progress updates found in step 0')
@@ -721,7 +723,10 @@ export async function pollTransformationJob(jobId: string, validStates: string[]
721723
)
722724
}
723725

724-
if (CodeWhispererConstants.validStatesForPlanGenerated.includes(status)) {
726+
if (
727+
CodeWhispererConstants.validStatesForPlanGenerated.includes(status) &&
728+
transformByQState.getTransformationType() === TransformationType.LANGUAGE_UPGRADE
729+
) {
725730
await openTransformationPlan(jobId, profile)
726731
}
727732

0 commit comments

Comments
 (0)