From 18609b12ef49cd265c1c9d01f31bc63466c8688a Mon Sep 17 00:00:00 2001 From: zhishi <1951671751@qq.com> Date: Thu, 2 Apr 2026 02:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/skills/production_agent_execution.md | 2 +- src/agents/productionAgent/index.ts | 2 +- src/lib/initDB.ts | 2 +- src/routes/production/getFlowData.ts | 2 ++ .../production/storyboard/addStoryboard.ts | 6 ++-- .../storyboard/batchAddStoryboardInfo.ts | 4 +-- .../storyboard/editStoryboardInfo.ts | 2 ++ src/types/database.d.ts | 34 +++++++++++++------ 8 files changed, 35 insertions(+), 19 deletions(-) diff --git a/data/skills/production_agent_execution.md b/data/skills/production_agent_execution.md index 06b78de..47f90bf 100644 --- a/data/skills/production_agent_execution.md +++ b/data/skills/production_agent_execution.md @@ -664,7 +664,7 @@ Image [2]: @图2 — [外貌关键描述] ### 约束 - 前置条件:分镜表已构建完成且用户已确认 -- 你必须使用XML格式写入工作区分镜面板: +- 你必须使用XML格式写入工作区分镜面板: - 分组总时长约束:每个 `group` 的累计时长不得超过 15 秒 - 行数一致性约束:分镜面板 `items` 数量必须与 `stoaryTable` 的分镜数据行数量完全一致(不包含表头与分隔行) - 时长一致性约束:分镜面板 `duration` 必须与 `stoaryTable` 对应行时长完全一致 diff --git a/src/agents/productionAgent/index.ts b/src/agents/productionAgent/index.ts index 942c2c3..bbbc725 100644 --- a/src/agents/productionAgent/index.ts +++ b/src/agents/productionAgent/index.ts @@ -138,7 +138,7 @@ function createSubAgent(parentCtx: AgentContext) { "你必须使用如下XML格式写入工作区:\n```", "拍摄计划:内容", "分镜表:内容", - "分镜面板:", + "分镜面板:", "```", ].join("\n"); // "剧本:", diff --git a/src/lib/initDB.ts b/src/lib/initDB.ts index 7bd081c..235a9b1 100644 --- a/src/lib/initDB.ts +++ b/src/lib/initDB.ts @@ -488,7 +488,7 @@ description: 专注于从剧本内容中提取所使用的资产(角色、场 table.text("state"); table.integer("trackId"); table.text("reason"); - table.text("videoPrompt"); + table.text("videoDesc"); table.integer("shouldGenerateImage"); // 0 否 1 是 table.integer("projectId"); table.integer("flowId"); //工作流id diff --git a/src/routes/production/getFlowData.ts b/src/routes/production/getFlowData.ts index c6d1a70..309e904 100644 --- a/src/routes/production/getFlowData.ts +++ b/src/routes/production/getFlowData.ts @@ -127,6 +127,7 @@ export default router.post( desc: child.describe ?? "", src: child.filePath && (await u.oss.getFileUrl(child.filePath!)), state: child.state ?? "未生成", + errorReason: child?.errorReason ?? "", })), ), })), @@ -140,6 +141,7 @@ export default router.post( associateAssetsIds: assets2StoryboardMap[i.id!] ?? [], src: i.filePath, state: i.state, + reason: i?.reason ?? "", })) .sort((a, b) => (a.index ?? 0) - (b.index ?? 0)); res.status(200).send(success(flowData)); diff --git a/src/routes/production/storyboard/addStoryboard.ts b/src/routes/production/storyboard/addStoryboard.ts index cf707ff..0aa9e7a 100644 --- a/src/routes/production/storyboard/addStoryboard.ts +++ b/src/routes/production/storyboard/addStoryboard.ts @@ -18,14 +18,14 @@ export default router.post( prompt: z.string(), duration: z.number(), state: z.string(), - videoPrompt: z.string(), + videoDesc: z.string(), shouldGenerateImage: z.number(), src: z.string().nullable(), scriptId: z.number(), projectId: z.number(), }), async (req, res) => { - const { prompt, duration, state, src, scriptId, projectId, videoPrompt, shouldGenerateImage } = req.body; + const { prompt, duration, state, src, scriptId, projectId, videoDesc, shouldGenerateImage } = req.body; const [trackId] = await u.db("o_videoTrack").insert({ scriptId: scriptId, @@ -37,7 +37,7 @@ export default router.post( state, filePath: new URL(src).pathname, trackId, - videoPrompt, + videoDesc, shouldGenerateImage, scriptId: scriptId, projectId: projectId, diff --git a/src/routes/production/storyboard/batchAddStoryboardInfo.ts b/src/routes/production/storyboard/batchAddStoryboardInfo.ts index 32aa8e6..6222355 100644 --- a/src/routes/production/storyboard/batchAddStoryboardInfo.ts +++ b/src/routes/production/storyboard/batchAddStoryboardInfo.ts @@ -14,7 +14,7 @@ export default router.post( track: z.string(), state: z.string(), src: z.string().nullable(), - videoPrompt: z.string(), + videoDesc: z.string(), shouldGenerateImage: z.number(), associateAssetsIds: z.array(z.number()), }), @@ -33,7 +33,7 @@ export default router.post( scriptId, projectId, track:item.track, - videoPrompt:item.videoPrompt, + videoDesc:item.videoDesc, shouldGenerateImage:item.shouldGenerateImage, createTime: Date.now(), }); diff --git a/src/routes/production/storyboard/editStoryboardInfo.ts b/src/routes/production/storyboard/editStoryboardInfo.ts index 4640c62..b62449c 100644 --- a/src/routes/production/storyboard/editStoryboardInfo.ts +++ b/src/routes/production/storyboard/editStoryboardInfo.ts @@ -11,11 +11,13 @@ export default router.post( validateFields({ id: z.number(), prompt: z.string(), + videoDesc: z.string(), }), async (req, res) => { const { id, prompt } = req.body; await u.db("o_storyboard").where({ id }).update({ prompt, + videoDesc, }); res.status(200).send(success({ message: "更新提示词成功" })); }, diff --git a/src/types/database.d.ts b/src/types/database.d.ts index 2911895..ecbfe71 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -1,11 +1,26 @@ -// @db-hash a6017ee44d67db4a339664cfe7bacb76 +// @db-hash 147d0f569132c3ba4fedb17a1039d15f //该文件由脚本自动生成,请勿手动修改 +export interface _o_storyboard_old_20260402 { + 'createTime'?: number | null; + 'duration'?: string | null; + 'filePath'?: string | null; + 'flowId'?: number | null; + 'id'?: number; + 'index'?: number | null; + 'projectId'?: number | null; + 'prompt'?: string | null; + 'reason'?: string | null; + 'scriptId'?: number | null; + 'state'?: string | null; + 'trackId'?: number | null; +} export interface _o_vendorConfig_old_20260401 { 'author'?: string | null; 'code'?: string | null; 'createTime'?: number | null; 'description'?: string | null; + 'enableEnglish'?: number | null; 'icon'?: string | null; 'id'?: string; 'inputs'?: string | null; @@ -13,13 +28,7 @@ export interface _o_vendorConfig_old_20260401 { 'models'?: string | null; 'name'?: string | null; } -export interface _o_videoTrack_old_20260401 { - 'id'?: number; - 'projectId'?: number | null; - 'scriptId'?: number | null; - 'videoId'?: number | null; -} -export interface _o_videoTrack_old_20260401_1 { +export interface _o_videoTrack_old_20260402 { 'id'?: number; 'projectId'?: number | null; 'prompt'?: string | null; @@ -201,8 +210,11 @@ export interface o_storyboard { 'prompt'?: string | null; 'reason'?: string | null; 'scriptId'?: number | null; + 'shouldGenerateImage'?: number | null; 'state'?: string | null; + 'track'?: string | null; 'trackId'?: number | null; + 'videoPrompt'?: string | null; } export interface o_tasks { 'describe'?: string | null; @@ -225,6 +237,7 @@ export interface o_vendorConfig { 'code'?: string | null; 'createTime'?: number | null; 'description'?: string | null; + 'enable'?: number | null; 'enableEnglish'?: number | null; 'icon'?: string | null; 'id'?: string; @@ -250,15 +263,14 @@ export interface o_videoTrack { 'prompt'?: string | null; 'reason'?: string | null; 'scriptId'?: number | null; - 'selectVideoId'?: number | null; 'state'?: string | null; 'videoId'?: number | null; } export interface DB { + "_o_storyboard_old_20260402": _o_storyboard_old_20260402; "_o_vendorConfig_old_20260401": _o_vendorConfig_old_20260401; - "_o_videoTrack_old_20260401": _o_videoTrack_old_20260401; - "_o_videoTrack_old_20260401_1": _o_videoTrack_old_20260401_1; + "_o_videoTrack_old_20260402": _o_videoTrack_old_20260402; "memories": memories; "o_agentDeploy": o_agentDeploy; "o_agentWorkData": o_agentWorkData;