Bläddra i källkod

fix: recovery detection + correct volume example

lingfengQAQ 5 månader sedan
förälder
incheckning
8ea541f47c

+ 1 - 1
.claude/skills/webnovel-writer/references/git-workflow.md

@@ -103,7 +103,7 @@ python scripts/backup_manager.py --rollback 140
 ```
 ✅ state.json: 筑基 7 层
 ✅ 正文/第3卷/第140章.md: 最后一章(筑基期内容)
-✅ 正文/第4卷/第150章.md: 不存在(已回滚)
+✅ 正文/第3卷/第150章.md: 不存在(已回滚)
 ```
 
 ---

+ 3 - 1
.claude/skills/webnovel-writer/scripts/workflow_manager.py

@@ -204,6 +204,7 @@ def analyze_recovery_options(interrupt_info):
         # 使用 chapter_paths 模块定位章节文件(兼容新旧目录结构)
         project_root = find_project_root()
         existing_chapter = find_chapter_file(project_root, chapter_num)
+        draft_path = None
         if existing_chapter:
             chapter_path = str(existing_chapter.relative_to(project_root))
         else:
@@ -225,7 +226,8 @@ def analyze_recovery_options(interrupt_info):
         }]
 
         # 检查文件是否存在
-        if existing_chapter and existing_chapter.exists():
+        candidate = existing_chapter or draft_path
+        if candidate and candidate.exists():
             options.append({
                 'option': 'B',
                 'label': '回滚到上一章',