From 910f145baf37f7e0b528f53d6f6582d930e1ba6d Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 11 Nov 2025 17:28:32 +0800 Subject: [PATCH] * [misc] show model name instead of id in models list. --- module/aiapp/js/models.ui.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/aiapp/js/models.ui.js b/module/aiapp/js/models.ui.js index 412f670481..de2f3ec88c 100644 --- a/module/aiapp/js/models.ui.js +++ b/module/aiapp/js/models.ui.js @@ -12,14 +12,16 @@ window.initModelList = async function() $('#modelsList').addClass('loading'); const models = await zui.AIPanel.shared.store.getLlmModels(); - models?.forEach((model, index)=> { + (models || []).forEach((model, index)=> + { model.index = index + 1; + model.name = model.name || model.id; }); const {modelLang, actionLang, converseLang, canConverse} = $('.models-view').data(); const cols = [ {name: 'index', title: 'ID', type: 'id', sortType: false}, - {name: 'id', title: modelLang}, + {name: 'name', title: modelLang}, {name: 'actions', title: actionLang, width: 90, type: 'actions', onRenderCell(_result, {col, row}) { if(!canConverse) return [{html: ''}];