mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 06:04:05 +00:00
Add support for /model autocomplete
This commit is contained in:
parent
c95b132fcc
commit
5cf0490383
2 changed files with 34 additions and 3 deletions
|
|
@ -154,7 +154,7 @@ export class ModelSelectorComponent extends Container {
|
|||
}
|
||||
|
||||
private filterModels(query: string): void {
|
||||
this.filteredModels = fuzzyFilter(this.allModels, query, ({ id, provider }) => `${id} ${provider}`);
|
||||
this.filteredModels = fuzzyFilter(this.allModels, query, ({ id }) => id);
|
||||
this.selectedIndex = Math.min(this.selectedIndex, Math.max(0, this.filteredModels.length - 1));
|
||||
this.updateList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue