mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-06-30 18:19:11 -04:00
refactor: Move to 0.7.0 version of llmqore
This commit is contained in:
@@ -5,12 +5,11 @@
|
||||
#include "McpServerConnection.hpp"
|
||||
|
||||
#include <LLMQore/McpClient.hpp>
|
||||
#include <LLMQore/McpExceptions.hpp>
|
||||
#include <LLMQore/McpHttpTransport.hpp>
|
||||
#include <LLMQore/McpRemoteTool.hpp>
|
||||
#include <LLMQore/McpStdioTransport.hpp>
|
||||
#include <LLMQore/McpTransport.hpp>
|
||||
#include <LLMQore/McpTypes.hpp>
|
||||
#include <LLMQore/RpcStdioTransport.hpp>
|
||||
#include <LLMQore/RpcTransport.hpp>
|
||||
#include <LLMQore/ToolsManager.hpp>
|
||||
#include <LLMQore/Version.hpp>
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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<QTimer> m_listToolsWatchdog;
|
||||
|
||||
QList<::LLMQore::Mcp::ToolInfo> m_tools;
|
||||
|
||||
Reference in New Issue
Block a user