完善快速编辑参考图与生成占位

- 快速编辑支持最多8张额外参考图,并将原图自动作为最后一张参考图提交

- 快速编辑尺寸和模型沿用原图配置,按禁用态参数胶囊展示

- 快速编辑提交前同步改写原图引用为实际图序号

- 快速编辑生成改为创建独立画布生成占位,并支持键盘删除生成中对象

- 对齐生成类面板参考图图标、规范类固定参数和相关文档测试
This commit is contained in:
2026-06-18 22:39:03 +08:00
parent b04b6cee2b
commit ea29887d9c
65 changed files with 2819 additions and 531 deletions
@@ -125,7 +125,7 @@ describe('ImageCanvasGenerationSubmissionModel', () => {
},
result: {
assetKind: 'icon-spec',
title: '图标素材规范 8',
title: '图标规范 8',
},
});
expect(plan.kind === 'image' ? plan.result.generationInputs : null).toEqual({
@@ -143,6 +143,34 @@ describe('ImageCanvasGenerationSubmissionModel', () => {
});
});
it('treats the renamed UI spec entry as an icon spec asset', () => {
const plan = buildImageGenerationSubmissionPlan({
dialog: {
mode: 'spec',
prompt: '',
status: 'idle',
specType: 'ui',
specValues: {
playSetting: '消除类派对玩法',
artStyle: '糖果玻璃拟物',
bodyRatio: '3',
characterView: '',
customPrompt: '',
},
},
layers: [],
nextGeneratedIndex: 2,
});
expect(plan).toMatchObject({
kind: 'image',
result: {
assetKind: 'icon-spec',
title: '图标规范 2',
},
});
});
it('builds character plans with references and remembered model', () => {
const plan = buildImageGenerationSubmissionPlan({
dialog: {
@@ -193,7 +221,7 @@ describe('ImageCanvasGenerationSubmissionModel', () => {
fields: [{ title: '角色设定', value: '白发骑士' }],
references: [
{
title: '角色形象规范',
title: '角色规范',
label: '角色规范',
src: 'data:image/png;base64,spec',
},
@@ -231,7 +259,7 @@ describe('ImageCanvasGenerationSubmissionModel', () => {
expect(plan).toEqual({
ok: false,
errorMessage: '请选择图标素材规范',
errorMessage: '请选择图标规范',
});
});
@@ -285,7 +313,7 @@ describe('ImageCanvasGenerationSubmissionModel', () => {
fields: [{ title: '素材描述', value: '返回按钮\n设置按钮' }],
references: [
{
title: '图标素材规范',
title: '图标规范',
label: '图标规范',
src: 'data:image/png;base64,spec',
},