fix(combine): 继承态提示词把上游文案与参考图交给组合/连接节点
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 33s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 33s
组合节点的拼接逻辑不变。断点在「来源判定」:batchSrcText/isBatchSrc 只看节点自身 data.text,而提示词/文本节点在「继承 · 来自 上一级」时 data.text 为空 —— 组合读不到 这一路、nodeRefsOf(combine) 也把它过滤掉(组合→文本/分层节点的参考图随之丢失); 出图侧 resolveNodeTaskValues 走 own||上游,一直是通的,所以出现「能出图、组合是空的」。 - canvas-text: batchSrcText/isBatchSrc 增加可选 (edges, nodes);自身无文案时按 inheritedTextOf 同一套排序取上游第一条(提示词不拼合多路,与节点体显示一致), 只穿透 prompt/textout/relay/batch,组合/LLM/插件节点不越过;不传参保持旧行为 - 组合/连接/端口定位/画布渲染等调用点补传 edges/nodes - 测试:canvas-text 补继承态断言(多路取第一条/接管/停用/环)、plugin-style-node 补组合端到端、iwb-inherit-text 补 DOM 用例(组合行出现并跟随上游)
This commit is contained in:
1 parent
01c922d7e4
commit
9225a76895
9 files changed
+159
-27
No files matched your search
@@ -468,9 +468,9 @@
|
||||
let batchSrcTxt = ''
|
||||
const bEdgeT = (props.edges || []).filter((e) => e.to === node.id).map((e) => ({ e, b: (props.nodes || []).find((n) => n.id === e.from) })).find((o) => o.b && o.b.type === 'batch')
|
||||
if (bEdgeT) {
|
||||
const bsrcsT = (props.edges || []).filter((e) => e.to === bEdgeT.b.id).map((e) => (props.nodes || []).find((n) => n.id === e.from)).filter((n) => isBatchSrc(n)).slice().sort((a, b2) => (a.y - b2.y) || (a.x - b2.x))
|
||||
const bsrcsT = (props.edges || []).filter((e) => e.to === bEdgeT.b.id).map((e) => (props.nodes || []).find((n) => n.id === e.from)).filter((n) => isBatchSrc(n, props.edges || [], props.nodes || [])).slice().sort((a, b2) => (a.y - b2.y) || (a.x - b2.x))
|
||||
const tgtT = bEdgeT.e.batchSrcId ? bsrcsT.find((s) => s.id === bEdgeT.e.batchSrcId) : bsrcsT[0]
|
||||
if (tgtT) batchSrcTxt = batchSrcText(tgtT)
|
||||
if (tgtT) batchSrcTxt = batchSrcText(tgtT, props.edges || [], props.nodes || [])
|
||||
}
|
||||
// 透传参考图展示(按来源顺序,像提示词面板)
|
||||
const tRefs = nodePreviewRefsV2(node, props.nodes || [], props.edges || [])
|
||||
@@ -604,7 +604,7 @@
|
||||
const { onUpdate, stop } = ctx
|
||||
// 连接节点:多个来源各自追加统一文案,每个来源对应一对输入/输出端口
|
||||
const d = node.data || {}
|
||||
const bsrcs = (props.edges || []).filter((e) => e.to === node.id).map((e) => (props.nodes || []).find((n) => n.id === e.from)).filter((n) => isBatchSrc(n)).slice().sort((a, b) => (a.y - b.y) || (a.x - b.x))
|
||||
const bsrcs = (props.edges || []).filter((e) => e.to === node.id).map((e) => (props.nodes || []).find((n) => n.id === e.from)).filter((n) => isBatchSrc(n, props.edges || [], props.nodes || [])).slice().sort((a, b) => (a.y - b.y) || (a.x - b.x))
|
||||
const outCount = Object.keys(d.outs || {}).filter((k) => (props.nodes || []).some((n) => n.id === d.outs[k])).length // 兼容旧数据(手动模式下不再自动创建)
|
||||
return el('div', { className: 'iwb-node-body' },
|
||||
el('div', { className: 'iwb-row iwb-gen-head' },
|
||||
|
||||
Reference in new issue
Block a user