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/README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'desktop/modules/ai/README.md') diff --git a/desktop/modules/ai/README.md b/desktop/modules/ai/README.md index 5e204ca..5aec615 100644 --- a/desktop/modules/ai/README.md +++ b/desktop/modules/ai/README.md @@ -27,12 +27,16 @@ written in the last 5s. A step slower than that reads idle. ## Apps -| App | Status | Start | Stop | -| --- | --- | --- | --- | -| desktop-assistant | `assistant.sh status` | `assistant.sh start` | `assistant.sh stop` | -| local chat | `llamachat --ping` | `llamachat --daemon` | `llamachat --quit` | -| imggen | `imggen status` | `imggen start` (default model) | `imggen stop` | -| fanfictioner | `pgrep` on `python3 .../fanfictioner` | none | TERM its children, then it, by pid | +| App | Status | Start | Stop | Restart | +| --- | --- | --- | --- | --- | +| desktop-assistant | `assistant.sh status` | `assistant.sh start` | `assistant.sh stop` | `assistant.sh restart` | +| local chat | `llamachat --ping` | `llamachat --daemon` | `llamachat --quit` | quit, wait for `--ping` to fail (5s at most), `--daemon` | +| imggen | `imggen status` | `imggen start` (default model) | `imggen stop` | none | +| fanfictioner | `pgrep` on `python3 .../fanfictioner` | none | TERM its children, then it, by pid | none | + +Restart shows only while an app is running. llamachat's `--quit` answers +before the app has exited, so a `--daemon` sent straight after finds it still +running and does nothing; hence the wait. Each runs detached, so no exit code comes back; the next poll shows whether it worked. `assistant.sh status` fails when the daemon is down. -- cgit v1.2.3