feat: Add skills feature for tool and chat calling (#351)

This commit is contained in:
Petr Mironychev
2026-05-19 09:46:50 +02:00
committed by GitHub
parent a3ad314cd4
commit 7483c78777
41 changed files with 1379 additions and 30 deletions

View File

@@ -0,0 +1,59 @@
// Copyright (C) 2026 Petr Mironychev
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <optional>
#include <QObject>
#include <QString>
#include <QStringList>
#include <QVector>
#include "AgentSkill.hpp"
class QFileSystemWatcher;
namespace QodeAssist::Skills {
class SkillsManager : public QObject
{
Q_OBJECT
public:
explicit SkillsManager(QObject *parent = nullptr);
void configure(
const QString &projectPath,
const QStringList &globalRoots,
const QStringList &projectSubdirs);
void reload();
QVector<AgentSkill> skills() const;
std::optional<AgentSkill> findByName(const QString &name) const;
static QStringList resolveRoots(
const QString &projectPath,
const QStringList &globalRoots,
const QStringList &projectSubdirs);
QString catalogText() const;
QString alwaysOnBodies() const;
signals:
void skillsChanged();
private:
void updateWatcher(const QStringList &roots);
QString m_projectPath;
QStringList m_globalRoots;
QStringList m_projectSubdirs;
QVector<AgentSkill> m_skills;
QFileSystemWatcher *m_watcher = nullptr;
};
} // namespace QodeAssist::Skills