mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-05-30 19:09:14 -04:00
feat: Add agents and agents settings
This commit is contained in:
57
sources/agents/AgentConfig.hpp
Normal file
57
sources/agents/AgentConfig.hpp
Normal file
@@ -0,0 +1,57 @@
|
||||
// Copyright (C) 2024-2026 Petr Mironychev
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
namespace QodeAssist {
|
||||
|
||||
struct AgentConfig
|
||||
{
|
||||
static constexpr int kSupportedSchemaVersion = 1;
|
||||
int schemaVersion = 1;
|
||||
QString name;
|
||||
QString description;
|
||||
QString providerInstance;
|
||||
QString model;
|
||||
QString endpoint;
|
||||
QString role;
|
||||
QStringList tags;
|
||||
|
||||
struct Match
|
||||
{
|
||||
QStringList filePatterns;
|
||||
QStringList pathPatterns;
|
||||
QStringList projectNames;
|
||||
|
||||
[[nodiscard]] bool isEmpty() const noexcept
|
||||
{
|
||||
return filePatterns.isEmpty()
|
||||
&& pathPatterns.isEmpty()
|
||||
&& projectNames.isEmpty();
|
||||
}
|
||||
};
|
||||
Match match;
|
||||
|
||||
bool enableThinking = false;
|
||||
bool enableTools = false;
|
||||
|
||||
QString messageFormat;
|
||||
QJsonObject sampling;
|
||||
QJsonObject thinking;
|
||||
QString context;
|
||||
QString extendsName;
|
||||
bool abstract = false;
|
||||
bool hidden = false;
|
||||
|
||||
QString sourcePath;
|
||||
bool overridesBundled = false;
|
||||
bool isUserSource() const { return !sourcePath.startsWith(QLatin1StringView{":/"}); }
|
||||
|
||||
static QString validate(const AgentConfig &config);
|
||||
};
|
||||
|
||||
} // namespace QodeAssist
|
||||
Reference in New Issue
Block a user