Skip to content

Commit c8dca37

Browse files
author
David Hasani
committed
update strings
1 parent e8c05d0 commit c8dca37

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

packages/core/src/amazonqGumby/chat/controller/messenger/messenger.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ export class Messenger {
177177
this.dispatcher.sendAsyncEventProgress(
178178
new AsyncEventProgressMessage(tabID, {
179179
inProgress: true,
180-
message: CodeWhispererConstants.userPatchDescriptionChatMessage,
180+
message: CodeWhispererConstants.userPatchDescriptionChatMessage(
181+
transformByQState.getTargetJDKVersion()
182+
),
181183
})
182184
)
183185

packages/core/src/codewhisperer/models/constants.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ export const AWSTemplateKeyWords = ['AWSTemplateFormatVersion', 'Resources', 'AW
2222

2323
export const AWSTemplateCaseInsensitiveKeyWords = ['cloudformation', 'cfn', 'template', 'description']
2424

25-
// TO-DO: update this for Java 21 support?
25+
// TO-DO: make sure all Strings work for Java 21
2626
const patchDescriptions: { [key: string]: string } = {
2727
'Prepare minimal upgrade to Java 17':
28-
'This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks.',
28+
'This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks in Java 17.',
29+
'Prepare minimal upgrade to Java 21':
30+
'This diff patch covers the set of upgrades for Springboot, JUnit, and PowerMockito frameworks in Java 21.',
2931
'Popular Enterprise Specifications and Application Frameworks upgrade':
3032
'This diff patch covers the set of upgrades for Jakarta EE 10, Hibernate 6.2, and Micronaut 3.',
3133
'HTTP Client Utilities, Apache Commons Utilities, and Web Frameworks':
@@ -502,16 +504,14 @@ export const codeTransformLocThreshold = 100000
502504
export const jobStartedChatMessage =
503505
'I am starting to transform your code. It can take 10 to 30 minutes to upgrade your code, depending on the size of your project. To monitor progress, go to the Transformation Hub. If I run into any issues, I might pause the transformation to get input from you on how to proceed.'
504506

505-
// TO-DO: update for Java 21 support
506-
export const chooseTransformationObjective = `I can help you with the following tasks:\n- Upgrade your Java 8 and Java 11 codebases to Java 17, or upgrade Java 17 code with up to date libraries and other dependencies.\n- Convert embedded SQL code for Oracle to PostgreSQL database migrations in AWS DMS.\n\nWhat would you like to do? You can enter "language upgrade" or "sql conversion".`
507+
export const chooseTransformationObjective = `I can help you with the following tasks:\n- Upgrade your Java 8, Java 11, and Java 17 codebases to Java 17 or Java 21.\n- Upgrade Java 17 or Java 21 code with up-to-date libraries and other dependencies.\n- Convert embedded SQL code for Oracle to PostgreSQL database migrations in AWS DMS.\n\nWhat would you like to do? You can enter "language upgrade" or "sql conversion".`
507508

508509
export const chooseTransformationObjectivePlaceholder = 'Enter "language upgrade" or "sql conversion"'
509510

510-
// TO-DO: update for Java 21 support
511-
export const userPatchDescriptionChatMessage = `
512-
If you'd like to update and test your code with fewer changes at a time, I can divide the transformation results into separate diff patches. If applicable to your application, I can split up the diffs up into the following groups of upgrades. Here are the upgrades included in each diff:
511+
export const userPatchDescriptionChatMessage = (version: string) => `
512+
If you would like to update and test your code with fewer changes at a time, I can divide the transformation results into separate diff patches. If applicable to your application, I can split up the diffs up into the following groups of upgrades. Here are the upgrades included in each diff:
513513
514-
• Minimal Compatible Library Upgrade to Java 17: Dependencies to the minimum compatible versions in Java 17, including Springboot, JUnit, and PowerMockito.
514+
• Minimal Compatible Library Upgrade to Java ${version}: Dependencies to the minimum compatible versions in Java ${version}, including Springboot, JUnit, and PowerMockito.
515515
516516
• Popular Enterprise Specifications Application Frameworks: Popular enterprise and application frameworks like Jakarta EE, Hibernate, and Micronaut 3.
517517
@@ -596,7 +596,7 @@ export const invalidMetadataFileErrorParsing =
596596
export const invalidMetadataFileNoSctFile =
597597
"An .sct file is required for transformation. Make sure that you've uploaded the .zip file you retrieved from your schema conversion in AWS DMS."
598598

599-
export const invalidFromToJdkChatMessage = 'I cannot transform a project from Java 21 to Java 17.'
599+
export const invalidFromToJdkChatMessage = "I don't support transforming a project from Java 21 to Java 17."
600600

601601
export const sqlMetadataFileReceived =
602602
'I found the following source database, target database, and host based on the schema conversion metadata you provided:'

0 commit comments

Comments
 (0)