Show only models that are not be hidden

This commit is contained in:
Clivia 2024-08-03 10:58:12 +08:00
parent f21e9dbd9a
commit 8f49429228

View File

@ -21,8 +21,10 @@
let filteredModels = []; let filteredModels = [];
$: filteredModels = $models $: filteredModels = $models
.filter((p) => .filter(
p.name.toLowerCase().includes(prompt.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '') (p) =>
p.name.toLowerCase().includes(prompt.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '') &&
p?.info?.meta?.hidden
) )
.sort((a, b) => a.name.localeCompare(b.name)); .sort((a, b) => a.name.localeCompare(b.name));