+ [task#149196] render the models table.

This commit is contained in:
wangzemei
2025-10-09 13:34:49 +08:00
committed by sunhao
parent 54bc41d68f
commit 2cf50877d0
+18
View File
@@ -9,4 +9,22 @@ window.initModelList = async function()
{
const isOK = await zui.AIPanel?.shared?.store.isOK();
if(!isOK) return;
$('#modelsList').addClass('loading');
const models = await zui.AIPanel.shared.store.getLlmModels();
models?.forEach((model, index)=> {
model.index = index + 1;
});
const {modelLang, actionLang, converseLang} = $('.models-view').data();
const cols = [
{name: 'index', title: 'ID', type: 'id', sortType: false},
{name: 'id', title: modelLang},
{name: 'actions', title: actionLang, width: 90, type: 'actions', actions: ['converse'], actionsMap: {
// TODO: The conversation page has not been developed yet.
converse: {text: converseLang},
}},
];
$('#modelsList').zui('dtable').render({cols, data: models});
$('#modelsList').removeClass('loading');
}