Skip to content

Commit 6c77e6f

Browse files
committed
refac
1 parent 3b74431 commit 6c77e6f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/components/chat/ModelSelector/Selector.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,10 @@
234234
ollamaVersion = await getOllamaVersion(localStorage.token).catch((error) => false);
235235
236236
if (items) {
237-
tags = items.flatMap((item) => item.model?.info?.meta?.tags ?? []);
238-
tags = [...new Set(tags)].map((tag) => tag.name).sort();
237+
tags = items.flatMap((item) => item.model?.info?.meta?.tags ?? []).map((tag) => tag.name);
238+
239+
// Remove duplicates and sort
240+
tags = Array.from(new Set(tags)).sort((a, b) => a.localeCompare(b));
239241
}
240242
});
241243

0 commit comments

Comments
 (0)