Fix action category restore on reload

This commit is contained in:
GenorTG
2026-11-10 14:07:05 +01:00
parent 9e50f133bd
commit 64a2f1b450
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "ComfyUI-PromptForge"
description = "ComfyUI prompt enhancement suite: model/config node with GPU-aware auto settings, prompt enhancer with a preset catalog, and a standalone config finder."
version = "1.28.25"
version = "1.28.26"
license = { file = "LICENSE" }
dependencies = [
"transformers",
+3 -2
View File
@@ -412,11 +412,12 @@ app.registerExtension({
const result = onConfigure?.apply(this, arguments);
const category = this.widgets.find((widget) => widget.name === "category");
const action = this.widgets.find((widget) => widget.name === "action");
if (category && action) api.fetchApi("/promptforge/actions").then((response) => response.json()).then((known) => {
if (category && action) setTimeout(() => api.fetchApi("/promptforge/actions").then((response) => response.json()).then((known) => {
const found = known[String(action.value)]?.category;
if (found) category.value = found;
this.promptforgeRefreshAction?.();
});
this.setDirtyCanvas(true, true);
}), 60);
this.promptforgeRefreshAction?.();
setTimeout(() => this.promptforgeRestoreActionSize?.(), 0);
return result;