一键转换
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m46s

This commit is contained in:
Song367 2026-03-12 00:12:54 +08:00
parent b49d703e3c
commit 75ac17b7ce
3 changed files with 31 additions and 70 deletions

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Google AI Studio App</title>
<title>&#21095;&#26412;&#22823;&#24072;</title>
</head>
<body>
<div id="root"></div>

View File

@ -1669,15 +1669,6 @@ ${script}`;
{`删除全部`}
</button>
)}
<button
type="button"
onClick={() => conversionFileInputRef.current?.click()}
disabled={isExtractingSource || isExtractingBackground}
className="px-3 py-1.5 rounded-xl bg-white border border-[#D2D2D7]/50 text-[11px] font-bold text-[#1D1D1F] flex items-center gap-2 hover:bg-[#F5F5F7] transition-all disabled:opacity-50"
>
{isExtractingSource || isExtractingBackground ? <Loader2 size={12} className="animate-spin" /> : <Upload size={12} />}
<span>{isExtractingSource || isExtractingBackground ? `\u6b63\u5728\u89e3\u6790` : extractedEpisodes.length > 0 ? `\u91cd\u65b0\u4e0a\u4f20` : `\u4e0a\u4f20\u6587\u4ef6`}</span>
</button>
</div>
</div>
<div className="mt-3 flex items-center justify-between gap-3 text-[11px]">

View File

@ -569,48 +569,32 @@ export async function convertTextToScript(
{
id: 0,
instruction: `
# A??????
#
??????????
??????????????????????????????????????????
?????
1. ??????????????????????????????????
2. ???????????????????????????
3. ????????????????????????????????????????
4. ???????????????????????
5. ?????????????????????
#
???
?????????????????????????????
# ????
???????????????????????????????????????? Markdown ??????? JSON ??????? [[VERSION]] ????????????????????????????????????????????????????????
????????`
使 Markdown JSON [[VERSION]]
使`
},
{
id: 1,
instruction: `
# B??????
#
??????????
??????????????????????????????????????????????????????????
?????
1. ??????????????????????????????????
2. ?????????????????????????????????????
3. ?????????????????????????????????
4. ???????????????????????????
5. ?????????????????????????
#
???
??????????????????????????????????????????
# ????
???????????????????????????????????????? Markdown ??????? JSON ??????? [[VERSION]] ????????????????????????????????????????????????????????
????????`
使 Markdown JSON [[VERSION]]
使`
}
];
@ -621,54 +605,40 @@ export async function convertTextToScript(
const continuationPrompt = seedContent.trim()
? `
??????????
${seedContent}
???????????????????????????????????????????????????????????????????`
`
: "";
try {
throwIfAborted(options?.signal);
const prompt = `????????????
const prompt = `请根据以下信息进行创作:
?????
${options?.episodeTitle || '???'}
${options?.previousEpisodeContent || ''}
???????
1.
${options?.episodeOutline || sourceText}
????
${sourceText}
?????
2.
${scriptType}
?????
3.
${combinedStyle}
???????
4.
${scriptFormat}
${options?.previousEpisodeContent ? `???????????????????
${options.previousEpisodeContent}
5.
${globalSettings?.worldview || '未设定'}
???????????????????????????????????????
6.
${globalSettings?.outline || '未设定'}
` : ''}${globalSettings ? `
????????
????${globalSettings.worldview || '???'}
?????${globalSettings.outline || '???'}
?????${globalSettings.characters || '???'}
` : ''}${continuationPrompt}
7.
${globalSettings?.characters || '未设定'}
?????
1. ?????????????????????????????
2. ??????????????????????????????
3. ???????????????????
4. ???????????
?????????????????????????`;
`;
const systemInstruction = baseSystemInstruction + v.instruction;
let fullText = seedContent;