Skip to content

Commit c311da2

Browse files
authored
revert(amazonq): Disable generate unit tests command and context menu for all users (#5674)
## Problem Unit test generation feature is not ready for internal users yet. This PR disables the feature while improvements are made.
1 parent 8831e6b commit c311da2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

packages/amazonq/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@
352352
{
353353
"command": "aws.amazonq.generateUnitTests",
354354
"group": "cw_chat@5",
355-
"when": "aws.codewhisperer.connected && aws.isInternalUser"
355+
"when": "false"
356356
},
357357
{
358358
"command": "aws.amazonq.sendToPrompt",
@@ -432,7 +432,7 @@
432432
"command": "aws.amazonq.generateUnitTests",
433433
"title": "%AWS.command.amazonq.generateUnitTests%",
434434
"category": "%AWS.amazonq.title%",
435-
"enablement": "aws.codewhisperer.connected && aws.isInternalUser"
435+
"enablement": "false"
436436
},
437437
{
438438
"command": "aws.amazonq.reconnect",
@@ -615,7 +615,7 @@
615615
"key": "win+alt+t",
616616
"mac": "cmd+alt+t",
617617
"linux": "meta+alt+t",
618-
"when": "aws.codewhisperer.connected && aws.isInternalUser"
618+
"when": "false"
619619
},
620620
{
621621
"command": "aws.amazonq.invokeInlineCompletion",

packages/core/src/codewhispererChat/controllers/chat/userIntent/userIntentRecognizer.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import { UserIntent } from '@amzn/codewhisperer-streaming'
77
import { EditorContextCommand } from '../../../commands/registerCommands'
88
import { PromptMessage } from '../model'
9-
import { Auth } from '../../../../auth'
109

1110
export class UserIntentRecognizer {
1211
public getFromContextMenuCommand(command: EditorContextCommand): UserIntent | undefined {
@@ -39,8 +38,6 @@ export class UserIntentRecognizer {
3938
return UserIntent.APPLY_COMMON_BEST_PRACTICES
4039
} else if (prompt.message.startsWith('Optimize')) {
4140
return UserIntent.IMPROVE_CODE
42-
} else if (prompt.message.startsWith('Generate unit tests') && Auth.instance.isInternalAmazonUser()) {
43-
return UserIntent.GENERATE_UNIT_TESTS
4441
}
4542
return undefined
4643
}

0 commit comments

Comments
 (0)