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:
parent
03cf13e9eb
commit
112abb2000
3 changed files with 8 additions and 71 deletions
|
|
@ -233,10 +233,10 @@ pub fn tools() -> Vec<Tool> {
|
|||
Tool { def: memory::output_def(), handler: |_a, v| Box::pin(async move { memory::output(&v) }) },
|
||||
|
||||
// Channel tools
|
||||
Tool { def: channels::definitions()[0].clone(), handler: |_a, v| Box::pin(async move { channels::dispatch("channel_list", &v).await }) },
|
||||
Tool { def: channels::definitions()[1].clone(), handler: |_a, v| Box::pin(async move { channels::dispatch("channel_recv", &v).await }) },
|
||||
Tool { def: channels::definitions()[2].clone(), handler: |_a, v| Box::pin(async move { channels::dispatch("channel_send", &v).await }) },
|
||||
Tool { def: channels::definitions()[3].clone(), handler: |_a, v| Box::pin(async move { channels::dispatch("channel_notifications", &v).await }) },
|
||||
Tool { def: channels::definitions()[0].clone(), handler: |_a, v| Box::pin(async move { channels::channel_list().await }) },
|
||||
Tool { def: channels::definitions()[1].clone(), handler: |_a, v| Box::pin(async move { channels::channel_recv(&v).await }) },
|
||||
Tool { def: channels::definitions()[2].clone(), handler: |_a, v| Box::pin(async move { channels::channel_send(&v).await }) },
|
||||
Tool { def: channels::definitions()[3].clone(), handler: |_a, v| Box::pin(async move { channels::channel_notifications().await }) },
|
||||
|
||||
// Control tools
|
||||
Tool { def: control::definitions()[0].clone(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue