diff --git a/components/SmartChatBox/api.ts b/components/SmartChatBox/api.ts index 6653007..b636870 100644 --- a/components/SmartChatBox/api.ts +++ b/components/SmartChatBox/api.ts @@ -286,17 +286,16 @@ function transformSystemMessage( if (isProjectInit(customData)) { blocks = [{ type: 'text', - text: `🎬 根据您输入的 "${customData.project_data.script}",我已完成项目的初始化。\n` - }, { - type: 'text', - text: content + text: `🎬 根据您输入的 "${customData.project_data.script}",我已完成项目的初始化。\n\n${content}` }]; } break; case 'generate_script_summary': if (isScriptSummary(customData)) { - blocks = [{ type: 'text', text: content }]; + blocks = [ + { type: 'text', text: `🎬 剧本摘要生成完成\n\n${customData.summary}\n\n${content}` } + ]; } break; @@ -316,6 +315,9 @@ function transformSystemMessage( value: customData.completed_count, total: customData.total_count, label: `已生成 ${customData.completed_count} 个演员,剧本中共有 ${customData.total_count} 个` + }, { + type: 'text', + text: `\n\n${content}` }]; } break; @@ -336,6 +338,9 @@ function transformSystemMessage( value: customData.completed_count, total: customData.total_count, label: `已生成 ${customData.completed_count} 个场景,剧本中共有 ${customData.total_count} 个` + }, { + type: 'text', + text: `\n\n${content}` }]; } break; @@ -356,19 +361,26 @@ function transformSystemMessage( value: customData.completed_count, total: customData.total_count, label: `已生成 ${customData.completed_count} 个故事板静帧,剧本中共有 ${customData.total_count} 个` + }, { + type: 'text', + text: `\n\n${content}` }]; } break; case 'generate_video': if (isShotVideoGeneration(customData)) { - blocks = [{ + blocks.push({ type: 'text', - text: `🎬 分镜视频生成 \n核心氛围:${customData.prompt_json.core_atmosphere}` - }, { - type: 'video', - url: customData.urls[0] || '' - }, { + text: `🎬 该分镜下包含${customData.urls.length} 个视频。 \n核心氛围:${customData.prompt_json.core_atmosphere}` + }); + customData.urls.forEach((url: string) => { + blocks.push({ + type: 'video', + url: url + }); + }); + blocks.push({ type: 'text', text: '后续可在剪辑线上进行编辑。' }, { @@ -376,7 +388,10 @@ function transformSystemMessage( value: customData.completed_count, total: customData.total_count, label: `已生成 ${customData.completed_count} 个分镜视频,剧本中共有 ${customData.total_count} 个` - }]; + }, { + type: 'text', + text: `\n\n${content}` + }) } break; }