|
3 | 3 | * SPDX-License-Identifier: Apache-2.0 |
4 | 4 | */ |
5 | 5 |
|
6 | | -import { DescriptionContent } from '..' |
7 | | - |
8 | 6 | /** |
9 | 7 | * Automated and manual trigger |
10 | 8 | */ |
@@ -35,8 +33,8 @@ const patchDescriptions: { [key: string]: string } = { |
35 | 33 | 'This diff patch covers the set of upgrades for ArchUnit, Mockito, TestContainers, Cucumber, and additionally, Jenkins plugins and the Maven Wrapper.', |
36 | 34 | 'Miscellaneous Processing Documentation upgrade': |
37 | 35 | 'This diff patch covers a diverse set of upgrades spanning ORMs, XML processing, API documentation, and more.', |
38 | | - 'Upgrade Deprecated API': '', |
39 | | - 'Updated dependencies to latest version': '', |
| 36 | + 'Deprecated API replacement and dependency upgrades': |
| 37 | + 'This diff patch replaces deprecated APIs and makes additional dependency version upgrades.', |
40 | 38 | } |
41 | 39 |
|
42 | 40 | export const JsonConfigFileNamingConvention = new Set([ |
@@ -479,6 +477,8 @@ I can now divide the transformation results into diff patches (if applicable to |
479 | 477 | • Testing Tools Frameworks: Testing tools like ArchUnit, Mockito, and TestContainers and build tools like Jenkins and Maven Wrapper. |
480 | 478 |
|
481 | 479 | • Miscellaneous Processing Documentation: Upgrades ORMs, XML processing, and Swagger to SpringDoc/OpenAPI. |
| 480 | +
|
| 481 | +• Deprecated API replacement and dependency upgrades: Replaces deprecated APIs and makes additional dependency version upgrades. |
482 | 482 | ` |
483 | 483 |
|
484 | 484 | export const uploadingCodeStepMessage = 'Upload your code' |
@@ -616,19 +616,19 @@ export const diffMessage = (multipleDiffs: boolean) => { |
616 | 616 | } |
617 | 617 |
|
618 | 618 | export const jobCompletedChatMessage = (multipleDiffsString: string) => { |
619 | | - return `I upgraded your code. ${multipleDiffsString} The transformation summary has details about the files I updated.` |
| 619 | + return `I transformed your code. ${multipleDiffsString} The transformation summary has details about the files I updated.` |
620 | 620 | } |
621 | 621 |
|
622 | 622 | export const jobCompletedNotification = (multipleDiffsString: string) => { |
623 | | - return `Amazon Q upgraded your code. ${multipleDiffsString} The transformation summary has details about the files I updated.` |
| 623 | + return `Amazon Q transformed your code. ${multipleDiffsString} The transformation summary has details about the files I updated.` |
624 | 624 | } |
625 | 625 |
|
626 | 626 | export const jobPartiallyCompletedChatMessage = (multipleDiffsString: string) => { |
627 | | - return `I upgraded part of your code. ${multipleDiffsString} The transformation summary has details about the files I updated and the errors that prevented a complete transformation.` |
| 627 | + return `I transformed part of your code. ${multipleDiffsString} The transformation summary has details about the files I updated and the errors that prevented a complete transformation.` |
628 | 628 | } |
629 | 629 |
|
630 | 630 | export const jobPartiallyCompletedNotification = (multipleDiffsString: string) => { |
631 | | - return `Amazon Q upgraded part of your code. ${multipleDiffsString} The transformation summary has details about the files I updated and the errors that prevented a complete transformation.` |
| 631 | + return `Amazon Q transformed part of your code. ${multipleDiffsString} The transformation summary has details about the files I updated and the errors that prevented a complete transformation.` |
632 | 632 | } |
633 | 633 |
|
634 | 634 | export const noPomXmlFoundChatMessage = `I couldn\'t find a project that I can upgrade. Your Java project must be built on Maven and contain a pom.xml file. For more information, see the [Amazon Q documentation](${codeTransformPrereqDoc}).` |
@@ -680,14 +680,13 @@ export const changesAppliedChatMessageMultipleDiffs = ( |
680 | 680 |
|
681 | 681 | export const changesAppliedNotificationOneDiff = 'Amazon Q applied the changes to your project' |
682 | 682 |
|
683 | | -export const changesAppliedNotificationMultipleDiffs = ( |
684 | | - currentPatchIndex: number, |
685 | | - totalPatchFiles: number, |
686 | | - patchFilesDescriptions: DescriptionContent | undefined |
687 | | -) => |
688 | | - patchFilesDescriptions |
689 | | - ? `Amazon Q applied the changes in diff patch ${currentPatchIndex + 1} of ${totalPatchFiles} to your project.` |
690 | | - : 'Amazon Q applied the changes to your project.' |
| 683 | +export const changesAppliedNotificationMultipleDiffs = (currentPatchIndex: number, totalPatchFiles: number) => { |
| 684 | + if (totalPatchFiles === 1) { |
| 685 | + return 'Amazon Q applied the changes to your project.' |
| 686 | + } else { |
| 687 | + return `Amazon Q applied the changes in diff patch ${currentPatchIndex + 1} of ${totalPatchFiles} to your project.` |
| 688 | + } |
| 689 | +} |
691 | 690 |
|
692 | 691 | export const noOpenProjectsFoundChatMessage = `I couldn\'t find a project that I can upgrade. Currently, I support Java 8, Java 11, and Java 17 projects built on Maven. Make sure your project is open in the IDE. For more information, see the [Amazon Q documentation](${codeTransformPrereqDoc}).` |
693 | 692 |
|
|
0 commit comments