|
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([ |
@@ -483,6 +481,8 @@ I can now divide the transformation results into diff patches (if applicable to |
483 | 481 | • Testing Tools Frameworks: Testing tools like ArchUnit, Mockito, and TestContainers and build tools like Jenkins and Maven Wrapper. |
484 | 482 |
|
485 | 483 | • Miscellaneous Processing Documentation: Upgrades ORMs, XML processing, and Swagger to SpringDoc/OpenAPI. |
| 484 | +
|
| 485 | +• Deprecated API replacement and dependency upgrades: Replaces deprecated APIs and makes additional dependency version upgrades. |
486 | 486 | ` |
487 | 487 |
|
488 | 488 | export const uploadingCodeStepMessage = 'Upload your code' |
@@ -621,19 +621,19 @@ export const diffMessage = (multipleDiffs: boolean) => { |
621 | 621 | } |
622 | 622 |
|
623 | 623 | export const jobCompletedChatMessage = (multipleDiffsString: string) => { |
624 | | - return `I upgraded your code. ${multipleDiffsString} The transformation summary has details about the files I updated.` |
| 624 | + return `I transformed your code. ${multipleDiffsString} The transformation summary has details about the files I updated.` |
625 | 625 | } |
626 | 626 |
|
627 | 627 | export const jobCompletedNotification = (multipleDiffsString: string) => { |
628 | | - return `Amazon Q upgraded your code. ${multipleDiffsString} The transformation summary has details about the files I updated.` |
| 628 | + return `Amazon Q transformed your code. ${multipleDiffsString} The transformation summary has details about the files I updated.` |
629 | 629 | } |
630 | 630 |
|
631 | 631 | export const jobPartiallyCompletedChatMessage = (multipleDiffsString: string) => { |
632 | | - 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.` |
| 632 | + 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.` |
633 | 633 | } |
634 | 634 |
|
635 | 635 | export const jobPartiallyCompletedNotification = (multipleDiffsString: string) => { |
636 | | - 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.` |
| 636 | + 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.` |
637 | 637 | } |
638 | 638 |
|
639 | 639 | export const noPomXmlFoundChatMessage = `I couldn\'t find a project that I can upgrade. I couldn\'t find a pom.xml file in any of your open projects, nor could I find any embedded SQL statements. Currently, I can upgrade Java 8 or Java 11 projects built on Maven, or Oracle SQL to PostgreSQL statements in Java projects. For more information, see the [Amazon Q documentation](${codeTransformPrereqDoc}).` |
@@ -685,14 +685,13 @@ export const changesAppliedChatMessageMultipleDiffs = ( |
685 | 685 |
|
686 | 686 | export const changesAppliedNotificationOneDiff = 'Amazon Q applied the changes to your project' |
687 | 687 |
|
688 | | -export const changesAppliedNotificationMultipleDiffs = ( |
689 | | - currentPatchIndex: number, |
690 | | - totalPatchFiles: number, |
691 | | - patchFilesDescriptions: DescriptionContent | undefined |
692 | | -) => |
693 | | - patchFilesDescriptions |
694 | | - ? `Amazon Q applied the changes in diff patch ${currentPatchIndex + 1} of ${totalPatchFiles} to your project.` |
695 | | - : 'Amazon Q applied the changes to your project.' |
| 688 | +export const changesAppliedNotificationMultipleDiffs = (currentPatchIndex: number, totalPatchFiles: number) => { |
| 689 | + if (totalPatchFiles === 1) { |
| 690 | + return 'Amazon Q applied the changes to your project.' |
| 691 | + } else { |
| 692 | + return `Amazon Q applied the changes in diff patch ${currentPatchIndex + 1} of ${totalPatchFiles} to your project.` |
| 693 | + } |
| 694 | +} |
696 | 695 |
|
697 | 696 | 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}).` |
698 | 697 |
|
|
0 commit comments