fix: 图+文本合并单任务;取消作废在飞结果;ready 不再回退远程
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 48s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 48s
This commit is contained in:
1 parent
189ba3b8f8
commit
8d110f285c
6 files changed
+126
-19
No files matched your search
@@ -96,6 +96,24 @@ ok('内置 prompt 节点 + 上游图:文本保留', tasks.length === 1 && task
|
||||
ok('两张参考图 + 空文本 → 1 个任务、refs=2', ts.length === 1 && ts[0].text === '' && ts[0].refs.length === 2, JSON.stringify(ts.map((t) => ({ t: t.text, r: t.refs.length }))))
|
||||
}
|
||||
|
||||
// 7b) 一张图 + 一段文本 → 插件文本节点:合并成 1 个任务(不能多生成一张没图的)
|
||||
{
|
||||
const txtNode = { id: 'x9', type: 'textout', x: -50, y: 20, data: { text: '上游文案' } }
|
||||
const edges2 = [{ id: 'e1', from: 'r1', to: 't1' }, { id: 'ex9', from: 'x9', to: 't1' }, e2]
|
||||
const ts = tg.buildGenerationTasksV2(gen, [ref, txtNode, tpl, gen], edges2)
|
||||
ok('图 + 文本 → 1 个任务', ts.length === 1, JSON.stringify(ts.map((t) => ({ t: t.text, r: t.refs.length }))))
|
||||
ok('图 + 文本 → 自己的文本优先、refs=1', ts.length === 1 && ts[0].text === '我要画一只猫' && ts[0].refs.length === 1)
|
||||
}
|
||||
|
||||
// 7c) 图 + 文本(节点自己没文本)→ 用上游文本、refs=1
|
||||
{
|
||||
const txtNode = { id: 'x9', type: 'textout', x: -50, y: 20, data: { text: '上游文案' } }
|
||||
const tplEmpty3 = { id: 't1', type: 'plugin:promptlib:ptpl', x: 100, y: 0, data: { text: '', outKind: 'prompt' } }
|
||||
const edges2 = [{ id: 'e1', from: 'r1', to: 't1' }, { id: 'ex9', from: 'x9', to: 't1' }, e2]
|
||||
const ts = tg.buildGenerationTasksV2(gen, [ref, txtNode, tplEmpty3, gen], edges2)
|
||||
ok('图 + 文本(节点无文本)→ 1 个任务、用上游文本', ts.length === 1 && ts[0].text === '上游文案' && ts[0].refs.length === 1, JSON.stringify(ts.map((t) => ({ t: t.text, r: t.refs.length }))))
|
||||
}
|
||||
|
||||
// 8) 回归:相册(2 张) → 插件文本节点 → 仍是一图一任务(不能被压平)
|
||||
{
|
||||
const album = { id: 'a1', type: 'plugin:album:album', x: 0, y: 0, data: { outKind: 'images', items: [{ src: 'data:image/png;base64,AAA' }, { src: 'data:image/png;base64,BBB' }] } }
|
||||
|
||||
Reference in new issue
Block a user