@@ -33,8 +33,9 @@ import { CachedResource } from '../../shared/utilities/resourceCache'
3333
3434// TODO: is there a better way to manage all endpoint strings in one place?
3535export const defaultServiceConfig : CodeWhispererConfig = {
36- region : 'us-east-1' ,
37- endpoint : 'https://codewhisperer.us-east-1.amazonaws.com/' ,
36+ region : 'us-west-2' ,
37+ // replace with your own endpoint
38+ endpoint : 'https://rts.alpha-us-west-2.codewhisperer.ai.aws.dev/' ,
3839}
3940
4041// Hack until we have a single discovery endpoint. We will call each endpoint one by one to fetch profile before then.
@@ -95,33 +96,6 @@ export class RegionProfileManager {
9596 }
9697
9798 get clientConfig ( ) : CodeWhispererConfig {
98- const conn = this . connectionProvider ( )
99- if ( ! conn ) {
100- throw new ToolkitError ( 'trying to get client configuration without credential' )
101- }
102-
103- // builder id should simply use default IAD
104- if ( isBuilderIdConnection ( conn ) ) {
105- return defaultServiceConfig
106- }
107-
108- // idc
109- const p = this . activeRegionProfile
110- if ( p ) {
111- const region = p . region
112- const endpoint = endpoints . get ( p . region )
113- if ( endpoint === undefined ) {
114- RegionProfileManager . logger . error (
115- `Not found endpoint for region ${ region } , not able to initialize a codewhisperer client`
116- )
117- throw new ToolkitError ( `Q client configuration error, endpoint not found for region ${ region } ` )
118- }
119- return {
120- region : region ,
121- endpoint : endpoint ,
122- }
123- }
124-
12599 return defaultServiceConfig
126100 }
127101
0 commit comments