Skip to content

Commit 61b088b

Browse files
committed
updated messaging for one or multiple diffs when job success/partial success
1 parent 9b6c1d4 commit 61b088b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/constants/CodeTransformChatItems.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,10 +432,18 @@ fun buildTransformResultChatContent(result: CodeModernizerJobCompletedResult, to
432432
buildZipUploadFailedChatMessage(result.failureReason)
433433
}
434434
is CodeModernizerJobCompletedResult.JobCompletedSuccessfully -> {
435-
message("codemodernizer.chat.message.result.success")
435+
if (totalPatchFiles == 1){
436+
message("codemodernizer.chat.message.result.success")
437+
} else {
438+
message("codemodernizer.chat.message.result.success.multiple_diffs")
439+
}
436440
}
437441
is CodeModernizerJobCompletedResult.JobPartiallySucceeded -> {
438-
message("codemodernizer.chat.message.result.partially_success")
442+
if (totalPatchFiles == 1){
443+
message("codemodernizer.chat.message.result.partially_success")
444+
} else {
445+
message("codemodernizer.chat.message.result.partially_success.multiple_diffs")
446+
}
439447
}
440448
is CodeModernizerJobCompletedResult.JobFailed -> {
441449
message("codemodernizer.chat.message.result.fail_with_known_reason", result.failureReason)

plugins/core/resources/resources/software/aws/toolkits/resources/MessagesBundle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,9 @@ codemodernizer.chat.message.result.fail_initial_build=I am having trouble buildi
611611
codemodernizer.chat.message.result.fail_initial_build_no_build_log=I am having trouble building your project in the secure build environment: {0}.
612612
codemodernizer.chat.message.result.fail_with_known_reason=Sorry, I couldn''t complete the transformation. {0}
613613
codemodernizer.chat.message.result.partially_success=I upgraded part of your code to Java 17. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the files I updated and the errors that prevented a complete transformation.
614+
codemodernizer.chat.message.result.partially_success.multiple_diffs= I upgraded part of your code to Java 17. You can review the diff to see my proposed changes and accept or reject them. If you reject the diff, you will not be able to see the diffs later. The transformation summary has details about the files I updated and the errors that prevented a complete transformation.
614615
codemodernizer.chat.message.result.success=I successfully upgraded your code to Java 17. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the files I updated.
616+
codemodernizer.chat.message.result.success.multiple_diffs=I successfully upgraded your code to Java 17. You can review the diff to see my proposed changes and accept or reject them. If you reject the diff, you will not be able to see the diffs later. The transformation summary has details about the files I updated.
615617
codemodernizer.chat.message.result.zip_too_large=Sorry, your project size exceeds the Amazon Q Code Transformation upload limit of 2GB.
616618
codemodernizer.chat.message.resume_ongoing=I'm still transforming your code. It can take 10 to 30 minutes to upgrade your code, depending on the size of your module. To monitor progress, go to the Transformation Hub.
617619
codemodernizer.chat.message.skip_tests=I will build your module using `mvn test` by default. If you would like me to build your module without running unit tests, I will use `mvn test-compile`.

0 commit comments

Comments
 (0)