Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(tools): remove unused imports

Steven Enamakel5303caf8e997
diff --git a/crates/openhuman-core/src/search/tools.rs b/crates/openhuman-core/src/search/tools.rs
index d12dec2cc0..8f52b8ebec 100644
--- a/crates/openhuman-core/src/search/tools.rs
+++ b/crates/openhuman-core/src/search/tools.rs
@@ -246,7 +246,16 @@ impl Tool for TinySearchTool {
args: Value,
options: ToolCallOptions,
) -> anyhow::Result<ToolResult> {
- let ctx = DispatchCtx::ambient();
+ self.execute_with_context(args, options, None).await
+ }
+
+ async fn execute_with_context(
+ &self,
+ args: Value,
+ options: ToolCallOptions,
+ context: Option<&dyn tinytools::ToolRunContext>,
+ ) -> anyhow::Result<ToolResult> {
+ let ctx = crate::agent::tinyagents::host::run_context::dispatch_ctx_for_tool(context);
let config = self.live_config(&ctx).await?;
// Re-read per call, so a key added or a provider switched mid-session
// clears an earlier refusal instead of outliving it.
diff --git a/crates/openhuman-core/src/web3/module_tools.rs b/crates/openhuman-core/src/web3/module_tools.rs
index 46c44ed65b..c02acb52a6 100644
--- a/crates/openhuman-core/src/web3/module_tools.rs
+++ b/crates/openhuman-core/src/web3/module_tools.rs
@@ -36,7 +36,8 @@ impl Tool for Web3ModuleTool {
}
async fn execute(&self, args: Value) -> anyhow::Result<ToolResult> {
- self.run(&DispatchCtx::ambient(), args, None).await
+ self.execute_with_context(args, tinytools::ToolCallOptions::default(), None)
+ .await
}
async fn execute_with_context(
diff --git a/crates/openhuman-core/src/web3/wallet/tools.rs b/crates/openhuman-core/src/web3/wallet/tools.rs
index 8272a56fa6..da64512e26 100644
--- a/crates/openhuman-core/src/web3/wallet/tools.rs
+++ b/crates/openhuman-core/src/web3/wallet/tools.rs
@@ -57,7 +57,8 @@ impl Tool for WalletModuleTool {
}
async fn execute(&self, args: Value) -> anyhow::Result<ToolResult> {
- self.run(&DispatchCtx::ambient(), args, None).await
+ self.execute_with_context(args, tinytools::ToolCallOptions::default(), None)
+ .await
}
async fn execute_with_context(