Commit Graph

443 Commits

Author SHA1 Message Date
peanut 02c58767bd fix(server): SSE 代理错误消息不再暴露原始异常信息给客户端 2026-07-19 12:18:54 +08:00
peanut 7018f5780a feat(server): 短篇小说服务 SSE 代理实现 2026-07-19 12:15:50 +08:00
peanut 031d824dd0 refactor(server): 抽取 saveNovelResult 方法供短篇小说服务复用 2026-07-19 12:08:54 +08:00
peanut 8f96239b56 style(server): 统一 ShortNovel 配置类和 DTO 的字段注释风格 2026-07-19 12:07:26 +08:00
peanut 21ce56c6da feat(server): 短篇小说外部服务配置类和请求 DTO 2026-07-19 12:02:17 +08:00
peanut ce244f9ad5 docs:短篇小说服务接口迁移实现计划
- 后端 SSE 代理层(Controller + Service + Config + DTO)
- 数据持久化 saveNovelResult 复用方法
- 前端 shortNovel.js SSE 流式服务
- ClarificationCard 组件 + ScriptView 状态机改造
- 短信验证码文案修复 + 端到端验收
2026-07-19 11:57:53 +08:00
peanut 99a3cb883e docs:短篇小说服务接口迁移设计方案
- 后端 SSE 代理 + 前端多轮交互状态机改造
- 外部 short-novel-service 接口替代内部 AI Runtime
- 数据持久化改为小说完成后一次性保存
- 短信验证码修复(888888→123456)
2026-07-19 11:52:41 +08:00
peanut 2c778fabbb refactor: ScriptView 删除 read 模式 + 兼容旧模式,统一对话流入口 2026-07-01 08:28:47 +08:00
peanut 6aeb5319e3 refactor: ScriptView 删除 read 模式,剧本入口直接进对话流 2026-07-01 07:59:48 +08:00
peanut 3bb6716e0f docs: ScriptView 简化为纯对话流模式设计文档 2026-06-30 22:45:29 +08:00
peanut 86543df75d fix: currentScriptContent 章节字段全空时用 plotJson.fullContent 作为 fallback 2026-06-30 07:45:20 +08:00
peanut 1073123360 fix: createMessage 补 userId 字段 + 使用 senderType/contentType 2026-06-29 23:52:37 +08:00
peanut 3829a3ef92 fix: createMessage 字段名改为 senderType/contentType 匹配后端 DTO 2026-06-29 23:36:26 +08:00
peanut f45fee7cce feat: chat 模式传 messageType/versionLabel/新 emits 给 MessageCard 2026-06-29 22:53:36 +08:00
peanut a713e8823c fix: loadMessages 对历史剧本 plotJson 自动初始化首条 AI 消息 2026-06-29 22:50:15 +08:00
peanut 4a7914eefe fix: displayMessages 去掉根版本过滤(chat 模式显示首条 AI 剧本) 2026-06-29 22:47:37 +08:00
peanut 88ff280b78 feat: MessageCard 支持按 messageType 条件渲染 script/chat 专属按钮组 2026-06-29 22:45:36 +08:00
peanut 912fc42860 fix: 剧本查询时自动为历史剧本补建 conversation(兼容前端临时 ID) 2026-06-29 22:40:59 +08:00
peanut 7fb90299d1 docs: ScriptView 对话模式按钮完整修复设计文档 2026-06-29 22:34:27 +08:00
peanut 6ae721eb89 fix: 回滚 ScriptView 临时 conversationId 正则保护(误伤历史剧本) 2026-06-28 23:33:29 +08:00
peanut 808a590b8d fix: nginx 根路径 301 重定向到 /emotion-museum/(修复首页 404) 2026-06-28 23:21:03 +08:00
peanut 19337b9371 fix: ScriptView loadMessages 对临时 conversationId 正则短路保护 2026-06-28 22:42:24 +08:00
peanut e3eb1afbb0 fix: listByConversation 在 conversation 不存在时返回空列表而非抛异常 2026-06-28 22:40:13 +08:00
peanut caaeb94477 feat: 增强 download-server-log.py 支持 latest/tail/errors/grep 子命令 2026-06-28 22:23:56 +08:00
peanut bd3ccbd757 test: 新增 EpicScriptDialogueService 未登录场景测试 2026-06-28 18:49:10 +08:00
peanut bf6f2797ad feat: ScriptView 改造为对话中心查看/修改模式
- 新增 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) <noreply@anthropic.com>
2026-06-28 18:41:44 +08:00
peanut 6109202a26 chore: request.js 导出 API_BASE_URL 和 getAuthHeader 2026-06-28 18:26:30 +08:00
peanut 3b9a8222de feat: 新增 ScriptChatController 统一流式接口 2026-06-28 18:16:07 +08:00
peanut 8537c27015 feat: MessageController 新增 listByConversation、versions、deleteVersion 2026-06-28 18:09:07 +08:00
peanut a66a78a0f3 feat: EpicScriptController 新增 createWithDialogue 和 switchVersion 2026-06-28 18:09:06 +08:00
peanut 57f1e311b6 feat: 实现 EpicScriptService.switchVersion
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 18:00:27 +08:00
peanut 8618b8b80f feat: EpicScriptService 新增 switchVersion 方法声明
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 18:00:22 +08:00
peanut b11a3463b2 feat: 实现剧本消息版本管理服务
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 17:42:11 +08:00
peanut e252dc5fd2 feat: 新增 ScriptMessageService 接口
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 17:42:05 +08:00
peanut 0520f30d84 feat: 新增 ScriptChatService 接口 2026-06-28 17:36:02 +08:00
peanut 752fd30686 fix: 修复剧本对话创建服务实现问题
- 添加系统欢迎语消息(messageOrder=1, sender=system)
- 调整用户消息顺序为 messageOrder=2
- 添加 AI 助手开场白消息(messageOrder=3, sender=assistant, type=script)
- 从 AI 生成结果中解析标题并更新到剧本实体
- 修复 messageCount 为 3 以匹配实际消息数量
- 删除不再需要的 buildTitle 方法
- 新增 buildSystemWelcome 方法构建系统欢迎语

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 17:24:47 +08:00
peanut 56369fdeb2 feat: 新增 EpicScriptDialogueService 接口
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 17:15:47 +08:00
peanut 88d586bab1 feat: MessageResponse 新增 scriptId、parentMessageId、versionNumber、metadata、status、timestamp 2026-06-28 17:08:31 +08:00
peanut 0149bac281 feat: EpicScriptResponse 新增 conversationId 和 currentVersionMessageId 2026-06-28 17:08:26 +08:00
peanut 42d1350aff feat: 新增 SwitchVersionRequest 2026-06-28 17:08:22 +08:00
peanut 43622be5b0 feat: 新增 ScriptChatStreamRequest 2026-06-28 17:08:18 +08:00
peanut 74183ccb30 feat: 新增 EpicScriptCreateWithDialogueResponse 2026-06-28 17:08:13 +08:00
peanut 06b2ee58e2 feat: 新增 EpicScriptCreateWithDialogueRequest 2026-06-28 17:08:09 +08:00
peanut 83c379d5d5 feat: Message 实体新增 scriptId 和 versionNumber 字段 2026-06-28 17:01:52 +08:00
peanut 15fce9eadf feat: Conversation 实体新增 scriptId 和 currentMessageId 字段 2026-06-28 16:56:58 +08:00
peanut 0ba2960c1b feat: EpicScript 实体新增 conversationId 和 currentVersionMessageId 字段 2026-06-28 16:56:57 +08:00
peanut 0e2cc42a41 chore: 新增剧本对话关联字段迁移脚本 2026-06-28 16:50:31 +08:00
peanut 6bc00863fa docs: 更新本地服务管理规则
- 强制使用 dev-services.py 控制本地服务
- 明确前端/H5 固定端口 5178-5181
- 新增禁止无意义重启规则

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 10:40:28 +08:00
peanut 1b39d873ab chore: 统一前端/H5 服务固定端口
- web: 5178
- web-admin: 5179
- mini-program: 5180
- life-script: 5181
2026-06-28 10:37:36 +08:00
peanut 75de32828a feat: dev-services.py restart 命令新增热加载保护
- 无必须重启的变更时禁止 restart
- 支持 --force 参数强制重启
- 避免无意义重启前端热加载服务
2026-06-28 10:34:54 +08:00