Skip to content

Commit 5fa8e42

Browse files
authored
feat(amazonq): add error message if updated README is too large (#5253)
* feat(amazonq): add error message if updated README is too large
1 parent a99ede3 commit 5fa8e42

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "feature",
3+
"description" : "/doc: Add error message if updated README is too large"
4+
}

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/session/DocGenerationState.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ private suspend fun DocGenerationState.generateCode(codeGenerationId: String, mo
179179
),
180180
-> docServiceError(message("amazonqDoc.exception.readme_too_large"))
181181

182+
codeGenerationResultState.codeGenerationStatusDetail()?.contains(
183+
"README_UPDATE_TOO_LARGE"
184+
),
185+
-> docServiceError(message("amazonqDoc.exception.readme_update_too_large"))
186+
182187
codeGenerationResultState.codeGenerationStatusDetail()?.contains(
183188
"WORKSPACE_TOO_LARGE"
184189
),

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ amazonqDoc.exception.no_change_required=I couldn't find any code changes to upda
5050
amazonqDoc.exception.prompt_too_vague=I need more information to make changes to your README. Try providing some of the following details:\n- Which sections you want to modify\n- The content you want to add or remove\n- Specific issues that need correcting\n\nFor more information on prompt best practices, see the <a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/doc-generation.html" target="_blank">Amazon Q Developer documentation.</a>
5151
amazonqDoc.exception.prompt_unrelated=These changes don't seem related to documentation. Try describing your changes again, using the following best practices:\n- Changes should relate to how project functionality is reflected in the README\n- Content you refer to should be available in your codebase\n\nFor more information on prompt best practices, see the <a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/doc-generation.html" target="_blank">Amazon Q Developer documentation.</a>
5252
amazonqDoc.exception.readme_too_large=The README in your folder is too large for me to review. Try reducing the size of your README, or choose a folder with a smaller README. For more information on quotas, see the <a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/doc-generation.html#quotas" target="_blank">Amazon Q Developer documentation.</a>
53+
amazonqDoc.exception.readme_update_too_large=The updated README is too large. Try reducing the size of your README, or asking for a smaller update. For more information on quotas, see the <a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/doc-generation.html#quotas" target="_blank">Amazon Q Developer documentation.</a>
5354
amazonqDoc.exception.workspace_empty=The folder you chose did not contain any source files in a supported language. Choose another folder and try again. For more information on supported languages, see the <a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/doc-generation.html" target="_blank">Amazon Q Developer documentation.</a>
5455
amazonqDoc.inprogress_message.generating=Generating documentation...
5556
amazonqDoc.progress_message.baseline=This might take a few minutes.

0 commit comments

Comments
 (0)