feat:novel_done 读取累积 stages 并传入 saveNovelResult

This commit is contained in:
2026-07-26 15:16:45 +08:00
parent 8c2fe249e7
commit d2a051a938
@@ -385,6 +385,14 @@ public class ShortNovelServiceImpl implements ShortNovelService {
if (stageMeta != null && !stageMeta.isEmpty()) {
metadata.put("stages", stageMeta);
}
// 读取跨流累积的中间步骤(clarification/outline),供详情页还原完整流程
if (currentSessionId[0] != null) {
java.util.List<JSONObject> stagesHistory = drainStages(currentSessionId[0]);
if (!stagesHistory.isEmpty()) {
metadata.put("stagesHistory", stagesHistory);
log.info("[ShortNovel SSE] 读取累积中间步骤: count={}", stagesHistory.size());
}
}
log.info("[ShortNovel SSE] 开始保存小说: userId={}, queryLength={}, textLength={}",
currentUserId, originalQuery.length(), fullText.length());
Map<String, String> saveResult = epicScriptDialogueServiceImpl.saveNovelResult(