evalstate HF Staff commited on
Commit
0fe7384
·
verified ·
1 Parent(s): f6995be

Reduce stateful animation blank gap and keep last frame visible

Browse files
animations/mcp-stateful-request.html CHANGED
@@ -260,7 +260,7 @@
260
  document.getElementById('dot6')
261
  ];
262
  const stateBox = document.getElementById('stateBox');
263
- const CYCLE_PAUSE = 3000;
264
  const MSG_DURATION = 2500;
265
 
266
  let timers = [];
@@ -312,16 +312,9 @@
312
  }, showTime);
313
  });
314
 
315
- // Fade out last message and state
316
  const totalTime = messages.length * MSG_DURATION;
317
- schedule(() => {
318
- if (activeRunId !== runId) return;
319
- messages[messages.length - 1].classList.add('fade-out');
320
- stateBox.classList.add('fade-out');
321
- }, totalTime);
322
-
323
- // Restart
324
- schedule(() => runAnimation(activeRunId), totalTime + 1500 + CYCLE_PAUSE);
325
  }
326
 
327
  function startAnimation() {
 
260
  document.getElementById('dot6')
261
  ];
262
  const stateBox = document.getElementById('stateBox');
263
+ const CYCLE_PAUSE = 1200;
264
  const MSG_DURATION = 2500;
265
 
266
  let timers = [];
 
312
  }, showTime);
313
  });
314
 
315
+ // Keep last message visible briefly, then restart.
316
  const totalTime = messages.length * MSG_DURATION;
317
+ schedule(() => runAnimation(activeRunId), totalTime + CYCLE_PAUSE);
 
 
 
 
 
 
 
318
  }
319
 
320
  function startAnimation() {