mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
discard() 原先仅设置 flag,不释放 tools 数组、siblingAbortController 和 turnSpan。 NO_FLICKER 模式 API 重试时旧工具结果堆积无法被 GC 回收。 修复内容: - 中止 siblingAbortController 以取消运行中的工具子进程 - 清空 tools 数组释放 TrackedTool 引用(block、assistantMessage、results、pendingProgress) - 清理 progressAvailableResolve 和 turnSpan - 添加 7 个测试覆盖 discard 后的各种状态验证 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>