Skip to content

Commit 9826566

Browse files
committed
fix incorrect connection message
1 parent c4acf81 commit 9826566

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/core/src/codewhisperer/ui/codeWhispererNodes.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,11 @@ export function createManageSubscription(): DataQuickPickItem<'manageSubscriptio
192192
export function createSignout(): DataQuickPickItem<'signout'> {
193193
const label = localize('AWS.codewhisperer.signoutNode.label', 'Sign Out')
194194
const icon = getIcon('vscode-export')
195-
const connection = AuthUtil.instance.isBuilderIdConnection() ? 'AWS Builder ID' : 'IAM Identity Center'
195+
const connection = AuthUtil.instance.isIamConnection()
196+
? 'IAM Credentials'
197+
: AuthUtil.instance.isBuilderIdConnection()
198+
? 'AWS Builder ID'
199+
: 'IAM Identity Center'
196200

197201
return {
198202
data: 'signout',

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ export class AuthUtil implements IAuthProvider {
277277
return Boolean(this.connection?.startUrl && this.connection?.startUrl !== builderIdStartUrl)
278278
}
279279

280+
isIamConnection() {
281+
return Boolean(this.connection?.accessKey && this.connection?.secretKey)
282+
}
283+
280284
isInternalAmazonUser(): boolean {
281285
return this.isConnected() && this.connection?.startUrl === internalStartUrl
282286
}

0 commit comments

Comments
 (0)