refactor: centralize resetAndReload functionality in baseModelApi

This commit is contained in:
Will Miao
2025-07-25 17:48:02 +08:00
parent 7f205cdcc8
commit a3d6e62035
13 changed files with 21 additions and 56 deletions

View File

@@ -1,7 +1,7 @@
import { modalManager } from './ModalManager.js';
import { showToast } from '../utils/uiHelpers.js';
import { state } from '../state/index.js';
import { resetAndReload } from '../api/loraApi.js';
import { resetAndReload } from '../api/baseModelApi.js';
import { setStorageItem, getStorageItem } from '../utils/storageHelpers.js';
import { DOWNLOAD_PATH_TEMPLATES, MAPPABLE_BASE_MODELS } from '../utils/constants.js';
@@ -664,7 +664,7 @@ export class SettingsManager {
await window.recipeManager.loadRecipes();
} else if (this.currentPage === 'checkpoints') {
// Reload the checkpoints without updating folders
await window.checkpointsManager.loadCheckpoints();
await resetAndReload(false);
}
}