Skip to content

Commit bef0167

Browse files
authored
Merge branch 'main' into main
2 parents b5abe76 + 5fa8e42 commit bef0167

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "/transform: always include button to start a new transformation at the end of a job"
4+
}
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/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/ArtifactHandler.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import software.aws.toolkits.jetbrains.services.amazonq.CODE_TRANSFORM_TROUBLESH
3131
import software.aws.toolkits.jetbrains.services.amazonq.CODE_TRANSFORM_TROUBLESHOOT_DOC_DOWNLOAD_EXPIRED
3232
import software.aws.toolkits.jetbrains.services.codemodernizer.client.GumbyClient
3333
import software.aws.toolkits.jetbrains.services.codemodernizer.commands.CodeTransformMessageListener
34-
import software.aws.toolkits.jetbrains.services.codemodernizer.constants.buildStartNewTransformFollowup
3534
import software.aws.toolkits.jetbrains.services.codemodernizer.constants.createViewDiffButton
3635
import software.aws.toolkits.jetbrains.services.codemodernizer.constants.getDownloadedArtifactTextFromType
3736
import software.aws.toolkits.jetbrains.services.codemodernizer.constants.viewSummaryButton
@@ -317,7 +316,6 @@ class ArtifactHandler(
317316
message = message("codemodernizer.chat.message.changes_applied"),
318317
)
319318
codeTransformChatHelper?.updateLastPendingMessage(resultContent)
320-
codeTransformChatHelper?.addNewMessage(buildStartNewTransformFollowup())
321319
} else {
322320
if (getCurrentPatchIndex() < totalPatchFiles) {
323321
val message = "I applied the changes in diff patch ${getCurrentPatchIndex() + 1} of $totalPatchFiles. " +
@@ -331,7 +329,6 @@ class ArtifactHandler(
331329
codeTransformChatHelper?.updateLastPendingMessage(
332330
CodeTransformChatMessageContent(type = CodeTransformChatMessageType.PendingAnswer, message = message)
333331
)
334-
codeTransformChatHelper?.addNewMessage(buildStartNewTransformFollowup())
335332
} else {
336333
codeTransformChatHelper?.updateLastPendingMessage(
337334
CodeTransformChatMessageContent(
@@ -345,7 +342,7 @@ class ArtifactHandler(
345342
)
346343
}
347344
} else {
348-
codeTransformChatHelper?.addNewMessage(buildStartNewTransformFollowup())
345+
// no-op; start a new transformation button already visible at this point
349346
}
350347
}
351348
} else {

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/constants/CodeTransformChatItems.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ fun buildTransformResultChatContent(result: CodeModernizerJobCompletedResult, to
600600
} else {
601601
null
602602
},
603+
followUps = listOf(startNewTransformFollowUp),
603604
)
604605
}
605606

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)