调整图片编辑器参考图选择交互
- 常规参考图入口改为先弹出来源菜单,支持从画布选择和上传图片。 - 角色规范、图标规范和常规参考图来源菜单统一向上弹出。 - 画布参考图选择拦截普通图层选中逻辑,保持生成面板不隐藏。 - 补充图片编辑器交互测试与技术文档说明。
This commit is contained in:
@@ -104,10 +104,46 @@ describe('ImageCanvasGenerationModel', () => {
|
||||
.toBe('自定义');
|
||||
expect(buildQuickEditModelOptions('nano-banana')).toEqual([
|
||||
{ label: 'nano-banana', value: 'nano-banana' },
|
||||
{ label: 'GPT Image', value: DEFAULT_IMAGE_MODEL },
|
||||
{ label: 'nanobanana2', value: DEFAULT_IMAGE_MODEL },
|
||||
{ label: 'gpt-image-2', value: 'gpt-image-2' },
|
||||
]);
|
||||
});
|
||||
|
||||
it('adds reference image semantics and snapshots for spec generation references', () => {
|
||||
const prompt = buildSpecPrompt(
|
||||
'ui',
|
||||
{
|
||||
playSetting: '消除玩法',
|
||||
artStyle: '清爽卡通',
|
||||
bodyRatio: '3',
|
||||
characterView: '',
|
||||
customPrompt: '',
|
||||
},
|
||||
true,
|
||||
);
|
||||
|
||||
expect(prompt).toContain('参考图生成规范');
|
||||
expect(prompt).toContain('参考图1');
|
||||
expect(prompt).toContain('生成一张完整游戏UI规范汇总设定展板');
|
||||
expect(
|
||||
buildSpecPrompt(
|
||||
'custom',
|
||||
{ ...blankSpecValues, customPrompt: '生成一张怪兽规范图' },
|
||||
true,
|
||||
),
|
||||
).toContain('生成一张怪兽规范图');
|
||||
expect(
|
||||
buildSpecGenerationInputs(
|
||||
'custom',
|
||||
{ ...blankSpecValues, customPrompt: '生成一张怪兽规范图' },
|
||||
{ id: 'spec-ref', label: '参考.png', src: '/ref.png' },
|
||||
),
|
||||
).toEqual({
|
||||
fields: [{ title: '自定义规范提示词', value: '生成一张怪兽规范图' }],
|
||||
references: [{ title: '参考图', label: '参考.png', src: '/ref.png' }],
|
||||
});
|
||||
});
|
||||
|
||||
it('uses objectKey for character animation references before falling back to src', () => {
|
||||
expect(
|
||||
resolveCharacterAnimationSourceImageSrc({
|
||||
|
||||
Reference in New Issue
Block a user