Skip to content

Commit b45a626

Browse files
committed
Adding testgenerationJobId to the commeted text
1 parent 191bd51 commit b45a626

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ export class TestController {
385385
await this.sessionCleanUp()
386386
break
387387
case ButtonActions.PROVIDE_FEEDBACK:
388-
getFeedbackCommentData = `Q Test Generation: RequestId: ${this.sessionStorage.getSession().startTestGenerationRequestId}`
388+
getFeedbackCommentData = `Q Test Generation: RequestId: ${this.sessionStorage.getSession().startTestGenerationRequestId}, TestGenerationJobId: ${this.sessionStorage.getSession().testGenerationJob?.testGenerationJobId}`
389389
void submitFeedback(placeholder, 'Amazon Q', getFeedbackCommentData)
390390
telemetry.ui_click.emit({ elementId: 'unitTestGeneration_provideFeedback' })
391391
this.messenger.sendMessage(
@@ -444,6 +444,10 @@ export class TestController {
444444

445445
private async startTestGen(message: any, regenerateTests: boolean) {
446446
const session: Session = this.sessionStorage.getSession()
447+
// Perform session cleanup before start of unit test generation workflow unless there is an existing job in progress.
448+
if (!ChatSessionManager.Instance.getIsInProgress()) {
449+
await this.sessionCleanUp()
450+
}
447451
const tabID = this.sessionStorage.setActiveTab(message.tabID)
448452
getLogger().debug('startTestGen message: %O', message)
449453
getLogger().debug('startTestGen tabId: %O', message.tabID)
@@ -1377,7 +1381,7 @@ export class TestController {
13771381
}
13781382
session.listOfTestGenerationJobId = []
13791383
session.testGenerationJobGroupName = undefined
1380-
session.testGenerationJob = undefined
1384+
// session.testGenerationJob = undefined
13811385
session.updatedBuildCommands = undefined
13821386
session.shortAnswer = undefined
13831387
session.testCoveragePercentage = 0

0 commit comments

Comments
 (0)