refactor: Restructure project into sources/tests layout and dissolve PluginLLMCore

This commit is contained in:
Petr Mironychev
2026-07-14 02:50:43 +02:00
parent adef7972ed
commit 34d4f2c517
348 changed files with 809 additions and 852 deletions

View File

@@ -0,0 +1,54 @@
// Copyright (C) 2025-2026 Petr Mironychev
// SPDX-License-Identifier: GPL-3.0-or-later
// Additional attribution terms under GPLv3 §7(b) apply — see LICENSE
#pragma once
#include <QException>
#include <QString>
namespace QodeAssist::Tools {
class ToolException : public QException
{
public:
explicit ToolException(const QString &message)
: m_message(message)
, m_stdMessage(message.toStdString())
{}
void raise() const override { throw *this; }
ToolException *clone() const override { return new ToolException(*this); }
const char *what() const noexcept override { return m_stdMessage.c_str(); }
QString message() const { return m_message; }
private:
QString m_message;
std::string m_stdMessage;
};
class ToolRuntimeError : public ToolException
{
public:
explicit ToolRuntimeError(const QString &message)
: ToolException(message)
{}
void raise() const override { throw *this; }
ToolRuntimeError *clone() const override { return new ToolRuntimeError(*this); }
};
class ToolInvalidArgument : public ToolException
{
public:
explicit ToolInvalidArgument(const QString &message)
: ToolException(message)
{}
void raise() const override { throw *this; }
ToolInvalidArgument *clone() const override { return new ToolInvalidArgument(*this); }
};
} // namespace QodeAssist::Tools