Add force refresh support and state management improvements to plugin installer and model config

- Add force parameter to plugin index fetch with cache-busting headers and timestamp
- Add openIndexView and reloadIndex methods to pluginInstallStore for explicit refresh
- Add request sequence tracking to prevent race conditions in concurrent index loads
- Move models summary state from component to store with loading/caching support
- Add refreshModelsSummary, ensureModelsSummaryLoaded, and modal
This commit is contained in:
frdel 2026-03-26 17:24:32 +01:00
parent 87ad4dab86
commit c7a983638e
6 changed files with 185 additions and 64 deletions

View file

@ -56,4 +56,11 @@ class PluginInstall(ApiHandler):
return update_from_git(input.get("plugin_name", ""))
def _fetch_index(self, input: dict) -> dict:
return {"success": True, **get_plugin_hub_index()}
force_raw = input.get("force", False)
force = force_raw if isinstance(force_raw, bool) else str(force_raw).strip().lower() in {
"1",
"true",
"yes",
"on",
}
return {"success": True, **get_plugin_hub_index(force=force)}