feat: 支持长篇小说分层架构(卷/弧/章三级结构)

This commit is contained in:
voocel
2026-03-12 16:27:15 +08:00
parent 3d65afa276
commit bce0adeff1
19 changed files with 1045 additions and 16 deletions

View File

@@ -23,10 +23,22 @@ func MergeScenes(scenes []SceneDraft) (string, int) {
// ReviewInterval 全局审阅间隔(每 N 章触发一次)。
const ReviewInterval = 5
// ShouldReview 根据已完成章节数判断是否需要全局审阅。
// ShouldReview 根据已完成章节数判断是否需要全局审阅(短篇/中篇模式)
func ShouldReview(completedCount int) (bool, string) {
if completedCount > 0 && completedCount%ReviewInterval == 0 {
return true, fmt.Sprintf("已完成 %d 章,触发全局审阅", completedCount)
}
return false, ""
}
// ShouldArcReview 长篇模式下判断是否需要弧级/卷级评审。
// 弧结束时触发评审,替代固定间隔。
func ShouldArcReview(isArcEnd, isVolumeEnd bool, volume, arc int) (bool, string) {
if isVolumeEnd {
return true, fmt.Sprintf("第 %d 卷第 %d 弧结束(卷结束),触发弧级+卷级评审", volume, arc)
}
if isArcEnd {
return true, fmt.Sprintf("第 %d 卷第 %d 弧结束,触发弧级评审", volume, arc)
}
return false, ""
}