Skip to content

Commit 0b4dc1a

Browse files
Update packages/core/src/amazonqTest/chat/controller/controller.ts
Co-authored-by: Maxim Hayes <[email protected]>
1 parent 64a9589 commit 0b4dc1a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,13 +450,10 @@ export class TestController {
450450
if (!workspaceFolder) {
451451
// File is outside of workspace
452452
unsupportedMessage = `<span style="color: #EE9D28;">&#9888;<b>I can't generate tests for because ${fileName} is outside of workspace scope.</b><br></span> I can still provide examples, instructions and code suggestions.`
453+
} else if (unsupportedLanguage) {
454+
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.`
453455
} else {
454-
// File is in workspace, check language support
455-
if (unsupportedLanguage) {
456-
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.`
457-
} else {
458-
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.`
459-
}
456+
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.`
460457
}
461458
this.messenger.sendMessage(unsupportedMessage, tabID, 'answer')
462459
await this.onCodeGeneration(session, message.prompt, tabID, fileName, filePath)

0 commit comments

Comments
 (0)