refactor: Decoupling chat architecture (#367)

* refactor: Migrate tests to Qt Creator plugin framework and update llmqore transports

* refactor: Move conversation history into IDE-free session library

* refactor: Extract turn context assembly behind injected ports

* build: Add RunQodeAssistTests target for the plugin test suite

* refactor: Route the chat through a Session and ChatBackend seam
This commit is contained in:
Petr Mironychev
2026-07-19 22:45:04 +02:00
committed by GitHub
parent bd809edb8a
commit af85efb554
83 changed files with 5421 additions and 4620 deletions

View File

@@ -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>
@@ -22,6 +21,8 @@
#include <QJsonValue>
#include <QStandardPaths>
#include <utility>
#include <logger/Logger.hpp>
#include "providers/Provider.hpp"
#include <settings/McpSettings.hpp>
@@ -142,7 +143,7 @@ void McpServerConnection::setProviders(const QList<Providers::Provider *> &provi
}
}
::LLMQore::Mcp::McpTransport *McpServerConnection::createTransport()
::LLMQore::Rpc::Transport *McpServerConnection::createTransport()
{
if (m_config.transport == McpTransportKind::Http) {
if (!m_config.url.isValid()) {
@@ -166,7 +167,7 @@ void McpServerConnection::setProviders(const QList<Providers::Provider *> &provi
return nullptr;
}
::LLMQore::Mcp::StdioLaunchConfig cfg;
::LLMQore::Rpc::StdioLaunchConfig cfg;
cfg.arguments = m_config.args;
cfg.workingDirectory = m_config.workingDirectory;
@@ -211,7 +212,7 @@ void McpServerConnection::setProviders(const QList<Providers::Provider *> &provi
env.insert(it.key(), it.value());
cfg.environment = env;
return new ::LLMQore::Mcp::McpStdioClientTransport(cfg, this);
return new ::LLMQore::Rpc::StdioClientTransport(std::move(cfg), this);
}
void McpServerConnection::connectToServer()