Remove stale ref_images input from saved nodes

This commit is contained in:
OpenClaw Agent
2026-07-17 10:24:04 +00:00
parent cc51b298fd
commit 8736d4a463

View File

@@ -11542,6 +11542,15 @@ app.registerExtension({
const fallbackWidget = node.widgets[fallbackIndex];
return fallbackWidget?.value ?? null;
};
this._removeLegacyInputs = function () {
if (!Array.isArray(self.inputs)) return;
for (const legacyName of ["ref_images"]) {
const idx = self.inputs.findIndex(i => i?.name === legacyName);
if (idx !== -1) {
self.removeInput(idx);
}
}
};
this._resolveNodeLinkedValue = function (targetNode, inputName, options = {}) {
const originNode = self._findLinkedOriginNode(targetNode, inputName);
if (!originNode) return null;
@@ -11770,6 +11779,7 @@ app.registerExtension({
}
}
};
this._removeLegacyInputs();
const origOnConnectionsChange = this.onConnectionsChange;
this.onConnectionsChange = function (type, index, connected, link_info) {
@@ -12176,13 +12186,14 @@ app.registerExtension({
};
const onConfigure = nodeType.prototype.onConfigure;
nodeType.prototype.onConfigure = function (info) {
// 1. Call parent/original onConfigure first, with info.widgets_values intact
const out = onConfigure ? onConfigure.apply(this, arguments) : undefined;
if (info.properties) {
this.properties = { ...this.properties, ...info.properties };
}
nodeType.prototype.onConfigure = function (info) {
// 1. Call parent/original onConfigure first, with info.widgets_values intact
const out = onConfigure ? onConfigure.apply(this, arguments) : undefined;
this._removeLegacyInputs?.();
if (info.properties) {
this.properties = { ...this.properties, ...info.properties };
}
console.log("[LTXDirector debug] onConfigure called. info.widgets_values:", info.widgets_values ? JSON.stringify(info.widgets_values) : "undefined");