chore(sync): 上游同步 - 快照导入 upstream/main@e70fe1b9(v1.6.5)并重放本项目差异

This commit is contained in:
tongtong committed 2026-10-12 11:52:01 +08:00
1 parent c9979a4a2b
commit 43c3dd3568
167 files changed
+5792 -7802

No files matched your search

+10 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "bun:test";
import { AGENT_APPROVAL_SUPERSEDED_BY_NODE, agentApprovalMatchesSettings, agentApprovalModel, agentApprovalModelSelection, agentApprovalTargetGenerating, agentImageApproval, agentMediaApprovalTargetNodeId } from "../src/lib/canvas/agent-media-approval";
import { AGENT_APPROVAL_SUPERSEDED_BY_NODE, agentApprovalMatchesSettings, agentApprovalModel, agentApprovalModelSelection, agentApprovalTargetGenerating, agentImageApproval, agentMediaApprovalTargetNodeId, agentVideoApproval } from "../src/lib/canvas/agent-media-approval";
import type { CanvasNodeData } from "../src/types/canvas";
import { createModelChannel, defaultConfig, encodeChannelModel } from "../src/stores/use-config-store";
@@ -40,6 +40,15 @@ describe("image generation approval settings", () => {
});
});
describe("video generation approval settings", () => {
it("reads video duration and audio options", () => {
const approval = agentVideoApproval({ toolName: "generate_media", arguments: { mode: "video", prompt: "镜头运动", size: "9:16", quality: "720p", durationSeconds: 8, videoGenerateAudio: true, channelId: "platform", channelModelKey: "seedance-test", referenceNodeIds: ["image"] } });
expect(approval?.durationSeconds).toBe(8);
expect(approval?.videoGenerateAudio).toBe(true);
expect(approval?.referenceNodeIds).toEqual(["image"]);
});
});
describe("approval target already generating on the canvas", () => {
const detail = { toolName: "generate_media", arguments: JSON.stringify({ mode: "image", prompt: "p", size: "1:1", nodeId: "draft-1" }) };
const node = (metadata: Record<string, unknown>) => ({ id: "draft-1", type: "image", title: "开场分镜", position: { x: 0, y: 0 }, width: 200, height: 200, metadata }) as unknown as CanvasNodeData;