徐涛
cc1c68b69d
feat(agent): 实现摘要自动生成(SummaryConfig + 内联检查点)
SummaryConfig 6 字段配置(trigger_token_ratio / max_context_tokens /
summary_prompt / debounce_turns / summary_model / max_tool_result_chars),
AgentBuilder 链式 summary_config();AgentSession 在 submit_turn /
finalize_turn 的 OnTurnEnd 之后内联检查点:水位 + 防抖(首次不受
约束)→ 独立 LlmCycle 调 submit_messages 生成摘要 → 写入
FocusedConfig.summary_override + slot.save() + SessionMemory 全局快照。
should_summarize 接收 current_turn 参数避免流式路径 turn_index 偏差;
format_messages_as_text 简洁版格式化含 30K 整体截断保留最新;空消息
守卫直接返回空串。所有错误静默 tracing::error!,成功路径
tracing::info!。
src/agent/summary.rs 新增 ~240 行;agent/session.rs +428 行(双路径
检查点 + 关联函数 + 测试 + 公开 API)。零新外部依赖。全量 335 → 353
测试(+18 新测试),clippy 0 警告,doc 0 warning。两轮审查 PASS——
第一轮 PM/SA 修复 11 项,第二轮 Code Reviewer 修复 9 项(含 🔴
generate_summary 空消息 bug + 🟡 5 项 + 💭 2 项)。方案文档 docs/
22-phase16-summary-auto-generation.md(471 行);roadmap.md 标记
Phase 16 完成 + M12 里程碑达成。
2026-07-10 06:43:06 +08:00
..
2026-06-01 23:06:50 +08:00
2026-06-01 23:06:50 +08:00
2026-06-02 08:51:42 +08:00
2026-06-02 22:19:15 +08:00
2026-06-07 10:23:36 +08:00
2026-06-07 23:01:28 +08:00
2026-06-10 22:38:32 +08:00
2026-06-11 22:49:27 +08:00
2026-06-22 08:43:48 +08:00
2026-06-15 23:07:33 +08:00
2026-06-22 06:34:11 +08:00
2026-06-17 22:55:47 +08:00
2026-06-18 06:51:13 +08:00
2026-06-22 06:52:04 +08:00
2026-06-17 22:55:47 +08:00
2026-06-15 23:07:33 +08:00
2026-06-30 22:59:05 +08:00
2026-06-30 22:59:05 +08:00
2026-06-30 22:22:12 +08:00
2026-06-30 22:22:12 +08:00
2026-07-03 14:13:30 +08:00
2026-07-05 07:32:19 +08:00
2026-07-05 10:46:46 +08:00
2026-07-05 16:54:29 +08:00
2026-07-05 21:04:31 +08:00
2026-07-08 23:19:24 +08:00
2026-07-06 09:46:04 +08:00
2026-07-06 14:53:00 +08:00
2026-07-08 22:55:17 +08:00
2026-07-09 13:08:35 +08:00
2026-07-09 16:51:29 +08:00
2026-07-10 06:43:06 +08:00
2026-06-09 22:32:48 +08:00
2026-06-09 22:32:59 +08:00
2026-06-10 22:22:18 +08:00
2026-06-07 22:42:49 +08:00
2026-07-06 21:55:03 +08:00
2026-06-10 06:52:24 +08:00
2026-07-04 10:19:54 +08:00
2026-07-10 06:43:06 +08:00