feat(queue): 任务队列左栏整页插件 + 宿主 queue/pages 能力

This commit is contained in:
qiqi committed 2026-12-03 09:39:48 +08:00
1 parent 3cc53eec4b
commit f5859b7596
21 files changed
+582 -21

No files matched your search

+12 -1
View File
@@ -240,7 +240,18 @@
const cur = gn && Array.isArray(gn.data.result) ? gn.data.result : []
const nextResult = upsertGenerationEntry(cur, entry)
// 2026-12-02:每张结果落地就入队(这里是「结果写进节点数据」的唯一入口,批量/恢复都经过它)
try { if (global.__iwbIngest && entry && entry.url) global.__iwbIngest.enqueue({ url: entry.url, source: 'gen', w: entry.width, h: entry.height }) } catch (eI) { /* 落地失败不得影响出图 */ }
// 2026-12-03:带 meta(画布/节点/提示词/模型/尺寸),任务队列页据此跨画布展示与定位。
const _ws0 = (refs.workspaces || []).find((w) => w.id === runWorkspaceId)
const _meta = {
boardId: runWorkspaceId,
boardName: String((_ws0 && _ws0.name) || ''),
nodeId,
prompt: String((entry && (entry.taskTitle || entry.label)) || '').slice(0, 200),
model: String((node && node.data && node.data.model) || ''),
size: size || ((entry && entry.width && entry.height) ? (entry.width + 'x' + entry.height) : ''),
at: Number(entry && entry.at) || Date.now(),
}
try { if (global.__iwbIngest && entry && entry.url) global.__iwbIngest.enqueue({ url: entry.url, source: 'gen', w: entry.width, h: entry.height, meta: _meta }) } catch (eI) { /* 落地失败不得影响出图 */ }
genLatest = baseNodes.map((n) => (n.id === nodeId ? { ...n, data: { ...(n.data || {}), result: nextResult } } : n))
genLatest = commitRunNodes(runWorkspaceId, genLatest)
}