diff --git a/scripts/writer.py b/scripts/writer.py index e68aedf..846b325 100644 --- a/scripts/writer.py +++ b/scripts/writer.py @@ -146,8 +146,8 @@ class Writer: def _expand_section(self, section: Dict) -> str: content = section.get('content', '').strip() - # 大纲要点格式(>40% 行以 -/*/** 开头)应始终由 LLM 展开为连贯段落 - if HAVE_LLM and self._is_bullet_only(content): + # 大纲要点格式(>40% 行以 -/*/** 开头)或内容过短(<100字)应由 LLM 展开为连贯段落 + if HAVE_LLM and (self._is_bullet_only(content) or (content and len(content) < 100)): logger.info(f"使用 LLM 扩写章节(要点→段落): {section['title']}") prompt = get_prompt("section_expansion", topic_title=self.topic['title'],