Fix action category restore on reload
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user