修复保存故事骨架和改编策略问题,添加视觉手册nane显示值问题

This commit is contained in:
小帅 2026-03-31 16:54:55 +08:00
parent 7bc9ae82e8
commit d9a36174ca
3 changed files with 15 additions and 4 deletions

View File

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

View File

@ -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) => {

View File

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