Skip to content

Commit ad8d291

Browse files
Merge master into feature/LSP-alpha
2 parents 5bd59d4 + 98b0d5d commit ad8d291

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const onProfileChangedListener: (event: ProfileChangedEvent) => any = asy
5959
if (event.intent === 'customization') {
6060
return
6161
}
62-
const logger = getLogger()
62+
6363
if (!event.profile) {
6464
await setSelectedCustomization(baseCustomization)
6565
return
@@ -69,16 +69,7 @@ export const onProfileChangedListener: (event: ProfileChangedEvent) => any = asy
6969
const selectedCustomization = getSelectedCustomization()
7070
// No need to validate base customization which has empty arn.
7171
if (selectedCustomization.arn.length > 0) {
72-
const customizationProvider = await CustomizationProvider.init(event.profile)
73-
const customizations = await customizationProvider.listAvailableCustomizations()
74-
75-
const r = customizations.find((it) => it.arn === selectedCustomization.arn)
76-
if (!r) {
77-
logger.debug(
78-
`profile ${event.profile.name} doesnt have access to customization ${selectedCustomization.name} but has access to ${customizations.map((it) => it.name)}`
79-
)
80-
await switchToBaseCustomizationAndNotify()
81-
}
72+
await switchToBaseCustomizationAndNotify()
8273
}
8374
}
8475

0 commit comments

Comments
 (0)