From bf6f2797add407ed541cf25affbb70b4f8af4993 Mon Sep 17 00:00:00 2001 From: Peanut Date: Sun, 28 Jun 2026 18:41:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20ScriptView=20=E6=94=B9=E9=80=A0?= =?UTF-8?q?=E4=B8=BA=E5=AF=B9=E8=AF=9D=E4=B8=AD=E5=BF=83=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?/=E4=BF=AE=E6=94=B9=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 scriptChat.js 和 message.js 服务导入 - 新增 viewMode、scriptId、conversationId、currentVersionMessageId、 selectedVersionMessageId、messages、versions、chatInput 等状态 - 新增阅读模式:版本栏 + 剧本分章节展示 + 操作按钮 - 新增聊天模式:消息列表 + 聊天输入栏 + 对话修改功能 - 集成 createScriptWithDialogue、streamScriptChat、listMessagesByConversation、 listMessageVersions、switchVersion、deleteVersion 等后端 API - 替换 runGeneration 使用 createScriptWithDialogue 创建剧本和对话 - 替换 openScriptChat 使用后端消息加载,不再依赖 localStorage - 移除 localStorage 作为主要消息存储(persistResultMessages、 hydrateResultMessages、readStoredMessages、readScriptChatHistory 改为空操作) Co-Authored-By: Claude Opus 4.8 (1M context) --- mini-program/src/pages/main/ScriptView.vue | 778 ++++++++++++++++----- 1 file changed, 608 insertions(+), 170 deletions(-) diff --git a/mini-program/src/pages/main/ScriptView.vue b/mini-program/src/pages/main/ScriptView.vue index 22f6dea..af390d1 100644 --- a/mini-program/src/pages/main/ScriptView.vue +++ b/mini-program/src/pages/main/ScriptView.vue @@ -158,72 +158,171 @@ - - - {{ wishText }} - {{ currentMessageTime }} - - - 心愿已实现,故事已为你展开 - {{ currentResultTime }} - - - - - - - - - - {{ message.content }} - {{ message.time }} + + + + + V{{ v.versionNumber }} + (当前) - - - - - - + + {{ currentScriptContent.title }} + + 序幕:低谷回响 + {{ currentScriptContent.plotIntro }} + + + 转折:契机出现 + {{ currentScriptContent.plotTurning }} + + + 高潮:命运抉择 + {{ currentScriptContent.plotClimax }} + + + 结局:新的开始 + {{ currentScriptContent.plotEnding }} + + + + + 进入对话修改 + 改写当前版本 + 续写当前版本 + 设为当前版本 - 正在为你重写人生 - AI 正在思考下一步方向 - + + + + + {{ wishText }} + {{ currentMessageTime }} + + + 心愿已实现,故事已为你展开 + {{ currentResultTime }} + + + + + + + + {{ message.content }} + {{ message.time || formatMessageTime() }} + + + + + + + + + + + 正在为你重写人生 + AI 正在思考下一步方向 + + + + + + + + + + {{ wishText }} + {{ currentMessageTime }} + + + 心愿已实现,故事已为你展开 + {{ currentResultTime }} + + + + + + + + + + {{ message.content }} + {{ message.time }} + + + + + + + + + + + 正在为你重写人生 + AI 正在思考下一步方向 + + + + @@ -232,7 +331,36 @@ 底部 - + + + + 🎤 + + + 输入修改建议,或让 AI 继续生成 +