mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-05-30 19:09:14 -04:00
37 lines
804 B
C++
37 lines
804 B
C++
// Copyright (C) 2026 Petr Mironychev
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QString>
|
|
#include <QStringList>
|
|
#include <QVector>
|
|
|
|
#include "AgentSkill.hpp"
|
|
|
|
namespace QodeAssist::Skills {
|
|
|
|
class SkillsLoader
|
|
{
|
|
public:
|
|
struct ParseResult
|
|
{
|
|
AgentSkill skill;
|
|
bool valid = false;
|
|
QString error;
|
|
};
|
|
|
|
static QVector<AgentSkill> scan(const QStringList &rootPaths);
|
|
|
|
static ParseResult parseSkillFile(const QString &skillDir, const QString &rootPath);
|
|
|
|
static int maxBodyChars();
|
|
|
|
private:
|
|
static bool parseFrontmatter(
|
|
const QString &text, AgentSkill &skill, QString &body, QString &error);
|
|
static bool validateName(const QString &name, const QString &dirName, QString &error);
|
|
};
|
|
|
|
} // namespace QodeAssist::Skills
|