Remove the redundant tool dispatch wrapper (#33866)

## What changed

- Remove `ToolRegistry::dispatch_any`, which always forwarded a missing terminal outcome.
- Update registry and dispatch trace tests to call `dispatch_any_with_terminal_outcome` with `None` explicitly.

GitOrigin-RevId: aa3acb2ed480fd452bc25301a351f46e759bbfab
This commit is contained in:
jif authored and copyberry committed 2026-07-17 16:21:04 +00:00
1 parent 7c4aaf28c2
commit 908fe8ccc9
3 files changed
+78 -66

No files matched your search

-9
View File
@@ -392,15 +392,6 @@ impl ToolRegistry {
Some(tool.waits_for_runtime_cancellation())
}
#[allow(dead_code)]
pub(crate) async fn dispatch_any(
&self,
invocation: ToolInvocation,
) -> Result<AnyToolResult, FunctionCallError> {
self.dispatch_any_with_terminal_outcome(invocation, /*terminal_outcome_reached*/ None)
.await
}
#[expect(
clippy::await_holding_invalid_type,
reason = "tool dispatch must keep active-turn accounting atomic"