修改字段

This commit is contained in:
zhishi 2026-04-02 02:06:45 +08:00
parent 6027908367
commit 18609b12ef
8 changed files with 35 additions and 19 deletions

View File

@ -664,7 +664,7 @@ Image [2]: @图2 — [外貌关键描述]
### 约束
- 前置条件:分镜表已构建完成且用户已确认
- 你必须使用XML格式写入工作区分镜面板<storyboardItem videoPrompt='视频提示词' prompt='提示词内容' track='分组' duration='视频推荐时间' associateAssetsIds="[该分镜所需的资产ID列表]" shouldGenerateImage="是否需要生成分镜图片 true/false, 默认为true" ></storyboardItem>
- 你必须使用XML格式写入工作区分镜面板<storyboardItem videoDesc='视频描述' prompt='提示词内容' track='分组' duration='视频推荐时间' associateAssetsIds="[该分镜所需的资产ID列表]" shouldGenerateImage="是否需要生成分镜图片 true/false, 默认为true" />
- 分组总时长约束:每个 `group` 的累计时长不得超过 15 秒
- 行数一致性约束:分镜面板 `items` 数量必须与 `stoaryTable` 的分镜数据行数量完全一致(不包含表头与分隔行)
- 时长一致性约束:分镜面板 `duration` 必须与 `stoaryTable` 对应行时长完全一致

View File

@ -138,7 +138,7 @@ function createSubAgent(parentCtx: AgentContext) {
"你必须使用如下XML格式写入工作区\n```",
"拍摄计划:<scriptPlan>内容</scriptPlan>",
"分镜表:<storyboardTable>内容</storyboardTable>",
"分镜面板:<storyboardItem videoPrompt='视频提示词' prompt=提示词内容 track='分组' duration='视频推荐时间' associateAssetsIds='[该分镜所需的资产ID列表]'></storyboardItem>",
"分镜面板:<storyboardItem videoDesc='视频描述' prompt=提示词内容 track='分组' duration='视频推荐时间' associateAssetsIds='[该分镜所需的资产ID列表]' />",
"```",
].join("\n");
// "剧本:<script>内容</script>",

View File

@ -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

View File

@ -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));

View File

@ -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,

View File

@ -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(),
});

View File

@ -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: "更新提示词成功" }));
},

View File

@ -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;