From 10bee0184488ffe18b5621578811092ccfb6a405 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 23 Oct 2026 09:28:33 +0200 Subject: ai: Restart for the desktop assistant and local chat A Restart button sits before Stop on a running app that has a restart control. The assistant uses assistant.sh restart. llamachat has none, and its --quit answers before the app has exited, so a --daemon sent straight after finds an instance still running and does nothing: the restart quits, waits for --ping to fail (5s at most), then starts it. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/ai/AiRow.qml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'desktop/modules/ai/AiRow.qml') diff --git a/desktop/modules/ai/AiRow.qml b/desktop/modules/ai/AiRow.qml index ac4a180..2950759 100644 --- a/desktop/modules/ai/AiRow.qml +++ b/desktop/modules/ai/AiRow.qml @@ -12,8 +12,9 @@ import QtQuick import "../.." -// One engine or app: a state dot, a name, a detail line, and at most one -// button. An empty action means no button, which is every engine row. +// One engine or app: a state dot, a name, a detail line, at most one +// button, and a Restart before it when restartable. An empty action means no +// button, which is every engine row. Rectangle { id: row @@ -23,7 +24,9 @@ Rectangle { property bool busy: false property string action: "" property bool danger: false + property bool restartable: false signal triggered + signal restart implicitHeight: Math.max(texts.implicitHeight, btn.visible ? btn.implicitHeight : 0) + 16 radius: 8 @@ -40,7 +43,8 @@ Rectangle { id: texts anchors { left: dot.right; leftMargin: 10 - right: btn.visible ? btn.left : parent.right; rightMargin: 10 + right: restartBtn.visible ? restartBtn.left : btn.visible ? btn.left : parent.right + rightMargin: 10 verticalCenter: parent.verticalCenter } spacing: 2 @@ -62,6 +66,14 @@ Rectangle { } } + Button { + id: restartBtn + anchors { right: btn.left; rightMargin: 6; verticalCenter: parent.verticalCenter } + visible: row.restartable + text: "Restart" + onClicked: row.restart() + } + Button { id: btn anchors { right: parent.right; rightMargin: 10; verticalCenter: parent.verticalCenter } -- cgit v1.2.3