diff --git a/mcp/McpServerConnection.cpp b/mcp/McpServerConnection.cpp index 766e8de..d2e56b2 100644 --- a/mcp/McpServerConnection.cpp +++ b/mcp/McpServerConnection.cpp @@ -5,12 +5,11 @@ #include "McpServerConnection.hpp" #include -#include #include #include -#include -#include #include +#include +#include #include #include @@ -125,7 +124,7 @@ McpServerConnection::~McpServerConnection() disconnectFromServer(); } -::LLMQore::Mcp::McpTransport *McpServerConnection::createTransport() +::LLMQore::Rpc::Transport *McpServerConnection::createTransport() { if (m_config.transport == McpTransportKind::Http) { if (!m_config.url.isValid()) { @@ -149,7 +148,7 @@ McpServerConnection::~McpServerConnection() return nullptr; } - ::LLMQore::Mcp::StdioLaunchConfig cfg; + ::LLMQore::Rpc::StdioLaunchConfig cfg; cfg.arguments = m_config.args; cfg.workingDirectory = m_config.workingDirectory; @@ -194,7 +193,7 @@ McpServerConnection::~McpServerConnection() env.insert(it.key(), it.value()); cfg.environment = env; - return new ::LLMQore::Mcp::McpStdioClientTransport(cfg, this); + return new ::LLMQore::Rpc::StdioClientTransport(cfg, this); } void McpServerConnection::connectToServer() diff --git a/mcp/McpServerConnection.hpp b/mcp/McpServerConnection.hpp index dc52956..fd5b154 100644 --- a/mcp/McpServerConnection.hpp +++ b/mcp/McpServerConnection.hpp @@ -22,9 +22,12 @@ class ToolsManager; namespace LLMQore::Mcp { class McpClient; -class McpTransport; } // namespace LLMQore::Mcp +namespace LLMQore::Rpc { +class Transport; +} // namespace LLMQore::Rpc + namespace QodeAssist::Mcp { enum class McpTransportKind { Http, Stdio }; @@ -84,14 +87,14 @@ private: void setState(McpConnectionState state, const QString &text = {}); void fetchAndRegisterTools(); void unregisterTools(); - ::LLMQore::Mcp::McpTransport *createTransport(); + ::LLMQore::Rpc::Transport *createTransport(); McpServerConfig m_config; McpConnectionState m_state = McpConnectionState::Disabled; QString m_statusText; QPointer<::LLMQore::Mcp::McpClient> m_client; - QPointer<::LLMQore::Mcp::McpTransport> m_transport; + QPointer<::LLMQore::Rpc::Transport> m_transport; QPointer m_listToolsWatchdog; QList<::LLMQore::Mcp::ToolInfo> m_tools;