Commit 7d9fd30b authored by yaoke.yk's avatar yaoke.yk

生成场景图片失败修复01

parent e7ad0c17
...@@ -7,7 +7,7 @@ import type { Scene } from "../../lib/api/ai"; ...@@ -7,7 +7,7 @@ import type { Scene } from "../../lib/api/ai";
type SettingsTab = "characters" | "scenes" | "props"; type SettingsTab = "characters" | "scenes" | "props";
const emptyForm = (): Partial<Scene> => ({ const emptyForm = (): Partial<Scene> => ({
name: "", sceneType: "indoor", description: "", name: "", sceneType: "indoor", description: "", imagePrompt: "",
}); });
export function SceneGeneration() { export function SceneGeneration() {
...@@ -384,6 +384,20 @@ export function SceneGeneration() { ...@@ -384,6 +384,20 @@ export function SceneGeneration() {
className="w-full px-3 py-2 rounded-lg border border-border bg-background text-foreground placeholder-muted-foreground resize-none focus:outline-none focus:ring-2 focus:ring-primary/20" className="w-full px-3 py-2 rounded-lg border border-border bg-background text-foreground placeholder-muted-foreground resize-none focus:outline-none focus:ring-2 focus:ring-primary/20"
/> />
</div> </div>
<div>
<label className="block text-sm font-medium text-foreground mb-1">图片 Prompt</label>
<textarea
value={editingScene.imagePrompt ?? ""}
onChange={(e) => setEditingScene({ ...editingScene, imagePrompt: e.target.value })}
placeholder="用于 AI 生成场景图的提示词;留空时会根据场景名称和描述自动补全"
rows={4}
className="w-full px-3 py-2 rounded-lg border border-border bg-background text-foreground placeholder-muted-foreground resize-none focus:outline-none focus:ring-2 focus:ring-primary/20"
/>
<p className="mt-1 text-xs text-muted-foreground">
修改这里才会更新生成场景图片时真正使用的提示词
</p>
</div>
</div> </div>
{/* Modal Footer */} {/* Modal Footer */}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment