Frontend-Rundumschlag: Health-Logik + Statuszeile an neue LLM-Landschaft angepasst
(1) useLucyHealth: ruhende Augen sind seit der Warm-Set-Diaet 07.07. der
NORMALZUSTAND (vision on-demand, Lucy waermt selbst) -> kein Dauer-warn
mehr im Cockpit ('Kleinigkeit an der Box' ohne Grund). Geladen = 'sieht
gerade zu', ruhend = ok mit ehrlicher Erklaerung + Weck-Knopf.
(2) Cockpit-Statuszeile SAGT jetzt, was der Hinweis ist (erster warn-Check
mit Label+Detail statt generischem 'Nichts Schlimmes — nur ein Hinweis';
User-Feedback 08.07.). useLucyHealth exportiert dafuer die warns-Liste.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,7 @@ export interface LucyHealth {
|
||||
checks: LucyCheck[]
|
||||
memory: MemoryAmpel
|
||||
problems: LucyCheck[] // kritische Down-Checks (für den Schnellzugriff im Banner)
|
||||
warns: LucyCheck[] // nicht-kritische Hinweise — damit das Banner SAGT, was los ist
|
||||
}
|
||||
|
||||
export function useLucyHealth(): LucyHealth {
|
||||
@@ -83,8 +84,9 @@ export function useLucyHealth(): LucyHealth {
|
||||
return { ...base, status: "ok", detail: "Wach und ansprechbar." }
|
||||
})())
|
||||
|
||||
// 2) Lucys Augen — das Vision-Modell (Rolle `vision`, Teil des Immer-bereit-Sets seit
|
||||
// ttl 0 am 03.07.). Nicht kritisch: Reden geht auch blind — aber ehrlich anzeigen.
|
||||
// 2) Lucys Augen — das Vision-Modell (Rolle `vision`). Seit der Warm-Set-Diät 07.07. ist
|
||||
// ON-DEMAND der NORMALZUSTAND (User-Entscheid: Augen nur, wenn Lucy an ist / IDE sie ruft;
|
||||
// die Lucy-App wärmt sie beim Start selbst an). Ruhende Augen sind darum OK, keine Warnung.
|
||||
checks.push(((): LucyCheck => {
|
||||
const base = { id: "vision", label: "Lucys Augen", icon: Eye, critical: false }
|
||||
if (!loaded || !modelsResp) return { ...base, status: "loading", detail: "Wird geprüft …" }
|
||||
@@ -93,12 +95,12 @@ export function useLucyHealth(): LucyHealth {
|
||||
return { ...base, status: "warn", detail: "Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen." }
|
||||
const warm = (modelsResp.running ?? []).includes(vm.name)
|
||||
return warm
|
||||
? { ...base, status: "ok", detail: "Sieht Bildschirm und Bilder." }
|
||||
? { ...base, status: "ok", detail: "Sieht gerade zu (geladen, solange Lucy sie nutzt)." }
|
||||
: {
|
||||
...base,
|
||||
status: "warn",
|
||||
detail: "Lucys Augen sind eingeschlafen — das erste Bild-Ansehen dauert dann kurz.",
|
||||
repair: { kind: "loadModel", model: vm.name, label: "Augen aufwecken" },
|
||||
status: "ok",
|
||||
detail: "Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",
|
||||
repair: { kind: "loadModel", model: vm.name, label: "Augen wecken" },
|
||||
}
|
||||
})())
|
||||
|
||||
@@ -188,5 +190,5 @@ export function useLucyHealth(): LucyHealth {
|
||||
? "warn"
|
||||
: "gut"
|
||||
|
||||
return { verdict, checks, memory, problems }
|
||||
return { verdict, checks, memory, problems, warns }
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ export function CockpitView({ onNavigate }: { onNavigate: (v: string) => void })
|
||||
</div>
|
||||
|
||||
{/* Ehrliche Status-Zeile */}
|
||||
<StatusLine verdict={health.verdict} memory={health.memory} />
|
||||
<StatusLine verdict={health.verdict} memory={health.memory} warns={health.warns} />
|
||||
|
||||
{/* „Braucht dich" — offene Aktionen, sonst Ruhe */}
|
||||
<NeedsYou
|
||||
@@ -175,11 +175,20 @@ function ZoneLabel({ children }: { children: React.ReactNode }) {
|
||||
}
|
||||
|
||||
// Ehrliche Status-Zeile: großes Verdikt + Speicher-Pille. Erzählrahmen = Box.
|
||||
function StatusLine({ verdict, memory }: { verdict: ReturnType<typeof useLucyHealth>["verdict"]; memory: ReturnType<typeof useLucyHealth>["memory"] }) {
|
||||
// Bei „warn" wird der ECHTE Hinweis gezeigt (vorher stand hier nur „nur ein Hinweis" —
|
||||
// ohne zu sagen, welcher; User-Feedback 08.07.).
|
||||
function StatusLine({ verdict, memory, warns }: {
|
||||
verdict: ReturnType<typeof useLucyHealth>["verdict"]
|
||||
memory: ReturnType<typeof useLucyHealth>["memory"]
|
||||
warns: ReturnType<typeof useLucyHealth>["warns"]
|
||||
}) {
|
||||
const warnText = warns.length
|
||||
? `${warns[0].label}: ${warns[0].detail}${warns.length > 1 ? ` (+${warns.length - 1} weitere)` : ""}`
|
||||
: memory.status === "full" ? memory.text : "Nichts Schlimmes — nur ein Hinweis."
|
||||
const b = {
|
||||
loading: { ring: "border-border/60 bg-card/45", icon: Loader2, iconCls: "text-muted-foreground animate-spin", title: "Box wird geprüft …", sub: "Einen Moment." },
|
||||
gut: { ring: "border-emerald-500/40 bg-emerald-500/5", icon: HeartPulse, iconCls: "text-emerald-400", title: "Box gesund", sub: "Alle wichtigen Dienste laufen." },
|
||||
warn: { ring: "border-amber-500/40 bg-amber-500/5", icon: AlertTriangle, iconCls: "text-amber-400", title: "Kleinigkeit an der Box", sub: "Nichts Schlimmes — nur ein Hinweis." },
|
||||
warn: { ring: "border-amber-500/40 bg-amber-500/5", icon: AlertTriangle, iconCls: "text-amber-400", title: "Kleinigkeit an der Box", sub: warnText },
|
||||
problem: { ring: "border-red-500/50 bg-red-500/5", icon: AlertTriangle, iconCls: "text-red-400", title: "Box braucht Hilfe", sub: "Ein wichtiger Dienst hakt." },
|
||||
}[verdict]
|
||||
const Icon = b.icon
|
||||
|
||||
Reference in New Issue
Block a user