mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-07-23 19:51:05 -04:00
feat: add support acp in common chat (#369)
This commit is contained in:
35
sources/acp/AgentCatalog.hpp
Normal file
35
sources/acp/AgentCatalog.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// Copyright (C) 2026 Petr Mironychev
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Additional attribution terms under GPLv3 §7(b) apply — see LICENSE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <optional>
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
#include "acp/AgentDefinition.hpp"
|
||||
|
||||
namespace QodeAssist::Acp {
|
||||
|
||||
class AgentCatalog
|
||||
{
|
||||
public:
|
||||
void setLayer(AgentSource source, const QList<AgentDefinition> &agents);
|
||||
|
||||
QList<AgentDefinition> agents() const { return m_merged; }
|
||||
QList<AgentDefinition> launchableAgents() const;
|
||||
std::optional<AgentDefinition> agent(const QString &id) const;
|
||||
|
||||
int size() const { return m_merged.size(); }
|
||||
|
||||
private:
|
||||
void rebuild();
|
||||
|
||||
std::array<QList<AgentDefinition>, agentSourceCount> m_layers;
|
||||
QList<AgentDefinition> m_merged;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist::Acp
|
||||
Reference in New Issue
Block a user