fix(ai写作): 技能调用实时流式显示 + 去掉大纲拼检索词/复用检索词

- 技能调用过程改为实时流式:run_skill_via_real_agent 不再 to_thread 阻塞跑
  executor.execute(),而是复用其 agent/state 构建后在图事件循环里 astream,
  每个工具调用(读 SKILL.md / bash / 检索)实时推一条步骤到时间线——内网慢时
  用户能看到技能在执行,不会以为卡死。整段 asyncio.wait_for 卡 5 分钟超时。
- 回退检索词相关改动(实测无用、且结合大纲后检索词变长不利按词匹配):
  - intent_parser 不再顺便生成 keywords,删 precomputed_keywords 状态字段;
  - researcher 不再复用,每次自己现生成检索词(回到原行为);
  - 检索词提示词去掉「结合大纲/{outline_section}」,删 keyword_outline_section。
  保留:关思考、技能真实运行时、技能目录修复、内网兜底。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
fengxiangdebaoziandClaude Opus 4.8 committed 2026-06-25 00:33:57 +08:00
1 parent c0305c9269
commit 8f773d3f1b
6 files changed
+112 -121

No files matched your search

@@ -157,11 +157,6 @@ class AIWritingState(TypedDict):
notebook_search_space_id: Optional[int]
notebook_source_ids: Optional[List[int]]
# 意图解析阶段(intent_parser)顺便生成的检索词:与意图理解共用同一次 LLM 调用,
# researcher 首轮检索时直接复用,省掉素材收集阶段单独的「生成检索词」LLM 往返。
# 解析失败/为空时为 None,researcher 回退到自己生成检索词(优雅降级)。
precomputed_keywords: Optional[List[str]]
# Agent A 输出
material_package: Optional[MaterialPackage]