Skip to content

Commit 9d0ede8

Browse files
authored
codewhisperer: add action to customization notification (aws#4235)
* codewhisperer: add action to notification when customization is no longer available * add changelog
1 parent d9e60a8 commit 9d0ede8

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "CodeWhisperer: add select customization action to notification"
4+
}

src/codewhisperer/util/customizationUtil.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,20 @@ export const getAvailableCustomizationsList = async () => {
316316
// show notification that selected customization is not available, switching back to base
317317
export const switchToBaseCustomizationAndNotify = async () => {
318318
await setSelectedCustomization(baseCustomization)
319-
void vscode.window.showInformationMessage(
319+
const selectCustomizationLabel = localize(
320+
'AWS.codewhisperer.customization.notification.selectCustomization',
321+
'Select Another Customization'
322+
)
323+
const selection = await vscode.window.showWarningMessage(
320324
localize(
321325
'AWS.codewhisperer.customization.notification.selected_customization_not_available',
322326
'Selected CodeWhisperer customization is not available. Contact your administrator. Your instance of CodeWhisperer is using the foundation model.'
323-
)
327+
),
328+
selectCustomizationLabel
324329
)
330+
if (selection === selectCustomizationLabel) {
331+
await showCustomizationPrompt()
332+
}
325333
}
326334

327335
const renderDescriptionText = (label: string, isNewCustomization: boolean = false) => {

0 commit comments

Comments
 (0)