add currentBackend property for slash command completions
This commit is contained in:
parent
64afb587e3
commit
1c419295f9
|
|
@ -27,6 +27,7 @@ class Ollie9pClient : public QObject
|
|||
Q_PROPERTY(bool rootAgentsLoaded READ rootAgentsLoaded NOTIFY rootAgentsLoadedChanged)
|
||||
Q_PROPERTY(QStringList availableAgents READ availableAgents NOTIFY availableAgentsChanged)
|
||||
Q_PROPERTY(bool rootModelsLoaded READ rootModelsLoaded NOTIFY rootModelsLoadedChanged)
|
||||
Q_PROPERTY(QString currentBackend READ currentBackend WRITE setCurrentBackend NOTIFY currentBackendChanged)
|
||||
|
||||
public:
|
||||
explicit Ollie9pClient(QObject *parent = nullptr);
|
||||
|
|
@ -43,6 +44,12 @@ public:
|
|||
bool rootAgentsLoaded() const { return m_rootAgentsLoaded; }
|
||||
QStringList availableAgents() const { return m_availableAgents; }
|
||||
bool rootModelsLoaded() const { return m_rootModelsLoaded; }
|
||||
QString currentBackend() const { return m_currentBackend; }
|
||||
Q_INVOKABLE void setCurrentBackend(const QString &backend) {
|
||||
if (m_currentBackend == backend) return;
|
||||
m_currentBackend = backend;
|
||||
emit currentBackendChanged();
|
||||
}
|
||||
|
||||
Q_INVOKABLE void refreshSessions();
|
||||
Q_INVOKABLE QString readLog();
|
||||
|
|
@ -71,6 +78,7 @@ signals:
|
|||
void rootAgentsLoadedChanged();
|
||||
void availableAgentsChanged();
|
||||
void rootModelsLoadedChanged();
|
||||
void currentBackendChanged();
|
||||
|
||||
private slots:
|
||||
void onChatReadyRead();
|
||||
|
|
|
|||
Reference in New Issue