diff options
| author | Frank <[email protected]> | 2025-12-11 23:41:04 -0500 |
|---|---|---|
| committer | Frank <[email protected]> | 2025-12-11 23:41:04 -0500 |
| commit | 57120e69edadb5dd6a03538ee8dfb85a228d5173 (patch) | |
| tree | 8778c6788bc00a45b78dd94425b47bb9c1f9a8b6 /packages/console/app/src/routes/workspace | |
| parent | 11efda3f5caae86848478cebe479cab5f5fde002 (diff) | |
| download | opencode-57120e69edadb5dd6a03538ee8dfb85a228d5173.tar.gz opencode-57120e69edadb5dd6a03538ee8dfb85a228d5173.zip | |
Zen: sync
Diffstat (limited to 'packages/console/app/src/routes/workspace')
| -rw-r--r-- | packages/console/app/src/routes/workspace/[id]/model-section.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/console/app/src/routes/workspace/[id]/model-section.tsx b/packages/console/app/src/routes/workspace/[id]/model-section.tsx index 30815336d..e760ccea2 100644 --- a/packages/console/app/src/routes/workspace/[id]/model-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/model-section.tsx @@ -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) |
