refactor: Separate and simplified tools (#340)

This commit is contained in:
Petr Mironychev
2026-04-19 18:12:15 +02:00
committed by GitHub
parent ede2c01eb7
commit 2891b313d2
16 changed files with 465 additions and 245 deletions

43
tools/ReadFileTool.hpp Normal file
View File

@@ -0,0 +1,43 @@
/*
* Copyright (C) 2025 Petr Mironychev
*
* This file is part of QodeAssist.
*
* QodeAssist is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* QodeAssist is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with QodeAssist. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <LLMQore/BaseTool.hpp>
#include <QFuture>
#include <QJsonObject>
#include <QObject>
namespace QodeAssist::Tools {
class ReadFileTool : public ::LLMQore::BaseTool
{
Q_OBJECT
public:
explicit ReadFileTool(QObject *parent = nullptr);
QString id() const override;
QString displayName() const override;
QString description() const override;
QJsonObject parametersSchema() const override;
QFuture<LLMQore::ToolResult> executeAsync(const QJsonObject &input) override;
};
} // namespace QodeAssist::Tools