Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,17 @@ private static List<DropdownItem> buildModelDropdownItems(List<CopilotModel> mod
Function<CopilotModel, String> reasoningEffortResolver) {
List<DropdownItem> items = new ArrayList<>();
for (CopilotModel model : models) {
String rawName = model.getModelName();
boolean alreadyHasPreview = rawName != null && rawName.toLowerCase().endsWith("(preview)");
String name = model.isPreview() && !alreadyHasPreview ? rawName + " " + Messages.model_preview_suffix : rawName;
Comment thread
ethanyhou marked this conversation as resolved.

String effectiveEffort = reasoningEffortResolver != null ? reasoningEffortResolver.apply(model) : null;
String suffix = ModelUtils.getModelSuffix(model, effectiveEffort);
String name = model.getModelName();
String effortLabel = ModelUtils.formatReasoningEffortLevel(effectiveEffort);
String selectedLabel = StringUtils.isNotBlank(effortLabel) && StringUtils.isNotBlank(name)
? name + " - " + effortLabel : null;
items.add(new DropdownItem.Builder().id(name).label(name).selectedLabel(selectedLabel).suffix(suffix)
String effortLevel = ModelUtils.formatReasoningEffortLevel(effectiveEffort);
String selectedLabel = StringUtils.isNotBlank(effortLevel) && StringUtils.isNotBlank(name)
? name + " - " + effortLevel : null;

items.add(new DropdownItem.Builder().id(rawName).label(name).selectedLabel(selectedLabel).suffix(suffix)
.icon(resolveModelIcon(model)).hoverProvider(new ModelHoverContentProvider(model)).build());
}
return items;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public final class Messages extends NLS {
public static String chat_historyView_deleteIcon_tooltip;
public static String model_billing_multiplier_suffix;
public static String model_billing_multiplier_variable;
public static String model_preview_suffix;
public static String model_hover_contextSize;
public static String model_hover_cost;
public static String model_hover_thinkingEffort;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ chat_historyView_editIcon_tooltip=Edit conversation title
chat_historyView_deleteIcon_tooltip=Delete conversation
model_billing_multiplier_suffix=x
model_billing_multiplier_variable=Variable
model_preview_suffix=(Preview)
chat_addContext_tooltip=Add Context...
chat_filePicker_title=Search attachments
chat_filePicker_message=Choose files from the list, or search for files:
Expand Down
Loading