修复保存故事骨架和改编策略问题,添加视觉手册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(
|
const result = await Promise.all(
|
||||||
styleDirs.map(async (styleName) => {
|
styleDirs.map(async (styleName) => {
|
||||||
const styleDir = path.join(artPromptsDir, styleName);
|
const styleDir = path.join(artPromptsDir, styleName);
|
||||||
const imagesDir = path.join(styleDir, "images");
|
|
||||||
|
|
||||||
const images = await readAllImages(styleName);
|
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 }) => {
|
const data = DATA_MAP.map(({ label, value, subDir }) => {
|
||||||
let mdPath: string;
|
let mdPath: string;
|
||||||
if (subDir) {
|
if (subDir) {
|
||||||
@ -79,8 +81,9 @@ export default router.post("/", async (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: styleName,
|
name: firstLine,
|
||||||
image: images,
|
image: images,
|
||||||
|
stylePath,
|
||||||
data,
|
data,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -12,6 +12,12 @@ export default router.post(
|
|||||||
data: z.object({
|
data: z.object({
|
||||||
storySkeleton: z.string(),
|
storySkeleton: z.string(),
|
||||||
adaptationStrategy: z.string(),
|
adaptationStrategy: z.string(),
|
||||||
|
script: z.array(
|
||||||
|
z.object({
|
||||||
|
id: z.number(),
|
||||||
|
content: z.string(),
|
||||||
|
}),
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
async (req, res) => {
|
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 {
|
export interface memories {
|
||||||
@ -178,6 +178,7 @@ export interface o_storyboard {
|
|||||||
'sound'?: string | null;
|
'sound'?: string | null;
|
||||||
'state'?: string | null;
|
'state'?: string | null;
|
||||||
'title'?: string | null;
|
'title'?: string | null;
|
||||||
|
'videoPrompt'?: string | null;
|
||||||
}
|
}
|
||||||
export interface o_tasks {
|
export interface o_tasks {
|
||||||
'describe'?: string | null;
|
'describe'?: string | null;
|
||||||
@ -211,6 +212,7 @@ export interface o_video {
|
|||||||
'errorReason'?: string | null;
|
'errorReason'?: string | null;
|
||||||
'filePath'?: string | null;
|
'filePath'?: string | null;
|
||||||
'id'?: number;
|
'id'?: number;
|
||||||
|
'projectId'?: number | null;
|
||||||
'scriptId'?: number | null;
|
'scriptId'?: number | null;
|
||||||
'state'?: string | null;
|
'state'?: string | null;
|
||||||
'storyboardId'?: number | null;
|
'storyboardId'?: number | null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user