tools: delete old dispatch functions

All dispatch now goes through the Tool registry. Removed:
- memory::dispatch() (20-line match)
- channels::dispatch() and dispatch_blocking()
- channel_list_blocking(), channel_notifications_blocking()

Channel tool functions made pub so registry calls them directly.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-04 15:13:27 -04:00 committed by Kent Overstreet
parent 03cf13e9eb
commit 112abb2000
3 changed files with 8 additions and 71 deletions

View file

@ -41,29 +41,6 @@ pub fn journal_definitions() -> Vec<ToolDef> {
vec![journal_tail_def(), journal_new_def(), journal_update_def()]
}
// ── Dispatch (legacy — to be replaced by Tool registry) ───────
pub fn dispatch(name: &str, args: &serde_json::Value, provenance: Option<&str>) -> Result<String> {
match name {
"memory_render" => render(args),
"memory_write" => write(args),
"memory_search" => search(args),
"memory_links" => links(args),
"memory_link_set" => link_set(args),
"memory_link_add" => link_add(args),
"memory_used" => used(args),
"memory_weight_set" => weight_set(args),
"memory_rename" => rename(args),
"memory_supersede" => supersede(args),
"memory_query" => query(args),
"output" => output(args),
"journal_tail" => journal_tail(args),
"journal_new" => journal_new(args),
"journal_update" => journal_update(args),
_ => anyhow::bail!("Unknown memory tool: {}", name),
}
}
// ── Memory tools ───────────────────────────────────────────────
pub fn render_def() -> ToolDef {