Skip to content

Commit 0f97158

Browse files
committed
feat: Add model preview suffix for better clarity in model names
1 parent 4bc02dd commit 0f97158

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ModelPickerGroupsBuilder.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,16 @@ private static List<DropdownItem> buildModelDropdownItems(List<CopilotModel> mod
120120
Function<CopilotModel, String> reasoningEffortResolver) {
121121
List<DropdownItem> items = new ArrayList<>();
122122
for (CopilotModel model : models) {
123+
String rawName = model.getModelName();
124+
boolean alreadyHasPreview = rawName != null && rawName.toLowerCase().endsWith("(preview)");
125+
String name = model.isPreview() && !alreadyHasPreview ? rawName + " " + Messages.model_preview_suffix : rawName;
126+
123127
String effectiveEffort = reasoningEffortResolver != null ? reasoningEffortResolver.apply(model) : null;
124128
String suffix = ModelUtils.getModelSuffix(model, effectiveEffort);
125-
String name = model.getModelName();
126-
String effortLabel = ModelUtils.formatReasoningEffortLevel(effectiveEffort);
127-
String selectedLabel = StringUtils.isNotBlank(effortLabel) && StringUtils.isNotBlank(name)
128-
? name + " - " + effortLabel : null;
129-
items.add(new DropdownItem.Builder().id(name).label(name).selectedLabel(selectedLabel).suffix(suffix)
129+
String effortLevel = ModelUtils.formatReasoningEffortLevel(effectiveEffort);
130+
String selectedLabel = StringUtils.isNotBlank(effortLevel) ? name + " - " + effortLevel : null;
131+
132+
items.add(new DropdownItem.Builder().id(rawName).label(name).selectedLabel(selectedLabel).suffix(suffix)
130133
.icon(resolveModelIcon(model)).hoverProvider(new ModelHoverContentProvider(model)).build());
131134
}
132135
return items;

com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/i18n/Messages.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ public final class Messages extends NLS {
214214
public static String chat_historyView_deleteIcon_tooltip;
215215
public static String model_billing_multiplier_suffix;
216216
public static String model_billing_multiplier_variable;
217+
public static String model_preview_suffix;
217218
public static String model_hover_contextSize;
218219
public static String model_hover_cost;
219220
public static String model_hover_thinkingEffort;

com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/i18n/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ chat_historyView_editIcon_tooltip=Edit conversation title
165165
chat_historyView_deleteIcon_tooltip=Delete conversation
166166
model_billing_multiplier_suffix=x
167167
model_billing_multiplier_variable=Variable
168+
model_preview_suffix=(Preview)
168169
chat_addContext_tooltip=Add Context...
169170
chat_filePicker_title=Search attachments
170171
chat_filePicker_message=Choose files from the list, or search for files:

0 commit comments

Comments
 (0)