From 34e5b9bdb0adb16962e6ec2cfa80abd42d891621 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 11 Oct 2025 16:17:39 -0400 Subject: [PATCH] wip: zen --- .../src/routes/workspace/[id]/model-section.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 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 9ecf74ae..1740c9d3 100644 --- a/packages/console/app/src/routes/workspace/[id]/model-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/model-section.tsx @@ -10,9 +10,10 @@ const getModelsInfo = query(async (workspaceID: string) => { "use server" return withActor(async () => { return { - all: Object.keys(ZenModel.list()) - .filter((model) => !["claude-3-5-haiku", "qwen3-max"].includes(model)) - .sort(([a], [b]) => a.localeCompare(b)), + all: Object.entries(ZenModel.list()) + .filter(([id, _model]) => !["claude-3-5-haiku", "qwen3-max"].includes(id)) + .sort(([_idA, modelA], [_idB, modelB]) => modelA.name.localeCompare(modelB.name)) + .map(([id, model]) => ({ id, name: model.name })), disabled: await Model.listDisabled(), } }, workspaceID) @@ -62,14 +63,14 @@ export function ModelSection() { - {(modelId) => { - const isEnabled = createMemo(() => !modelsInfo()!.disabled.includes(modelId)) + {({ id, name }) => { + const isEnabled = createMemo(() => !modelsInfo()!.disabled.includes(id)) return ( - {ZenModel.list()[modelId].name} + {name}
- +