Skip to content

Commit 5f3d53b

Browse files
authored
feat(amazonq): disable Q context menu when profile selection is pending #2116
## Problem When users are pending profile selection, they are not allowed to use any Q features, thus disable any Q context menu for such schenario ## Before Update the condition which sets `aws.codewhisperer.connected`. This affects the `enablement` clauses in package.json.
1 parent e0227a2 commit 5f3d53b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/codewhisperer/util/authUtil.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ export class AuthUtil {
151151
})
152152

153153
public async setVscodeContextProps() {
154-
await setContext('aws.codewhisperer.connected', this.isConnected())
154+
// if users are "pending profile selection", they're not fully connected and require profile selection for Q usage
155+
// requireProfileSelection() always returns false for builderID users
156+
await setContext('aws.codewhisperer.connected', this.isConnected() && !this.requireProfileSelection())
155157
const doShowAmazonQLoginView =
156158
!this.isConnected() || this.isConnectionExpired() || this.requireProfileSelection()
157159
await setContext('aws.amazonq.showLoginView', doShowAmazonQLoginView)

0 commit comments

Comments
 (0)