|
@@ -377,9 +377,30 @@ class AIReviewWorkflow:
|
|
|
# 初始化issues列表
|
|
# 初始化issues列表
|
|
|
all_issues = []
|
|
all_issues = []
|
|
|
completed_chunks = 0
|
|
completed_chunks = 0
|
|
|
|
|
+ # 添加目录章节内容
|
|
|
|
|
+ catalogue = [{
|
|
|
|
|
+ "chunk_id": "outline_1",
|
|
|
|
|
+ "page": 1,
|
|
|
|
|
+ "content": "full_content",
|
|
|
|
|
+ "section_label": "目录",
|
|
|
|
|
+ "project_plan_type": "catalogue",
|
|
|
|
|
+ "chapter_classification": "catalogue",
|
|
|
|
|
+ "element_tag": {
|
|
|
|
|
+ "chunk_id": "outline_1",
|
|
|
|
|
+ "page": 1,
|
|
|
|
|
+ "serial_number": "1"
|
|
|
|
|
+ },
|
|
|
|
|
+ "chapter": "目录",
|
|
|
|
|
+ "title": "目录",
|
|
|
|
|
+ "original_content": "full_content",
|
|
|
|
|
+ "is_complete_field": False
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
chapter_chunks_map, chapter_names = self.core_fun._group_chunks_by_chapter(filtered_chunks)
|
|
chapter_chunks_map, chapter_names = self.core_fun._group_chunks_by_chapter(filtered_chunks)
|
|
|
# with open("temp/filtered_chunks/chapter_chunks_map.json", "w", encoding="utf-8") as f:
|
|
# with open("temp/filtered_chunks/chapter_chunks_map.json", "w", encoding="utf-8") as f:
|
|
|
# json.dump(chapter_chunks_map, f, ensure_ascii=False, indent=4)
|
|
# json.dump(chapter_chunks_map, f, ensure_ascii=False, indent=4)
|
|
|
|
|
+ chapter_chunks_map["catalogue"] = catalogue
|
|
|
|
|
+ review_item_dict_sorted["catalogue"] = ["check_completeness"]
|
|
|
logger.info(f"内容分组完成,共 {len(chapter_chunks_map)} 个章节")
|
|
logger.info(f"内容分组完成,共 {len(chapter_chunks_map)} 个章节")
|
|
|
await self.core_fun._send_start_review_progress(state,total_chunks, chapter_names)
|
|
await self.core_fun._send_start_review_progress(state,total_chunks, chapter_names)
|
|
|
# 6️ 按章节处理
|
|
# 6️ 按章节处理
|
|
@@ -406,6 +427,9 @@ class AIReviewWorkflow:
|
|
|
|
|
|
|
|
logger.info(f"章节 {chapter_code} 处理完成")
|
|
logger.info(f"章节 {chapter_code} 处理完成")
|
|
|
logger.info(f"all_issues_结果调试: {all_issues} 个块")
|
|
logger.info(f"all_issues_结果调试: {all_issues} 个块")
|
|
|
|
|
+
|
|
|
|
|
+ #
|
|
|
|
|
+
|
|
|
# 7️ 汇总结果
|
|
# 7️ 汇总结果
|
|
|
summary = self.inter_tool._aggregate_results(all_issues)
|
|
summary = self.inter_tool._aggregate_results(all_issues)
|
|
|
|
|
|