Skip to content

Commit bb586b8

Browse files
committed
fix(amazonq): rely on server-side data to communicate number of code generations remaining
1 parent 4b7555f commit bb586b8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/controller/FeatureDevControllerExtensions.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ suspend fun FeatureDevController.onCodeGeneration(
133133
messageType = FeatureDevMessageType.Answer,
134134
message =
135135
if (remainingIterations > 2) {
136-
message("amazonqFeatureDev.code_generation.iteration_or_feedback")
136+
message("amazonqFeatureDev.code_generation.ask_to_add_code_or_feedback")
137137
} else if (remainingIterations > 0) {
138138
message(
139139
"amazonqFeatureDev.code_generation.iteration_counts",
@@ -142,7 +142,7 @@ suspend fun FeatureDevController.onCodeGeneration(
142142
)
143143
} else {
144144
message(
145-
"amazonqFeatureDev.code_generation.iteration_no_display",
145+
"amazonqFeatureDev.code_generation.ask_to_add_code",
146146
remainingIterations,
147147
totalIterations,
148148
)
@@ -254,7 +254,7 @@ private suspend fun disposeToken(
254254
tabId = tabId,
255255
messageType = FeatureDevMessageType.Answer,
256256
message =
257-
message("amazonqFeatureDev.code_generation.stopped_code_generation_no_display",),
257+
message("amazonqFeatureDev.code_generation.stopped_code_generation_no_iteration_count",),
258258
)
259259
}
260260

plugins/core/resources/resources/software/aws/toolkits/resources/MessagesBundle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ amazonqFeatureDev.code_generation.failed_generation=Code generation failed
8686
amazonqFeatureDev.code_generation.generating_code=Generating code ...
8787
amazonqFeatureDev.code_generation.iteration_counts=Would you like me to add this code to your project, or provide feedback for new code? You have {0} out of {1} code generations left.
8888
amazonqFeatureDev.code_generation.iteration_limit.error_text=Sorry, you've reached the quota for number of iterations on code generation. You can insert this code in your files or discuss a new plan. For more information on quotas, see the [Amazon Q Developer documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/software-dev.html#quotas).
89-
amazonqFeatureDev.code_generation.iteration_or_feedback=Would you like me to add this code to your project, or provide feedback for new code?
90-
amazonqFeatureDev.code_generation.iteration_no_display=Would you like me to add this code to your project?
89+
amazonqFeatureDev.code_generation.ask_to_add_code_or_feedback=Would you like me to add this code to your project, or provide feedback for new code?
90+
amazonqFeatureDev.code_generation.ask_to_add_code=Would you like me to add this code to your project?
9191
amazonqFeatureDev.code_generation.no_file_changes=Unable to generate any file changes
9292
amazonqFeatureDev.code_generation.no_retries.error_message=I'm sorry, I'm having trouble generating your code and can't continue at the moment. Please try again later, and share feedback to help me improve.
9393
amazonqFeatureDev.code_generation.notification_message=Your code suggestions from Amazon Q are ready to review
9494
amazonqFeatureDev.code_generation.notification_open_link=Open chat
9595
amazonqFeatureDev.code_generation.notification_title=Amazon Q Developer Agent for software development
9696
amazonqFeatureDev.code_generation.provide_code_feedback=How can I improve the code for your use case?
9797
amazonqFeatureDev.code_generation.stopped_code_generation=I stopped generating your code. If you want to continue working on this task, provide another description. You have {0} out of {1} code generations left.
98-
amazonqFeatureDev.code_generation.stopped_code_generation_no_display=I stopped generating your code. If you want to continue working on this task, provide another description.
98+
amazonqFeatureDev.code_generation.stopped_code_generation_no_iteration_count_display=I stopped generating your code. If you want to continue working on this task, provide another description.
9999
amazonqFeatureDev.code_generation.stopped_code_generation_no_iterations=I stopped generating your code. You don't have more iterations left, however, you can start a new session.
100100
amazonqFeatureDev.code_generation.stopping_code_generation=Stopping code generation...
101101
amazonqFeatureDev.code_generation.updated_code=Okay, I updated your code files. Would you like to work on another task?

0 commit comments

Comments
 (0)