tools: delete dispatch_shared, use dispatch everywhere

dispatch_shared was a legacy wrapper — replaced by dispatch() which
goes through the unified Tool registry. One dispatch path for all
callers (interactive agent, subconscious agents, MCP server).

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-04 16:41:58 -04:00 committed by Kent Overstreet
parent 51e632c997
commit 1554d88694
2 changed files with 1 additions and 22 deletions

View file

@ -177,11 +177,7 @@ pub async fn call_api_with_tools(
}
};
let prov = provenance.borrow().clone();
let output = match agent_tools::dispatch_shared(&call.function.name, &args, Some(&prov)).await {
Some(out) => out,
None => format!("Error: Unknown tool: {}", call.function.name),
};
let output = agent_tools::dispatch(&call.function.name, &args).await;
if std::env::var("POC_AGENT_VERBOSE").is_ok() {
log(&format!("TOOL RESULT ({} chars):\n{}", output.len(), output));