File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
packages/core/src/codewhisperer Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -608,6 +608,7 @@ const registerToolkitApiCallbackOnce = once(() => {
608608 const auth = Auth . instance
609609
610610 auth . onDidChangeConnectionState ( async ( e ) => {
611+ console . log ( e )
611612 if ( _toolkitApi && 'declareConnection' in _toolkitApi ) {
612613 const id = e . id
613614 const conn = await auth . getConnection ( { id } )
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ import { parse } from '@aws-sdk/util-arn-parser'
2828import { isAwsError , ToolkitError } from '../../shared/errors'
2929import { telemetry } from '../../shared/telemetry/telemetry'
3030import { localize } from '../../shared/utilities/vsCodeUtils'
31+ import { sleep } from '../../shared/utilities/timeoutUtils'
32+ import { randomInt } from 'crypto'
3133
3234// TODO: is there a better way to manage all endpoint strings in one place?
3335export const defaultServiceConfig : CodeWhispererConfig = {
@@ -116,6 +118,7 @@ export class RegionProfileManager {
116118 return [ ]
117119 }
118120 const availableProfiles : RegionProfile [ ] = [ ]
121+ await sleep ( randomInt ( 1000 , 3000 ) )
119122 for ( const [ region , endpoint ] of endpoints . entries ( ) ) {
120123 const client = await this . _createQClient ( region , endpoint , conn as SsoConnection )
121124 const requester = async ( request : CodeWhispererUserClient . ListAvailableProfilesRequest ) =>
You can’t perform that action at this time.
0 commit comments