From 0869315f9b45b6cded65e49f3d632306766bd0a2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 17 Oct 2026 10:42:18 +0200 Subject: --defaults prints the built-in config as JSON For the quickshell settings window's Assistant page, which shows each default as the placeholder of its field and falls back to it when a field is emptied. Reading them from here keeps one copy of the defaults. Co-Authored-By: Claude Opus 5.5 --- README.md | 4 ++++ assistant.py | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 62751e7..9127aaf 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,10 @@ their output. Reasoning is shown live and not stored. ## Configuration and tools +The quickshell desktop's settings window edits all of this (its Assistant +page), keeping the file's comments, and restarts the daemon to apply it; +`python3 assistant.py --defaults` prints the built-in values it shows. + Everything is optional. Settings and tools live in `~/.config/desktop-assistant/` (or `$XDG_CONFIG_HOME/desktop-assistant/`): diff --git a/assistant.py b/assistant.py index 9004243..e2b576d 100644 --- a/assistant.py +++ b/assistant.py @@ -18,7 +18,8 @@ model answers with tools, replies stream back on the same socket, and every finished turn is kept in a SQLite history with full-text search. -Run: python3 assistant.py (--test runs the self-check) +Run: python3 assistant.py (--test runs the self-check, --defaults +prints the built-in config as JSON, for a settings UI) """ import base64 @@ -1481,4 +1482,9 @@ def test(): if __name__ == "__main__": - test() if sys.argv[1:] == ["--test"] else main() + if sys.argv[1:] == ["--test"]: + test() + elif sys.argv[1:] == ["--defaults"]: + print(json.dumps(DEFAULTS)) + else: + main() -- cgit v1.2.3