修复保存故事骨架和改编策略问题,添加视觉手册nane显示值问题
This commit is contained in:
parent
7bc9ae82e8
commit
d9a36174ca
@ -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,
|
||||
};
|
||||
}),
|
||||
|
||||
@ -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) => {
|
||||
|
||||
4
src/types/database.d.ts
vendored
4
src/types/database.d.ts
vendored
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user