mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-05-30 10:59:30 -04:00
feat: Add skills feature for tool and chat calling (#351)
This commit is contained in:
36
sources/skills/SkillsLoader.hpp
Normal file
36
sources/skills/SkillsLoader.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
// 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
|
||||
Reference in New Issue
Block a user