Add YOLO option to session dialog

This commit is contained in:
Ollie Agent 2026-08-18 12:54:36 +02:00
parent 2ba9ba036c
commit 4e381b1293
3 changed files with 15 additions and 4 deletions

View File

@ -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
}

View File

@ -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();

View File

@ -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);