Skip to content

Commit 450c28a

Browse files
authored
Merge pull request #7460 from dhasani23/enablePAW
feat(amazonq): enable agentic workflow
1 parent 6e29cea commit 450c28a

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
@@ -739,7 +739,7 @@ dependencyManagement:
739739
- identifier: "com.example:library1"
740740
targetVersion: "2.1.0"
741741
versionProperty: "library1.version" # Optional
742-
originType: "FIRST_PARTY" # or "THIRD_PARTY" # Optional
742+
originType: "FIRST_PARTY" # or "THIRD_PARTY"
743743
- identifier: "com.example:library2"
744744
targetVersion: "3.0.0"
745745
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
@@ -655,9 +655,11 @@ export const enterJavaHomePlaceholder = 'Enter the path to your Java installatio
655655

656656
export const openNewTabPlaceholder = 'Open a new tab to chat with Q'
657657

658-
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.`
658+
export const jobCompletedChatMessage = (version: string) =>
659+
`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.`
659660

660-
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.`
661+
export const jobCompletedNotification = (version: string) =>
662+
`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.`
661663

662664
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.`
663665

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,8 @@ export class ZipManifest {
676676
version: string = '1.0'
677677
hilCapabilities: string[] = ['HIL_1pDependency_VersionUpgrade']
678678
// TO-DO: add 'CLIENT_SIDE_BUILD' here when releasing
679-
// TO-DO: add something like AGENTIC_PLAN_V1 here when BE allowlists everyone
680-
transformCapabilities: string[] = ['EXPLAINABILITY_V1']
679+
transformCapabilities: string[] = ['EXPLAINABILITY_V1', 'SELECTIVE_TRANSFORMATION_V2']
680+
noInteractiveMode: boolean = true
681681
customBuildCommand: string = 'clean test'
682682
requestedConversions?: {
683683
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)