refactor: 一步的工具呼叫從 agent::spawn 搬到 run_call(spawn 從 1797 行變 373 行,行為不變)
- 每一個工具呼叫(檢查、問人、執行、結果進聊天)整段搬成 run_call(CallTurn, asked) -> Flow;這一輪的狀態用 CallTurn 傳參考進去。 - 原本跳到下一個呼叫的 continue 變成 Flow::Next,結束這一輪的 return 變成 Flow::End(用掃描器分辨,內層迴圈和閉包裡的不動:53 個 continue、16 個 return)。 - 搬過去後多出來的 & 由 clippy --fix 拿掉。 已驗證:cargo test 606 通過(和搬之前一樣)、clippy -D warnings 乾淨。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
687c7dacbb
commit
937ca5cdd6
2906
src/agent.rs
2906
src/agent.rs
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue