caoqianming
|
824f746571
|
fix(progress): 停压 task_progress 参数修进度还原 + 进度区移到对话区顶部
问题1(进度不对): 上下文压缩把旧 task_progress tool_call 参数换成
{"_compacted":true,"step_id":"sX"} 这种像合法调用的标记, 既毒化模型让它
照抄出残废 update_step(丢 step.status)入库, 又让前端 applyProgressAction
读不到 args.step → 步骤永停 pending。修复: task_progress 参数一律不压缩。
问题2(没像 codex 在顶部): 删掉每条消息卡内联进度块, 进度统一只在对话区
顶部单一 dock 实时显示(钉顶不滚); 全部完成时折叠成一行摘要。prompt/tool
描述改为跑完标 completed 而非 clear, 留住全绿收尾。
校验: unittest test_context_compaction/test_task_progress_tool 12 过;
node --test frontend_task_progress 2 过。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-08 09:52:44 +08:00 |
caoqianming
|
5f8b157733
|
perf(context): 压缩旧 assistant tool_call arguments + keep_recent 20→12
旧 assistant `tool_calls[].function.arguments` 超 ~800 chars 时压成合法 JSON
标记(保留 path/script_path/name/original_chars),避免 `write(content=...)`
源码参数反复进 prompt;keep_recent 20→12 收窄原文窗口。role/tool_call_id/
name 等协议字段不变,tool_call 协议完整。stats 增 compacted_tool_call_arguments。
DESIGN §8.2 退出标准补一条:列表 N 条/N tok 是历史累计、不随发送前压缩下降。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-05 08:25:56 +08:00 |