Fix model selector fuzzy search to match provider and support multi-token queries

This commit is contained in:
Mario Zechner 2025-12-15 18:05:32 +01:00
parent 7272eb9274
commit 3de8e0757d
3 changed files with 36 additions and 7 deletions

View file

@ -115,7 +115,7 @@ export class ModelSelectorComponent extends Container {
}
private filterModels(query: string): void {
this.filteredModels = fuzzyFilter(this.allModels, query, ({ id }) => id);
this.filteredModels = fuzzyFilter(this.allModels, query, ({ id, provider }) => `${id} ${provider}`);
this.selectedIndex = Math.min(this.selectedIndex, Math.max(0, this.filteredModels.length - 1));
this.updateList();
}