ui: refresh model list (#1074)

that's all folks

Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
This commit is contained in:
Nayan
2025-08-11 10:24:05 -04:00
committed by GitHub
parent 6eaae848c9
commit ec3f044c83
2 changed files with 9 additions and 0 deletions
@@ -68,6 +68,14 @@ ModelsPanel::ModelsPanel(QWidget *parent) : QWidget(parent) {
connect(uiStateSP(), &UIStateSP::uiUpdate, this, &ModelsPanel::updateLabels);
list->addItem(currentModelLblBtn);
refreshAvailableModelsBtn = new ButtonControlSP(tr("Refresh Model List"), tr("REFRESH"), "", this);
connect(refreshAvailableModelsBtn, &ButtonControlSP::clicked, this, [=]() {
params.put("ModelManager_LastSyncTime", "0");
ConfirmationDialog::alert(tr("Fetching Latest Models"), this);
});
list->addItem(refreshAvailableModelsBtn);
clearModelCacheBtn = new ButtonControlSP(tr("Clear Model Cache"), tr("CLEAR"), "", this);
connect(clearModelCacheBtn, &ButtonControlSP::clicked, this, &ModelsPanel::clearModelCache);
@@ -79,5 +79,6 @@ private:
QFrame *policyFrame;
Params params;
ButtonControlSP *clearModelCacheBtn;
ButtonControlSP *refreshAvailableModelsBtn;
};