fix: error state, leg grouping, prompt→generating transition
- log_parser: detect model load failure (child + router patterns) → state=error; switch to generating at progress=1.00 and at prompt eval summary line - frontend: add state-error (llama flashes red, CSS variable override); group each leg+hoof in <g> so walk animation moves hooves with legs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
// ── State class management ────────────────────────────────────────────────
|
||||
const ALL_STATES = [
|
||||
'offline','starting','loading','warming_up','idle',
|
||||
'sleeping','waiting','processing_prompt','generating','unloading'
|
||||
'sleeping','waiting','processing_prompt','generating','unloading','error'
|
||||
];
|
||||
|
||||
function applyState(stateName) {
|
||||
|
||||
@@ -64,18 +64,23 @@
|
||||
<!-- Mouth: open (talking) -->
|
||||
<ellipse class="part mouth-open" cx="50" cy="39" rx="4.5" ry="3"/>
|
||||
|
||||
<!-- Front legs -->
|
||||
<rect class="part leg leg-fl" x="32" y="100" width="10" height="30" rx="4"/>
|
||||
<rect class="part leg leg-fr" x="46" y="100" width="10" height="30" rx="4"/>
|
||||
<!-- Back legs -->
|
||||
<rect class="part leg leg-bl" x="57" y="100" width="10" height="30" rx="4"/>
|
||||
<rect class="part leg leg-br" x="71" y="100" width="10" height="30" rx="4"/>
|
||||
|
||||
<!-- Hooves -->
|
||||
<rect class="part hoof" x="32" y="126" width="10" height="4" rx="2"/>
|
||||
<rect class="part hoof" x="46" y="126" width="10" height="4" rx="2"/>
|
||||
<rect class="part hoof" x="57" y="126" width="10" height="4" rx="2"/>
|
||||
<rect class="part hoof" x="71" y="126" width="10" height="4" rx="2"/>
|
||||
<!-- Legs + hooves (grouped so animation moves both together) -->
|
||||
<g class="leg-fl">
|
||||
<rect class="part leg" x="29" y="100" width="10" height="30" rx="4"/>
|
||||
<rect class="part hoof" x="29" y="126" width="10" height="4" rx="2"/>
|
||||
</g>
|
||||
<g class="leg-fr">
|
||||
<rect class="part leg" x="40" y="100" width="10" height="30" rx="4"/>
|
||||
<rect class="part hoof" x="40" y="126" width="10" height="4" rx="2"/>
|
||||
</g>
|
||||
<g class="leg-bl">
|
||||
<rect class="part leg" x="51" y="100" width="10" height="30" rx="4"/>
|
||||
<rect class="part hoof" x="51" y="126" width="10" height="4" rx="2"/>
|
||||
</g>
|
||||
<g class="leg-br">
|
||||
<rect class="part leg" x="62" y="100" width="10" height="30" rx="4"/>
|
||||
<rect class="part hoof" x="62" y="126" width="10" height="4" rx="2"/>
|
||||
</g>
|
||||
|
||||
<!-- Book (reading) -->
|
||||
<g class="part book">
|
||||
|
||||
@@ -145,6 +145,14 @@ body.state-processing_prompt #progress-wrap { display: flex; }
|
||||
/* offline */
|
||||
body.state-offline #llama { opacity: 0.15; }
|
||||
|
||||
/* error: llama flashes red */
|
||||
body.state-error { --amber: var(--red); --amber-dim: #cc3333; --amber-dk: #882222; }
|
||||
body.state-error #llama { animation: error-flash 1s ease-in-out infinite; }
|
||||
@keyframes error-flash {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.4; }
|
||||
}
|
||||
|
||||
/* ── ZZZ ─────────────────────────────────────────────────────────────────── */
|
||||
#zzz-wrap {
|
||||
position: absolute;
|
||||
@@ -341,6 +349,11 @@ body.state-unloading #row-speed,
|
||||
body.state-unloading #row-tokens,
|
||||
body.state-unloading #row-load-stage { display: none; }
|
||||
|
||||
body.state-error #row-prompt,
|
||||
body.state-error #row-speed,
|
||||
body.state-error #row-tokens,
|
||||
body.state-error #row-load-stage { display: none; }
|
||||
|
||||
body.state-processing_prompt #row-speed,
|
||||
body.state-processing_prompt #row-load-stage { display: none; }
|
||||
|
||||
@@ -390,12 +403,12 @@ body.state-waiting .right-ear {
|
||||
body.state-loading .leg-fl,
|
||||
body.state-loading .leg-bl {
|
||||
animation: walk-a 0.7s ease-in-out infinite;
|
||||
transform-origin: 37px 100px;
|
||||
transform-origin: 34px 100px;
|
||||
}
|
||||
body.state-loading .leg-fr,
|
||||
body.state-loading .leg-br {
|
||||
animation: walk-b 0.7s ease-in-out infinite;
|
||||
transform-origin: 51px 100px;
|
||||
transform-origin: 45px 100px;
|
||||
}
|
||||
|
||||
@keyframes walk-a {
|
||||
|
||||
Reference in New Issue
Block a user