|
|
@@ -381,6 +381,7 @@ class AIReviewWorkflow:
|
|
|
# 6️ 按章节处理
|
|
|
for chapter_idx, (chapter_code, func_names) in enumerate(review_item_dict.items()):
|
|
|
logger.info(f" 处理章节 [{chapter_idx+1}/{total_chapters}]: {chapter_code},包含 {len(func_names)} 个审查任务")
|
|
|
+ logger.info(f"🔍 章节处理前: all_issues数量={len(all_issues)}") # 调试日志
|
|
|
|
|
|
# 终止信号检查(章节级别)
|
|
|
if await self.workflow_manager.check_terminate_signal(state["callback_task_id"]):
|
|
|
@@ -399,6 +400,7 @@ class AIReviewWorkflow:
|
|
|
all_issues = await self.core_fun._process_basis_chapter(
|
|
|
chapter_code, chapter_content, func_names, state, all_issues, completed_chunks, total_chunks
|
|
|
)
|
|
|
+ logger.info(f"🔍 basis章节处理后: all_issues数量={len(all_issues) if all_issues else 0}") # 调试日志
|
|
|
# 更新已完成块数
|
|
|
completed_chunks += len(chapter_content)
|
|
|
else:
|
|
|
@@ -406,14 +408,15 @@ class AIReviewWorkflow:
|
|
|
chunks_completed, all_issues = await self.core_fun._process_normal_chapter(
|
|
|
chapter_code, chapter_content, func_names, state, all_issues
|
|
|
)
|
|
|
+ logger.info(f"🔍 normal章节处理后: all_issues数量={len(all_issues) if all_issues else 0}, chunks_completed={chunks_completed}") # 调试日志
|
|
|
# 更新已完成块数
|
|
|
completed_chunks += chunks_completed
|
|
|
|
|
|
logger.info(f"章节 {chapter_code} 处理完成")
|
|
|
-
|
|
|
+ logger.info(f"all_issues_结果调试: {all_issues} 个块")
|
|
|
# 7️ 汇总结果
|
|
|
summary = self.inter_tool._aggregate_results(all_issues)
|
|
|
-
|
|
|
+
|
|
|
# 8️ 构建完整的响应结构
|
|
|
review_results = {
|
|
|
"callback_task_id": state["callback_task_id"],
|
|
|
@@ -532,8 +535,12 @@ class AIReviewWorkflow:
|
|
|
|
|
|
outline_review_result = await self.ai_review_engine.outline_check(state["callback_task_id"], state["structured_content"],
|
|
|
state, state.get("stage_name", "大纲审查"))
|
|
|
- check_completeness_result = await self.ai_review_engine.check_completeness(trace_id_idx = state["callback_task_id"], review_content = state["structured_content"]["chunks"],
|
|
|
- review_references = None, review_location_label = None, state = state, stage_name = state.get("stage_name", "完整性审查"))
|
|
|
+ check_completeness_result = await self.ai_review_engine.check_completeness(
|
|
|
+ trace_id_idx = state["callback_task_id"],
|
|
|
+ review_content = state["structured_content"]["chunks"],
|
|
|
+ state = state,
|
|
|
+ stage_name = state.get("stage_name", "完整性审查")
|
|
|
+ )
|
|
|
|
|
|
# # 4. 执行编制依据审查
|
|
|
# #await self.core_fun._send_start_review_progress(state, total_units,'prpe_basis')
|