Update Models.svelte

feat: case-insensitive @model-name search
This commit is contained in:
silentoplayz 2024-06-25 18:22:38 +00:00 committed by GitHub
parent 01ad197973
commit ef619321ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@
let filteredModels = [];
$: filteredModels = $models
.filter((p) => p.name.includes(prompt.split(' ')?.at(0)?.substring(1) ?? ''))
.filter((p) => p.name.toLowerCase().includes(prompt.toLowerCase().split(' ')?.at(0)?.substring(1) ?? ''))
.sort((a, b) => a.name.localeCompare(b.name));
$: if (prompt) {