Skip to content

Commit 2c92f5c

Browse files
committed
fix(amazonqFeatureDev): allow follow up options after finally only
1 parent 675c623 commit 2c92f5c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/core/package.nls.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@
296296
"AWS.amazonq.featureDev.pillText.generatingCode": "Generating code...",
297297
"AWS.amazonq.featureDev.pillText.requestingChanges": "Requesting changes ...",
298298
"AWS.amazonq.featureDev.pillText.insertCode": "Accept code",
299-
"AWS.amazonq.featureDev.pillText.stoppedCodeGeneration": "You've stopped the code generation.",
299+
"AWS.amazonq.featureDev.pillText.stoppingCodeGeneration": "Stopping code generation ...",
300+
"AWS.amazonq.featureDev.pillText.stoppedCodeGeneration": "The code generation has stopped.",
300301
"AWS.amazonq.featureDev.pillText.sendFeedback": "Send feedback",
301302
"AWS.amazonq.featureDev.pillText.selectFiles": "Select files for context",
302303
"AWS.amazonq.featureDev.pillText.retry": "Retry",

packages/core/src/amazonqFeatureDev/controllers/chat/controller.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ export class FeatureDevController {
425425

426426
if (session?.state?.tokenSource?.token.isCancellationRequested) {
427427
this.disposeToken(session)
428+
this.workOnNewTask(session)
428429
} else {
429430
this.messenger.sendAsyncEventProgress(tabID, false, undefined)
430431

@@ -446,6 +447,11 @@ export class FeatureDevController {
446447
}
447448
}
448449
private workOnNewTask(message: any) {
450+
this.messenger.sendAnswer({
451+
message: i18n('AWS.amazonq.featureDev.pillText.stoppedCodeGeneration'),
452+
type: 'answer-part',
453+
tabID: message.tabID,
454+
})
449455
this.messenger.sendAnswer({
450456
type: 'system-prompt',
451457
tabID: message.tabID,
@@ -713,11 +719,10 @@ export class FeatureDevController {
713719

714720
private async stopResponse(message: any) {
715721
this.messenger.sendAnswer({
716-
message: i18n('AWS.amazonq.featureDev.pillText.stoppedCodeGeneration'),
722+
message: i18n('AWS.amazonq.featureDev.pillText.stoppingCodeGeneration'),
717723
type: 'answer-part',
718724
tabID: message.tabID,
719725
})
720-
this.workOnNewTask(message)
721726
const session = await this.sessionStorage.getSession(message.tabID)
722727
if (session.state?.tokenSource) {
723728
session.state?.tokenSource?.cancel()

0 commit comments

Comments
 (0)