diff --git a/.env.production b/.env.production index d01d62e..6b07f89 100644 --- a/.env.production +++ b/.env.production @@ -1,10 +1,10 @@ -# NEXT_PUBLIC_JAVA_URL = https://77.app.java.auth.qikongjian.com -# NEXT_PUBLIC_BASE_URL = https://77.smartvideo.py.qikongjian.com -# NEXT_PUBLIC_CUT_URL = https://smartcut.huiying.video -NEXT_PUBLIC_JAVA_URL = https://auth.movieflow.ai -NEXT_PUBLIC_BASE_URL = https://api.video.movieflow.ai -NEXT_PUBLIC_CUT_URL = https://smartcut.movieflow.ai +NEXT_PUBLIC_JAVA_URL = https://77.app.java.auth.qikongjian.com +NEXT_PUBLIC_BASE_URL = https://77.smartvideo.py.qikongjian.com +NEXT_PUBLIC_CUT_URL = https://smartcut.huiying.video +# NEXT_PUBLIC_JAVA_URL = https://auth.movieflow.ai +# NEXT_PUBLIC_BASE_URL = https://api.video.movieflow.ai +# NEXT_PUBLIC_CUT_URL = https://smartcut.movieflow.ai # 失败率 NEXT_PUBLIC_ERROR_CONFIG = 0.2 \ No newline at end of file diff --git a/components/ChatInputBox/ChatInputBox.tsx b/components/ChatInputBox/ChatInputBox.tsx index 13f4f4e..a5bc4e8 100644 --- a/components/ChatInputBox/ChatInputBox.tsx +++ b/components/ChatInputBox/ChatInputBox.tsx @@ -27,6 +27,7 @@ import { Popconfirm, Image, Popover, + Switch, } from "antd"; import { UploadOutlined } from "@ant-design/icons"; import { StoryTemplateEntity } from "@/app/service/domain/Entities"; @@ -114,16 +115,20 @@ export function ChatInputBox({ noData }: { noData: boolean }) { const [isItemGenerating, setIsItemGenerating] = useState<{[key: string]: boolean}>({}); // 道具AI生成按钮的加载状态 // 配置选项状态 - 整合所有配置项到一个对象 - const [configOptions, setConfigOptions] = useState<{ + type ConfigOptions = { mode: "auto" | "manual"; resolution: "720p" | "1080p" | "4k"; language: string; videoDuration: string; - }>({ + expansion_mode: boolean; + }; + + const [configOptions, setConfigOptions] = useState({ mode: "auto", resolution: "720p", language: "english", videoDuration: "1min", + expansion_mode: false, }); // 从 localStorage 初始化配置 @@ -137,6 +142,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) { resolution: parsed.resolution || "720p", language: parsed.language || "english", videoDuration: parsed.videoDuration || "1min", + expansion_mode: typeof parsed.expansion_mode === 'boolean' ? parsed.expansion_mode : false, }); } catch (error) { console.warn('解析保存的配置失败,使用默认配置:', error); @@ -144,7 +150,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) { } }, []); - const onConfigChange = (key: string, value: string) => { + const onConfigChange = (key: K, value: ConfigOptions[K]) => { setConfigOptions((prev) => ({ ...prev, [key]: value, @@ -177,6 +183,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) { resolution: configOptions.resolution, language: configOptions.language, video_duration: configOptions.videoDuration, + expansion_mode: configOptions.expansion_mode, }; // 调用创建剧集API @@ -378,6 +385,27 @@ export function ChatInputBox({ noData }: { noData: boolean }) { {LauguageOptions.find((option) => option.value === configOptions.language)?.code} + + {/* 分隔线 */} +
+ + {/* 剧本扩展开关 */} + +
+ {/* Script Expansion */} + onConfigChange('expansion_mode', checked)} + style={{ + backgroundColor: 'rgba(255,255,255,0.45)', + }} + /> + + {configOptions.expansion_mode ? 'On' : 'Off'} + +
+
{/* 右侧Action按钮 */}