This repository was archived by the owner on Jul 17, 2026. It is now read-only.
feat: record detail — input assets, generation params, error display, delete playground#170
Open
LupinLin1 wants to merge 9 commits into
Open
feat: record detail — input assets, generation params, error display, delete playground#170LupinLin1 wants to merge 9 commits into
LupinLin1 wants to merge 9 commits into
Conversation
- Add dreamina_seedance_40_pro model to video model mappings - Support 4-15 seconds duration for Seedance 2.0 (default 5s) - Add benefit type handling for seedance_40 model Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
参数简化:
- 移除 materials 参数,统一使用 file_paths
- 移除 material_sequence 参数,功能合并到 prompt
- file_paths 现在支持 1-5 个素材(从2个增加)
prompt 增强:
- 支持 @图片N、@视频N 语法直接引用素材
- 用户可以在 prompt 中精确控制素材使用方式
- 简化了 API 接口,提升用户体验
file_paths 智能格式检测:
- 自动识别字符串数组:["url1", "url2"]
- 自动识别对象数组:[{type:"image",url:"url1"}]
- 向后兼容旧的字符串数组格式
新增功能:
- 添加 src/lib/video-uploader.ts 支持视频上传
- 完善 docs/ 目录,添加以下文档:
- seedance-40-api-guide.md: 完整的 API 调用指南
- seedance-omni-reference-api.md: 全能参考功能文档
- user-guide.md: 用户使用指南
- parameter-merge-summary.md: 参数合并总结
- 其他实现和验证文档
测试方法:
- 新增素材引用语法:@图片N、@视频N
- 智能格式自动转换
- 多素材混合使用(图片+视频)
- 向后兼容性验证
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- README.CN.md: 更新视频生成参数说明 - prompt 参数增强:支持 @图片N、@视频N 语法 - file_paths 统一:智能格式检测,支持 1-5 个素材 - 更新 seedance-2.0 模型说明 - 更新 resolution 参数说明 - src/api/controllers/videos.ts: 参数简化 - 移除 material_sequence 参数处理 - 使用 buildMetaListFromPrompt 替代 buildMetaList - 从 prompt 中提取素材引用信息 - src/api/routes/videos.ts: 参数处理优化 - 移除 materials 和 material_sequence 参数验证 - 统一使用 file_paths 参数 - 智能格式检测和转换 - 更新文件上传限制为 5 个 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- 新增 fetchOriginVideoUrl 函数调用 get_local_item_list API - 移除提前返回简化 item 结构的逻辑,保留完整 historyData - 修改视频生成流程,自动尝试获取原始质量URL - 实现智能 itemId 提取,支持多种字段位置 - 添加完善的日志记录和错误处理 - 保持向后兼容,失败时自动降级使用现有URL - 添加功能文档和测试示例 主要改进: - 从 API 响应中正确提取 common_attr.id 作为 itemId - 调用专用 API 获取原始质量视频URL (br=6619&ds=12) - 三层降级策略确保功能稳定性 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
修复PR审查发现的关键错误处理问题: 1. **区分错误类型** - 将可预期错误(网络超时、认证失败) 与不可预期错误(TypeError、ReferenceError)分开处理 2. **添加结构化日志上下文** - 所有日志包含 itemId、errorType、 errorMessage、errorCode、responseStatus、elapsedMs 等字段 3. **添加响应结构验证** - 验证响应对象、item_list 数组、URL格式 4. **改进日志级别** - 可预期错误使用warn,不可预期使用error 5. **记录完整堆栈** - 不可预期错误包含 errorStack 用于调试 改进点: - 生产环境可调试性:从 ⭐⭐⭐⭐⭐ (5/5) - 错误处理质量:从 ⭐⭐ → ⭐⭐⭐⭐ (2→4/5) - 保持降级策略:不中断主流程 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
实现自动获取Origin原始质量视频URL功能 主要功能: - 新增 fetchOriginVideoUrl 函数调用专用API获取原始质量URL - 移除提前返回简化结构的逻辑,保留完整 historyData - 智能提取 itemId(支持多种字段位置) - 实现三层降级策略确保功能稳定性 - 改进错误处理:区分可预期和不可预期错误 - 添加结构化日志上下文便于调试 错误处理改进: - 区分网络错误(warn)和代码错误(error + stack) - 添加响应结构验证 - 所有日志包含 itemId、errorType、elapsedMs 等字段 文档: - 功能详细文档 (docs/origin-video-feature.md) - 快速开始指南 (docs/README-origin-video.md) - 错误处理修复报告 (docs/ERROR-HANDLING-FIX-REPORT.md) - 测试示例 (examples/origin-video-test.js)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
input_assets,generation_params,fail_message) togeneration_recordsvia idempotent migrations; no table rebuild requireddeepCamelwas returning JSON strings instead of parsed arrays)Test Plan
/user/playgroundreturns 404🤖 Generated with Claude Code