Skip to content

Commit da331e9

Browse files
fix: highlight default model in picker (anomalyco#159)
1 parent ae97145 commit da331e9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎src/app/app.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ export default function App() {
661661
const modelOptions = createMemo<ModelOption[]>(() => {
662662
const allProviders = providers();
663663
const defaults = providerDefaults();
664+
const currentDefault = defaultModel();
664665

665666
if (!allProviders.length) {
666667
return [
@@ -701,8 +702,12 @@ export default function App() {
701702

702703
for (const model of models) {
703704
const isFree = model.cost?.input === 0 && model.cost?.output === 0;
705+
const isDefault =
706+
provider.id === currentDefault.providerID && model.id === currentDefault.modelID;
704707
const footerBits: string[] = [];
705-
if (defaultModelID === model.id) footerBits.push(t("settings.model_default", currentLocale()));
708+
if (defaultModelID === model.id || isDefault) {
709+
footerBits.push(t("settings.model_default", currentLocale()));
710+
}
706711
if (isFree) footerBits.push(t("settings.model_free", currentLocale()));
707712
if (model.capabilities?.reasoning) footerBits.push(t("settings.model_reasoning", currentLocale()));
708713

0 commit comments

Comments
 (0)