Zen: sync

This commit is contained in:
Frank
2025-12-11 23:41:04 -05:00
parent 11efda3f5c
commit 57120e69ed
14 changed files with 109 additions and 50 deletions

View File

@@ -43,9 +43,12 @@ const getModelsInfo = query(async (workspaceID: string) => {
const pA = getPriority(idA)
const pB = getPriority(idB)
if (pA !== pB) return pA - pB
return modelA.name.localeCompare(modelB.name)
const modelAName = Array.isArray(modelA) ? modelA[0].name : modelA.name
const modelBName = Array.isArray(modelB) ? modelB[0].name : modelB.name
return modelAName.localeCompare(modelBName)
})
.map(([id, model]) => ({ id, name: model.name })),
.map(([id, model]) => ({ id, name: Array.isArray(model) ? model[0].name : model.name })),
disabled: await Model.listDisabled(),
}
}, workspaceID)