feat: improve model scan cache override, combo UX, and filename handling
- Add force_rescan end-to-end so callers can bypass the short-lived local model scan cache: backend entry in __init__.py and core/resolver.py, lifecycle_graph_methods forwards it through the workflow analysis body, and download_target_methods passes ?force=1 from the refresh flow. - Rewrite combo dropdown lifecycle in missing_browser_methods with show/hide helpers, pointer-capture tracking, and a capture-phase outside-click listener so the list stays open during drag/hover and closes reliably otherwise. - Animate refresh buttons (CSS keyframes + JS Web Animations) with reduced-motion fallback. - Encode selected model path into the selected-bar data-model attribute and wire contextmenu so users can open the containing folder from the selection. - Fix XSS risk in selected-bar label by escaping label HTML; change queue/selected Remove buttons to danger style. - Increase max missing-browser model column width clamp from 430 to 820 and stop truncating missing-filename display; show full filename with tooltip instead. - Update huggingface-author-index.json metadata timestamp/counts (1 file changed, 1 line).
This commit is contained in:
+13
-1
@@ -207,6 +207,12 @@ class ModelResolverExtension:
|
||||
data = await request.json()
|
||||
workflow_json = data.get("workflow")
|
||||
analysis_id = str(data.get("analysis_id") or "").strip()
|
||||
force_rescan = data.get("force_rescan", False)
|
||||
force_rescan = (
|
||||
force_rescan
|
||||
if isinstance(force_rescan, bool)
|
||||
else str(force_rescan).lower() in {"1", "true", "yes"}
|
||||
)
|
||||
|
||||
if not workflow_json:
|
||||
return web.json_response(
|
||||
@@ -240,6 +246,7 @@ class ModelResolverExtension:
|
||||
0.0,
|
||||
10,
|
||||
update_analysis_progress if analysis_id else None,
|
||||
force_rescan=force_rescan,
|
||||
)
|
||||
|
||||
# Filter out LoraManager lorAs that already exist locally (exists=True)
|
||||
@@ -529,7 +536,12 @@ class ModelResolverExtension:
|
||||
async def get_models(request):
|
||||
"""Get list of all available models."""
|
||||
try:
|
||||
models = get_model_files()
|
||||
force_rescan = str(
|
||||
request.query.get("force")
|
||||
or request.query.get("force_rescan")
|
||||
or ""
|
||||
).lower() in {"1", "true", "yes"}
|
||||
models = get_model_files(force_rescan=force_rescan)
|
||||
return web.json_response(models)
|
||||
except Exception as e:
|
||||
self.logger.error(
|
||||
|
||||
Reference in New Issue
Block a user