fix(phase-a): Kontext-Cap, Download-State, Recipe-Edit, OS-Badge, Swap-Flash
A1: 32768-Kontext-Cap entfernt (install-recipe, install-model, register) →
max_ctx_for() liefert nun bis zu 128k auf Strix Halo; behebt "context
size exceeded" bei externen Tools.
A2: Download-State jetzt im Status-Endpoint sichtbar: Modelle zeigen
"↓ Download X%" statt "bereit" während Job läuft (Backend + Frontend).
A3: PUT /api/cookbook/user-recipe/{id} + Edit-Button (✎) für eigene Setups.
Download-Modal setzt Kontext-Input automatisch auf optimal.
A4: /api/updates liefert apt_cache_age_h; Badge zeigt Tooltip + ⚠ wenn >24h.
A5: Swap-Flash: Topbar-Text pulst kurz teal wenn Modell den State wechselt.
A6: LLM-Engine-Update fragt jetzt per confirmModal nach (Konsistenz).
A7: Event-Delegation statt per-render addEventListener in models.js.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -114,7 +114,14 @@ def updates():
|
||||
models = len(compute_upgrades(psutil.virtual_memory().total / (1024 ** 3)))
|
||||
except Exception: # noqa: BLE001
|
||||
models = 0
|
||||
return {"os": os_count, "models": models, "engine": 1 if _engine_update_available() else 0}
|
||||
apt_cache_age_h = None
|
||||
try:
|
||||
import time as _time
|
||||
apt_cache_age_h = round((_time.time() - os.path.getmtime("/var/lib/apt/lists")) / 3600, 1)
|
||||
except Exception: # noqa: BLE001
|
||||
pass
|
||||
return {"os": os_count, "models": models, "engine": 1 if _engine_update_available() else 0,
|
||||
"apt_cache_age_h": apt_cache_age_h}
|
||||
|
||||
@router.websocket("/logs/{service}")
|
||||
async def stream_logs(websocket: WebSocket, service: str):
|
||||
|
||||
Reference in New Issue
Block a user