feat: Desktop-Gateway als dritte Leitung im Verbinden-Tab

- Backend: check_health() prüft jetzt auch Desktop-Gateway (GET /api/status :9119)
- Frontend: ConnectHealth-Typ erweitert, dritte Status-Zeile mit emerald-Theme
- Frontend-Build: neu gebaut mit Vite (Hash-Dateinamen aktualisiert)
This commit is contained in:
2026-07-09 10:28:02 +02:00
parent 616518e2fc
commit 19ab42da1a
7 changed files with 168 additions and 141 deletions
+14 -4
View File
@@ -69,7 +69,7 @@ def build_snippets(host: str = DEFAULT_HOST,
f"#\n"\
f"# 3. Token im Browser-Login einfügen — fertig.\n"\
f"#\n"\
f"# Modelle im Hermes Desktop: {PRIMARY_MODEL} (bauen), heavy (denken), vision (Bilder)."\
f"# Modelle im Hermes Desktop: {PRIMARY_MODEL} (bauen), heavy (denken), vision (Bilder)."
)
# Claude Code spricht das Anthropic-Format; der Gateway ist OpenAI-kompatibel und
@@ -124,8 +124,9 @@ def build_snippets(host: str = DEFAULT_HOST,
def check_health() -> dict:
"""Live-Erreichbarkeit der beiden Leitungen, aus Sicht der Box:
Leitung 1 = Gateway/Engine (llama-swap), Leitung 2 = Gedächtnis-Sidecar (Mem0)."""
"""Live-Erreichbarkeit der drei Leitungen, aus Sicht der Box:
Leitung 1 = Gateway/Engine (llama-swap), Leitung 2 = Gedächtnis-Sidecar (Mem0),
Leitung 3 = Desktop-Gateway (Hermes-Builtin-UI)."""
gateway = {"ok": False, "detail": "nicht erreichbar"}
try:
with httpx.Client(timeout=3.0) as c:
@@ -147,4 +148,13 @@ def check_health() -> dict:
except Exception: # noqa: BLE001
pass
return {"gateway": gateway, "memory": memory}
desktop_gateway = {"ok": False, "detail": "nicht erreichbar"}
try:
with httpx.Client(timeout=3.0) as c:
r = c.get("http://127.0.0.1:9119/api/status")
desktop_gateway = ({"ok": True, "detail": "bereit"} if r.status_code == 200
else {"ok": False, "detail": f"HTTP {r.status_code}"})
except Exception: # noqa: BLE001
pass
return {"gateway": gateway, "memory": memory, "desktop_gateway": desktop_gateway}