tool: add execution context

This commit is contained in:
2026-06-09 19:31:11 +09:00
parent b21fab82fc
commit d8aed7befe
39 changed files with 1212 additions and 259 deletions
+2 -2
View File
@@ -66,13 +66,13 @@ fn setup() -> (TempDir, TempDir, Registry) {
}
async fn call(tool: &Arc<dyn Tool>, input: serde_json::Value) -> llm_worker::tool::ToolOutput {
tool.execute(&input.to_string())
tool.execute(&input.to_string(), Default::default())
.await
.expect("tool execution failed")
}
async fn call_err(tool: &Arc<dyn Tool>, input: serde_json::Value) -> llm_worker::tool::ToolError {
tool.execute(&input.to_string())
tool.execute(&input.to_string(), Default::default())
.await
.expect_err("expected error")
}