victor HF Staff commited on
Commit
f18ddf0
·
1 Parent(s): 90b890a

Highlight router model and improve descriptions

Browse files

Adds a gradient highlight for the router (Omni) model tile in the models page, updates its description in both backend and UI, and refines active model border styling for better theme support. Also tweaks the chat input dropdown hover style for consistency.

src/lib/components/chat/ChatInput.svelte CHANGED
@@ -235,7 +235,7 @@
235
 
236
  <DropdownMenu.Root>
237
  <DropdownMenu.Trigger
238
- class="btn size-7 rounded-full border bg-white text-black shadow transition-none enabled:hover:bg-white enabled:hover:shadow-inner dark:border-transparent dark:bg-gray-600/50 dark:text-white dark:hover:enabled:bg-black"
239
  disabled={loading}
240
  aria-label="Add attachment"
241
  >
 
235
 
236
  <DropdownMenu.Root>
237
  <DropdownMenu.Trigger
238
+ class="btn size-7 rounded-full border bg-white text-black shadow transition-none enabled:hover:bg-white enabled:hover:shadow-inner dark:border-transparent dark:bg-gray-600/50 dark:text-white dark:hover:enabled:bg-gray-600"
239
  disabled={loading}
240
  aria-label="Add attachment"
241
  >
src/lib/server/models.ts CHANGED
@@ -414,6 +414,7 @@ const buildModels = async (): Promise<ProcessedModel[]> => {
414
  id: routerAliasId,
415
  name: routerAliasId,
416
  displayName: routerLabel,
 
417
  logoUrl: routerLogo || undefined,
418
  preprompt: "",
419
  endpoints: [
 
414
  id: routerAliasId,
415
  name: routerAliasId,
416
  displayName: routerLabel,
417
+ description: "Automatically routes your messages to the best model for your request.",
418
  logoUrl: routerLogo || undefined,
419
  preprompt: "",
420
  endpoints: [
src/routes/models/+page.svelte CHANGED
@@ -81,6 +81,7 @@
81
  href="{base}/models/{model.id}"
82
  aria-label="Model card"
83
  class="relative flex flex-col gap-2 overflow-hidden rounded-xl border bg-gray-50/50 px-6 py-5 shadow hover:bg-gray-50 hover:shadow-inner dark:border-gray-800/70 dark:bg-gray-950/20 dark:hover:bg-gray-950/40"
 
84
  class:active-model={model.id === $settings.activeModel}
85
  >
86
  <div class="flex items-center justify-between gap-1">
@@ -139,10 +140,32 @@
139
  {model.displayName}
140
  </span>
141
  <span class="line-clamp-4 whitespace-pre-wrap text-sm text-gray-500 dark:text-gray-400">
142
- {model.description || "-"}
143
  </span>
144
  </a>
145
  {/each}
146
  </div>
147
  </div>
148
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  href="{base}/models/{model.id}"
82
  aria-label="Model card"
83
  class="relative flex flex-col gap-2 overflow-hidden rounded-xl border bg-gray-50/50 px-6 py-5 shadow hover:bg-gray-50 hover:shadow-inner dark:border-gray-800/70 dark:bg-gray-950/20 dark:hover:bg-gray-950/40"
84
+ class:omni-gradient={model.isRouter}
85
  class:active-model={model.id === $settings.activeModel}
86
  >
87
  <div class="flex items-center justify-between gap-1">
 
140
  {model.displayName}
141
  </span>
142
  <span class="line-clamp-4 whitespace-pre-wrap text-sm text-gray-500 dark:text-gray-400">
143
+ {model.isRouter ? "Routes your messages to the best model for your request." : model.description || "-"}
144
  </span>
145
  </a>
146
  {/each}
147
  </div>
148
  </div>
149
  </div>
150
+
151
+ <style>
152
+ /* Subtle highlight for the router (Omni) tile */
153
+ .omni-gradient {
154
+ /* layered gradients to keep readable on both themes */
155
+ background-image:
156
+ radial-gradient(900px 300px at -10% -20%, rgba(59, 130, 246, 0.16), transparent 60%),
157
+ radial-gradient(700px 240px at 110% 120%, rgba(16, 185, 129, 0.16), transparent 60%),
158
+ linear-gradient(135deg, rgba(236, 72, 153, 0.10), rgba(59, 130, 246, 0.08));
159
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 18px rgba(59, 130, 246, 0.12), 0 2px 8px rgba(236, 72, 153, 0.10);
160
+ }
161
+
162
+ :global(.dark) .omni-gradient {
163
+ background-image:
164
+ radial-gradient(900px 300px at -10% -20%, rgba(59, 130, 246, 0.12), transparent 60%),
165
+ radial-gradient(700px 240px at 110% 120%, rgba(16, 185, 129, 0.12), transparent 60%),
166
+ linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(59, 130, 246, 0.06));
167
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 28px rgba(0, 0, 0, 0.25);
168
+ }
169
+
170
+ /* Active border handled via Tailwind utilities (see .active-model in src/styles/main.css) */
171
+ </style>
src/styles/main.css CHANGED
@@ -10,7 +10,8 @@
10
  }
11
 
12
  .active-model {
13
- @apply border-black dark:border-white;
 
14
  }
15
 
16
  .file-hoverable {
 
10
  }
11
 
12
  .active-model {
13
+ /* Ensure active border wins over defaults/utilities in both themes */
14
+ @apply !border-black dark:!border-white/60;
15
  }
16
 
17
  .file-hoverable {