Commit Graph

13 Commits

Author SHA1 Message Date
Hitonabi f44da4b8e2 feat: Modelle loeschen (Config austragen + Dateien entfernen)
- POST /api/delete_model: entlaedt das Modell, traegt es aus der config.yaml
  aus und loescht optional die GGUF-Dateien, um Speicher freizugeben
- Sicherheit: Loeschen STRENG auf MODELS_DIR begrenzt (Pfad-Resolve-Check);
  loescht den ganzen Repo-Unterordner inkl. .cache nur, wenn er ein direktes
  Kind von MODELS_DIR ist und kein anderes Modell eine Datei darin nutzt,
  sonst nur die einzelne GGUF-Datei. Meldet freigegebene GB zurueck.
- Modelle-Tab: roter "Loeschen"-Button je Zeile mit Klartext-Sicherheitsabfrage
  (unwiderruflich) via confirmModal(danger)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:31:56 +02:00
Hitonabi 3cf36d436b feat: echter Download-Fortschritt via Datei-Polling
`hf` gibt im Nicht-TTY-Modus keinen Fortschritt aus (am Bosgame verifiziert:
0 CR-Frames). Stattdessen pollt jobengine.attach_download_progress die
wachsende <local-dir>/.cache/huggingface/download/*.incomplete-Datei gegen die
Gesamtgroesse aus der HF-Tree-API (cookbook.hf_file_size) -> exaktes %.

- attach_download_progress an /api/download, install-recipe, install-model
- Frontend (Aktivitaet + Server-Karte): nutzt job.progress bevorzugt,
  Log-%-Parsing bleibt Fallback fuer Tools, die selbst Prozente ausgeben

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:26:27 +02:00
Hitonabi 720b47a6e1 feat: Cookbook-Download-Fix, Live-Update-Konsole, Profi-Highlight, OpenCode-Guide
Backend:
- hf_bin() + HF_DOWNLOAD_ENV zentral in config.py; install-recipe und
  install-model in cookbook.py nutzten weiter das fehlende `hf` + falsches
  XET-Env -> Haupt-Installationsweg war ebenso kaputt, jetzt konsistent gefixt

Frontend:
- Server: laufende Updates (LLM-Engine/OS) live auf der Server-Seite mitlesbar,
  inkl. klarer Fertig-/Fehlgeschlagen-Meldung (onJobs + Aktueller-Vorgang-Karte)
- Cookbook/Profi-Modus: meistgeladenes, passendes Modell wird als
  "★ Beste Wahl für dein System" hervorgehoben (analog zu den Templates)
- Verbinden: OpenCode korrekt per opencode.json (@ai-sdk/openai-compatible)
  statt irrefuehrender Felder; erklaert "Connect to API"-Fehler (LAN-IP statt
  localhost)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:03:12 +02:00
Hitonabi f07a8440b2 fix: 500er bei register/update_model/install-recipe, Download & favicon
- write_config schreibt atomar (tmp + os.replace) -> llama-swap (-watch-config)
  sieht nie eine halb geschriebene config.yaml; PermissionError wird in eine
  klare Klartext-Meldung uebersetzt (Hinweis auf chown)
- generischer Exception-Handler: unerwartete Fehler kommen als lesbare JSON-
  Meldung im UI an statt als nackter 500 (Anfaenger-Diagnose)
- Download: nutzt die `hf`-CLI aus dem venv (Dienst-PATH kennt venv/bin nicht)
  + HF_HUB_DISABLE_XET=1 statt HF_XET_HIGH_PERFORMANCE (XET-Haenger bei ~6 MB)
- huggingface_hub als Dependency ergaenzt (liefert `hf`)
- favicon.ico: themed SVG (Link-Tag + Route) -> kein 404 mehr

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:53:49 +02:00
Hitonabi 970e04af30 v5 Phase 2: aktuelle Modelle, GGUF-Klartext, Tools, HF-Token
- recipes.py: Juni-2026-Modelle (Qwen3-Coder-30B-A3B, Qwen3-8B/30B, Qwen2.5-VL-7B, Qwen3-4B);
  nur Repo gespeichert, GGUF-Datei wird beim Installieren dynamisch aufgeloest (_pick_gguf) +
  UPGRADES-Map fuer Phase 3.
- cookbook: 'kein GGUF' neutral statt rot + GGUF-Erklaerung (infoDot); ctx-infoDot.
- connect.js: 'Empfohlene Tools (Juni 2026)' (OpenCode/Cline/Continue) + MCP-Hinweis.
- HF-Token in Einstellungen -> als HF_TOKEN an Downloads/Recipe-Install durchgereicht.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:13:30 +02:00
Hitonabi 8e7a5425d4 v5 Phase 1: Erklaeren (Swapping/RAM, Kontext, Guides-Neubau)
- Swapping-Klartext + Spitzenbedarf (peak_ram) pro Modell: Modelle-Konfig + Cookbook-Setup-Modal
  zeigen 'nur ein Modell gleichzeitig, groesstes zaehlt'. models.py: peak_ram_gb/_optimal in Meta.
- Kontextfenster: infoDot(ⓘ)-Helfer in ui.js + Tooltips an ctx-Feldern.
- Guides-Tab komplett neu = echter Anfaenger-Guide (LLM/GGUF/Quant/Kontext/Swapping/MCP/Skills/Agenten).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:58:57 +02:00
Hitonabi 29f37bd916 v4 Schritt 2: Cookbook 2.0 — Use-Case-Setups (Stacks)
- recipes.py: 6 kuratierte Use-Case-Stacks (Coding, Vision, Chat, LongDoc, Agents, Fast).
- cookbook.py: /recipes (Stack-Fit pro Modell + Gesamturteil) + /install-recipe
  (download + register aller Modelle mit optimalem, gedeckeltem Kontext).
- cookbook.js: Use-Case-Karten als Haupteinstieg + Setup-Modal + 'Komplettes Setup
  installieren'; Roh-Suche in 'Profi-Modus' (collapsible).
- models.py /register: exists()-Check entfernt (fixt frischen Download-Install).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:36:36 +02:00
Hitonabi 654720ed05 v4 Schritt 1: optimale Kontextfenster automatisch ermitteln
- hw_math: max_ctx_for() (Umkehrung der ctx-Heuristik) + extract_params_b + recommend_ctx.
- cookbook.py: optimal_ctx pro Datei in analyze + evaluate.
- models.py status: params_b + optimal_ctx pro Modell (psutil-RAM).
- models.js Konfig-Modal: Empfehlung + 'Optimal uebernehmen'.
- cookbook.js Modal: 'Empfohlener Kontext ... uebernehmen'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:13:30 +02:00
Hitonabi 5560c18816 v3 Phase C: Security-Härtung + UX-Feedback
Security:
- Passwort-Leak dicht: os-update/reboot fuettern das sudo-Passwort ueber stdin
  (jobengine: neues stdin_data + sanitisierte Log-Zeile log_cmd). Verifiziert:
  Secret taucht nicht mehr im Job-Log/ps auf.
- /api/status liefert "secured" -> Topbar-Security-Chip zeigt ehrlich, ob Token aktiv.
- WS-Token-Auth funktioniert (Query-Param, war bereits in auth.py).
- Bind bleibt 0.0.0.0 (kein Aussperren), kein Token erzwungen.

UX-Feedback:
- Schnellstart-Bug gefixt (Titel/Text brechen um, .qa-main column).
- Cookbook: Sortier-Dropdown (Downloads/Likes/Aktualisiert/Trend) wie HuggingFace.
- Server & Wartung: Buttons -> selbsterklaerende Aktionszeilen mit Beschreibung;
  Reboot nur mit rotem Icon (Vollrot-Bug behoben).
- Live-Konsole: neue Option "System (ganzer Server)" -> journalctl ueber alle Units.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:41:30 +02:00
Hitonabi 8b76adc96e Feinschliff Phase 2: Dashboard Redesign, RAM Check, Accordions 2026-06-20 22:30:40 +02:00
Hitonabi e3be7fbfb5 refactor: massive UX and beginner refactoring (Cookbook, Dashboard, Layout, Wording) 2026-06-20 22:06:04 +02:00
Hitonabi bd1c2ef5c9 feat: display LLM metrics and capabilities (Feature 6) 2026-06-20 21:27:59 +02:00
Hitonabi 364939466f Mission Control v2 – Schritt 1: SoC-Refactor + Design 2.0
Architektur auf Separation of Concerns umgestellt – ohne Build-Schritt,
ohne neues Framework, ohne DB (KISS bleibt). Endpoint-URLs unveraendert,
daher 1:1-kompatibel zum bisherigen Stand.

Backend (Top-Level-Helfer + ein Router je Bereich):
- app.py auf duennen Einstieg reduziert (FastAPI + include_router + static)
- config/auth/jobengine/llamaswap als getrennte Helfer-Module
- Endpoints in routers/{models,jobs,maintenance}.py

Frontend (native ES-Module statt Single-File):
- index.html = Huelle: Sidebar-Nav, Topbar, Alert-Banner, Hash-Routing
- css/{base,components}.css – Tokens + Komponenten
- js/core/{api,ui,nav}.js + js/panels/{overview,models,maintenance,jobs}.js + main.js
- Panel-Vertrag: { id, mount?(), onStatus?(s), onJobs?(jobs) }
- Optik an docs/mission-control-overview.png angelehnt (Hero, KPI-Kacheln,
  Listen, Aktivitaets-Stream, getoente Karten)

Doku: CLAUDE.md + README auf die neue Struktur aktualisiert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 20:46:45 +02:00