Skip to content

Commit 6e32d8d

Browse files
feat: normalize model selector display names (base filename + OpenAI-Compat name) + move Toaster
1 parent 232f4df commit 6e32d8d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tools/server/webui/src/lib/stores/models.svelte.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,13 @@ class ModelsStore {
8282
const rawCapabilities = Array.isArray(details?.capabilities)
8383
? [...(details?.capabilities ?? [])]
8484
: [];
85+
const displayNameSource =
86+
details?.name && details.name.trim().length > 0 ? details.name : item.id;
87+
const displayName = this.toDisplayName(displayNameSource);
8588

8689
return {
8790
id: item.id,
88-
name: details?.name || this.toDisplayName(item.id),
91+
name: displayName,
8992
model: details?.model || item.id,
9093
description: details?.description,
9194
capabilities: rawCapabilities.filter((value): value is string => Boolean(value)),

tools/server/webui/src/routes/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142

143143
<ModeWatcher />
144144

145-
<Toaster richColors />
145+
<Toaster position="top-center" richColors />
146146

147147
<MaximumContextAlertDialog />
148148

0 commit comments

Comments
 (0)