Skip to content

Commit b5de261

Browse files
committed
create progress bar for fixing build failure
1 parent 4168e78 commit b5de261

File tree

4 files changed

+35
-8
lines changed

4 files changed

+35
-8
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" : "Add back build and execute for Internal Amazon Customers."
4+
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ fun testGenProgressField(value: Int) = ProgressField(
3636
valueText = "$value%",
3737
actions = listOf(cancelTestGenButton)
3838
)
39+
40+
val buildAndExecuteProgrogressField = ProgressField(
41+
status = "default",
42+
text = message("testgen.progressbar.build_and_execute"),
43+
actions = listOf(cancelTestGenButton)
44+
)

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

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,20 @@ class CodeWhispererUTGChatManager(val project: Project, private val cs: Coroutin
9393
}
9494
val final = session.testGenerationJobGroupName
9595

96+
if(session.iteration == 1){
97+
codeTestChatHelper.updateUI(
98+
promptInputDisabledState = true,
99+
promptInputProgress = testGenProgressField(0),
100+
)
101+
}else{
102+
codeTestChatHelper.updateUI(
103+
promptInputDisabledState = true,
104+
promptInputProgress = buildAndExecuteProgrogressField,
105+
)
106+
}
107+
96108
// Set the Progress bar to "Generating unit tests..."
97-
codeTestChatHelper.updateUI(
98-
promptInputDisabledState = true,
99-
promptInputProgress = testGenProgressField(0),
100-
)
109+
101110

102111
val codeTestResponseContext = createUploadUrl(codeTestChatHelper, previousIterationContext)
103112
session.srcPayloadSize = codeTestResponseContext.payloadContext.srcPayloadSize
@@ -263,10 +272,17 @@ class CodeWhispererUTGChatManager(val project: Project, private val cs: Coroutin
263272
messageIdOverride = codeTestResponseContext.testSummaryMessageId
264273
)
265274
}
266-
codeTestChatHelper.updateUI(
267-
promptInputDisabledState = true,
268-
promptInputProgress = testGenProgressField(progressRate),
269-
)
275+
if(session.iteration == 1){
276+
codeTestChatHelper.updateUI(
277+
promptInputDisabledState = true,
278+
promptInputProgress = testGenProgressField(0),
279+
)
280+
}else{
281+
codeTestChatHelper.updateUI(
282+
promptInputDisabledState = true,
283+
promptInputProgress = buildAndExecuteProgrogressField,
284+
)
285+
}
270286
}
271287

272288
// polling every 2 seconds to reduce # of API calls

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,6 +2078,7 @@ testgen.placeholder.select_an_option = Please select an action to proceed (Accep
20782078
testgen.placeholder.view_diff=Select View Diff to see the generated unit tests
20792079
testgen.placeholder.waiting_on_your_inputs=Waiting on your inputs...
20802080
testgen.progressbar.generate_unit_tests=Generating unit tests...
2081+
testgen.progressbar.build_and_execute=Fixing test errors...
20812082
toolkit.login.aws_builder_id.already_connected.cancel=Use existing AWS Builder ID
20822083
toolkit.login.aws_builder_id.already_connected.message=You already signed in with an AWS Builder ID.\nSign out to add another?
20832084
toolkit.login.aws_builder_id.already_connected.reconnect=Sign out

0 commit comments

Comments
 (0)