refactor: Move to agent architecture

This commit is contained in:
Petr Mironychev
2026-05-30 14:50:49 +02:00
parent 34ce787320
commit ccc2ec2e80
364 changed files with 10801 additions and 19020 deletions

View File

@@ -0,0 +1,47 @@
// Copyright (C) 2024-2026 Petr Mironychev
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QObject>
#include <QPointer>
#include <QString>
#include <QStringList>
namespace QodeAssist {
class AgentFactory;
}
namespace QodeAssist::Chat {
class ChatAgentController : public QObject
{
Q_OBJECT
Q_DISABLE_COPY_MOVE(ChatAgentController)
public:
explicit ChatAgentController(QObject *parent = nullptr);
void setAgentFactory(AgentFactory *factory);
[[nodiscard]] QStringList availableAgents() const;
[[nodiscard]] QString currentAgent() const;
void setCurrentAgent(const QString &name);
[[nodiscard]] bool currentSupportsTools() const;
signals:
void availableAgentsChanged();
void currentAgentChanged();
private:
void reload();
void ensureValidCurrent();
void applyCurrentAgent(const QString &name);
QPointer<AgentFactory> m_agentFactory;
QStringList m_availableAgents;
QString m_currentAgent;
};
} // namespace QodeAssist::Chat