Skip to content

Commit 98643db

Browse files
committed
Remove unsupported message for non-java python languages
1 parent 66da962 commit 98643db

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,16 +548,12 @@ export class TestController {
548548
*/
549549
if (!['java', 'python'].includes(language) || workspaceFolder === undefined) {
550550
let unsupportedMessage: string
551-
const unsupportedLanguage = language ? language.charAt(0).toUpperCase() + language.slice(1) : ''
552551
if (!workspaceFolder) {
553552
// File is outside of workspace
554553
unsupportedMessage = `<span style="color: #EE9D28;">&#9888;<b>I can't generate tests for ${fileName}</b> because the file is outside of workspace scope.<br></span> I can still provide examples, instructions and code suggestions.`
555-
} else if (unsupportedLanguage) {
556-
unsupportedMessage = `<span style="color: #EE9D28;">&#9888;<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.`
557-
} else {
558-
unsupportedMessage = `<span style="color: #EE9D28;">&#9888;<b>I'm sorry, but /test only supports Python and Java</b><br></span> I will still generate a suggestion below.`
554+
this.messenger.sendMessage(unsupportedMessage, tabID, 'answer')
559555
}
560-
this.messenger.sendMessage(unsupportedMessage, tabID, 'answer')
556+
// Keeping this metric as is. TODO - Change to true once we support through other feature
561557
session.isSupportedLanguage = false
562558
await this.onCodeGeneration(
563559
session,

0 commit comments

Comments
 (0)