This commit is contained in:
k
2026-09-21 21:10:09 +02:00
parent c0e7899ab3
commit 4cefd3e17f
18 changed files with 577 additions and 217 deletions
+4 -3
View File
@@ -90,11 +90,12 @@ export function Chat({
const modelGroups: PickerGroup[] = (() => {
const byDriver = new Map<string, { value: string; label: string; hint: string }[]>();
for (const m of models) {
const list = byDriver.get(m.driver) ?? [];
const group = m.group ?? m.driver;
const list = byDriver.get(group) ?? [];
list.push({ value: m.id, label: m.label, hint: m.id });
byDriver.set(m.driver, list);
byDriver.set(group, list);
}
return [...byDriver.entries()].map(([driver, options]) => ({ group: driver, options }));
return [...byDriver.entries()].map(([group, options]) => ({ group, options }));
})();
useEffect(() => {