feat: Add agents pipelines

This commit is contained in:
Petr Mironychev
2026-05-26 16:44:45 +02:00
parent 97236c6069
commit fb887967ed
15 changed files with 2498 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
// Copyright (C) 2024-2026 Petr Mironychev
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QColor>
#include <QPointer>
#include <QString>
#include <QStringList>
#include <QWidget>
#include <AgentRouter.hpp>
class QLabel;
class QToolButton;
class QPushButton;
class QVBoxLayout;
class QFrame;
namespace QodeAssist {
class AgentFactory;
}
namespace QodeAssist::Settings {
class AgentRosterRow;
class AgentRosterWidget : public QWidget
{
Q_OBJECT
public:
explicit AgentRosterWidget(QWidget *parent = nullptr);
void setSlot(const QString &title, const QString &hint, const QColor &accent);
void setRoster(const QStringList &names, AgentFactory *factory);
[[nodiscard]] QStringList roster() const { return m_names; }
void setRoutingContext(const AgentRouter::Context &ctx);
signals:
void rosterChanged(const QStringList &names);
void editAgentRequested(const QString &agentName);
private:
void rebuildRows();
void recomputeActive();
void onAddClicked();
void onRowMoveUp(int index);
void onRowMoveDown(int index);
void onRowRemove(int index);
void onRowEdit(int index);
QStringList m_names;
QPointer<AgentFactory> m_factory;
AgentRouter::Context m_routingCtx;
int m_activeIndex = -1;
QLabel *m_accentDot = nullptr;
QLabel *m_titleLabel = nullptr;
QLabel *m_hintLabel = nullptr;
QFrame *m_rowsFrame = nullptr;
QVBoxLayout *m_rowsLayout = nullptr;
QLabel *m_emptyHint = nullptr;
QPushButton *m_addBtn = nullptr;
QLabel *m_footerHint = nullptr;
};
} // namespace QodeAssist::Settings