GUI-configurable agent settings + hide paused agents

This commit is contained in:
2026-04-13 01:48:56 +00:00
parent 1dcfc9f46e
commit b299ea701a
4 changed files with 237 additions and 164 deletions
+10 -1
View File
@@ -9,7 +9,7 @@ with a config dict specifying location, wiki parent, and agent ID.
import sys
from datetime import datetime
from shared import (
MT, WIKI_API, WIKI_COLLECTION_ID, MONTH_NAMES,
MT, DASHBOARD_API, WIKI_API, WIKI_COLLECTION_ID, MONTH_NAMES,
api_request, log_run, wiki_headers, find_child_doc, ensure_child_doc,
)
@@ -122,6 +122,15 @@ def run(config):
"""
agent_id = config["agent_id"]
# Fetch live config from dashboard API, merge over defaults
try:
live_config = api_request(f"{DASHBOARD_API}/api/agents/{agent_id}/config")
if live_config.get("location"):
config["location"] = live_config["location"]
print(f"Using live config location: {config['location'].get('name', '?')}")
except Exception as e:
print(f"Could not fetch live config, using defaults: {e}")
try:
print(f"Collecting sub-agent data for {config['person']}...")
sections = collect_sections(config)