Skip to content

Commit 6e6cb37

Browse files
authored
build exec ux changes (#8)
1 parent 01fe31f commit 6e6cb37

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

packages/core/src/amazonqTest/chat/controller/controller.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,17 +832,17 @@ export class TestController {
832832
} else if (session.listOfTestGenerationJobId.length < 4) {
833833
const remainingIterations = 4 - session.listOfTestGenerationJobId.length
834834

835-
let userMessage = 'Would you like Amazon Q to build and execute again, and fix errors?'
835+
let userMessage = 'Would you like me to compile and run again, with the accepted fixes?'
836836
if (buildCommand) {
837837
userMessage += ` I will be running this build command: \`${buildCommand}\``
838838
}
839-
userMessage += `\nYou have ${remainingIterations} iteration${remainingIterations > 1 ? 's' : ''} left.`
839+
userMessage += `\n\nI can compile and run ${remainingIterations} more time${remainingIterations > 1 ? 's' : ''}.`
840840

841841
const followUps: FollowUps = {
842842
text: '',
843843
options: [
844844
{
845-
pillText: `Rebuild`,
845+
pillText: `Proceed`,
846846
type: FollowUpTypes.ContinueBuildAndExecute,
847847
status: 'primary',
848848
},

packages/core/src/amazonqTest/models/constants.ts

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const cancelBuildProgressButton: ChatItemButton = {
4949
export const buildProgressField: ProgressField = {
5050
status: 'default',
5151
value: -1,
52-
text: 'Executing...',
52+
text: 'Compiling project...',
5353
actions: [cancelBuildProgressButton],
5454
}
5555

@@ -87,7 +87,7 @@ export const testGenBuildProgressMessage = (currentStep: TestGenerationBuildStep
8787
const session = ChatSessionManager.Instance.getSession()
8888
const statusText = BuildStatus[session.buildStatus].toLowerCase()
8989
const icon = session.buildStatus === BuildStatus.SUCCESS ? checkIcons['done'] : checkIcons['error']
90-
let message = `Sure. This may take a few minutes and I'll share updates on my progress here.
90+
let message = `Sure. This may take a few minutes and I'll update the progress here.\n
9191
**Progress summary**\n\n`
9292

9393
if (currentStep === TestGenerationBuildStep.START_STEP) {
@@ -96,16 +96,25 @@ export const testGenBuildProgressMessage = (currentStep: TestGenerationBuildStep
9696

9797
updateStepStatuses(currentStep, status)
9898

99-
if (currentStep >= TestGenerationBuildStep.RUN_BUILD) {
100-
message += `${getIconForStep(TestGenerationBuildStep.RUN_BUILD)} Started build execution\n`
99+
if (currentStep === TestGenerationBuildStep.RUN_BUILD) {
100+
message += `${getIconForStep(TestGenerationBuildStep.RUN_BUILD)} Project compiling\n`
101+
} else if (currentStep >= TestGenerationBuildStep.RUN_BUILD) {
102+
message += `${getIconForStep(TestGenerationBuildStep.RUN_BUILD)} Project compiled\n`
101103
}
102104

103-
if (currentStep >= TestGenerationBuildStep.RUN_EXECUTION_TESTS) {
104-
message += `${getIconForStep(TestGenerationBuildStep.RUN_EXECUTION_TESTS)} Executing tests\n`
105+
if (currentStep === TestGenerationBuildStep.RUN_EXECUTION_TESTS) {
106+
message += `${getIconForStep(TestGenerationBuildStep.RUN_EXECUTION_TESTS)} Running tests\n`
107+
} else if (currentStep >= TestGenerationBuildStep.RUN_EXECUTION_TESTS) {
108+
message += `${getIconForStep(TestGenerationBuildStep.RUN_EXECUTION_TESTS)} Ran tests\n`
105109
}
106110

107-
if (currentStep >= TestGenerationBuildStep.FIXING_TEST_CASES && session.buildStatus === BuildStatus.FAILURE) {
108-
message += `${getIconForStep(TestGenerationBuildStep.FIXING_TEST_CASES)} Fixing errors in tests\n\n`
111+
if (currentStep === TestGenerationBuildStep.FIXING_TEST_CASES && session.buildStatus === BuildStatus.FAILURE) {
112+
message += `${getIconForStep(TestGenerationBuildStep.FIXING_TEST_CASES)} Fixing test failures\n\n`
113+
} else if (
114+
currentStep >= TestGenerationBuildStep.FIXING_TEST_CASES &&
115+
session.buildStatus === BuildStatus.FAILURE
116+
) {
117+
message += `${getIconForStep(TestGenerationBuildStep.FIXING_TEST_CASES)} Fixed test failures\n\n`
109118
}
110119

111120
if (currentStep > TestGenerationBuildStep.PROCESS_TEST_RESULTS) {

0 commit comments

Comments
 (0)