@@ -444,9 +444,8 @@ export class TestController {
444444
445445 /*
446446 For Re:Invent 2024 we are supporting only java and python for unit test generation, rest of the languages shows the similar experience as CWC
447- If user request test generation from input chat without opening a file, its difficult to get the language, so default will be plainText
448447 */
449- if ( language !== 'java' && language !== 'python' && language !== 'plaintext' ) {
448+ if ( language !== 'java' && language !== 'python' ) {
450449 const unsupportedLanguage = language . charAt ( 0 ) . toUpperCase ( ) + language . slice ( 1 )
451450 let unsupportedMessage = `<span style="color: #EE9D28;">⚠<b>I'm sorry, but /test only supports Python and Java</b><br></span> While ${ unsupportedLanguage } is not supported, I will generate a suggestion below. `
452451 // handle the case when language is undefined
@@ -640,7 +639,6 @@ export class TestController {
640639 const session = this . sessionStorage . getSession ( )
641640 session . acceptedJobId = session . listOfTestGenerationJobId [ session . listOfTestGenerationJobId . length - 1 ]
642641 const filePath = session . generatedFilePath
643- session . fileLanguage = await this . getLanguageForFilePath ( filePath )
644642 const absolutePath = path . join ( session . projectRootPath , filePath )
645643 const fileExists = await fs . existsFile ( absolutePath )
646644 const buildCommand = session . updatedBuildCommands ?. join ( ' ' )
@@ -724,7 +722,7 @@ export class TestController {
724722 acceptedCharactersCount : session . charsOfCodeAccepted ,
725723 generatedLinesCount : session . linesOfCodeGenerated ,
726724 acceptedLinesCount : session . linesOfCodeAccepted ,
727- cwsprChatProgrammingLanguage : session . fileLanguage ,
725+ cwsprChatProgrammingLanguage : session . fileLanguage ?? 'plaintext' ,
728726 jobId : session . listOfTestGenerationJobId [ 0 ] , // For RIV, UTG does only one StartTestGeneration API call so jobId = session.listOfTestGenerationJobId[0]
729727 jobGroup : session . testGenerationJobGroupName ,
730728 buildPayloadBytes : session . srcPayloadSize ,
0 commit comments