Skip to content

Commit 384d066

Browse files
Merge master into feature/flare-mega
2 parents 0993bd8 + 450c28a commit 384d066

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ dependencyManagement:
735735
- identifier: "com.example:library1"
736736
targetVersion: "2.1.0"
737737
versionProperty: "library1.version" # Optional
738-
originType: "FIRST_PARTY" # or "THIRD_PARTY" # Optional
738+
originType: "FIRST_PARTY" # or "THIRD_PARTY"
739739
- identifier: "com.example:library2"
740740
targetVersion: "3.0.0"
741741
originType: "THIRD_PARTY"

packages/core/src/codewhisperer/commands/startTransformByQ.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ export async function postTransformationJob() {
677677

678678
let chatMessage = transformByQState.getJobFailureErrorChatMessage()
679679
if (transformByQState.isSucceeded()) {
680-
chatMessage = CodeWhispererConstants.jobCompletedChatMessage
680+
chatMessage = CodeWhispererConstants.jobCompletedChatMessage(transformByQState.getTargetJDKVersion() ?? '')
681681
} else if (transformByQState.isPartiallySucceeded()) {
682682
chatMessage = CodeWhispererConstants.jobPartiallyCompletedChatMessage
683683
}
@@ -708,9 +708,12 @@ export async function postTransformationJob() {
708708
}
709709

710710
if (transformByQState.isSucceeded()) {
711-
void vscode.window.showInformationMessage(CodeWhispererConstants.jobCompletedNotification, {
712-
title: localizedText.ok,
713-
})
711+
void vscode.window.showInformationMessage(
712+
CodeWhispererConstants.jobCompletedNotification(transformByQState.getTargetJDKVersion() ?? ''),
713+
{
714+
title: localizedText.ok,
715+
}
716+
)
714717
} else if (transformByQState.isPartiallySucceeded()) {
715718
void vscode.window
716719
.showInformationMessage(

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,11 @@ export const enterJavaHomePlaceholder = 'Enter the path to your Java installatio
649649

650650
export const openNewTabPlaceholder = 'Open a new tab to chat with Q'
651651

652-
export const jobCompletedChatMessage = `I completed your transformation. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the changes I'm proposing.`
652+
export const jobCompletedChatMessage = (version: string) =>
653+
`I completed your transformation. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the changes I'm proposing. If you want to upgrade additional libraries and other dependencies, run /transform with the transformed code and specify ${version} as the source and target version.`
653654

654-
export const jobCompletedNotification = `Amazon Q transformed your code. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the changes.`
655+
export const jobCompletedNotification = (version: string) =>
656+
`Amazon Q transformed your code. You can review the diff to see my proposed changes and accept or reject them. The transformation summary has details about the changes. If you want to upgrade additional libraries and other dependencies, run /transform with the transformed code and specify ${version} as the source and target version.`
655657

656658
export const jobPartiallyCompletedChatMessage = `I transformed part of your code. 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.`
657659

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,8 @@ export class ZipManifest {
683683
version: string = '1.0'
684684
hilCapabilities: string[] = ['HIL_1pDependency_VersionUpgrade']
685685
// TO-DO: add 'CLIENT_SIDE_BUILD' here when releasing
686-
// TO-DO: add something like AGENTIC_PLAN_V1 here when BE allowlists everyone
687-
transformCapabilities: string[] = ['EXPLAINABILITY_V1']
686+
transformCapabilities: string[] = ['EXPLAINABILITY_V1', 'SELECTIVE_TRANSFORMATION_V2']
687+
noInteractiveMode: boolean = true
688688
customBuildCommand: string = 'clean test'
689689
requestedConversions?: {
690690
sqlConversion?: {

packages/core/src/test/codewhisperer/commands/transformByQ.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ dependencyManagement:
392392
const manifestText = manifestBuffer.toString('utf8')
393393
const manifest = JSON.parse(manifestText)
394394
assert.strictEqual(manifest.customBuildCommand, CodeWhispererConstants.skipUnitTestsBuildCommand)
395+
assert.strictEqual(manifest.noInteractiveMode, true)
396+
assert.strictEqual(manifest.transformCapabilities.includes('SELECTIVE_TRANSFORMATION_V2'), true)
395397
})
396398
})
397399

0 commit comments

Comments
 (0)