aboutsummaryrefslogtreecommitdiffstats
path: root/assistant.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-17 10:42:18 +0200
committerDanilo M. <danix@danix.xyz>2026-10-17 10:42:18 +0200
commit0869315f9b45b6cded65e49f3d632306766bd0a2 (patch)
treef9f946f28578e728647d4beb43e0330de06b1de1 /assistant.py
parente47b34a7ffc6c83691e90474987a2733860548b8 (diff)
downloaddesktop-assistant-0869315f9b45b6cded65e49f3d632306766bd0a2.tar.gz
desktop-assistant-0869315f9b45b6cded65e49f3d632306766bd0a2.zip
--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 <noreply@anthropic.com>
Diffstat (limited to 'assistant.py')
-rw-r--r--assistant.py10
1 files changed, 8 insertions, 2 deletions
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()