fix(agent): 视频生成 - 支持 Agent 设置首尾帧 (#696)

* fix(agent): 视频生成 - 支持 Agent 设置首尾帧

* fix(agent): 工具参数 - 精简首尾帧说明并保持体积预算

---------

Co-authored-by: tanzui <305375675@.com>
This commit is contained in:
tanzuiandtanzui authored and GitHub committed 2026-10-06 09:28:22 +08:00
1 parent fb101b76d0
commit 3750fada7a
10 files changed
+342 -8

No files matched your search

@@ -222,6 +222,9 @@ func applyCloudAgentCanvasPlan(doc map[string]any, ops []agentCanvasOp) ([]cloud
if err := capability.ApplyPatch(nodes[index], op.Patch); err != nil {
return nil, BadAuthRequest(err.Error())
}
if err := validateCloudAgentVideoFramePatch(nodes[index], nodes, edges, op.Patch); err != nil {
return nil, err
}
afterTitle := cloudAgentApprovalNodeTitle(nodes[index], capability.Label)
resultTitle := ""
if afterTitle != beforeTitle {
@@ -471,6 +474,12 @@ func cloudAgentMediaApprovalPreview(plan *cloudAgentMediaPlan, modelName string)
if args.Size != "" {
details = append(details, "画幅:"+truncateRunes(args.Size, 40))
}
if args.VideoStartFrameNodeID != "" {
details = append(details, "首帧节点:"+truncateRunes(args.VideoStartFrameNodeID, 80))
}
if args.VideoEndFrameNodeID != "" {
details = append(details, "尾帧节点:"+truncateRunes(args.VideoEndFrameNodeID, 80))
}
if args.Quality != "" {
details = append(details, "质量:"+truncateRunes(args.Quality, 40))
}