feat: subagent independent extension manager (#3596)
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
use crate::agents::extension_manager::ExtensionManager;
|
||||
use crate::providers::base::Provider;
|
||||
use rmcp::model::JsonRpcMessage;
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::{mpsc, RwLock};
|
||||
use tokio::sync::mpsc;
|
||||
use uuid::Uuid;
|
||||
|
||||
/// Configuration for task execution with all necessary dependencies
|
||||
@@ -11,7 +10,6 @@ use uuid::Uuid;
|
||||
pub struct TaskConfig {
|
||||
pub id: String,
|
||||
pub provider: Option<Arc<dyn Provider>>,
|
||||
pub extension_manager: Option<Arc<RwLock<ExtensionManager>>>,
|
||||
pub mcp_tx: mpsc::Sender<JsonRpcMessage>,
|
||||
pub max_turns: Option<usize>,
|
||||
}
|
||||
@@ -21,7 +19,6 @@ impl fmt::Debug for TaskConfig {
|
||||
f.debug_struct("TaskConfig")
|
||||
.field("id", &self.id)
|
||||
.field("provider", &"<dyn Provider>")
|
||||
.field("extension_manager", &"<ExtensionManager>")
|
||||
.field("max_turns", &self.max_turns)
|
||||
.finish()
|
||||
}
|
||||
@@ -29,15 +26,10 @@ impl fmt::Debug for TaskConfig {
|
||||
|
||||
impl TaskConfig {
|
||||
/// Create a new TaskConfig with all required dependencies
|
||||
pub fn new(
|
||||
provider: Option<Arc<dyn Provider>>,
|
||||
extension_manager: Option<Arc<RwLock<ExtensionManager>>>,
|
||||
mcp_tx: mpsc::Sender<JsonRpcMessage>,
|
||||
) -> Self {
|
||||
pub fn new(provider: Option<Arc<dyn Provider>>, mcp_tx: mpsc::Sender<JsonRpcMessage>) -> Self {
|
||||
Self {
|
||||
id: Uuid::new_v4().to_string(),
|
||||
provider,
|
||||
extension_manager,
|
||||
mcp_tx,
|
||||
max_turns: Some(10),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user