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 --- assistant.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'assistant.py') 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