From d9a36174ca54cc2ef493dc6763ae4c69fcd13491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=B8=85?= <2944435683> Date: Tue, 31 Mar 2026 16:54:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=9D=E5=AD=98=E6=95=85?= =?UTF-8?q?=E4=BA=8B=E9=AA=A8=E6=9E=B6=E5=92=8C=E6=94=B9=E7=BC=96=E7=AD=96?= =?UTF-8?q?=E7=95=A5=E9=97=AE=E9=A2=98=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=A7=86?= =?UTF-8?q?=E8=A7=89=E6=89=8B=E5=86=8Cnane=E6=98=BE=E7=A4=BA=E5=80=BC?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/project/getVisualManual.ts | 9 ++++++--- src/routes/scriptAgent/updateData.ts | 6 ++++++ src/types/database.d.ts | 4 +++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/routes/project/getVisualManual.ts b/src/routes/project/getVisualManual.ts index 43a29f0..e617a25 100644 --- a/src/routes/project/getVisualManual.ts +++ b/src/routes/project/getVisualManual.ts @@ -60,10 +60,12 @@ export default router.post("/", async (req, res) => { const result = await Promise.all( styleDirs.map(async (styleName) => { const styleDir = path.join(artPromptsDir, styleName); - const imagesDir = path.join(styleDir, "images"); const images = await readAllImages(styleName); - + const readmePath = path.join(styleDir, "README.md"); + const readmeContent = fs.readFileSync(readmePath, "utf-8"); + const firstLine = readmeContent.split("\n")[0].replace(/--/g, ""); + const stylePath = path.join("askills", "art_prompts", styleName); const data = DATA_MAP.map(({ label, value, subDir }) => { let mdPath: string; if (subDir) { @@ -79,8 +81,9 @@ export default router.post("/", async (req, res) => { }); return { - name: styleName, + name: firstLine, image: images, + stylePath, data, }; }), diff --git a/src/routes/scriptAgent/updateData.ts b/src/routes/scriptAgent/updateData.ts index 5e5d3f5..036ac4e 100644 --- a/src/routes/scriptAgent/updateData.ts +++ b/src/routes/scriptAgent/updateData.ts @@ -12,6 +12,12 @@ export default router.post( data: z.object({ storySkeleton: z.string(), adaptationStrategy: z.string(), + script: z.array( + z.object({ + id: z.number(), + content: z.string(), + }), + ), }), }), async (req, res) => { diff --git a/src/types/database.d.ts b/src/types/database.d.ts index 2a3bc57..0aca397 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -1,4 +1,4 @@ -// @db-hash 93b2462070c45c2b449e9a18c4e88763 +// @db-hash 6be0a80e9c8f541987a4c1e907736237 //该文件由脚本自动生成,请勿手动修改 export interface memories { @@ -178,6 +178,7 @@ export interface o_storyboard { 'sound'?: string | null; 'state'?: string | null; 'title'?: string | null; + 'videoPrompt'?: string | null; } export interface o_tasks { 'describe'?: string | null; @@ -211,6 +212,7 @@ export interface o_video { 'errorReason'?: string | null; 'filePath'?: string | null; 'id'?: number; + 'projectId'?: number | null; 'scriptId'?: number | null; 'state'?: string | null; 'storyboardId'?: number | null;