mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-23 16:54:12 +01:00
Move the MCP server into Rust, hosted by the app and yaak mcp (#752)
This commit is contained in:
1 parent
b6c1f700f1
commit
72b43f7110
35 files changed
+2501
-61
No files matched your search
@@ -1,4 +1,4 @@
|
||||
use crate::plugin_events::CliPluginEventBridge;
|
||||
use crate::plugin_events::{CliPluginEventBridge, SendContexts};
|
||||
use include_dir::{Dir, include_dir};
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
@@ -130,10 +130,18 @@ impl CliContext {
|
||||
&self.blob_manager
|
||||
}
|
||||
|
||||
pub fn connection_manager(&self) -> &HttpConnectionManager {
|
||||
pub fn connection_manager(&self) -> &Arc<HttpConnectionManager> {
|
||||
&self.connection_manager
|
||||
}
|
||||
|
||||
/// Where a send registers its execution context for the plugin calls it makes.
|
||||
pub async fn send_contexts(&self) -> SendContexts {
|
||||
match &*self.plugin_event_bridge.lock().await {
|
||||
Some(bridge) => bridge.send_contexts(),
|
||||
None => SendContexts::default(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn plugin_manager(&self) -> Arc<PluginManager> {
|
||||
self.plugin_manager.clone().expect("Plugin manager was not initialized for this command")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user