* [misc] show model name instead of id in models list.

This commit is contained in:
sunhao
2025-12-02 16:32:08 +08:00
parent b3ad5dda61
commit 910f145baf
+4 -2
View File
@@ -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: ''}];