ui : keep the model selector mounted while options swap backends

Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash
This commit is contained in:
Aleksander Grygier
2026-09-16 19:40:40 +02:00
parent 5c9cd156d5
commit aa2cbf033a
2 changed files with 4 additions and 4 deletions
@@ -178,13 +178,13 @@
</script>
<div class={['relative inline-flex flex-col items-end gap-1', className]}>
{#if ms.loading && ms.options.length === 0 && ms.isMultiModel}
{#if ms.loading && ms.options.length === 0 && ms.isMultiModel && !ms.switchingBackends}
<div class="flex items-center gap-2 text-xs text-muted-foreground">
<Loader2 class="h-3.5 w-3.5 animate-spin" />
Loading models…
</div>
{:else if ms.options.length === 0 && ms.isMultiModel}
{:else if ms.options.length === 0 && ms.isMultiModel && !ms.switchingBackends}
{#if currentModel}
<span
class={[
@@ -70,12 +70,12 @@
</script>
<div class={['relative inline-flex flex-col items-end gap-1', className]}>
{#if ms.loading && ms.options.length === 0 && ms.isMultiModel}
{#if ms.loading && ms.options.length === 0 && ms.isMultiModel && !ms.switchingBackends}
<div class="flex items-center gap-2 text-xs text-muted-foreground">
<Loader2 class="h-3.5 w-3.5 animate-spin" />
Loading models…
</div>
{:else if ms.options.length === 0 && ms.isMultiModel}
{:else if ms.options.length === 0 && ms.isMultiModel && !ms.switchingBackends}
<p class="text-xs text-muted-foreground">No models available.</p>
{:else}
{@const selectedOption = ms.getDisplayOption()}