This commit is contained in:
2026-07-01 10:26:01 +08:00
parent 4051d59285
commit 7e6d5f1fbf
5 changed files with 17 additions and 25 deletions
+1 -9
View File
@@ -346,17 +346,9 @@ func (s *dramaService) generateOneSegment(ctx context.Context, d *entity.Drama,
return err
}
// 解析 Agent 输出
segOutput := model.ParseAgentOutput(result, segIdx)
// 调试日志:当场景为空时打印 Agent 输出预览
if len(segOutput.Scenes) == 0 {
preview := result
if len([]rune(preview)) > 500 {
preview = string([]rune(preview)[:500]) + "..."
}
g.Log().Warningf(ctx, "第%d集第%d段 Agent 输出未解析到场景数据,输出预览: %s",
ep.Index, segIdx+1, preview)
g.Log().Warningf(ctx, "第%d集第%d段 Agent 未生成场景数据,请检查输入", ep.Index, segIdx+1)
}
// 从 Agent 原始输出中提取图片数据,回填到 segOutput
+4 -4
View File
@@ -113,15 +113,15 @@ function deleteChar(idx) {
<!-- 演员管理弹窗 -->
<div class="modal-overlay" id="actorModal">
<div class="modal" style="max-width:520px;">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;">
<div class="modal" style="width:80vw;height:80vh;max-width:1100px;padding:24px 28px;display:flex;flex-direction:column;">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;flex-shrink:0;">
<div>
<h3 id="actorModalDramaTitle" style="margin-bottom:4px;">演员管理</h3>
<span id="actorModalDramaMeta" style="font-size:12px;color:#888;"></span>
</div>
<button class="btn btn-outline btn-sm" onclick="hideActorModal()">关闭</button>
</div>
<div id="actorList" style="min-height:60px;"></div>
<div class="add-link" onclick="showCharForm()" style="margin-top:8px;">+ 添加演员</div>
<div id="actorList" style="flex:1;overflow-y:auto;padding-right:8px;min-height:60px;"></div>
<div class="add-link" onclick="showCharForm()" style="margin-top:8px;flex-shrink:0;">+ 添加演员</div>
</div>
</div>
+4 -4
View File
@@ -1,14 +1,14 @@
<!-- 剧集管理弹窗 -->
<div class="modal-overlay" id="episodeModal">
<div class="modal" style="max-width:640px;">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;">
<div class="modal" style="width:80vw;height:80vh;max-width:1100px;padding:24px 28px;display:flex;flex-direction:column;">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;flex-shrink:0;">
<div>
<h3 id="epModalDramaTitle" style="margin-bottom:4px;">加载中...</h3>
<span id="epModalDramaMeta" style="font-size:12px;color:#888;"></span>
</div>
<button class="btn btn-outline btn-sm" onclick="hideEpisodeModal()">关闭</button>
</div>
<div id="epList" class="ep-list" style="max-height:50vh;overflow-y:auto;"></div>
<div class="add-link" onclick="showEpModal()" style="margin-top:8px;">+ 添加剧集</div>
<div id="epList" class="ep-list" style="flex:1;overflow-y:auto;padding-right:8px;"></div>
<div class="add-link" onclick="showEpModal()" style="margin-top:8px;flex-shrink:0;">+ 添加剧集</div>
</div>
</div>
+4 -4
View File
@@ -106,15 +106,15 @@ function deleteProp(idx) {
<!-- 道具管理弹窗 -->
<div class="modal-overlay" id="propModal">
<div class="modal" style="max-width:520px;">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;">
<div class="modal" style="width:80vw;height:80vh;max-width:1100px;padding:24px 28px;display:flex;flex-direction:column;">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;flex-shrink:0;">
<div>
<h3 id="propModalDramaTitle" style="margin-bottom:4px;">道具管理</h3>
<span id="propModalDramaMeta" style="font-size:12px;color:#888;"></span>
</div>
<button class="btn btn-outline btn-sm" onclick="hidePropModal()">关闭</button>
</div>
<div id="propList" style="min-height:60px;"></div>
<div class="add-link" onclick="showPropForm()" style="margin-top:8px;">+ 添加道具</div>
<div id="propList" style="flex:1;overflow-y:auto;padding-right:8px;min-height:60px;"></div>
<div class="add-link" onclick="showPropForm()" style="margin-top:8px;flex-shrink:0;">+ 添加道具</div>
</div>
</div>
+4 -4
View File
@@ -106,15 +106,15 @@ function deleteScene(idx) {
<!-- 场景管理弹窗 -->
<div class="modal-overlay" id="sceneModal">
<div class="modal" style="max-width:520px;">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;">
<div class="modal" style="width:80vw;height:80vh;max-width:1100px;padding:24px 28px;display:flex;flex-direction:column;">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;flex-shrink:0;">
<div>
<h3 id="sceneModalDramaTitle" style="margin-bottom:4px;">场景管理</h3>
<span id="sceneModalDramaMeta" style="font-size:12px;color:#888;"></span>
</div>
<button class="btn btn-outline btn-sm" onclick="hideSceneModal()">关闭</button>
</div>
<div id="sceneList" style="min-height:60px;"></div>
<div class="add-link" onclick="showSceneForm()" style="margin-top:8px;">+ 添加场景</div>
<div id="sceneList" style="flex:1;overflow-y:auto;padding-right:8px;min-height:60px;"></div>
<div class="add-link" onclick="showSceneForm()" style="margin-top:8px;flex-shrink:0;">+ 添加场景</div>
</div>
</div>