保存抠图实际模型元数据
在 generationInputs 顶层记录实际抠图供应商与模型 覆盖 BgFilter、阿里云和本地键色及三条派生资产持久化链路 保持源生图模型与图片信息展示契约不变 补充后端前端测试并同步数据契约和决策文档
This commit is contained in:
@@ -68,17 +68,20 @@ describe('ImageCanvasMetadataModalView', () => {
|
||||
});
|
||||
|
||||
it('keeps the generation model while hiding internal processing models', () => {
|
||||
const generationInputsWithInternalMattingMetadata = {
|
||||
fields: [
|
||||
{ title: '处理阶段', value: '角色抠图' },
|
||||
{ title: '处理模型', value: 'birefnet' },
|
||||
],
|
||||
references: [],
|
||||
mattingProvider: 'Aliyun Matting',
|
||||
mattingModel: 'segment-common-image',
|
||||
};
|
||||
const { rerender } = render(
|
||||
<ImageCanvasMetadataModalView
|
||||
layer={createLayer({
|
||||
model: 'gpt-image-2',
|
||||
generationInputs: {
|
||||
fields: [
|
||||
{ title: '处理阶段', value: '角色抠图' },
|
||||
{ title: '处理模型', value: 'birefnet' },
|
||||
],
|
||||
references: [],
|
||||
},
|
||||
generationInputs: generationInputsWithInternalMattingMetadata,
|
||||
})}
|
||||
onClose={vi.fn()}
|
||||
/>,
|
||||
@@ -92,6 +95,8 @@ describe('ImageCanvasMetadataModalView', () => {
|
||||
expect(within(dialog).getByText('Model')).toBeTruthy();
|
||||
expect(within(dialog).getByText('gpt-image-2')).toBeTruthy();
|
||||
expect(within(dialog).queryByText('birefnet')).toBeNull();
|
||||
expect(within(dialog).queryByText('Aliyun Matting')).toBeNull();
|
||||
expect(within(dialog).queryByText('segment-common-image')).toBeNull();
|
||||
|
||||
rerender(
|
||||
<ImageCanvasMetadataModalView
|
||||
|
||||
Reference in New Issue
Block a user