Skip to content

Commit d3572de

Browse files
committed
Rename functions
1 parent c024704 commit d3572de

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export const getSelectedCustomization = (): Customization => {
9898
return baseCustomization
9999
}
100100

101-
const selectedCustomization = globals.globalState.getCodewhispererCustomization(AuthUtil.instance.profileName)
101+
const selectedCustomization = globals.globalState.getAmazonQCustomization(AuthUtil.instance.profileName)
102102

103103
if (selectedCustomization && selectedCustomization.name !== '') {
104104
return selectedCustomization
@@ -139,7 +139,7 @@ export const getPersistedCustomizations = (): Customization[] => {
139139
if (!AuthUtil.instance.isIdcConnection()) {
140140
return []
141141
}
142-
return globals.globalState.getCodewhispererPersistedCustomization(AuthUtil.instance.profileName)
142+
return globals.globalState.getAmazonQCachedCustomization(AuthUtil.instance.profileName)
143143
}
144144

145145
export const setPersistedCustomizations = async (customizations: Customization[]) => {

packages/core/src/shared/globalState.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ export class GlobalState implements vscode.Memento {
229229
}
230230

231231
/**
232-
* Get the codewhisperer customization. If legacy (map of customizations) store the
232+
* Get the Amazon Q customization. If legacy (map of customizations) store the
233233
* customization with label of profile name
234234
*
235235
* @param profileName name of profile, only used in case legacy customization is found
236-
* @returns codewhisperer customization, or undefined if not found.
237-
* If legacy, return the codewhisperer customization for the auth profile name
236+
* @returns Amazon Q customization, or undefined if not found.
237+
* If legacy, return the Amazon Q customization for the auth profile name
238238
*/
239-
getCodewhispererCustomization(profileName: string): Customization | undefined {
239+
getAmazonQCustomization(profileName: string): Customization | undefined {
240240
const result = this.tryGet('CODEWHISPERER_SELECTED_CUSTOMIZATION', Object, undefined)
241241

242242
// Legacy migration for old customization map of type { [label: string]: Customization[] }
@@ -250,14 +250,14 @@ export class GlobalState implements vscode.Memento {
250250
}
251251

252252
/**
253-
* Get the codewhisperer persisted customizations. If legacy (map of customizations) store the
253+
* Get the Amazon Q cached customizations. If legacy (map of customizations) store the
254254
* customizations with label of profile name
255255
*
256256
* @param profileName name of profile, only used in case legacy customization is found
257-
* @returns array of codewhisperer persisted customizations, or empty array if not found.
258-
* If legacy, return the codewhisperer persisted customizations for the auth profile name
257+
* @returns array of Amazon Q cached customizations, or empty array if not found.
258+
* If legacy, return the Amazon Q persisted customizations for the auth profile name
259259
*/
260-
getCodewhispererPersistedCCustomization(profileName: string): Customization[] {
260+
getAmazonQCachedCustomization(profileName: string): Customization[] {
261261
const result = this.tryGet<Customization[]>('CODEWHISPERER_PERSISTED_CUSTOMIZATIONS', Array, [])
262262

263263
// Legacy migration for old customization map of type { [label: string]: Customization[] }
@@ -267,9 +267,9 @@ export class GlobalState implements vscode.Memento {
267267
Object,
268268
{}
269269
)
270-
const persistedCustomizationsArray = customizations[profileName] || []
271-
this.tryUpdate('CODEWHISPERER_PERSISTED_CUSTOMIZATIONS', persistedCustomizationsArray)
272-
return persistedCustomizationsArray
270+
const cachedCustomizationsArray = customizations[profileName] || []
271+
this.tryUpdate('CODEWHISPERER_PERSISTED_CUSTOMIZATIONS', cachedCustomizationsArray)
272+
return cachedCustomizationsArray
273273
} else {
274274
return result
275275
}

0 commit comments

Comments
 (0)