fix(task-graph): 插件文本节点接上游时不再丢自己的文本(修连图后生图 400)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m12s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m12s
This commit is contained in:
1 parent
1dd0652825
commit
c59aa4c3e8
5 files changed
+96
-6
No files matched your search
@@ -184,9 +184,17 @@
|
||||
return groups.map((g, gi) => ({ sourceNodeId: n.id + '#b' + gi, ownerNodeId: n.id, title: String((n.data && n.data.title) || '').trim(), text: albumText, refNodes: g, diagnostics: diag }))
|
||||
}
|
||||
if (children.length) {
|
||||
return selfRefs.length
|
||||
? children.map((t) => ({ ...t, ownerNodeId: n.id, refNodes: dedupeTaskRefs((t.refNodes || []).concat(selfRefs)) }))
|
||||
: children.map((t) => ({ ...t, ownerNodeId: n.id }))
|
||||
// 2026-12-03:插件文本节点接了上游(例如给「提示词模板」接一张参考图)时,
|
||||
// 这里原来直接返回 children,把节点自己的 data.text 丢成空串 ⇒ 发出去只有图没有提示词,
|
||||
// 生图服务商报 400 INVALID_ARGUMENT。口径与上面的 prompt 分支一致:自己的文本优先,参考图取并集。
|
||||
const ownTitle = String((n.data && n.data.title) || '').trim()
|
||||
return children.map((t) => ({
|
||||
...t,
|
||||
ownerNodeId: n.id,
|
||||
title: ownTitle || t.title || '',
|
||||
text: own || t.text,
|
||||
refNodes: dedupeTaskRefs((t.refNodes || []).concat(selfRefs)),
|
||||
}))
|
||||
}
|
||||
return [{ sourceNodeId: n.id, ownerNodeId: n.id, text: own, refNodes: selfRefs, diagnostics: { cycles: [], disabledSources: [] } }]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user