Skip to content

Commit af58afe

Browse files
committed
add plan summary to the card
1 parent e8cee82 commit af58afe

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,21 @@ class CodeWhispererUTGChatManager(val project: Project, private val cs: Coroutin
375375
} else {
376376
if (previousIterationContext == null) {
377377
// show another card as the answer
378+
val jobSummary = testGenerationResponse?.testGenerationJob()?.jobSummary()?.trim() ?: ""
379+
val cleanedJobSummary = jobSummary
380+
.trim()
381+
.replace("```", "")
382+
.replace("`", "")
383+
.replace("\n", " ")
384+
println(jobSummary)
378385
val viewDiffMessageId = codeTestChatHelper.addAnswer(
379386
CodeTestChatMessageContent(
380387
message = """
381-
Please see the unit tests generated below. Click "View Diff" to review the changes in the code editor.
388+
**Job Summary:**
389+
390+
$cleanedJobSummary
391+
392+
Please see the unit tests generated below. Click "View Diff" to review the changes in the code editor.
382393
""".trimIndent(),
383394
type = ChatMessageType.Answer,
384395
buttons = listOf(Button("utg_view_diff", "View Diff", keepCardAfterClick = true, position = "outside", status = "info")),

0 commit comments

Comments
 (0)