+
+
+
+
+
+ No models available. Enable some models in the account settings.
+
+ {#each groupedModels as [company, models] (company)}
+
+
+ {company}
+
+
+ {#each models as model (model._id)}
+ {@const isSelected = settings.modelId === model.model_id}
+ {@const sn = splitName(model.model_id.replace(/^[^/]+\//, ''))}
+ selectModel(model.model_id)}
+ class={cn(
+ 'border-border flex h-40 w-32 flex-col items-center justify-center rounded-lg border p-2',
+ 'select-none',
+ 'data-selected:bg-accent/50 data-selected:text-accent-foreground',
+ isSelected && 'border-reflect border-none',
+ 'scroll-m-10'
+ )}
+ >
+ {#if getModelIcon(model.model_id)}
+ {@const ModelIcon = getModelIcon(model.model_id)}
+
+ {:else if companyIcons[getCompanyFromModelId(model.model_id)]}
+ {@const CompanyIcon = companyIcons[getCompanyFromModelId(model.model_id)]}
+
+ {/if}
+
-
- {#if getModelIcon(model.model_id)}
- {@const ModelIcon = getModelIcon(model.model_id)}
-
- {:else if companyIcons[getCompanyFromModelId(model.model_id)]}
- {@const CompanyIcon = companyIcons[getCompanyFromModelId(model.model_id)]}
-
- {/if}
-
- {model.model_id.replace(/^[^/]+\//, '')}
-
- {#if settings.modelId === model.model_id}
-
- {/if}
-
-
- {/each}
-
-
- {/each}
-
-
-
-
-
+ {sn[0]}
+
+
+ {sn.slice(1).join(' ')}
+
+
+ {/each}
+
+
+ {/each}
+
+
+
+
{/if}