From 4e381b12937cf66c2cc10ee98614e689aa5e6427 Mon Sep 17 00:00:00 2001 From: Ollie Agent Date: Tue, 18 Aug 2026 12:54:36 +0200 Subject: [PATCH] Add YOLO option to session dialog --- kde/gui/NewSessionDialog.qml | 14 ++++++++++++-- kde/gui/ollie9pclient.cpp | 3 ++- kde/gui/ollie9pclient.h | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/kde/gui/NewSessionDialog.qml b/kde/gui/NewSessionDialog.qml index 5cd34aa..b10e070 100644 --- a/kde/gui/NewSessionDialog.qml +++ b/kde/gui/NewSessionDialog.qml @@ -6,7 +6,7 @@ import QtQuick.Layouts 1.15 Dialog { id: root title: "New Session" - width: 380 + width: 520 modal: false x: (parent ? (parent.width - width) / 2 : 0) y: (parent ? (parent.height - height) / 2 : 0) @@ -128,6 +128,15 @@ Dialog { } } + RowLayout { + Layout.fillWidth: true + CheckBox { + id: yoloCheckBox + text: "YOLO (DANGEROUS: disables\ntool sandboxing)" + Layout.fillWidth: true + } + } + Component.onCompleted: { if (!ollie.workflowsLoaded) ollie.loadWorkflows() } @@ -146,7 +155,7 @@ Dialog { var cwd = cwdField.text.trim() var workflow = workflowCombo.currentText - var err = ollie.createSession(name, remote, cwd, workflow) + var err = ollie.createSession(name, remote, cwd, workflow, yoloCheckBox.checked) if (err === "") { ollie.refreshSessions() root.sessionCreated() @@ -170,6 +179,7 @@ Dialog { nameField.text = "" cwdField.text = "" remoteField.text = "" + yoloCheckBox.checked = false var idx = ollie.availableWorkflows.indexOf("conductor") workflowCombo.currentIndex = idx >= 0 ? idx : 0 } diff --git a/kde/gui/ollie9pclient.cpp b/kde/gui/ollie9pclient.cpp index 005814b..2ca25ba 100644 --- a/kde/gui/ollie9pclient.cpp +++ b/kde/gui/ollie9pclient.cpp @@ -609,7 +609,7 @@ bool Ollie9pClient::createQuickSession() return !result.isEmpty() || m_9p->lastError().isEmpty(); } -QString Ollie9pClient::createSession(const QString &name, const QString &remote, const QString &cwd, const QString &workflow) +QString Ollie9pClient::createSession(const QString &name, const QString &remote, const QString &cwd, const QString &workflow, bool yolo) { if (!m_9p || !m_9p->isConnected()) return QStringLiteral("not connected"); @@ -618,6 +618,7 @@ QString Ollie9pClient::createSession(const QString &name, const QString &remote, if (!remote.isEmpty()) args << "remote=" + remote; if (!cwd.isEmpty()) args << "cwd=" + cwd; if (!workflow.isEmpty()) args << "workflow=" + workflow; + if (yolo) args << "yolo=true"; QByteArray result = m_9p->rdwr(QStringLiteral("session/new"), (args.join(" ") + "\n").toUtf8()); QString err = m_9p->lastError(); diff --git a/kde/gui/ollie9pclient.h b/kde/gui/ollie9pclient.h index 56217b1..84624d9 100644 --- a/kde/gui/ollie9pclient.h +++ b/kde/gui/ollie9pclient.h @@ -85,7 +85,7 @@ public: Q_INVOKABLE void loadWorkflows(); Q_INVOKABLE QStringList getAvailableModels(const QString &backend) const; Q_INVOKABLE bool createQuickSession(); - Q_INVOKABLE QString createSession(const QString &name, const QString &remote, const QString &cwd = QString(), const QString &workflow = QString()); + Q_INVOKABLE QString createSession(const QString &name, const QString &remote, const QString &cwd = QString(), const QString &workflow = QString(), bool yolo = false); Q_INVOKABLE void setGoal(const QString &sessionName, const QString &goalText); Q_INVOKABLE QString createAgent(const QString &sessionId, const QString &backend, const QString &model, const QString &agent, const QString &remote, const QString &agentAlias); Q_INVOKABLE bool killAgent(const QString &sessionId, const QString &agentId);