From 6e3a0c6d2db876d1e8396b7dcebb72e6314fa6d9 Mon Sep 17 00:00:00 2001 From: zhishi <1951671751@qq.com> Date: Tue, 7 Apr 2026 03:56:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=9B=9E=E9=80=80=E7=94=9F=E6=88=90?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workbench/generateVideoPrompt.ts | 47 +------------------ 1 file changed, 2 insertions(+), 45 deletions(-) diff --git a/src/routes/production/workbench/generateVideoPrompt.ts b/src/routes/production/workbench/generateVideoPrompt.ts index 7e453f6..a0bf5ca 100644 --- a/src/routes/production/workbench/generateVideoPrompt.ts +++ b/src/routes/production/workbench/generateVideoPrompt.ts @@ -50,29 +50,6 @@ export default router.post( } }), ); - const assetsIds = images.map((i) => { - if (i._type == "storyboard") { - return i.associateAssetsIds; - } - }); - const setIds = new Set(assetsIds.filter(Boolean).flat()); - - const assetsData = await u - .db("o_assets") - .leftJoin("o_image", "o_assets.imageId", "o_image.id") - .where("o_assets.id", "in", Array.from(setIds)) - .select("o_assets.id", "o_image.filePath", "o_assets.name", "o_assets.type"); - await Promise.all( - assetsData.map(async (i) => { - if (i.filePath) { - i.filePath = await u.oss.getFileUrl(i.filePath); - } - }), - ); - const assetsRecord: Record = {}; - assetsData.forEach((i) => { - assetsRecord[i.id] = i; - }); // 拆分 assets 和 storyboard const assets: any[] = []; @@ -85,7 +62,7 @@ export default router.post( type: item.type, name: item.name, }); - if (item._type === "storyboard") { + if (item._type === "storyboard") storyboard.push({ videoDesc: item.videoDesc, prompt: item.prompt, @@ -94,30 +71,10 @@ export default router.post( associateAssetsIds: item.associateAssetsIds, shouldGenerateImage: item.shouldGenerateImage, }); - if (item.associateAssetsIds && item.associateAssetsIds.length) { - item.associateAssetsIds.forEach((i: number) => { - const data = assetsRecord[i]; - const extingIndex = assets.find((sub) => sub.id == data.id); - if (data && !extingIndex) { - assets.push({ - id: data.id, - type: data.type, - name: data.name, - }); - } - }); - } - } } const [id, modelData] = model.split(":"); const projectData = await u.db("o_project").select("*").where({ id: projectId }).first(); const videoPrompt = await u.db("o_prompt").where("type", "videoPromptGeneration").first(); - let videoPromptGeneration = "" as string | undefined; - if (videoPrompt && videoPrompt.useData) { - videoPromptGeneration = videoPrompt.useData; - } else { - videoPromptGeneration = videoPrompt?.data ?? undefined; - } const artStyle = projectData?.artStyle || "无"; const visualManual = u.getArtPrompt(artStyle, "art_skills", "art_storyboard_video"); const content = ` @@ -137,7 +94,7 @@ export default router.post( try { const { text } = await u.Ai.Text("universalAi").invoke({ - system: videoPromptGeneration, + system: videoPrompt?.data!, messages: [ { role: "assistant", From fd9a7cb820af3a1c6a10b4799dbbbf592a5609c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=B8=85?= <2944435683> Date: Tue, 7 Apr 2026 03:57:14 +0800 Subject: [PATCH 2/3] no message --- src/types/database.d.ts | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/types/database.d.ts b/src/types/database.d.ts index 2a9745d..8adea86 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -1,6 +1,37 @@ -// @db-hash 3296433eb24314b094ac5d3839c049c5 +// @db-hash 6cd709d9bdfe00c4dc87961a8ebba149 //该文件由脚本自动生成,请勿手动修改 +export interface _o_project_old_20260404 { + 'artStyle'?: string | null; + 'createTime'?: number | null; + 'directorManual'?: string | null; + 'id'?: number | null; + 'imageModel'?: string | null; + 'imageQuality'?: string | null; + 'intro'?: string | null; + 'mode'?: string | null; + 'name'?: string | null; + 'projectType'?: string | null; + 'type'?: string | null; + 'userId'?: number | null; + 'videoModel'?: string | null; + 'videoRatio'?: string | null; +} +export interface _o_prompt_old_20260406 { + 'data'?: string | null; + 'id'?: number; + 'name'?: string | null; + 'type'?: string | null; + 'useData'?: string | null; +} +export interface _o_prompt_old_20260406_1 { + 'data'?: string | null; + 'id'?: number; + 'name'?: string | null; + 'TEXT'?: any | null; + 'type'?: string | null; + 'useData'?: string | null; +} export interface memories { 'content': string; 'createTime': number; @@ -232,6 +263,9 @@ export interface o_videoTrack { } export interface DB { + "_o_project_old_20260404": _o_project_old_20260404; + "_o_prompt_old_20260406": _o_prompt_old_20260406; + "_o_prompt_old_20260406_1": _o_prompt_old_20260406_1; "memories": memories; "o_agentDeploy": o_agentDeploy; "o_agentWorkData": o_agentWorkData; From 65b2ebaf65188159422870cf9d1e0e9b81b05975 Mon Sep 17 00:00:00 2001 From: zhishi <1951671751@qq.com> Date: Tue, 7 Apr 2026 04:38:53 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../production/workbench/getGenerateData.ts | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/routes/production/workbench/getGenerateData.ts b/src/routes/production/workbench/getGenerateData.ts index a67998e..07dd843 100644 --- a/src/routes/production/workbench/getGenerateData.ts +++ b/src/routes/production/workbench/getGenerateData.ts @@ -50,7 +50,7 @@ export default router.post( i.filePath = i.filePath ? await u.oss.getFileUrl(i.filePath) : ""; }), ); - const storyboardTrackRecord:Record = {}; + const storyboardTrackRecord: Record = {}; storyboardList.forEach((i) => { if (storyboardTrackRecord[i.trackId!]) { storyboardTrackRecord[i.trackId!].push({ @@ -61,13 +61,15 @@ export default router.post( ...(i.id != null ? { id: i.id } : {}), }); } else { - storyboardTrackRecord[i.trackId!] = [{ - src: i.filePath, - fileType: "image", - sources: "storyboard", - ...(i.prompt != null ? { prompt: i.videoDesc } : {}), - ...(i.id != null ? { id: i.id } : {}), - }]; + storyboardTrackRecord[i.trackId!] = [ + { + src: i.filePath, + fileType: "image", + sources: "storyboard", + ...(i.prompt != null ? { prompt: i.videoDesc } : {}), + ...(i.id != null ? { id: i.id } : {}), + }, + ]; } }); // 按 storyboardId 分组的资产数据,key 为 storyboardId @@ -88,7 +90,7 @@ export default router.post( name: i.name, describe: i.describe, type: i.type, - fileType: "image" as const, + fileType: "image" as const, sources: "assets", src: i.filePath ? await u.oss.getFileUrl(i.filePath) : "", }; @@ -143,7 +145,7 @@ export default router.post( storyboardList: await Promise.all( storyboardList.map(async (s) => ({ ...s, - src: s.filePath ? await u.oss.getFileUrl(s.filePath) : "", + src: s.filePath, })), ), trackList,