agent: Re-add workaround for language model behavior with empty tool result (#37196)
This is just copying over the same workaround here:
https://github.com/zed-industries/zed/blob/a790e514af4d6957aa1a14cc8190b2ff24a0484c/crates/agent/src/thread.rs#L1455-L1459
Into the agent2 code.
Release Notes:
- agent: Fixed an issue where some tool calls in the Zed agent could
return an error like "`tool_use` ids were found without `tool_result`
blocks immediately after"
1c2e2a00feCole Miller committed on 8/29/2025, 10:26:11 PM· committed by GitHubparenta70cf3f