aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--README.md4
-rw-r--r--assistant.py10
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()