From 4249ae4bc05d29b72a38bb467dc0ca97e73bcd93 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 31 Oct 2025 09:50:47 +0100 Subject: [PATCH] Chat: "Pick Model" appears with empty picker if aborting chat setup (fix #272829) (#274272) * Chat: "Pick Model" appears with empty picker if aborting chat setup (fix #272829) * Update src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../browser/modelPicker/modelPickerActionItem.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.ts b/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.ts index 2d9bc62efb0..109ea2d9aae 100644 --- a/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.ts +++ b/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.ts @@ -84,7 +84,7 @@ function getModelPickerActionBarActionProvider(commandService: ICommandService, id: 'manageModels', label: localize('chat.manageModels', "Manage Models..."), enabled: true, - tooltip: localize('chat.manageModels.tooltip', "Manage language models"), + tooltip: localize('chat.manageModels.tooltip', "Manage Language Models"), class: undefined, run: () => { const commandId = ManageModelsAction.ID; @@ -93,16 +93,17 @@ function getModelPickerActionBarActionProvider(commandService: ICommandService, }); } - // Add sign-in / upgrade option if entitlement is anonymous / free - if (chatEntitlementService.anonymous || chatEntitlementService.entitlement === ChatEntitlement.Free) { + // Add sign-in / upgrade option if entitlement is anonymous / free / new user + const isNewOrAnonymousUser = !chatEntitlementService.sentiment.installed || chatEntitlementService.entitlement === ChatEntitlement.Available || chatEntitlementService.anonymous; + if (isNewOrAnonymousUser || chatEntitlementService.entitlement === ChatEntitlement.Free) { additionalActions.push({ id: 'moreModels', - label: localize('chat.moreModels', "Add Premium Models"), + label: isNewOrAnonymousUser ? localize('chat.moreModels', "Add Language Models") : localize('chat.morePremiumModels', "Add Premium Models"), enabled: true, - tooltip: localize('chat.moreModels.tooltip', "Add premium models"), + tooltip: isNewOrAnonymousUser ? localize('chat.moreModels.tooltip', "Add Language Models") : localize('chat.morePremiumModels.tooltip', "Add Premium Models"), class: undefined, run: () => { - const commandId = chatEntitlementService.anonymous ? 'workbench.action.chat.triggerSetup' : 'workbench.action.chat.upgradePlan'; + const commandId = isNewOrAnonymousUser ? 'workbench.action.chat.triggerSetup' : 'workbench.action.chat.upgradePlan'; commandService.executeCommand(commandId); } });