Spaces:
Running
Running
Update templates/index.html
Browse files- templates/index.html +4 -2
templates/index.html
CHANGED
|
@@ -1322,7 +1322,6 @@
|
|
| 1322 |
const delays = { none:0, ai:18, human:30, diffusion:50, 'diffusion-v2':70 };
|
| 1323 |
const delay = delays[mode] ?? 0;
|
| 1324 |
|
| 1325 |
-
// Extract thinking blocks first
|
| 1326 |
const segments = extractThinkingBlocks(text);
|
| 1327 |
|
| 1328 |
if (mode === 'none') {
|
|
@@ -1338,7 +1337,9 @@
|
|
| 1338 |
if (seg.type === 'thinking') {
|
| 1339 |
await animateThinkingBlock(el, seg.content, delay);
|
| 1340 |
} else {
|
| 1341 |
-
|
|
|
|
|
|
|
| 1342 |
}
|
| 1343 |
}
|
| 1344 |
|
|
@@ -1346,6 +1347,7 @@
|
|
| 1346 |
bindCodeCopyButtons(el);
|
| 1347 |
}
|
| 1348 |
|
|
|
|
| 1349 |
/**
|
| 1350 |
* Animate a thinking block: show a "thinking…" dropdown that updates
|
| 1351 |
* in real-time, then when complete, display final duration.
|
|
|
|
| 1322 |
const delays = { none:0, ai:18, human:30, diffusion:50, 'diffusion-v2':70 };
|
| 1323 |
const delay = delays[mode] ?? 0;
|
| 1324 |
|
|
|
|
| 1325 |
const segments = extractThinkingBlocks(text);
|
| 1326 |
|
| 1327 |
if (mode === 'none') {
|
|
|
|
| 1337 |
if (seg.type === 'thinking') {
|
| 1338 |
await animateThinkingBlock(el, seg.content, delay);
|
| 1339 |
} else {
|
| 1340 |
+
const textContainer = document.createElement('div');
|
| 1341 |
+
el.appendChild(textContainer);
|
| 1342 |
+
await animateMarkdownChunked(textContainer, seg.content, delay);
|
| 1343 |
}
|
| 1344 |
}
|
| 1345 |
|
|
|
|
| 1347 |
bindCodeCopyButtons(el);
|
| 1348 |
}
|
| 1349 |
|
| 1350 |
+
|
| 1351 |
/**
|
| 1352 |
* Animate a thinking block: show a "thinking…" dropdown that updates
|
| 1353 |
* in real-time, then when complete, display final duration.
|