fix(analyze): include original text for zhihu answer/zhuanlan types
知乎回答(answer)和专栏(zhuanlan)的原文没有被追加到分析报告中。 代码只在 content_type == "article" 时设置和追加原文。 修复: - deep_analyzer.py: 扩展条件支持 answer, zhuanlan 类型 - analyze.py: 同步扩展原文追加条件 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -180,8 +180,8 @@ class DeepAnalyzer:
|
||||
# 解析结果
|
||||
result = self._parse_analysis(full_analysis, text, duration, content_type)
|
||||
|
||||
# 文章类型:追加原文
|
||||
if content_type == "article":
|
||||
# 文章/回答类型:追加原文
|
||||
if content_type in ("article", "answer", "zhuanlan"):
|
||||
result.original_text = text
|
||||
|
||||
return result
|
||||
|
||||
@@ -240,8 +240,8 @@ class AnalyzeProcessor(BaseProcessor):
|
||||
# 获取完整分析内容
|
||||
full_analysis = result.full_analysis
|
||||
|
||||
# 文章类型:追加原文
|
||||
if content_type == "article" and result.original_text:
|
||||
# 文章/回答类型:追加原文
|
||||
if content_type in ("article", "answer", "zhuanlan") and result.original_text:
|
||||
full_analysis = full_analysis.rstrip() + "\n\n## 原文\n\n" + result.original_text
|
||||
|
||||
# 写入文件
|
||||
|
||||
Reference in New Issue
Block a user