重构: tool_registry拆分及多批改进
This commit is contained in:
@@ -10,6 +10,5 @@ serde_json = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
futures = "0.3"
|
||||
thiserror = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//! 事件总线 — 基于 tokio::sync::broadcast 的发布/订阅
|
||||
|
||||
use tokio::sync::broadcast;
|
||||
use tokio::sync::broadcast::error::SendError;
|
||||
use df_types::events::WorkflowEvent;
|
||||
|
||||
/// 事件总线
|
||||
@@ -39,11 +38,6 @@ impl EventBus {
|
||||
pub fn subscribe(&self) -> EventSubscriber {
|
||||
self.sender.subscribe()
|
||||
}
|
||||
|
||||
/// 发送人工审批请求
|
||||
pub fn emit_human_approval_request(&self, event: WorkflowEvent) -> Result<usize, SendError<WorkflowEvent>> {
|
||||
self.sender.send(event)
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for EventBus {
|
||||
|
||||
Reference in New Issue
Block a user