fix(open-webui): tidy model selector label and width

Trim the ":latest" tag from model labels, widen the selector and use
ellipsis truncation so long model names no longer clip mid-word.
This commit is contained in:
Lok3sh-Kumar committed 2026-06-27 14:15:50 +05:30
1 parent bc26231d13
commit 800caf6e5e
2 files changed
+8 -3

No files matched your search

@@ -24,9 +24,9 @@
}
.modelSelect input {
text-align: right;
font-size: var(--mantine-font-size-xs);
cursor: pointer;
text-overflow: ellipsis;
}
.avatar {
+7 -2
View File
@@ -325,7 +325,12 @@ export function Chat({ options, integrationIds, isEditMode }: WidgetComponentPro
}
};
const modelData = useMemo(() => models.map((m) => ({ value: m.id, label: m.name ?? m.id })), [models]);
// Drop the noisy ":latest" tag from the label (common for Ollama models); the
// value keeps the full id so the right model is still sent.
const modelData = useMemo(
() => models.map((m) => ({ value: m.id, label: (m.name ?? m.id).replace(/:latest$/i, "") })),
[models],
);
const knowledgeName = (id: string) => knowledge.find((item) => item.id === id)?.name ?? id;
const hasAttachments = attachments.length > 0 || knowledgeIds.length > 0 || webItems.length > 0;
@@ -574,7 +579,7 @@ export function Chat({ options, integrationIds, isEditMode }: WidgetComponentPro
nothingFoundMessage={t("widget.openWebUi.noModels")}
rightSection={modelsLoading ? <Loader size="xs" /> : undefined}
comboboxProps={{ withinPortal: false }}
maw={160}
maw={200}
className={classes.modelSelect}
/>
{isStreaming ? (