feat(previs): 图片生成预演台 - 从图片节点交给 Agent 复现为可编辑 3D 预演
图片工具栏新增「生成预演台」,自动选用支持看图的文本模型并提交复现指令。对话用节点卡片展示「此图」,普通图片演员只写名称时不再要求角色卡绑定。
This commit is contained in:
@@ -64,6 +64,23 @@ test("renders an agent node link as a titled inline node card", () => {
|
||||
expect(visibleText).not.toContain("video-1790385749473-q4157");
|
||||
});
|
||||
|
||||
test("renders the image-to-previs user request with the existing canvas node card", () => {
|
||||
const imageReference = { ...videoReference, kind: "image" as const, sourceType: "image" as const, label: "道姑", title: "道姑" };
|
||||
const html = renderToStaticMarkup(
|
||||
<AgentChatMessage
|
||||
item={{ id: "user-previs", role: "user", text: "根据此图生成 3D 预演台", canvasReferenceNodeId: imageReference.nodeId }}
|
||||
theme={canvasThemes.dark}
|
||||
references={[imageReference]}
|
||||
onFocusNode={() => {}}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(html).toContain('class="agent-message-node-link"');
|
||||
expect(html).toContain('class="agent-message-node-link-preview"');
|
||||
expect(html).toContain("道姑");
|
||||
expect(html).toContain("3D 预演台");
|
||||
});
|
||||
|
||||
test("labels character cards by resource kind instead of the underlying text type", () => {
|
||||
const nodeId = "text-1790385749473-char1";
|
||||
const reference = { id: nodeId, nodeId, kind: "character" as const, label: "李莫愁", title: "李莫愁", sourceType: "text" as const };
|
||||
|
||||
Reference in New Issue
Block a user