Skip to content

Commit 7c255f3

Browse files
committed
update button text for the case to continue
1 parent ace7b9a commit 7c255f3

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

packages/amazonq/test/e2e/amazonq/featureDev.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,16 @@ describe('Amazon Q Feature Dev', function () {
314314
insertCodeButton = tab.getFollowUpButton(FollowUpTypes.InsertCode)
315315
assert.ok(insertCodeButton.pillText === 'Accept remaining changes')
316316
})
317+
318+
it('shows "Continue" when all files are either accepted or rejected, with at least one of them rejected', async () => {
319+
const filePaths = tab.getFilePaths()
320+
for (const filePath of filePaths) {
321+
await clickActionButton(filePath, 'reject-change')
322+
}
323+
324+
const insertCodeButton = tab.getFollowUpButton(FollowUpTypes.InsertCode)
325+
assert.ok(insertCodeButton.pillText === 'Continue')
326+
})
317327
})
318328

319329
it('disappears and automatically moves on to the next step when all changes are accepted', async () => {

packages/core/package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@
312312
"AWS.amazonq.featureDev.pillText.generatingCode": "Generating code...",
313313
"AWS.amazonq.featureDev.pillText.requestingChanges": "Requesting changes ...",
314314
"AWS.amazonq.featureDev.pillText.insertCode": "Accept code",
315+
"AWS.amazonq.featureDev.pillText.continue": "Continue",
315316
"AWS.amazonq.featureDev.pillText.acceptAllChanges": "Accept all changes",
316317
"AWS.amazonq.featureDev.pillText.acceptRemainingChanges": "Accept remaining changes",
317318
"AWS.amazonq.featureDev.pillText.stoppingCodeGeneration": "Stopping code generation...",

packages/core/src/amazonqFeatureDev/session/session.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,13 @@ export class Session {
157157
public async updateFilesPaths(params: UpdateFilesPathsParams) {
158158
const { tabID, filePaths, deletedFiles, messageId, disableFileActions = false } = params
159159
this.messenger.updateFileComponent(tabID, filePaths, deletedFiles, messageId, disableFileActions)
160-
if ([...filePaths, ...deletedFiles].some((file) => file.rejected || file.changeApplied)) {
161-
await this.updateChatAnswer(tabID, i18n('AWS.amazonq.featureDev.pillText.acceptRemainingChanges'))
160+
const allFiles = [...filePaths, ...deletedFiles]
161+
if (allFiles.some((file) => file.rejected || file.changeApplied)) {
162+
if (allFiles.every((file) => file.rejected || file.changeApplied)) {
163+
await this.updateChatAnswer(tabID, i18n('AWS.amazonq.featureDev.pillText.continue'))
164+
} else {
165+
await this.updateChatAnswer(tabID, i18n('AWS.amazonq.featureDev.pillText.acceptRemainingChanges'))
166+
}
162167
} else {
163168
await this.updateChatAnswer(tabID, i18n('AWS.amazonq.featureDev.pillText.acceptAllChanges'))
164169
}

0 commit comments

Comments
 (0)